Add tinyMCE 5.3.2 support - Clean up init.php for tinyMCE 6
Add tinyMCE 5.3.2 support - Clean up init.php for tinyMCE 6

--- a/admin/settings.php
+++ b/admin/settings.php
@@ -233,7 +233,7 @@
 
 	}
 	else if($sect == "sitesettings") {
-		$tinyMCE = ($_POST['newtinyMCE'] == 1  OR $_POST['newtinyMCE'] == 2 OR $_POST['newtinyMCE'] == 3 OR $_POST['newtinyMCE'] == 4) ? $_POST['newtinyMCE'] : 0;
+		$tinyMCE = ($_POST['newtinyMCE'] == 1  OR $_POST['newtinyMCE'] == 2 OR $_POST['newtinyMCE'] == 3 OR $_POST['newtinyMCE'] == 4 OR $_POST['newtinyMCE'] == 5) ? $_POST['newtinyMCE'] : 0;
 		$allowed_tags = $_POST['newallowed_tags'];
 		$favorites = $_POST['newfavorites'] == 1 ? 1 : 0;
 		$multiplecats = $_POST['newmultiplecats'] == 1 ? 1 : 0;
@@ -419,7 +419,8 @@
 		<table class='acp' style='margin: 0 auto;'>
 			<tr>
 				<td><label for='newtinyMCE'>"._USETINYMCE. ": </label></td><td><select name='newtinyMCE'>
-				<option value=\"4\"" . ($tinyMCE == 4 ? " selected" : "") . ">tinyMCE 6</option>
+				<option value=\"5\"" . ($tinyMCE == 5 ? " selected" : "") . ">tinyMCE 6</option>
+				<option value=\"4\"" . ($tinyMCE == 4 ? " selected" : "") . ">tinyMCE 5</option>
 				<option value=\"3\"" . ($tinyMCE == 3 ? " selected" : "") . ">tinyMCE 4</option>
 				<option value=\"2\"" . ($tinyMCE == 2 ? " selected" : "") . ">tinyMCE 3</option>
 				<option value=\"1\"" . ($tinyMCE == 1 ? " selected" : "") . ">tinyMCE 2</option>

file:a/header.php -> file:b/header.php
--- a/header.php
+++ b/header.php
@@ -258,9 +258,13 @@
 {
 	if (!empty($tinyMCE))
 	{
-		if($tinyMCE == 4) {
+		if($tinyMCE == 5) {
 			echo "<script src=\"" . _BASEDIR . "tinymce/6/js/tinymce/tinymce.min.js\"></script>";
 			include(_BASEDIR . "tinymce/6/init.php");
+		}
+		else if($tinyMCE == 4) {
+			echo "<script src=\"" . _BASEDIR . "tinymce/5/js/tinymce/tinymce.min.js\"></script>";
+			include(_BASEDIR . "tinymce/5/init.php");
 		}
 		else if($tinyMCE == 3) {
 			echo "<script src=\"" . _BASEDIR . "tinymce/4/js/tinymce/tinymce.min.js\"></script>";

--- /dev/null
+++ b/tinymce/5/index.php

--- /dev/null
+++ b/tinymce/5/init.php
@@ -1,1 +1,73 @@
+<?php
+$image_list_path = STORIESPATH . "/" . USERUID . "/images/imagelist.js";
+$image_list_exists = file_exists($image_list_path); 
+ 
+if (USERUID && $image_list_exists)
+{
+echo "
+<script src='".STORIESPATH . "/" . USERUID . "/images/imagelist.js"."'></script>";
+} 
+echo "
+	<script language=\"javascript\" type=\"text/javascript\"><!--";
+	$tinylanguage = $language;
+	if (!file_exists(_BASEDIR . "tinymce/langs/{$language}.js"))
+	{
+		$tinylanguage = "en";
+	}
+	$tinymessage = dbquery("SELECT message_text FROM ".TABLEPREFIX."fanfiction_messages WHERE message_name = 'tinyMCE' LIMIT 1");
+	list($tinysettings) = dbrow($tinymessage);
+	if(!empty($tinysettings) && $current != "adminarea") {
+		echo $tinysettings;
+	}
+	else {
+		echo "
+	tinymce.init({
+  		selector: 'textarea:not(.mceNoEditor)',
+  		resize: 'both',
+  		menubar: false,
+		language: '$tinylanguage',
+  		theme: 'silver',
+		invalid_styles: 'color,font-size,margin,line-height,font-family,margin-top,margin-bottom',
+		plugins: 'wordcount emoticons fullscreen anchor code hr image link paste ',
+		skin: 'oxide',
+		min_height: 300,
+		min_width: 200,
+		width: 500,
+		toolbar_location: 'top',
+	    browser_spellcheck: true,
+		relative_urls: false,
+		remove_script_host: false,
+    	convert_urls: true,
+		paste_word_valid_elements: 'b,strong,i,em,h1,h2,u,p,ol,ul,li,a[href],span,color,font-size,font-color,font-family,mark,table,tr,td',
+		toolbar1: 'bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist | undo redo | fullscreen code | link unlink | emoticons image anchor hr ',	image_advtab: true,
+     	paste_word_valid_elements: 'b,strong,i,em,p,span,u,strike,br',
+    	paste_retain_style_properties: 'text-decoration,text-align',
+	    menu: {
+			file: { title: 'File', items: 'newdocument' },
+			edit: { title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall' },
+			insert: { title: 'Insert', items: 'link media | template hr' },
+			view: { title: 'View', items: 'visualaid' },
+			table: { title: 'Table', items: 'inserttable tableprops deletetable | cell row column' },
+			tools: { title: 'Tools', items: '' }
+    	},";
+		if (USERUID && $image_list_exists)
+			echo "	image_list: tinyMCE5ImageList ,";
+		echo "
+		theme_silver_resizing: true,".($current == "adminarea" ? "\n\t\tentity_encoding: 'raw'" : "\n\t\tinvalid_elements: 'script,object,applet,iframe'")."
+   });
+	
+";
+	}
+	echo "
+var tinyMCEmode = true;
+	function toogleEditorMode(id) {
+		var elm = document.getElementById(id);
 
+		if (tinyMCE.get(id) == null)
+		tinymce.EditorManager.execCommand('mceToggleEditor', true, id);
+		else
+		tinymce.EditorManager.execCommand('mceToggleEditor', false, id);
+	}
+";
+echo " --></script>";
+

--- /dev/null
+++ b/tinymce/5/js/.npmignore
@@ -1,1 +1,3 @@
+composer.json
+bower.json
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/bower.json
@@ -1,1 +1,21 @@
-
+{
+	"name": "tinymce",
+	"description": "Web based JavaScript HTML WYSIWYG editor control.",
+	"license": "LGPL-2.1",
+	"keywords": [
+		"editor",
+		"wysiwyg",
+		"tinymce",
+		"richtext",
+		"javascript",
+		"html"
+	],
+	"homepage": "http://www.tinymce.com",
+	"ignore": [
+		"readme.md",
+		"composer.json",
+		"package.json",
+		".npmignore",
+		"changelog.txt"
+	]
+}

--- /dev/null
+++ b/tinymce/5/js/tinymce/changelog.txt
@@ -1,1 +1,1604 @@
+Version 5.3.2 (2020-06-10)
+    Fixed a regression introduced in 5.3.0, where `images_dataimg_filter` was no-longer called #TINY-6086
+Version 5.3.1 (2020-05-27)
+    Fixed the image upload error alert also incorrectly closing the image dialog #TINY-6020
+    Fixed editor content scrolling incorrectly on focus in Firefox by reverting default content CSS html and body heights added in 5.3.0 #TINY-6019
+Version 5.3.0 (2020-05-21)
+    Added html and body height styles to the default oxide content CSS #TINY-5978
+    Added `uploadUri` and `blobInfo` to the data returned by `editor.uploadImages()` #TINY-4579
+    Added a new function to the `BlobCache` API to lookup a blob based on the base64 data and mime type #TINY-5988
+    Added the ability to search and replace within a selection #TINY-4549
+    Added the ability to set the list start position for ordered lists and added new `lists` context menu item #TINY-3915
+    Added `icon` as an optional config option to the toggle menu item API #TINY-3345
+    Added `auto` mode for `toolbar_location` which positions the toolbar and menu bar at the bottom if there is no space at the top #TINY-3161
+    Changed the default `toolbar_location` to `auto` #TINY-3161
+    Changed toggle menu items and choice menu items to have a dedicated icon with the checkmark displayed on the far right side of the menu item #TINY-3345
+    Changed the `link`, `image`, and `paste` plugins to use Promises to reduce the bundle size #TINY-4710
+    Changed the default icons to be lazy loaded during initialization #TINY-4729
+    Changed the parsing of content so base64 encoded urls are converted to blob urls #TINY-4727
+    Changed context toolbars so they concatenate when more than one is suitable for the current selection #TINY-4495
+    Changed inline style element formats (strong, b, em, i, u, strike) to convert to a span on format removal if a `style` or `class` attribute is present #TINY-4741
+    Fixed the `selection.setContent()` API not running parser filters #TINY-4002
+    Fixed formats incorrectly applied or removed when table cells were selected #TINY-4709
+    Fixed the `quickimage` button not restricting the file types to images #TINY-4715
+    Fixed search and replace ignoring text in nested contenteditable elements #TINY-5967
+    Fixed resize handlers displaying in the wrong location sometimes for remote images #TINY-4732
+    Fixed table picker breaking in Firefox on low zoom levels #TINY-4728
+    Fixed issue with loading or pasting contents with large base64 encoded images on Safari #TINY-4715
+    Fixed supplementary special characters being truncated when inserted into the editor. Patch contributed by mlitwin. #TINY-4791
+    Fixed toolbar buttons not set to disabled when the editor is in readonly mode #TINY-4592
+    Fixed the editor selection incorrectly changing when removing caret format containers #TINY-3438
+    Fixed bug where title, width, and height would be set to empty string values when updating an image and removing those attributes using the image dialog #TINY-4786
+    Fixed `ObjectResized` event firing when an object wasn't resized #TINY-4161
+    Fixed `ObjectResized` and `ObjectResizeStart` events incorrectly fired when adding or removing table rows and columns #TINY-4829
+    Fixed the placeholder not hiding when pasting content into the editor #TINY-4828
+    Fixed an issue where the editor would fail to load if local storage was disabled #TINY-5935
+    Fixed an issue where an uploaded image would reuse a cached image with a different mime type #TINY-5988
+    Fixed bug where toolbars and dialogs would not show if the body element was replaced (e.g. with Turbolinks). Patch contributed by spohlenz #GH-5653
+    Fixed an issue where multiple formats would be removed when removing a single format at the end of lines or on empty lines #TINY-1170
+    Fixed zero-width spaces incorrectly included in the `wordcount` plugin character count #TINY-5991
+    Fixed a regression introduced in 5.2.0 whereby the desktop `toolbar_mode` setting would incorrectly override the mobile default setting #TINY-5998
+    Fixed an issue where deleting all content in a single cell table would delete the entire table #TINY-1044
+Version 5.2.2 (2020-04-23)
+    Fixed an issue where anchors could not be inserted on empty lines #TINY-2788
+    Fixed text decorations (underline, strikethrough) not consistently inheriting the text color #TINY-4757
+    Fixed `format` menu alignment buttons inconsistently applying to images #TINY-4057
+    Fixed the floating toolbar drawer height collapsing when the editor is rendered in modal dialogs or floating containers #TINY-4837
+    Fixed `media` embed content not processing safely in some cases #TINY-4857
+Version 5.2.1 (2020-03-25)
+    Fixed the "is decorative" checkbox in the image dialog clearing after certain dialog events #FOAM-11
+    Fixed possible uncaught exception when a `style` attribute is removed using a content filter on `setContent` #TINY-4742
+    Fixed the table selection not functioning correctly in Microsoft Edge 44 or higher #TINY-3862
+    Fixed the table resize handles not functioning correctly in Microsoft Edge 44 or higher #TINY-4160
+    Fixed the floating toolbar drawer disconnecting from the toolbar when adding content in inline mode #TINY-4725 #TINY-4765
+    Fixed `readonly` mode not returning the appropriate boolean value #TINY-3948
+    Fixed the `forced_root_block_attrs` setting not applying attributes to new blocks consistently #TINY-4564
+    Fixed the editor incorrectly stealing focus during initialization in Microsoft Internet Explorer #TINY-4697
+    Fixed dialogs stealing focus when opening an alert or confirm dialog using an `onAction` callback #TINY-4014
+    Fixed inline dialogs incorrectly closing when clicking on an opened alert or confirm dialog #TINY-4012
+    Fixed the context toolbar overlapping the menu bar and toolbar #TINY-4586
+    Fixed notification and inline dialog positioning issues when using `toolbar_location: 'bottom'` #TINY-4586
+    Fixed the `colorinput` popup appearing offscreen on mobile devices #TINY-4711
+    Fixed special characters not being found when searching by "whole words only" #TINY-4522
+    Fixed an issue where dragging images could cause them to be duplicated #TINY-4195
+    Fixed context toolbars activating without the editor having focus #TINY-4754
+    Fixed an issue where removing the background color of text did not always work #TINY-4770
+    Fixed an issue where new rows and columns in a table did not retain the style of the previous row or column #TINY-4788
+Version 5.2.0 (2020-02-13)
+    Added the ability to apply formats to spaces #TINY-4200
+    Added new `toolbar_location` setting to allow for positioning the menu and toolbar at the bottom of the editor #TINY-4210
+    Added new `toolbar_groups` setting to allow a custom floating toolbar group to be added to the toolbar when using `floating` toolbar mode #TINY-4229
+    Added new `link_default_protocol` setting to `link` and `autolink` plugin to allow a protocol to be used by default #TINY-3328
+    Added new `placeholder` setting to allow a placeholder to be shown when the editor is empty #TINY-3917
+    Added new `tinymce.dom.TextSeeker` API to allow searching text across different DOM nodes #TINY-4200
+    Added a drop shadow below the toolbar while in sticky mode and introduced Oxide variables to customize it when creating a custom skin #TINY-4343
+    Added `quickbars_image_toolbar` setting to allow for the image quickbar to be turned off #TINY-4398
+    Added iframe and img `loading` attribute to the default schema. Patch contributed by ataylor32. #GH-5112
+    Added new `getNodeFilters`/`getAttributeFilters` functions to the `editor.serializer` instance #TINY-4344
+    Added new `a11y_advanced_options` setting to allow additional accessibility options to be added #FOAM-11
+    Added new accessibility options and behaviours to the image dialog using `a11y_advanced_options` #FOAM-11
+    Added the ability to use the window `PrismJS` instance for the `codesample` plugin instead of the bundled version to allow for styling custom languages #TINY-4504
+    Added error message events that fire when a resource loading error occurs #TINY-4509
+    Changed the default schema to disallow `onchange` for select elements #TINY-4614
+    Changed default `toolbar_mode` value from false to `wrap`. The value false has been deprecated #TINY-4617
+    Changed `toolbar_drawer` setting to `toolbar_mode`. `toolbar_drawer` has been deprecated #TINY-4416
+    Changed iframe mode to set selection on content init if selection doesn't exist #TINY-4139
+    Changed table related icons to align them with the visual style of the other icons #TINY-4341
+    Changed and improved the visual appearance of the color input field #TINY-2917
+    Changed fake caret container to use `forced_root_block` when possible #TINY-4190
+    Changed the `requireLangPack` API to wait until the plugin has been loaded before loading the language pack #TINY-3716
+    Changed the formatter so `style_formats` are registered before the initial content is loaded into the editor #TINY-4238
+    Changed media plugin to use https protocol for media urls by default #TINY-4577
+    Changed the parser to treat CDATA nodes as bogus HTML comments to match the HTML parsing spec. A new `preserve_cdata` setting has been added to preserve CDATA nodes if required #TINY-4625
+    Fixed incorrect parsing of malformed/bogus HTML comments #TINY-4625
+    Fixed `quickbars` selection toolbar appearing on non-editable elements #TINY-4359
+    Fixed bug with alignment toolbar buttons sometimes not changing state correctly #TINY-4139
+    Fixed the `codesample` toolbar button not toggling when selecting code samples other than HTML #TINY-4504
+    Fixed content incorrectly scrolling to the top or bottom when pressing enter if when the content was already in view #TINY-4162
+    Fixed `scrollIntoView` potentially hiding elements behind the toolbar #TINY-4162
+    Fixed editor not respecting the `resize_img_proportional` setting due to legacy code #TINY-4236
+    Fixed flickering floating toolbar drawer in inline mode #TINY-4210
+    Fixed an issue where the template plugin dialog would be indefinitely blocked on a failed template load #TINY-2766
+    Fixed the `mscontrolselect` event not being unbound on IE/Edge #TINY-4196
+    Fixed Confirm dialog footer buttons so only the "Yes" button is highlighted #TINY-4310
+    Fixed `file_picker_callback` functionality for Image, Link and Media plugins #TINY-4163
+    Fixed issue where floating toolbar drawer sometimes would break if the editor is resized while the drawer is open #TINY-4439
+    Fixed incorrect `external_plugins` loading error message #TINY-4503
+    Fixed resize handler was not hidden for ARIA purposes. Patch contributed by Parent5446. #GH-5195
+    Fixed an issue where content could be lost if a misspelled word was selected and spellchecking was disabled #TINY-3899
+    Fixed validation errors in the CSS where certain properties had the wrong default value #TINY-4491
+    Fixed an issue where forced root block attributes were not applied when removing a list #TINY-4272
+    Fixed an issue where the element path isn't being cleared when there are no parents #TINY-4412
+    Fixed an issue where width and height in svg icons containing `rect` elements were overridden by the CSS reset #TINY-4408
+    Fixed an issue where uploading images with `images_reuse_filename` enabled and that included a query parameter would generate an invalid URL #TINY-4638
+    Fixed the `closeButton` property not working when opening notifications #TINY-4674
+    Fixed keyboard flicker when opening a context menu on mobile #TINY-4540
+    Fixed issue where plus icon svg contained strokes #TINY-4681
+Version 5.1.6 (2020-01-28)
+    Fixed `readonly` mode not blocking all clicked links #TINY-4572
+    Fixed legacy font sizes being calculated inconsistently for the `FontSize` query command value #TINY-4555
+    Fixed changing a tables row from `Header` to `Body` incorrectly moving the row to the bottom of the table #TINY-4593
+    Fixed the context menu not showing in certain cases with hybrid devices #TINY-4569
+    Fixed the context menu opening in the wrong location when the target is the editor body #TINY-4568
+    Fixed the `image` plugin not respecting the `automatic_uploads` setting when uploading local images #TINY-4287
+    Fixed security issue related to parsing HTML comments and CDATA #TINY-4544
+Version 5.1.5 (2019-12-19)
+    Fixed the UI not working with hybrid devices that accept both touch and mouse events #TNY-4521
+    Fixed the `charmap` dialog initially focusing the first tab of the dialog instead of the search input field #TINY-4342
+    Fixed an exception being raised when inserting content if the caret was directly before or after a `contenteditable="false"` element #TINY-4528
+    Fixed a bug with pasting image URLs when paste as text is enabled #TINY-4523
+Version 5.1.4 (2019-12-11)
+    Fixed dialog contents disappearing when clicking a checkbox for right-to-left languages #TINY-4518
+    Fixed the `legacyoutput` plugin registering legacy formats after editior initialization, causing legacy content to be stripped on the initial load #TINY-4447
+    Fixed search and replace not cycling through results when searching using special characters #TINY-4506
+    Fixed the `visualchars` plugin converting HTML-like text to DOM elements in certain cases #TINY-4507
+    Fixed an issue with the `paste` plugin not sanitizing content in some cases #TINY-4510
+    Fixed HTML comments incorrectly being parsed in certain cases #TINY-4511
+Version 5.1.3 (2019-12-04)
+    Fixed sticky toolbar not undocking when fullscreen mode is activated #TINY-4390
+    Fixed the "Current Window" target not applying when updating links using the link dialog #TINY-4063
+    Fixed disabled menu items not highlighting when focused #TINY-4339
+    Fixed touch events passing through dialog collection items to the content underneath on Android devices #TINY-4431
+    Fixed keyboard navigation of the Help dialog's Keyboard Navigation tab #TINY-4391
+    Fixed search and replace dialog disappearing when finding offscreen matches on iOS devices #TINY-4350
+    Fixed performance issues where sticky toolbar was jumping while scrolling on slower browsers #TINY-4475
+Version 5.1.2 (2019-11-19)
+    Fixed desktop touch devices using `mobile` configuration overrides #TINY-4345
+    Fixed unable to disable the new scrolling toolbar feature #TINY-4345
+    Fixed touch events passing through any pop-up items to the content underneath on Android devices #TINY-4367
+    Fixed the table selector handles throwing JavaScript exceptions for non-table selections #TINY-4338
+    Fixed `cut` operations not removing selected content on Android devices when the `paste` plugin is enabled #TINY-4362
+    Fixed inline toolbar not constrained to the window width by default #TINY-4314
+    Fixed context toolbar split button chevrons pointing right when they should be pointing down #TINY-4257
+    Fixed unable to access the dialog footer in tabbed dialogs on small screens #TINY-4360
+    Fixed mobile table selectors were hard to select with touch by increasing the size #TINY-4366
+    Fixed mobile table selectors moving when moving outside the editor #TINY-4366
+    Fixed inline toolbars collapsing when using sliding toolbars #TINY-4389
+    Fixed block textpatterns not treating NBSPs as spaces #TINY-4378
+    Fixed backspace not merging blocks when the last element in the preceding block was a `contenteditable="false"` element #TINY-4235
+    Fixed toolbar buttons that only contain text labels overlapping on mobile devices #TINY-4395
+    Fixed quickbars quickimage picker not working on mobile #TINY-4377
+    Fixed fullscreen not resizing in an iOS WKWebView component #TINY-4413
+Version 5.1.1 (2019-10-28)
+    Fixed font formats containing spaces being wrapped in `&quot;` entities instead of single quotes #TINY-4275
+    Fixed alert and confirm dialogs losing focus when clicked #TINY-4248
+    Fixed clicking outside a modal dialog focusing on the document body #TINY-4249
+    Fixed the context toolbar not hiding when scrolled out of view #TINY-4265
+Version 5.1.0 (2019-10-17)
+    Added touch selector handles for table selections on touch devices #TINY-4097
+    Added border width field to Table Cell dialog #TINY-4028
+    Added touch event listener to media plugin to make embeds playable #TINY-4093
+    Added oxide styling options to notifications and tweaked the default variables #TINY-4153
+    Added additional padding to split button chevrons on touch devices, to make them easier to interact with #TINY-4223
+    Added new platform detection functions to `Env` and deprecated older detection properties #TINY-4184
+    Added `inputMode` config field to specify inputmode attribute of `input` dialog components #TINY-4062
+    Added new `inputMode` property to relevant plugins/dialogs #TINY-4102
+    Added new `toolbar_sticky` setting to allow the iframe menubar/toolbar to stick to the top of the window when scrolling #TINY-3982
+    Changed default setting for `toolbar_drawer` to `floating` #TINY-3634
+    Changed mobile phones to use the `silver` theme by default #TINY-3634
+    Changed some editor settings to default to `false` on touch devices:
+        - `menubar`(phones only) #TINY-4077
+        - `table_grid` #TINY-4075
+        - `resize` #TINY-4157
+        - `object_resizing` #TINY-4157
+    Changed toolbars and context toolbars to sidescroll on mobile #TINY-3894 #TINY-4107
+    Changed context menus to render as horizontal menus on touch devices #TINY-4107
+    Changed the editor to use the `VisualViewport` API of the browser where possible #TINY-4078
+    Changed visualblocks toolbar button icon and renamed `paragraph` icon to `visualchars` #TINY-4074
+    Changed Oxide default for `@toolbar-button-chevron-color` to follow toolbar button icon color #TINY-4153
+    Changed the `urlinput` dialog component to use the `url` type attribute #TINY-4102
+    Fixed Safari desktop visual viewport fires resize on fullscreen breaking the restore function #TINY-3976
+    Fixed scroll issues on mobile devices #TINY-3976
+    Fixed context toolbar unable to refresh position on iOS12 #TINY-4107
+    Fixed ctrl+left click not opening links on readonly mode and the preview dialog #TINY-4138
+    Fixed Slider UI component not firing `onChange` event on touch devices #TINY-4092
+    Fixed notifications overlapping instead of stacking #TINY-3478
+    Fixed inline dialogs positioning incorrectly when the page is scrolled #TINY-4018
+    Fixed inline dialogs and menus not repositioning when resizing #TINY-3227
+    Fixed inline toolbar incorrectly stretching to the full width when a width value was provided #TINY-4066
+    Fixed menu chevrons color to follow the menu text color #TINY-4153
+    Fixed table menu selection grid from staying black when using dark skins, now follows border color #TINY-4153
+    Fixed Oxide using the wrong text color variable for menubar button focused state #TINY-4146
+    Fixed the autoresize plugin not keeping the selection in view when resizing #TINY-4094
+    Fixed textpattern plugin throwing exceptions when using `forced_root_block: false` #TINY-4172
+    Fixed missing CSS fill styles for toolbar button icon active state #TINY-4147
+    Fixed an issue where the editor selection could end up inside a short ended element (such as `br`) #TINY-3999
+    Fixed browser selection being lost in inline mode when opening split dropdowns #TINY-4197
+    Fixed backspace throwing an exception when using `forced_root_block: false` #TINY-4099
+    Fixed floating toolbar drawer expanding outside the bounds of the editor #TINY-3941
+    Fixed the autocompleter not activating immediately after a `br` or `contenteditable=false` element #TINY-4194
+    Fixed an issue where the autocompleter would incorrectly close on IE 11 in certain edge cases #TINY-4205
+Version 5.0.16 (2019-09-24)
+    Added new `referrer_policy` setting to add the `referrerpolicy` attribute when loading scripts or stylesheets #TINY-3978
+    Added a slight background color to dialog tab links when focused to aid keyboard navigation #TINY-3877
+    Fixed media poster value not updating on change #TINY-4013
+    Fixed openlink was not registered as a toolbar button #TINY-4024
+    Fixed failing to initialize if a script tag was used inside a SVG #TINY-4087
+    Fixed double top border showing on toolbar without menubar when toolbar_drawer is enabled #TINY-4118
+    Fixed unable to drag inline dialogs to the bottom of the screen when scrolled #TINY-4154
+    Fixed notifications appearing on top of the toolbar when scrolled in inline mode #TINY-4159
+    Fixed notifications displaying incorrectly on IE 11 #TINY-4169
+Version 5.0.15 (2019-09-02)
+    Added a dark `content_css` skin to go with the dark UI skin #TINY-3743
+    Changed the enabled state on toolbar buttons so they don't get the hover effect #TINY-3974
+    Fixed missing CSS active state on toolbar buttons #TINY-3966
+    Fixed `onChange` callback not firing for the colorinput dialog component #TINY-3968
+    Fixed context toolbars not showing in fullscreen mode #TINY-4023
+Version 5.0.14 (2019-08-19)
+    Added an API to reload the autocompleter menu with additional fetch metadata #MENTIONS-17
+    Fixed missing toolbar button border styling options #TINY-3965
+    Fixed image upload progress notification closing before the upload is complete #TINY-3963
+    Fixed inline dialogs not closing on escape when no dialog component is in focus #TINY-3936
+    Fixed plugins not being filtered when defaulting to mobile on phones #TINY-3537
+    Fixed toolbar more drawer showing the content behind it when transitioning between opened and closed states #TINY-3878
+    Fixed focus not returning to the dialog after pressing the "Replace all" button in the search and replace dialog #TINY-3961
+    Removed Oxide variable `@menubar-select-disabled-border-color` and replaced it with `@menubar-select-disabled-border` #TINY-3965
+Version 5.0.13 (2019-08-06)
+    Changed modal dialogs to prevent dragging by default and added new `draggable_modal` setting to restore dragging #TINY-3873
+    Changed the nonbreaking plugin to insert nbsp characters wrapped in spans to aid in filtering. This can be disabled using the `nonbreaking_wrap` setting #TINY-3647
+    Changed backspace behaviour in lists to outdent nested list items when the cursor is at the start of the list item #TINY-3651
+    Fixed sidebar growing beyond editor bounds in IE 11 #TINY-3937
+    Fixed issue with being unable to keyboard navigate disabled toolbar buttons #TINY-3350
+    Fixed issues with backspace and delete in nested contenteditable true and false elements #TINY-3868
+    Fixed issue with losing keyboard navigation in dialogs due to disabled buttons #TINY-3914
+    Fixed `MouseEvent.mozPressure is deprecated` warning in Firefox #TINY-3919
+    Fixed `default_link_target` not being respected when `target_list` is disabled #TINY-3757
+    Fixed mobile plugin filter to only apply to the mobile theme, rather than all mobile platforms #TINY-3405
+    Fixed focus switching to another editor during mode changes #TINY-3852
+    Fixed an exception being thrown when clicking on an uninitialized inline editor #TINY-3925
+    Fixed unable to keyboard navigate to dialog menu buttons #TINY-3933
+    Fixed dialogs being able to be dragged outside the window viewport #TINY-3787
+    Fixed inline dialogs appearing above modal dialogs #TINY-3932
+Version 5.0.12 (2019-07-18)
+    Added ability to utilize UI dialog panels inside other panels #TINY-3305
+    Added help dialog tab explaining keyboard navigation of the editor #TINY-3603
+    Changed the "Find and Replace" design to an inline dialog #TINY-3054
+    Fixed issue where autolink spacebar event was not being fired on Edge #TINY-3891
+    Fixed table selection missing the background color #TINY-3892
+    Fixed removing shortcuts not working for function keys #TINY-3871
+    Fixed non-descriptive UI component type names #TINY-3349
+    Fixed UI registry components rendering as the wrong type when manually specifying a different type #TINY-3385
+    Fixed an issue where dialog checkbox, input, selectbox, textarea and urlinput components couldn't be disabled #TINY-3708
+    Fixed the context toolbar not using viable screen space in inline/distraction free mode #TINY-3717
+    Fixed the context toolbar overlapping the toolbar in various conditions #TINY-3205
+    Fixed IE11 edge case where items were being inserted into the wrong location #TINY-3884
+Version 5.0.11 (2019-07-04)
+    Fixed packaging errors caused by a rollup treeshaking bug (https://github.com/rollup/rollup/issues/2970) #TINY-3866
+    Fixed the customeditor component not able to get data from the dialog api #TINY-3866
+    Fixed collection component tooltips not being translated #TINY-3855
+Version 5.0.10 (2019-07-02)
+    Added support for all HTML color formats in `color_map` setting #TINY-3837
+    Changed backspace key handling to outdent content in appropriate circumstances #TINY-3685
+    Changed default palette for forecolor and backcolor to include some lighter colors suitable for highlights #TINY-2865
+    Changed the search and replace plugin to cycle through results #TINY-3800
+    Fixed inconsistent types causing some properties to be unable to be used in dialog components #TINY-3778
+    Fixed an issue in the Oxide skin where dialog content like outlines and shadows were clipped because of overflow hidden #TINY-3566
+    Fixed the search and replace plugin not resetting state when changing the search query #TINY-3800
+    Fixed backspace in lists not creating an undo level #TINY-3814
+    Fixed the editor to cancel loading in quirks mode where the UI is not supported #TINY-3391
+    Fixed applying fonts not working when the name contained spaces and numbers #TINY-3801
+    Fixed so that initial content is retained when initializing on list items #TINY-3796
+    Fixed inefficient font name and font size current value lookup during rendering #TINY-3813
+    Fixed mobile font copied into the wrong folder for the oxide-dark skin #TINY-3816
+    Fixed an issue where resizing the width of tables would produce inaccurate results #TINY-3827
+    Fixed a memory leak in the Silver theme #TINY-3797
+    Fixed alert and confirm dialogs using incorrect markup causing inconsistent padding #TINY-3835
+    Fixed an issue in the Table plugin with `table_responsive_width` not enforcing units when resizing #TINY-3790
+    Fixed leading, trailing and sequential spaces being lost when pasting plain text #TINY-3726
+    Fixed exception being thrown when creating relative URIs #TINY-3851
+    Fixed focus is no longer set to the editor content during mode changes unless the editor already had focus #TINY-3852
+Version 5.0.9 (2019-06-26)
+    Fixed print plugin not working in Firefox #TINY-3834
+Version 5.0.8 (2019-06-18)
+    Added back support for multiple toolbars #TINY-2195
+    Added support for .m4a files to the media plugin #TINY-3750
+    Added new base_url and suffix editor init options #TINY-3681
+    Fixed incorrect padding for select boxes with visible values #TINY-3780
+    Fixed selection incorrectly changing when programmatically setting selection on contenteditable false elements #TINY-3766
+    Fixed sidebar background being transparent #TINY-3727
+    Fixed the build to remove duplicate iife wrappers #TINY-3689
+    Fixed bogus autocompleter span appearing in content when the autocompleter menu is shown #TINY-3752
+    Fixed toolbar font size select not working with legacyoutput plugin #TINY-2921
+    Fixed the legacyoutput plugin incorrectly aligning images #TINY-3660
+    Fixed remove color not working when using the legacyoutput plugin #TINY-3756
+    Fixed the font size menu applying incorrect sizes when using the legacyoutput plugin #TINY-3773
+    Fixed scrollIntoView not working when the parent window was out of view #TINY-3663
+    Fixed the print plugin printing from the wrong window in IE11 #TINY-3762
+    Fixed content CSS loaded over CORS not loading in the preview plugin with content_css_cors enabled #TINY-3769
+    Fixed the link plugin missing the default "None" option for link list #TINY-3738
+    Fixed small dot visible with menubar and toolbar disabled in inline mode #TINY-3623
+    Fixed space key properly inserts a nbsp before/after block elements #TINY-3745
+    Fixed native context menu not showing with images in IE11 #TINY-3392
+    Fixed inconsistent browser context menu image selection #TINY-3789
+Version 5.0.7 (2019-06-05)
+    Added new toolbar button and menu item for inserting tables via dialog #TINY-3636
+    Added new API for adding/removing/changing tabs in the Help dialog #TINY-3535
+    Added highlighting of matched text in autocompleter items #TINY-3687
+    Added the ability for autocompleters to work with matches that include spaces #TINY-3704
+    Added new `imagetools_fetch_image` callback to allow custom implementations for cors loading of images #TINY-3658
+    Added `'http'` and `https` options to `link_assume_external_targets` to prepend `http://` or `https://` prefixes when URL does not contain a protocol prefix. Patch contributed by francoisfreitag. #GH-4335
+    Changed annotations navigation to work the same as inline boundaries #TINY-3396
+    Changed tabpanel API by adding a `name` field and changing relevant methods to use it #TINY-3535
+    Fixed text color not updating all color buttons when choosing a color #TINY-3602
+    Fixed the autocompleter not working with fragmented text #TINY-3459
+    Fixed the autosave plugin no longer overwrites window.onbeforeunload #TINY-3688
+    Fixed infinite loop in the paste plugin when IE11 takes a long time to process paste events. Patch contributed by lRawd. #GH-4987
+    Fixed image handle locations when using `fixed_toolbar_container`. Patch contributed by t00. #GH-4966
+    Fixed the autoresize plugin not firing `ResizeEditor` events #TINY-3587
+    Fixed editor in fullscreen mode not extending to the bottom of the screen #TINY-3701
+    Fixed list removal when pressing backspace after the start of the list item #TINY-3697
+    Fixed autocomplete not triggering from compositionend events #TINY-3711
+    Fixed `file_picker_callback` could not set the caption field on the insert image dialog #TINY-3172
+    Fixed the autocompleter menu showing up after a selection had been made #TINY-3718
+    Fixed an exception being thrown when a file or number input has focus during initialization. Patch contributed by t00 #GH-2194
+Version 5.0.6 (2019-05-22)
+    Added `icons_url` editor settings to enable icon packs to be loaded from a custom url #TINY-3585
+    Added `image_uploadtab` editor setting to control the visibility of the upload tab in the image dialog #TINY-3606
+    Added new api endpoints to the wordcount plugin and improved character count logic #TINY-3578
+    Changed plugin, language and icon loading errors to log in the console instead of a notification #TINY-3585
+    Fixed the textpattern plugin not working with fragmented text #TINY-3089
+    Fixed various toolbar drawer accessibility issues and added an animation #TINY-3554
+    Fixed issues with selection and ui components when toggling readonly mode #TINY-3592
+    Fixed so readonly mode works with inline editors #TINY-3592
+    Fixed docked inline toolbar positioning when scrolled #TINY-3621
+    Fixed initial value not being set on bespoke select in quickbars and toolbar drawer #TINY-3591
+    Fixed so that nbsp entities aren't trimmed in white-space: pre-line elements #TINY-3642
+    Fixed `mceInsertLink` command inserting spaces instead of url encoded characters #GH-4990
+    Fixed text content floating on top of dialogs in IE11 #TINY-3640
+Version 5.0.5 (2019-05-09)
+    Added menu items to match the forecolor/backcolor toolbar buttons #TINY-2878
+    Added default directionality based on the configured language #TINY-2621
+    Added styles, icons and tests for rtl mode #TINY-2621
+    Fixed autoresize not working with floating elements or when media elements finished loading #TINY-3545
+    Fixed incorrect vertical caret positioning in IE 11 #TINY-3188
+    Fixed submenu anchoring hiding overflowed content #TINY-3564
+    Removed unused and hidden validation icons to avoid displaying phantom tooltips #TINY-2329
+Version 5.0.4 (2019-04-23)
+    Added back URL dialog functionality, which is now available via `editor.windowManager.openUrl()` #TINY-3382
+    Added the missing throbber functionality when calling `editor.setProgressState(true)` #TINY-3453
+    Added function to reset the editor content and undo/dirty state via `editor.resetContent()` #TINY-3435
+    Added the ability to set menu buttons as active #TINY-3274
+    Added `editor.mode` API, featuring a custom editor mode API #TINY-3406
+    Added better styling to floating toolbar drawer #TINY-3479
+    Added the new premium plugins to the Help dialog plugins tab #TINY-3496
+    Added the linkchecker context menu items to the default configuration #TINY-3543
+    Fixed image context menu items showing on placeholder images #TINY-3280
+    Fixed dialog labels and text color contrast within notifications/alert banners to satisfy WCAG 4.5:1 contrast ratio for accessibility #TINY-3351
+    Fixed selectbox and colorpicker items not being translated #TINY-3546
+    Fixed toolbar drawer sliding mode to correctly focus the editor when tabbing via keyboard navigation #TINY-3533
+    Fixed positioning of the styleselect menu in iOS while using the mobile theme #TINY-3505
+    Fixed the menubutton `onSetup` callback to be correctly executed when rendering the menu buttons #TINY-3547
+    Fixed `default_link_target` setting to be correctly utilized when creating a link #TINY-3508
+    Fixed colorpicker floating marginally outside its container #TINY-3026
+    Fixed disabled menu items displaying as active when hovered #TINY-3027
+    Removed redundant mobile wrapper #TINY-3480
+Version 5.0.3 (2019-03-19)
+    Changed empty nested-menu items within the style formats menu to be disabled or hidden if the value of `style_formats_autohide` is `true` #TINY-3310
+    Changed the entire phrase 'Powered by Tiny' in the status bar to be a link instead of just the word 'Tiny' #TINY-3366
+    Changed `formatselect`, `styleselect` and `align` menus to use the `mceToggleFormat` command internally #TINY-3428
+    Fixed toolbar keyboard navigation to work as expected when `toolbar_drawer` is configured #TINY-3432
+    Fixed text direction buttons to display the correct pressed state in selections that have no explicit `dir` property #TINY-3138
+    Fixed the mobile editor to clean up properly when removed #TINY-3445
+    Fixed quickbar toolbars to add an empty box to the screen when it is set to `false` #TINY-3439
+    Fixed an issue where pressing the **Delete/Backspace** key at the edge of tables was creating incorrect selections #TINY-3371
+    Fixed an issue where dialog collection items (emoticon and special character dialogs) couldn't be selected with touch devices #TINY-3444
+    Fixed a type error introduced in TinyMCE version 5.0.2 when calling `editor.getContent()` with nested bookmarks #TINY-3400
+    Fixed an issue that prevented default icons from being overridden #TINY-3449
+    Fixed an issue where **Home/End** keys wouldn't move the caret correctly before or after `contenteditable=false` inline elements #TINY-2995
+    Fixed styles to be preserved in IE 11 when editing via the `fullpage` plugin #TINY-3464
+    Fixed the `link` plugin context toolbar missing the open link button #TINY-3461
+    Fixed inconsistent dialog component spacing #TINY-3436
+Version 5.0.2 (2019-03-05)
+    Added presentation and document presets to `htmlpanel` dialog component #TINY-2694
+    Added missing fixed_toolbar_container setting has been reimplemented in the Silver theme #TINY-2712
+    Added a new toolbar setting `toolbar_drawer` that moves toolbar groups which overflow the editor width into either a `sliding` or `floating` toolbar section #TINY-2874
+    Updated the build process to include package lock files in the dev distribution archive #TINY-2870
+    Fixed inline dialogs did not have aria attributes #TINY-2694
+    Fixed default icons are now available in the UI registry, allowing use outside of toolbar buttons #TINY-3307
+    Fixed a memory leak related to select toolbar items #TINY-2874
+    Fixed a memory leak due to format changed listeners that were never unbound #TINY-3191
+    Fixed an issue where content may have been lost when using permanent bookmarks #TINY-3400
+    Fixed the quicklink toolbar button not rendering in the quickbars plugin #TINY-3125
+    Fixed an issue where menus were generating invalid HTML in some cases #TINY-3323
+    Fixed an issue that could cause the mobile theme to show a blank white screen when the editor was inside an `overflow:hidden` element #TINY-3407
+    Fixed mobile theme using a transparent background and not taking up the full width on iOS #TINY-3414
+    Fixed the template plugin dialog missing the description field #TINY-3337
+    Fixed input dialog components using an invalid default type attribute #TINY-3424
+    Fixed an issue where backspace/delete keys after/before pagebreak elements wouldn't move the caret #TINY-3097
+    Fixed an issue in the table plugin where menu items and toolbar buttons weren't showing correctly based on the selection #TINY-3423
+    Fixed inconsistent button focus styles in Firefox #TINY-3377
+    Fixed the resize icon floating left when all status bar elements were disabled #TINY-3340
+    Fixed the resize handle to not show in fullscreen mode #TINY-3404
+Version 5.0.1 (2019-02-21)
+    Removed paste as text notification banner and paste_plaintext_inform setting #POW-102
+    Fixed an issue where adding links to images would replace the image with text #TINY-3356
+    Fixed an issue where the inline editor could use fractional pixels for positioning #TINY-3202
+    Fixed an issue where uploading non-image files in the Image Plugin upload tab threw an error. #TINY-3244
+    Added H1-H6 toggle button registration to the silver theme #TINY-3070
+    Fixed an issue in the media plugin that was causing the source url and height/width to be lost in certain circumstances #TINY-2858
+    Fixed an issue with the Context Toolbar not being removed when clicking outside of the editor #TINY-2804
+    Fixed an issue where clicking 'Remove link' wouldn't remove the link in certain circumstances #TINY-3199
+    Added code sample toolbar button will now toggle on when the cursor is in a code section #TINY-3040
+    Fixed an issue where the media plugin would fail when parsing dialog data #TINY-3218
+    Fixed an issue where retrieving the selected content as text didn't create newlines #TINY-3197
+    Fixed incorrect keyboard shortcuts in the Help dialog for Windows #TINY-3292
+    Fixed an issue where JSON serialization could produce invalid JSON #TINY-3281
+    Fixed production CSS including references to source maps #TINY-3920
+    Fixed development CSS was not included in the development zip #TINY-3920
+    Fixed the autocompleter matches predicate not matching on the start of words by default #TINY-3306
+    Added new settings to the emoticons plugin to allow additional emoticons to be added #TINY-3088
+    Fixed an issue where the page could be scrolled with modal dialogs open #TINY-2252
+    Fixed an issue where autocomplete menus would show an icon margin when no items had icons #TINY-3329
+    Fixed an issue in the quickbars plugin where images incorrectly showed the text selection toolbar #TINY-3338
+    Fixed an issue that caused the inline editor to fail to render when the target element already had focus #TINY-3353
+Version 5.0.0 (2019-02-04)
+    Full documentation for the version 5 features and changes is available at https://www.tiny.cloud/docs/release-notes/
 
+    Changes since RC2:
+    Fixed an issue where tab panel heights weren't sizing properly on smaller screens and weren't updating on resize #TINY-3242
+    Added links and registered names with * to denote premium plugins in Plugins tab of Help dialog #TINY-3223
+    Changed Tiny 5 mobile skin to look more uniform with desktop #TINY-2650
+    Fixed image tools not having any padding between the label and slider #TINY-3220
+    Blacklisted table, th and td as inline editor target #TINY-717
+    Fixed context toolbar toggle buttons not showing the correct state #TINY-3022
+    Fixed missing separators in the spellchecker context menu between the suggestions and actions #TINY-3217
+    Fixed notification icon positioning in alert banners #TINY-2196
+    Fixed a typo in the word count plugin name #TINY-3062
+    Fixed charmap and emoticons dialogs not having a primary button #TINY-3233
+    Fixed an issue where resizing wouldn't work correctly depending on the box-sizing model #TINY-3278
+Version 5.0.0-rc-2 (2019-01-22)
+    Fixed the link dialog such that it will now retain class attributes when updating links #TINY-2825
+    Added screen reader accessibility for sidebar and statusbar #TINY-2699
+    Updated Emoticons and Charmap dialogs to be screen reader accessible #TINY-2693
+    Fixed "Find and replace" not showing in the "Edit" menu by default #TINY-3061
+    Updated the textpattern plugin to properly support nested patterns and to allow running a command with a value for a pattern with a start and an end #TINY-2991
+    Removed unnecessary 'flex' and unused 'colspan' properties from the new dialog APIs #TINY-2973
+    Changed checkboxes to use a boolean for its state, instead of a string #TINY-2848
+    Fixed dropdown buttons missing the 'type' attribute, which could cause forms to be incorrectly submitted #TINY-2826
+    Fixed emoticon and charmap search not returning expected results in certain cases #TINY-3084
+    Changed formatting menus so they are registered and made the align toolbar button use an icon instead of text #TINY-2880
+    Fixed blank rel_list values throwing an exception in the link plugin #TINY-3149
+Version 5.0.0-rc-1 (2019-01-08)
+    Updated the font select dropdown logic to try to detect the system font stack and show "System Font" as the font name #TINY-2710
+    Fixed readonly mode not fully disabling editing content #TINY-2287
+    Updated the autocompleter to only show when it has matched items #TINY-2350
+    Added editor settings functionality to specify title attributes for toolbar groups #TINY-2690
+    Added icons instead of button text to improve Search and Replace dialog footer appearance #TINY-2654
+    Added `tox-dialog__table` instead of `mce-table-striped` class to enhance Help dialog appearance #TINY-2360
+    Added title attribute to iframes so, screen readers can announce iframe labels #TINY-2692
+    Updated SizeInput labels to "Height" and "Width" instead of Dimensions #TINY-2833
+    Fixed accessibility issues with the font select, font size, style select and format select toolbar dropdowns #TINY-2713
+    Fixed accessibility issues with split dropdowns #TINY-2697
+    Added a wordcount menu item, that defaults to appearing in the tools menu #TINY-2877
+    Fixed the legacyoutput plugin to be compatible with TinyMCE 5.0 #TINY-2301
+    Updated the build process to minify and generate ASCII only output for the emoticons database #TINY-2744
+    Fixed icons not showing correctly in the autocompleter popup #TINY-3029
+    Fixed an issue where preview wouldn't show anything in Edge under certain circumstances #TINY-3035
+    Fixed the height being incorrectly calculated for the autoresize plugin #TINY-2807
+Version 5.0.0-beta-1 (2018-11-30)
+    Changed the name of the "inlite" plugin to "quickbars" #TINY-2831
+    Fixed an inline mode issue where the save plugin upon saving can cause content loss #TINY-2659
+    Changed the background color icon to highlight background icon #TINY-2258
+    Added a new `addNestedMenuItem()` UI registry function and changed all nested menu items to use the new registry functions #TINY-2230
+    Changed Help dialog to be accessible to screen readers #TINY-2687
+    Changed the color swatch to save selected custom colors to local storage for use across sessions #TINY-2722
+    Added title attribute to color swatch colors #TINY-2669
+    Added anchorbar component to anchor inline toolbar dialogs to instead of the toolbar #TINY-2040
+    Added support for toolbar<n> and toolbar array config options to be squashed into a single toolbar and not create multiple toolbars #TINY-2195
+    Added error handling for when forced_root_block config option is set to true #TINY-2261
+    Added functionality for the removed_menuitems config option #TINY-2184
+    Fixed an issue in IE 11 where calling selection.getContent() would return an empty string when the editor didn't have focus #TINY-2325
+    Added the ability to use a string to reference menu items in menu buttons and submenu items #TINY-2253
+    Removed compat3x plugin #TINY-2815
+    Changed `WindowManager` API - methods `getParams`, `setParams` and `getWindows`, and the legacy `windows` property, have been removed. `alert` and `confirm` dialogs are no longer tracked in the window list. #TINY-2603
+Version 5.0.0-preview-4 (2018-11-12)
+    Fixed distraction free plugin #AP-470
+    Removed the tox-custom-editor class that was added to the wrapping element of codemirror #TINY-2211
+    Fixed contents of the input field being selected on focus instead of just recieving an outline highlight #AP-464
+    Added width and height placeholder text to image and media dialog dimensions input #AP-296
+    Fixed styling issues with dialogs and menus in IE 11 #AP-456
+    Fixed custom style format control not honoring custom formats #AP-393
+    Fixed context menu not appearing when clicking an image with a caption #AP-382
+    Fixed directionality of UI when using an RTL language #AP-423
+    Fixed page responsiveness with multiple inline editors #AP-430
+    Added the ability to keyboard navigate through menus, toolbars, sidebar and the status bar sequentially #AP-381
+    Fixed empty toolbar groups appearing through invalid configuration of the `toolbar` property #AP-450
+    Fixed text not being retained when updating links through the link dialog #AP-293
+    Added translation capability back to the editor's UI #AP-282
+    Fixed edit image context menu, context toolbar and toolbar items being incorrectly enabled when selecting invalid images #AP-323
+    Fixed emoji type ahead being shown when typing URLs #AP-366
+    Fixed toolbar configuration properties incorrectly expecting string arrays instead of strings #AP-342
+    Changed the editor resize handle so that it should be disabled when the autoresize plugin is turned on #AP-424
+    Fixed the block formatting toolbar item not showing a "Formatting" title when there is no selection #AP-321
+    Fixed clicking disabled toolbar buttons hiding the toolbar in inline mode #AP-380
+    Fixed `EditorResize` event not being fired upon editor resize #AP-327
+    Fixed tables losing styles when updating through the dialog #AP-368
+    Fixed context toolbar positioning to be more consistent near the edges of the editor #AP-318
+    Added `label` component type for dialogs to group components under a label
+    Fixed table of contents plugin now works with v5 toolbar APIs correctly #AP-347
+    Fixed the `link_context_toolbar` configuration not disabling the context toolbar #AP-458
+    Fixed the link context toolbar showing incorrect relative links #AP-435
+    Fixed the alignment of the icon in alert banner dialog components #TINY-2220
+    Changed UI text for microcopy improvements #TINY-2281
+    Fixed the visual blocks and visual char menu options not displaying their toggled state #TINY-2238
+    Fixed the editor not displaying as fullscreen when toggled #TINY-2237
+Version 5.0.0-preview-3 (2018-10-18)
+    Changed editor layout to use modern CSS properties over manually calculating dimensions #AP-324
+    Changed `autoresize_min_height` and `autoresize_max_height` configurations to `min_height` and `max_height` #AP-324
+    Fixed bugs with editor width jumping when resizing and the iframe not resizing to smaller than 150px in height #AP-324
+    Fixed mobile theme bug that prevented the editor from loading #AP-404
+    Fixed long toolbar groups extending outside of the editor instead of wrapping
+    Changed `Whole word` label in Search and Replace dialog to `Find whole words only` #AP-387
+    Fixed dialog titles so they are now proper case #AP-384
+    Fixed color picker default to be #000000 instead of #ff00ff #AP-216
+    Fixed "match case" option on the Find and Replace dialog is no longer selected by default #AP-298
+    Fixed vertical alignment of toolbar icons #DES-134
+    Fixed toolbar icons not appearing on IE11 #DES-133
+Version 5.0.0-preview-2 (2018-10-10)
+    Changed configuration of color options has been simplified to `color_map`, `color_cols`, and `custom_colors` #AP-328
+    Added swatch is now shown for colorinput fields, instead of the colorpicker directly #AP-328
+    Removed `colorpicker` plugin, it is now in the theme #AP-328
+    Removed `textcolor` plugin, it is now in the theme #AP-328
+    Fixed styleselect not updating the displayed item as the cursor moved #AP-388
+    Changed `height` configuration to apply to the editor frame (including menubar, toolbar, status bar) instead of the content area #AP-324
+    Added fontformats and fontsizes menu items #AP-390
+    Fixed preview iframe not expanding to the dialog size #AP-252
+    Fixed 'meta' shortcuts not translated into platform-specific text #AP-270
+    Fixed tabbed dialogs (Charmap and Emoticons) shrinking when no search results returned
+    Fixed a bug where alert banner icons were not retrieved from icon pack. #AP-330
+    Fixed component styles to flex so they fill large dialogs. #AP-252
+    Fixed editor flashing unstyled during load (still in progress). #AP-349
+Version 5.0.0-preview-1 (2018-10-01)
+    Developer preview 1
+    Initial list of features and changes is available at https://tiny.cloud/docs-preview/release-notes/new-features/
+Version 4.9.3 (2019-01-31)
+    Added a visualchars_default_state setting to the Visualchars Plugin. Patch contributed by mat3e.
+    Fixed a bug where scrolling on a page with more than one editor would cause a ResizeWindow event to fire. #TINY-3247
+    Fixed a bug where if a plugin threw an error during initialisation the whole editor would fail to load. #TINY-3243
+    Fixed a bug where getContent would include bogus elements when valid_elements setting was set up in a specific way. #TINY-3213
+    Fixed a bug where only a few function key names could be used when creating keyboard shortcuts. #TINY-3146
+    Fixed a bug where it wasn't possible to enter spaces into an editor after pressing shift+enter. #TINY-3099
+    Fixed a bug where no caret would be rendered after backspacing to a contenteditable false element. #TINY-2998
+    Fixed a bug where deletion to/from indented lists would leave list fragments in the editor. #TINY-2981
+Version 4.9.2 (2018-12-17)
+    Fixed a bug with pressing the space key on IE 11 would result in nbsp characters being inserted between words at the end of a block. #TINY-2996
+    Fixed a bug where character composition using quote and space on US International keyboards would produce a space instead of a quote. #TINY-2999
+    Fixed a bug where remove format wouldn't remove the inner most inline element in some situations. #TINY-2982
+    Fixed a bug where outdenting an list item would affect attributes on other list items within the same list. #TINY-2971
+    Fixed a bug where the DomParser filters wouldn't be applied for elements created when parsing invalid html. #TINY-2978
+    Fixed a bug where setProgressState wouldn't automatically close floating ui elements like menus. #TINY-2896
+    Fixed a bug where it wasn't possible to navigate out of a figcaption element using the arrow keys. #TINY-2894
+    Fixed a bug where enter key before an image inside a link would remove the image. #TINY-2780
+Version 4.9.1 (2018-12-04)
+    Added functionality to insert html to the replacement feature of the Textpattern Plugin. #TINY-2839
+    Fixed a bug where `editor.selection.getContent({format: 'text'})` didn't work as expected in IE11 on an unfocused editor. #TINY-2862
+    Fixed a bug in the Textpattern Plugin where the editor would get an incorrect selection after inserting a text pattern on Safari. #TINY-2838
+    Fixed a bug where the space bar didn't work correctly in editors with the forced_root_block setting set to false. #TINY-2816
+Version 4.9.0 (2018-11-27)
+    Added a replace feature to the Textpattern Plugin. #TINY-1908
+    Added functionality to the Lists Plugin that improves the indentation logic. #TINY-1790
+    Fixed a bug where it wasn't possible to delete/backspace when the caret was between a contentEditable=false element and a BR. #TINY-2372
+    Fixed a bug where copying table cells without a text selection would fail to copy anything. #TINY-1789
+    Implemented missing `autosave_restore_when_empty` functionality in the Autosave Plugin. Patch contributed by gzzo. #GH-4447
+    Reduced insertion of unnecessary nonbreaking spaces in the editor. #TINY-1879
+Version 4.8.5 (2018-10-30)
+    Added a content_css_cors setting to the editor that adds the crossorigin="anonymous" attribute to link tags added by the StyleSheetLoader. #TINY-1909
+    Fixed a bug where trying to remove formatting with a collapsed selection range would throw an exception. #GH-4636
+    Fixed a bug in the image plugin that caused updating figures to split contenteditable elements. #GH-4563
+    Fixed a bug that was causing incorrect viewport calculations for fixed position UI elements. #TINY-1897
+    Fixed a bug where inline formatting would cause the delete key to do nothing. #TINY-1900
+Version 4.8.4 (2018-10-23)
+    Added support for the HTML5 `main` element. #TINY-1877
+    Changed the keyboard shortcut to move focus to contextual toolbars to Ctrl+F9. #TINY-1812
+    Fixed a bug where content css could not be loaded from another domain. #TINY-1891
+    Fixed a bug on FireFox where the cursor would get stuck between two contenteditable false inline elements located inside of the same block element divided by a BR. #TINY-1878
+    Fixed a bug with the insertContent method where nonbreaking spaces would be inserted incorrectly. #TINY-1868
+    Fixed a bug where the toolbar of the inline editor would not be visible in some scenarios. #TINY-1862
+    Fixed a bug where removing the editor while more than one notification was open would throw an error. #TINY-1845
+    Fixed a bug where the menubutton would be rendered on top of the menu if the viewport didn't have enough height. #TINY-1678
+    Fixed a bug with the annotations api where annotating collapsed selections caused problems. #TBS-2449
+    Fixed a bug where wbr elements were being transformed into whitespace when using the Paste Plugin's paste as text setting. #GH-4638
+    Fixed a bug where the Search and Replace didn't replace spaces correctly. #GH-4632
+    Fixed a bug with sublist items not persisting selection. #GH-4628
+    Fixed a bug with mceInsertRawHTML command not working as expected. #GH-4625
+Version 4.8.3 (2018-09-13)
+    Fixed a bug where the Wordcount Plugin didn't correctly count words within tables on IE11. #TINY-1770
+    Fixed a bug where it wasn't possible to move the caret out of a table on IE11 and Firefox. #TINY-1682
+    Fixed a bug where merging empty blocks didn't work as expected, sometimes causing content to be deleted. #TINY-1781
+    Fixed a bug where the Textcolor Plugin didn't show the correct current color. #TINY-1810
+    Fixed a bug where clear formatting with a collapsed selection would sometimes clear formatting from more content than expected. #TINY-1813 #TINY-1821
+    Fixed a bug with the Table Plugin where it wasn't possible to keyboard navigate to the caption. #TINY-1818
+Version 4.8.2 (2018-08-09)
+    Moved annotator from "experimental" to "annotator" object on editor. #TBS-2398
+    Improved the multiclick normalization across browsers. #TINY-1788
+    Fixed a bug where running getSelectedBlocks with a collapsed selection between block elements would produce incorrect results. #TINY-1787
+    Fixed a bug where the ScriptLoaders loadScript method would not work as expected in FireFox when loaded on the same page as a ShadowDOM polyfill. #TINY-1786
+    Removed reference to ShadowDOM event.path as Blink based browsers now support event.composedPath. #TINY-1785
+    Fixed a bug where a reference to localStorage would throw an "access denied" error in IE11 with strict security settings. #TINY-1782
+    Fixed a bug where pasting using the toolbar button on an inline editor in IE11 would cause a looping behaviour. #TINY-1768
+Version 4.8.1 (2018-07-26)
+    Fixed a bug where the content of inline editors was being cleaned on every call of `editor.save()`. #TINY-1783
+    Fixed a bug where the arrow of the Inlite Theme toolbar was being rendered incorrectly in RTL mode. #TINY-1776
+    Fixed a bug with the Paste Plugin where pasting after inline contenteditable false elements moved the caret to the end of the line. #TINY-1758
+Version 4.8.0 (2018-06-27)
+    Added new "experimental" object in editor, with initial Annotator API. #TBS-2374
+    Fixed a bug where deleting paragraphs inside of table cells would delete the whole table cell. #TINY-1759
+    Fixed a bug in the Table Plugin where removing row height set on the row properties dialog did not update the table. #TINY-1730
+    Fixed a bug with the font select toolbar item didn't update correctly. #TINY-1683
+    Fixed a bug where all bogus elements would not be deleted when removing an inline editor. #TINY-1669
+Version 4.7.13 (2018-05-16)
+    Fixed a bug where Edge 17 wouldn't be able to select images or tables. #TINY-1679
+    Fixed issue where whitespace wasn't preserved when the editor was initialized on pre elements. #TINY-1649
+    Fixed a bug with the fontselect dropdowns throwing an error if the editor was hidden in Firefox. #TINY-1664
+    Fixed a bug where it wasn't possible to merge table cells on IE 11. #TINY-1671
+    Fixed a bug where textcolor wasn't applying properly on IE 11 in some situations. #TINY-1663
+    Fixed a bug where the justifyfull command state wasn't working correctly. #TINY-1677
+    Fixed a bug where the styles wasn't updated correctly when resizing some tables. #TINY-1668
+    Added missing code menu item from the default menu config. #TINY-1648
+    Added new align button for combining the separate align buttons into a menu button. #TINY-1652
+Version 4.7.12 (2018-05-03)
+    Added an option to filter out image svg data urls.
+    Added support for html5 details and summary elements.
+    Changed so the mce-abs-layout-item css rule targets html instead of body. Patch contributed by nazar-pc.
+    Fixed a bug where the "read" step on the mobile theme was still present on android mobile browsers.
+    Fixed a bug where all images in the editor document would reload on any editor change.
+    Fixed a bug with the Table Plugin where ObjectResized event wasn't being triggered on column resize.
+    Fixed so the selection is set to the first suitable caret position after editor.setContent called.
+    Fixed so links with xlink:href attributes are filtered correctly to prevent XSS.
+    Fixed a bug on IE11 where pasting content into an inline editor initialized on a heading element would create new editable elements.
+    Fixed a bug where readonly mode would not work as expected when the editor contained contentEditable=true elements.
+    Fixed a bug where the Link Plugin would throw an error when used together with the webcomponents polyfill. Patch contributed by 4esnog.
+    Fixed a bug where the "Powered by TinyMCE" branding link would break on XHTML pages. Patch contributed by tistre.
+    Fixed a bug where the same id would be used in the blobcache for all pasted images. Patch contributed by thorn0.
+Version 4.7.11 (2018-04-11)
+    Added a new imagetools_credentials_hosts option to the Imagetools Plugin.
+    Fixed a bug where toggling a list containing empty LIs would throw an error. Patch contributed by bradleyke.
+    Fixed a bug where applying block styles to a text with the caret at the end of the paragraph would select all text in the paragraph.
+    Fixed a bug where toggling on the Spellchecker Plugin would trigger isDirty on the editor.
+    Fixed a bug where it was possible to enter content into selection bookmark spans.
+    Fixed a bug where if a non paragraph block was configured in forced_root_block the editor.getContent method would return incorrect values with an empty editor.
+    Fixed a bug where dropdown menu panels stayed open and fixed in position when dragging dialog windows.
+    Fixed a bug where it wasn't possible to extend table cells with the space button in Safari.
+    Fixed a bug where the setupeditor event would thrown an error when using the Compat3x Plugin.
+    Fixed a bug where an error was thrown in FontInfo when called on a detached element.
+Version 4.7.10 (2018-04-03)
+    Removed the "read" step from the mobile theme.
+    Added normalization of triple clicks across browsers in the editor.
+    Added a `hasFocus` method to the editor that checks if the editor has focus.
+    Added correct icon to the Nonbreaking Plugin menu item.
+    Fixed so the `getContent`/`setContent` methods work even if the editor is not initialized.
+    Fixed a bug with the Media Plugin where query strings were being stripped from youtube links.
+    Fixed a bug where image styles were changed/removed when opening and closing the Image Plugin dialog.
+    Fixed a bug in the Table Plugin where some table cell styles were not correctly added to the content html.
+    Fixed a bug in the Spellchecker Plugin where it wasn't possible to change the spellchecker language.
+    Fixed so the the unlink action in the Link Plugin has a menu item and can be added to the contextmenu.
+    Fixed a bug where it wasn't possible to keyboard navigate to the start of an inline element on a new line within the same block element.
+    Fixed a bug with the Text Color Plugin where if used with an inline editor located at the bottom of the screen the colorpicker could appear off screen.
+    Fixed a bug with the UndoManager where undo levels were being added for nbzwsp characters.
+    Fixed a bug with the Table Plugin where the caret would sometimes be lost when keyboard navigating up through a table.
+    Fixed a bug where FontInfo.getFontFamily would throw an error when called on a removed editor.
+    Fixed a bug in Firefox where undo levels were not being added correctly for some specific operations.
+    Fixed a bug where initializing an inline editor inside of a table would make the whole table resizeable.
+    Fixed a bug where the fake cursor that appears next to tables on Firefox was positioned incorrectly when switching to fullscreen.
+    Fixed a bug where zwsp's weren't trimmed from the output from `editor.getContent({ format: 'text' })`.
+    Fixed a bug where the fontsizeselect/fontselect toolbar items showed the body info rather than the first possible caret position info on init.
+    Fixed a bug where it wasn't possible to select all content if the editor only contained an inline boundary element.
+    Fixed a bug where `content_css` urls with query strings wasn't working.
+    Fixed a bug in the Table Plugin where some table row styles were removed when changing other styles in the row properties dialog.
+Version 4.7.9 (2018-02-27)
+    Fixed a bug where the editor target element didn't get the correct style when removing the editor.
+Version 4.7.8 (2018-02-26)
+    Fixed an issue with the Help Plugin where the menuitem name wasn't lowercase.
+    Fixed an issue on MacOS where text and bold text did not have the same line-height in the autocomplete dropdown in the Link Plugin dialog.
+    Fixed a bug where the "paste as text" option in the Paste Plugin didn't work.
+    Fixed a bug where dialog list boxes didn't get positioned correctly in documents with scroll.
+    Fixed a bug where the Inlite Theme didn't use the Table Plugin api to insert correct tables.
+    Fixed a bug where the Inlite Theme panel didn't hide on blur in a correct way.
+    Fixed a bug where placing the cursor before a table in Firefox would scroll to the bottom of the table.
+    Fixed a bug where selecting partial text in table cells with rowspans and deleting would produce faulty tables.
+    Fixed a bug where the Preview Plugin didn't work on Safari due to sandbox security.
+    Fixed a bug where table cell selection using the keyboard threw an error.
+    Fixed so the font size and font family doesn't toggle the text but only sets the selected format on the selected text.
+    Fixed so the built-in spellchecking on Chrome and Safari creates an undo level when replacing words.
+Version 4.7.7 (2018-02-19)
+    Added a border style selector to the advanced tab of the Image Plugin.
+    Added better controls for default table inserted by the Table Plugin.
+    Added new `table_responsive_width` option to the Table Plugin that controls whether to use pixel or percentage widths.
+    Fixed a bug where the Link Plugin text didn't update when a URL was pasted using the context menu.
+    Fixed a bug with the Spellchecker Plugin where using "Add to dictionary" in the context menu threw an error.
+    Fixed a bug in the Media Plugin where the preview node for iframes got default width and height attributes that interfered with width/height styles.
+    Fixed a bug where backslashes were being added to some font family names in Firefox in the fontselect toolbar item.
+    Fixed a bug where errors would be thrown when trying to remove an editor that had not yet been fully initialized.
+    Fixed a bug where the Imagetools Plugin didn't update the images atomically.
+    Fixed a bug where the Fullscreen Plugin was throwing errors when being used on an inline editor.
+    Fixed a bug where drop down menus weren't positioned correctly in inline editors on scroll.
+    Fixed a bug with a semicolon missing at the end of the bundled javascript files.
+    Fixed a bug in the Table Plugin with cursor navigation inside of tables where the cursor would sometimes jump into an incorrect table cells.
+    Fixed a bug where indenting a table that is a list item using the "Increase indent" button would create a nested table.
+    Fixed a bug where text nodes containing only whitespace were being wrapped by paragraph elements.
+    Fixed a bug where whitespace was being inserted after br tags inside of paragraph tags.
+    Fixed a bug where converting an indented paragraph to a list item would cause the list item to have extra padding.
+    Fixed a bug where Copy/Paste in an editor with a lot of content would cause the editor to scroll to the top of the content in IE11.
+    Fixed a bug with a memory leak in the DragHelper. Path contributed by ben-mckernan.
+    Fixed a bug where the advanced tab in the Media Plugin was being shown even if it didn't contain anything. Patch contributed by gabrieeel.
+    Fixed an outdated eventname in the EventUtils. Patch contributed by nazar-pc.
+    Fixed an issue where the Json.parse function would throw an error when being used on a page with strict CSP settings.
+    Fixed so you can place the curser before and after table elements within the editor in Firefox and Edge/IE.
+Version 4.7.6 (2018-01-29)
+    Fixed a bug in the jquery integration where it threw an error saying that "global is not defined".
+    Fixed a bug where deleting a table cell whose previous sibling was set to contenteditable false would create a corrupted table.
+    Fixed a bug where highlighting text in an unfocused editor did not work correctly in IE11/Edge.
+    Fixed a bug where the table resize handles were not being repositioned when activating the Fullscreen Plugin.
+    Fixed a bug where the Imagetools Plugin dialog didn't honor editor RTL settings.
+    Fixed a bug where block elements weren't being merged correctly if you deleted from after a contenteditable false element to the beginning of another block element.
+    Fixed a bug where TinyMCE didn't work with module loaders like webpack.
+Version 4.7.5 (2018-01-22)
+    Fixed bug with the Codesample Plugin where it wasn't possible to edit codesamples when the editor was in inline mode.
+    Fixed bug where focusing on the status bar broke the keyboard navigation functionality.
+    Fixed bug where an error would be thrown on Edge by the Table Plugin when pasting using the PowerPaste Plugin.
+    Fixed bug in the Table Plugin where selecting row border style from the dropdown menu in advanced row properties would throw an error.
+    Fixed bug with icons being rendered incorrectly on Chrome on Mac OS.
+    Fixed bug in the Textcolor Plugin where the font color and background color buttons wouldn't trigger an ExecCommand event.
+    Fixed bug in the Link Plugin where the url field wasn't forced LTR.
+    Fixed bug where the Nonbreaking Plugin incorrectly inserted spaces into tables.
+    Fixed bug with the inline theme where the toolbar wasn't repositioned on window resize.
+Version 4.7.4 (2017-12-05)
+    Fixed bug in the Nonbreaking Plugin where the nonbreaking_force_tab setting was being ignored.
+    Fixed bug in the Table Plugin where changing row height incorrectly converted column widths to pixels.
+    Fixed bug in the Table Plugin on Edge and IE11 where resizing the last column after resizing the table would cause invalid column heights.
+    Fixed bug in the Table Plugin where keyboard navigation was not normalized between browsers.
+    Fixed bug in the Table Plugin where the colorpicker button would show even without defining the colorpicker_callback.
+    Fixed bug in the Table Plugin where it wasn't possible to set the cell background color.
+    Fixed bug where Firefox would throw an error when intialising an editor on an element that is hidden or not yet added to the DOM.
+    Fixed bug where Firefox would throw an error when intialising an editor inside of a hidden iframe.
+Version 4.7.3 (2017-11-23)
+    Added functionality to open the Codesample Plugin dialog when double clicking on a codesample. Patch contributed by dakuzen.
+    Fixed bug where undo/redo didn't work correctly with some formats and caret positions.
+    Fixed bug where the color picker didn't show up in Table Plugin dialogs.
+    Fixed bug where it wasn't possible to change the width of a table through the Table Plugin dialog.
+    Fixed bug where the Charmap Plugin couldn't insert some special characters.
+    Fixed bug where editing a newly inserted link would not actually edit the link but insert a new link next to it.
+    Fixed bug where deleting all content in a table cell made it impossible to place the caret into it.
+    Fixed bug where the vertical alignment field in the Table Plugin cell properties dialog didn't do anything.
+    Fixed bug where an image with a caption showed two sets of resize handles in IE11.
+    Fixed bug where pressing the enter button inside of an h1 with contenteditable set to true would sometimes produce a p tag.
+    Fixed bug with backspace not working as expected before a noneditable element.
+    Fixed bug where operating on tables with invalid rowspans would cause an error to be thrown.
+    Fixed so a real base64 representation of the image is available on the blobInfo that the images_upload_handler gets called with.
+    Fixed so the image upload tab is available when the images_upload_handler is defined (and not only when the images_upload_url is defined).
+Version 4.7.2 (2017-11-07)
+    Added newly rewritten Table Plugin.
+    Added support for attributes with colon in valid_elements and addValidElements.
+    Added support for dailymotion short url in the Media Plugin. Patch contributed by maat8.
+    Added support for converting to half pt when converting font size from px to pt. Patch contributed by danny6514.
+    Added support for location hash to the Autosave plugin to make it work better with SPAs using hash routing.
+    Added support for merging table cells when pasting a table into another table.
+    Changed so the language packs are only loaded once. Patch contributed by 0xor1.
+    Simplified the css for inline boundaries selection by switching to an attribute selector.
+    Fixed bug where an error would be thrown on editor initialization if the window.getSelection() returned null.
+    Fixed bug where holding down control or alt keys made the keyboard navigation inside an inline boundary not work as expected.
+    Fixed bug where applying formats in IE11 produced extra, empty paragraphs in the editor.
+    Fixed bug where the Word Count Plugin didn't count some mathematical operators correctly.
+    Fixed bug where removing an inline editor removed the element that the editor had been initialized on.
+    Fixed bug where setting the selection to the end of an editable container caused some formatting problems.
+    Fixed bug where an error would be thrown sometimes when an editor was removed because of the selection bookmark was being stored asynchronously.
+    Fixed a bug where an editor initialized on an empty list did not contain any valid cursor positions.
+    Fixed a bug with the Context Menu Plugin and webkit browsers on Mac where right-clicking inside a table would produce an incorrect selection.
+    Fixed bug where the Image Plugin constrain proportions setting wasn't working as expected.
+    Fixed bug where deleting the last character in a span with decorations produced an incorrect element when typing.
+    Fixed bug where focusing on inline editors made the toolbar flicker when moving between elements quickly.
+    Fixed bug where the selection would be stored incorrectly in inline editors when the mouseup event was fired outside the editor body.
+    Fixed bug where toggling bold at the end of an inline boundary would toggle off the whole word.
+    Fixed bug where setting the skin to false would not stop the loading of some skin css files.
+    Fixed bug in mobile theme where pinch-to-zoom would break after exiting the editor.
+    Fixed bug where sublists of a fully selected list would not be switched correctly when changing list style.
+    Fixed bug where inserting media by source would break the UndoManager.
+    Fixed bug where inserting some content into the editor with a specific selection would replace some content incorrectly.
+    Fixed bug where selecting all content with ctrl+a in IE11 caused problems with untoggling some formatting.
+    Fixed bug where the Search and Replace Plugin left some marker spans in the editor when undoing and redoing after replacing some content.
+    Fixed bug where the editor would not get a scrollbar when using the Fullscreen and Autoresize plugins together.
+    Fixed bug where the font selector would stop working correctly after selecting fonts three times.
+    Fixed so pressing the enter key inside of an inline boundary inserts a br after the inline boundary element.
+    Fixed a bug where it wasn't possible to use tab navigation inside of a table that was inside of a list.
+    Fixed bug where end_container_on_empty_block would incorrectly remove elements.
+    Fixed bug where content_styles weren't added to the Preview Plugin iframe.
+    Fixed so the beforeSetContent/beforeGetContent events are preventable.
+    Fixed bug where changing height value in Table Plugin advanced tab didn't do anything.
+    Fixed bug where it wasn't possible to remove formatting from content in beginning of table cell.
+Version 4.7.1 (2017-10-09)
+    Fixed bug where theme set to false on an inline editor produced an extra div element after the target element.
+    Fixed bug where the editor drag icon was misaligned with the branding set to false.
+    Fixed bug where doubled menu items were not being removed as expected with the removed_menuitems setting.
+    Fixed bug where the Table of contents plugin threw an error when initialized.
+    Fixed bug where it wasn't possible to add inline formats to text selected right to left.
+    Fixed bug where the paste from plain text mode did not work as expected.
+    Fixed so the style previews do not set color and background color when selected.
+    Fixed bug where the Autolink plugin didn't work as expected with some formats applied on an empty editor.
+    Fixed bug where the Textpattern plugin were throwing errors on some patterns.
+    Fixed bug where the Save plugin saved all editors instead of only the active editor. Patch contributed by dannoe.
+Version 4.7.0 (2017-10-03)
+    Added new mobile ui that is specifically designed for mobile devices.
+    Updated the default skin to be more modern and white since white is preferred by most implementations.
+    Restructured the default menus to be more similar to common office suites like Google Docs.
+    Fixed so theme can be set to false on both inline and iframe editor modes.
+    Fixed bug where inline editor would add/remove the visualblocks css multiple times.
+    Fixed bug where selection wouldn't be properly restored when editor lost focus and commands where invoked.
+    Fixed bug where toc plugin would generate id:s for headers even though a toc wasn't inserted into the content.
+    Fixed bug where is wasn't possible to drag/drop contents within the editor if paste_data_images where set to true.
+    Fixed bug where getParam and close in WindowManager would get the first opened window instead of the last opened window.
+    Fixed bug where delete would delete between cells inside a table in Firefox.
+Version 4.6.7 (2017-09-18)
+    Fixed bug where paste wasn't working in IOS.
+    Fixed bug where the Word Count Plugin didn't count some mathematical operators correctly.
+    Fixed bug where inserting a list in a table caused the cell to expand in height.
+    Fixed bug where pressing enter in a list located inside of a table deleted list items instead of inserting new list item.
+    Fixed bug where copy and pasting table cells produced inconsistent results.
+    Fixed bug where initializing an editor with an ID of 'length' would throw an exception.
+    Fixed bug where it was possible to split a non merged table cell.
+    Fixed bug where copy and pasting a list with a very specific selection into another list would produce a nested list.
+    Fixed bug where copy and pasting ordered lists sometimes produced unordered lists.
+    Fixed bug where padded elements inside other elements would be treated as empty.
+    Added some missing translations to Image, Link and Help plugins.
+    Fixed so you can resize images inside a figure element.
+    Fixed bug where an inline TinyMCE editor initialized on a table did not set selection on load in Chrome.
+    Fixed the positioning of the inlite toolbar when the target element wasn't big enough to fit the toolbar.
+Version 4.6.6 (2017-08-30)
+    Fixed so that notifications wrap long text content instead of bleeding outside the notification element.
+    Fixed so the content_style css is added after the skin and custom stylesheets.
+    Fixed bug where it wasn't possible to remove a table with the Cut button.
+    Fixed bug where the center format wasn't getting the same font size as the other formats in the format preview.
+    Fixed bug where the wordcount plugin wasn't counting hyphenated words correctly.
+    Fixed bug where all content pasted into the editor was added to the end of the editor.
+    Fixed bug where enter keydown on list item selection only deleted content and didn't create a new line.
+    Fixed bug where destroying the editor while the content css was still loading caused error notifications on Firefox.
+    Fixed bug where undoing cut operation in IE11 left some unwanted html in the editor content.
+    Fixed bug where enter keydown would throw an error in IE11.
+    Fixed bug where duplicate instances of an editor were added to the editors array when using the createEditor API.
+    Fixed bug where the formatter applied formats on the wrong content when spellchecker was activated.
+    Fixed bug where switching formats would reset font size on child nodes.
+    Fixed bug where the table caption element weren't always the first descendant to the table tag.
+    Fixed bug where pasting some content into the editor on chrome some newlines were removed.
+    Fixed bug where it wasn't possible to remove a list if a list item was a table element.
+    Fixed bug where copy/pasting partial selections of tables wouldn't produce a proper table.
+    Fixed bug where the searchreplace plugin could not find consecutive spaces.
+    Fixed bug where background color wasn't applied correctly on some partially selected contents.
+Version 4.6.5 (2017-08-02)
+    Added new inline_boundaries_selector that allows you to specify the elements that should have boundaries.
+    Added new local upload feature this allows the user to upload images directly from the image dialog.
+    Added a new api for providing meta data for plugins. It will show up in the help dialog if it's provided.
+    Fixed so that the notifications created by the notification manager are more screen reader accessible.
+    Fixed bug where changing the list format on multiple selected lists didn't change all of the lists.
+    Fixed bug where the nonbreaking plugin would insert multiple undo levels when pressing the tab key.
+    Fixed bug where delete/backspace wouldn't render a caret when all editor contents where deleted.
+    Fixed bug where delete/backspace wouldn't render a caret if the deleted element was a single contentEditable false element.
+    Fixed bug where the wordcount plugin wouldn't count words correctly if word where typed after applying a style format.
+    Fixed bug where the wordcount plugin would count mathematical formulas as multiple words for example 1+1=2.
+    Fixed bug where formatting of triple clicked blocks on Chrome/Safari would result in styles being added outside the visual selection.
+    Fixed bug where paste would add the contents to the end of the editor area when inline mode was used.
+    Fixed bug where toggling off bold formatting on text entered in a new paragraph would add an extra line break.
+    Fixed bug where autolink plugin would only produce a link on every other consecutive link on Firefox.
+    Fixed bug where it wasn't possible to select all contents if the content only had one pre element.
+    Fixed bug where sizzle would produce lagging behavior on some sites due to repaints caused by feature detection.
+    Fixed bug where toggling off inline formats wouldn't include the space on selected contents with leading or trailing spaces.
+    Fixed bug where the cut operation in UI wouldn't work in Chrome.
+    Fixed bug where some legacy editor initialization logic would throw exceptions about editor settings not being defined.
+    Fixed bug where it wasn't possible to apply text color to links if they where part of a non collapsed selection.
+    Fixed bug where an exception would be thrown if the user selected a video element and then moved the focus outside the editor.
+    Fixed bug where list operations didn't work if there where block elements inside the list items.
+    Fixed bug where applying block formats to lists wrapped in block elements would apply to all elements in that wrapped block.
+Version 4.6.4 (2017-06-13)
+    Fixed bug where the editor would move the caret when clicking on the scrollbar next to a content editable false block.
+    Fixed bug where the text color select dropdowns wasn't placed correctly when they didn't fit the width of the screen.
+    Fixed bug where the default editor line height wasn't working for mixed font size contents.
+    Fixed bug where the content css files for inline editors were loaded multiple times for multiple editor instances.
+    Fixed bug where the initial value of the font size/font family dropdowns wasn't displayed.
+    Fixed bug where the I18n api was not supporting arrays as the translation replacement values.
+    Fixed bug where chrome would display "The given range isn't in document." errors for invalid ranges passed to setRng.
+    Fixed bug where the compat3x plugin wasn't working since the global tinymce references wasn't resolved correctly.
+    Fixed bug where the preview plugin wasn't encoding the base url passed into the iframe contents producing a xss bug.
+    Fixed bug where the dom parser/serializer wasn't handling some special elements like noframes, title and xmp.
+    Fixed bug where the dom parser/serializer wasn't handling cdata sections with comments inside.
+    Fixed bug where the editor would scroll to the top of the editable area if a dialog was closed in inline mode.
+    Fixed bug where the link dialog would not display the right rel value if rel_list was configured.
+    Fixed bug where the context menu would select images on some platforms but not others.
+    Fixed bug where the filenames of images were not retained on dragged and drop into the editor from the desktop.
+    Fixed bug where the paste plugin would misrepresent newlines when pasting plain text and having forced_root_block configured.
+    Fixed so that the error messages for the imagetools plugin is more human readable.
+    Fixed so the internal validate setting for the parser/serializer can't be set from editor initialization settings.
+Version 4.6.3 (2017-05-30)
+    Fixed bug where the arrow keys didn't work correctly when navigating on nested inline boundary elements.
+    Fixed bug where delete/backspace didn't work correctly on nested inline boundary elements.
+    Fixed bug where image editing didn't work on subsequent edits of the same image.
+    Fixed bug where charmap descriptions wouldn't properly wrap if they exceeded the width of the box.
+    Fixed bug where the default image upload handler only accepted 200 as a valid http status code.
+    Fixed so rel on target=_blank links gets forced with only noopener instead of both noopener and noreferrer.
+Version 4.6.2 (2017-05-23)
+    Fixed bug where the SaxParser would run out of memory on very large documents.
+    Fixed bug with formatting like font size wasn't applied to del elements.
+    Fixed bug where various api calls would be throwing exceptions if they where invoked on a removed editor instance.
+    Fixed bug where the branding position would be incorrect if the editor was inside a hidden tab and then later showed.
+    Fixed bug where the color levels feature in the imagetools dialog wasn't working properly.
+    Fixed bug where imagetools dialog wouldn't pre-load images from CORS domains, before trying to prepare them for editing.
+    Fixed bug where the tab key would move the caret to the next table cell if being pressed inside a list inside a table.
+    Fixed bug where the cut/copy operations would loose parent context like the current format etc.
+    Fixed bug with format preview not working on invalid elements excluded by valid_elements.
+    Fixed bug where blocks would be merged in incorrect order on backspace/delete.
+    Fixed bug where zero length text nodes would cause issues with the undo logic if there where iframes present.
+    Fixed bug where the font size/family select lists would throw errors if the first node was a comment.
+    Fixed bug with csp having to allow local script evaluation since it was used to detect global scope.
+    Fixed bug where CSP required a relaxed option for javascript: URLs in unsupported legacy browsers.
+    Fixed bug where a fake caret would be rendered for td with the contenteditable=false.
+    Fixed bug where typing would be blocked on IE 11 when within a nested contenteditable=true/false structure.
+Version 4.6.1 (2017-05-10)
+    Added configuration option to list plugin to disable tab indentation.
+    Fixed bug where format change on very specific content could cause the selection to change.
+    Fixed bug where TinyMCE could not be lazyloaded through jquery integration.
+    Fixed bug where entities in style attributes weren't decoded correctly on paste in webkit.
+    Fixed bug where fontsize_formats option had been renamed incorrectly.
+    Fixed bug with broken backspace/delete behaviour between contenteditable=false blocks.
+    Fixed bug where it wasn't possible to backspace to the previous line with the inline boundaries functionality turned on.
+    Fixed bug where is wasn't possible to move caret left and right around a linked image with the inline boundaries functionality turned on.
+    Fixed bug where pressing enter after/before hr element threw exception. Patch contributed bradleyke.
+    Fixed so the CSS in the visualblocks plugin doesn't overwrite background color. Patch contributed by Christian Rank.
+    Fixed bug where multibyte characters weren't encoded correctly. Patch contributed by James Tarkenton.
+    Fixed bug where shift-click to select within contenteditable=true fields wasn't working.
+Version 4.6.0 (2017-05-04)
+    Dropped support for IE 8-10 due to market share and lack of support from Microsoft. See tinymce docs for details.
+    Added an inline boundary caret position feature that makes it easier to type at the beginning/end of links/code elements.
+    Added a help plugin that adds a button and a dialog showing the editor shortcuts and loaded plugins.
+    Added an inline_boundaries option that allows you to disable the inline boundary feature if it's not desired.
+    Added a new ScrollIntoView event that allows you to override the default scroll to element behavior.
+    Added role and aria- attributes as valid elements in the default valid elements config.
+    Added new internal flag for PastePreProcess/PastePostProcess this is useful to know if the paste was coming from an external source.
+    Added new ignore function to UndoManager this works similar to transact except that it doesn't add an undo level by default.
+    Fixed so that urls gets retained for images when being edited. This url is then passed on to the upload handler.
+    Fixed so that the editors would be initialized on readyState interactive instead of complete.
+    Fixed so that the init event of the editor gets fired once all contentCSS files have been properly loaded.
+    Fixed so that width/height of the editor gets taken from the textarea element if it's explicitly specified in styles.
+    Fixed so that keep_styles set to false no longer clones class/style from the previous paragraph on enter.
+    Fixed so that the default line-height is 1.2em to avoid zwnbsp characters from producing text rendering glitches on Windows.
+    Fixed so that loading errors of content css gets presented by a notification message.
+    Fixed so figure image elements can be linked when selected this wraps the figure image in a anchor element.
+    Fixed bug where it wasn't possible to copy/paste rows with colspans by using the table copy/paste feature.
+    Fixed bug where the protect setting wasn't properly applied to header/footer parts when using the fullpage plugin.
+    Fixed bug where custom formats that specified upper case element names where not applied correctly.
+    Fixed bug where some screen readers weren't reading buttons due to an aria specific fix for IE 8.
+    Fixed bug where cut wasn't working correctly on iOS due to it's clipboard API not working correctly.
+    Fixed bug where Edge would paste div elements instead of paragraphs when pasting plain text.
+    Fixed bug where the textpattern plugin wasn't dealing with trailing punctuations correctly.
+    Fixed bug where image editing would some times change the image format from jpg to png.
+    Fixed bug where some UI elements could be inserted into the toolbar even if they where not registered.
+    Fixed bug where it was possible to click the TD instead of the character in the character map and that caused an exception.
+    Fixed bug where the font size/font family dropdowns would sometimes show an incorrect value due to css not being loaded in time.
+    Fixed bug with the media plugin inserting undefined instead of retaining size when media_dimensions was set to false.
+    Fixed bug with deleting images when forced_root_blocks where set to false.
+    Fixed bug where input focus wasn't properly handled on nested content editable elements.
+    Fixed bug where Chrome/Firefox would throw an exception when selecting images due to recent change of setBaseAndExtent support.
+    Fixed bug where malformed blobs would throw exceptions now they are simply ignored.
+    Fixed bug where backspace/delete wouldn't work properly in some cases where all contents was selected in WebKit.
+    Fixed bug with Angular producing errors since it was expecting events objects to be patched with their custom properties.
+    Fixed bug where the formatter would apply formatting to spellchecker errors now all bogus elements are excluded.
+    Fixed bug with backspace/delete inside table caption elements wouldn't behave properly on IE 11.
+    Fixed bug where typing after a contenteditable false inline element could move the caret to the end of that element.
+    Fixed bug where backspace before/after contenteditable false blocks wouldn't properly remove the right element.
+    Fixed bug where backspace before/after contenteditable false inline elements wouldn't properly empty the current block element.
+    Fixed bug where vertical caret navigation with a custom line-height would sometimes match incorrect positions.
+    Fixed bug with paste on Edge where character encoding wasn't handled properly due to a browser bug.
+    Fixed bug with paste on Edge where extra fragment data was inserted into the contents when pasting.
+    Fixed bug with pasting contents when having a whole block element selected on WebKit could cause WebKit spans to appear.
+    Fixed bug where the visualchars plugin wasn't working correctly showing invisible nbsp characters.
+    Fixed bug where browsers would hang if you tried to load some malformed html contents.
+    Fixed bug where the init call promise wouldn't resolve if the specified selector didn't find any matching elements.
+    Fixed bug where the Schema isValidChild function was case sensitive.
+Version 4.5.3 (2017-02-01)
+    Added keyboard navigation for menu buttons when the menu is in focus.
+    Added api to the list plugin for setting custom classes/attributes on lists.
+    Added validation for the anchor plugin input field according to W3C id naming specifications.
+    Fixed bug where media placeholders were removed after resize with the forced_root_block setting set to false.
+    Fixed bug where deleting selections with similar sibling nodes sometimes deleted the whole document.
+    Fixed bug with inlite theme where several toolbars would appear scrolling when more than one instance of the editor was in use.
+    Fixed bug where the editor would throw error with the fontselect plugin on hidden editor instances in Firefox.
+    Fixed bug where the background color would not stretch to the font size.
+    Fixed bug where font size would be removed when changing background color.
+    Fixed bug where the undomanager trimmed away whitespace between nodes on undo/redo.
+    Fixed bug where media_dimensions=false in media plugin caused the editor to throw an error.
+    Fixed bug where IE was producing font/u elements within links on paste.
+    Fixed bug where some button tooltips were broken when compat3x was in use.
+    Fixed bug where backspace/delete/typeover would remove the caption element.
+    Fixed bug where powerspell failed to function when compat3x was enabled.
+    Fixed bug where it wasn't possible to apply sub/sup on text with large font size.
+    Fixed bug where pre tags with spaces weren't treated as content.
+    Fixed bug where Meta+A would select the entire document instead of all contents in nested ce=true elements.
+Version 4.5.2 (2017-01-04)
+    Added missing keyboard shortcut description for the underline menu item in the format menu.
+    Fixed bug where external blob urls wasn't properly handled by editor upload logic. Patch contributed by David Oviedo.
+    Fixed bug where urls wasn't treated as a single word by the wordcount plugin.
+    Fixed bug where nbsp characters wasn't treated as word delimiters by the wordcount plugin.
+    Fixed bug where editor instance wasn't properly passed to the format preview logic. Patch contributed by NullQuery.
+    Fixed bug where the fake caret wasn't hidden when you moved selection to a cE=false element.
+    Fixed bug where it wasn't possible to edit existing code sample blocks.
+    Fixed bug where it wasn't possible to delete editor contents if the selection included an empty block.
+    Fixed bug where the formatter wasn't expanding words on some international characters. Patch contributed by Martin Larochelle.
+    Fixed bug where the open link feature wasn't working correctly on IE 11.
+    Fixed bug where enter before/after a cE=false block wouldn't properly padd the paragraph with an br element.
+    Fixed so font size and font family select boxes always displays a value by using the runtime style as a fallback.
+    Fixed so missing plugins will be logged to console as warnings rather than halting the initialization of the editor.
+    Fixed so splitbuttons become normal buttons in advlist plugin if styles are empty. Patch contributed by René Schleusner.
+    Fixed so you can multi insert rows/cols by selecting table cells and using insert rows/columns.
+Version 4.5.1 (2016-12-07)
+    Fixed bug where the lists plugin wouldn't initialize without the advlist plugins if served from cdn.
+    Fixed bug where selectors with "*" would cause the style format preview to throw an error.
+    Fixed bug with toggling lists off on lists with empty list items would throw an error.
+    Fixed bug where editing images would produce non existing blob uris.
+    Fixed bug where the offscreen toc selection would be treated as the real toc element.
+    Fixed bug where the aria level attribute for element path would have an incorrect start index.
+    Fixed bug where the offscreen selection of cE=false that where very wide would be shown onscreen. Patch contributed by Steven Bufton.
+    Fixed so the default_link_target gets applied to links created by the autolink plugin.
+    Fixed so that the name attribute gets removed by the anchor plugin if editing anchors.
+Version 4.5.0 (2016-11-23)
+    Added new toc plugin allows you to insert table of contents based on editor headings.
+    Added new auto complete menu to all url fields. Adds history, link to anchors etc.
+    Added new sidebar api that allows you to add custom sidebar panels and buttons to toggle these.
+    Added new insert menu button that allows you to have multiple insert functions under the same menu button.
+    Added new open link feature to ctrl+click, alt+enter and context menu.
+    Added new media_embed_handler option to allow the media plugin to be populated with custom embeds.
+    Added new support for editing transparent images using the image tools dialog.
+    Added new images_reuse_filename option to allow filenames of images to be retained for upload.
+    Added new security feature where links with target="_blank" will by default get rel="noopener noreferrer".
+    Added new allow_unsafe_link_target to allow you to opt-out of the target="_blank" security feature.
+    Added new style_formats_autohide option to automatically hide styles based on context.
+    Added new codesample_content_css option to specify where the code sample prism css is loaded from.
+    Added new support for Japanese/Chinese word count following the unicode standards on this.
+    Added new fragmented undo levels this dramatically reduces flicker on contents with iframes.
+    Added new live previews for complex elements like table or lists.
+    Fixed bug where it wasn't possible to properly tab between controls in a dialog with a disabled form item control.
+    Fixed bug where firefox would generate a rectangle on elements produced after/before a cE=false elements.
+    Fixed bug with advlist plugin not switching list element format properly in some edge cases.
+    Fixed bug where col/rowspans wasn't correctly computed by the table plugin in some cases.
+    Fixed bug where the table plugin would thrown an error if object_resizing was disabled.
+    Fixed bug where some invalid markup would cause issues when running in XHTML mode. Patch contributed by Charles Bourasseau.
+    Fixed bug where the fullscreen class wouldn't be removed properly when closing dialogs.
+    Fixed bug where the PastePlainTextToggle event wasn't fired by the paste plugin when the state changed.
+    Fixed bug where table the row type wasn't properly updated in table row dialog. Patch contributed by Matthias Balmer.
+    Fixed bug where select all and cut wouldn't place caret focus back to the editor in WebKit. Patch contributed by Daniel Jalkut.
+    Fixed bug where applying cell/row properties to multiple cells/rows would reset other unchanged properties.
+    Fixed bug where some elements in the schema would have redundant/incorrect children.
+    Fixed bug where selector and target options would cause issues if used together.
+    Fixed bug where drag/drop of images from desktop on chrome would thrown an error.
+    Fixed bug where cut on WebKit/Blink wouldn't add an undo level.
+    Fixed bug where IE 11 would scroll to the cE=false elements when they where selected.
+    Fixed bug where keys like F5 wouldn't work when a cE=false element was selected.
+    Fixed bug where the undo manager wouldn't stop the typing state when commands where executed.
+    Fixed bug where unlink on wrapped links wouldn't work properly.
+    Fixed bug with drag/drop of images on WebKit where the image would be deleted form the source editor.
+    Fixed bug where the visual characters mode would be disabled when contents was extracted from the editor.
+    Fixed bug where some browsers would toggle of formats applied to the caret when clicking in the editor toolbar.
+    Fixed bug where the custom theme function wasn't working correctly.
+    Fixed bug where image option for custom buttons required you to have icon specified as well.
+    Fixed bug where the context menu and contextual toolbars would be visible at the same time and sometimes overlapping.
+    Fixed bug where the noneditable plugin would double wrap elements when using the noneditable_regexp option.
+    Fixed bug where tables would get padding instead of margin when you used the indent button.
+    Fixed bug where the charmap plugin wouldn't properly insert non breaking spaces.
+    Fixed bug where the color previews in color input boxes wasn't properly updated.
+    Fixed bug where the list items of previous lists wasn't merged in the right order.
+    Fixed bug where it wasn't possible to drag/drop inline-block cE=false elements on IE 11.
+    Fixed bug where some table cell merges would produce incorrect rowspan/colspan.
+    Fixed so the font size of the editor defaults to 14px instead of 11px this can be overridden by custom css.
+    Fixed so wordcount is debounced to reduce cpu hogging on larger texts.
+    Fixed so tinymce global gets properly exported as a module when used with some module bundlers.
+    Fixed so it's possible to specify what css properties you want to preview on specific formats.
+    Fixed so anchors are contentEditable=false while within the editor.
+    Fixed so selected contents gets wrapped in a inline code element by the codesample plugin.
+    Fixed so conditional comments gets properly stripped independent of case. Patch contributed by Georgii Dolzhykov.
+    Fixed so some escaped css sequences gets properly handled. Patch contributed by Georgii Dolzhykov.
+    Fixed so notifications with the same message doesn't get displayed at the same time.
+    Fixed so F10 can be used as an alternative key to focus to the toolbar.
+    Fixed various api documentation issues and typos.
+    Removed layer plugin since it wasn't really ported from 3.x and there doesn't seem to be much use for it.
+    Removed moxieplayer.swf from the media plugin since it wasn't used by the media plugin.
+    Removed format state from the advlist plugin to be more consistent with common word processors.
+Version 4.4.3 (2016-09-01)
+    Fixed bug where copy would produce an exception on Chrome.
+    Fixed bug where deleting lists on IE 11 would merge in correct text nodes.
+    Fixed bug where deleting partial lists with indentation wouldn't cause proper normalization.
+Version 4.4.2 (2016-08-25)
+    Added new importcss_exclusive option to disable unique selectors per group.
+    Added new group specific selector_converter option to importcss plugin.
+    Added new codesample_languages option to apply custom languages to codesample plugin.
+    Added new codesample_dialog_width/codesample_dialog_height options.
+    Fixed bug where fullscreen button had an incorrect keyboard shortcut.
+    Fixed bug where backspace/delete wouldn't work correctly from a block to a cE=false element.
+    Fixed bug where smartpaste wasn't detecting links with special characters in them like tilde.
+    Fixed bug where the editor wouldn't get proper focus if you clicked on a cE=false element.
+    Fixed bug where it wasn't possible to copy/paste table rows that had merged cells.
+    Fixed bug where merging cells could some times produce invalid col/rowspan attibute values.
+    Fixed bug where getBody would sometimes thrown an exception now it just returns null if the iframe is clobbered.
+    Fixed bug where drag/drop of cE=false element wasn't properly constrained to viewport.
+    Fixed bug where contextmenu on Mac would collapse any selection to a caret.
+    Fixed bug where rtl mode wasn't rendered properly when loading a language pack with the rtl flag.
+    Fixed bug where Kamer word bounderies would be stripped from contents.
+    Fixed bug where lists would sometimes render two dots or numbers on the same line.
+    Fixed bug where the skin_url wasn't used by the inlite theme.
+    Fixed so data attributes are ignored when comparing formats in the formatter.
+    Fixed so it's possible to disable inline toolbars in the inlite theme.
+    Fixed so template dialog gets resized if it doesn't fit the window viewport.
+Version 4.4.1 (2016-07-26)
+    Added smart_paste option to paste plugin to allow disabling the paste behavior if needed.
+    Fixed bug where png urls wasn't properly detected by the smart paste logic.
+    Fixed bug where the element path wasn't working properly when multiple editor instances where used.
+    Fixed bug with creating lists out of multiple paragraphs would just create one list item instead of multiple.
+    Fixed bug where scroll position wasn't properly handled by the inlite theme to place the toolbar properly.
+    Fixed bug where multiple instances of the editor using the inlite theme didn't render the toolbar properly.
+    Fixed bug where the shortcut label for fullscreen mode didn't match the actual shortcut key.
+    Fixed bug where it wasn't possible to select cE=false blocks using touch devices on for example iOS.
+    Fixed bug where it was possible to select the child image within a cE=false on IE 11.
+    Fixed so inserts of html containing lists doesn't merge with any existing lists unless it's a paste operation.
+Version 4.4.0 (2016-06-30)
+    Added new inlite theme this is a more lightweight inline UI.
+    Added smarter paste logic that auto detects urls in the clipboard and inserts images/links based on that.
+    Added a better image resize algorithm for better image quality in the imagetools plugin.
+    Fixed bug where it wasn't possible to drag/dropping cE=false elements on FF.
+    Fixed bug where backspace/delete before/after a cE=false block would produce a new paragraph.
+    Fixed bug where list style type css property wasn't preserved when indenting lists.
+    Fixed bug where merging of lists where done even if the list style type was different.
+    Fixed bug where the image_dataimg_filter function wasn't used when pasting images.
+    Fixed bug where nested editable within a non editable element would cause scroll on focus in Chrome.
+    Fixed so invalid targets for inline mode is blocked on initialization. We only support elements that can have children.
+Version 4.3.13 (2016-06-08)
+    Added characters with a diacritical mark to charmap plugin. Patch contributed by Dominik Schilling.
+    Added better error handling if the image proxy service would produce errors.
+    Fixed issue with pasting list items into list items would produce nested list rather than a merged list.
+    Fixed bug where table selection could get stuck in selection mode for inline editors.
+    Fixed bug where it was possible to place the caret inside the resize grid elements.
+    Fixed bug where it wasn't possible to place in elements horizontally adjacent cE=false blocks.
+    Fixed bug where multiple notifications wouldn't be properly placed on screen.
+    Fixed bug where multiple editor instance of the same id could be produces in some specific integrations.
+Version 4.3.12 (2016-05-10)
+    Fixed bug where focus calls couldn't be made inside the editors PostRender event handler.
+    Fixed bug where some translations wouldn't work as expected due to a bug in editor.translate.
+    Fixed bug where the node change event could fire with a node out side the root of the editor.
+    Fixed bug where Chrome wouldn't properly present the keyboard paste clipboard details when paste was clicked.
+    Fixed bug where merged cells in tables couldn't be selected from right to left.
+    Fixed bug where insert row wouldn't properly update a merged cells rowspan property.
+    Fixed bug where the color input boxes preview field wasn't properly set on initialization.
+    Fixed bug where IME composition inside table cells wouldn't work as expected on IE 11.
+    Fixed so all shadow dom support is under and experimental flag due to flaky browser support.
+Version 4.3.11 (2016-04-25)
+    Fixed bug where it wasn't possible to insert empty blocks though the API unless they where padded.
+    Fixed bug where you couldn't type the Euro character on Windows.
+    Fixed bug where backspace/delete from a cE=false element to a text block didn't work properly.
+    Fixed bug where the text color default grid would render incorrectly.
+    Fixed bug where the codesample plugin wouldn't load the css in the editor for multiple editors.
+    Fixed so the codesample plugin textarea gets focused by default.
+Version 4.3.10 (2016-04-12)
+    Fixed bug where the key "y" on WebKit couldn't be entered due to conflict with keycode for F10 on keypress.
+Version 4.3.9 (2016-04-12)
+    Added support for focusing the contextual toolbars using keyboard.
+    Added keyboard support for slider UI controls. You can no increase/decrease using arrow keys.
+    Added url pattern matching for Dailymotion to media plugin. Patch contributed by Bertrand Darbon.
+    Added body_class to template plugin preview. Patch contributed by Milen Petrinski.
+    Added options to better override textcolor pickers with custom colors. Patch contributed by Xavier Boubert.
+    Added visual arrows to inline contextual toolbars so that they point to the element being active.
+    Fixed so toolbars for tables or other larger elements get better positioned below the scrollable viewport.
+    Fixed bug where it was possible to click links inside cE=false blocks.
+    Fixed bug where event targets wasn't properly handled in Safari Technical Preview.
+    Fixed bug where drag/drop text in FF 45 would make the editor caret invisible.
+    Fixed bug where the remove state wasn't properly set on editor instances when detected as clobbered.
+    Fixed bug where offscreen selection of some cE=false elements would render onscreen. Patch contributed by Steven Bufton
+    Fixed bug where enter would clone styles out side the root on editors inside a span. Patch contributed by ChristophKaser.
+    Fixed bug where drag/drop of images into the editor didn't work correctly in FF.
+    Fixed so the first item in panels for the imagetools dialog gets proper keyboard focus.
+    Changed the Meta+Shift+F shortcut to Ctrl+Shift+F since Czech, Slovak, Polish languages used the first one for input.
+Version 4.3.8 (2016-03-15)
+    Fixed bug where inserting HR at the end of a block element would produce an extra empty block.
+    Fixed bug where links would be clickable when readonly mode was enabled.
+    Fixed bug where the formatter would normalize to the wrong node on very specific content.
+    Fixed bug where some nested list items couldn't be indented properly.
+    Fixed bug where links where clickable in the preview dialog.
+    Fixed so the alt attribute doesn't get padded with an empty value by default.
+    Fixed so nested alignment works more correctly. You will now alter the alignment to the closest block parent.
+Version 4.3.7 (2016-03-02)
+    Fixed bug where incorrect icons would be rendered for imagetools edit and color levels.
+    Fixed bug where navigation using arrow keys inside a SelectBox didn't move up/down.
+    Fixed bug where the visualblocks plugin would render borders round internal UI elements.
+Version 4.3.6 (2016-03-01)
+    Added new paste_remember_plaintext_info option to allow a global disable of the plain text mode notification.
+    Added new PastePlainTextToggle event that fires when plain text mode toggles on/off.
+    Fixed bug where it wasn't possible to select media elements since the drag logic would snap it to mouse cursor.
+    Fixed bug where it was hard to place the caret inside nested cE=true elements when the outer cE=false element was focused.
+    Fixed bug where editors wouldn't properly initialize if both selector and mode where used.
+    Fixed bug where IME input inside table cells would switch the IME off.
+    Fixed bug where selection inside the first table cell would cause the whole table cell to get selected.
+    Fixed bug where error handling of images being uploaded wouldn't properly handle faulty statuses.
+    Fixed bug where inserting contents before a HR would cause an exception to be thrown.
+    Fixed bug where copy/paste of Excel data would be inserted as an image.
+    Fixed caret position issues with copy/paste of inline block cE=false elements.
+    Fixed issues with various menu item focus bugs in Chrome. Where the focused menu bar item wasn't properly blurred.
+    Fixed so the notifications have a solid background since it would be hard to read if there where text under it.
+    Fixed so notifications gets animated similar to the ones used by dialogs.
+    Fixed so larger images that gets pasted is handled better.
+    Fixed so the window close button is more uniform on various platform and also increased it's hit area.
+Version 4.3.5 (2016-02-11)
+    Npm version bump due to package not being fully updated.
+Version 4.3.4 (2016-02-11)
+    Added new OpenWindow/CloseWindow events that gets fired when windows open/close.
+    Added new NewCell/NewRow events that gets fired when table cells/rows are created.
+    Added new Promise return value to tinymce.init makes it easier to handle initialization.
+    Removed the jQuery version the jQuery plugin is now moved into the main package.
+    Removed jscs from build process since eslint can now handle code style checking.
+    Fixed various bugs with drag/drop of contentEditable:false elements.
+    Fixed bug where deleting of very specific nested list items would result in an odd list.
+    Fixed bug where lists would get merged with adjacent lists outside the editable inline root.
+    Fixed bug where MS Edge would crash when closing a dialog then clicking a menu item.
+    Fixed bug where table cell selection would add undo levels.
+    Fixed bug where table cell selection wasn't removed when inline editor where removed.
+    Fixed bug where table cell selection wouldn't work properly on nested tables.
+    Fixed bug where table merge menu would be available when merging between thead and tbody.
+    Fixed bug where table row/column resize wouldn't get properly removed when the editor was removed.
+    Fixed bug where Chrome would scroll to the editor if there where a empty hash value in document url.
+    Fixed bug where the cache suffix wouldn't work correctly with the importcss plugin.
+    Fixed bug where selection wouldn't work properly on MS Edge on Windows Phone 10.
+    Fixed so adjacent pre blocks gets joined into one pre block since that seems like the user intent.
+    Fixed so events gets properly dispatched in shadow dom. Patch provided by Nazar Mokrynskyi.
+Version 4.3.3 (2016-01-14)
+    Added new table_resize_bars configuration setting.  This setting allows you to disable the table resize bars.
+    Added new beforeInitialize event to tinymce.util.XHR lets you modify XHR properties before open. Patch contributed by Brent Clintel.
+    Added new autolink_pattern setting to autolink plugin. Enables you to override the default autolink formats. Patch contributed by Ben Tiedt.
+    Added new charmap option that lets you override the default charmap of the charmap plugin.
+    Added new charmap_append option that lets you add new characters to the default charmap of the charmap plugin.
+    Added new insertCustomChar event that gets fired when a character is inserted by the charmap plugin.
+    Fixed bug where table cells started with a superfluous &nbsp; in IE10+.
+    Fixed bug where table plugin would retain all BR tags when cells were merged.
+    Fixed bug where media plugin would strip underscores from youtube urls.
+    Fixed bug where IME input would fail on IE 11 if you typed within a table.
+    Fixed bug where double click selection of a word would remove the space before the word on insert contents.
+    Fixed bug where table plugin would produce exceptions when hovering tables with invalid structure.
+    Fixed bug where fullscreen wouldn't scroll back to it's original position when untoggled.
+    Fixed so the template plugins templates setting can be a function that gets a callback that can provide templates.
+Version 4.3.2 (2015-12-14)
+    Fixed bug where the resize bars for table cells were not affected by the object_resizing property.
+    Fixed bug where the contextual table toolbar would appear incorrectly if TinyMCE was initialized inline inside a table.
+    Fixed bug where resizing table cells did not fire a node change event or add an undo level.
+    Fixed bug where double click selection of text on IE 11 wouldn't work properly.
+    Fixed bug where codesample plugin would incorrectly produce br elements inside code elements.
+    Fixed bug where media plugin would strip dashes from youtube urls.
+    Fixed bug where it was possible to move the caret into the table resize bars.
+    Fixed bug where drag/drop into a cE=false element was possible on IE.
+Version 4.3.1 (2015-11-30)
+    Fixed so it's possible to disable the table inline toolbar by setting it to false or an empty string.
+    Fixed bug where it wasn't possible to resize some tables using the drag handles.
+    Fixed bug where unique id:s would clash for multiple editor instances and cE=false selections.
+    Fixed bug where the same plugin could be initialized multiple times.
+    Fixed bug where the table inline toolbars would be displayed at the same time as the image toolbars.
+    Fixed bug where the table selection rect wouldn't be removed when selecting another control element.
+Version 4.3.0 (2015-11-23)
+    Added new table column/row resize support. Makes it a lot more easy to resize the columns/rows in a table.
+    Added new table inline toolbar. Makes it easier to for example add new rows or columns to a table.
+    Added new notification API. Lets you display floating notifications to the end user.
+    Added new codesample plugin that lets you insert syntax highlighted pre elements into the editor.
+    Added new image_caption to images. Lets you create images with captions using a HTML5 figure/figcaption elements.
+    Added new live previews of embeded videos. Lets you play the video right inside the editor.
+    Added new setDirty method and "dirty" event to the editor. Makes it easier to track the dirty state change.
+    Added new setMode method to Editor instances that lets you dynamically switch between design/readonly.
+    Added new core support for contentEditable=false elements within the editor overrides the browsers broken behavior.
+    Rewrote the noneditable plugin to use the new contentEditable false core logic.
+    Fixed so the dirty state doesn't set to false automatically when the undo index is set to 0.
+    Fixed the Selection.placeCaretAt so it works better on IE when the coordinate is between paragraphs.
+    Fixed bug where data-mce-bogus="all" element contents where counted by the word count plugin.
+    Fixed bug where contentEditable=false elements would be indented by the indent buttons.
+    Fixed bug where images within contentEditable=false would be selected in WebKit on mouse click.
+    Fixed bug in DOMUntils split method where the replacement parameter wouldn't work on specific cases.
+    Fixed bug where the importcss plugin would import classes from the skin content css file.
+    Fixed so all button variants have a wrapping span for it's text to make it easier to skin.
+    Fixed so it's easier to exit pre block using the arrow keys.
+    Fixed bug where listboxes with fix widths didn't render correctly.
+Version 4.2.8 (2015-11-13)
+    Fixed bug where it was possible to delete tables as the inline root element if all columns where selected.
+    Fixed bug where the UI buttons active state wasn't properly updated due to recent refactoring of that logic.
+Version 4.2.7 (2015-10-27)
+    Fixed bug where backspace/delete would remove all formats on the last paragraph character in WebKit/Blink.
+    Fixed bug where backspace within a inline format element with a bogus caret container would move the caret.
+    Fixed bug where backspace/delete on selected table cells wouldn't add an undo level.
+    Fixed bug where script tags embedded within the editor could sometimes get a mce- prefix prepended to them
+    Fixed bug where validate: false option could produce an error to be thrown from the Serialization step.
+    Fixed bug where inline editing of a table as the root element could let the user delete that table.
+    Fixed bug where inline editing of a table as the root element wouldn't properly handle enter key.
+    Fixed bug where inline editing of a table as the root element would normalize the selection incorrectly.
+    Fixed bug where inline editing of a list as the root element could let the user delete that list.
+    Fixed bug where inline editing of a list as the root element could let the user split that list.
+    Fixed bug where resize handles would be rendered on editable root elements such as table.
+Version 4.2.6 (2015-09-28)
+    Added capability to set request headers when using XHRs.
+    Added capability to upload local images automatically default delay is set to 30 seconds after editing images.
+    Added commands ids mceEditImage, mceAchor and mceMedia to be avaiable from execCommand.
+    Added Edge browser to saucelabs grunt task. Patch contributed by John-David Dalton.
+    Fixed bug where blob uris not produced by tinymce would produce HTML invalid markup.
+    Fixed bug where selection of contents of a nearly empty editor in Edge would sometimes fail.
+    Fixed bug where color styles woudln't be retained on copy/paste in Blink/Webkit.
+    Fixed bug where the table plugin would throw an error when inserting rows after a child table.
+    Fixed bug where the template plugin wouldn't handle functions as variable replacements.
+    Fixed bug where undo/redo sometimes wouldn't work properly when applying formatting collapsed ranges.
+    Fixed bug where shift+delete wouldn't do a cut operation on Blink/WebKit.
+    Fixed bug where cut action wouldn't properly store the before selection bookmark for the undo level.
+    Fixed bug where backspace in side an empty list element on IE would loose editor focus.
+    Fixed bug where the save plugin wouldn't enable the buttons when a change occurred.
+    Fixed bug where Edge wouldn't initialize the editor if a document.domain was specified.
+    Fixed bug where enter key before nested images would sometimes not properly expand the previous block.
+    Fixed bug where the inline toolbars wouldn't get properly hidden when blurring the editor instance.
+    Fixed bug where Edge would paste Chinese characters on some Windows 10 installations.
+    Fixed bug where IME would loose focus on IE 11 due to the double trailing br bug fix.
+    Fixed bug where the proxy url in imagetools was incorrect. Patch contributed by Wong Ho Wang.
+Version 4.2.5 (2015-08-31)
+    Added fullscreen capability to embedded youtube and vimeo videos.
+    Fixed bug where the uploadImages call didn't work on IE 10.
+    Fixed bug where image place holders would be uploaded by uploadImages call.
+    Fixed bug where images marked with bogus would be uploaded by the uploadImages call.
+    Fixed bug where multiple calls to uploadImages would result in decreased performance.
+    Fixed bug where pagebreaks were editable to imagetools patch contributed by Rasmus Wallin.
+    Fixed bug where the element path could cause too much recursion exception.
+    Fixed bug for domains containing ".min". Patch contributed by Loïc Février.
+    Fixed so validation of external links to accept a number after www. Patch contributed by Victor Carvalho.
+    Fixed so the charmap is exposed though execCommand. Patch contributed by Matthew Will.
+    Fixed so that the image uploads are concurrent for improved performance.
+    Fixed various grammar problems in inline documentation. Patches provided by nikolas.
+Version 4.2.4 (2015-08-17)
+    Added picture as a valid element to the HTML 5 schema. Patch contributed by Adam Taylor.
+    Fixed bug where contents would be duplicated on drag/drop within the same editor.
+    Fixed bug where floating/alignment of images on Edge wouldn't work properly.
+    Fixed bug where it wasn't possible to drag images on IE 11.
+    Fixed bug where image selection on Edge would sometimes fail.
+    Fixed bug where contextual toolbars icons wasn't rendered properly when using the toolbar_items_size.
+    Fixed bug where searchreplace dialog doesn't get prefilled with the selected text.
+    Fixed bug where fragmented matches wouldn't get properly replaced by the searchreplace plugin.
+    Fixed bug where enter key wouldn't place the caret if was after a trailing space within an inline element.
+    Fixed bug where the autolink plugin could produce multiple links for the same text on Gecko.
+    Fixed bug where EditorUpload could sometimes throw an exception if the blob wasn't found.
+    Fixed xss issues with media plugin not properly filtering out some script attributes.
+Version 4.2.3 (2015-07-30)
+    Fixed bug where image selection wasn't possible on Edge due to incompatible setBaseAndExtend API.
+    Fixed bug where image blobs urls where not properly destroyed by the imagetools plugin.
+    Fixed bug where keyboard shortcuts wasn't working correctly on IE 8.
+    Fixed skin issue where the borders of panels where not visible on IE 8.
+Version 4.2.2 (2015-07-22)
+    Fixed bug where float panels were not being hidden on inline editor blur when fixed_toolbar_container config option was in use.
+    Fixed bug where combobox states wasn't properly updated if contents where updated without keyboard.
+    Fixed bug where pasting into textbox or combobox would move the caret to the end of text.
+    Fixed bug where removal of bogus span elements before block elements would remove whitespace between nodes.
+    Fixed bug where repositioning of inline toolbars where async and producing errors if the editor was removed from DOM to early. Patch by iseulde.
+    Fixed bug where element path wasn't working correctly. Patch contributed by iseulde.
+    Fixed bug where menus wasn't rendered correctly when custom images where added to a menu. Patch contributed by Naim Hammadi.
+Version 4.2.1 (2015-06-29)
+    Fixed bug where back/forward buttons in the browser would render blob images as broken images.
+    Fixed bug where Firefox would throw regexp to big error when replacing huge base64 chunks.
+    Fixed bug rendering issues with resize and context toolbars not being placed properly until next animation frame.
+    Fixed bug where the rendering of the image while cropping would some times not be centered correctly.
+    Fixed bug where listbox items with submenus would me selected as active.
+    Fixed bug where context menu where throwing an error when rendering.
+    Fixed bug where resize both option wasn't working due to resent addClass API change. Patch contributed by Jogai.
+    Fixed bug where a hideAll call for container rendered inline toolbars would throw an error.
+    Fixed bug where onclick event handler on combobox could cause issues if element.id was a function by some polluting libraries.
+    Fixed bug where listboxes wouldn't get proper selected sub menu item when using link_list or image_list.
+    Fixed so the UI controls are as wide as 4.1.x to avoid wrapping controls in toolbars.
+    Fixed so the imagetools dialog is adaptive for smaller screen sizes.
+Version 4.2.0 (2015-06-25)
+    Added new flat default skin to make the UI more modern.
+    Added new imagetools plugin, lets you crop/resize and apply filters to images.
+    Added new contextual toolbars support to the API lets you add floating toolbars for specific CSS selectors.
+    Added new promise feature fill as tinymce.util.Promise.
+    Added new built in image upload feature lets you upload any base64 encoded image within the editor as files.
+    Fixed bug where resize handles would appear in the right position in the wrong editor when switching between resizable content in different inline editors.
+    Fixed bug where tables would not be inserted in inline mode due to previous float panel fix.
+    Fixed bug where floating panels would remain open when focus was lost on inline editors.
+    Fixed bug where cut command on Chrome would thrown a browser security exception.
+    Fixed bug where IE 11 sometimes would report an incorrect size for images in the image dialog.
+    Fixed bug where it wasn't possible to remove inline formatting at the end of block elements.
+    Fixed bug where it wasn't possible to delete table cell contents when cell selection was vertical.
+    Fixed bug where table cell wasn't emptied from block elements if delete/backspace where pressed in empty cell.
+    Fixed bug where cmd+shift+arrow didn't work correctly on Firefox mac when selecting to start/end of line.
+    Fixed bug where removal of bogus elements would sometimes remove whitespace between nodes.
+    Fixed bug where the resize handles wasn't updated when the main window was resized.
+    Fixed so script elements gets removed by default to prevent possible XSS issues in default config implementations.
+    Fixed so the UI doesn't need manual reflows when using non native layout managers.
+    Fixed so base64 encoded images doesn't slow down the editor on modern browsers while editing.
+    Fixed so all UI elements uses touch events to improve mobile device support.
+    Removed the touch click quirks patch for iOS since it did more harm than good.
+    Removed the non proportional resize handles since. Unproportional resize can still be done by holding the shift key.
+Version 4.1.10 (2015-05-05)
+    Fixed bug where plugins loaded with compat3x would sometimes throw errors when loading using the jQuery version.
+    Fixed bug where extra empty paragraphs would get deleted in WebKit/Blink due to recent Quriks fix.
+    Fixed bug where the editor wouldn't work properly on IE 12 due to some required browser sniffing.
+    Fixed bug where formatting shortcut keys where interfering with Mac OS X screenshot keys.
+    Fixed bug where the caret wouldn't move to the next/previous line boundary on Cmd+Left/Right on Gecko.
+    Fixed bug where it wasn't possible to remove formats from very specific nested contents.
+    Fixed bug where undo levels wasn't produced when typing letters using the shift or alt+ctrl modifiers.
+    Fixed bug where the dirty state wasn't properly updated when typing using the shift or alt+ctrl modifiers.
+    Fixed bug where an error would be thrown if an autofocused editor was destroyed quickly after its initialization. Patch provided by thorn0.
+    Fixed issue with dirty state not being properly updated on redo operation.
+    Fixed issue with entity decoder not handling incorrectly written numeric entities.
+    Fixed issue where some PI element values wouldn't be properly encoded.
+Version 4.1.9 (2015-03-10)
+    Fixed bug where indentation wouldn't work properly for non list elements.
+    Fixed bug with image plugin not pulling the image dimensions out correctly if a custom document_base_url was used.
+    Fixed bug where ctrl+alt+[1-9] would conflict with the AltGr+[1-9] on Windows. New shortcuts is ctrl+shift+[1-9].
+    Fixed bug with removing formatting on nodes in inline mode would sometimes include nodes outside the editor body.
+    Fixed bug where extra nbsp:s would be inserted when you replaced a word surrounded by spaces using insertContent.
+    Fixed bug with pasting from Google Docs would produce extra strong elements and line feeds.
+Version 4.1.8 (2015-03-05)
+    Added new html5 sizes attribute to img elements used together with srcset.
+    Added new elementpath option that makes it possible to disable the element path but keep the statusbar.
+    Added new option table_style_by_css for the table plugin to set table styling with css rather than table attributes.
+    Added new link_assume_external_targets option to prompt the user to prepend http:// prefix if the supplied link does not contain a protocol prefix.
+    Added new image_prepend_url option to allow a custom base path/url to be added to images.
+    Added new table_appearance_options option to make it possible to disable some options.
+    Added new image_title option to make it possible to alter the title of the image, disabled by default.
+    Fixed bug where selection starting from out side of the body wouldn't produce a proper selection range on IE 11.
+    Fixed bug where pressing enter twice before a table moves the cursor in the table and causes a javascript error.
+    Fixed bug where advanced image styles were not respected.
+    Fixed bug where the less common Shift+Delete didn't produce a proper cut operation on WebKit browsers.
+    Fixed bug where image/media size constrain logic would produce NaN when handling non number values.
+    Fixed bug where internal classes where removed by the removeformat command.
+    Fixed bug with creating links table cell contents with a specific selection would throw a exceptions on WebKit/Blink.
+    Fixed bug where valid_classes option didn't work as expected according to docs. Patch provided by thorn0.
+    Fixed bug where jQuery plugin would patch the internal methods multiple times. Patch provided by Drew Martin.
+    Fixed bug where backspace key wouldn't delete the current selection of newly formatted content.
+    Fixed bug where type over of inline formatting elements wouldn't properly keep the format on WebKit/Blink.
+    Fixed bug where selection needed to be properly normalized on modern IE versions.
+    Fixed bug where Command+Backspace didn't properly delete the whole line of text but the previous word.
+    Fixed bug where UI active states wheren't properly updated on IE if you placed caret within the current range.
+    Fixed bug where delete/backspace on WebKit/Blink would remove span elements created by the user.
+    Fixed bug where delete/backspace would produce incorrect results when deleting between two text blocks with br elements.
+    Fixed bug where captions where removed when pasting from MS Office.
+    Fixed bug where lists plugin wouldn't properly remove fully selected nested lists.
+    Fixed bug where the ttf font used for icons would throw an warning message on Gecko on Mac OS X.
+    Fixed a bug where applying a color to text did not update the undo/redo history.
+    Fixed so shy entities gets displayed when using the visualchars plugin.
+    Fixed so removeformat removes ins/del by default since these might be used for strikethough.
+    Fixed so multiple language packs can be loaded and added to the global I18n data structure.
+    Fixed so transparent color selection gets treated as a normal color selection. Patch contributed by Alexander Hofbauer.
+    Fixed so it's possible to disable autoresize_overflow_padding, autoresize_bottom_margin options by setting them to false.
+    Fixed so the charmap plugin shows the description of the character in the dialog. Patch contributed by Jelle Hissink.
+    Removed address from the default list of block formats since it tends to be missused.
+    Fixed so the pre block format is called preformatted to make it more verbose.
+    Fixed so it's possible to context scope translation strings this isn't needed most of the time.
+    Fixed so the max length of the width/height input fields of the media dialog is 5 instead of 3.
+    Fixed so drag/dropped contents gets properly processed by paste plugin since it's basically a paste. Patch contributed by Greg Fairbanks.
+    Fixed so shortcut keys for headers is ctrl+alt+[1-9] instead of ctrl+[1-9] since these are for switching tabs in the browsers.
+    Fixed so "u" doesn't get converted into a span element by the legacy input filter. Since this is now a valid HTML5 element.
+    Fixed font families in order to provide appropriate web-safe fonts.
+Version 4.1.7 (2014-11-27)
+    Added HTML5 schema support for srcset, source and picture. Patch contributed by mattheu.
+    Added new cache_suffix setting to enable cache busting by producing unique urls.
+    Added new paste_convert_word_fake_lists option to enable users to disable the fake lists convert logic.
+    Fixed so advlist style changes adds undo levels for each change.
+    Fixed bug where WebKit would sometimes produce an exception when the autolink plugin where looking for URLs.
+    Fixed bug where IE 7 wouldn't be rendered properly due to aggressive css compression.
+    Fixed bug where DomQuery wouldn't accept window as constructor element.
+    Fixed bug where the color picker in 3.x dialogs wouldn't work properly. Patch contributed by Callidior.
+    Fixed bug where the image plugin wouldn't respect the document_base_url.
+    Fixed bug where the jQuery plugin would fail to append to elements named array prototype names.
+Version 4.1.6 (2014-10-08)
+    Fixed bug with clicking on the scrollbar of the iframe would cause a JS error to be thrown.
+    Fixed bug where null would produce an exception if you passed it to selection.setRng.
+    Fixed bug where Ctrl/Cmd+Tab would indent the current list item if you switched tabs in the browser.
+    Fixed bug where pasting empty cells from Excel would result in a broken table.
+    Fixed bug where it wasn't possible to switch back to default list style type.
+    Fixed issue where the select all quirk fix would fire for other modifiers than Ctrl/Cmd combinations.
+    Replaced jake with grunt since it is more mainstream and has better plugin support.
+Version 4.1.5 (2014-09-09)
+    Fixed bug where sometimes the resize rectangles wouldn't properly render on images on WebKit/Blink.
+    Fixed bug in list plugin where delete/backspace would merge empty LI elements in lists incorrectly.
+    Fixed bug where empty list elements would result in empty LI elements without it's parent container.
+    Fixed bug where backspace in empty caret formatted element could produce an type error exception of Gecko.
+    Fixed bug where lists pasted from word with a custom start index above 9 wouldn't be properly handled.
+    Fixed bug where tabfocus plugin would tab out of the editor instance even if the default action was prevented.
+    Fixed bug where tabfocus wouldn't tab properly to other adjacent editor instances.
+    Fixed bug where the DOMUtils setStyles wouldn't properly removed or update the data-mce-style attribute.
+    Fixed bug where dialog select boxes would be placed incorrectly if document.body wasn't statically positioned.
+    Fixed bug where pasting would sometimes scroll to the top of page if the user was using the autoresize plugin.
+    Fixed bug where caret wouldn't be properly rendered by Chrome when clicking on the iframes documentElement.
+    Fixed so custom images for menubutton/splitbutton can be provided. Patch contributed by Naim Hammadi.
+    Fixed so the default action of windows closing can be prevented by blocking the default action of the close event.
+    Fixed so nodeChange and focus of the editor isn't automatically performed when opening sub dialogs.
+Version 4.1.4 (2014-08-21)
+    Added new media_filter_html option to media plugin that blocks any conditional comments, scripts etc within a video element.
+    Added new content_security_policy option allows you to set custom policy for iframe contents. Patch contributed by Francois Chagnon.
+    Fixed bug where activate/deactivate events wasn't firing properly when switching between editors.
+    Fixed bug where placing the caret on iOS was difficult due to a WebKit bug with touch events.
+    Fixed bug where the resize helper wouldn't render properly on older IE versions.
+    Fixed bug where resizing images inside tables on older IE versions would sometimes fail depending mouse position.
+    Fixed bug where editor.insertContent would produce an exception when inserting select/option elements.
+    Fixed bug where extra empty paragraphs would be produced if block elements where inserted inside span elements.
+    Fixed bug where the spellchecker menu item wouldn't be properly checked if spell checking was started before it was rendered.
+    Fixed bug where the DomQuery filter function wouldn't remove non elements from collection.
+    Fixed bug where document with custom document.domain wouldn't properly render the editor.
+    Fixed bug where IE 8 would throw exception when trying to enter invalid color values into colorboxes.
+    Fixed bug where undo manager could incorrectly add an extra undo level when custom resize handles was removed.
+    Fixed bug where it wouldn't be possible to alter cell properties properly on table cells on IE 8.
+    Fixed so the color picker button in table dialog isn't shown unless you include the colorpicker plugin or add your own custom color picker.
+    Fixed so activate/deactivate events fire when windowManager opens a window since.
+    Fixed so the table advtab options isn't separated by an underscore to normalize naming with image_advtab option.
+    Fixed so the table cell dialog has proper padding when the advanced tab in disabled.
+Version 4.1.3 (2014-07-29)
+    Added event binding logic to tinymce.util.XHR making it possible to override headers and settings before any request is made.
+    Fixed bug where drag events wasn't fireing properly on older IE versions since the event handlers where bound to document.
+    Fixed bug where drag/dropping contents within the editor on IE would force the contents into plain text mode even if it was internal content.
+    Fixed bug where IE 7 wouldn't open menus properly due to a resize bug in the browser auto closing them immediately.
+    Fixed bug where the DOMUtils getPos logic wouldn't produce a valid coordinate inside the body if the body was positioned non static.
+    Fixed bug where the element path and format state wasn't properly updated if you had the wordcount plugin enabled.
+    Fixed bug where a comment at the beginning of source would produce an exception in the formatter logic.
+    Fixed bug where setAttrib/getAttrib on null would throw exception together with any hooked attributes like style.
+    Fixed bug where table sizes wasn't properly retained when copy/pasting on WebKit/Blink.
+    Fixed bug where WebKit/Blink would produce colors in RGB format instead of the forced HEX format when deleting contents.
+    Fixed bug where the width attribute wasn't updated on tables if you changed the size inside the table dialog.
+    Fixed bug where control selection wasn't properly handled when the caret was placed directly after an image.
+    Fixed bug where selecting the contents of table cells using the selection.select method wouldn't place the caret properly.
+    Fixed bug where the selection state for images wasn't removed when placing the caret right after an image on WebKit/Blink.
+    Fixed bug where all events wasn't properly unbound when and editor instance was removed or destroyed by some external innerHTML call.
+    Fixed bug where it wasn't possible or very hard to select images on iOS when the onscreen keyboard was visible.
+    Fixed so auto_focus can take a boolean argument this will auto focus the last initialized editor might be useful for single inits.
+    Fixed so word auto detect lists logic works better for faked lists that doesn't have specific markup.
+    Fixed so nodeChange gets fired on mouseup as it used to before 4.1.1 we optimized that event to fire less often.
+    Removed the finish menu item from spellchecker menu since it's redundant you can stop spellchecking by toggling menu item or button.
+Version 4.1.2 (2014-07-15)
+    Added offset/grep to DomQuery class works basically the same as it's jQuery equivalent.
+    Fixed bug where backspace/delete or setContent with an empty string would remove header data when using the fullpage plugin.
+    Fixed bug where tinymce.remove with a selector not matching any editors would remove all editors.
+    Fixed bug where resizing of the editor didn't work since the theme was calling setStyles instead of setStyle.
+    Fixed bug where IE 7 would fail to append html fragments to iframe document when using DomQuery.
+    Fixed bug where the getStyle DOMUtils method would produce an exception if it was called with null as it's element.
+    Fixed bug where the paste plugin would remove the element if the none of the paste_webkit_styles rules matched the current style.
+    Fixed bug where contextmenu table items wouldn't work properly on IE since it would some times fire an incorrect selection change.
+    Fixed bug where the padding/border values wasn't used in the size calculation for the body size when using autoresize. Patch contributed by Matt Whelan.
+    Fixed bug where conditional word comments wouldn't be properly removed when pasting plain text.
+    Fixed bug where resizing would sometime fail on IE 11 when the mouseup occurred inside the resizable element.
+    Fixed so the iframe gets initialized without any inline event handlers for better CSP support. Patch contributed by Matt Whelan.
+    Fixed so the tinymce.dom.Sizzle is the latest version of sizzle this resolves the document context bug.
+Version 4.1.1 (2014-07-08)
+    Fixed bug where pasting plain text on some WebKit versions would result in an empty line.
+    Fixed bug where resizing images inside tables on IE 11 wouldn't work properly.
+    Fixed bug where IE 11 would sometimes throw "Invalid argument" exception when editor contents was set to an empty string.
+    Fixed bug where document.activeElement would throw exceptions on IE 9 when that element was hidden or removed from dom.
+    Fixed bug where WebKit/Blink sometimes produced br elements with the Apple-interchange-newline class.
+    Fixed bug where table cell selection wasn't properly removed when copy/pasting table cells.
+    Fixed bug where pasting nested list items from Word wouldn't produce proper semantic nested lists.
+    Fixed bug where right clicking using the contextmenu plugin on WebKit/Blink on Mac OS X would select the target current word or line.
+    Fixed bug where it wasn't possible to alter table cell properties on IE 8 using the context menu.
+    Fixed bug where the resize helper wouldn't be correctly positioned on older IE versions.
+    Fixed bug where fullpage plugin would produce an error if you didn't specify a doctype encoding.
+    Fixed bug where anchor plugin would get the name/id of the current element even if it wasn't anchor element.
+    Fixed bug where visual aids for tables wouldn't be properly disabled when changing the border size.
+    Fixed bug where some control selection events wasn't properly fired on older IE versions.
+    Fixed bug where table cell selection on older IE versions would prevent resizing of images.
+    Fixed bug with paste_data_images paste option not working properly on modern IE versions.
+    Fixed bug where custom elements with underscores in the name wasn't properly parsed/serialized.
+    Fixed bug where applying inline formats to nested list elements would produce an incorrect formatting result.
+    Fixed so it's possible to hide items from elements path by using preventDefault/stopPropagation.
+    Fixed so inline mode toolbar gets rendered right aligned if the editable element positioned to the documents right edge.
+    Fixed so empty inline elements inside empty block elements doesn't get removed if configured to be kept intact.
+    Fixed so DomQuery parentsUntil/prevUntil/nextUntil supports selectors/elements/filters etc.
+    Fixed so legacyoutput plugin overrides fontselect and fontsizeselect controls and handles font elements properly.
+Version 4.1.0 (2014-06-18)
+    Added new file_picker_callback option to replace the old file_browser_callback the latter will still work though.
+    Added new custom colors to textcolor plugin will be displayed if a color picker is provided also shows the latest colors.
+    Added new color_picker_callback option to enable you to add custom color pickers to the editor.
+    Added new advanced tabs to table/cell/row dialogs to enable you to select colors for border/background.
+    Added new colorpicker plugin that lets you select colors from a hsv color picker.
+    Added new tinymce.util.Color class to handle color parsing and converting.
+    Added new colorpicker UI widget element lets you add a hsv color picker to any form/window.
+    Added new textpattern plugin that allows you to use markdown like text patterns to format contents.
+    Added new resize helper element that shows the current width & height while resizing.
+    Added new "once" method to Editor and EventDispatcher enables since callback execution events.
+    Added new jQuery like class under tinymce.dom.DomQuery it's exposed on editor instances (editor.$) and globally under (tinymce.$).
+    Fixed so the default resize method for images are proportional shift/ctrl can be used to make an unproportional size.
+    Fixed bug where the image_dimensions option of the image plugin would cause exceptions when it tried to update the size.
+    Fixed bug where table cell dialog class field wasn't properly updated when editing an a table cell with an existing class.
+    Fixed bug where Safari on Mac would produce webkit-fake-url for pasted images so these are now removed.
+    Fixed bug where the nodeChange event would get fired before the selection was changed when clicking inside the current selection range.
+    Fixed bug where valid_classes option would cause exception when it removed internal prefixed classes like mce-item-.
+    Fixed bug where backspace would cause navigation in IE 8 on an inline element and after a caret formatting was applied.
+    Fixed so placeholder images produced by the media plugin gets selected when inserted/edited.
+    Fixed so it's possible to drag in images when the paste_data_images option is enabled. Might be useful for mail clients.
+    Fixed so images doesn't get a width/height applied if the image_dimensions option is set to false useful for responsive contents.
+    Fixed so it's possible to pass in an optional arguments object for the nodeChanged function to be passed to all nodechange event listeners.
+    Fixed bug where media plugin embed code didn't update correctly.
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/composer.json
@@ -1,1 +1,44 @@
-
+{
+	"name": "tinymce/tinymce",
+	"version": "5.3.2",
+	"description": "Web based JavaScript HTML WYSIWYG editor control.",
+	"license": [
+		"LGPL-2.1-only"
+	],
+	"keywords": [
+		"editor",
+		"wysiwyg",
+		"tinymce",
+		"richtext",
+		"javascript",
+		"html"
+	],
+	"homepage": "http://www.tinymce.com",
+	"type": "component",
+	"extra": {
+		"component": {
+			"scripts": [
+				"tinymce.js",
+				"plugins/*/plugin.js",
+				"themes/*/theme.js",
+				"themes/*/icons.js"
+			],
+			"files": [
+				"tinymce.min.js",
+				"plugins/*/plugin.min.js",
+				"themes/*/theme.min.js",
+				"skins/**",
+				"icons/*/icons.min.js"
+			]
+		}
+	},
+	"archive": {
+		"exclude": [
+			"readme.md",
+			"bower.js",
+			"package.json",
+			".npmignore",
+			"changelog.txt"
+		]
+	}
+}

--- /dev/null
+++ b/tinymce/5/js/tinymce/icons/default/icons.js
@@ -1,1 +1,164 @@
-
+tinymce.IconManager.add('default', {
+  icons: {
+    'accessibility-check': '<svg width="24" height="24"><path d="M12 2a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2c0-1.1.9-2 2-2zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 01-1-1v-5c0-.6-.4-1-1-1a1 1 0 00-1 1v5c0 .6-.4 1-1 1a1 1 0 01-1-1V9H4a1 1 0 110-2h16c.6 0 1 .4 1 1s-.4 1-1 1z" fill-rule="nonzero"/></svg>',
+    'action-next': '<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 00-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 10-1.4-1.4L12 13.6 5.7 7.3z"/></svg>',
+    'action-prev': '<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 001.4-1.4L12 6.6l-7.7 7.7a1 1 0 001.4 1.4L12 9.4l6.3 6.3z"/></svg>',
+    'align-center': '<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',
+    'align-justify': '<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',
+    'align-left': '<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',
+    'align-none': '<svg width="24" height="24"><path d="M14.2 5L13 7H5a1 1 0 110-2h9.2zm4 0h.8a1 1 0 010 2h-2l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h6.8zm4 0H19a1 1 0 010 2h-4.4l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h4.4zm4 0H19a1 1 0 010 2h-6.8l1.2-2zM7 17l-1.2 2H5a1 1 0 010-2h2zm4 0h8a1 1 0 010 2H9.8l1.2-2zm5.2-13.5l1.3.7-9.7 16.3-1.3-.7 9.7-16.3z" fill-rule="evenodd"/></svg>',
+    'align-right': '<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',
+    'arrow-left': '<svg width="24" height="24"><path d="M5.6 13l12 6a1 1 0 001.4-1V6a1 1 0 00-1.4-.9l-12 6a1 1 0 000 1.8z" fill-rule="evenodd"/></svg>',
+    'arrow-right': '<svg width="24" height="24"><path d="M18.5 13l-12 6A1 1 0 015 18V6a1 1 0 011.4-.9l12 6a1 1 0 010 1.8z" fill-rule="evenodd"/></svg>',
+    'bold': '<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 01-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4z" fill-rule="evenodd"/></svg>',
+    'bookmark': '<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 00-1 1z" fill-rule="nonzero"/></svg>',
+    'border-width': '<svg width="24" height="24"><path d="M5 14.8h14a1 1 0 010 2H5a1 1 0 010-2zm-.5 3.7h15c.3 0 .5.2.5.5s-.2.5-.5.5h-15a.5.5 0 110-1zm.5-8.3h14c.6 0 1 .4 1 1v1c0 .5-.4 1-1 1H5a1 1 0 01-1-1v-1c0-.6.4-1 1-1zm0-5.7h14c.6 0 1 .4 1 1v2c0 .6-.4 1-1 1H5a1 1 0 01-1-1v-2c0-.6.4-1 1-1z" fill-rule="evenodd"/></svg>',
+    'brightness': '<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3zm0-10a1 1 0 01-.7-.3A1 1 0 0111 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3h-1a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1zM7 12c0 .3-.1.5-.3.7a1 1 0 01-.7.3H5a1 1 0 01-.7-.3A1 1 0 014 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7zm10 3.5l.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 01-.8.3 1 1 0 01-.6-.3l-.8-.7a1 1 0 01-.3-.8c0-.2.1-.5.3-.7a1 1 0 011.4 0zm-10-7l-.7-.8a1 1 0 01-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.8-.3zm10 0a1 1 0 01-.8.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 010 1.4l-.8.8a1 1 0 01-.6.3 1 1 0 01-.8-.3 1 1 0 01-.3-.8c0-.2.1-.5.3-.6l.7-.8zM12 8a4 4 0 013.7 2.4 4 4 0 010 3.2A4 4 0 0112 16a4 4 0 01-3.7-2.4 4 4 0 010-3.2A4 4 0 0112 8zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7z" fill-rule="evenodd"/></svg>',
+    'browse': '<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9.4l-2.3 2.3a1 1 0 11-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 01-1.4 1.4L13 13.4V20a1 1 0 01-2 0v-6.6z" fill-rule="nonzero"/></svg>',
+    'cancel': '<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 110 14.8 7.4 7.4 0 010-14.8zM12 3a9 9 0 100 18 9 9 0 000-18zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7z" fill-rule="nonzero"/></svg>',
+    'change-case': '<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 01-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 01-1 .7h-.2a.7.7 0 01-.7-1l4-12a1 1 0 012 0l4 12a.7.7 0 01-.8 1h-.2a1 1 0 01-1-.7l-.8-2.6zm-.3-1.5l-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',
+    'character-count': '<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1zm4.8-6.8V10H7.7V5.8h-1v-1h2zM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1zM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2v-.1-.2l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 01-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 00-.5-.1 1 1 0 00-.4 0l-.3.4h-1zm2.3.8h-.2l-.2.1-.4.1a1 1 0 00-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 001.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 00-.6-.3l-.6.3-.2.8zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 00-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 01-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 01-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1z" fill-rule="evenodd"/></svg>',
+    'checklist-rtl': '<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',
+    'checklist': '<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8a1 1 0 010 2h-8a1 1 0 010-2zM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',
+    'checkmark': '<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 011.6 1.2l-8 12a1 1 0 01-1.5.1l-5-5a1 1 0 111.4-1.4l4.1 4.1 7.4-11z" fill-rule="nonzero"/></svg>',
+    'chevron-down': '<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 010-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8z" fill-rule="nonzero"/></svg>',
+    'chevron-left': '<svg width="10" height="10"><path d="M7.8 1.3L4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 010-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1z" fill-rule="nonzero"/></svg>',
+    'chevron-right': '<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 010-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 010-1.1L6 5 2.2 1.3z" fill-rule="nonzero"/></svg>',
+    'chevron-up': '<svg width="10" height="10"><path d="M8.7 7.8L5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 010-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0z" fill-rule="nonzero"/></svg>',
+    'close': '<svg width="24" height="24"><path d="M17.3 8.2L13.4 12l3.9 3.8a1 1 0 01-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 01-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 011.5-1.5l3.8 3.9 3.8-3.9a1 1 0 011.5 1.5z" fill-rule="evenodd"/></svg>',
+    'code-sample': '<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 01-.8 2 2.8 2.8 0 01.8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 01-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 01.8-2 2.8 2.8 0 01-.8-2zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2zM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 01-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 01-.5-.5V17a3 3 0 001-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5z" fill-rule="evenodd"/></svg>',
+    'color-levels': '<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0118 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 01-3.7 3 5.7 5.7 0 01-3.2 0A5.9 5.9 0 017.6 18a6.2 6.2 0 01-1.4-2.6 6.7 6.7 0 010-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 012.3-4A20 20 0 0112 4a26.4 26.4 0 013.2 3.4 18.2 18.2 0 012.3 4zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 00-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 01-1.3 3 5.3 5.3 0 01-2.3 1.5 4.9 4.9 0 01-2 .1 4.3 4.3 0 002.4.8 4 4 0 002-.6 4 4 0 001.5-1.5z" fill-rule="evenodd"/></svg>',
+    'color-picker': '<svg width="24" height="24"><path d="M12 3a9 9 0 000 18 1.5 1.5 0 001.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 005-5c0-4.4-4-8-9-8zm-5.5 9a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3-4a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm5 0a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3 4a1.5 1.5 0 110-3 1.5 1.5 0 010 3z" fill-rule="nonzero"/></svg>',
+    'color-swatch-remove-color': '<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3L3 21" fill-rule="evenodd"/></svg>',
+    'color-swatch': '<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',
+    'comment-add': '<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/><path d="M13 10h2a1 1 0 010 2h-2v2a1 1 0 01-2 0v-2H9a1 1 0 010-2h2V8a1 1 0 012 0v2z"/></g></svg>',
+    'comment': '<svg width="24" height="24"><path fill-rule="nonzero" d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/></svg>',
+    'contrast': '<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-6 8a6 6 0 006 6V6a6 6 0 00-6 6z" fill-rule="evenodd"/></svg>',
+    'copy': '<svg width="24" height="24"><path d="M16 3H6a2 2 0 00-2 2v11h2V5h10V3zm1 4a2 2 0 012 2v10a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7zm0 12V9h-7v10h7z" fill-rule="nonzero"/></svg>',
+    'crop': '<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 01-1-1v-2H7V9H5a1 1 0 110-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3zM9 9v5l5-5H9zm1 6h5v-5l-5 5z" fill-rule="evenodd"/></svg>',
+    'cut': '<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 01-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 018.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 010-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 010 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8zm-8.5 2.2l.1-.4v-.3-.4a1 1 0 00-.2-.5 1 1 0 00-.4-.2 1.6 1.6 0 00-.8 0 2.6 2.6 0 00-.8.3 2.5 2.5 0 00-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 00.8-.3 2.8 2.8 0 001-1zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4zm5.4 4l.2-.5v-.4-.3a2.6 2.6 0 00-.3-.8 2.4 2.4 0 00-.7-.7 2.5 2.5 0 00-.8-.3 1.5 1.5 0 00-.8 0 1 1 0 00-.4.2 1 1 0 00-.2.5 1.5 1.5 0 000 .7v.4l.3.4.3.4a2.8 2.8 0 00.8.5l.4.1h.7l.5-.2z" fill-rule="evenodd"/></svg>',
+    'document-properties': '<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',
+    'drag': '<svg width="24" height="24"><path d="M13 5h2v2h-2V5zm0 4h2v2h-2V9zM9 9h2v2H9V9zm4 4h2v2h-2v-2zm-4 0h2v2H9v-2zm0 4h2v2H9v-2zm4 0h2v2h-2v-2zM9 5h2v2H9V5z" fill-rule="evenodd"/></svg>',
+    'duplicate': '<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10zm3 8h-2V9h-7v10h9a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7a2 2 0 012 2v2z"/><path d="M17 14h1a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1h-1a1 1 0 010-2h1v-1a1 1 0 012 0v1z"/></g></svg>',
+    'edit-block': '<svg width="24" height="24"><path fill-rule="nonzero" d="M19.8 8.8l-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5zm-2-.2l1-.9v-.3l-2.2-2.2a.3.3 0 00-.3 0l-1 1L18 8.5zm-1 1l-2.5-2.4-6 6 2.5 2.5 6-6zm-7 7.1l-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5z"/></svg>',
+    'edit-image': '<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 00-2-2H7v2h11v9zM6 17h15a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1H6a2 2 0 01-2-2V7H3a1 1 0 110-2h1V4a1 1 0 112 0v13zm3-5.3l1.3 2 3-4.7 3.7 6H7l2-3.3z" fill-rule="nonzero"/></svg>',
+    'embed-page': '<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0119 6zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 008 19h3zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 00-4 4.5h2.2zm-3.4 0a12 12 0 012.8-4 12 12 0 00-5 4h2.2z" fill-rule="nonzero"/></svg>',
+    'embed': '<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm4.8 2.6l5.6 4a.5.5 0 010 .8l-5.6 4A.5.5 0 019 16V8a.5.5 0 01.8-.4z" fill-rule="nonzero"/></svg>',
+    'emoji': '<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5zM12 4a8 8 0 100 16 8 8 0 000-16zm0 14.5a6.5 6.5 0 110-13 6.5 6.5 0 010 13z" fill-rule="nonzero"/></svg>',
+    'fill': '<svg width="24" height="26"><path d="M16.6 12l-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 002.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2zM5.2 13L10 8.2l4.8 4.8H5.2zM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 002-2c0-1.3-2-3.5-2-3.5z" fill-rule="nonzero"/></svg>',
+    'flip-horizontally': '<svg width="24" height="24"><path d="M14 19h2v-2h-2v2zm4-8h2V9h-2v2zM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 00-2 2zm14-2v2h2a2 2 0 00-2-2zm-7 16h2V3h-2v18zm7-6h2v-2h-2v2zm-4-8h2V5h-2v2zm4 12a2 2 0 002-2h-2v2z" fill-rule="nonzero"/></svg>',
+    'flip-vertically': '<svg width="24" height="24"><path d="M5 14v2h2v-2H5zm8 4v2h2v-2h-2zm4-14H7a2 2 0 00-2 2v3h2V6h10v3h2V6a2 2 0 00-2-2zm2 14h-2v2a2 2 0 002-2zM3 11v2h18v-2H3zm6 7v2h2v-2H9zm8-4v2h2v-2h-2zM5 18c0 1.1.9 2 2 2v-2H5z" fill-rule="nonzero"/></svg>',
+    'format-painter': '<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 00-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3z" fill-rule="nonzero"/></svg>',
+    'format': '<svg width="24" height="24"><path fill-rule="evenodd" d="M17 5a1 1 0 010 2h-4v11a1 1 0 01-2 0V7H7a1 1 0 110-2h10z"/></svg>',
+    'fullscreen': '<svg width="24" height="24"><path d="M15.3 10l-1.2-1.3 2.9-3h-2.3a.9.9 0 110-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 11-1.8 0V7l-2.9 3zm0 4l3 3v-2.3a.9.9 0 111.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 110-1.8H17l-3-2.9 1.3-1.2zM10 15.4l-2.9 3h2.3a.9.9 0 110 1.7H5a.9.9 0 01-.9-.9v-4.4a.9.9 0 111.8 0V17l2.9-3 1.2 1.3zM8.7 10L5.7 7v2.3a.9.9 0 01-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 010 1.8H7l3 2.9-1.3 1.2z" fill-rule="nonzero"/></svg>',
+    'gallery': '<svg width="24" height="24"><path fill-rule="nonzero" d="M5 15.7l2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7zM5 18V19h3l1.8-1.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 01-1-1V7c0-.6.4-1 1-1zm6 7a2 2 0 110-4 2 2 0 010 4zM4.5 4h15a.5.5 0 110 1h-15a.5.5 0 010-1zm2-2h11a.5.5 0 110 1h-11a.5.5 0 010-1z"/></svg>',
+    'gamma': '<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 00-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 01.6.5l.1.3a8.5 8.5 0 01.3.6l1.9 4.6 2-5.2a1 1 0 011-.6.5.5 0 01.5.6L13 14v2.8a.7.7 0 01-1.4 0z" fill-rule="nonzero"/></svg>',
+    'help': '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 00-6 9 6.3 6.3 0 001.4 2l1 1a6.3 6.3 0 003.6 1 6.5 6.5 0 006-9 6.3 6.3 0 00-1.4-2l-1-1a6.3 6.3 0 00-3.6-1zM12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4z"/><path d="M9.6 9.7a.7.7 0 01-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 00-.8.8.8.8 0 01-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',
+    'highlight-bg-color': '<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 012.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',
+    'home': '<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',
+    'horizontal-rule': '<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',
+    'image-options': '<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',
+    'image': '<svg width="24" height="24"><path d="M5 15.7l3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7zM5 18V19h3l2.8-2.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm6 8a2 2 0 100-4 2 2 0 000 4z" fill-rule="nonzero"/></svg>',
+    'indent': '<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',
+    'info': '<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-1 3v2h2V7h-2zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4z" fill-rule="evenodd"/></svg>',
+    'insert-character': '<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 001.8-2.9 6.3 6.3 0 00-.1-4.1 5.8 5.8 0 00-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 00-3.9 1.8 6.3 6.3 0 00-1.3 6 6.2 6.2 0 001.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 014 11c0-1 .2-1.9.6-2.7A7 7 0 016.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 015.7 2 7 7 0 011.7 2.3 6 6 0 01.2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 01-3.6 2.5v.5z" fill-rule="evenodd"/></svg>',
+    'insert-time': '<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 100-14 7 7 0 000 14zm0 2a9 9 0 110-18 9 9 0 010 18z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 00-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></svg>',
+    'invert': '<svg width="24" height="24"><path d="M18 19.3L16.5 18a5.8 5.8 0 01-3.1 1.9 6.1 6.1 0 01-5.5-1.6A5.8 5.8 0 016 14v-.3l.1-1.2A13.9 13.9 0 017.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 00.2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 00-3-4.2L12 6a26.1 26.1 0 00-2.2 2.5l-1-1a20.9 20.9 0 012.9-3.3L12 4l1 .8a22.2 22.2 0 014 5.4c.6 1.2 1 2.4 1 3.6z" fill-rule="evenodd"/></svg>',
+    'italic': '<svg width="24" height="24"><path d="M16.7 4.7l-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8z" fill-rule="evenodd"/></svg>',
+    'line': '<svg width="24" height="24"><path d="M15 9l-8 8H4v-3l8-8 3 3zm1-1l-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1zM4 18h16v2H4v-2z" fill-rule="evenodd"/></svg>',
+    'link': '<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2.1 2a2 2 0 102.7 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2-2a2 2 0 10-2.6-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2z" fill-rule="nonzero"/></svg>',
+    'list-bull-circle': '<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 26a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 36a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',
+    'list-bull-default': '<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',
+    'list-bull-square': '<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',
+    'list-num-default-rtl': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8l-1.6 1v-1.1l1.6-1h1.2V17zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',
+    'list-num-default': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',
+    'list-num-lower-alpha-rtl': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6zM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3zM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
+    'list-num-lower-alpha': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
+    'list-num-lower-greek-rtl': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4zM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3zM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM37.1 34.6L34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
+    'list-num-lower-greek': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3zM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
+    'list-num-lower-roman-rtl': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33zm0 10v-1.2h-1.3V26H33zm0 10v-1.2h-1.3V36H33z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',
+    'list-num-lower-roman': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15zm0 10v-1.2h1.3V26H15zm0 10v-1.2h1.3V36H15z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',
+    'list-num-upper-alpha-rtl': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M39.3 17l-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3zm-1.6-4.7l-.7 2.3h1.6l-.8-2.3zM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26zM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
+    'list-num-upper-alpha': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M12.6 17l-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3zM11 12.3l-.7 2.3h1.6l-.8-2.3zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
+    'list-num-upper-roman-rtl': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3zm0 10v-1.2H33V27h-1.3zm0 10v-1.2H33V37h-1.3z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',
+    'list-num-upper-roman': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15zm0 10v-1.2h1.3V27H15zm0 10v-1.2h1.3V37H15z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',
+    'lock': '<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3zM10 8v3h4V8a1 1 0 00-.3-.7A1 1 0 0013 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7z" fill-rule="evenodd"/></svg>',
+    'ltr': '<svg width="24" height="24"><path d="M11 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 017.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L11 5zM4.4 16.2L6.2 15l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',
+    'more-drawer': '<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',
+    'new-document': '<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',
+    'new-tab': '<svg width="24" height="24"><path d="M15 13l2-2v8H5V7h8l-2 2H7v8h8v-4zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19z" fill-rule="evenodd"/></svg>',
+    'non-breaking': '<svg width="24" height="24"><path d="M11 11H8a1 1 0 110-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 01-1-1v-3zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1z" fill-rule="evenodd"/></svg>',
+    'notice': '<svg width="24" height="24"><path d="M17.8 9.8L15.4 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7l2.3 5.8zm0 0l2.2 5.7-2.3-5.8zM13 17v-2h-2v2h2zm0-4V7h-2v6h2z" fill-rule="evenodd"/></svg>',
+    'ordered-list-rtl': '<svg width="24" height="24"><path d="M6 17h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 110-2zm13-1v3.5a.5.5 0 11-1 0V5h-.5a.5.5 0 110-1H19zm-1 8.8l.2.2h1.3a.5.5 0 110 1h-1.6a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2h-1.3a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 010-1h1.2a.3.3 0 100-.6h-1.3a.4.4 0 110-.8h1.3a.3.3 0 000-.6h-1.2a.5.5 0 110-1H19c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',
+    'ordered-list': '<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 110-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 01-.5-.5V5h-.5a.5.5 0 010-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2H4.5a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 010-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 110-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 110-1H6c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',
+    'orientation': '<svg width="24" height="24"><path d="M7.3 6.4L1 13l6.4 6.5 6.5-6.5-6.5-6.5zM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7zM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 010-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 11-4.3 16.9l1.5-1.5A7 7 0 1013 6h-1z" fill-rule="nonzero"/></svg>',
+    'outdent': '<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm1.6-3.8a1 1 0 01-1.2 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 011.2 1.6L6.8 12l1.8 1.2z" fill-rule="evenodd"/></svg>',
+    'page-break': '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1zM6 22a1 1 0 01-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 01-1-1v-5H7v5c0 .6-.4 1-1 1z"/></g></svg>',
+    'paragraph': '<svg width="24" height="24"><path fill-rule="evenodd" d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z"/></svg>',
+    'paste-text': '<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2z" fill-rule="nonzero"/></svg>',
+    'paste': '<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1z" fill-rule="nonzero"/></svg>',
+    'permanent-pen': '<svg width="24" height="24"><path d="M10.5 17.5L8 20H3v-3l3.5-3.5a2 2 0 010-3L14 3l1 1-7.3 7.3a1 1 0 000 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 01-2.8 0l-.1-.1z" fill-rule="nonzero"/></svg>',
+    'plus': '<svg width="24" height="24"><path d="M12 4c.5 0 1 .4 1 .9V11h6a1 1 0 01.1 2H13v6a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H11V5c0-.6.4-1 1-1z"/></svg>',
+    'preferences': '<svg width="24" height="24"><path d="M20.1 13.5l-1.9.2a5.8 5.8 0 01-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 01-1.4 0l-1.5-1.2a6.2 6.2 0 01-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 01-1-.9l-.2-1.9a5.8 5.8 0 01-1.5-.6l-1.5 1.2a1 1 0 01-1.4 0l-.7-.7a1 1 0 010-1.4l1.2-1.5a6.2 6.2 0 01-.6-1.5l-1.9-.2a1 1 0 01-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 01.6-1.5L5.2 7.3a1 1 0 010-1.4l.7-.7a1 1 0 011.4 0l1.5 1.2a6.2 6.2 0 011.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 011.5.6l1.5-1.2a1 1 0 011.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 01.6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1zM12 15a3 3 0 100-6 3 3 0 000 6z" fill-rule="evenodd"/></svg>',
+    'preview': '<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 002.1-2.8 15.7 15.7 0 00-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 00-6.7 3.2A16.2 16.2 0 003.2 12c0 .2.2.3.3.5zm-2.4-1l.7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 012.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 01-2.8-3.7 1 1 0 010-1zm12-3.3a2 2 0 102.7 2.6 4 4 0 11-2.6-2.6z" fill-rule="nonzero"/></svg>',
+    'print': '<svg width="24" height="24"><path d="M18 8H6a3 3 0 00-3 3v6h2v3h14v-3h2v-6a3 3 0 00-3-3zm-1 10H7v-4h10v4zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm.5-8H6v2h12V5z" fill-rule="nonzero"/></svg>',
+    'quote': '<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3z" fill-rule="nonzero"/></svg>',
+    'redo': '<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 11-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 111.4-1.4l5 5a1 1 0 010 1.4l-5 5a1 1 0 01-1.4-1.4l3.3-3.3z" fill-rule="nonzero"/></svg>',
+    'reload': '<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5 22.1l-1.2-4.7v-.2a1 1 0 011-1l5 .4a1 1 0 11-.2 2l-2.2-.2a7.8 7.8 0 008.4.2 7.5 7.5 0 003.5-6.4 1 1 0 112 0 9.5 9.5 0 01-4.5 8 9.9 9.9 0 01-10.2 0l.4 1.4a1 1 0 11-2 .5zM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 00-9.5-1 7.5 7.5 0 00-3.6 7 1 1 0 01-2 0 9.5 9.5 0 014.5-8.6 10 10 0 0110.9.3l-.3-1a1 1 0 012-.5l1.1 4.8a1 1 0 01-1 1.2l-5-.4a1 1 0 01-.9-1z"/></g></svg>',
+    'remove-formatting': '<svg width="24" height="24"><path d="M13.2 6a1 1 0 010 .2l-2.6 10a1 1 0 01-1 .8h-.2a.8.8 0 01-.8-1l2.6-10H8a1 1 0 110-2h9a1 1 0 010 2h-3.8zM5 18h7a1 1 0 010 2H5a1 1 0 010-2zm13 1.5L16.5 18 15 19.5a.7.7 0 01-1-1l1.5-1.5-1.5-1.5a.7.7 0 011-1l1.5 1.5 1.5-1.5a.7.7 0 011 1L17.5 17l1.5 1.5a.7.7 0 01-1 1z" fill-rule="evenodd"/></svg>',
+    'remove': '<svg width="24" height="24"><path d="M16 7h3a1 1 0 010 2h-1v9a3 3 0 01-3 3H9a3 3 0 01-3-3V9H5a1 1 0 110-2h3V6a3 3 0 013-3h2a3 3 0 013 3v1zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 00-1 1v1h4zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9zm-7 3a1 1 0 012 0v4a1 1 0 01-2 0v-4zm4 0a1 1 0 012 0v4a1 1 0 01-2 0v-4z" fill-rule="nonzero"/></svg>',
+    'resize-handle': '<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 119 2l-7 7A.5.5 0 111 8l7-7zM8.1 5.1A.5.5 0 119 6l-3 3A.5.5 0 115 8l3-3z"/></g></svg>',
+    'resize': '<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-6a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3A1 1 0 014 11V5z" fill-rule="evenodd"/></svg>',
+    'restore-draft': '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1z"/><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></g></svg>',
+    'rotate-left': '<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></svg>',
+    'rotate-right': '<svg width="24" height="24"><path d="M20 8V5a1 1 0 012 0v6c0 .6-.4 1-1 1h-6a1 1 0 010-2h4.3L16 7A7.2 7.2 0 007.7 6a7 7 0 003 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 011.4 1.5A9.2 9.2 0 012.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8z" fill-rule="nonzero"/></svg>',
+    'rtl': '<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 014.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L8 5zm12 11.2a1 1 0 11-1 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 111 1.6L18.4 15l1.8 1.2z" fill-rule="evenodd"/></svg>',
+    'save': '<svg width="24" height="24"><path d="M5 16h14a2 2 0 012 2v2a2 2 0 01-2 2H5a2 2 0 01-2-2v-2c0-1.1.9-2 2-2zm0 2v2h14v-2H5zm10 0h2v2h-2v-2zm-4-6.4L8.7 9.3a1 1 0 10-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 10-1.4-1.4L13 11.6V4a1 1 0 00-2 0v7.6z" fill-rule="nonzero"/></svg>',
+    'search': '<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12z" fill-rule="nonzero"/></svg>',
+    'select-all': '<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 00-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2a2 2 0 00-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8a2 2 0 002-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z" fill-rule="nonzero"/></svg>',
+    'selected': '<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm3.6 10.9L7 12.3a.7.7 0 00-1 1L9.6 17 18 8.6a.7.7 0 000-1 .7.7 0 00-1 0l-7.4 7.3z"/></svg>',
+    'settings': '<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V8H5a1 1 0 110-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6zM8 8h2V6H8v2zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V13H5a1 1 0 010-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6zM14 13h2v-2h-2v2zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V18H5a1 1 0 010-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6zM8 18h2v-2H8v2z" fill-rule="evenodd"/></svg>',
+    'sharpen': '<svg width="24" height="24"><path d="M16 6l4 4-8 9-8-9 4-4h8zm-4 10.2l5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2z" fill-rule="evenodd"/></svg>',
+    'sort-asc': '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M4 8h5a1 1 0 110 2H4a1 1 0 110-2zm0 8h8a1 1 0 010 2H4a1 1 0 010-2zm0-4h7a1 1 0 010 2H4a1 1 0 010-2z"/><path fill-rule="nonzero" d="M16 8.4l-2.3 2.3a1 1 0 01-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 11-1.4 1.4L18 8.4V18a1 1 0 01-2 0V8.4z"/></g></svg>',
+    'sort-dsc': '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M4 16h5a1 1 0 000-2H4a1 1 0 000 2zm0-8h8a1 1 0 000-2H4a1 1 0 100 2zm0 4h7a1 1 0 000-2H4a1 1 0 000 2z"/><path fill-rule="nonzero" d="M16 15.6l-2.3-2.3a1 1 0 00-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 00-1.4-1.4L18 15.6V6a1 1 0 00-2 0v9.6z"/></g></svg>',
+    'sourcecode': '<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 010-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7zM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 00-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7z"/></g></svg>',
+    'spell-check': '<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6zm0-3v2h2V5H6zm13 0h-3v5h3v1h-3a1 1 0 01-.7-.3 1 1 0 01-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1zm-5 1.5l-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5zM13 10V8h-2v2h2zm0-3V5h-2v2h2zm3 5l1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12z" fill-rule="evenodd"/></svg>',
+    'strike-through': '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 017 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1z"/><path d="M5 11h14a1 1 0 010 2H5a1 1 0 010-2z" fill-rule="nonzero"/></g></svg>',
+    'subscript': '<svg width="24" height="24"><path d="M10.4 10l4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10zM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 00-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 01-1.3 1.3l-.6.6h2.6V19z" fill-rule="nonzero"/></svg>',
+    'superscript': '<svg width="24" height="24"><path d="M15 9.4L10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11z" fill-rule="nonzero"/></svg>',
+    'table-cell-properties': '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9H5v5h6v-5zm8 0h-6v5h6v-5zm-8-7H5v5h6V6z"/></svg>',
+    'table-cell-select-all': '<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z" opacity=".2"/></g></svg>',
+    'table-cell-select-inner': '<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z" opacity=".2"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z"/></g></svg>',
+    'table-delete-column': '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2zm.3.5l1 1.2-3 2.3 3 2.3-1 1.2L12 13l-3.3 2.6-1-1.2 3-2.3-3-2.3 1-1.2L12 11l3.3-2.5z"/></svg>',
+    'table-delete-row': '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6zm-4.7 1.8l1.2 1L13 12l2.6 3.3-1.2 1-2.3-3-2.3 3-1.2-1L11 12 8.5 8.7l1.2-1 2.3 3 2.3-3z"/></svg>',
+    'table-delete-table': '<svg width="24" height="24"><g fill-rule="nonzero"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 6v12h14V6H5z"/><path d="M14.4 8.6l1 1-2.3 2.4 2.3 2.4-1 1-2.4-2.3-2.4 2.3-1-1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z"/></g></svg>',
+    'table-insert-column-after': '<svg width="24" height="24"><path fill-rule="nonzero" d="M20 4c.6 0 1 .4 1 1v2a1 1 0 01-2 0V6h-8v12h8v-1a1 1 0 012 0v2c0 .5-.4 1-.9 1H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h15zM9 13H5v5h4v-5zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H17v2a1 1 0 01-2 .1V13h-2a1 1 0 01-.1-2H15V9c0-.6.4-1 1-1zM9 6H5v5h4V6z"/></svg>',
+    'table-insert-column-before': '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H4a1 1 0 01-1-1v-2a1 1 0 012 0v1h8V6H5v1a1 1 0 11-2 0V5c0-.6.4-1 1-1h15zm0 9h-4v5h4v-5zM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H9v2a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H7V9c0-.6.4-1 1-1zm11-2h-4v5h4V6z"/></svg>',
+    'table-insert-row-above': '<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4a1 1 0 110 2H5v6h14V6h-1a1 1 0 010-2h2c.6 0 1 .4 1 1v13a2 2 0 01-2 2H5a2 2 0 01-2-2V5c0-.6.4-1 1-1h2zm5 10H5v4h6v-4zm8 0h-6v4h6v-4zM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 010 2h-2v2a1 1 0 01-2 .1V8H9a1 1 0 010-2h2V4c0-.6.4-1 1-1z"/></svg>',
+    'table-insert-row-after': '<svg width="24" height="24"><path fill-rule="nonzero" d="M12 13c.5 0 1 .4 1 .9V16h2a1 1 0 01.1 2H13v2a1 1 0 01-2 .1V18H9a1 1 0 01-.1-2H11v-2c0-.6.4-1 1-1zm6 7a1 1 0 010-2h1v-6H5v6h1a1 1 0 010 2H4a1 1 0 01-1-1V6c0-1.1.9-2 2-2h14a2 2 0 012 2v13c0 .5-.4 1-.9 1H18zM11 6H5v4h6V6zm8 0h-6v4h6V6z"/></svg>',
+    'table-left-header': '<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 9h-4v5h4v-5zm-6 0H9v5h4v-5zm0-7H9v5h4V6zm6 0h-4v5h4V6z"/></svg>',
+    'table-merge-cells': '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15.5V18h3v-2.5H5zm14-5h-9V18h9v-7.5zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6zm-8 7.5h3v-3H5v3z"/></svg>',
+    'table-row-properties': '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15v3h6v-3H5zm14 0h-6v3h6v-3zm0-9h-6v3h6V6zM5 9h6V6H5v3z"/></svg>',
+    'table-split-cells': '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM8 15.5H5V18h3v-2.5zm11-5h-9V18h9v-7.5zm-2.5 1l1 1-2 2 2 2-1 1-2-2-2 2-1-1 2-2-2-2 1-1 2 2 2-2zm-8.5-1H5v3h3v-3zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6z"/></svg>',
+    'table-top-header': '<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 11H5v3h6v-3zm8 0h-6v3h6v-3zm0-5h-6v3h6v-3zM5 13h6v-3H5v3z"/></svg>',
+    'table': '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 14v4h6v-4H5zm14 0h-6v4h6v-4zm0-6h-6v4h6V8zM5 12h6V8H5v4z"/></svg>',
+    'template': '<svg width="24" height="24"><path d="M19 19v-1H5v1h14zM9 16v-4a5 5 0 116 0v4h4a2 2 0 012 2v3H3v-3c0-1.1.9-2 2-2h4zm4 0v-5l.8-.6a3 3 0 10-3.6 0l.8.6v5h2z" fill-rule="nonzero"/></svg>',
+    'temporary-placeholder': '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 111 0V6H15v1.6a8 8 0 11-6 0zm-2.6 5.3a.5.5 0 00.3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 013.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 00-4.1 3.7z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',
+    'text-color': '<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 01-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 01-.5.6h-.8a.5.5 0 01-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 00.5.6h1.6a.5.5 0 00.5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z"/></g></svg>',
+    'toc': '<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',
+    'translate': '<svg width="24" height="24"><path d="M12.7 14.3l-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 010-1l3.1-3A12.4 12.4 0 016.7 9H8a10.1 10.1 0 001.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 110-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 01-1 2.4 13.5 13.5 0 01-1.7 2.3l1.9 1.8zm4.3-3l2.7 7.3a.5.5 0 01-.4.7 1 1 0 01-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 01-1 .7.5.5 0 01-.4-.7l2.7-7.4a1 1 0 012 0zm-2.2 4.4h2.4L16 12.5l-1.2 3.2z" fill-rule="evenodd"/></svg>',
+    'underline': '<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 01-.4 1.8l-1 1.4a5.3 5.3 0 01-5.5 1 5 5 0 01-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 01-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 002.2.8 3.4 3.4 0 002.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1zM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',
+    'undo': '<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 01-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 11-1.4 1.4l-5-5a1 1 0 010-1.4l5-5a1 1 0 011.4 1.4L6.4 8z" fill-rule="nonzero"/></svg>',
+    'unlink': '<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2 2a2 2 0 102.6 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2.1-2a2 2 0 10-2.7-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2zM7.6 6.3a.8.8 0 01-1 1.1L3.3 4.2a.7.7 0 111-1l3.2 3.1zM5.1 8.6a.8.8 0 010 1.5H3a.8.8 0 010-1.5H5zm5-3.5a.8.8 0 01-1.5 0V3a.8.8 0 011.5 0V5zm6 11.8a.8.8 0 011-1l3.2 3.2a.8.8 0 01-1 1L16 17zm-2.2 2a.8.8 0 011.5 0V21a.8.8 0 01-1.5 0V19zm5-3.5a.7.7 0 110-1.5H21a.8.8 0 010 1.5H19z" fill-rule="nonzero"/></svg>',
+    'unlock': '<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 00-.3-.7A1 1 0 0016 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2z" fill-rule="evenodd"/></svg>',
+    'unordered-list': '<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1z" fill-rule="evenodd"/></svg>',
+    'unselected': '<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm0 1a1 1 0 00-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6z"/></svg>',
+    'upload': '<svg width="24" height="24"><path d="M18 19v-2a1 1 0 012 0v3c0 .6-.4 1-1 1H5a1 1 0 01-1-1v-3a1 1 0 012 0v2h12zM11 6.4L8.7 8.7a1 1 0 01-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 11-1.4 1.4L13 6.4V16a1 1 0 01-2 0V6.4z" fill-rule="nonzero"/></svg>',
+    'user': '<svg width="24" height="24"><path d="M12 24a12 12 0 110-24 12 12 0 010 24zm-8.7-5.3a11 11 0 0017.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7zM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13z" fill-rule="nonzero"/></svg>',
+    'visualblocks': '<svg width="24" height="24"><path d="M9 19v2H7v-2h2zm-4 0v2a2 2 0 01-2-2h2zm8 0v2h-2v-2h2zm8 0a2 2 0 01-2 2v-2h2zm-4 0v2h-2v-2h2zM15 7a1 1 0 010 2v7a1 1 0 01-2 0V9h-1v7a1 1 0 01-2 0v-4a2.5 2.5 0 01-.2-5H15zM5 15v2H3v-2h2zm16 0v2h-2v-2h2zM5 11v2H3v-2h2zm16 0v2h-2v-2h2zM5 7v2H3V7h2zm16 0v2h-2V7h2zM5 3v2H3c0-1.1.9-2 2-2zm8 0v2h-2V3h2zm6 0a2 2 0 012 2h-2V3zM9 3v2H7V3h2zm8 0v2h-2V3h2z" fill-rule="evenodd"/></svg>',
+    'visualchars': '<svg width="24" height="24"><path d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z" fill-rule="evenodd"/></svg>',
+    'warning': '<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6zM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3zm.7-3l.3-4a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7l.3 4h1.4z" fill-rule="evenodd"/></svg>',
+    'zoom-in': '<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-1-9a1 1 0 012 0v6a1 1 0 01-2 0V8zm-2 4a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>',
+    'zoom-out': '<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-3-5a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>',
+  }
+});

--- /dev/null
+++ b/tinymce/5/js/tinymce/icons/default/icons.min.js
@@ -1,1 +1,1 @@
-
+tinymce.IconManager.add("default",{icons:{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2c0-1.1.9-2 2-2zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 01-1-1v-5c0-.6-.4-1-1-1a1 1 0 00-1 1v5c0 .6-.4 1-1 1a1 1 0 01-1-1V9H4a1 1 0 110-2h16c.6 0 1 .4 1 1s-.4 1-1 1z" fill-rule="nonzero"/></svg>',"action-next":'<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 00-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 10-1.4-1.4L12 13.6 5.7 7.3z"/></svg>',"action-prev":'<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 001.4-1.4L12 6.6l-7.7 7.7a1 1 0 001.4 1.4L12 9.4l6.3 6.3z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-justify":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-left":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5L13 7H5a1 1 0 110-2h9.2zm4 0h.8a1 1 0 010 2h-2l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h6.8zm4 0H19a1 1 0 010 2h-4.4l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h4.4zm4 0H19a1 1 0 010 2h-6.8l1.2-2zM7 17l-1.2 2H5a1 1 0 010-2h2zm4 0h8a1 1 0 010 2H9.8l1.2-2zm5.2-13.5l1.3.7-9.7 16.3-1.3-.7 9.7-16.3z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="M5.6 13l12 6a1 1 0 001.4-1V6a1 1 0 00-1.4-.9l-12 6a1 1 0 000 1.8z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="M18.5 13l-12 6A1 1 0 015 18V6a1 1 0 011.4-.9l12 6a1 1 0 010 1.8z" fill-rule="evenodd"/></svg>',bold:'<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 01-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4z" fill-rule="evenodd"/></svg>',bookmark:'<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 00-1 1z" fill-rule="nonzero"/></svg>',"border-width":'<svg width="24" height="24"><path d="M5 14.8h14a1 1 0 010 2H5a1 1 0 010-2zm-.5 3.7h15c.3 0 .5.2.5.5s-.2.5-.5.5h-15a.5.5 0 110-1zm.5-8.3h14c.6 0 1 .4 1 1v1c0 .5-.4 1-1 1H5a1 1 0 01-1-1v-1c0-.6.4-1 1-1zm0-5.7h14c.6 0 1 .4 1 1v2c0 .6-.4 1-1 1H5a1 1 0 01-1-1v-2c0-.6.4-1 1-1z" fill-rule="evenodd"/></svg>',brightness:'<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3zm0-10a1 1 0 01-.7-.3A1 1 0 0111 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3h-1a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1zM7 12c0 .3-.1.5-.3.7a1 1 0 01-.7.3H5a1 1 0 01-.7-.3A1 1 0 014 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7zm10 3.5l.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 01-.8.3 1 1 0 01-.6-.3l-.8-.7a1 1 0 01-.3-.8c0-.2.1-.5.3-.7a1 1 0 011.4 0zm-10-7l-.7-.8a1 1 0 01-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.8-.3zm10 0a1 1 0 01-.8.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 010 1.4l-.8.8a1 1 0 01-.6.3 1 1 0 01-.8-.3 1 1 0 01-.3-.8c0-.2.1-.5.3-.6l.7-.8zM12 8a4 4 0 013.7 2.4 4 4 0 010 3.2A4 4 0 0112 16a4 4 0 01-3.7-2.4 4 4 0 010-3.2A4 4 0 0112 8zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7z" fill-rule="evenodd"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9.4l-2.3 2.3a1 1 0 11-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 01-1.4 1.4L13 13.4V20a1 1 0 01-2 0v-6.6z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 110 14.8 7.4 7.4 0 010-14.8zM12 3a9 9 0 100 18 9 9 0 000-18zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7z" fill-rule="nonzero"/></svg>',"change-case":'<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 01-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 01-1 .7h-.2a.7.7 0 01-.7-1l4-12a1 1 0 012 0l4 12a.7.7 0 01-.8 1h-.2a1 1 0 01-1-.7l-.8-2.6zm-.3-1.5l-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1zm4.8-6.8V10H7.7V5.8h-1v-1h2zM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1zM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2v-.1-.2l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 01-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 00-.5-.1 1 1 0 00-.4 0l-.3.4h-1zm2.3.8h-.2l-.2.1-.4.1a1 1 0 00-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 001.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 00-.6-.3l-.6.3-.2.8zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 00-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 01-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 01-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1z" fill-rule="evenodd"/></svg>',"checklist-rtl":'<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checklist:'<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8a1 1 0 010 2h-8a1 1 0 010-2zM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checkmark:'<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 011.6 1.2l-8 12a1 1 0 01-1.5.1l-5-5a1 1 0 111.4-1.4l4.1 4.1 7.4-11z" fill-rule="nonzero"/></svg>',"chevron-down":'<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 010-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8z" fill-rule="nonzero"/></svg>',"chevron-left":'<svg width="10" height="10"><path d="M7.8 1.3L4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 010-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1z" fill-rule="nonzero"/></svg>',"chevron-right":'<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 010-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 010-1.1L6 5 2.2 1.3z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8L5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 010-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0z" fill-rule="nonzero"/></svg>',close:'<svg width="24" height="24"><path d="M17.3 8.2L13.4 12l3.9 3.8a1 1 0 01-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 01-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 011.5-1.5l3.8 3.9 3.8-3.9a1 1 0 011.5 1.5z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 01-.8 2 2.8 2.8 0 01.8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 01-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 01.8-2 2.8 2.8 0 01-.8-2zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2zM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 01-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 01-.5-.5V17a3 3 0 001-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5z" fill-rule="evenodd"/></svg>',"color-levels":'<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0118 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 01-3.7 3 5.7 5.7 0 01-3.2 0A5.9 5.9 0 017.6 18a6.2 6.2 0 01-1.4-2.6 6.7 6.7 0 010-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 012.3-4A20 20 0 0112 4a26.4 26.4 0 013.2 3.4 18.2 18.2 0 012.3 4zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 00-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 01-1.3 3 5.3 5.3 0 01-2.3 1.5 4.9 4.9 0 01-2 .1 4.3 4.3 0 002.4.8 4 4 0 002-.6 4 4 0 001.5-1.5z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 000 18 1.5 1.5 0 001.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 005-5c0-4.4-4-8-9-8zm-5.5 9a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3-4a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm5 0a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3 4a1.5 1.5 0 110-3 1.5 1.5 0 010 3z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3L3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/><path d="M13 10h2a1 1 0 010 2h-2v2a1 1 0 01-2 0v-2H9a1 1 0 010-2h2V8a1 1 0 012 0v2z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/></svg>',contrast:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-6 8a6 6 0 006 6V6a6 6 0 00-6 6z" fill-rule="evenodd"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 00-2 2v11h2V5h10V3zm1 4a2 2 0 012 2v10a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7zm0 12V9h-7v10h7z" fill-rule="nonzero"/></svg>',crop:'<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 01-1-1v-2H7V9H5a1 1 0 110-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3zM9 9v5l5-5H9zm1 6h5v-5l-5 5z" fill-rule="evenodd"/></svg>',cut:'<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 01-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 018.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 010-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 010 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8zm-8.5 2.2l.1-.4v-.3-.4a1 1 0 00-.2-.5 1 1 0 00-.4-.2 1.6 1.6 0 00-.8 0 2.6 2.6 0 00-.8.3 2.5 2.5 0 00-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 00.8-.3 2.8 2.8 0 001-1zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4zm5.4 4l.2-.5v-.4-.3a2.6 2.6 0 00-.3-.8 2.4 2.4 0 00-.7-.7 2.5 2.5 0 00-.8-.3 1.5 1.5 0 00-.8 0 1 1 0 00-.4.2 1 1 0 00-.2.5 1.5 1.5 0 000 .7v.4l.3.4.3.4a2.8 2.8 0 00.8.5l.4.1h.7l.5-.2z" fill-rule="evenodd"/></svg>',"document-properties":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',drag:'<svg width="24" height="24"><path d="M13 5h2v2h-2V5zm0 4h2v2h-2V9zM9 9h2v2H9V9zm4 4h2v2h-2v-2zm-4 0h2v2H9v-2zm0 4h2v2H9v-2zm4 0h2v2h-2v-2zM9 5h2v2H9V5z" fill-rule="evenodd"/></svg>',duplicate:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10zm3 8h-2V9h-7v10h9a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7a2 2 0 012 2v2z"/><path d="M17 14h1a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1h-1a1 1 0 010-2h1v-1a1 1 0 012 0v1z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19.8 8.8l-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5zm-2-.2l1-.9v-.3l-2.2-2.2a.3.3 0 00-.3 0l-1 1L18 8.5zm-1 1l-2.5-2.4-6 6 2.5 2.5 6-6zm-7 7.1l-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 00-2-2H7v2h11v9zM6 17h15a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1H6a2 2 0 01-2-2V7H3a1 1 0 110-2h1V4a1 1 0 112 0v13zm3-5.3l1.3 2 3-4.7 3.7 6H7l2-3.3z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0119 6zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 008 19h3zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 00-4 4.5h2.2zm-3.4 0a12 12 0 012.8-4 12 12 0 00-5 4h2.2z" fill-rule="nonzero"/></svg>',embed:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm4.8 2.6l5.6 4a.5.5 0 010 .8l-5.6 4A.5.5 0 019 16V8a.5.5 0 01.8-.4z" fill-rule="nonzero"/></svg>',emoji:'<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5zM12 4a8 8 0 100 16 8 8 0 000-16zm0 14.5a6.5 6.5 0 110-13 6.5 6.5 0 010 13z" fill-rule="nonzero"/></svg>',fill:'<svg width="24" height="26"><path d="M16.6 12l-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 002.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2zM5.2 13L10 8.2l4.8 4.8H5.2zM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 002-2c0-1.3-2-3.5-2-3.5z" fill-rule="nonzero"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2zm4-8h2V9h-2v2zM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 00-2 2zm14-2v2h2a2 2 0 00-2-2zm-7 16h2V3h-2v18zm7-6h2v-2h-2v2zm-4-8h2V5h-2v2zm4 12a2 2 0 002-2h-2v2z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5zm8 4v2h2v-2h-2zm4-14H7a2 2 0 00-2 2v3h2V6h10v3h2V6a2 2 0 00-2-2zm2 14h-2v2a2 2 0 002-2zM3 11v2h18v-2H3zm6 7v2h2v-2H9zm8-4v2h2v-2h-2zM5 18c0 1.1.9 2 2 2v-2H5z" fill-rule="nonzero"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 00-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3z" fill-rule="nonzero"/></svg>',format:'<svg width="24" height="24"><path fill-rule="evenodd" d="M17 5a1 1 0 010 2h-4v11a1 1 0 01-2 0V7H7a1 1 0 110-2h10z"/></svg>',fullscreen:'<svg width="24" height="24"><path d="M15.3 10l-1.2-1.3 2.9-3h-2.3a.9.9 0 110-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 11-1.8 0V7l-2.9 3zm0 4l3 3v-2.3a.9.9 0 111.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 110-1.8H17l-3-2.9 1.3-1.2zM10 15.4l-2.9 3h2.3a.9.9 0 110 1.7H5a.9.9 0 01-.9-.9v-4.4a.9.9 0 111.8 0V17l2.9-3 1.2 1.3zM8.7 10L5.7 7v2.3a.9.9 0 01-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 010 1.8H7l3 2.9-1.3 1.2z" fill-rule="nonzero"/></svg>',gallery:'<svg width="24" height="24"><path fill-rule="nonzero" d="M5 15.7l2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7zM5 18V19h3l1.8-1.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 01-1-1V7c0-.6.4-1 1-1zm6 7a2 2 0 110-4 2 2 0 010 4zM4.5 4h15a.5.5 0 110 1h-15a.5.5 0 010-1zm2-2h11a.5.5 0 110 1h-11a.5.5 0 010-1z"/></svg>',gamma:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 00-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 01.6.5l.1.3a8.5 8.5 0 01.3.6l1.9 4.6 2-5.2a1 1 0 011-.6.5.5 0 01.5.6L13 14v2.8a.7.7 0 01-1.4 0z" fill-rule="nonzero"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 00-6 9 6.3 6.3 0 001.4 2l1 1a6.3 6.3 0 003.6 1 6.5 6.5 0 006-9 6.3 6.3 0 00-1.4-2l-1-1a6.3 6.3 0 00-3.6-1zM12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4z"/><path d="M9.6 9.7a.7.7 0 01-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 00-.8.8.8.8 0 01-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',"highlight-bg-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 012.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',home:'<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',"horizontal-rule":'<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',"image-options":'<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="M5 15.7l3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7zM5 18V19h3l2.8-2.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm6 8a2 2 0 100-4 2 2 0 000 4z" fill-rule="nonzero"/></svg>',indent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-1 3v2h2V7h-2zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4z" fill-rule="evenodd"/></svg>',"insert-character":'<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 001.8-2.9 6.3 6.3 0 00-.1-4.1 5.8 5.8 0 00-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 00-3.9 1.8 6.3 6.3 0 00-1.3 6 6.2 6.2 0 001.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 014 11c0-1 .2-1.9.6-2.7A7 7 0 016.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 015.7 2 7 7 0 011.7 2.3 6 6 0 01.2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 01-3.6 2.5v.5z" fill-rule="evenodd"/></svg>',"insert-time":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 100-14 7 7 0 000 14zm0 2a9 9 0 110-18 9 9 0 010 18z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 00-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></svg>',invert:'<svg width="24" height="24"><path d="M18 19.3L16.5 18a5.8 5.8 0 01-3.1 1.9 6.1 6.1 0 01-5.5-1.6A5.8 5.8 0 016 14v-.3l.1-1.2A13.9 13.9 0 017.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 00.2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 00-3-4.2L12 6a26.1 26.1 0 00-2.2 2.5l-1-1a20.9 20.9 0 012.9-3.3L12 4l1 .8a22.2 22.2 0 014 5.4c.6 1.2 1 2.4 1 3.6z" fill-rule="evenodd"/></svg>',italic:'<svg width="24" height="24"><path d="M16.7 4.7l-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8z" fill-rule="evenodd"/></svg>',line:'<svg width="24" height="24"><path d="M15 9l-8 8H4v-3l8-8 3 3zm1-1l-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1zM4 18h16v2H4v-2z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2.1 2a2 2 0 102.7 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2-2a2 2 0 10-2.6-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2z" fill-rule="nonzero"/></svg>',"list-bull-circle":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 26a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 36a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-default":'<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-square":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8l-1.6 1v-1.1l1.6-1h1.2V17zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6zM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3zM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4zM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3zM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM37.1 34.6L34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3zM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33zm0 10v-1.2h-1.3V26H33zm0 10v-1.2h-1.3V36H33z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',"list-num-lower-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15zm0 10v-1.2h1.3V26H15zm0 10v-1.2h1.3V36H15z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',"list-num-upper-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M39.3 17l-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3zm-1.6-4.7l-.7 2.3h1.6l-.8-2.3zM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26zM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M12.6 17l-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3zM11 12.3l-.7 2.3h1.6l-.8-2.3zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3zm0 10v-1.2H33V27h-1.3zm0 10v-1.2H33V37h-1.3z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15zm0 10v-1.2h1.3V27H15zm0 10v-1.2h1.3V37H15z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3zM10 8v3h4V8a1 1 0 00-.3-.7A1 1 0 0013 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 017.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L11 5zM4.4 16.2L6.2 15l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="M15 13l2-2v8H5V7h8l-2 2H7v8h8v-4zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 110-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 01-1-1v-3zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1z" fill-rule="evenodd"/></svg>',notice:'<svg width="24" height="24"><path d="M17.8 9.8L15.4 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7l2.3 5.8zm0 0l2.2 5.7-2.3-5.8zM13 17v-2h-2v2h2zm0-4V7h-2v6h2z" fill-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 110-2zm13-1v3.5a.5.5 0 11-1 0V5h-.5a.5.5 0 110-1H19zm-1 8.8l.2.2h1.3a.5.5 0 110 1h-1.6a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2h-1.3a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 010-1h1.2a.3.3 0 100-.6h-1.3a.4.4 0 110-.8h1.3a.3.3 0 000-.6h-1.2a.5.5 0 110-1H19c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',"ordered-list":'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 110-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 01-.5-.5V5h-.5a.5.5 0 010-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2H4.5a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 010-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 110-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 110-1H6c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4L1 13l6.4 6.5 6.5-6.5-6.5-6.5zM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7zM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 010-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 11-4.3 16.9l1.5-1.5A7 7 0 1013 6h-1z" fill-rule="nonzero"/></svg>',outdent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm1.6-3.8a1 1 0 01-1.2 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 011.2 1.6L6.8 12l1.8 1.2z" fill-rule="evenodd"/></svg>',"page-break":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1zM6 22a1 1 0 01-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 01-1-1v-5H7v5c0 .6-.4 1-1 1z"/></g></svg>',paragraph:'<svg width="24" height="24"><path fill-rule="evenodd" d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z"/></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2z" fill-rule="nonzero"/></svg>',paste:'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1z" fill-rule="nonzero"/></svg>',"permanent-pen":'<svg width="24" height="24"><path d="M10.5 17.5L8 20H3v-3l3.5-3.5a2 2 0 010-3L14 3l1 1-7.3 7.3a1 1 0 000 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 01-2.8 0l-.1-.1z" fill-rule="nonzero"/></svg>',plus:'<svg width="24" height="24"><path d="M12 4c.5 0 1 .4 1 .9V11h6a1 1 0 01.1 2H13v6a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H11V5c0-.6.4-1 1-1z"/></svg>',preferences:'<svg width="24" height="24"><path d="M20.1 13.5l-1.9.2a5.8 5.8 0 01-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 01-1.4 0l-1.5-1.2a6.2 6.2 0 01-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 01-1-.9l-.2-1.9a5.8 5.8 0 01-1.5-.6l-1.5 1.2a1 1 0 01-1.4 0l-.7-.7a1 1 0 010-1.4l1.2-1.5a6.2 6.2 0 01-.6-1.5l-1.9-.2a1 1 0 01-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 01.6-1.5L5.2 7.3a1 1 0 010-1.4l.7-.7a1 1 0 011.4 0l1.5 1.2a6.2 6.2 0 011.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 011.5.6l1.5-1.2a1 1 0 011.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 01.6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1zM12 15a3 3 0 100-6 3 3 0 000 6z" fill-rule="evenodd"/></svg>',preview:'<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 002.1-2.8 15.7 15.7 0 00-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 00-6.7 3.2A16.2 16.2 0 003.2 12c0 .2.2.3.3.5zm-2.4-1l.7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 012.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 01-2.8-3.7 1 1 0 010-1zm12-3.3a2 2 0 102.7 2.6 4 4 0 11-2.6-2.6z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 00-3 3v6h2v3h14v-3h2v-6a3 3 0 00-3-3zm-1 10H7v-4h10v4zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm.5-8H6v2h12V5z" fill-rule="nonzero"/></svg>',quote:'<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3z" fill-rule="nonzero"/></svg>',redo:'<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 11-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 111.4-1.4l5 5a1 1 0 010 1.4l-5 5a1 1 0 01-1.4-1.4l3.3-3.3z" fill-rule="nonzero"/></svg>',reload:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5 22.1l-1.2-4.7v-.2a1 1 0 011-1l5 .4a1 1 0 11-.2 2l-2.2-.2a7.8 7.8 0 008.4.2 7.5 7.5 0 003.5-6.4 1 1 0 112 0 9.5 9.5 0 01-4.5 8 9.9 9.9 0 01-10.2 0l.4 1.4a1 1 0 11-2 .5zM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 00-9.5-1 7.5 7.5 0 00-3.6 7 1 1 0 01-2 0 9.5 9.5 0 014.5-8.6 10 10 0 0110.9.3l-.3-1a1 1 0 012-.5l1.1 4.8a1 1 0 01-1 1.2l-5-.4a1 1 0 01-.9-1z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 010 .2l-2.6 10a1 1 0 01-1 .8h-.2a.8.8 0 01-.8-1l2.6-10H8a1 1 0 110-2h9a1 1 0 010 2h-3.8zM5 18h7a1 1 0 010 2H5a1 1 0 010-2zm13 1.5L16.5 18 15 19.5a.7.7 0 01-1-1l1.5-1.5-1.5-1.5a.7.7 0 011-1l1.5 1.5 1.5-1.5a.7.7 0 011 1L17.5 17l1.5 1.5a.7.7 0 01-1 1z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 010 2h-1v9a3 3 0 01-3 3H9a3 3 0 01-3-3V9H5a1 1 0 110-2h3V6a3 3 0 013-3h2a3 3 0 013 3v1zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 00-1 1v1h4zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9zm-7 3a1 1 0 012 0v4a1 1 0 01-2 0v-4zm4 0a1 1 0 012 0v4a1 1 0 01-2 0v-4z" fill-rule="nonzero"/></svg>',"resize-handle":'<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 119 2l-7 7A.5.5 0 111 8l7-7zM8.1 5.1A.5.5 0 119 6l-3 3A.5.5 0 115 8l3-3z"/></g></svg>',resize:'<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-6a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3A1 1 0 014 11V5z" fill-rule="evenodd"/></svg>',"restore-draft":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1z"/><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 012 0v6c0 .6-.4 1-1 1h-6a1 1 0 010-2h4.3L16 7A7.2 7.2 0 007.7 6a7 7 0 003 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 011.4 1.5A9.2 9.2 0 012.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8z" fill-rule="nonzero"/></svg>',rtl:'<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 014.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L8 5zm12 11.2a1 1 0 11-1 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 111 1.6L18.4 15l1.8 1.2z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 012 2v2a2 2 0 01-2 2H5a2 2 0 01-2-2v-2c0-1.1.9-2 2-2zm0 2v2h14v-2H5zm10 0h2v2h-2v-2zm-4-6.4L8.7 9.3a1 1 0 10-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 10-1.4-1.4L13 11.6V4a1 1 0 00-2 0v7.6z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 00-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2a2 2 0 00-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8a2 2 0 002-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z" fill-rule="nonzero"/></svg>',selected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm3.6 10.9L7 12.3a.7.7 0 00-1 1L9.6 17 18 8.6a.7.7 0 000-1 .7.7 0 00-1 0l-7.4 7.3z"/></svg>',settings:'<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V8H5a1 1 0 110-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6zM8 8h2V6H8v2zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V13H5a1 1 0 010-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6zM14 13h2v-2h-2v2zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V18H5a1 1 0 010-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6zM8 18h2v-2H8v2z" fill-rule="evenodd"/></svg>',sharpen:'<svg width="24" height="24"><path d="M16 6l4 4-8 9-8-9 4-4h8zm-4 10.2l5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2z" fill-rule="evenodd"/></svg>',"sort-asc":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M4 8h5a1 1 0 110 2H4a1 1 0 110-2zm0 8h8a1 1 0 010 2H4a1 1 0 010-2zm0-4h7a1 1 0 010 2H4a1 1 0 010-2z"/><path fill-rule="nonzero" d="M16 8.4l-2.3 2.3a1 1 0 01-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 11-1.4 1.4L18 8.4V18a1 1 0 01-2 0V8.4z"/></g></svg>',"sort-dsc":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M4 16h5a1 1 0 000-2H4a1 1 0 000 2zm0-8h8a1 1 0 000-2H4a1 1 0 100 2zm0 4h7a1 1 0 000-2H4a1 1 0 000 2z"/><path fill-rule="nonzero" d="M16 15.6l-2.3-2.3a1 1 0 00-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 00-1.4-1.4L18 15.6V6a1 1 0 00-2 0v9.6z"/></g></svg>',sourcecode:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 010-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7zM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 00-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7z"/></g></svg>',"spell-check":'<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6zm0-3v2h2V5H6zm13 0h-3v5h3v1h-3a1 1 0 01-.7-.3 1 1 0 01-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1zm-5 1.5l-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5zM13 10V8h-2v2h2zm0-3V5h-2v2h2zm3 5l1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 017 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1z"/><path d="M5 11h14a1 1 0 010 2H5a1 1 0 010-2z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="M10.4 10l4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10zM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 00-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 01-1.3 1.3l-.6.6h2.6V19z" fill-rule="nonzero"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4L10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11z" fill-rule="nonzero"/></svg>',"table-cell-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9H5v5h6v-5zm8 0h-6v5h6v-5zm-8-7H5v5h6V6z"/></svg>',"table-cell-select-all":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z" opacity=".2"/></g></svg>',"table-cell-select-inner":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z" opacity=".2"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2zm.3.5l1 1.2-3 2.3 3 2.3-1 1.2L12 13l-3.3 2.6-1-1.2 3-2.3-3-2.3 1-1.2L12 11l3.3-2.5z"/></svg>',"table-delete-row":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6zm-4.7 1.8l1.2 1L13 12l2.6 3.3-1.2 1-2.3-3-2.3 3-1.2-1L11 12 8.5 8.7l1.2-1 2.3 3 2.3-3z"/></svg>',"table-delete-table":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 6v12h14V6H5z"/><path d="M14.4 8.6l1 1-2.3 2.4 2.3 2.4-1 1-2.4-2.3-2.4 2.3-1-1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z"/></g></svg>',"table-insert-column-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M20 4c.6 0 1 .4 1 1v2a1 1 0 01-2 0V6h-8v12h8v-1a1 1 0 012 0v2c0 .5-.4 1-.9 1H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h15zM9 13H5v5h4v-5zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H17v2a1 1 0 01-2 .1V13h-2a1 1 0 01-.1-2H15V9c0-.6.4-1 1-1zM9 6H5v5h4V6z"/></svg>',"table-insert-column-before":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H4a1 1 0 01-1-1v-2a1 1 0 012 0v1h8V6H5v1a1 1 0 11-2 0V5c0-.6.4-1 1-1h15zm0 9h-4v5h4v-5zM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H9v2a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H7V9c0-.6.4-1 1-1zm11-2h-4v5h4V6z"/></svg>',"table-insert-row-above":'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4a1 1 0 110 2H5v6h14V6h-1a1 1 0 010-2h2c.6 0 1 .4 1 1v13a2 2 0 01-2 2H5a2 2 0 01-2-2V5c0-.6.4-1 1-1h2zm5 10H5v4h6v-4zm8 0h-6v4h6v-4zM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 010 2h-2v2a1 1 0 01-2 .1V8H9a1 1 0 010-2h2V4c0-.6.4-1 1-1z"/></svg>',"table-insert-row-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M12 13c.5 0 1 .4 1 .9V16h2a1 1 0 01.1 2H13v2a1 1 0 01-2 .1V18H9a1 1 0 01-.1-2H11v-2c0-.6.4-1 1-1zm6 7a1 1 0 010-2h1v-6H5v6h1a1 1 0 010 2H4a1 1 0 01-1-1V6c0-1.1.9-2 2-2h14a2 2 0 012 2v13c0 .5-.4 1-.9 1H18zM11 6H5v4h6V6zm8 0h-6v4h6V6z"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 9h-4v5h4v-5zm-6 0H9v5h4v-5zm0-7H9v5h4V6zm6 0h-4v5h4V6z"/></svg>',"table-merge-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15.5V18h3v-2.5H5zm14-5h-9V18h9v-7.5zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6zm-8 7.5h3v-3H5v3z"/></svg>',"table-row-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15v3h6v-3H5zm14 0h-6v3h6v-3zm0-9h-6v3h6V6zM5 9h6V6H5v3z"/></svg>',"table-split-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM8 15.5H5V18h3v-2.5zm11-5h-9V18h9v-7.5zm-2.5 1l1 1-2 2 2 2-1 1-2-2-2 2-1-1 2-2-2-2 1-1 2 2 2-2zm-8.5-1H5v3h3v-3zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6z"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 11H5v3h6v-3zm8 0h-6v3h6v-3zm0-5h-6v3h6v-3zM5 13h6v-3H5v3z"/></svg>',table:'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 14v4h6v-4H5zm14 0h-6v4h6v-4zm0-6h-6v4h6V8zM5 12h6V8H5v4z"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14zM9 16v-4a5 5 0 116 0v4h4a2 2 0 012 2v3H3v-3c0-1.1.9-2 2-2h4zm4 0v-5l.8-.6a3 3 0 10-3.6 0l.8.6v5h2z" fill-rule="nonzero"/></svg>',"temporary-placeholder":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 111 0V6H15v1.6a8 8 0 11-6 0zm-2.6 5.3a.5.5 0 00.3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 013.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 00-4.1 3.7z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',"text-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 01-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 01-.5.6h-.8a.5.5 0 01-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 00.5.6h1.6a.5.5 0 00.5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z"/></g></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',translate:'<svg width="24" height="24"><path d="M12.7 14.3l-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 010-1l3.1-3A12.4 12.4 0 016.7 9H8a10.1 10.1 0 001.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 110-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 01-1 2.4 13.5 13.5 0 01-1.7 2.3l1.9 1.8zm4.3-3l2.7 7.3a.5.5 0 01-.4.7 1 1 0 01-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 01-1 .7.5.5 0 01-.4-.7l2.7-7.4a1 1 0 012 0zm-2.2 4.4h2.4L16 12.5l-1.2 3.2z" fill-rule="evenodd"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 01-.4 1.8l-1 1.4a5.3 5.3 0 01-5.5 1 5 5 0 01-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 01-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 002.2.8 3.4 3.4 0 002.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1zM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',undo:'<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 01-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 11-1.4 1.4l-5-5a1 1 0 010-1.4l5-5a1 1 0 011.4 1.4L6.4 8z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2 2a2 2 0 102.6 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2.1-2a2 2 0 10-2.7-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2zM7.6 6.3a.8.8 0 01-1 1.1L3.3 4.2a.7.7 0 111-1l3.2 3.1zM5.1 8.6a.8.8 0 010 1.5H3a.8.8 0 010-1.5H5zm5-3.5a.8.8 0 01-1.5 0V3a.8.8 0 011.5 0V5zm6 11.8a.8.8 0 011-1l3.2 3.2a.8.8 0 01-1 1L16 17zm-2.2 2a.8.8 0 011.5 0V21a.8.8 0 01-1.5 0V19zm5-3.5a.7.7 0 110-1.5H21a.8.8 0 010 1.5H19z" fill-rule="nonzero"/></svg>',unlock:'<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 00-.3-.7A1 1 0 0016 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2z" fill-rule="evenodd"/></svg>',"unordered-list":'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1z" fill-rule="evenodd"/></svg>',unselected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm0 1a1 1 0 00-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6z"/></svg>',upload:'<svg width="24" height="24"><path d="M18 19v-2a1 1 0 012 0v3c0 .6-.4 1-1 1H5a1 1 0 01-1-1v-3a1 1 0 012 0v2h12zM11 6.4L8.7 8.7a1 1 0 01-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 11-1.4 1.4L13 6.4V16a1 1 0 01-2 0V6.4z" fill-rule="nonzero"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 110-24 12 12 0 010 24zm-8.7-5.3a11 11 0 0017.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7zM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13z" fill-rule="nonzero"/></svg>',visualblocks:'<svg width="24" height="24"><path d="M9 19v2H7v-2h2zm-4 0v2a2 2 0 01-2-2h2zm8 0v2h-2v-2h2zm8 0a2 2 0 01-2 2v-2h2zm-4 0v2h-2v-2h2zM15 7a1 1 0 010 2v7a1 1 0 01-2 0V9h-1v7a1 1 0 01-2 0v-4a2.5 2.5 0 01-.2-5H15zM5 15v2H3v-2h2zm16 0v2h-2v-2h2zM5 11v2H3v-2h2zm16 0v2h-2v-2h2zM5 7v2H3V7h2zm16 0v2h-2V7h2zM5 3v2H3c0-1.1.9-2 2-2zm8 0v2h-2V3h2zm6 0a2 2 0 012 2h-2V3zM9 3v2H7V3h2zm8 0v2h-2V3h2z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z" fill-rule="evenodd"/></svg>',warning:'<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6zM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3zm.7-3l.3-4a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7l.3 4h1.4z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-1-9a1 1 0 012 0v6a1 1 0 01-2 0V8zm-2 4a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-3-5a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>'}});

--- /dev/null
+++ b/tinymce/5/js/tinymce/icons/default/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "default" icons for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/icons/default')
+//   ES2015:
+//     import 'tinymce/icons/default'
+require('./icons.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/jquery.tinymce.js
@@ -1,1 +1,92 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+/**
+ * Jquery integration plugin.
+ *
+ * @class tinymce.core.JqueryIntegration
+ * @private
+ */
+!function(){var f,c,u,p,d,s=[];d="undefined"!=typeof global?global:window,p=d.jQuery;var v=function(){
+// Reference to tinymce needs to be lazily evaluated since tinymce
+// might be loaded through the compressor or other means
+return d.tinymce};p.fn.tinymce=function(o){var e,t,i,l=this,r="";
+// No match then just ignore the call
+if(!l.length)return l;
+// Get editor instance
+if(!o)return v()?v().get(l[0].id):null;l.css("visibility","hidden");// Hide textarea to avoid flicker
+var n=function(){var a=[],c=0;
+// Apply patches to the jQuery object, only once
+u||(m(),u=!0),
+// Create an editor instance for each matched node
+l.each(function(e,t){var n,i=t.id,r=o.oninit;
+// Generate unique id for target element if needed
+i||(t.id=i=v().DOM.uniqueId()),
+// Only init the editor once
+v().get(i)||(
+// Create editor instance and render it
+n=v().createEditor(i,o),a.push(n),n.on("init",function(){var e,t=r;l.css("visibility",""),
+// Run this if the oninit setting is defined
+// this logic will fire the oninit callback ones each
+// matched editor instance is initialized
+r&&++c==a.length&&("string"==typeof t&&(e=-1===t.indexOf(".")?null:v().resolve(t.replace(/\.\w+$/,"")),t=v().resolve(t)),
+// Call the oninit function with the object
+t.apply(e||v(),a))}))}),
+// Render the editor instances in a separate loop since we
+// need to have the full editors array used in the onInit calls
+p.each(a,function(e,t){t.render()})};
+// Load TinyMCE on demand, if we need to
+if(d.tinymce||c||!(e=o.script_url))
+// Delay the init call until tinymce is loaded
+1===c?s.push(n):n();else{c=1,t=e.substring(0,e.lastIndexOf("/")),
+// Check if it's a dev/src version they want to load then
+// make sure that all plugins, themes etc are loaded in source mode as well
+-1!=e.indexOf(".min")&&(r=".min"),
+// Setup tinyMCEPreInit object this will later be used by the TinyMCE
+// core script to locate other resources like CSS files, dialogs etc
+// You can also predefined a tinyMCEPreInit object and then it will use that instead
+d.tinymce=d.tinyMCEPreInit||{base:t,suffix:r},
+// url contains gzip then we assume it's a compressor
+-1!=e.indexOf("gzip")&&(i=o.language||"en",e=e+(/\?/.test(e)?"&":"?")+"js=true&core=true&suffix="+escape(r)+"&themes="+escape(o.theme||"modern")+"&plugins="+escape(o.plugins||"")+"&languages="+(i||""),
+// Check if compressor script is already loaded otherwise setup a basic one
+d.tinyMCE_GZ||(d.tinyMCE_GZ={start:function(){var n=function(e){v().ScriptLoader.markDone(v().baseURI.toAbsolute(e))};
+// Add core languages
+n("langs/"+i+".js"),
+// Add themes with languages
+n("themes/"+o.theme+"/theme"+r+".js"),n("themes/"+o.theme+"/langs/"+i+".js"),
+// Add plugins with languages
+p.each(o.plugins.split(","),function(e,t){t&&(n("plugins/"+t+"/plugin"+r+".js"),n("plugins/"+t+"/langs/"+i+".js"))})},end:function(){}}));var a=document.createElement("script");a.type="text/javascript",a.onload=a.onreadystatechange=function(e){e=e||window.event,2===c||"load"!=e.type&&!/complete|loaded/.test(a.readyState)||(v().dom.Event.domLoaded=1,c=2,
+// Execute callback after mainscript has been loaded and before the initialization occurs
+o.script_loaded&&o.script_loaded(),n(),p.each(s,function(e,t){t()}))},a.src=e,document.body.appendChild(a)}return l},
+// Add :tinymce pseudo selector this will select elements that has been converted into editor instances
+// it's now possible to use things like $('*:tinymce') to get all TinyMCE bound elements.
+p.extend(p.expr[":"],{tinymce:function(e){var t;return!!(e.id&&"tinymce"in d&&(t=v().get(e.id))&&t.editorManager===v())}});
+// This function patches internal jQuery functions so that if
+// you for example remove an div element containing an editor it's
+// automatically destroyed by the TinyMCE API
+var m=function(){
+// Removes any child editor instances by looking for editor wrapper elements
+var r=function(e){
+// If the function is remove
+"remove"===e&&this.each(function(e,t){var n=l(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=v().get(t.id.replace(/_parent$/,""));n&&n.remove()})},o=function(i){var e,t=this;
+// Handle set value
+/*jshint eqnull:true */if(null!=i)r.call(t),
+// Saves the contents before get/set value of textarea/div
+t.each(function(e,t){var n;(n=v().get(t.id))&&n.setContent(i)});else if(0<t.length&&(e=v().get(t[0].id)))return e.getContent()},l=function(e){var t=null;return e&&e.id&&d.tinymce&&(t=v().get(e.id)),t},u=function(e){return!!(e&&e.length&&d.tinymce&&e.is(":tinymce"))},s={};
+// Loads or saves contents from/to textarea if the value
+// argument is defined it will set the TinyMCE internal contents
+// Patch some setter/getter functions these will
+// now be able to set/get the contents of editor instances for
+// example $('#editorid').html('Content'); will update the TinyMCE iframe instance
+p.each(["text","html","val"],function(e,t){var a=s[t]=p.fn[t],c="text"===t;p.fn[t]=function(e){var t=this;if(!u(t))return a.apply(t,arguments);if(e!==f)return o.call(t.filter(":tinymce"),e),a.apply(t.not(":tinymce"),arguments),t;// return original set for chaining
+var i="",r=arguments;return(c?t:t.eq(0)).each(function(e,t){var n=l(t);i+=n?c?n.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):n.getContent({save:!0}):a.apply(p(t),r)}),i}}),
+// Makes it possible to use $('#id').append("content"); to append contents to the TinyMCE editor iframe
+p.each(["append","prepend"],function(e,t){var n=s[t]=p.fn[t],r="prepend"===t;p.fn[t]=function(i){var e=this;return u(e)?i!==f?("string"==typeof i&&e.filter(":tinymce").each(function(e,t){var n=l(t);n&&n.setContent(r?i+n.getContent():n.getContent()+i)}),n.apply(e.not(":tinymce"),arguments),e):void 0:n.apply(e,arguments)}}),
+// Makes sure that the editor instance gets properly destroyed when the parent element is removed
+p.each(["remove","replaceWith","replaceAll","empty"],function(e,t){var n=s[t]=p.fn[t];p.fn[t]=function(){return r.call(this,t),n.apply(this,arguments)}}),s.attr=p.fn.attr,
+// Makes sure that $('#tinymce_id').attr('value') gets the editors current HTML contents
+p.fn.attr=function(e,t){var n=this,i=arguments;if(!e||"value"!==e||!u(n))return s.attr.apply(n,i);if(t!==f)return o.call(n.filter(":tinymce"),t),s.attr.apply(n.not(":tinymce"),i),n;// return original set for chaining
+var r=n[0],a=l(r);return a?a.getContent({save:!0}):s.attr.apply(p(r),i)}}}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/jquery.tinymce.min.js
@@ -1,1 +1,92 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+/**
+ * Jquery integration plugin.
+ *
+ * @class tinymce.core.JqueryIntegration
+ * @private
+ */
+!function(){var f,c,u,p,d,s=[];d="undefined"!=typeof global?global:window,p=d.jQuery;var v=function(){
+// Reference to tinymce needs to be lazily evaluated since tinymce
+// might be loaded through the compressor or other means
+return d.tinymce};p.fn.tinymce=function(o){var e,t,i,l=this,r="";
+// No match then just ignore the call
+if(!l.length)return l;
+// Get editor instance
+if(!o)return v()?v().get(l[0].id):null;l.css("visibility","hidden");// Hide textarea to avoid flicker
+var n=function(){var a=[],c=0;
+// Apply patches to the jQuery object, only once
+u||(m(),u=!0),
+// Create an editor instance for each matched node
+l.each(function(e,t){var n,i=t.id,r=o.oninit;
+// Generate unique id for target element if needed
+i||(t.id=i=v().DOM.uniqueId()),
+// Only init the editor once
+v().get(i)||(
+// Create editor instance and render it
+n=v().createEditor(i,o),a.push(n),n.on("init",function(){var e,t=r;l.css("visibility",""),
+// Run this if the oninit setting is defined
+// this logic will fire the oninit callback ones each
+// matched editor instance is initialized
+r&&++c==a.length&&("string"==typeof t&&(e=-1===t.indexOf(".")?null:v().resolve(t.replace(/\.\w+$/,"")),t=v().resolve(t)),
+// Call the oninit function with the object
+t.apply(e||v(),a))}))}),
+// Render the editor instances in a separate loop since we
+// need to have the full editors array used in the onInit calls
+p.each(a,function(e,t){t.render()})};
+// Load TinyMCE on demand, if we need to
+if(d.tinymce||c||!(e=o.script_url))
+// Delay the init call until tinymce is loaded
+1===c?s.push(n):n();else{c=1,t=e.substring(0,e.lastIndexOf("/")),
+// Check if it's a dev/src version they want to load then
+// make sure that all plugins, themes etc are loaded in source mode as well
+-1!=e.indexOf(".min")&&(r=".min"),
+// Setup tinyMCEPreInit object this will later be used by the TinyMCE
+// core script to locate other resources like CSS files, dialogs etc
+// You can also predefined a tinyMCEPreInit object and then it will use that instead
+d.tinymce=d.tinyMCEPreInit||{base:t,suffix:r},
+// url contains gzip then we assume it's a compressor
+-1!=e.indexOf("gzip")&&(i=o.language||"en",e=e+(/\?/.test(e)?"&":"?")+"js=true&core=true&suffix="+escape(r)+"&themes="+escape(o.theme||"modern")+"&plugins="+escape(o.plugins||"")+"&languages="+(i||""),
+// Check if compressor script is already loaded otherwise setup a basic one
+d.tinyMCE_GZ||(d.tinyMCE_GZ={start:function(){var n=function(e){v().ScriptLoader.markDone(v().baseURI.toAbsolute(e))};
+// Add core languages
+n("langs/"+i+".js"),
+// Add themes with languages
+n("themes/"+o.theme+"/theme"+r+".js"),n("themes/"+o.theme+"/langs/"+i+".js"),
+// Add plugins with languages
+p.each(o.plugins.split(","),function(e,t){t&&(n("plugins/"+t+"/plugin"+r+".js"),n("plugins/"+t+"/langs/"+i+".js"))})},end:function(){}}));var a=document.createElement("script");a.type="text/javascript",a.onload=a.onreadystatechange=function(e){e=e||window.event,2===c||"load"!=e.type&&!/complete|loaded/.test(a.readyState)||(v().dom.Event.domLoaded=1,c=2,
+// Execute callback after mainscript has been loaded and before the initialization occurs
+o.script_loaded&&o.script_loaded(),n(),p.each(s,function(e,t){t()}))},a.src=e,document.body.appendChild(a)}return l},
+// Add :tinymce pseudo selector this will select elements that has been converted into editor instances
+// it's now possible to use things like $('*:tinymce') to get all TinyMCE bound elements.
+p.extend(p.expr[":"],{tinymce:function(e){var t;return!!(e.id&&"tinymce"in d&&(t=v().get(e.id))&&t.editorManager===v())}});
+// This function patches internal jQuery functions so that if
+// you for example remove an div element containing an editor it's
+// automatically destroyed by the TinyMCE API
+var m=function(){
+// Removes any child editor instances by looking for editor wrapper elements
+var r=function(e){
+// If the function is remove
+"remove"===e&&this.each(function(e,t){var n=l(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=v().get(t.id.replace(/_parent$/,""));n&&n.remove()})},o=function(i){var e,t=this;
+// Handle set value
+/*jshint eqnull:true */if(null!=i)r.call(t),
+// Saves the contents before get/set value of textarea/div
+t.each(function(e,t){var n;(n=v().get(t.id))&&n.setContent(i)});else if(0<t.length&&(e=v().get(t[0].id)))return e.getContent()},l=function(e){var t=null;return e&&e.id&&d.tinymce&&(t=v().get(e.id)),t},u=function(e){return!!(e&&e.length&&d.tinymce&&e.is(":tinymce"))},s={};
+// Loads or saves contents from/to textarea if the value
+// argument is defined it will set the TinyMCE internal contents
+// Patch some setter/getter functions these will
+// now be able to set/get the contents of editor instances for
+// example $('#editorid').html('Content'); will update the TinyMCE iframe instance
+p.each(["text","html","val"],function(e,t){var a=s[t]=p.fn[t],c="text"===t;p.fn[t]=function(e){var t=this;if(!u(t))return a.apply(t,arguments);if(e!==f)return o.call(t.filter(":tinymce"),e),a.apply(t.not(":tinymce"),arguments),t;// return original set for chaining
+var i="",r=arguments;return(c?t:t.eq(0)).each(function(e,t){var n=l(t);i+=n?c?n.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):n.getContent({save:!0}):a.apply(p(t),r)}),i}}),
+// Makes it possible to use $('#id').append("content"); to append contents to the TinyMCE editor iframe
+p.each(["append","prepend"],function(e,t){var n=s[t]=p.fn[t],r="prepend"===t;p.fn[t]=function(i){var e=this;return u(e)?i!==f?("string"==typeof i&&e.filter(":tinymce").each(function(e,t){var n=l(t);n&&n.setContent(r?i+n.getContent():n.getContent()+i)}),n.apply(e.not(":tinymce"),arguments),e):void 0:n.apply(e,arguments)}}),
+// Makes sure that the editor instance gets properly destroyed when the parent element is removed
+p.each(["remove","replaceWith","replaceAll","empty"],function(e,t){var n=s[t]=p.fn[t];p.fn[t]=function(){return r.call(this,t),n.apply(this,arguments)}}),s.attr=p.fn.attr,
+// Makes sure that $('#tinymce_id').attr('value') gets the editors current HTML contents
+p.fn.attr=function(e,t){var n=this,i=arguments;if(!e||"value"!==e||!u(n))return s.attr.apply(n,i);if(t!==f)return o.call(n.filter(":tinymce"),t),s.attr.apply(n.not(":tinymce"),i),n;// return original set for chaining
+var r=n[0],a=l(r);return a?a.getContent({save:!0}):s.attr.apply(p(r),i)}}}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/license.txt
@@ -1,1 +1,505 @@
-
+      GNU LESSER GENERAL PUBLIC LICENSE
+           Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+          Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+      GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+          NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+         END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/package.json
@@ -1,1 +1,23 @@
-
+{
+	"name": "tinymce",
+	"version": "5.3.2",
+	"repository": {
+		"type": "git",
+		"url": "https://github.com/tinymce/tinymce-dist.git"
+	},
+	"description": "Web based JavaScript HTML WYSIWYG editor control.",
+	"author": "Ephox Corporation",
+	"main": "tinymce.js",
+	"license": "LGPL-2.1",
+	"keywords": [
+		"editor",
+		"wysiwyg",
+		"tinymce",
+		"richtext",
+		"javascript",
+		"html"
+	],
+	"bugs": {
+		"url": "https://github.com/tinymce/tinymce/issues"
+	}
+}

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/advlist/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "advlist" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/advlist')
+//   ES2015:
+//     import 'tinymce/plugins/advlist'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/advlist/plugin.js
@@ -1,1 +1,283 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var applyListFormat = function (editor, listName, styleValue) {
+      var cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';
+      editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue });
+    };
+
+    var register = function (editor) {
+      editor.addCommand('ApplyUnorderedListStyle', function (ui, value) {
+        applyListFormat(editor, 'UL', value['list-style-type']);
+      });
+      editor.addCommand('ApplyOrderedListStyle', function (ui, value) {
+        applyListFormat(editor, 'OL', value['list-style-type']);
+      });
+    };
+
+    var getNumberStyles = function (editor) {
+      var styles = editor.getParam('advlist_number_styles', 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman');
+      return styles ? styles.split(/[ ,]/) : [];
+    };
+    var getBulletStyles = function (editor) {
+      var styles = editor.getParam('advlist_bullet_styles', 'default,circle,square');
+      return styles ? styles.split(/[ ,]/) : [];
+    };
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var isChildOfBody = function (editor, elm) {
+      return editor.$.contains(editor.getBody(), elm);
+    };
+    var isTableCellNode = function (node) {
+      return node && /^(TH|TD)$/.test(node.nodeName);
+    };
+    var isListNode = function (editor) {
+      return function (node) {
+        return node && /^(OL|UL|DL)$/.test(node.nodeName) && isChildOfBody(editor, node);
+      };
+    };
+    var getSelectedStyleType = function (editor) {
+      var listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');
+      var style = editor.dom.getStyle(listElm, 'listStyleType');
+      return Option.from(style);
+    };
+
+    var findIndex = function (list, predicate) {
+      for (var index = 0; index < list.length; index++) {
+        var element = list[index];
+        if (predicate(element)) {
+          return index;
+        }
+      }
+      return -1;
+    };
+    var styleValueToText = function (styleValue) {
+      return styleValue.replace(/\-/g, ' ').replace(/\b\w/g, function (chr) {
+        return chr.toUpperCase();
+      });
+    };
+    var isWithinList = function (editor, e, nodeName) {
+      var tableCellIndex = findIndex(e.parents, isTableCellNode);
+      var parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents;
+      var lists = global$1.grep(parents, isListNode(editor));
+      return lists.length > 0 && lists[0].nodeName === nodeName;
+    };
+    var addSplitButton = function (editor, id, tooltip, cmd, nodeName, styles) {
+      editor.ui.registry.addSplitButton(id, {
+        tooltip: tooltip,
+        icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',
+        presets: 'listpreview',
+        columns: 3,
+        fetch: function (callback) {
+          var items = global$1.map(styles, function (styleValue) {
+            var iconStyle = nodeName === 'OL' ? 'num' : 'bull';
+            var iconName = styleValue === 'disc' || styleValue === 'decimal' ? 'default' : styleValue;
+            var itemValue = styleValue === 'default' ? '' : styleValue;
+            var displayText = styleValueToText(styleValue);
+            return {
+              type: 'choiceitem',
+              value: itemValue,
+              icon: 'list-' + iconStyle + '-' + iconName,
+              text: displayText
+            };
+          });
+          callback(items);
+        },
+        onAction: function () {
+          return editor.execCommand(cmd);
+        },
+        onItemAction: function (_splitButtonApi, value) {
+          applyListFormat(editor, nodeName, value);
+        },
+        select: function (value) {
+          var listStyleType = getSelectedStyleType(editor);
+          return listStyleType.map(function (listStyle) {
+            return value === listStyle;
+          }).getOr(false);
+        },
+        onSetup: function (api) {
+          var nodeChangeHandler = function (e) {
+            api.setActive(isWithinList(editor, e, nodeName));
+          };
+          editor.on('NodeChange', nodeChangeHandler);
+          return function () {
+            return editor.off('NodeChange', nodeChangeHandler);
+          };
+        }
+      });
+    };
+    var addButton = function (editor, id, tooltip, cmd, nodeName, _styles) {
+      editor.ui.registry.addToggleButton(id, {
+        active: false,
+        tooltip: tooltip,
+        icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',
+        onSetup: function (api) {
+          var nodeChangeHandler = function (e) {
+            api.setActive(isWithinList(editor, e, nodeName));
+          };
+          editor.on('NodeChange', nodeChangeHandler);
+          return function () {
+            return editor.off('NodeChange', nodeChangeHandler);
+          };
+        },
+        onAction: function () {
+          return editor.execCommand(cmd);
+        }
+      });
+    };
+    var addControl = function (editor, id, tooltip, cmd, nodeName, styles) {
+      if (styles.length > 0) {
+        addSplitButton(editor, id, tooltip, cmd, nodeName, styles);
+      } else {
+        addButton(editor, id, tooltip, cmd, nodeName);
+      }
+    };
+    var register$1 = function (editor) {
+      addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', getNumberStyles(editor));
+      addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', getBulletStyles(editor));
+    };
+
+    function Plugin () {
+      global.add('advlist', function (editor) {
+        var hasPlugin = function (editor, plugin) {
+          var plugins = editor.settings.plugins ? editor.settings.plugins : '';
+          return global$1.inArray(plugins.split(/[ ,]/), plugin) !== -1;
+        };
+        if (hasPlugin(editor, 'lists')) {
+          register$1(editor);
+          register(editor);
+        }
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/advlist/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var n,t,e,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=function(n,t,e){var r="UL"===t?"InsertUnorderedList":"InsertOrderedList";n.execCommand(r,!1,!1===e?null:{"list-style-type":e})},o=function(n){return function(){return n}},u=o(!1),l=o(!0),i=function(){return a},a=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:u,isSome:u,isNone:l,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:e,orThunk:t,map:i,each:function(){},bind:i,exists:u,forall:l,filter:i,equals:n,equals_:n,toArray:function(){return[]},toString:o("none()")}),f=function(e){var n=o(e),t=function(){return i},r=function(n){return n(e)},i={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:l,isNone:u,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return f(n(e))},each:function(n){n(e)},bind:r,exists:r,forall:r,filter:function(n){return n(e)?i:a},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(u,function(n){return t(e,n)})}};return i},d=function(n){return null===n||n===undefined?a:f(n)},g=function(n){return n&&/^(TH|TD)$/.test(n.nodeName)},p=function(r){return function(n){return n&&/^(OL|UL|DL)$/.test(n.nodeName)&&(e=n,(t=r).$.contains(t.getBody(),e));var t,e}},m=function(n,t,e){var r=function(n,t){for(var e=0;e<n.length;e++){if(t(n[e]))return e}return-1}(t.parents,g),i=-1!==r?t.parents.slice(0,r):t.parents,o=s.grep(i,p(n));return 0<o.length&&o[0].nodeName===e},y=function(i,n,t,e,r,o){i.ui.registry.addSplitButton(n,{tooltip:t,icon:"OL"===r?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(n){n(s.map(o,function(n){return{type:"choiceitem",value:"default"===n?"":n,icon:"list-"+("OL"===r?"num":"bull")+"-"+("disc"===n||"decimal"===n?"default":n),text:n.replace(/\-/g," ").replace(/\b\w/g,function(n){return n.toUpperCase()})}}))},onAction:function(){return i.execCommand(e)},onItemAction:function(n,t){c(i,r,t)},select:function(t){var n,e,r;return(e=(n=i).dom.getParent(n.selection.getNode(),"ol,ul"),r=n.dom.getStyle(e,"listStyleType"),d(r)).map(function(n){return t===n}).getOr(!1)},onSetup:function(t){var n=function(n){t.setActive(m(i,n,r))};return i.on("NodeChange",n),function(){return i.off("NodeChange",n)}}})},v=function(n,t,e,r,i,o){var u,l,s,c,a;0<o.length?y(n,t,e,r,i,o):(l=t,s=e,c=r,a=i,(u=n).ui.registry.addToggleButton(l,{active:!1,tooltip:s,icon:"OL"===a?"ordered-list":"unordered-list",onSetup:function(t){var n=function(n){t.setActive(m(u,n,a))};return u.on("NodeChange",n),function(){return u.off("NodeChange",n)}},onAction:function(){return u.execCommand(c)}}))};!function O(){r.add("advlist",function(n){var e,t,r,i,o,u,l;u="lists",l=(o=n).settings.plugins?o.settings.plugins:"",-1!==s.inArray(l.split(/[ ,]/),u)&&(v(t=n,"numlist","Numbered list","InsertOrderedList","OL",(r=t.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"))?r.split(/[ ,]/):[]),v(t,"bullist","Bullet list","InsertUnorderedList","UL",(i=t.getParam("advlist_bullet_styles","default,circle,square"))?i.split(/[ ,]/):[]),(e=n).addCommand("ApplyUnorderedListStyle",function(n,t){c(e,"UL",t["list-style-type"])}),e.addCommand("ApplyOrderedListStyle",function(n,t){c(e,"OL",t["list-style-type"])}))})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/anchor/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "anchor" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/anchor')
+//   ES2015:
+//     import 'tinymce/plugins/anchor'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/anchor/plugin.js
@@ -1,1 +1,138 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var isNamedAnchor = function (editor, node) {
+      return node.tagName === 'A' && editor.dom.getAttrib(node, 'href') === '';
+    };
+    var isValidId = function (id) {
+      return /^[A-Za-z][A-Za-z0-9\-:._]*$/.test(id);
+    };
+    var getId = function (editor) {
+      var selectedNode = editor.selection.getNode();
+      return isNamedAnchor(editor, selectedNode) ? selectedNode.getAttribute('id') || selectedNode.getAttribute('name') : '';
+    };
+    var insert = function (editor, id) {
+      var selectedNode = editor.selection.getNode();
+      if (isNamedAnchor(editor, selectedNode)) {
+        selectedNode.removeAttribute('name');
+        selectedNode.id = id;
+        editor.undoManager.add();
+      } else {
+        editor.focus();
+        editor.selection.collapse(true);
+        editor.insertContent(editor.dom.createHTML('a', { id: id }));
+      }
+    };
+
+    var insertAnchor = function (editor, newId) {
+      if (!isValidId(newId)) {
+        editor.windowManager.alert('Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.');
+        return false;
+      } else {
+        insert(editor, newId);
+        return true;
+      }
+    };
+    var open = function (editor) {
+      var currentId = getId(editor);
+      editor.windowManager.open({
+        title: 'Anchor',
+        size: 'normal',
+        body: {
+          type: 'panel',
+          items: [{
+              name: 'id',
+              type: 'input',
+              label: 'ID',
+              placeholder: 'example'
+            }]
+        },
+        buttons: [
+          {
+            type: 'cancel',
+            name: 'cancel',
+            text: 'Cancel'
+          },
+          {
+            type: 'submit',
+            name: 'save',
+            text: 'Save',
+            primary: true
+          }
+        ],
+        initialData: { id: currentId },
+        onSubmit: function (api) {
+          if (insertAnchor(editor, api.getData().id)) {
+            api.close();
+          }
+        }
+      });
+    };
+
+    var register = function (editor) {
+      editor.addCommand('mceAnchor', function () {
+        open(editor);
+      });
+    };
+
+    var isNamedAnchorNode = function (node) {
+      return !node.attr('href') && (node.attr('id') || node.attr('name')) && !node.firstChild;
+    };
+    var setContentEditable = function (state) {
+      return function (nodes) {
+        for (var i = 0; i < nodes.length; i++) {
+          if (isNamedAnchorNode(nodes[i])) {
+            nodes[i].attr('contenteditable', state);
+          }
+        }
+      };
+    };
+    var setup = function (editor) {
+      editor.on('PreInit', function () {
+        editor.parser.addNodeFilter('a', setContentEditable('false'));
+        editor.serializer.addNodeFilter('a', setContentEditable(null));
+      });
+    };
+
+    var register$1 = function (editor) {
+      editor.ui.registry.addToggleButton('anchor', {
+        icon: 'bookmark',
+        tooltip: 'Anchor',
+        onAction: function () {
+          return editor.execCommand('mceAnchor');
+        },
+        onSetup: function (buttonApi) {
+          return editor.selection.selectorChangedWithUnbind('a:not([href])', buttonApi.setActive).unbind;
+        }
+      });
+      editor.ui.registry.addMenuItem('anchor', {
+        icon: 'bookmark',
+        text: 'Anchor...',
+        onAction: function () {
+          return editor.execCommand('mceAnchor');
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('anchor', function (editor) {
+        setup(editor);
+        register(editor);
+        register$1(editor);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/anchor/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(e,t){return"A"===t.tagName&&""===e.dom.getAttrib(t,"href")},r=function(e,t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(o=t,r=(n=e).selection.getNode(),a(n,r)?(r.removeAttribute("name"),r.id=o,n.undoManager.add()):(n.focus(),n.selection.collapse(!0),n.insertContent(n.dom.createHTML("a",{id:o}))),!0):(e.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1);var n,o,r},i=function(t){var e,n,o=(n=(e=t).selection.getNode(),a(e,n)?n.getAttribute("id")||n.getAttribute("name"):"");t.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:o},onSubmit:function(e){r(t,e.getData().id)&&e.close()}})},c=function(o){return function(e){for(var t=0;t<e.length;t++)(n=e[t]).attr("href")||!n.attr("id")&&!n.attr("name")||n.firstChild||e[t].attr("contenteditable",o);var n}};!function t(){e.add("anchor",function(e){var t,n,o;(t=e).on("PreInit",function(){t.parser.addNodeFilter("a",c("false")),t.serializer.addNodeFilter("a",c(null))}),(n=e).addCommand("mceAnchor",function(){i(n)}),(o=e).ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return o.execCommand("mceAnchor")},onSetup:function(e){return o.selection.selectorChangedWithUnbind("a:not([href])",e.setActive).unbind}}),o.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return o.execCommand("mceAnchor")}})})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/autolink/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "autolink" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/autolink')
+//   ES2015:
+//     import 'tinymce/plugins/autolink'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/autolink/plugin.js
@@ -1,1 +1,186 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var getAutoLinkPattern = function (editor) {
+      return editor.getParam('autolink_pattern', /^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i);
+    };
+    var getDefaultLinkTarget = function (editor) {
+      return editor.getParam('default_link_target', false);
+    };
+    var getDefaultLinkProtocol = function (editor) {
+      return editor.getParam('link_default_protocol', 'http', 'string');
+    };
+
+    var rangeEqualsDelimiterOrSpace = function (rangeString, delimiter) {
+      return rangeString === delimiter || rangeString === ' ' || rangeString.charCodeAt(0) === 160;
+    };
+    var handleEclipse = function (editor) {
+      parseCurrentLine(editor, -1, '(');
+    };
+    var handleSpacebar = function (editor) {
+      parseCurrentLine(editor, 0, '');
+    };
+    var handleEnter = function (editor) {
+      parseCurrentLine(editor, -1, '');
+    };
+    var scopeIndex = function (container, index) {
+      if (index < 0) {
+        index = 0;
+      }
+      if (container.nodeType === 3) {
+        var len = container.data.length;
+        if (index > len) {
+          index = len;
+        }
+      }
+      return index;
+    };
+    var setStart = function (rng, container, offset) {
+      if (container.nodeType !== 1 || container.hasChildNodes()) {
+        rng.setStart(container, scopeIndex(container, offset));
+      } else {
+        rng.setStartBefore(container);
+      }
+    };
+    var setEnd = function (rng, container, offset) {
+      if (container.nodeType !== 1 || container.hasChildNodes()) {
+        rng.setEnd(container, scopeIndex(container, offset));
+      } else {
+        rng.setEndAfter(container);
+      }
+    };
+    var parseCurrentLine = function (editor, endOffset, delimiter) {
+      var rng, end, start, endContainer, bookmark, text, matches, prev, len, rngText;
+      var autoLinkPattern = getAutoLinkPattern(editor);
+      var defaultLinkTarget = getDefaultLinkTarget(editor);
+      if (editor.selection.getNode().tagName === 'A') {
+        return;
+      }
+      rng = editor.selection.getRng(true).cloneRange();
+      if (rng.startOffset < 5) {
+        prev = rng.endContainer.previousSibling;
+        if (!prev) {
+          if (!rng.endContainer.firstChild || !rng.endContainer.firstChild.nextSibling) {
+            return;
+          }
+          prev = rng.endContainer.firstChild.nextSibling;
+        }
+        len = prev.length;
+        setStart(rng, prev, len);
+        setEnd(rng, prev, len);
+        if (rng.endOffset < 5) {
+          return;
+        }
+        end = rng.endOffset;
+        endContainer = prev;
+      } else {
+        endContainer = rng.endContainer;
+        if (endContainer.nodeType !== 3 && endContainer.firstChild) {
+          while (endContainer.nodeType !== 3 && endContainer.firstChild) {
+            endContainer = endContainer.firstChild;
+          }
+          if (endContainer.nodeType === 3) {
+            setStart(rng, endContainer, 0);
+            setEnd(rng, endContainer, endContainer.nodeValue.length);
+          }
+        }
+        if (rng.endOffset === 1) {
+          end = 2;
+        } else {
+          end = rng.endOffset - 1 - endOffset;
+        }
+      }
+      start = end;
+      do {
+        setStart(rng, endContainer, end >= 2 ? end - 2 : 0);
+        setEnd(rng, endContainer, end >= 1 ? end - 1 : 0);
+        end -= 1;
+        rngText = rng.toString();
+      } while (rngText !== ' ' && rngText !== '' && rngText.charCodeAt(0) !== 160 && end - 2 >= 0 && rngText !== delimiter);
+      if (rangeEqualsDelimiterOrSpace(rng.toString(), delimiter)) {
+        setStart(rng, endContainer, end);
+        setEnd(rng, endContainer, start);
+        end += 1;
+      } else if (rng.startOffset === 0) {
+        setStart(rng, endContainer, 0);
+        setEnd(rng, endContainer, start);
+      } else {
+        setStart(rng, endContainer, end);
+        setEnd(rng, endContainer, start);
+      }
+      text = rng.toString();
+      if (text.charAt(text.length - 1) === '.') {
+        setEnd(rng, endContainer, start - 1);
+      }
+      text = rng.toString().trim();
+      matches = text.match(autoLinkPattern);
+      var protocol = getDefaultLinkProtocol(editor);
+      if (matches) {
+        if (matches[1] === 'www.') {
+          matches[1] = protocol + '://www.';
+        } else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
+          matches[1] = 'mailto:' + matches[1];
+        }
+        bookmark = editor.selection.getBookmark();
+        editor.selection.setRng(rng);
+        editor.execCommand('createlink', false, matches[1] + matches[2]);
+        if (defaultLinkTarget !== false) {
+          editor.dom.setAttrib(editor.selection.getNode(), 'target', defaultLinkTarget);
+        }
+        editor.selection.moveToBookmark(bookmark);
+        editor.nodeChanged();
+      }
+    };
+    var setup = function (editor) {
+      var autoUrlDetectState;
+      editor.on('keydown', function (e) {
+        if (e.keyCode === 13) {
+          return handleEnter(editor);
+        }
+      });
+      if (global$1.browser.isIE()) {
+        editor.on('focus', function () {
+          if (!autoUrlDetectState) {
+            autoUrlDetectState = true;
+            try {
+              editor.execCommand('AutoUrlDetect', false, true);
+            } catch (ex) {
+            }
+          }
+        });
+        return;
+      }
+      editor.on('keypress', function (e) {
+        if (e.keyCode === 41) {
+          return handleEclipse(editor);
+        }
+      });
+      editor.on('keyup', function (e) {
+        if (e.keyCode === 32) {
+          return handleSpacebar(editor);
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('autolink', function (editor) {
+        setup(editor);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/autolink/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),o=function(e,t){if(t<0&&(t=0),3===e.nodeType){var n=e.data.length;n<t&&(t=n)}return t},y=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,o(t,n)):e.setStartBefore(t)},k=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,o(t,n)):e.setEndAfter(t)},r=function(e,t,n){var i,o,r,a,s,f,l,d,c,g,u=e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i),h=e.getParam("default_link_target",!1);if("A"!==e.selection.getNode().tagName){if((i=e.selection.getRng(!0).cloneRange()).startOffset<5){if(!(d=i.endContainer.previousSibling)){if(!i.endContainer.firstChild||!i.endContainer.firstChild.nextSibling)return;d=i.endContainer.firstChild.nextSibling}if(c=d.length,y(i,d,c),k(i,d,c),i.endOffset<5)return;o=i.endOffset,a=d}else{if(3!==(a=i.endContainer).nodeType&&a.firstChild){for(;3!==a.nodeType&&a.firstChild;)a=a.firstChild;3===a.nodeType&&(y(i,a,0),k(i,a,a.nodeValue.length))}o=1===i.endOffset?2:i.endOffset-1-t}for(r=o;y(i,a,2<=o?o-2:0),k(i,a,1<=o?o-1:0),--o," "!==(g=i.toString())&&""!==g&&160!==g.charCodeAt(0)&&0<=o-2&&g!==n;);var m;(m=i.toString())===n||" "===m||160===m.charCodeAt(0)?(y(i,a,o),k(i,a,r),o+=1):(0===i.startOffset?y(i,a,0):y(i,a,o),k(i,a,r)),"."===(f=i.toString()).charAt(f.length-1)&&k(i,a,r-1),l=(f=i.toString().trim()).match(u);var C=e.getParam("link_default_protocol","http","string");l&&("www."===l[1]?l[1]=C+"://www.":/@$/.test(l[1])&&!/^mailto:/.test(l[1])&&(l[1]="mailto:"+l[1]),s=e.selection.getBookmark(),e.selection.setRng(i),e.execCommand("createlink",!1,l[1]+l[2]),!1!==h&&e.dom.setAttrib(e.selection.getNode(),"target",h),e.selection.moveToBookmark(s),e.nodeChanged())}},t=function(t){var n;t.on("keydown",function(e){if(13!==e.keyCode);else r(t,-1,"")}),i.browser.isIE()?t.on("focus",function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){if(41!==e.keyCode);else r(t,-1,"(")}),t.on("keyup",function(e){if(32!==e.keyCode);else r(t,0,"")}))};!function n(){e.add("autolink",function(e){t(e)})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/autoresize/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "autoresize" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/autoresize')
+//   ES2015:
+//     import 'tinymce/plugins/autoresize'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/autoresize/plugin.js
@@ -1,1 +1,173 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
 
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Delay');
+
+    var fireResizeEditor = function (editor) {
+      return editor.fire('ResizeEditor');
+    };
+
+    var getAutoResizeMinHeight = function (editor) {
+      return editor.getParam('min_height', editor.getElement().offsetHeight, 'number');
+    };
+    var getAutoResizeMaxHeight = function (editor) {
+      return editor.getParam('max_height', 0, 'number');
+    };
+    var getAutoResizeOverflowPadding = function (editor) {
+      return editor.getParam('autoresize_overflow_padding', 1, 'number');
+    };
+    var getAutoResizeBottomMargin = function (editor) {
+      return editor.getParam('autoresize_bottom_margin', 50, 'number');
+    };
+    var shouldAutoResizeOnInit = function (editor) {
+      return editor.getParam('autoresize_on_init', true, 'boolean');
+    };
+
+    var isFullscreen = function (editor) {
+      return editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
+    };
+    var wait = function (editor, oldSize, times, interval, callback) {
+      global$2.setEditorTimeout(editor, function () {
+        resize(editor, oldSize);
+        if (times--) {
+          wait(editor, oldSize, times, interval, callback);
+        } else if (callback) {
+          callback();
+        }
+      }, interval);
+    };
+    var toggleScrolling = function (editor, state) {
+      var body = editor.getBody();
+      if (body) {
+        body.style.overflowY = state ? '' : 'hidden';
+        if (!state) {
+          body.scrollTop = 0;
+        }
+      }
+    };
+    var parseCssValueToInt = function (dom, elm, name, computed) {
+      var value = parseInt(dom.getStyle(elm, name, computed), 10);
+      return isNaN(value) ? 0 : value;
+    };
+    var resize = function (editor, oldSize) {
+      var deltaSize, resizeHeight, contentHeight;
+      var dom = editor.dom;
+      var doc = editor.getDoc();
+      if (!doc) {
+        return;
+      }
+      if (isFullscreen(editor)) {
+        toggleScrolling(editor, true);
+        return;
+      }
+      var docEle = doc.documentElement;
+      var resizeBottomMargin = getAutoResizeBottomMargin(editor);
+      resizeHeight = getAutoResizeMinHeight(editor);
+      var marginTop = parseCssValueToInt(dom, docEle, 'margin-top', true);
+      var marginBottom = parseCssValueToInt(dom, docEle, 'margin-bottom', true);
+      contentHeight = docEle.offsetHeight + marginTop + marginBottom + resizeBottomMargin;
+      if (contentHeight < 0) {
+        contentHeight = 0;
+      }
+      var containerHeight = editor.getContainer().offsetHeight;
+      var contentAreaHeight = editor.getContentAreaContainer().offsetHeight;
+      var chromeHeight = containerHeight - contentAreaHeight;
+      if (contentHeight + chromeHeight > getAutoResizeMinHeight(editor)) {
+        resizeHeight = contentHeight + chromeHeight;
+      }
+      var maxHeight = getAutoResizeMaxHeight(editor);
+      if (maxHeight && resizeHeight > maxHeight) {
+        resizeHeight = maxHeight;
+        toggleScrolling(editor, true);
+      } else {
+        toggleScrolling(editor, false);
+      }
+      if (resizeHeight !== oldSize.get()) {
+        deltaSize = resizeHeight - oldSize.get();
+        dom.setStyle(editor.getContainer(), 'height', resizeHeight + 'px');
+        oldSize.set(resizeHeight);
+        fireResizeEditor(editor);
+        if (global$1.browser.isSafari() && global$1.mac) {
+          var win = editor.getWin();
+          win.scrollTo(win.pageXOffset, win.pageYOffset);
+        }
+        if (editor.hasFocus()) {
+          editor.selection.scrollIntoView(editor.selection.getNode());
+        }
+        if (global$1.webkit && deltaSize < 0) {
+          resize(editor, oldSize);
+        }
+      }
+    };
+    var setup = function (editor, oldSize) {
+      editor.on('init', function () {
+        var overflowPadding = getAutoResizeOverflowPadding(editor);
+        var dom = editor.dom;
+        dom.setStyles(editor.getDoc().documentElement, { height: 'auto' });
+        dom.setStyles(editor.getBody(), {
+          'paddingLeft': overflowPadding,
+          'paddingRight': overflowPadding,
+          'min-height': 0
+        });
+      });
+      editor.on('NodeChange SetContent keyup FullscreenStateChanged ResizeContent', function () {
+        resize(editor, oldSize);
+      });
+      if (shouldAutoResizeOnInit(editor)) {
+        editor.on('init', function () {
+          wait(editor, oldSize, 20, 100, function () {
+            wait(editor, oldSize, 5, 1000);
+          });
+        });
+      }
+    };
+
+    var register = function (editor, oldSize) {
+      editor.addCommand('mceAutoResize', function () {
+        resize(editor, oldSize);
+      });
+    };
+
+    function Plugin () {
+      global.add('autoresize', function (editor) {
+        if (!editor.settings.hasOwnProperty('resize')) {
+          editor.settings.resize = false;
+        }
+        if (!editor.inline) {
+          var oldSize = Cell(0);
+          register(editor, oldSize);
+          setup(editor, oldSize);
+        }
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/autoresize/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),h=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),v=function(e){return e.getParam("min_height",e.getElement().offsetHeight,"number")},s=function(e,t,n,i,o){r.setEditorTimeout(e,function(){b(e,t),n--?s(e,t,n,i,o):o&&o()},i)},y=function(e,t){var n=e.getBody();n&&(n.style.overflowY=t?"":"hidden",t||(n.scrollTop=0))},p=function(e,t,n,i){var o=parseInt(e.getStyle(t,n,i),10);return isNaN(o)?0:o},b=function(e,t){var n,i,o,r=e.dom,a=e.getDoc();if(a)if((s=e).plugins.fullscreen&&s.plugins.fullscreen.isFullscreen())y(e,!0);else{var s,u=a.documentElement,g=e.getParam("autoresize_bottom_margin",50,"number");i=v(e);var l=p(r,u,"margin-top",!0),f=p(r,u,"margin-bottom",!0);(o=u.offsetHeight+l+f+g)<0&&(o=0);var c=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;o+c>v(e)&&(i=o+c);var m=e.getParam("max_height",0,"number");if(m&&m<i?(i=m,y(e,!0)):y(e,!1),i!==t.get()){if(n=i-t.get(),r.setStyle(e.getContainer(),"height",i+"px"),t.set(i),e.fire("ResizeEditor"),h.browser.isSafari()&&h.mac){var d=e.getWin();d.scrollTo(d.pageXOffset,d.pageYOffset)}e.hasFocus()&&e.selection.scrollIntoView(e.selection.getNode()),h.webkit&&n<0&&b(e,t)}}};!function t(){e.add("autoresize",function(e){if(e.settings.hasOwnProperty("resize")||(e.settings.resize=!1),!e.inline){var t=(a=0,{get:function(){return a},set:function(e){a=e}});r=t,(o=e).addCommand("mceAutoResize",function(){b(o,r)}),i=t,(n=e).on("init",function(){var e=n.getParam("autoresize_overflow_padding",1,"number"),t=n.dom;t.setStyles(n.getDoc().documentElement,{height:"auto"}),t.setStyles(n.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})}),n.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",function(){b(n,i)}),n.getParam("autoresize_on_init",!0,"boolean")&&n.on("init",function(){s(n,i,20,100,function(){s(n,i,5,1e3)})})}var n,i,o,r,a})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/autosave/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "autosave" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/autosave')
+//   ES2015:
+//     import 'tinymce/plugins/autosave'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/autosave/plugin.js
@@ -1,1 +1,200 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Delay');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.LocalStorage');
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var fireRestoreDraft = function (editor) {
+      return editor.fire('RestoreDraft');
+    };
+    var fireStoreDraft = function (editor) {
+      return editor.fire('StoreDraft');
+    };
+    var fireRemoveDraft = function (editor) {
+      return editor.fire('RemoveDraft');
+    };
+
+    var parse = function (timeString, defaultTime) {
+      var multiples = {
+        s: 1000,
+        m: 60000
+      };
+      var toParse = timeString || defaultTime;
+      var parsedTime = /^(\d+)([ms]?)$/.exec('' + toParse);
+      return (parsedTime[2] ? multiples[parsedTime[2]] : 1) * parseInt(toParse, 10);
+    };
+
+    var shouldAskBeforeUnload = function (editor) {
+      return editor.getParam('autosave_ask_before_unload', true);
+    };
+    var getAutoSavePrefix = function (editor) {
+      var location = domGlobals.document.location;
+      return editor.getParam('autosave_prefix', 'tinymce-autosave-{path}{query}{hash}-{id}-').replace(/{path}/g, location.pathname).replace(/{query}/g, location.search).replace(/{hash}/g, location.hash).replace(/{id}/g, editor.id);
+    };
+    var shouldRestoreWhenEmpty = function (editor) {
+      return editor.getParam('autosave_restore_when_empty', false);
+    };
+    var getAutoSaveInterval = function (editor) {
+      return parse(editor.settings.autosave_interval, '30s');
+    };
+    var getAutoSaveRetention = function (editor) {
+      return parse(editor.settings.autosave_retention, '20m');
+    };
+
+    var isEmpty = function (editor, html) {
+      var forcedRootBlockName = editor.settings.forced_root_block;
+      html = global$3.trim(typeof html === 'undefined' ? editor.getBody().innerHTML : html);
+      return html === '' || new RegExp('^<' + forcedRootBlockName + '[^>]*>((\xA0|&nbsp;|[ \t]|<br[^>]*>)+?|)</' + forcedRootBlockName + '>|<br>$', 'i').test(html);
+    };
+    var hasDraft = function (editor) {
+      var time = parseInt(global$2.getItem(getAutoSavePrefix(editor) + 'time'), 10) || 0;
+      if (new Date().getTime() - time > getAutoSaveRetention(editor)) {
+        removeDraft(editor, false);
+        return false;
+      }
+      return true;
+    };
+    var removeDraft = function (editor, fire) {
+      var prefix = getAutoSavePrefix(editor);
+      global$2.removeItem(prefix + 'draft');
+      global$2.removeItem(prefix + 'time');
+      if (fire !== false) {
+        fireRemoveDraft(editor);
+      }
+    };
+    var storeDraft = function (editor) {
+      var prefix = getAutoSavePrefix(editor);
+      if (!isEmpty(editor) && editor.isDirty()) {
+        global$2.setItem(prefix + 'draft', editor.getContent({
+          format: 'raw',
+          no_events: true
+        }));
+        global$2.setItem(prefix + 'time', new Date().getTime().toString());
+        fireStoreDraft(editor);
+      }
+    };
+    var restoreDraft = function (editor) {
+      var prefix = getAutoSavePrefix(editor);
+      if (hasDraft(editor)) {
+        editor.setContent(global$2.getItem(prefix + 'draft'), { format: 'raw' });
+        fireRestoreDraft(editor);
+      }
+    };
+    var startStoreDraft = function (editor) {
+      var interval = getAutoSaveInterval(editor);
+      global$1.setInterval(function () {
+        if (!editor.removed) {
+          storeDraft(editor);
+        }
+      }, interval);
+    };
+    var restoreLastDraft = function (editor) {
+      editor.undoManager.transact(function () {
+        restoreDraft(editor);
+        removeDraft(editor);
+      });
+      editor.focus();
+    };
+
+    var get = function (editor) {
+      return {
+        hasDraft: function () {
+          return hasDraft(editor);
+        },
+        storeDraft: function () {
+          return storeDraft(editor);
+        },
+        restoreDraft: function () {
+          return restoreDraft(editor);
+        },
+        removeDraft: function (fire) {
+          return removeDraft(editor, fire);
+        },
+        isEmpty: function (html) {
+          return isEmpty(editor, html);
+        }
+      };
+    };
+
+    var global$4 = tinymce.util.Tools.resolve('tinymce.EditorManager');
+
+    var setup = function (editor) {
+      editor.editorManager.on('BeforeUnload', function (e) {
+        var msg;
+        global$3.each(global$4.get(), function (editor) {
+          if (editor.plugins.autosave) {
+            editor.plugins.autosave.storeDraft();
+          }
+          if (!msg && editor.isDirty() && shouldAskBeforeUnload(editor)) {
+            msg = editor.translate('You have unsaved changes are you sure you want to navigate away?');
+          }
+        });
+        if (msg) {
+          e.preventDefault();
+          e.returnValue = msg;
+        }
+      });
+    };
+
+    var makeSetupHandler = function (editor) {
+      return function (api) {
+        api.setDisabled(!hasDraft(editor));
+        var editorEventCallback = function () {
+          return api.setDisabled(!hasDraft(editor));
+        };
+        editor.on('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);
+        return function () {
+          return editor.off('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);
+        };
+      };
+    };
+    var register = function (editor) {
+      startStoreDraft(editor);
+      editor.ui.registry.addButton('restoredraft', {
+        tooltip: 'Restore last draft',
+        icon: 'restore-draft',
+        onAction: function () {
+          restoreLastDraft(editor);
+        },
+        onSetup: makeSetupHandler(editor)
+      });
+      editor.ui.registry.addMenuItem('restoredraft', {
+        text: 'Restore last draft',
+        icon: 'restore-draft',
+        onAction: function () {
+          restoreLastDraft(editor);
+        },
+        onSetup: makeSetupHandler(editor)
+      });
+    };
+
+    function Plugin () {
+      global.add('autosave', function (editor) {
+        setup(editor);
+        register(editor);
+        editor.on('init', function () {
+          if (shouldRestoreWhenEmpty(editor) && editor.dom.isEmpty(editor.getBody())) {
+            restoreDraft(editor);
+          }
+        });
+        return get(editor);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/autosave/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(r){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.Delay"),o=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(t,e){var r=t||e,n=/^(\d+)([ms]?)$/.exec(""+r);return(n[2]?{s:1e3,m:6e4}[n[2]]:1)*parseInt(r,10)},u=function(t){var e=r.document.location;return t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},s=function(t,e){var r=t.settings.forced_root_block;return""===(e=a.trim(void 0===e?t.getBody().innerHTML:e))||new RegExp("^<"+r+"[^>]*>((\xa0|&nbsp;|[ \t]|<br[^>]*>)+?|)</"+r+">|<br>$","i").test(e)},f=function(t){var e=parseInt(o.getItem(u(t)+"time"),10)||0;return!((new Date).getTime()-e>i(t.settings.autosave_retention,"20m"))||(c(t,!1),!1)},c=function(t,e){var r=u(t);o.removeItem(r+"draft"),o.removeItem(r+"time"),!1!==e&&t.fire("RemoveDraft")},m=function(t){var e=u(t);!s(t)&&t.isDirty()&&(o.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),o.setItem(e+"time",(new Date).getTime().toString()),t.fire("StoreDraft"))},l=function(t){var e=u(t);f(t)&&(t.setContent(o.getItem(e+"draft"),{format:"raw"}),t.fire("RestoreDraft"))},v=function(t){var e=i(t.settings.autosave_interval,"30s");n.setInterval(function(){t.removed||m(t)},e)},d=function(t){t.undoManager.transact(function(){l(t),c(t)}),t.focus()},g=tinymce.util.Tools.resolve("tinymce.EditorManager"),y=function(r){return function(t){t.setDisabled(!f(r));var e=function(){return t.setDisabled(!f(r))};return r.on("StoreDraft RestoreDraft RemoveDraft",e),function(){return r.off("StoreDraft RestoreDraft RemoveDraft",e)}}};!function e(){t.add("autosave",function(t){var e,r;return t.editorManager.on("BeforeUnload",function(t){var e;a.each(g.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e&&(t.preventDefault(),t.returnValue=e)}),v(e=t),e.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:function(){d(e)},onSetup:y(e)}),e.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:function(){d(e)},onSetup:y(e)}),t.on("init",function(){t.getParam("autosave_restore_when_empty",!1)&&t.dom.isEmpty(t.getBody())&&l(t)}),r=t,{hasDraft:function(){return f(r)},storeDraft:function(){return m(r)},restoreDraft:function(){return l(r)},removeDraft:function(t){return c(r,t)},isEmpty:function(t){return s(r,t)}}})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/bbcode/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "bbcode" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/bbcode')
+//   ES2015:
+//     import 'tinymce/plugins/bbcode'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/bbcode/plugin.js
@@ -1,1 +1,100 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var html2bbcode = function (s) {
+      s = global$1.trim(s);
+      var rep = function (re, str) {
+        s = s.replace(re, str);
+      };
+      rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi, '[url=$1]$2[/url]');
+      rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi, '[code][color=$1]$2[/color][/code]');
+      rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi, '[quote][color=$1]$2[/color][/quote]');
+      rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, '[code][color=$1]$2[/color][/code]');
+      rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, '[quote][color=$1]$2[/color][/quote]');
+      rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi, '[color=$1]$2[/color]');
+      rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, '[color=$1]$2[/color]');
+      rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi, '[size=$1]$2[/size]');
+      rep(/<font>(.*?)<\/font>/gi, '$1');
+      rep(/<img.*?src=\"(.*?)\".*?\/>/gi, '[img]$1[/img]');
+      rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi, '[code]$1[/code]');
+      rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi, '[quote]$1[/quote]');
+      rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi, '[code][b]$1[/b][/code]');
+      rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi, '[quote][b]$1[/b][/quote]');
+      rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi, '[code][i]$1[/i][/code]');
+      rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi, '[quote][i]$1[/i][/quote]');
+      rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi, '[code][u]$1[/u][/code]');
+      rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi, '[quote][u]$1[/u][/quote]');
+      rep(/<\/(strong|b)>/gi, '[/b]');
+      rep(/<(strong|b)>/gi, '[b]');
+      rep(/<\/(em|i)>/gi, '[/i]');
+      rep(/<(em|i)>/gi, '[i]');
+      rep(/<\/u>/gi, '[/u]');
+      rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi, '[u]$1[/u]');
+      rep(/<u>/gi, '[u]');
+      rep(/<blockquote[^>]*>/gi, '[quote]');
+      rep(/<\/blockquote>/gi, '[/quote]');
+      rep(/<br \/>/gi, '\n');
+      rep(/<br\/>/gi, '\n');
+      rep(/<br>/gi, '\n');
+      rep(/<p>/gi, '');
+      rep(/<\/p>/gi, '\n');
+      rep(/&nbsp;|\u00a0/gi, ' ');
+      rep(/&quot;/gi, '"');
+      rep(/&lt;/gi, '<');
+      rep(/&gt;/gi, '>');
+      rep(/&amp;/gi, '&');
+      return s;
+    };
+    var bbcode2html = function (s) {
+      s = global$1.trim(s);
+      var rep = function (re, str) {
+        s = s.replace(re, str);
+      };
+      rep(/\n/gi, '<br />');
+      rep(/\[b\]/gi, '<strong>');
+      rep(/\[\/b\]/gi, '</strong>');
+      rep(/\[i\]/gi, '<em>');
+      rep(/\[\/i\]/gi, '</em>');
+      rep(/\[u\]/gi, '<u>');
+      rep(/\[\/u\]/gi, '</u>');
+      rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi, '<a href="$1">$2</a>');
+      rep(/\[url\](.*?)\[\/url\]/gi, '<a href="$1">$1</a>');
+      rep(/\[img\](.*?)\[\/img\]/gi, '<img src="$1" />');
+      rep(/\[color=(.*?)\](.*?)\[\/color\]/gi, '<font color="$1">$2</font>');
+      rep(/\[code\](.*?)\[\/code\]/gi, '<span class="codeStyle">$1</span>&nbsp;');
+      rep(/\[quote.*?\](.*?)\[\/quote\]/gi, '<span class="quoteStyle">$1</span>&nbsp;');
+      return s;
+    };
+
+    function Plugin () {
+      global.add('bbcode', function (editor) {
+        editor.on('BeforeSetContent', function (e) {
+          e.content = bbcode2html(e.content);
+        });
+        editor.on('PostProcess', function (e) {
+          if (e.set) {
+            e.content = bbcode2html(e.content);
+          }
+          if (e.get) {
+            e.content = html2bbcode(e.content);
+          }
+        });
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/bbcode/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(t){t=e.trim(t);var o=function(o,e){t=t.replace(o,e)};return o(/\n/gi,"<br />"),o(/\[b\]/gi,"<strong>"),o(/\[\/b\]/gi,"</strong>"),o(/\[i\]/gi,"<em>"),o(/\[\/i\]/gi,"</em>"),o(/\[u\]/gi,"<u>"),o(/\[\/u\]/gi,"</u>"),o(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),o(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),o(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),o(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),o(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span>&nbsp;'),o(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span>&nbsp;'),t};!function i(){o.add("bbcode",function(o){o.on("BeforeSetContent",function(o){o.content=t(o.content)}),o.on("PostProcess",function(o){o.set&&(o.content=t(o.content)),o.get&&(o.content=function(t){t=e.trim(t);var o=function(o,e){t=t.replace(o,e)};return o(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),o(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),o(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),o(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),o(/<font>(.*?)<\/font>/gi,"$1"),o(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),o(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),o(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),o(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),o(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),o(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),o(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),o(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),o(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),o(/<\/(strong|b)>/gi,"[/b]"),o(/<(strong|b)>/gi,"[b]"),o(/<\/(em|i)>/gi,"[/i]"),o(/<(em|i)>/gi,"[i]"),o(/<\/u>/gi,"[/u]"),o(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),o(/<u>/gi,"[u]"),o(/<blockquote[^>]*>/gi,"[quote]"),o(/<\/blockquote>/gi,"[/quote]"),o(/<br \/>/gi,"\n"),o(/<br\/>/gi,"\n"),o(/<br>/gi,"\n"),o(/<p>/gi,""),o(/<\/p>/gi,"\n"),o(/&nbsp;|\u00a0/gi," "),o(/&quot;/gi,'"'),o(/&lt;/gi,"<"),o(/&gt;/gi,">"),o(/&amp;/gi,"&"),t}(o.content))})})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/charmap/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "charmap" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/charmap')
+//   ES2015:
+//     import 'tinymce/plugins/charmap'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/charmap/plugin.js
@@ -1,1 +1,1707 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var fireInsertCustomChar = function (editor, chr) {
+      return editor.fire('insertCustomChar', { chr: chr });
+    };
+
+    var insertChar = function (editor, chr) {
+      var evtChr = fireInsertCustomChar(editor, chr).chr;
+      editor.execCommand('mceInsertContent', false, evtChr);
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var getCharMap = function (editor) {
+      return editor.settings.charmap;
+    };
+    var getCharMapAppend = function (editor) {
+      return editor.settings.charmap_append;
+    };
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var typeOf = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf(value) === type;
+      };
+    };
+    var isArray = isType('array');
+
+    var nativePush = Array.prototype.push;
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var each = function (xs, f) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var findUntil = function (xs, pred, until) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return Option.some(x);
+        } else if (until(x, i)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var find = function (xs, pred) {
+      return findUntil(xs, pred, never);
+    };
+    var flatten = function (xs) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        if (!isArray(xs[i])) {
+          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
+        }
+        nativePush.apply(r, xs[i]);
+      }
+      return r;
+    };
+    var bind = function (xs, f) {
+      return flatten(map(xs, f));
+    };
+
+    var isArray$1 = global$1.isArray;
+    var UserDefined = 'User Defined';
+    var getDefaultCharMap = function () {
+      return [
+        {
+          name: 'Currency',
+          characters: [
+            [
+              36,
+              'dollar sign'
+            ],
+            [
+              162,
+              'cent sign'
+            ],
+            [
+              8364,
+              'euro sign'
+            ],
+            [
+              163,
+              'pound sign'
+            ],
+            [
+              165,
+              'yen sign'
+            ],
+            [
+              164,
+              'currency sign'
+            ],
+            [
+              8352,
+              'euro-currency sign'
+            ],
+            [
+              8353,
+              'colon sign'
+            ],
+            [
+              8354,
+              'cruzeiro sign'
+            ],
+            [
+              8355,
+              'french franc sign'
+            ],
+            [
+              8356,
+              'lira sign'
+            ],
+            [
+              8357,
+              'mill sign'
+            ],
+            [
+              8358,
+              'naira sign'
+            ],
+            [
+              8359,
+              'peseta sign'
+            ],
+            [
+              8360,
+              'rupee sign'
+            ],
+            [
+              8361,
+              'won sign'
+            ],
+            [
+              8362,
+              'new sheqel sign'
+            ],
+            [
+              8363,
+              'dong sign'
+            ],
+            [
+              8365,
+              'kip sign'
+            ],
+            [
+              8366,
+              'tugrik sign'
+            ],
+            [
+              8367,
+              'drachma sign'
+            ],
+            [
+              8368,
+              'german penny symbol'
+            ],
+            [
+              8369,
+              'peso sign'
+            ],
+            [
+              8370,
+              'guarani sign'
+            ],
+            [
+              8371,
+              'austral sign'
+            ],
+            [
+              8372,
+              'hryvnia sign'
+            ],
+            [
+              8373,
+              'cedi sign'
+            ],
+            [
+              8374,
+              'livre tournois sign'
+            ],
+            [
+              8375,
+              'spesmilo sign'
+            ],
+            [
+              8376,
+              'tenge sign'
+            ],
+            [
+              8377,
+              'indian rupee sign'
+            ],
+            [
+              8378,
+              'turkish lira sign'
+            ],
+            [
+              8379,
+              'nordic mark sign'
+            ],
+            [
+              8380,
+              'manat sign'
+            ],
+            [
+              8381,
+              'ruble sign'
+            ],
+            [
+              20870,
+              'yen character'
+            ],
+            [
+              20803,
+              'yuan character'
+            ],
+            [
+              22291,
+              'yuan character, in hong kong and taiwan'
+            ],
+            [
+              22278,
+              'yen/yuan character variant one'
+            ]
+          ]
+        },
+        {
+          name: 'Text',
+          characters: [
+            [
+              169,
+              'copyright sign'
+            ],
+            [
+              174,
+              'registered sign'
+            ],
+            [
+              8482,
+              'trade mark sign'
+            ],
+            [
+              8240,
+              'per mille sign'
+            ],
+            [
+              181,
+              'micro sign'
+            ],
+            [
+              183,
+              'middle dot'
+            ],
+            [
+              8226,
+              'bullet'
+            ],
+            [
+              8230,
+              'three dot leader'
+            ],
+            [
+              8242,
+              'minutes / feet'
+            ],
+            [
+              8243,
+              'seconds / inches'
+            ],
+            [
+              167,
+              'section sign'
+            ],
+            [
+              182,
+              'paragraph sign'
+            ],
+            [
+              223,
+              'sharp s / ess-zed'
+            ]
+          ]
+        },
+        {
+          name: 'Quotations',
+          characters: [
+            [
+              8249,
+              'single left-pointing angle quotation mark'
+            ],
+            [
+              8250,
+              'single right-pointing angle quotation mark'
+            ],
+            [
+              171,
+              'left pointing guillemet'
+            ],
+            [
+              187,
+              'right pointing guillemet'
+            ],
+            [
+              8216,
+              'left single quotation mark'
+            ],
+            [
+              8217,
+              'right single quotation mark'
+            ],
+            [
+              8220,
+              'left double quotation mark'
+            ],
+            [
+              8221,
+              'right double quotation mark'
+            ],
+            [
+              8218,
+              'single low-9 quotation mark'
+            ],
+            [
+              8222,
+              'double low-9 quotation mark'
+            ],
+            [
+              60,
+              'less-than sign'
+            ],
+            [
+              62,
+              'greater-than sign'
+            ],
+            [
+              8804,
+              'less-than or equal to'
+            ],
+            [
+              8805,
+              'greater-than or equal to'
+            ],
+            [
+              8211,
+              'en dash'
+            ],
+            [
+              8212,
+              'em dash'
+            ],
+            [
+              175,
+              'macron'
+            ],
+            [
+              8254,
+              'overline'
+            ],
+            [
+              164,
+              'currency sign'
+            ],
+            [
+              166,
+              'broken bar'
+            ],
+            [
+              168,
+              'diaeresis'
+            ],
+            [
+              161,
+              'inverted exclamation mark'
+            ],
+            [
+              191,
+              'turned question mark'
+            ],
+            [
+              710,
+              'circumflex accent'
+            ],
+            [
+              732,
+              'small tilde'
+            ],
+            [
+              176,
+              'degree sign'
+            ],
+            [
+              8722,
+              'minus sign'
+            ],
+            [
+              177,
+              'plus-minus sign'
+            ],
+            [
+              247,
+              'division sign'
+            ],
+            [
+              8260,
+              'fraction slash'
+            ],
+            [
+              215,
+              'multiplication sign'
+            ],
+            [
+              185,
+              'superscript one'
+            ],
+            [
+              178,
+              'superscript two'
+            ],
+            [
+              179,
+              'superscript three'
+            ],
+            [
+              188,
+              'fraction one quarter'
+            ],
+            [
+              189,
+              'fraction one half'
+            ],
+            [
+              190,
+              'fraction three quarters'
+            ]
+          ]
+        },
+        {
+          name: 'Mathematical',
+          characters: [
+            [
+              402,
+              'function / florin'
+            ],
+            [
+              8747,
+              'integral'
+            ],
+            [
+              8721,
+              'n-ary sumation'
+            ],
+            [
+              8734,
+              'infinity'
+            ],
+            [
+              8730,
+              'square root'
+            ],
+            [
+              8764,
+              'similar to'
+            ],
+            [
+              8773,
+              'approximately equal to'
+            ],
+            [
+              8776,
+              'almost equal to'
+            ],
+            [
+              8800,
+              'not equal to'
+            ],
+            [
+              8801,
+              'identical to'
+            ],
+            [
+              8712,
+              'element of'
+            ],
+            [
+              8713,
+              'not an element of'
+            ],
+            [
+              8715,
+              'contains as member'
+            ],
+            [
+              8719,
+              'n-ary product'
+            ],
+            [
+              8743,
+              'logical and'
+            ],
+            [
+              8744,
+              'logical or'
+            ],
+            [
+              172,
+              'not sign'
+            ],
+            [
+              8745,
+              'intersection'
+            ],
+            [
+              8746,
+              'union'
+            ],
+            [
+              8706,
+              'partial differential'
+            ],
+            [
+              8704,
+              'for all'
+            ],
+            [
+              8707,
+              'there exists'
+            ],
+            [
+              8709,
+              'diameter'
+            ],
+            [
+              8711,
+              'backward difference'
+            ],
+            [
+              8727,
+              'asterisk operator'
+            ],
+            [
+              8733,
+              'proportional to'
+            ],
+            [
+              8736,
+              'angle'
+            ]
+          ]
+        },
+        {
+          name: 'Extended Latin',
+          characters: [
+            [
+              192,
+              'A - grave'
+            ],
+            [
+              193,
+              'A - acute'
+            ],
+            [
+              194,
+              'A - circumflex'
+            ],
+            [
+              195,
+              'A - tilde'
+            ],
+            [
+              196,
+              'A - diaeresis'
+            ],
+            [
+              197,
+              'A - ring above'
+            ],
+            [
+              256,
+              'A - macron'
+            ],
+            [
+              198,
+              'ligature AE'
+            ],
+            [
+              199,
+              'C - cedilla'
+            ],
+            [
+              200,
+              'E - grave'
+            ],
+            [
+              201,
+              'E - acute'
+            ],
+            [
+              202,
+              'E - circumflex'
+            ],
+            [
+              203,
+              'E - diaeresis'
+            ],
+            [
+              274,
+              'E - macron'
+            ],
+            [
+              204,
+              'I - grave'
+            ],
+            [
+              205,
+              'I - acute'
+            ],
+            [
+              206,
+              'I - circumflex'
+            ],
+            [
+              207,
+              'I - diaeresis'
+            ],
+            [
+              298,
+              'I - macron'
+            ],
+            [
+              208,
+              'ETH'
+            ],
+            [
+              209,
+              'N - tilde'
+            ],
+            [
+              210,
+              'O - grave'
+            ],
+            [
+              211,
+              'O - acute'
+            ],
+            [
+              212,
+              'O - circumflex'
+            ],
+            [
+              213,
+              'O - tilde'
+            ],
+            [
+              214,
+              'O - diaeresis'
+            ],
+            [
+              216,
+              'O - slash'
+            ],
+            [
+              332,
+              'O - macron'
+            ],
+            [
+              338,
+              'ligature OE'
+            ],
+            [
+              352,
+              'S - caron'
+            ],
+            [
+              217,
+              'U - grave'
+            ],
+            [
+              218,
+              'U - acute'
+            ],
+            [
+              219,
+              'U - circumflex'
+            ],
+            [
+              220,
+              'U - diaeresis'
+            ],
+            [
+              362,
+              'U - macron'
+            ],
+            [
+              221,
+              'Y - acute'
+            ],
+            [
+              376,
+              'Y - diaeresis'
+            ],
+            [
+              562,
+              'Y - macron'
+            ],
+            [
+              222,
+              'THORN'
+            ],
+            [
+              224,
+              'a - grave'
+            ],
+            [
+              225,
+              'a - acute'
+            ],
+            [
+              226,
+              'a - circumflex'
+            ],
+            [
+              227,
+              'a - tilde'
+            ],
+            [
+              228,
+              'a - diaeresis'
+            ],
+            [
+              229,
+              'a - ring above'
+            ],
+            [
+              257,
+              'a - macron'
+            ],
+            [
+              230,
+              'ligature ae'
+            ],
+            [
+              231,
+              'c - cedilla'
+            ],
+            [
+              232,
+              'e - grave'
+            ],
+            [
+              233,
+              'e - acute'
+            ],
+            [
+              234,
+              'e - circumflex'
+            ],
+            [
+              235,
+              'e - diaeresis'
+            ],
+            [
+              275,
+              'e - macron'
+            ],
+            [
+              236,
+              'i - grave'
+            ],
+            [
+              237,
+              'i - acute'
+            ],
+            [
+              238,
+              'i - circumflex'
+            ],
+            [
+              239,
+              'i - diaeresis'
+            ],
+            [
+              299,
+              'i - macron'
+            ],
+            [
+              240,
+              'eth'
+            ],
+            [
+              241,
+              'n - tilde'
+            ],
+            [
+              242,
+              'o - grave'
+            ],
+            [
+              243,
+              'o - acute'
+            ],
+            [
+              244,
+              'o - circumflex'
+            ],
+            [
+              245,
+              'o - tilde'
+            ],
+            [
+              246,
+              'o - diaeresis'
+            ],
+            [
+              248,
+              'o slash'
+            ],
+            [
+              333,
+              'o macron'
+            ],
+            [
+              339,
+              'ligature oe'
+            ],
+            [
+              353,
+              's - caron'
+            ],
+            [
+              249,
+              'u - grave'
+            ],
+            [
+              250,
+              'u - acute'
+            ],
+            [
+              251,
+              'u - circumflex'
+            ],
+            [
+              252,
+              'u - diaeresis'
+            ],
+            [
+              363,
+              'u - macron'
+            ],
+            [
+              253,
+              'y - acute'
+            ],
+            [
+              254,
+              'thorn'
+            ],
+            [
+              255,
+              'y - diaeresis'
+            ],
+            [
+              563,
+              'y - macron'
+            ],
+            [
+              913,
+              'Alpha'
+            ],
+            [
+              914,
+              'Beta'
+            ],
+            [
+              915,
+              'Gamma'
+            ],
+            [
+              916,
+              'Delta'
+            ],
+            [
+              917,
+              'Epsilon'
+            ],
+            [
+              918,
+              'Zeta'
+            ],
+            [
+              919,
+              'Eta'
+            ],
+            [
+              920,
+              'Theta'
+            ],
+            [
+              921,
+              'Iota'
+            ],
+            [
+              922,
+              'Kappa'
+            ],
+            [
+              923,
+              'Lambda'
+            ],
+            [
+              924,
+              'Mu'
+            ],
+            [
+              925,
+              'Nu'
+            ],
+            [
+              926,
+              'Xi'
+            ],
+            [
+              927,
+              'Omicron'
+            ],
+            [
+              928,
+              'Pi'
+            ],
+            [
+              929,
+              'Rho'
+            ],
+            [
+              931,
+              'Sigma'
+            ],
+            [
+              932,
+              'Tau'
+            ],
+            [
+              933,
+              'Upsilon'
+            ],
+            [
+              934,
+              'Phi'
+            ],
+            [
+              935,
+              'Chi'
+            ],
+            [
+              936,
+              'Psi'
+            ],
+            [
+              937,
+              'Omega'
+            ],
+            [
+              945,
+              'alpha'
+            ],
+            [
+              946,
+              'beta'
+            ],
+            [
+              947,
+              'gamma'
+            ],
+            [
+              948,
+              'delta'
+            ],
+            [
+              949,
+              'epsilon'
+            ],
+            [
+              950,
+              'zeta'
+            ],
+            [
+              951,
+              'eta'
+            ],
+            [
+              952,
+              'theta'
+            ],
+            [
+              953,
+              'iota'
+            ],
+            [
+              954,
+              'kappa'
+            ],
+            [
+              955,
+              'lambda'
+            ],
+            [
+              956,
+              'mu'
+            ],
+            [
+              957,
+              'nu'
+            ],
+            [
+              958,
+              'xi'
+            ],
+            [
+              959,
+              'omicron'
+            ],
+            [
+              960,
+              'pi'
+            ],
+            [
+              961,
+              'rho'
+            ],
+            [
+              962,
+              'final sigma'
+            ],
+            [
+              963,
+              'sigma'
+            ],
+            [
+              964,
+              'tau'
+            ],
+            [
+              965,
+              'upsilon'
+            ],
+            [
+              966,
+              'phi'
+            ],
+            [
+              967,
+              'chi'
+            ],
+            [
+              968,
+              'psi'
+            ],
+            [
+              969,
+              'omega'
+            ]
+          ]
+        },
+        {
+          name: 'Symbols',
+          characters: [
+            [
+              8501,
+              'alef symbol'
+            ],
+            [
+              982,
+              'pi symbol'
+            ],
+            [
+              8476,
+              'real part symbol'
+            ],
+            [
+              978,
+              'upsilon - hook symbol'
+            ],
+            [
+              8472,
+              'Weierstrass p'
+            ],
+            [
+              8465,
+              'imaginary part'
+            ]
+          ]
+        },
+        {
+          name: 'Arrows',
+          characters: [
+            [
+              8592,
+              'leftwards arrow'
+            ],
+            [
+              8593,
+              'upwards arrow'
+            ],
+            [
+              8594,
+              'rightwards arrow'
+            ],
+            [
+              8595,
+              'downwards arrow'
+            ],
+            [
+              8596,
+              'left right arrow'
+            ],
+            [
+              8629,
+              'carriage return'
+            ],
+            [
+              8656,
+              'leftwards double arrow'
+            ],
+            [
+              8657,
+              'upwards double arrow'
+            ],
+            [
+              8658,
+              'rightwards double arrow'
+            ],
+            [
+              8659,
+              'downwards double arrow'
+            ],
+            [
+              8660,
+              'left right double arrow'
+            ],
+            [
+              8756,
+              'therefore'
+            ],
+            [
+              8834,
+              'subset of'
+            ],
+            [
+              8835,
+              'superset of'
+            ],
+            [
+              8836,
+              'not a subset of'
+            ],
+            [
+              8838,
+              'subset of or equal to'
+            ],
+            [
+              8839,
+              'superset of or equal to'
+            ],
+            [
+              8853,
+              'circled plus'
+            ],
+            [
+              8855,
+              'circled times'
+            ],
+            [
+              8869,
+              'perpendicular'
+            ],
+            [
+              8901,
+              'dot operator'
+            ],
+            [
+              8968,
+              'left ceiling'
+            ],
+            [
+              8969,
+              'right ceiling'
+            ],
+            [
+              8970,
+              'left floor'
+            ],
+            [
+              8971,
+              'right floor'
+            ],
+            [
+              9001,
+              'left-pointing angle bracket'
+            ],
+            [
+              9002,
+              'right-pointing angle bracket'
+            ],
+            [
+              9674,
+              'lozenge'
+            ],
+            [
+              9824,
+              'black spade suit'
+            ],
+            [
+              9827,
+              'black club suit'
+            ],
+            [
+              9829,
+              'black heart suit'
+            ],
+            [
+              9830,
+              'black diamond suit'
+            ],
+            [
+              8194,
+              'en space'
+            ],
+            [
+              8195,
+              'em space'
+            ],
+            [
+              8201,
+              'thin space'
+            ],
+            [
+              8204,
+              'zero width non-joiner'
+            ],
+            [
+              8205,
+              'zero width joiner'
+            ],
+            [
+              8206,
+              'left-to-right mark'
+            ],
+            [
+              8207,
+              'right-to-left mark'
+            ]
+          ]
+        }
+      ];
+    };
+    var charmapFilter = function (charmap) {
+      return global$1.grep(charmap, function (item) {
+        return isArray$1(item) && item.length === 2;
+      });
+    };
+    var getCharsFromSetting = function (settingValue) {
+      if (isArray$1(settingValue)) {
+        return [].concat(charmapFilter(settingValue));
+      }
+      if (typeof settingValue === 'function') {
+        return settingValue();
+      }
+      return [];
+    };
+    var extendCharMap = function (editor, charmap) {
+      var userCharMap = getCharMap(editor);
+      if (userCharMap) {
+        charmap = [{
+            name: UserDefined,
+            characters: getCharsFromSetting(userCharMap)
+          }];
+      }
+      var userCharMapAppend = getCharMapAppend(editor);
+      if (userCharMapAppend) {
+        var userDefinedGroup = global$1.grep(charmap, function (cg) {
+          return cg.name === UserDefined;
+        });
+        if (userDefinedGroup.length) {
+          userDefinedGroup[0].characters = [].concat(userDefinedGroup[0].characters).concat(getCharsFromSetting(userCharMapAppend));
+          return charmap;
+        }
+        return [].concat(charmap).concat({
+          name: UserDefined,
+          characters: getCharsFromSetting(userCharMapAppend)
+        });
+      }
+      return charmap;
+    };
+    var getCharMap$1 = function (editor) {
+      var groups = extendCharMap(editor, getDefaultCharMap());
+      return groups.length > 1 ? [{
+          name: 'All',
+          characters: bind(groups, function (g) {
+            return g.characters;
+          })
+        }].concat(groups) : groups;
+    };
+
+    var get = function (editor) {
+      var getCharMap = function () {
+        return getCharMap$1(editor);
+      };
+      var insertChar$1 = function (chr) {
+        insertChar(editor, chr);
+      };
+      return {
+        getCharMap: getCharMap,
+        insertChar: insertChar$1
+      };
+    };
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var last = function (fn, rate) {
+      var timer = null;
+      var cancel = function () {
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+          timer = null;
+        }
+      };
+      var throttle = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+        }
+        timer = domGlobals.setTimeout(function () {
+          fn.apply(null, args);
+          timer = null;
+        }, rate);
+      };
+      return {
+        cancel: cancel,
+        throttle: throttle
+      };
+    };
+
+    var nativeFromCodePoint = String.fromCodePoint;
+    var contains = function (str, substr) {
+      return str.indexOf(substr) !== -1;
+    };
+    var fromCodePoint = function () {
+      var codePoints = [];
+      for (var _i = 0; _i < arguments.length; _i++) {
+        codePoints[_i] = arguments[_i];
+      }
+      if (nativeFromCodePoint) {
+        return nativeFromCodePoint.apply(void 0, codePoints);
+      } else {
+        var codeUnits = [];
+        var codeLen = 0;
+        var result = '';
+        for (var index = 0, len = codePoints.length; index !== len; ++index) {
+          var codePoint = +codePoints[index];
+          if (!(codePoint < 1114111 && codePoint >>> 0 === codePoint)) {
+            throw RangeError('Invalid code point: ' + codePoint);
+          }
+          if (codePoint <= 65535) {
+            codeLen = codeUnits.push(codePoint);
+          } else {
+            codePoint -= 65536;
+            codeLen = codeUnits.push((codePoint >> 10) + 55296, codePoint % 1024 + 56320);
+          }
+          if (codeLen >= 16383) {
+            result += String.fromCharCode.apply(null, codeUnits);
+            codeUnits.length = 0;
+          }
+        }
+        return result + String.fromCharCode.apply(null, codeUnits);
+      }
+    };
+
+    var charMatches = function (charCode, name, lowerCasePattern) {
+      if (contains(fromCodePoint(charCode).toLowerCase(), lowerCasePattern)) {
+        return true;
+      } else {
+        return contains(name.toLowerCase(), lowerCasePattern) || contains(name.toLowerCase().replace(/\s+/g, ''), lowerCasePattern);
+      }
+    };
+    var scan = function (group, pattern) {
+      var matches = [];
+      var lowerCasePattern = pattern.toLowerCase();
+      each(group.characters, function (g) {
+        if (charMatches(g[0], g[1], lowerCasePattern)) {
+          matches.push(g);
+        }
+      });
+      return map(matches, function (m) {
+        return {
+          text: m[1],
+          value: fromCodePoint(m[0]),
+          icon: fromCodePoint(m[0])
+        };
+      });
+    };
+
+    var patternName = 'pattern';
+    var open = function (editor, charMap) {
+      var makeGroupItems = function () {
+        return [
+          {
+            label: 'Search',
+            type: 'input',
+            name: patternName
+          },
+          {
+            type: 'collection',
+            name: 'results'
+          }
+        ];
+      };
+      var makeTabs = function () {
+        return map(charMap, function (charGroup) {
+          return {
+            title: charGroup.name,
+            name: charGroup.name,
+            items: makeGroupItems()
+          };
+        });
+      };
+      var makePanel = function () {
+        return {
+          type: 'panel',
+          items: makeGroupItems()
+        };
+      };
+      var makeTabPanel = function () {
+        return {
+          type: 'tabpanel',
+          tabs: makeTabs()
+        };
+      };
+      var currentTab = charMap.length === 1 ? Cell(UserDefined) : Cell('All');
+      var scanAndSet = function (dialogApi, pattern) {
+        find(charMap, function (group) {
+          return group.name === currentTab.get();
+        }).each(function (f) {
+          var items = scan(f, pattern);
+          dialogApi.setData({ results: items });
+        });
+      };
+      var SEARCH_DELAY = 40;
+      var updateFilter = last(function (dialogApi) {
+        var pattern = dialogApi.getData().pattern;
+        scanAndSet(dialogApi, pattern);
+      }, SEARCH_DELAY);
+      var body = charMap.length === 1 ? makePanel() : makeTabPanel();
+      var initialData = {
+        pattern: '',
+        results: scan(charMap[0], '')
+      };
+      var bridgeSpec = {
+        title: 'Special Character',
+        size: 'normal',
+        body: body,
+        buttons: [{
+            type: 'cancel',
+            name: 'close',
+            text: 'Close',
+            primary: true
+          }],
+        initialData: initialData,
+        onAction: function (api, details) {
+          if (details.name === 'results') {
+            insertChar(editor, details.value);
+            api.close();
+          }
+        },
+        onTabChange: function (dialogApi, details) {
+          currentTab.set(details.newTabName);
+          updateFilter.throttle(dialogApi);
+        },
+        onChange: function (dialogApi, changeData) {
+          if (changeData.name === patternName) {
+            updateFilter.throttle(dialogApi);
+          }
+        }
+      };
+      var dialogApi = editor.windowManager.open(bridgeSpec);
+      dialogApi.focus(patternName);
+    };
+
+    var register = function (editor, charMap) {
+      editor.addCommand('mceShowCharmap', function () {
+        open(editor, charMap);
+      });
+    };
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Promise');
+
+    var init = function (editor, all) {
+      editor.ui.registry.addAutocompleter('charmap', {
+        ch: ':',
+        columns: 'auto',
+        minChars: 2,
+        fetch: function (pattern, _maxResults) {
+          return new global$2(function (resolve, _reject) {
+            resolve(scan(all, pattern));
+          });
+        },
+        onAction: function (autocompleteApi, rng, value) {
+          editor.selection.setRng(rng);
+          editor.insertContent(value);
+          autocompleteApi.hide();
+        }
+      });
+    };
+
+    var register$1 = function (editor) {
+      editor.ui.registry.addButton('charmap', {
+        icon: 'insert-character',
+        tooltip: 'Special character',
+        onAction: function () {
+          return editor.execCommand('mceShowCharmap');
+        }
+      });
+      editor.ui.registry.addMenuItem('charmap', {
+        icon: 'insert-character',
+        text: 'Special character...',
+        onAction: function () {
+          return editor.execCommand('mceShowCharmap');
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('charmap', function (editor) {
+        var charMap = getCharMap$1(editor);
+        register(editor, charMap);
+        register$1(editor);
+        init(editor, charMap[0]);
+        return get(editor);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/charmap/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(s){"use strict";var e,n,r,t,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=function(e,n){var r,t=(r=n,e.fire("insertCustomChar",{chr:r}).chr);e.execCommand("mceInsertContent",!1,t)},i=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(e){return function(){return e}},c=o(!1),u=o(!0),g=function(){return m},m=(e=function(e){return e.isNone()},{fold:function(e,n){return e()},is:c,isSome:c,isNone:u,getOr:r=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:r,orThunk:n,map:g,each:function(){},bind:g,exists:c,forall:u,filter:g,equals:e,equals_:e,toArray:function(){return[]},toString:o("none()")}),f=function(r){var e=o(r),n=function(){return a},t=function(e){return e(r)},a={fold:function(e,n){return n(r)},is:function(e){return r===e},isSome:u,isNone:c,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return f(e(r))},each:function(e){e(r)},bind:t,exists:t,forall:t,filter:function(e){return e(r)?a:m},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(e){return e.is(r)},equals_:function(e,n){return e.fold(c,function(e){return n(r,e)})}};return a},h={some:f,none:g,from:function(e){return null===e||e===undefined?m:f(e)}},d=(t="array",function(e){return r=typeof(n=e),(null===n?"null":"object"==r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}),p=Array.prototype.push,y=function(e,n){for(var r=e.length,t=new Array(r),a=0;a<r;a++){var i=e[a];t[a]=n(i,a)}return t},v=function(e,n){return function(e,n,r){for(var t=0,a=e.length;t<a;t++){var i=e[t];if(n(i,t))return h.some(i);if(r(i,t))break}return h.none()}(e,n,c)},w=function(e,n){return function(e){for(var n=[],r=0,t=e.length;r<t;++r){if(!d(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);p.apply(n,e[r])}return n}(y(e,n))},b=i.isArray,k="User Defined",C=function(e){return b(e)?[].concat((n=e,i.grep(n,function(e){return b(e)&&2===e.length}))):"function"==typeof e?e():[];var n},x=function(e){var n=function(e,n){var r=e.settings.charmap;r&&(n=[{name:k,characters:C(r)}]);var t=e.settings.charmap_append;if(t){var a=i.grep(n,function(e){return e.name===k});return a.length?(a[0].characters=[].concat(a[0].characters).concat(C(t)),n):[].concat(n).concat({name:k,characters:C(t)})}return n}(e,[{name:"Currency",characters:[[36,"dollar sign"],[162,"cent sign"],[8364,"euro sign"],[163,"pound sign"],[165,"yen sign"],[164,"currency sign"],[8352,"euro-currency sign"],[8353,"colon sign"],[8354,"cruzeiro sign"],[8355,"french franc sign"],[8356,"lira sign"],[8357,"mill sign"],[8358,"naira sign"],[8359,"peseta sign"],[8360,"rupee sign"],[8361,"won sign"],[8362,"new sheqel sign"],[8363,"dong sign"],[8365,"kip sign"],[8366,"tugrik sign"],[8367,"drachma sign"],[8368,"german penny symbol"],[8369,"peso sign"],[8370,"guarani sign"],[8371,"austral sign"],[8372,"hryvnia sign"],[8373,"cedi sign"],[8374,"livre tournois sign"],[8375,"spesmilo sign"],[8376,"tenge sign"],[8377,"indian rupee sign"],[8378,"turkish lira sign"],[8379,"nordic mark sign"],[8380,"manat sign"],[8381,"ruble sign"],[20870,"yen character"],[20803,"yuan character"],[22291,"yuan character, in hong kong and taiwan"],[22278,"yen/yuan character variant one"]]},{name:"Text",characters:[[169,"copyright sign"],[174,"registered sign"],[8482,"trade mark sign"],[8240,"per mille sign"],[181,"micro sign"],[183,"middle dot"],[8226,"bullet"],[8230,"three dot leader"],[8242,"minutes / feet"],[8243,"seconds / inches"],[167,"section sign"],[182,"paragraph sign"],[223,"sharp s / ess-zed"]]},{name:"Quotations",characters:[[8249,"single left-pointing angle quotation mark"],[8250,"single right-pointing angle quotation mark"],[171,"left pointing guillemet"],[187,"right pointing guillemet"],[8216,"left single quotation mark"],[8217,"right single quotation mark"],[8220,"left double quotation mark"],[8221,"right double quotation mark"],[8218,"single low-9 quotation mark"],[8222,"double low-9 quotation mark"],[60,"less-than sign"],[62,"greater-than sign"],[8804,"less-than or equal to"],[8805,"greater-than or equal to"],[8211,"en dash"],[8212,"em dash"],[175,"macron"],[8254,"overline"],[164,"currency sign"],[166,"broken bar"],[168,"diaeresis"],[161,"inverted exclamation mark"],[191,"turned question mark"],[710,"circumflex accent"],[732,"small tilde"],[176,"degree sign"],[8722,"minus sign"],[177,"plus-minus sign"],[247,"division sign"],[8260,"fraction slash"],[215,"multiplication sign"],[185,"superscript one"],[178,"superscript two"],[179,"superscript three"],[188,"fraction one quarter"],[189,"fraction one half"],[190,"fraction three quarters"]]},{name:"Mathematical",characters:[[402,"function / florin"],[8747,"integral"],[8721,"n-ary sumation"],[8734,"infinity"],[8730,"square root"],[8764,"similar to"],[8773,"approximately equal to"],[8776,"almost equal to"],[8800,"not equal to"],[8801,"identical to"],[8712,"element of"],[8713,"not an element of"],[8715,"contains as member"],[8719,"n-ary product"],[8743,"logical and"],[8744,"logical or"],[172,"not sign"],[8745,"intersection"],[8746,"union"],[8706,"partial differential"],[8704,"for all"],[8707,"there exists"],[8709,"diameter"],[8711,"backward difference"],[8727,"asterisk operator"],[8733,"proportional to"],[8736,"angle"]]},{name:"Extended Latin",characters:[[192,"A - grave"],[193,"A - acute"],[194,"A - circumflex"],[195,"A - tilde"],[196,"A - diaeresis"],[197,"A - ring above"],[256,"A - macron"],[198,"ligature AE"],[199,"C - cedilla"],[200,"E - grave"],[201,"E - acute"],[202,"E - circumflex"],[203,"E - diaeresis"],[274,"E - macron"],[204,"I - grave"],[205,"I - acute"],[206,"I - circumflex"],[207,"I - diaeresis"],[298,"I - macron"],[208,"ETH"],[209,"N - tilde"],[210,"O - grave"],[211,"O - acute"],[212,"O - circumflex"],[213,"O - tilde"],[214,"O - diaeresis"],[216,"O - slash"],[332,"O - macron"],[338,"ligature OE"],[352,"S - caron"],[217,"U - grave"],[218,"U - acute"],[219,"U - circumflex"],[220,"U - diaeresis"],[362,"U - macron"],[221,"Y - acute"],[376,"Y - diaeresis"],[562,"Y - macron"],[222,"THORN"],[224,"a - grave"],[225,"a - acute"],[226,"a - circumflex"],[227,"a - tilde"],[228,"a - diaeresis"],[229,"a - ring above"],[257,"a - macron"],[230,"ligature ae"],[231,"c - cedilla"],[232,"e - grave"],[233,"e - acute"],[234,"e - circumflex"],[235,"e - diaeresis"],[275,"e - macron"],[236,"i - grave"],[237,"i - acute"],[238,"i - circumflex"],[239,"i - diaeresis"],[299,"i - macron"],[240,"eth"],[241,"n - tilde"],[242,"o - grave"],[243,"o - acute"],[244,"o - circumflex"],[245,"o - tilde"],[246,"o - diaeresis"],[248,"o slash"],[333,"o macron"],[339,"ligature oe"],[353,"s - caron"],[249,"u - grave"],[250,"u - acute"],[251,"u - circumflex"],[252,"u - diaeresis"],[363,"u - macron"],[253,"y - acute"],[254,"thorn"],[255,"y - diaeresis"],[563,"y - macron"],[913,"Alpha"],[914,"Beta"],[915,"Gamma"],[916,"Delta"],[917,"Epsilon"],[918,"Zeta"],[919,"Eta"],[920,"Theta"],[921,"Iota"],[922,"Kappa"],[923,"Lambda"],[924,"Mu"],[925,"Nu"],[926,"Xi"],[927,"Omicron"],[928,"Pi"],[929,"Rho"],[931,"Sigma"],[932,"Tau"],[933,"Upsilon"],[934,"Phi"],[935,"Chi"],[936,"Psi"],[937,"Omega"],[945,"alpha"],[946,"beta"],[947,"gamma"],[948,"delta"],[949,"epsilon"],[950,"zeta"],[951,"eta"],[952,"theta"],[953,"iota"],[954,"kappa"],[955,"lambda"],[956,"mu"],[957,"nu"],[958,"xi"],[959,"omicron"],[960,"pi"],[961,"rho"],[962,"final sigma"],[963,"sigma"],[964,"tau"],[965,"upsilon"],[966,"phi"],[967,"chi"],[968,"psi"],[969,"omega"]]},{name:"Symbols",characters:[[8501,"alef symbol"],[982,"pi symbol"],[8476,"real part symbol"],[978,"upsilon - hook symbol"],[8472,"Weierstrass p"],[8465,"imaginary part"]]},{name:"Arrows",characters:[[8592,"leftwards arrow"],[8593,"upwards arrow"],[8594,"rightwards arrow"],[8595,"downwards arrow"],[8596,"left right arrow"],[8629,"carriage return"],[8656,"leftwards double arrow"],[8657,"upwards double arrow"],[8658,"rightwards double arrow"],[8659,"downwards double arrow"],[8660,"left right double arrow"],[8756,"therefore"],[8834,"subset of"],[8835,"superset of"],[8836,"not a subset of"],[8838,"subset of or equal to"],[8839,"superset of or equal to"],[8853,"circled plus"],[8855,"circled times"],[8869,"perpendicular"],[8901,"dot operator"],[8968,"left ceiling"],[8969,"right ceiling"],[8970,"left floor"],[8971,"right floor"],[9001,"left-pointing angle bracket"],[9002,"right-pointing angle bracket"],[9674,"lozenge"],[9824,"black spade suit"],[9827,"black club suit"],[9829,"black heart suit"],[9830,"black diamond suit"],[8194,"en space"],[8195,"em space"],[8201,"thin space"],[8204,"zero width non-joiner"],[8205,"zero width joiner"],[8206,"left-to-right mark"],[8207,"right-to-left mark"]]}]);return 1<n.length?[{name:"All",characters:w(n,function(e){return e.characters})}].concat(n):n},A=function(e){var n=e;return{get:function(){return n},set:function(e){n=e}}},O=String.fromCodePoint,q=function(e,n){return-1!==e.indexOf(n)},S=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(O)return O.apply(void 0,e);for(var r=[],t="",a=0,i=e.length;a!==i;++a){var o=+e[a];if(!(o<1114111&&o>>>0===o))throw RangeError("Invalid code point: "+o);16383<=(o<=65535?r.push(o):(o-=65536,r.push(55296+(o>>10),o%1024+56320)))&&(t+=String.fromCharCode.apply(null,r),r.length=0)}return t+String.fromCharCode.apply(null,r)},T=function(e,n){var a=[],i=n.toLowerCase();return function(e,n){for(var r=0,t=e.length;r<t;r++){n(e[r],r)}}(e.characters,function(e){var n,r,t;n=e[0],r=e[1],t=i,(q(S(n).toLowerCase(),t)||q(r.toLowerCase(),t)||q(r.toLowerCase().replace(/\s+/g,""),t))&&a.push(e)}),y(a,function(e){return{text:e[1],value:S(e[0]),icon:S(e[0])}})},E="pattern",I=function(r,a){var t,i,o,n=function(){return[{label:"Search",type:"input",name:E},{type:"collection",name:"results"}]},c=1===a.length?A(k):A("All"),u=(t=function(e){var r,t,n=e.getData().pattern;r=e,t=n,v(a,function(e){return e.name===c.get()}).each(function(e){var n=T(e,t);r.setData({results:n})})},i=40,o=null,{cancel:function(){null!==o&&(s.clearTimeout(o),o=null)},throttle:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];null!==o&&s.clearTimeout(o),o=s.setTimeout(function(){t.apply(null,e),o=null},i)}}),e={title:"Special Character",size:"normal",body:1===a.length?{type:"panel",items:n()}:{type:"tabpanel",tabs:y(a,function(e){return{title:e.name,name:e.name,items:n()}})},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{pattern:"",results:T(a[0],"")},onAction:function(e,n){"results"===n.name&&(l(r,n.value),e.close())},onTabChange:function(e,n){c.set(n.newTabName),u.throttle(e)},onChange:function(e,n){n.name===E&&u.throttle(e)}};r.windowManager.open(e).focus(E)},N=tinymce.util.Tools.resolve("tinymce.util.Promise");!function U(){a.add("charmap",function(e){var n,r,t,a,i,o,c=x(e);return r=c,(n=e).addCommand("mceShowCharmap",function(){I(n,r)}),(t=e).ui.registry.addButton("charmap",{icon:"insert-character",tooltip:"Special character",onAction:function(){return t.execCommand("mceShowCharmap")}}),t.ui.registry.addMenuItem("charmap",{icon:"insert-character",text:"Special character...",onAction:function(){return t.execCommand("mceShowCharmap")}}),a=e,i=c[0],a.ui.registry.addAutocompleter("charmap",{ch:":",columns:"auto",minChars:2,fetch:function(r,e){return new N(function(e,n){e(T(i,r))})},onAction:function(e,n,r){a.selection.setRng(n),a.insertContent(r),e.hide()}}),o=e,{getCharMap:function(){return x(o)},insertChar:function(e){l(o,e)}}})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/code/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "code" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/code')
+//   ES2015:
+//     import 'tinymce/plugins/code'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/code/plugin.js
@@ -1,1 +1,93 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var setContent = function (editor, html) {
+      editor.focus();
+      editor.undoManager.transact(function () {
+        editor.setContent(html);
+      });
+      editor.selection.setCursorLocation();
+      editor.nodeChanged();
+    };
+    var getContent = function (editor) {
+      return editor.getContent({ source_view: true });
+    };
+
+    var open = function (editor) {
+      var editorContent = getContent(editor);
+      editor.windowManager.open({
+        title: 'Source Code',
+        size: 'large',
+        body: {
+          type: 'panel',
+          items: [{
+              type: 'textarea',
+              name: 'code'
+            }]
+        },
+        buttons: [
+          {
+            type: 'cancel',
+            name: 'cancel',
+            text: 'Cancel'
+          },
+          {
+            type: 'submit',
+            name: 'save',
+            text: 'Save',
+            primary: true
+          }
+        ],
+        initialData: { code: editorContent },
+        onSubmit: function (api) {
+          setContent(editor, api.getData().code);
+          api.close();
+        }
+      });
+    };
+
+    var register = function (editor) {
+      editor.addCommand('mceCodeEditor', function () {
+        open(editor);
+      });
+    };
+
+    var register$1 = function (editor) {
+      editor.ui.registry.addButton('code', {
+        icon: 'sourcecode',
+        tooltip: 'Source code',
+        onAction: function () {
+          return open(editor);
+        }
+      });
+      editor.ui.registry.addMenuItem('code', {
+        icon: 'sourcecode',
+        text: 'Source code',
+        onAction: function () {
+          return open(editor);
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('code', function (editor) {
+        register(editor);
+        register$1(editor);
+        return {};
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/code/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(o){var e=o.getContent({source_view:!0});o.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:e},onSubmit:function(e){var t,n;t=o,n=e.getData().code,t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged(),e.close()}})};!function t(){e.add("code",function(e){var t,n;return(t=e).addCommand("mceCodeEditor",function(){o(t)}),(n=e).ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return o(n)}}),n.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return o(n)}}),{}})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/codesample/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "codesample" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/codesample')
+//   ES2015:
+//     import 'tinymce/plugins/codesample'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/codesample/plugin.js
@@ -1,1 +1,1718 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
+
+    function isCodeSample(elm) {
+      return elm && elm.nodeName === 'PRE' && elm.className.indexOf('language-') !== -1;
+    }
+    function trimArg(predicateFn) {
+      return function (arg1, arg2) {
+        return predicateFn(arg2);
+      };
+    }
+
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
+
+    var exports$1 = {}, module = { exports: exports$1 }, global$2 = {};
+    (function (define, exports, module, require) {
+      var oldprism = window.Prism;
+      window.Prism = { manual: true };
+      (function (f) {
+        if (typeof exports === 'object' && typeof module !== 'undefined') {
+          module.exports = f();
+        } else if (typeof define === 'function' && define.amd) {
+          define([], f);
+        } else {
+          var g;
+          if (typeof window !== 'undefined') {
+            g = window;
+          } else if (typeof global$2 !== 'undefined') {
+            g = global$2;
+          } else if (typeof self !== 'undefined') {
+            g = self;
+          } else {
+            g = this;
+          }
+          g.EphoxContactWrapper = f();
+        }
+      }(function () {
+        return function () {
+          function r(e, n, t) {
+            function o(i, f) {
+              if (!n[i]) {
+                if (!e[i]) {
+                  var c = 'function' == typeof require && require;
+                  if (!f && c)
+                    return c(i, !0);
+                  if (u)
+                    return u(i, !0);
+                  var a = new Error('Cannot find module \'' + i + '\'');
+                  throw a.code = 'MODULE_NOT_FOUND', a;
+                }
+                var p = n[i] = { exports: {} };
+                e[i][0].call(p.exports, function (r) {
+                  var n = e[i][1][r];
+                  return o(n || r);
+                }, p, p.exports, r, e, n, t);
+              }
+              return n[i].exports;
+            }
+            for (var u = 'function' == typeof require && require, i = 0; i < t.length; i++)
+              o(t[i]);
+            return o;
+          }
+          return r;
+        }()({
+          1: [
+            function (require, module, exports) {
+              Prism.languages.c = Prism.languages.extend('clike', {
+                'class-name': {
+                  pattern: /(\b(?:enum|struct)\s+)\w+/,
+                  lookbehind: true
+                },
+                'keyword': /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,
+                'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,
+                'number': /(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i
+              });
+              Prism.languages.insertBefore('c', 'string', {
+                'macro': {
+                  pattern: /(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,
+                  lookbehind: true,
+                  alias: 'property',
+                  inside: {
+                    'string': {
+                      pattern: /(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,
+                      lookbehind: true
+                    },
+                    'directive': {
+                      pattern: /(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,
+                      lookbehind: true,
+                      alias: 'keyword'
+                    }
+                  }
+                },
+                'constant': /\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/
+              });
+              delete Prism.languages.c['boolean'];
+            },
+            {}
+          ],
+          2: [
+            function (require, module, exports) {
+              Prism.languages.clike = {
+                'comment': [
+                  {
+                    pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
+                    lookbehind: true
+                  },
+                  {
+                    pattern: /(^|[^\\:])\/\/.*/,
+                    lookbehind: true,
+                    greedy: true
+                  }
+                ],
+                'string': {
+                  pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
+                  greedy: true
+                },
+                'class-name': {
+                  pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,
+                  lookbehind: true,
+                  inside: { 'punctuation': /[.\\]/ }
+                },
+                'keyword': /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
+                'boolean': /\b(?:true|false)\b/,
+                'function': /\w+(?=\()/,
+                'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,
+                'operator': /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
+                'punctuation': /[{}[\];(),.:]/
+              };
+            },
+            {}
+          ],
+          3: [
+            function (require, module, exports) {
+              (function (global) {
+                var _self = typeof window !== 'undefined' ? window : typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope ? self : {};
+                var Prism = function (_self) {
+                  var lang = /\blang(?:uage)?-([\w-]+)\b/i;
+                  var uniqueId = 0;
+                  var _ = {
+                    manual: _self.Prism && _self.Prism.manual,
+                    disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler,
+                    util: {
+                      encode: function (tokens) {
+                        if (tokens instanceof Token) {
+                          return new Token(tokens.type, _.util.encode(tokens.content), tokens.alias);
+                        } else if (Array.isArray(tokens)) {
+                          return tokens.map(_.util.encode);
+                        } else {
+                          return tokens.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\u00a0/g, ' ');
+                        }
+                      },
+                      type: function (o) {
+                        return Object.prototype.toString.call(o).slice(8, -1);
+                      },
+                      objId: function (obj) {
+                        if (!obj['__id']) {
+                          Object.defineProperty(obj, '__id', { value: ++uniqueId });
+                        }
+                        return obj['__id'];
+                      },
+                      clone: function deepClone(o, visited) {
+                        var clone, id, type = _.util.type(o);
+                        visited = visited || {};
+                        switch (type) {
+                        case 'Object':
+                          id = _.util.objId(o);
+                          if (visited[id]) {
+                            return visited[id];
+                          }
+                          clone = {};
+                          visited[id] = clone;
+                          for (var key in o) {
+                            if (o.hasOwnProperty(key)) {
+                              clone[key] = deepClone(o[key], visited);
+                            }
+                          }
+                          return clone;
+                        case 'Array':
+                          id = _.util.objId(o);
+                          if (visited[id]) {
+                            return visited[id];
+                          }
+                          clone = [];
+                          visited[id] = clone;
+                          o.forEach(function (v, i) {
+                            clone[i] = deepClone(v, visited);
+                          });
+                          return clone;
+                        default:
+                          return o;
+                        }
+                      },
+                      getLanguage: function (element) {
+                        while (element && !lang.test(element.className)) {
+                          element = element.parentElement;
+                        }
+                        if (element) {
+                          return (element.className.match(lang) || [
+                            ,
+                            'none'
+                          ])[1].toLowerCase();
+                        }
+                        return 'none';
+                      },
+                      currentScript: function () {
+                        if (typeof document === 'undefined') {
+                          return null;
+                        }
+                        if ('currentScript' in document) {
+                          return document.currentScript;
+                        }
+                        try {
+                          throw new Error();
+                        } catch (err) {
+                          var src = (/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(err.stack) || [])[1];
+                          if (src) {
+                            var scripts = document.getElementsByTagName('script');
+                            for (var i in scripts) {
+                              if (scripts[i].src == src) {
+                                return scripts[i];
+                              }
+                            }
+                          }
+                          return null;
+                        }
+                      }
+                    },
+                    languages: {
+                      extend: function (id, redef) {
+                        var lang = _.util.clone(_.languages[id]);
+                        for (var key in redef) {
+                          lang[key] = redef[key];
+                        }
+                        return lang;
+                      },
+                      insertBefore: function (inside, before, insert, root) {
+                        root = root || _.languages;
+                        var grammar = root[inside];
+                        var ret = {};
+                        for (var token in grammar) {
+                          if (grammar.hasOwnProperty(token)) {
+                            if (token == before) {
+                              for (var newToken in insert) {
+                                if (insert.hasOwnProperty(newToken)) {
+                                  ret[newToken] = insert[newToken];
+                                }
+                              }
+                            }
+                            if (!insert.hasOwnProperty(token)) {
+                              ret[token] = grammar[token];
+                            }
+                          }
+                        }
+                        var old = root[inside];
+                        root[inside] = ret;
+                        _.languages.DFS(_.languages, function (key, value) {
+                          if (value === old && key != inside) {
+                            this[key] = ret;
+                          }
+                        });
+                        return ret;
+                      },
+                      DFS: function DFS(o, callback, type, visited) {
+                        visited = visited || {};
+                        var objId = _.util.objId;
+                        for (var i in o) {
+                          if (o.hasOwnProperty(i)) {
+                            callback.call(o, i, o[i], type || i);
+                            var property = o[i], propertyType = _.util.type(property);
+                            if (propertyType === 'Object' && !visited[objId(property)]) {
+                              visited[objId(property)] = true;
+                              DFS(property, callback, null, visited);
+                            } else if (propertyType === 'Array' && !visited[objId(property)]) {
+                              visited[objId(property)] = true;
+                              DFS(property, callback, i, visited);
+                            }
+                          }
+                        }
+                      }
+                    },
+                    plugins: {},
+                    highlightAll: function (async, callback) {
+                      _.highlightAllUnder(document, async, callback);
+                    },
+                    highlightAllUnder: function (container, async, callback) {
+                      var env = {
+                        callback: callback,
+                        container: container,
+                        selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
+                      };
+                      _.hooks.run('before-highlightall', env);
+                      env.elements = Array.prototype.slice.apply(env.container.querySelectorAll(env.selector));
+                      _.hooks.run('before-all-elements-highlight', env);
+                      for (var i = 0, element; element = env.elements[i++];) {
+                        _.highlightElement(element, async === true, env.callback);
+                      }
+                    },
+                    highlightElement: function (element, async, callback) {
+                      var language = _.util.getLanguage(element);
+                      var grammar = _.languages[language];
+                      element.className = element.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
+                      var parent = element.parentNode;
+                      if (parent && parent.nodeName.toLowerCase() === 'pre') {
+                        parent.className = parent.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
+                      }
+                      var code = element.textContent;
+                      var env = {
+                        element: element,
+                        language: language,
+                        grammar: grammar,
+                        code: code
+                      };
+                      function insertHighlightedCode(highlightedCode) {
+                        env.highlightedCode = highlightedCode;
+                        _.hooks.run('before-insert', env);
+                        env.element.innerHTML = env.highlightedCode;
+                        _.hooks.run('after-highlight', env);
+                        _.hooks.run('complete', env);
+                        callback && callback.call(env.element);
+                      }
+                      _.hooks.run('before-sanity-check', env);
+                      if (!env.code) {
+                        _.hooks.run('complete', env);
+                        callback && callback.call(env.element);
+                        return;
+                      }
+                      _.hooks.run('before-highlight', env);
+                      if (!env.grammar) {
+                        insertHighlightedCode(_.util.encode(env.code));
+                        return;
+                      }
+                      if (async && _self.Worker) {
+                        var worker = new Worker(_.filename);
+                        worker.onmessage = function (evt) {
+                          insertHighlightedCode(evt.data);
+                        };
+                        worker.postMessage(JSON.stringify({
+                          language: env.language,
+                          code: env.code,
+                          immediateClose: true
+                        }));
+                      } else {
+                        insertHighlightedCode(_.highlight(env.code, env.grammar, env.language));
+                      }
+                    },
+                    highlight: function (text, grammar, language) {
+                      var env = {
+                        code: text,
+                        grammar: grammar,
+                        language: language
+                      };
+                      _.hooks.run('before-tokenize', env);
+                      env.tokens = _.tokenize(env.code, env.grammar);
+                      _.hooks.run('after-tokenize', env);
+                      return Token.stringify(_.util.encode(env.tokens), env.language);
+                    },
+                    matchGrammar: function (text, strarr, grammar, index, startPos, oneshot, target) {
+                      for (var token in grammar) {
+                        if (!grammar.hasOwnProperty(token) || !grammar[token]) {
+                          continue;
+                        }
+                        var patterns = grammar[token];
+                        patterns = Array.isArray(patterns) ? patterns : [patterns];
+                        for (var j = 0; j < patterns.length; ++j) {
+                          if (target && target == token + ',' + j) {
+                            return;
+                          }
+                          var pattern = patterns[j], inside = pattern.inside, lookbehind = !!pattern.lookbehind, greedy = !!pattern.greedy, lookbehindLength = 0, alias = pattern.alias;
+                          if (greedy && !pattern.pattern.global) {
+                            var flags = pattern.pattern.toString().match(/[imsuy]*$/)[0];
+                            pattern.pattern = RegExp(pattern.pattern.source, flags + 'g');
+                          }
+                          pattern = pattern.pattern || pattern;
+                          for (var i = index, pos = startPos; i < strarr.length; pos += strarr[i].length, ++i) {
+                            var str = strarr[i];
+                            if (strarr.length > text.length) {
+                              return;
+                            }
+                            if (str instanceof Token) {
+                              continue;
+                            }
+                            if (greedy && i != strarr.length - 1) {
+                              pattern.lastIndex = pos;
+                              var match = pattern.exec(text);
+                              if (!match) {
+                                break;
+                              }
+                              var from = match.index + (lookbehind && match[1] ? match[1].length : 0), to = match.index + match[0].length, k = i, p = pos;
+                              for (var len = strarr.length; k < len && (p < to || !strarr[k].type && !strarr[k - 1].greedy); ++k) {
+                                p += strarr[k].length;
+                                if (from >= p) {
+                                  ++i;
+                                  pos = p;
+                                }
+                              }
+                              if (strarr[i] instanceof Token) {
+                                continue;
+                              }
+                              delNum = k - i;
+                              str = text.slice(pos, p);
+                              match.index -= pos;
+                            } else {
+                              pattern.lastIndex = 0;
+                              var match = pattern.exec(str), delNum = 1;
+                            }
+                            if (!match) {
+                              if (oneshot) {
+                                break;
+                              }
+                              continue;
+                            }
+                            if (lookbehind) {
+                              lookbehindLength = match[1] ? match[1].length : 0;
+                            }
+                            var from = match.index + lookbehindLength, match = match[0].slice(lookbehindLength), to = from + match.length, before = str.slice(0, from), after = str.slice(to);
+                            var args = [
+                              i,
+                              delNum
+                            ];
+                            if (before) {
+                              ++i;
+                              pos += before.length;
+                              args.push(before);
+                            }
+                            var wrapped = new Token(token, inside ? _.tokenize(match, inside) : match, alias, match, greedy);
+                            args.push(wrapped);
+                            if (after) {
+                              args.push(after);
+                            }
+                            Array.prototype.splice.apply(strarr, args);
+                            if (delNum != 1)
+                              _.matchGrammar(text, strarr, grammar, i, pos, true, token + ',' + j);
+                            if (oneshot)
+                              break;
+                          }
+                        }
+                      }
+                    },
+                    tokenize: function (text, grammar) {
+                      var strarr = [text];
+                      var rest = grammar.rest;
+                      if (rest) {
+                        for (var token in rest) {
+                          grammar[token] = rest[token];
+                        }
+                        delete grammar.rest;
+                      }
+                      _.matchGrammar(text, strarr, grammar, 0, 0, false);
+                      return strarr;
+                    },
+                    hooks: {
+                      all: {},
+                      add: function (name, callback) {
+                        var hooks = _.hooks.all;
+                        hooks[name] = hooks[name] || [];
+                        hooks[name].push(callback);
+                      },
+                      run: function (name, env) {
+                        var callbacks = _.hooks.all[name];
+                        if (!callbacks || !callbacks.length) {
+                          return;
+                        }
+                        for (var i = 0, callback; callback = callbacks[i++];) {
+                          callback(env);
+                        }
+                      }
+                    },
+                    Token: Token
+                  };
+                  _self.Prism = _;
+                  function Token(type, content, alias, matchedStr, greedy) {
+                    this.type = type;
+                    this.content = content;
+                    this.alias = alias;
+                    this.length = (matchedStr || '').length | 0;
+                    this.greedy = !!greedy;
+                  }
+                  Token.stringify = function (o, language) {
+                    if (typeof o == 'string') {
+                      return o;
+                    }
+                    if (Array.isArray(o)) {
+                      return o.map(function (element) {
+                        return Token.stringify(element, language);
+                      }).join('');
+                    }
+                    var env = {
+                      type: o.type,
+                      content: Token.stringify(o.content, language),
+                      tag: 'span',
+                      classes: [
+                        'token',
+                        o.type
+                      ],
+                      attributes: {},
+                      language: language
+                    };
+                    if (o.alias) {
+                      var aliases = Array.isArray(o.alias) ? o.alias : [o.alias];
+                      Array.prototype.push.apply(env.classes, aliases);
+                    }
+                    _.hooks.run('wrap', env);
+                    var attributes = Object.keys(env.attributes).map(function (name) {
+                      return name + '="' + (env.attributes[name] || '').replace(/"/g, '&quot;') + '"';
+                    }).join(' ');
+                    return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + (attributes ? ' ' + attributes : '') + '>' + env.content + '</' + env.tag + '>';
+                  };
+                  if (!_self.document) {
+                    if (!_self.addEventListener) {
+                      return _;
+                    }
+                    if (!_.disableWorkerMessageHandler) {
+                      _self.addEventListener('message', function (evt) {
+                        var message = JSON.parse(evt.data), lang = message.language, code = message.code, immediateClose = message.immediateClose;
+                        _self.postMessage(_.highlight(code, _.languages[lang], lang));
+                        if (immediateClose) {
+                          _self.close();
+                        }
+                      }, false);
+                    }
+                    return _;
+                  }
+                  var script = _.util.currentScript();
+                  if (script) {
+                    _.filename = script.src;
+                    if (script.hasAttribute('data-manual')) {
+                      _.manual = true;
+                    }
+                  }
+                  if (!_.manual) {
+                    var highlightAutomaticallyCallback = function () {
+                      if (!_.manual) {
+                        _.highlightAll();
+                      }
+                    };
+                    var readyState = document.readyState;
+                    if (readyState === 'loading' || readyState === 'interactive' && script && script.defer) {
+                      document.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback);
+                    } else {
+                      if (window.requestAnimationFrame) {
+                        window.requestAnimationFrame(highlightAutomaticallyCallback);
+                      } else {
+                        window.setTimeout(highlightAutomaticallyCallback, 16);
+                      }
+                    }
+                  }
+                  return _;
+                }(_self);
+                if (typeof module !== 'undefined' && module.exports) {
+                  module.exports = Prism;
+                }
+                if (typeof global !== 'undefined') {
+                  global.Prism = Prism;
+                }
+              }.call(this, typeof global$2 !== 'undefined' ? global$2 : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {}));
+            },
+            {}
+          ],
+          4: [
+            function (require, module, exports) {
+              Prism.languages.cpp = Prism.languages.extend('c', {
+                'class-name': {
+                  pattern: /(\b(?:class|enum|struct)\s+)\w+/,
+                  lookbehind: true
+                },
+                'keyword': /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,
+                'number': {
+                  pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,
+                  greedy: true
+                },
+                'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
+                'boolean': /\b(?:true|false)\b/
+              });
+              Prism.languages.insertBefore('cpp', 'string', {
+                'raw-string': {
+                  pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
+                  alias: 'string',
+                  greedy: true
+                }
+              });
+            },
+            {}
+          ],
+          5: [
+            function (require, module, exports) {
+              Prism.languages.csharp = Prism.languages.extend('clike', {
+                'keyword': /\b(?:abstract|add|alias|as|ascending|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|global|goto|group|if|implicit|in|int|interface|internal|into|is|join|let|lock|long|namespace|new|null|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/,
+                'string': [
+                  {
+                    pattern: /@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/,
+                    greedy: true
+                  },
+                  {
+                    pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/,
+                    greedy: true
+                  }
+                ],
+                'class-name': [
+                  {
+                    pattern: /\b[A-Z]\w*(?:\.\w+)*\b(?=\s+\w+)/,
+                    inside: { punctuation: /\./ }
+                  },
+                  {
+                    pattern: /(\[)[A-Z]\w*(?:\.\w+)*\b/,
+                    lookbehind: true,
+                    inside: { punctuation: /\./ }
+                  },
+                  {
+                    pattern: /(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,
+                    lookbehind: true,
+                    inside: { punctuation: /\./ }
+                  },
+                  {
+                    pattern: /((?:\b(?:class|interface|new)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,
+                    lookbehind: true,
+                    inside: { punctuation: /\./ }
+                  }
+                ],
+                'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i,
+                'operator': />>=?|<<=?|[-=]>|([-+&|?])\1|~|[-+*/%&|^!=<>]=?/,
+                'punctuation': /\?\.?|::|[{}[\];(),.:]/
+              });
+              Prism.languages.insertBefore('csharp', 'class-name', {
+                'generic-method': {
+                  pattern: /\w+\s*<[^>\r\n]+?>\s*(?=\()/,
+                  inside: {
+                    function: /^\w+/,
+                    'class-name': {
+                      pattern: /\b[A-Z]\w*(?:\.\w+)*\b/,
+                      inside: { punctuation: /\./ }
+                    },
+                    keyword: Prism.languages.csharp.keyword,
+                    punctuation: /[<>(),.:]/
+                  }
+                },
+                'preprocessor': {
+                  pattern: /(^\s*)#.*/m,
+                  lookbehind: true,
+                  alias: 'property',
+                  inside: {
+                    'directive': {
+                      pattern: /(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,
+                      lookbehind: true,
+                      alias: 'keyword'
+                    }
+                  }
+                }
+              });
+              Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
+            },
+            {}
+          ],
+          6: [
+            function (require, module, exports) {
+              (function (Prism) {
+                var string = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;
+                Prism.languages.css = {
+                  'comment': /\/\*[\s\S]*?\*\//,
+                  'atrule': {
+                    pattern: /@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,
+                    inside: { 'rule': /@[\w-]+/ }
+                  },
+                  'url': {
+                    pattern: RegExp('url\\((?:' + string.source + '|[^\n\r()]*)\\)', 'i'),
+                    inside: {
+                      'function': /^url/i,
+                      'punctuation': /^\(|\)$/
+                    }
+                  },
+                  'selector': RegExp('[^{}\\s](?:[^{};"\']|' + string.source + ')*?(?=\\s*\\{)'),
+                  'string': {
+                    pattern: string,
+                    greedy: true
+                  },
+                  'property': /[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,
+                  'important': /!important\b/i,
+                  'function': /[-a-z0-9]+(?=\()/i,
+                  'punctuation': /[(){};:,]/
+                };
+                Prism.languages.css['atrule'].inside.rest = Prism.languages.css;
+                var markup = Prism.languages.markup;
+                if (markup) {
+                  markup.tag.addInlined('style', 'css');
+                  Prism.languages.insertBefore('inside', 'attr-value', {
+                    'style-attr': {
+                      pattern: /\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,
+                      inside: {
+                        'attr-name': {
+                          pattern: /^\s*style/i,
+                          inside: markup.tag.inside
+                        },
+                        'punctuation': /^\s*=\s*['"]|['"]\s*$/,
+                        'attr-value': {
+                          pattern: /.+/i,
+                          inside: Prism.languages.css
+                        }
+                      },
+                      alias: 'language-css'
+                    }
+                  }, markup.tag);
+                }
+              }(Prism));
+            },
+            {}
+          ],
+          7: [
+            function (require, module, exports) {
+              (function (Prism) {
+                var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/;
+                var className = /\b[A-Z](?:\w*[a-z]\w*)?\b/;
+                Prism.languages.java = Prism.languages.extend('clike', {
+                  'class-name': [
+                    className,
+                    /\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/
+                  ],
+                  'keyword': keywords,
+                  'function': [
+                    Prism.languages.clike.function,
+                    {
+                      pattern: /(\:\:)[a-z_]\w*/,
+                      lookbehind: true
+                    }
+                  ],
+                  'number': /\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,
+                  'operator': {
+                    pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,
+                    lookbehind: true
+                  }
+                });
+                Prism.languages.insertBefore('java', 'string', {
+                  'triple-quoted-string': {
+                    pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
+                    greedy: true,
+                    alias: 'string'
+                  }
+                });
+                Prism.languages.insertBefore('java', 'class-name', {
+                  'annotation': {
+                    alias: 'punctuation',
+                    pattern: /(^|[^.])@\w+/,
+                    lookbehind: true
+                  },
+                  'namespace': {
+                    pattern: /(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(?:\.[a-z]\w*)+/,
+                    lookbehind: true,
+                    inside: { 'punctuation': /\./ }
+                  },
+                  'generics': {
+                    pattern: /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,
+                    inside: {
+                      'class-name': className,
+                      'keyword': keywords,
+                      'punctuation': /[<>(),.:]/,
+                      'operator': /[?&|]/
+                    }
+                  }
+                });
+              }(Prism));
+            },
+            {}
+          ],
+          8: [
+            function (require, module, exports) {
+              Prism.languages.javascript = Prism.languages.extend('clike', {
+                'class-name': [
+                  Prism.languages.clike['class-name'],
+                  {
+                    pattern: /(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,
+                    lookbehind: true
+                  }
+                ],
+                'keyword': [
+                  {
+                    pattern: /((?:^|})\s*)(?:catch|finally)\b/,
+                    lookbehind: true
+                  },
+                  {
+                    pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
+                    lookbehind: true
+                  }
+                ],
+                'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,
+                'function': /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
+                'operator': /--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/
+              });
+              Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;
+              Prism.languages.insertBefore('javascript', 'keyword', {
+                'regex': {
+                  pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,
+                  lookbehind: true,
+                  greedy: true
+                },
+                'function-variable': {
+                  pattern: /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,
+                  alias: 'function'
+                },
+                'parameter': [
+                  {
+                    pattern: /(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,
+                    lookbehind: true,
+                    inside: Prism.languages.javascript
+                  },
+                  {
+                    pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,
+                    inside: Prism.languages.javascript
+                  },
+                  {
+                    pattern: /(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,
+                    lookbehind: true,
+                    inside: Prism.languages.javascript
+                  },
+                  {
+                    pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,
+                    lookbehind: true,
+                    inside: Prism.languages.javascript
+                  }
+                ],
+                'constant': /\b[A-Z](?:[A-Z_]|\dx?)*\b/
+              });
+              Prism.languages.insertBefore('javascript', 'string', {
+                'template-string': {
+                  pattern: /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,
+                  greedy: true,
+                  inside: {
+                    'template-punctuation': {
+                      pattern: /^`|`$/,
+                      alias: 'string'
+                    },
+                    'interpolation': {
+                      pattern: /((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,
+                      lookbehind: true,
+                      inside: {
+                        'interpolation-punctuation': {
+                          pattern: /^\${|}$/,
+                          alias: 'punctuation'
+                        },
+                        rest: Prism.languages.javascript
+                      }
+                    },
+                    'string': /[\s\S]+/
+                  }
+                }
+              });
+              if (Prism.languages.markup) {
+                Prism.languages.markup.tag.addInlined('script', 'javascript');
+              }
+              Prism.languages.js = Prism.languages.javascript;
+            },
+            {}
+          ],
+          9: [
+            function (require, module, exports) {
+              (function (Prism) {
+                function getPlaceholder(language, index) {
+                  return '___' + language.toUpperCase() + index + '___';
+                }
+                Object.defineProperties(Prism.languages['markup-templating'] = {}, {
+                  buildPlaceholders: {
+                    value: function (env, language, placeholderPattern, replaceFilter) {
+                      if (env.language !== language) {
+                        return;
+                      }
+                      var tokenStack = env.tokenStack = [];
+                      env.code = env.code.replace(placeholderPattern, function (match) {
+                        if (typeof replaceFilter === 'function' && !replaceFilter(match)) {
+                          return match;
+                        }
+                        var i = tokenStack.length;
+                        var placeholder;
+                        while (env.code.indexOf(placeholder = getPlaceholder(language, i)) !== -1)
+                          ++i;
+                        tokenStack[i] = match;
+                        return placeholder;
+                      });
+                      env.grammar = Prism.languages.markup;
+                    }
+                  },
+                  tokenizePlaceholders: {
+                    value: function (env, language) {
+                      if (env.language !== language || !env.tokenStack) {
+                        return;
+                      }
+                      env.grammar = Prism.languages[language];
+                      var j = 0;
+                      var keys = Object.keys(env.tokenStack);
+                      function walkTokens(tokens) {
+                        for (var i = 0; i < tokens.length; i++) {
+                          if (j >= keys.length) {
+                            break;
+                          }
+                          var token = tokens[i];
+                          if (typeof token === 'string' || token.content && typeof token.content === 'string') {
+                            var k = keys[j];
+                            var t = env.tokenStack[k];
+                            var s = typeof token === 'string' ? token : token.content;
+                            var placeholder = getPlaceholder(language, k);
+                            var index = s.indexOf(placeholder);
+                            if (index > -1) {
+                              ++j;
+                              var before = s.substring(0, index);
+                              var middle = new Prism.Token(language, Prism.tokenize(t, env.grammar), 'language-' + language, t);
+                              var after = s.substring(index + placeholder.length);
+                              var replacement = [];
+                              if (before) {
+                                replacement.push.apply(replacement, walkTokens([before]));
+                              }
+                              replacement.push(middle);
+                              if (after) {
+                                replacement.push.apply(replacement, walkTokens([after]));
+                              }
+                              if (typeof token === 'string') {
+                                tokens.splice.apply(tokens, [
+                                  i,
+                                  1
+                                ].concat(replacement));
+                              } else {
+                                token.content = replacement;
+                              }
+                            }
+                          } else if (token.content) {
+                            walkTokens(token.content);
+                          }
+                        }
+                        return tokens;
+                      }
+                      walkTokens(env.tokens);
+                    }
+                  }
+                });
+              }(Prism));
+            },
+            {}
+          ],
+          10: [
+            function (require, module, exports) {
+              Prism.languages.markup = {
+                'comment': /<!--[\s\S]*?-->/,
+                'prolog': /<\?[\s\S]+?\?>/,
+                'doctype': {
+                  pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!<!--)[^"'\]]|"[^"]*"|'[^']*'|<!--[\s\S]*?-->)*\]\s*)?>/i,
+                  greedy: true
+                },
+                'cdata': /<!\[CDATA\[[\s\S]*?]]>/i,
+                'tag': {
+                  pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,
+                  greedy: true,
+                  inside: {
+                    'tag': {
+                      pattern: /^<\/?[^\s>\/]+/i,
+                      inside: {
+                        'punctuation': /^<\/?/,
+                        'namespace': /^[^\s>\/:]+:/
+                      }
+                    },
+                    'attr-value': {
+                      pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,
+                      inside: {
+                        'punctuation': [
+                          /^=/,
+                          {
+                            pattern: /^(\s*)["']|["']$/,
+                            lookbehind: true
+                          }
+                        ]
+                      }
+                    },
+                    'punctuation': /\/?>/,
+                    'attr-name': {
+                      pattern: /[^\s>\/]+/,
+                      inside: { 'namespace': /^[^\s>\/:]+:/ }
+                    }
+                  }
+                },
+                'entity': /&#?[\da-z]{1,8};/i
+              };
+              Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] = Prism.languages.markup['entity'];
+              Prism.hooks.add('wrap', function (env) {
+                if (env.type === 'entity') {
+                  env.attributes['title'] = env.content.replace(/&amp;/, '&');
+                }
+              });
+              Object.defineProperty(Prism.languages.markup.tag, 'addInlined', {
+                value: function addInlined(tagName, lang) {
+                  var includedCdataInside = {};
+                  includedCdataInside['language-' + lang] = {
+                    pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
+                    lookbehind: true,
+                    inside: Prism.languages[lang]
+                  };
+                  includedCdataInside['cdata'] = /^<!\[CDATA\[|\]\]>$/i;
+                  var inside = {
+                    'included-cdata': {
+                      pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
+                      inside: includedCdataInside
+                    }
+                  };
+                  inside['language-' + lang] = {
+                    pattern: /[\s\S]+/,
+                    inside: Prism.languages[lang]
+                  };
+                  var def = {};
+                  def[tagName] = {
+                    pattern: RegExp(/(<__[\s\S]*?>)(?:<!\[CDATA\[[\s\S]*?\]\]>\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g, tagName), 'i'),
+                    lookbehind: true,
+                    greedy: true,
+                    inside: inside
+                  };
+                  Prism.languages.insertBefore('markup', 'cdata', def);
+                }
+              });
+              Prism.languages.xml = Prism.languages.extend('markup', {});
+              Prism.languages.html = Prism.languages.markup;
+              Prism.languages.mathml = Prism.languages.markup;
+              Prism.languages.svg = Prism.languages.markup;
+            },
+            {}
+          ],
+          11: [
+            function (require, module, exports) {
+              (function (Prism) {
+                Prism.languages.php = Prism.languages.extend('clike', {
+                  'keyword': /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,
+                  'boolean': {
+                    pattern: /\b(?:false|true)\b/i,
+                    alias: 'constant'
+                  },
+                  'constant': [
+                    /\b[A-Z_][A-Z0-9_]*\b/,
+                    /\b(?:null)\b/i
+                  ],
+                  'comment': {
+                    pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
+                    lookbehind: true
+                  }
+                });
+                Prism.languages.insertBefore('php', 'string', {
+                  'shell-comment': {
+                    pattern: /(^|[^\\])#.*/,
+                    lookbehind: true,
+                    alias: 'comment'
+                  }
+                });
+                Prism.languages.insertBefore('php', 'comment', {
+                  'delimiter': {
+                    pattern: /\?>$|^<\?(?:php(?=\s)|=)?/i,
+                    alias: 'important'
+                  }
+                });
+                Prism.languages.insertBefore('php', 'keyword', {
+                  'variable': /\$+(?:\w+\b|(?={))/i,
+                  'package': {
+                    pattern: /(\\|namespace\s+|use\s+)[\w\\]+/,
+                    lookbehind: true,
+                    inside: { punctuation: /\\/ }
+                  }
+                });
+                Prism.languages.insertBefore('php', 'operator', {
+                  'property': {
+                    pattern: /(->)[\w]+/,
+                    lookbehind: true
+                  }
+                });
+                var string_interpolation = {
+                  pattern: /{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,
+                  lookbehind: true,
+                  inside: Prism.languages.php
+                };
+                Prism.languages.insertBefore('php', 'string', {
+                  'nowdoc-string': {
+                    pattern: /<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,
+                    greedy: true,
+                    alias: 'string',
+                    inside: {
+                      'delimiter': {
+                        pattern: /^<<<'[^']+'|[a-z_]\w*;$/i,
+                        alias: 'symbol',
+                        inside: { 'punctuation': /^<<<'?|[';]$/ }
+                      }
+                    }
+                  },
+                  'heredoc-string': {
+                    pattern: /<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,
+                    greedy: true,
+                    alias: 'string',
+                    inside: {
+                      'delimiter': {
+                        pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,
+                        alias: 'symbol',
+                        inside: { 'punctuation': /^<<<"?|[";]$/ }
+                      },
+                      'interpolation': string_interpolation
+                    }
+                  },
+                  'single-quoted-string': {
+                    pattern: /'(?:\\[\s\S]|[^\\'])*'/,
+                    greedy: true,
+                    alias: 'string'
+                  },
+                  'double-quoted-string': {
+                    pattern: /"(?:\\[\s\S]|[^\\"])*"/,
+                    greedy: true,
+                    alias: 'string',
+                    inside: { 'interpolation': string_interpolation }
+                  }
+                });
+                delete Prism.languages.php['string'];
+                Prism.hooks.add('before-tokenize', function (env) {
+                  if (!/<\?/.test(env.code)) {
+                    return;
+                  }
+                  var phpPattern = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/ig;
+                  Prism.languages['markup-templating'].buildPlaceholders(env, 'php', phpPattern);
+                });
+                Prism.hooks.add('after-tokenize', function (env) {
+                  Prism.languages['markup-templating'].tokenizePlaceholders(env, 'php');
+                });
+              }(Prism));
+            },
+            {}
+          ],
+          12: [
+            function (require, module, exports) {
+              Prism.languages.python = {
+                'comment': {
+                  pattern: /(^|[^\\])#.*/,
+                  lookbehind: true
+                },
+                'string-interpolation': {
+                  pattern: /(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
+                  greedy: true,
+                  inside: {
+                    'interpolation': {
+                      pattern: /((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,
+                      lookbehind: true,
+                      inside: {
+                        'format-spec': {
+                          pattern: /(:)[^:(){}]+(?=}$)/,
+                          lookbehind: true
+                        },
+                        'conversion-option': {
+                          pattern: /![sra](?=[:}]$)/,
+                          alias: 'punctuation'
+                        },
+                        rest: null
+                      }
+                    },
+                    'string': /[\s\S]+/
+                  }
+                },
+                'triple-quoted-string': {
+                  pattern: /(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,
+                  greedy: true,
+                  alias: 'string'
+                },
+                'string': {
+                  pattern: /(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
+                  greedy: true
+                },
+                'function': {
+                  pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
+                  lookbehind: true
+                },
+                'class-name': {
+                  pattern: /(\bclass\s+)\w+/i,
+                  lookbehind: true
+                },
+                'decorator': {
+                  pattern: /(^\s*)@\w+(?:\.\w+)*/im,
+                  lookbehind: true,
+                  alias: [
+                    'annotation',
+                    'punctuation'
+                  ],
+                  inside: { 'punctuation': /\./ }
+                },
+                'keyword': /\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
+                'builtin': /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
+                'boolean': /\b(?:True|False|None)\b/,
+                'number': /(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,
+                'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
+                'punctuation': /[{}[\];(),.:]/
+              };
+              Prism.languages.python['string-interpolation'].inside['interpolation'].inside.rest = Prism.languages.python;
+              Prism.languages.py = Prism.languages.python;
+            },
+            {}
+          ],
+          13: [
+            function (require, module, exports) {
+              (function (Prism) {
+                Prism.languages.ruby = Prism.languages.extend('clike', {
+                  'comment': [
+                    /#.*/,
+                    {
+                      pattern: /^=begin\s[\s\S]*?^=end/m,
+                      greedy: true
+                    }
+                  ],
+                  'class-name': {
+                    pattern: /(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,
+                    lookbehind: true,
+                    inside: { 'punctuation': /[.\\]/ }
+                  },
+                  'keyword': /\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/
+                });
+                var interpolation = {
+                  pattern: /#\{[^}]+\}/,
+                  inside: {
+                    'delimiter': {
+                      pattern: /^#\{|\}$/,
+                      alias: 'tag'
+                    },
+                    rest: Prism.languages.ruby
+                  }
+                };
+                delete Prism.languages.ruby.function;
+                Prism.languages.insertBefore('ruby', 'keyword', {
+                  'regex': [
+                    {
+                      pattern: /%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,
+                      greedy: true,
+                      inside: { 'interpolation': interpolation }
+                    },
+                    {
+                      pattern: /%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,
+                      greedy: true,
+                      inside: { 'interpolation': interpolation }
+                    },
+                    {
+                      pattern: /%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,
+                      greedy: true,
+                      inside: { 'interpolation': interpolation }
+                    },
+                    {
+                      pattern: /%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,
+                      greedy: true,
+                      inside: { 'interpolation': interpolation }
+                    },
+                    {
+                      pattern: /%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,
+                      greedy: true,
+                      inside: { 'interpolation': interpolation }
+                    },
+                    {
+                      pattern: /(^|[^/])\/(?!\/)(?:\[.+?]|\\.|[^/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,
+                      lookbehind: true,
+                      greedy: true
+                    }
+                  ],
+                  'variable': /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
+                  'symbol': {
+                    pattern: /(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,
+                    lookbehind: true
+                  },
+                  'method-definition': {
+                    pattern: /(\bdef\s+)[\w.]+/,
+                    lookbehind: true,
+                    inside: {
+                      'function': /\w+$/,
+                      rest: Prism.languages.ruby
+                    }
+                  }
+                });
+                Prism.languages.insertBefore('ruby', 'number', {
+                  'builtin': /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,
+                  'constant': /\b[A-Z]\w*(?:[?!]|\b)/
+                });
+                Prism.languages.ruby.string = [
+                  {
+                    pattern: /%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,
+                    greedy: true,
+                    inside: { 'interpolation': interpolation }
+                  },
+                  {
+                    pattern: /%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,
+                    greedy: true,
+                    inside: { 'interpolation': interpolation }
+                  },
+                  {
+                    pattern: /%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,
+                    greedy: true,
+                    inside: { 'interpolation': interpolation }
+                  },
+                  {
+                    pattern: /%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,
+                    greedy: true,
+                    inside: { 'interpolation': interpolation }
+                  },
+                  {
+                    pattern: /%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,
+                    greedy: true,
+                    inside: { 'interpolation': interpolation }
+                  },
+                  {
+                    pattern: /("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
+                    greedy: true,
+                    inside: { 'interpolation': interpolation }
+                  }
+                ];
+                Prism.languages.rb = Prism.languages.ruby;
+              }(Prism));
+            },
+            {}
+          ],
+          14: [
+            function (require, module, exports) {
+              var Prism = require('prismjs/components/prism-core');
+              require('prismjs/components/prism-clike');
+              require('prismjs/components/prism-markup-templating');
+              require('prismjs/components/prism-c');
+              require('prismjs/components/prism-cpp');
+              require('prismjs/components/prism-csharp');
+              require('prismjs/components/prism-css');
+              require('prismjs/components/prism-java');
+              require('prismjs/components/prism-javascript');
+              require('prismjs/components/prism-markup');
+              require('prismjs/components/prism-php');
+              require('prismjs/components/prism-python');
+              require('prismjs/components/prism-ruby');
+              module.exports = { boltExport: Prism };
+            },
+            {
+              'prismjs/components/prism-c': 1,
+              'prismjs/components/prism-clike': 2,
+              'prismjs/components/prism-core': 3,
+              'prismjs/components/prism-cpp': 4,
+              'prismjs/components/prism-csharp': 5,
+              'prismjs/components/prism-css': 6,
+              'prismjs/components/prism-java': 7,
+              'prismjs/components/prism-javascript': 8,
+              'prismjs/components/prism-markup': 10,
+              'prismjs/components/prism-markup-templating': 9,
+              'prismjs/components/prism-php': 11,
+              'prismjs/components/prism-python': 12,
+              'prismjs/components/prism-ruby': 13
+            }
+          ]
+        }, {}, [14])(14);
+      }));
+      var prism = window.Prism;
+      window.Prism = oldprism;
+      return prism;
+    }(undefined, exports$1, module, undefined));
+    var Prism$1 = module.exports.boltExport;
+
+    var getLanguages = function (editor) {
+      return editor.getParam('codesample_languages');
+    };
+    var useGlobalPrismJS = function (editor) {
+      return editor.getParam('codesample_global_prismjs', false, 'boolean');
+    };
+
+    var get = function (editor) {
+      return Global.Prism && useGlobalPrismJS(editor) ? Global.Prism : Prism$1;
+    };
+
+    var getSelectedCodeSample = function (editor) {
+      var node = editor.selection ? editor.selection.getNode() : null;
+      if (isCodeSample(node)) {
+        return Option.some(node);
+      }
+      return Option.none();
+    };
+    var insertCodeSample = function (editor, language, code) {
+      editor.undoManager.transact(function () {
+        var node = getSelectedCodeSample(editor);
+        code = global$1.DOM.encode(code);
+        return node.fold(function () {
+          editor.insertContent('<pre id="__new" class="language-' + language + '">' + code + '</pre>');
+          editor.selection.select(editor.$('#__new').removeAttr('id')[0]);
+        }, function (n) {
+          editor.dom.setAttrib(n, 'class', 'language-' + language);
+          n.innerHTML = code;
+          get(editor).highlightElement(n);
+          editor.selection.select(n);
+        });
+      });
+    };
+    var getCurrentCode = function (editor) {
+      var node = getSelectedCodeSample(editor);
+      return node.fold(function () {
+        return '';
+      }, function (n) {
+        return n.textContent;
+      });
+    };
+
+    var getLanguages$1 = function (editor) {
+      var defaultLanguages = [
+        {
+          text: 'HTML/XML',
+          value: 'markup'
+        },
+        {
+          text: 'JavaScript',
+          value: 'javascript'
+        },
+        {
+          text: 'CSS',
+          value: 'css'
+        },
+        {
+          text: 'PHP',
+          value: 'php'
+        },
+        {
+          text: 'Ruby',
+          value: 'ruby'
+        },
+        {
+          text: 'Python',
+          value: 'python'
+        },
+        {
+          text: 'Java',
+          value: 'java'
+        },
+        {
+          text: 'C',
+          value: 'c'
+        },
+        {
+          text: 'C#',
+          value: 'csharp'
+        },
+        {
+          text: 'C++',
+          value: 'cpp'
+        }
+      ];
+      var customLanguages = getLanguages(editor);
+      return customLanguages ? customLanguages : defaultLanguages;
+    };
+    var getCurrentLanguage = function (editor, fallback) {
+      var node = getSelectedCodeSample(editor);
+      return node.fold(function () {
+        return fallback;
+      }, function (n) {
+        var matches = n.className.match(/language-(\w+)/);
+        return matches ? matches[1] : fallback;
+      });
+    };
+
+    var head = function (xs) {
+      return xs.length === 0 ? Option.none() : Option.some(xs[0]);
+    };
+
+    var open = function (editor) {
+      var languages = getLanguages$1(editor);
+      var defaultLanguage = head(languages).fold(function () {
+        return '';
+      }, function (l) {
+        return l.value;
+      });
+      var currentLanguage = getCurrentLanguage(editor, defaultLanguage);
+      var currentCode = getCurrentCode(editor);
+      editor.windowManager.open({
+        title: 'Insert/Edit Code Sample',
+        size: 'large',
+        body: {
+          type: 'panel',
+          items: [
+            {
+              type: 'selectbox',
+              name: 'language',
+              label: 'Language',
+              items: languages
+            },
+            {
+              type: 'textarea',
+              name: 'code',
+              label: 'Code view'
+            }
+          ]
+        },
+        buttons: [
+          {
+            type: 'cancel',
+            name: 'cancel',
+            text: 'Cancel'
+          },
+          {
+            type: 'submit',
+            name: 'save',
+            text: 'Save',
+            primary: true
+          }
+        ],
+        initialData: {
+          language: currentLanguage,
+          code: currentCode
+        },
+        onSubmit: function (api) {
+          var data = api.getData();
+          insertCodeSample(editor, data.language, data.code);
+          api.close();
+        }
+      });
+    };
+
+    var register = function (editor) {
+      editor.addCommand('codesample', function () {
+        var node = editor.selection.getNode();
+        if (editor.selection.isCollapsed() || isCodeSample(node)) {
+          open(editor);
+        } else {
+          editor.formatter.toggle('code');
+        }
+      });
+    };
+
+    var setup = function (editor) {
+      var $ = editor.$;
+      editor.on('PreProcess', function (e) {
+        $('pre[contenteditable=false]', e.node).filter(trimArg(isCodeSample)).each(function (idx, elm) {
+          var $elm = $(elm), code = elm.textContent;
+          $elm.attr('class', $.trim($elm.attr('class')));
+          $elm.removeAttr('contentEditable');
+          $elm.empty().append($('<code></code>').each(function () {
+            this.textContent = code;
+          }));
+        });
+      });
+      editor.on('SetContent', function () {
+        var unprocessedCodeSamples = $('pre').filter(trimArg(isCodeSample)).filter(function (idx, elm) {
+          return elm.contentEditable !== 'false';
+        });
+        if (unprocessedCodeSamples.length) {
+          editor.undoManager.transact(function () {
+            unprocessedCodeSamples.each(function (idx, elm) {
+              $(elm).find('br').each(function (idx, elm) {
+                elm.parentNode.replaceChild(editor.getDoc().createTextNode('\n'), elm);
+              });
+              elm.contentEditable = 'false';
+              elm.innerHTML = editor.dom.encode(elm.textContent);
+              get(editor).highlightElement(elm);
+              elm.className = $.trim(elm.className);
+            });
+          });
+        }
+      });
+    };
+
+    var isCodeSampleSelection = function (editor) {
+      var node = editor.selection.getStart();
+      return editor.dom.is(node, 'pre[class*="language-"]');
+    };
+    var register$1 = function (editor) {
+      editor.ui.registry.addToggleButton('codesample', {
+        icon: 'code-sample',
+        tooltip: 'Insert/edit code sample',
+        onAction: function () {
+          return open(editor);
+        },
+        onSetup: function (api) {
+          var nodeChangeHandler = function () {
+            api.setActive(isCodeSampleSelection(editor));
+          };
+          editor.on('NodeChange', nodeChangeHandler);
+          return function () {
+            return editor.off('NodeChange', nodeChangeHandler);
+          };
+        }
+      });
+      editor.ui.registry.addMenuItem('codesample', {
+        text: 'Code sample...',
+        icon: 'code-sample',
+        onAction: function () {
+          return open(editor);
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('codesample', function (editor) {
+        setup(editor);
+        register$1(editor);
+        register(editor);
+        editor.on('dblclick', function (ev) {
+          if (isCodeSample(ev.target)) {
+            open(editor);
+          }
+        });
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/codesample/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(e){"use strict";var n,t,a,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e){return function(){return e}},s=i(!1),o=i(!0),l=function(){return u},u=(n=function(e){return e.isNone()},{fold:function(e,n){return e()},is:s,isSome:s,isNone:o,getOr:a=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:a,orThunk:t,map:l,each:function(){},bind:l,exists:s,forall:o,filter:l,equals:n,equals_:n,toArray:function(){return[]},toString:i("none()")}),c=function(t){var e=i(t),n=function(){return r},a=function(e){return e(t)},r={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:o,isNone:s,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return c(e(t))},each:function(e){e(t)},bind:a,exists:a,forall:a,filter:function(e){return e(t)?r:u},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(s,function(e){return n(t,e)})}};return r},d={some:c,none:l,from:function(e){return null===e||e===undefined?u:c(e)}},p=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils");function g(e){return e&&"PRE"===e.nodeName&&-1!==e.className.indexOf("language-")}function m(t){return function(e,n){return t(n)}}var f="undefined"!=typeof e.window?e.window:Function("return this;")(),h={},b={exports:h},y={};!function(n,t,a,d){var e=window.Prism;window.Prism={manual:!0},function(e){if("object"==typeof t&&void 0!==a)a.exports=e();else if("function"==typeof n&&n.amd)n([],e);else{("undefined"!=typeof window?window:void 0!==y?y:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}}(function(){return function c(i,s,o){function l(n,e){if(!s[n]){if(!i[n]){var t="function"==typeof d&&d;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var a=new Error("Cannot find module '"+n+"'");throw a.code="MODULE_NOT_FOUND",a}var r=s[n]={exports:{}};i[n][0].call(r.exports,function(e){return l(i[n][1][e]||e)},r,r.exports,c,i,s,o)}return s[n].exports}for(var u="function"==typeof d&&d,e=0;e<o.length;e++)l(o[e]);return l}({1:[function(e,n,t){Prism.languages.c=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c["boolean"]},{}],2:[function(e,n,t){Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(?:true|false)\b/,"function":/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},{}],3:[function(e,t,n){(function(e){var n=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,C={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof O?new O(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function s(e,t){var a,n,r=C.util.type(e);switch(t=t||{},r){case"Object":if(n=C.util.objId(e),t[n])return t[n];for(var i in a={},t[n]=a,e)e.hasOwnProperty(i)&&(a[i]=s(e[i],t));return a;case"Array":return(n=C.util.objId(e),t[n])?t[n]:(a=[],t[n]=a,e.forEach(function(e,n){a[n]=s(e,t)}),a);default:return e}},getLanguage:function(e){for(;e&&!c.test(e.className);)e=e.parentElement;return e?(e.className.match(c)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(a){var e=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(a.stack)||[])[1];if(e){var n=document.getElementsByTagName("script");for(var t in n)if(n[t].src==e)return n[t]}return null}}},languages:{extend:function(e,n){var t=C.util.clone(C.languages[e]);for(var a in n)t[a]=n[a];return t},insertBefore:function(t,e,n,a){var r=(a=a||C.languages)[t],i={};for(var s in r)if(r.hasOwnProperty(s)){if(s==e)for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);n.hasOwnProperty(s)||(i[s]=r[s])}var l=a[t];return a[t]=i,C.languages.DFS(C.languages,function(e,n){n===l&&e!=t&&(this[e]=i)}),i},DFS:function l(e,n,t,a){a=a||{};var r=C.util.objId;for(var i in e)if(e.hasOwnProperty(i)){n.call(e,i,e[i],t||i);var s=e[i],o=C.util.type(s);"Object"!==o||a[r(s)]?"Array"!==o||a[r(s)]||(a[r(s)]=!0,l(s,n,i,a)):(a[r(s)]=!0,l(s,n,null,a))}}},plugins:{},highlightAll:function(e,n){C.highlightAllUnder(document,e,n)},highlightAllUnder:function(e,n,t){var a={callback:t,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};C.hooks.run("before-highlightall",a),a.elements=Array.prototype.slice.apply(a.container.querySelectorAll(a.selector)),C.hooks.run("before-all-elements-highlight",a);for(var r,i=0;r=a.elements[i++];)C.highlightElement(r,!0===n,a.callback)},highlightElement:function(e,n,t){var a=C.util.getLanguage(e),r=C.languages[a];e.className=e.className.replace(c,"").replace(/\s+/g," ")+" language-"+a;var i=e.parentNode;i&&"pre"===i.nodeName.toLowerCase()&&(i.className=i.className.replace(c,"").replace(/\s+/g," ")+" language-"+a);var s={element:e,language:a,grammar:r,code:e.textContent};function o(e){s.highlightedCode=e,C.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,C.hooks.run("after-highlight",s),C.hooks.run("complete",s),t&&t.call(s.element)}if(C.hooks.run("before-sanity-check",s),!s.code)return C.hooks.run("complete",s),void(t&&t.call(s.element));if(C.hooks.run("before-highlight",s),s.grammar)if(n&&u.Worker){var l=new Worker(C.filename);l.onmessage=function(e){o(e.data)},l.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))}else o(C.highlight(s.code,s.grammar,s.language));else o(C.util.encode(s.code))},highlight:function(e,n,t){var a={code:e,grammar:n,language:t};return C.hooks.run("before-tokenize",a),a.tokens=C.tokenize(a.code,a.grammar),C.hooks.run("after-tokenize",a),O.stringify(C.util.encode(a.tokens),a.language)},matchGrammar:function(e,n,t,a,r,i,s){for(var o in t)if(t.hasOwnProperty(o)&&t[o]){var l=t[o];l=Array.isArray(l)?l:[l];for(var u=0;u<l.length;++u){if(s&&s==o+","+u)return;var c=l[u],d=c.inside,p=!!c.lookbehind,g=!!c.greedy,m=0,f=c.alias;if(g&&!c.pattern.global){var h=c.pattern.toString().match(/[imsuy]*$/)[0];c.pattern=RegExp(c.pattern.source,h+"g")}c=c.pattern||c;for(var b=a,y=r;b<n.length;y+=n[b].length,++b){var w=n[b];if(n.length>e.length)return;if(!(w instanceof O)){if(g&&b!=n.length-1){if(c.lastIndex=y,!(P=c.exec(e)))break;for(var v=P.index+(p&&P[1]?P[1].length:0),k=P.index+P[0].length,x=b,_=y,F=n.length;x<F&&(_<k||!n[x].type&&!n[x-1].greedy);++x)(_+=n[x].length)<=v&&(++b,y=_);if(n[b]instanceof O)continue;A=x-b,w=e.slice(y,_),P.index-=y}else{c.lastIndex=0;var P=c.exec(w),A=1}if(P){p&&(m=P[1]?P[1].length:0);k=(v=P.index+m)+(P=P[0].slice(m)).length;var S=w.slice(0,v),j=w.slice(k),$=[b,A];S&&(++b,y+=S.length,$.push(S));var E=new O(o,d?C.tokenize(P,d):P,f,P,g);if($.push(E),j&&$.push(j),Array.prototype.splice.apply(n,$),1!=A&&C.matchGrammar(e,n,t,b,y,!0,o+","+u),i)break}else if(i)break}}}}},tokenize:function(e,n){var t=[e],a=n.rest;if(a){for(var r in a)n[r]=a[r];delete n.rest}return C.matchGrammar(e,t,n,0,0,!1),t},hooks:{all:{},add:function(e,n){var t=C.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=C.hooks.all[e];if(t&&t.length)for(var a,r=0;a=t[r++];)a(n)}},Token:O};function O(e,n,t,a,r){this.type=e,this.content=n,this.alias=t,this.length=0|(a||"").length,this.greedy=!!r}if(u.Prism=C,O.stringify=function(e,n){if("string"==typeof e)return e;if(Array.isArray(e))return e.map(function(e){return O.stringify(e,n)}).join("");var t={type:e.type,content:O.stringify(e.content,n),tag:"span",classes:["token",e.type],attributes:{},language:n};if(e.alias){var a=Array.isArray(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(t.classes,a)}C.hooks.run("wrap",t);var r=Object.keys(t.attributes).map(function(e){return e+'="'+(t.attributes[e]||"").replace(/"/g,"&quot;")+'"'}).join(" ");return"<"+t.tag+' class="'+t.classes.join(" ")+'"'+(r?" "+r:"")+">"+t.content+"</"+t.tag+">"},!u.document)return u.addEventListener&&(C.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,a=n.code,r=n.immediateClose;u.postMessage(C.highlight(a,C.languages[t],t)),r&&u.close()},!1)),C;var e=C.util.currentScript();if(e&&(C.filename=e.src,e.hasAttribute("data-manual")&&(C.manual=!0)),!C.manual){var t=function(){C.manual||C.highlightAll()},a=document.readyState;"loading"===a||"interactive"===a&&e&&e.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return C}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});void 0!==t&&t.exports&&(t.exports=n),void 0!==e&&(e.Prism=n)}).call(this,void 0!==y?y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,n,t){Prism.languages.cpp=Prism.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,"boolean":/\b(?:true|false)\b/}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}})},{}],5:[function(e,n,t){Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(?:abstract|add|alias|as|ascending|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|global|goto|group|if|implicit|in|int|interface|internal|into|is|join|let|lock|long|namespace|new|null|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/,string:[{pattern:/@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/,greedy:!0}],"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=\s+\w+)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|interface|new)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i,operator:/>>=?|<<=?|[-=]>|([-+&|?])\1|~|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),Prism.languages.insertBefore("csharp","class-name",{"generic-method":{pattern:/\w+\s*<[^>\r\n]+?>\s*(?=\()/,inside:{"function":/^\w+/,"class-name":{pattern:/\b[A-Z]\w*(?:\.\w+)*\b/,inside:{punctuation:/\./}},keyword:Prism.languages.csharp.keyword,punctuation:/[<>(),.:]/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp},{}],6:[function(e,n,t){!function(e){var n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:{pattern:RegExp("url\\((?:"+n.source+"|[^\n\r()]*)\\)","i"),inside:{"function":/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+n.source+")*?(?=\\s*\\{)"),string:{pattern:n,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var t=e.languages.markup;t&&(t.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:t.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},t.tag))}(Prism)},{}],7:[function(e,n,t){var a,r,i;a=Prism,r=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,i=/\b[A-Z](?:\w*[a-z]\w*)?\b/,a.languages.java=a.languages.extend("clike",{"class-name":[i,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:r,"function":[a.languages.clike["function"],{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),a.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),a.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(?:\.[a-z]\w*)+/,lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:r,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})},{}],8:[function(e,n,t){Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,"function":/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript},{}],9:[function(e,n,t){function b(e,n){return"___"+e.toUpperCase()+n+"___"}var y;y=Prism,Object.defineProperties(y.languages["markup-templating"]={},{buildPlaceholders:{value:function(a,r,e,i){if(a.language===r){var s=a.tokenStack=[];a.code=a.code.replace(e,function(e){if("function"==typeof i&&!i(e))return e;for(var n,t=s.length;-1!==a.code.indexOf(n=b(r,t));)++t;return s[t]=e,n}),a.grammar=y.languages.markup}}},tokenizePlaceholders:{value:function(p,g){if(p.language===g&&p.tokenStack){p.grammar=y.languages[g];var m=0,f=Object.keys(p.tokenStack);!function h(e){for(var n=0;n<e.length&&!(m>=f.length);n++){var t=e[n];if("string"==typeof t||t.content&&"string"==typeof t.content){var a=f[m],r=p.tokenStack[a],i="string"==typeof t?t:t.content,s=b(g,a),o=i.indexOf(s);if(-1<o){++m;var l=i.substring(0,o),u=new y.Token(g,y.tokenize(r,p.grammar),"language-"+g,r),c=i.substring(o+s.length),d=[];l&&d.push.apply(d,h([l])),d.push(u),c&&d.push.apply(d,h([c])),"string"==typeof t?e.splice.apply(e,[n,1].concat(d)):t.content=d}}else t.content&&h(t.content)}return e}(p.tokens)}}}})},{}],10:[function(e,n,t){Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!<!--)[^"'\]]|"[^"]*"|'[^']*'|<!--[\s\S]*?-->)*\]\s*)?>/i,greedy:!0},cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,n){var t={};t["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},t.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:t}};a["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var r={};r[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:<!\[CDATA\[[\s\S]*?\]\]>\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,e),"i"),lookbehind:!0,greedy:!0,inside:a},Prism.languages.insertBefore("markup","cdata",r)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup},{}],11:[function(e,n,t){!function(n){n.languages.php=n.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,"boolean":{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),n.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),n.languages.insertBefore("php","comment",{delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"}}),n.languages.insertBefore("php","keyword",{variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),n.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var e={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:n.languages.php};n.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:e}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:e}}}),delete n.languages.php.string,n.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){n.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism)},{}],12:[function(e,n,t){Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,"boolean":/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python},{}],13:[function(e,n,t){!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby["function"],e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[.+?]|\\.|[^/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{"function":/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism)},{}],14:[function(e,n,t){var a=e("prismjs/components/prism-core");e("prismjs/components/prism-clike"),e("prismjs/components/prism-markup-templating"),e("prismjs/components/prism-c"),e("prismjs/components/prism-cpp"),e("prismjs/components/prism-csharp"),e("prismjs/components/prism-css"),e("prismjs/components/prism-java"),e("prismjs/components/prism-javascript"),e("prismjs/components/prism-markup"),e("prismjs/components/prism-php"),e("prismjs/components/prism-python"),e("prismjs/components/prism-ruby"),n.exports={boltExport:a}},{"prismjs/components/prism-c":1,"prismjs/components/prism-clike":2,"prismjs/components/prism-core":3,"prismjs/components/prism-cpp":4,"prismjs/components/prism-csharp":5,"prismjs/components/prism-css":6,"prismjs/components/prism-java":7,"prismjs/components/prism-javascript":8,"prismjs/components/prism-markup":10,"prismjs/components/prism-markup-templating":9,"prismjs/components/prism-php":11,"prismjs/components/prism-python":12,"prismjs/components/prism-ruby":13}]},{},[14])(14)});var r=window.Prism;window.Prism=e}(undefined,h,b,undefined);var w=b.exports.boltExport,v=function(e){return f.Prism&&e.getParam("codesample_global_prismjs",!1,"boolean")?f.Prism:w},k=function(e){var n=e.selection?e.selection.getNode():null;return g(n)?d.some(n):d.none()},x=function(i){var e,t,n=i.getParam("codesample_languages")||[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}],a=(0===(e=n).length?d.none():d.some(e[0])).fold(function(){return""},function(e){return e.value}),r=(t=a,k(i).fold(function(){return t},function(e){var n=e.className.match(/language-(\w+)/);return n?n[1]:t})),s=k(i).fold(function(){return""},function(e){return e.textContent});i.windowManager.open({title:"Insert/Edit Code Sample",size:"large",body:{type:"panel",items:[{type:"selectbox",name:"language",label:"Language",items:n},{type:"textarea",name:"code",label:"Code view"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{language:r,code:s},onSubmit:function(e){var n,t,a,r=e.getData();n=i,t=r.language,a=r.code,n.undoManager.transact(function(){var e=k(n);return a=p.DOM.encode(a),e.fold(function(){n.insertContent('<pre id="__new" class="language-'+t+'">'+a+"</pre>"),n.selection.select(n.$("#__new").removeAttr("id")[0])},function(e){n.dom.setAttrib(e,"class","language-"+t),e.innerHTML=a,v(n).highlightElement(e),n.selection.select(e)})}),e.close()}})},_=function(a){a.ui.registry.addToggleButton("codesample",{icon:"code-sample",tooltip:"Insert/edit code sample",onAction:function(){return x(a)},onSetup:function(t){var e=function(){var e,n;t.setActive((n=(e=a).selection.getStart(),e.dom.is(n,'pre[class*="language-"]')))};return a.on("NodeChange",e),function(){return a.off("NodeChange",e)}}}),a.ui.registry.addMenuItem("codesample",{text:"Code sample...",icon:"code-sample",onAction:function(){return x(a)}})};!function F(){r.add("codesample",function(n){var t,r,a;r=(t=n).$,t.on("PreProcess",function(e){r("pre[contenteditable=false]",e.node).filter(m(g)).each(function(e,n){var t=r(n),a=n.textContent;t.attr("class",r.trim(t.attr("class"))),t.removeAttr("contentEditable"),t.empty().append(r("<code></code>").each(function(){this.textContent=a}))})}),t.on("SetContent",function(){var e=r("pre").filter(m(g)).filter(function(e,n){return"false"!==n.contentEditable});e.length&&t.undoManager.transact(function(){e.each(function(e,n){r(n).find("br").each(function(e,n){n.parentNode.replaceChild(t.getDoc().createTextNode("\n"),n)}),n.contentEditable="false",n.innerHTML=t.dom.encode(n.textContent),v(t).highlightElement(n),n.className=r.trim(n.className)})})}),_(n),(a=n).addCommand("codesample",function(){var e=a.selection.getNode();a.selection.isCollapsed()||g(e)?x(a):a.formatter.toggle("code")}),n.on("dblclick",function(e){g(e.target)&&x(n)})})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/colorpicker/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "colorpicker" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/colorpicker')
+//   ES2015:
+//     import 'tinymce/plugins/colorpicker'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/colorpicker/plugin.js
@@ -1,1 +1,23 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    function Plugin () {
+      global.add('colorpicker', function () {
+        domGlobals.console.warn('Color picker plugin is now built in to the core editor, please remove it from your editor configuration');
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/colorpicker/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(o){"use strict";var i=tinymce.util.Tools.resolve("tinymce.PluginManager");!function n(){i.add("colorpicker",function(){o.console.warn("Color picker plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/contextmenu/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "contextmenu" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/contextmenu')
+//   ES2015:
+//     import 'tinymce/plugins/contextmenu'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/contextmenu/plugin.js
@@ -1,1 +1,23 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    function Plugin () {
+      global.add('contextmenu', function () {
+        domGlobals.console.warn('Context menu plugin is now built in to the core editor, please remove it from your editor configuration');
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/contextmenu/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(n){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager");!function e(){o.add("contextmenu",function(){n.console.warn("Context menu plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/directionality/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "directionality" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/directionality')
+//   ES2015:
+//     import 'tinymce/plugins/directionality'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/directionality/plugin.js
@@ -1,1 +1,279 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var setDir = function (editor, dir) {
+      var dom = editor.dom;
+      var curDir;
+      var blocks = editor.selection.getSelectedBlocks();
+      if (blocks.length) {
+        curDir = dom.getAttrib(blocks[0], 'dir');
+        global$1.each(blocks, function (block) {
+          if (!dom.getParent(block.parentNode, '*[dir="' + dir + '"]', dom.getRoot())) {
+            dom.setAttrib(block, 'dir', curDir !== dir ? dir : null);
+          }
+        });
+        editor.nodeChanged();
+      }
+    };
+
+    var register = function (editor) {
+      editor.addCommand('mceDirectionLTR', function () {
+        setDir(editor, 'ltr');
+      });
+      editor.addCommand('mceDirectionRTL', function () {
+        setDir(editor, 'rtl');
+      });
+    };
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var fromHtml = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      if (!div.hasChildNodes() || div.childNodes.length > 1) {
+        domGlobals.console.error('HTML does not have a single root node', html);
+        throw new Error('HTML must have a single root node');
+      }
+      return fromDom(div.childNodes[0]);
+    };
+    var fromTag = function (tag, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createElement(tag);
+      return fromDom(node);
+    };
+    var fromText = function (text, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createTextNode(text);
+      return fromDom(node);
+    };
+    var fromDom = function (node) {
+      if (node === null || node === undefined) {
+        throw new Error('Node cannot be null or undefined');
+      }
+      return { dom: constant(node) };
+    };
+    var fromPoint = function (docElm, x, y) {
+      var doc = docElm.dom();
+      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
+    };
+    var Element = {
+      fromHtml: fromHtml,
+      fromTag: fromTag,
+      fromText: fromText,
+      fromDom: fromDom,
+      fromPoint: fromPoint
+    };
+
+    var isSimpleType = function (type) {
+      return function (value) {
+        return typeof value === type;
+      };
+    };
+    var isFunction = isSimpleType('function');
+
+    var isSupported = function (dom) {
+      return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
+    };
+
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
+
+    var TEXT = 3;
+
+    var type = function (element) {
+      return element.dom().nodeType;
+    };
+    var isType = function (t) {
+      return function (element) {
+        return type(element) === t;
+      };
+    };
+    var isText = isType(TEXT);
+
+    var inBody = function (element) {
+      var dom = isText(element) ? element.dom().parentNode : element.dom();
+      return dom !== undefined && dom !== null && dom.ownerDocument.body.contains(dom);
+    };
+
+    var get = function (element, property) {
+      var dom = element.dom();
+      var styles = domGlobals.window.getComputedStyle(dom);
+      var r = styles.getPropertyValue(property);
+      return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
+    };
+    var getUnsafeProperty = function (dom, property) {
+      return isSupported(dom) ? dom.style.getPropertyValue(property) : '';
+    };
+
+    var getDirection = function (element) {
+      return get(element, 'direction') === 'rtl' ? 'rtl' : 'ltr';
+    };
+
+    var getNodeChangeHandler = function (editor, dir) {
+      return function (api) {
+        var nodeChangeHandler = function (e) {
+          var element = Element.fromDom(e.element);
+          api.setActive(getDirection(element) === dir);
+        };
+        editor.on('NodeChange', nodeChangeHandler);
+        return function () {
+          return editor.off('NodeChange', nodeChangeHandler);
+        };
+      };
+    };
+    var register$1 = function (editor) {
+      editor.ui.registry.addToggleButton('ltr', {
+        tooltip: 'Left to right',
+        icon: 'ltr',
+        onAction: function () {
+          return editor.execCommand('mceDirectionLTR');
+        },
+        onSetup: getNodeChangeHandler(editor, 'ltr')
+      });
+      editor.ui.registry.addToggleButton('rtl', {
+        tooltip: 'Right to left',
+        icon: 'rtl',
+        onAction: function () {
+          return editor.execCommand('mceDirectionRTL');
+        },
+        onSetup: getNodeChangeHandler(editor, 'rtl')
+      });
+    };
+
+    function Plugin () {
+      global.add('directionality', function (editor) {
+        register(editor);
+        register$1(editor);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/directionality/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(u){"use strict";var n,t,e,r,o,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(n,t){var e,r=n.dom,o=n.selection.getSelectedBlocks();o.length&&(e=r.getAttrib(o[0],"dir"),c.each(o,function(n){r.getParent(n.parentNode,'*[dir="'+t+'"]',r.getRoot())||r.setAttrib(n,"dir",e!==t?t:null)}),n.nodeChanged())},d=function(n){return function(){return n}},f=d(!1),a=d(!0),m=function(){return s},s=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:f,isSome:f,isNone:a,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(undefined),or:e,orThunk:t,map:m,each:function(){},bind:m,exists:f,forall:a,filter:m,equals:n,equals_:n,toArray:function(){return[]},toString:d("none()")}),g=function(e){var n=d(e),t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:a,isNone:f,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return g(n(e))},each:function(n){n(e)},bind:r,exists:r,forall:r,filter:function(n){return n(e)?o:s},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(f,function(n){return t(e,n)})}};return o},h=function(n){return null===n||n===undefined?s:g(n)},y=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:d(n)}},T={fromHtml:function(n,t){var e=(t||u.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw u.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return y(e.childNodes[0])},fromTag:function(n,t){var e=(t||u.document).createElement(n);return y(e)},fromText:function(n,t){var e=(t||u.document).createTextNode(n);return y(e)},fromDom:y,fromPoint:function(n,t,e){var r=n.dom();return h(r.elementFromPoint(t,e)).map(y)}},v=(r="function",function(n){return typeof n===r}),p=("undefined"!=typeof u.window?u.window:Function("return this;")(),o=3,function(n){return n.dom().nodeType===o}),w=function(n,t){var e,r,o=n.dom(),i=u.window.getComputedStyle(o).getPropertyValue(t);return""!==i||(r=p(e=n)?e.dom().parentNode:e.dom())!==undefined&&null!==r&&r.ownerDocument.body.contains(r)?i:N(o,t)},N=function(n,t){return(e=n).style!==undefined&&v(e.style.getPropertyValue)?n.style.getPropertyValue(t):"";var e},O=function(t,r){return function(e){var n=function(n){var t=T.fromDom(n.element);e.setActive(("rtl"===w(t,"direction")?"rtl":"ltr")===r)};return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}};!function D(){i.add("directionality",function(n){var t,e;(t=n).addCommand("mceDirectionLTR",function(){l(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){l(t,"rtl")}),(e=n).ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return e.execCommand("mceDirectionLTR")},onSetup:O(e,"ltr")}),e.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return e.execCommand("mceDirectionRTL")},onSetup:O(e,"rtl")})})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/emoticons/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "emoticons" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/emoticons')
+//   ES2015:
+//     import 'tinymce/plugins/emoticons'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/emoticons/js/emojis.js
@@ -1,1 +1,9015 @@
-
+// NOTE: Source: npm package: emojilib, file:emojis.json
+window.tinymce.Resource.add("tinymce.plugins.emoticons", {
+  grinning: {
+    keywords: [ "face", "smile", "happy", "joy", ":D", "grin" ],
+    "char": "\ud83d\ude00",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  grimacing: {
+    keywords: [ "face", "grimace", "teeth" ],
+    "char": "\ud83d\ude2c",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  grin: {
+    keywords: [ "face", "happy", "smile", "joy", "kawaii" ],
+    "char": "\ud83d\ude01",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  joy: {
+    keywords: [ "face", "cry", "tears", "weep", "happy", "happytears", "haha" ],
+    "char": "\ud83d\ude02",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  rofl: {
+    keywords: [ "face", "rolling", "floor", "laughing", "lol", "haha" ],
+    "char": "\ud83e\udd23",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  smiley: {
+    keywords: [ "face", "happy", "joy", "haha", ":D", ":)", "smile", "funny" ],
+    "char": "\ud83d\ude03",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  smile: {
+    keywords: [ "face", "happy", "joy", "funny", "haha", "laugh", "like", ":D", ":)" ],
+    "char": "\ud83d\ude04",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  sweat_smile: {
+    keywords: [ "face", "hot", "happy", "laugh", "sweat", "smile", "relief" ],
+    "char": "\ud83d\ude05",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  laughing: {
+    keywords: [ "happy", "joy", "lol", "satisfied", "haha", "face", "glad", "XD", "laugh" ],
+    "char": "\ud83d\ude06",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  innocent: {
+    keywords: [ "face", "angel", "heaven", "halo" ],
+    "char": "\ud83d\ude07",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  wink: {
+    keywords: [ "face", "happy", "mischievous", "secret", ";)", "smile", "eye" ],
+    "char": "\ud83d\ude09",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  blush: {
+    keywords: [ "face", "smile", "happy", "flushed", "crush", "embarrassed", "shy", "joy" ],
+    "char": "\ud83d\ude0a",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  slightly_smiling_face: {
+    keywords: [ "face", "smile" ],
+    "char": "\ud83d\ude42",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  upside_down_face: {
+    keywords: [ "face", "flipped", "silly", "smile" ],
+    "char": "\ud83d\ude43",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  relaxed: {
+    keywords: [ "face", "blush", "massage", "happiness" ],
+    "char": "\u263a\ufe0f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  yum: {
+    keywords: [ "happy", "joy", "tongue", "smile", "face", "silly", "yummy", "nom", "delicious", "savouring" ],
+    "char": "\ud83d\ude0b",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  relieved: {
+    keywords: [ "face", "relaxed", "phew", "massage", "happiness" ],
+    "char": "\ud83d\ude0c",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  heart_eyes: {
+    keywords: [ "face", "love", "like", "affection", "valentines", "infatuation", "crush", "heart" ],
+    "char": "\ud83d\ude0d",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  kissing_heart: {
+    keywords: [ "face", "love", "like", "affection", "valentines", "infatuation", "kiss" ],
+    "char": "\ud83d\ude18",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  kissing: {
+    keywords: [ "love", "like", "face", "3", "valentines", "infatuation", "kiss" ],
+    "char": "\ud83d\ude17",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  kissing_smiling_eyes: {
+    keywords: [ "face", "affection", "valentines", "infatuation", "kiss" ],
+    "char": "\ud83d\ude19",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  kissing_closed_eyes: {
+    keywords: [ "face", "love", "like", "affection", "valentines", "infatuation", "kiss" ],
+    "char": "\ud83d\ude1a",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  stuck_out_tongue_winking_eye: {
+    keywords: [ "face", "prank", "childish", "playful", "mischievous", "smile", "wink", "tongue" ],
+    "char": "\ud83d\ude1c",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  zany: {
+    keywords: [ "face", "goofy", "crazy" ],
+    "char": "\ud83e\udd2a",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  raised_eyebrow: {
+    keywords: [ "face", "distrust", "scepticism", "disapproval", "disbelief", "surprise" ],
+    "char": "\ud83e\udd28",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  monocle: {
+    keywords: [ "face", "stuffy", "wealthy" ],
+    "char": "\ud83e\uddd0",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  stuck_out_tongue_closed_eyes: {
+    keywords: [ "face", "prank", "playful", "mischievous", "smile", "tongue" ],
+    "char": "\ud83d\ude1d",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  stuck_out_tongue: {
+    keywords: [ "face", "prank", "childish", "playful", "mischievous", "smile", "tongue" ],
+    "char": "\ud83d\ude1b",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  money_mouth_face: {
+    keywords: [ "face", "rich", "dollar", "money" ],
+    "char": "\ud83e\udd11",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  nerd_face: {
+    keywords: [ "face", "nerdy", "geek", "dork" ],
+    "char": "\ud83e\udd13",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  sunglasses: {
+    keywords: [ "face", "cool", "smile", "summer", "beach", "sunglass" ],
+    "char": "\ud83d\ude0e",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  star_struck: {
+    keywords: [ "face", "smile", "starry", "eyes", "grinning" ],
+    "char": "\ud83e\udd29",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  clown_face: {
+    keywords: [ "face" ],
+    "char": "\ud83e\udd21",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  cowboy_hat_face: {
+    keywords: [ "face", "cowgirl", "hat" ],
+    "char": "\ud83e\udd20",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  hugs: {
+    keywords: [ "face", "smile", "hug" ],
+    "char": "\ud83e\udd17",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  smirk: {
+    keywords: [ "face", "smile", "mean", "prank", "smug", "sarcasm" ],
+    "char": "\ud83d\ude0f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  no_mouth: {
+    keywords: [ "face", "hellokitty" ],
+    "char": "\ud83d\ude36",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  neutral_face: {
+    keywords: [ "indifference", "meh", ":|", "neutral" ],
+    "char": "\ud83d\ude10",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  expressionless: {
+    keywords: [ "face", "indifferent", "-_-", "meh", "deadpan" ],
+    "char": "\ud83d\ude11",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  unamused: {
+    keywords: [ "indifference", "bored", "straight face", "serious", "sarcasm", "unimpressed", "skeptical", "dubious", "side_eye" ],
+    "char": "\ud83d\ude12",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  roll_eyes: {
+    keywords: [ "face", "eyeroll", "frustrated" ],
+    "char": "\ud83d\ude44",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  thinking: {
+    keywords: [ "face", "hmmm", "think", "consider" ],
+    "char": "\ud83e\udd14",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  lying_face: {
+    keywords: [ "face", "lie", "pinocchio" ],
+    "char": "\ud83e\udd25",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  hand_over_mouth: {
+    keywords: [ "face", "whoops", "shock", "surprise" ],
+    "char": "\ud83e\udd2d",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  shushing: {
+    keywords: [ "face", "quiet", "shhh" ],
+    "char": "\ud83e\udd2b",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  symbols_over_mouth: {
+    keywords: [ "face", "swearing", "cursing", "cussing", "profanity", "expletive" ],
+    "char": "\ud83e\udd2c",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  exploding_head: {
+    keywords: [ "face", "shocked", "mind", "blown" ],
+    "char": "\ud83e\udd2f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  flushed: {
+    keywords: [ "face", "blush", "shy", "flattered" ],
+    "char": "\ud83d\ude33",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  disappointed: {
+    keywords: [ "face", "sad", "upset", "depressed", ":(" ],
+    "char": "\ud83d\ude1e",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  worried: {
+    keywords: [ "face", "concern", "nervous", ":(" ],
+    "char": "\ud83d\ude1f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  angry: {
+    keywords: [ "mad", "face", "annoyed", "frustrated" ],
+    "char": "\ud83d\ude20",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  rage: {
+    keywords: [ "angry", "mad", "hate", "despise" ],
+    "char": "\ud83d\ude21",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  pensive: {
+    keywords: [ "face", "sad", "depressed", "upset" ],
+    "char": "\ud83d\ude14",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  confused: {
+    keywords: [ "face", "indifference", "huh", "weird", "hmmm", ":/" ],
+    "char": "\ud83d\ude15",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  slightly_frowning_face: {
+    keywords: [ "face", "frowning", "disappointed", "sad", "upset" ],
+    "char": "\ud83d\ude41",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  frowning_face: {
+    keywords: [ "face", "sad", "upset", "frown" ],
+    "char": "\u2639",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  persevere: {
+    keywords: [ "face", "sick", "no", "upset", "oops" ],
+    "char": "\ud83d\ude23",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  confounded: {
+    keywords: [ "face", "confused", "sick", "unwell", "oops", ":S" ],
+    "char": "\ud83d\ude16",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  tired_face: {
+    keywords: [ "sick", "whine", "upset", "frustrated" ],
+    "char": "\ud83d\ude2b",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  weary: {
+    keywords: [ "face", "tired", "sleepy", "sad", "frustrated", "upset" ],
+    "char": "\ud83d\ude29",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  triumph: {
+    keywords: [ "face", "gas", "phew", "proud", "pride" ],
+    "char": "\ud83d\ude24",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  open_mouth: {
+    keywords: [ "face", "surprise", "impressed", "wow", "whoa", ":O" ],
+    "char": "\ud83d\ude2e",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  scream: {
+    keywords: [ "face", "munch", "scared", "omg" ],
+    "char": "\ud83d\ude31",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  fearful: {
+    keywords: [ "face", "scared", "terrified", "nervous", "oops", "huh" ],
+    "char": "\ud83d\ude28",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  cold_sweat: {
+    keywords: [ "face", "nervous", "sweat" ],
+    "char": "\ud83d\ude30",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  hushed: {
+    keywords: [ "face", "woo", "shh" ],
+    "char": "\ud83d\ude2f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  frowning: {
+    keywords: [ "face", "aw", "what" ],
+    "char": "\ud83d\ude26",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  anguished: {
+    keywords: [ "face", "stunned", "nervous" ],
+    "char": "\ud83d\ude27",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  cry: {
+    keywords: [ "face", "tears", "sad", "depressed", "upset", ":'(" ],
+    "char": "\ud83d\ude22",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  disappointed_relieved: {
+    keywords: [ "face", "phew", "sweat", "nervous" ],
+    "char": "\ud83d\ude25",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  drooling_face: {
+    keywords: [ "face" ],
+    "char": "\ud83e\udd24",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  sleepy: {
+    keywords: [ "face", "tired", "rest", "nap" ],
+    "char": "\ud83d\ude2a",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  sweat: {
+    keywords: [ "face", "hot", "sad", "tired", "exercise" ],
+    "char": "\ud83d\ude13",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  sob: {
+    keywords: [ "face", "cry", "tears", "sad", "upset", "depressed" ],
+    "char": "\ud83d\ude2d",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  dizzy_face: {
+    keywords: [ "spent", "unconscious", "xox", "dizzy" ],
+    "char": "\ud83d\ude35",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  astonished: {
+    keywords: [ "face", "xox", "surprised", "poisoned" ],
+    "char": "\ud83d\ude32",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  zipper_mouth_face: {
+    keywords: [ "face", "sealed", "zipper", "secret" ],
+    "char": "\ud83e\udd10",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  nauseated_face: {
+    keywords: [ "face", "vomit", "gross", "green", "sick", "throw up", "ill" ],
+    "char": "\ud83e\udd22",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  sneezing_face: {
+    keywords: [ "face", "gesundheit", "sneeze", "sick", "allergy" ],
+    "char": "\ud83e\udd27",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  vomiting: {
+    keywords: [ "face", "sick" ],
+    "char": "\ud83e\udd2e",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  mask: {
+    keywords: [ "face", "sick", "ill", "disease" ],
+    "char": "\ud83d\ude37",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  face_with_thermometer: {
+    keywords: [ "sick", "temperature", "thermometer", "cold", "fever" ],
+    "char": "\ud83e\udd12",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  face_with_head_bandage: {
+    keywords: [ "injured", "clumsy", "bandage", "hurt" ],
+    "char": "\ud83e\udd15",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  sleeping: {
+    keywords: [ "face", "tired", "sleepy", "night", "zzz" ],
+    "char": "\ud83d\ude34",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  zzz: {
+    keywords: [ "sleepy", "tired", "dream" ],
+    "char": "\ud83d\udca4",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  poop: {
+    keywords: [ "hankey", "shitface", "fail", "turd", "shit" ],
+    "char": "\ud83d\udca9",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  smiling_imp: {
+    keywords: [ "devil", "horns" ],
+    "char": "\ud83d\ude08",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  imp: {
+    keywords: [ "devil", "angry", "horns" ],
+    "char": "\ud83d\udc7f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  japanese_ogre: {
+    keywords: [ "monster", "red", "mask", "halloween", "scary", "creepy", "devil", "demon", "japanese", "ogre" ],
+    "char": "\ud83d\udc79",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  japanese_goblin: {
+    keywords: [ "red", "evil", "mask", "monster", "scary", "creepy", "japanese", "goblin" ],
+    "char": "\ud83d\udc7a",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  skull: {
+    keywords: [ "dead", "skeleton", "creepy", "death" ],
+    "char": "\ud83d\udc80",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  ghost: {
+    keywords: [ "halloween", "spooky", "scary" ],
+    "char": "\ud83d\udc7b",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  alien: {
+    keywords: [ "UFO", "paul", "weird", "outer_space" ],
+    "char": "\ud83d\udc7d",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  robot: {
+    keywords: [ "computer", "machine", "bot" ],
+    "char": "\ud83e\udd16",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  smiley_cat: {
+    keywords: [ "animal", "cats", "happy", "smile" ],
+    "char": "\ud83d\ude3a",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  smile_cat: {
+    keywords: [ "animal", "cats", "smile" ],
+    "char": "\ud83d\ude38",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  joy_cat: {
+    keywords: [ "animal", "cats", "haha", "happy", "tears" ],
+    "char": "\ud83d\ude39",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  heart_eyes_cat: {
+    keywords: [ "animal", "love", "like", "affection", "cats", "valentines", "heart" ],
+    "char": "\ud83d\ude3b",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  smirk_cat: {
+    keywords: [ "animal", "cats", "smirk" ],
+    "char": "\ud83d\ude3c",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  kissing_cat: {
+    keywords: [ "animal", "cats", "kiss" ],
+    "char": "\ud83d\ude3d",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  scream_cat: {
+    keywords: [ "animal", "cats", "munch", "scared", "scream" ],
+    "char": "\ud83d\ude40",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  crying_cat_face: {
+    keywords: [ "animal", "tears", "weep", "sad", "cats", "upset", "cry" ],
+    "char": "\ud83d\ude3f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  pouting_cat: {
+    keywords: [ "animal", "cats" ],
+    "char": "\ud83d\ude3e",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  palms_up: {
+    keywords: [ "hands", "gesture", "cupped", "prayer" ],
+    "char": "\ud83e\udd32",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  raised_hands: {
+    keywords: [ "gesture", "hooray", "yea", "celebration", "hands" ],
+    "char": "\ud83d\ude4c",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  clap: {
+    keywords: [ "hands", "praise", "applause", "congrats", "yay" ],
+    "char": "\ud83d\udc4f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  wave: {
+    keywords: [ "hands", "gesture", "goodbye", "solong", "farewell", "hello", "hi", "palm" ],
+    "char": "\ud83d\udc4b",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  call_me_hand: {
+    keywords: [ "hands", "gesture" ],
+    "char": "\ud83e\udd19",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  "+1": {
+    keywords: [ "thumbsup", "yes", "awesome", "good", "agree", "accept", "cool", "hand", "like" ],
+    "char": "\ud83d\udc4d",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  "-1": {
+    keywords: [ "thumbsdown", "no", "dislike", "hand" ],
+    "char": "\ud83d\udc4e",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  facepunch: {
+    keywords: [ "angry", "violence", "fist", "hit", "attack", "hand" ],
+    "char": "\ud83d\udc4a",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  fist: {
+    keywords: [ "fingers", "hand", "grasp" ],
+    "char": "\u270a",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  fist_left: {
+    keywords: [ "hand", "fistbump" ],
+    "char": "\ud83e\udd1b",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  fist_right: {
+    keywords: [ "hand", "fistbump" ],
+    "char": "\ud83e\udd1c",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  v: {
+    keywords: [ "fingers", "ohyeah", "hand", "peace", "victory", "two" ],
+    "char": "\u270c",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  ok_hand: {
+    keywords: [ "fingers", "limbs", "perfect", "ok", "okay" ],
+    "char": "\ud83d\udc4c",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  raised_hand: {
+    keywords: [ "fingers", "stop", "highfive", "palm", "ban" ],
+    "char": "\u270b",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  raised_back_of_hand: {
+    keywords: [ "fingers", "raised", "backhand" ],
+    "char": "\ud83e\udd1a",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  open_hands: {
+    keywords: [ "fingers", "butterfly", "hands", "open" ],
+    "char": "\ud83d\udc50",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  muscle: {
+    keywords: [ "arm", "flex", "hand", "summer", "strong", "biceps" ],
+    "char": "\ud83d\udcaa",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  pray: {
+    keywords: [ "please", "hope", "wish", "namaste", "highfive" ],
+    "char": "\ud83d\ude4f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  handshake: {
+    keywords: [ "agreement", "shake" ],
+    "char": "\ud83e\udd1d",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  point_up: {
+    keywords: [ "hand", "fingers", "direction", "up" ],
+    "char": "\u261d",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  point_up_2: {
+    keywords: [ "fingers", "hand", "direction", "up" ],
+    "char": "\ud83d\udc46",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  point_down: {
+    keywords: [ "fingers", "hand", "direction", "down" ],
+    "char": "\ud83d\udc47",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  point_left: {
+    keywords: [ "direction", "fingers", "hand", "left" ],
+    "char": "\ud83d\udc48",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  point_right: {
+    keywords: [ "fingers", "hand", "direction", "right" ],
+    "char": "\ud83d\udc49",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  fu: {
+    keywords: [ "hand", "fingers", "rude", "middle", "flipping" ],
+    "char": "\ud83d\udd95",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  raised_hand_with_fingers_splayed: {
+    keywords: [ "hand", "fingers", "palm" ],
+    "char": "\ud83d\udd90",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  love_you: {
+    keywords: [ "hand", "fingers", "gesture" ],
+    "char": "\ud83e\udd1f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  metal: {
+    keywords: [ "hand", "fingers", "evil_eye", "sign_of_horns", "rock_on" ],
+    "char": "\ud83e\udd18",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  crossed_fingers: {
+    keywords: [ "good", "lucky" ],
+    "char": "\ud83e\udd1e",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  vulcan_salute: {
+    keywords: [ "hand", "fingers", "spock", "star trek" ],
+    "char": "\ud83d\udd96",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  writing_hand: {
+    keywords: [ "lower_left_ballpoint_pen", "stationery", "write", "compose" ],
+    "char": "\u270d",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  selfie: {
+    keywords: [ "camera", "phone" ],
+    "char": "\ud83e\udd33",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  nail_care: {
+    keywords: [ "beauty", "manicure", "finger", "fashion", "nail" ],
+    "char": "\ud83d\udc85",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  lips: {
+    keywords: [ "mouth", "kiss" ],
+    "char": "\ud83d\udc44",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  tongue: {
+    keywords: [ "mouth", "playful" ],
+    "char": "\ud83d\udc45",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  ear: {
+    keywords: [ "face", "hear", "sound", "listen" ],
+    "char": "\ud83d\udc42",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  nose: {
+    keywords: [ "smell", "sniff" ],
+    "char": "\ud83d\udc43",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  eye: {
+    keywords: [ "face", "look", "see", "watch", "stare" ],
+    "char": "\ud83d\udc41",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  eyes: {
+    keywords: [ "look", "watch", "stalk", "peek", "see" ],
+    "char": "\ud83d\udc40",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  brain: {
+    keywords: [ "smart", "intelligent" ],
+    "char": "\ud83e\udde0",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  bust_in_silhouette: {
+    keywords: [ "user", "person", "human" ],
+    "char": "\ud83d\udc64",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  busts_in_silhouette: {
+    keywords: [ "user", "person", "human", "group", "team" ],
+    "char": "\ud83d\udc65",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  speaking_head: {
+    keywords: [ "user", "person", "human", "sing", "say", "talk" ],
+    "char": "\ud83d\udde3",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  baby: {
+    keywords: [ "child", "boy", "girl", "toddler" ],
+    "char": "\ud83d\udc76",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  child: {
+    keywords: [ "gender-neutral", "young" ],
+    "char": "\ud83e\uddd2",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  boy: {
+    keywords: [ "man", "male", "guy", "teenager" ],
+    "char": "\ud83d\udc66",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  girl: {
+    keywords: [ "female", "woman", "teenager" ],
+    "char": "\ud83d\udc67",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  adult: {
+    keywords: [ "gender-neutral", "person" ],
+    "char": "\ud83e\uddd1",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man: {
+    keywords: [ "mustache", "father", "dad", "guy", "classy", "sir", "moustache" ],
+    "char": "\ud83d\udc68",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman: {
+    keywords: [ "female", "girls", "lady" ],
+    "char": "\ud83d\udc69",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  blonde_woman: {
+    keywords: [ "woman", "female", "girl", "blonde", "person" ],
+    "char": "\ud83d\udc71\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  blonde_man: {
+    keywords: [ "man", "male", "boy", "blonde", "guy", "person" ],
+    "char": "\ud83d\udc71",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  bearded_person: {
+    keywords: [ "person", "bewhiskered" ],
+    "char": "\ud83e\uddd4",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  older_adult: {
+    keywords: [ "human", "elder", "senior", "gender-neutral" ],
+    "char": "\ud83e\uddd3",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  older_man: {
+    keywords: [ "human", "male", "men", "old", "elder", "senior" ],
+    "char": "\ud83d\udc74",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  older_woman: {
+    keywords: [ "human", "female", "women", "lady", "old", "elder", "senior" ],
+    "char": "\ud83d\udc75",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_with_gua_pi_mao: {
+    keywords: [ "male", "boy", "chinese" ],
+    "char": "\ud83d\udc72",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_with_headscarf: {
+    keywords: [ "female", "hijab", "mantilla", "tichel" ],
+    "char": "\ud83e\uddd5",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_with_turban: {
+    keywords: [ "female", "indian", "hinduism", "arabs", "woman" ],
+    "char": "\ud83d\udc73\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_with_turban: {
+    keywords: [ "male", "indian", "hinduism", "arabs" ],
+    "char": "\ud83d\udc73",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  policewoman: {
+    keywords: [ "woman", "police", "law", "legal", "enforcement", "arrest", "911", "female" ],
+    "char": "\ud83d\udc6e\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  policeman: {
+    keywords: [ "man", "police", "law", "legal", "enforcement", "arrest", "911" ],
+    "char": "\ud83d\udc6e",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  construction_worker_woman: {
+    keywords: [ "female", "human", "wip", "build", "construction", "worker", "labor", "woman" ],
+    "char": "\ud83d\udc77\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  construction_worker_man: {
+    keywords: [ "male", "human", "wip", "guy", "build", "construction", "worker", "labor" ],
+    "char": "\ud83d\udc77",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  guardswoman: {
+    keywords: [ "uk", "gb", "british", "female", "royal", "woman" ],
+    "char": "\ud83d\udc82\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  guardsman: {
+    keywords: [ "uk", "gb", "british", "male", "guy", "royal" ],
+    "char": "\ud83d\udc82",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  female_detective: {
+    keywords: [ "human", "spy", "detective", "female", "woman" ],
+    "char": "\ud83d\udd75\ufe0f\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  male_detective: {
+    keywords: [ "human", "spy", "detective" ],
+    "char": "\ud83d\udd75",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_health_worker: {
+    keywords: [ "doctor", "nurse", "therapist", "healthcare", "woman", "human" ],
+    "char": "\ud83d\udc69\u200d\u2695\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_health_worker: {
+    keywords: [ "doctor", "nurse", "therapist", "healthcare", "man", "human" ],
+    "char": "\ud83d\udc68\u200d\u2695\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_farmer: {
+    keywords: [ "rancher", "gardener", "woman", "human" ],
+    "char": "\ud83d\udc69\u200d\ud83c\udf3e",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_farmer: {
+    keywords: [ "rancher", "gardener", "man", "human" ],
+    "char": "\ud83d\udc68\u200d\ud83c\udf3e",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_cook: {
+    keywords: [ "chef", "woman", "human" ],
+    "char": "\ud83d\udc69\u200d\ud83c\udf73",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_cook: {
+    keywords: [ "chef", "man", "human" ],
+    "char": "\ud83d\udc68\u200d\ud83c\udf73",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_student: {
+    keywords: [ "graduate", "woman", "human" ],
+    "char": "\ud83d\udc69\u200d\ud83c\udf93",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_student: {
+    keywords: [ "graduate", "man", "human" ],
+    "char": "\ud83d\udc68\u200d\ud83c\udf93",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_singer: {
+    keywords: [ "rockstar", "entertainer", "woman", "human" ],
+    "char": "\ud83d\udc69\u200d\ud83c\udfa4",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_singer: {
+    keywords: [ "rockstar", "entertainer", "man", "human" ],
+    "char": "\ud83d\udc68\u200d\ud83c\udfa4",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_teacher: {
+    keywords: [ "instructor", "professor", "woman", "human" ],
+    "char": "\ud83d\udc69\u200d\ud83c\udfeb",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_teacher: {
+    keywords: [ "instructor", "professor", "man", "human" ],
+    "char": "\ud83d\udc68\u200d\ud83c\udfeb",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_factory_worker: {
+    keywords: [ "assembly", "industrial", "woman", "human" ],
+    "char": "\ud83d\udc69\u200d\ud83c\udfed",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_factory_worker: {
+    keywords: [ "assembly", "industrial", "man", "human" ],
+    "char": "\ud83d\udc68\u200d\ud83c\udfed",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_technologist: {
+    keywords: [ "coder", "developer", "engineer", "programmer", "software", "woman", "human", "laptop", "computer" ],
+    "char": "\ud83d\udc69\u200d\ud83d\udcbb",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_technologist: {
+    keywords: [ "coder", "developer", "engineer", "programmer", "software", "man", "human", "laptop", "computer" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udcbb",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_office_worker: {
+    keywords: [ "business", "manager", "woman", "human" ],
+    "char": "\ud83d\udc69\u200d\ud83d\udcbc",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_office_worker: {
+    keywords: [ "business", "manager", "man", "human" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udcbc",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_mechanic: {
+    keywords: [ "plumber", "woman", "human", "wrench" ],
+    "char": "\ud83d\udc69\u200d\ud83d\udd27",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_mechanic: {
+    keywords: [ "plumber", "man", "human", "wrench" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udd27",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_scientist: {
+    keywords: [ "biologist", "chemist", "engineer", "physicist", "woman", "human" ],
+    "char": "\ud83d\udc69\u200d\ud83d\udd2c",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_scientist: {
+    keywords: [ "biologist", "chemist", "engineer", "physicist", "man", "human" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udd2c",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_artist: {
+    keywords: [ "painter", "woman", "human" ],
+    "char": "\ud83d\udc69\u200d\ud83c\udfa8",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_artist: {
+    keywords: [ "painter", "man", "human" ],
+    "char": "\ud83d\udc68\u200d\ud83c\udfa8",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_firefighter: {
+    keywords: [ "fireman", "woman", "human" ],
+    "char": "\ud83d\udc69\u200d\ud83d\ude92",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_firefighter: {
+    keywords: [ "fireman", "man", "human" ],
+    "char": "\ud83d\udc68\u200d\ud83d\ude92",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_pilot: {
+    keywords: [ "aviator", "plane", "woman", "human" ],
+    "char": "\ud83d\udc69\u200d\u2708\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_pilot: {
+    keywords: [ "aviator", "plane", "man", "human" ],
+    "char": "\ud83d\udc68\u200d\u2708\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_astronaut: {
+    keywords: [ "space", "rocket", "woman", "human" ],
+    "char": "\ud83d\udc69\u200d\ud83d\ude80",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_astronaut: {
+    keywords: [ "space", "rocket", "man", "human" ],
+    "char": "\ud83d\udc68\u200d\ud83d\ude80",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_judge: {
+    keywords: [ "justice", "court", "woman", "human" ],
+    "char": "\ud83d\udc69\u200d\u2696\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_judge: {
+    keywords: [ "justice", "court", "man", "human" ],
+    "char": "\ud83d\udc68\u200d\u2696\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  mrs_claus: {
+    keywords: [ "woman", "female", "xmas", "mother christmas" ],
+    "char": "\ud83e\udd36",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  santa: {
+    keywords: [ "festival", "man", "male", "xmas", "father christmas" ],
+    "char": "\ud83c\udf85",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  sorceress: {
+    keywords: [ "woman", "female", "mage", "witch" ],
+    "char": "\ud83e\uddd9\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  wizard: {
+    keywords: [ "man", "male", "mage", "sorcerer" ],
+    "char": "\ud83e\uddd9\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_elf: {
+    keywords: [ "woman", "female" ],
+    "char": "\ud83e\udddd\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_elf: {
+    keywords: [ "man", "male" ],
+    "char": "\ud83e\udddd\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_vampire: {
+    keywords: [ "woman", "female" ],
+    "char": "\ud83e\udddb\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_vampire: {
+    keywords: [ "man", "male", "dracula" ],
+    "char": "\ud83e\udddb\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_zombie: {
+    keywords: [ "woman", "female", "undead", "walking dead" ],
+    "char": "\ud83e\udddf\u200d\u2640\ufe0f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  man_zombie: {
+    keywords: [ "man", "male", "dracula", "undead", "walking dead" ],
+    "char": "\ud83e\udddf\u200d\u2642\ufe0f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  woman_genie: {
+    keywords: [ "woman", "female" ],
+    "char": "\ud83e\uddde\u200d\u2640\ufe0f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  man_genie: {
+    keywords: [ "man", "male" ],
+    "char": "\ud83e\uddde\u200d\u2642\ufe0f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  mermaid: {
+    keywords: [ "woman", "female", "merwoman", "ariel" ],
+    "char": "\ud83e\udddc\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  merman: {
+    keywords: [ "man", "male", "triton" ],
+    "char": "\ud83e\udddc\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_fairy: {
+    keywords: [ "woman", "female" ],
+    "char": "\ud83e\uddda\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_fairy: {
+    keywords: [ "man", "male" ],
+    "char": "\ud83e\uddda\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  angel: {
+    keywords: [ "heaven", "wings", "halo" ],
+    "char": "\ud83d\udc7c",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  pregnant_woman: {
+    keywords: [ "baby" ],
+    "char": "\ud83e\udd30",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  breastfeeding: {
+    keywords: [ "nursing", "baby" ],
+    "char": "\ud83e\udd31",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  princess: {
+    keywords: [ "girl", "woman", "female", "blond", "crown", "royal", "queen" ],
+    "char": "\ud83d\udc78",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  prince: {
+    keywords: [ "boy", "man", "male", "crown", "royal", "king" ],
+    "char": "\ud83e\udd34",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  bride_with_veil: {
+    keywords: [ "couple", "marriage", "wedding", "woman", "bride" ],
+    "char": "\ud83d\udc70",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_in_tuxedo: {
+    keywords: [ "couple", "marriage", "wedding", "groom" ],
+    "char": "\ud83e\udd35",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  running_woman: {
+    keywords: [ "woman", "walking", "exercise", "race", "running", "female" ],
+    "char": "\ud83c\udfc3\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  running_man: {
+    keywords: [ "man", "walking", "exercise", "race", "running" ],
+    "char": "\ud83c\udfc3",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  walking_woman: {
+    keywords: [ "human", "feet", "steps", "woman", "female" ],
+    "char": "\ud83d\udeb6\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  walking_man: {
+    keywords: [ "human", "feet", "steps" ],
+    "char": "\ud83d\udeb6",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  dancer: {
+    keywords: [ "female", "girl", "woman", "fun" ],
+    "char": "\ud83d\udc83",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_dancing: {
+    keywords: [ "male", "boy", "fun", "dancer" ],
+    "char": "\ud83d\udd7a",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  dancing_women: {
+    keywords: [ "female", "bunny", "women", "girls" ],
+    "char": "\ud83d\udc6f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  dancing_men: {
+    keywords: [ "male", "bunny", "men", "boys" ],
+    "char": "\ud83d\udc6f\u200d\u2642\ufe0f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  couple: {
+    keywords: [ "pair", "people", "human", "love", "date", "dating", "like", "affection", "valentines", "marriage" ],
+    "char": "\ud83d\udc6b",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  two_men_holding_hands: {
+    keywords: [ "pair", "couple", "love", "like", "bromance", "friendship", "people", "human" ],
+    "char": "\ud83d\udc6c",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  two_women_holding_hands: {
+    keywords: [ "pair", "friendship", "couple", "love", "like", "female", "people", "human" ],
+    "char": "\ud83d\udc6d",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  bowing_woman: {
+    keywords: [ "woman", "female", "girl" ],
+    "char": "\ud83d\ude47\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  bowing_man: {
+    keywords: [ "man", "male", "boy" ],
+    "char": "\ud83d\ude47",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_facepalming: {
+    keywords: [ "man", "male", "boy", "disbelief" ],
+    "char": "\ud83e\udd26",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_facepalming: {
+    keywords: [ "woman", "female", "girl", "disbelief" ],
+    "char": "\ud83e\udd26\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_shrugging: {
+    keywords: [ "woman", "female", "girl", "confused", "indifferent", "doubt" ],
+    "char": "\ud83e\udd37",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_shrugging: {
+    keywords: [ "man", "male", "boy", "confused", "indifferent", "doubt" ],
+    "char": "\ud83e\udd37\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  tipping_hand_woman: {
+    keywords: [ "female", "girl", "woman", "human", "information" ],
+    "char": "\ud83d\udc81",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  tipping_hand_man: {
+    keywords: [ "male", "boy", "man", "human", "information" ],
+    "char": "\ud83d\udc81\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  no_good_woman: {
+    keywords: [ "female", "girl", "woman", "nope" ],
+    "char": "\ud83d\ude45",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  no_good_man: {
+    keywords: [ "male", "boy", "man", "nope" ],
+    "char": "\ud83d\ude45\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  ok_woman: {
+    keywords: [ "women", "girl", "female", "pink", "human", "woman" ],
+    "char": "\ud83d\ude46",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  ok_man: {
+    keywords: [ "men", "boy", "male", "blue", "human", "man" ],
+    "char": "\ud83d\ude46\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  raising_hand_woman: {
+    keywords: [ "female", "girl", "woman" ],
+    "char": "\ud83d\ude4b",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  raising_hand_man: {
+    keywords: [ "male", "boy", "man" ],
+    "char": "\ud83d\ude4b\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  pouting_woman: {
+    keywords: [ "female", "girl", "woman" ],
+    "char": "\ud83d\ude4e",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  pouting_man: {
+    keywords: [ "male", "boy", "man" ],
+    "char": "\ud83d\ude4e\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  frowning_woman: {
+    keywords: [ "female", "girl", "woman", "sad", "depressed", "discouraged", "unhappy" ],
+    "char": "\ud83d\ude4d",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  frowning_man: {
+    keywords: [ "male", "boy", "man", "sad", "depressed", "discouraged", "unhappy" ],
+    "char": "\ud83d\ude4d\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  haircut_woman: {
+    keywords: [ "female", "girl", "woman" ],
+    "char": "\ud83d\udc87",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  haircut_man: {
+    keywords: [ "male", "boy", "man" ],
+    "char": "\ud83d\udc87\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  massage_woman: {
+    keywords: [ "female", "girl", "woman", "head" ],
+    "char": "\ud83d\udc86",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  massage_man: {
+    keywords: [ "male", "boy", "man", "head" ],
+    "char": "\ud83d\udc86\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  woman_in_steamy_room: {
+    keywords: [ "female", "woman", "spa", "steamroom", "sauna" ],
+    "char": "\ud83e\uddd6\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  man_in_steamy_room: {
+    keywords: [ "male", "man", "spa", "steamroom", "sauna" ],
+    "char": "\ud83e\uddd6\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "people"
+  },
+  couple_with_heart_woman_man: {
+    keywords: [ "pair", "love", "like", "affection", "human", "dating", "valentines", "marriage" ],
+    "char": "\ud83d\udc91",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  couple_with_heart_woman_woman: {
+    keywords: [ "pair", "love", "like", "affection", "human", "dating", "valentines", "marriage" ],
+    "char": "\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  couple_with_heart_man_man: {
+    keywords: [ "pair", "love", "like", "affection", "human", "dating", "valentines", "marriage" ],
+    "char": "\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  couplekiss_man_woman: {
+    keywords: [ "pair", "valentines", "love", "like", "dating", "marriage" ],
+    "char": "\ud83d\udc8f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  couplekiss_woman_woman: {
+    keywords: [ "pair", "valentines", "love", "like", "dating", "marriage" ],
+    "char": "\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  couplekiss_man_man: {
+    keywords: [ "pair", "valentines", "love", "like", "dating", "marriage" ],
+    "char": "\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_woman_boy: {
+    keywords: [ "home", "parents", "child", "mom", "dad", "father", "mother", "people", "human" ],
+    "char": "\ud83d\udc6a",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_woman_girl: {
+    keywords: [ "home", "parents", "people", "human", "child" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_woman_girl_boy: {
+    keywords: [ "home", "parents", "people", "human", "children" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_woman_boy_boy: {
+    keywords: [ "home", "parents", "people", "human", "children" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_woman_girl_girl: {
+    keywords: [ "home", "parents", "people", "human", "children" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_woman_woman_boy: {
+    keywords: [ "home", "parents", "people", "human", "children" ],
+    "char": "\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_woman_woman_girl: {
+    keywords: [ "home", "parents", "people", "human", "children" ],
+    "char": "\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_woman_woman_girl_boy: {
+    keywords: [ "home", "parents", "people", "human", "children" ],
+    "char": "\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_woman_woman_boy_boy: {
+    keywords: [ "home", "parents", "people", "human", "children" ],
+    "char": "\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_woman_woman_girl_girl: {
+    keywords: [ "home", "parents", "people", "human", "children" ],
+    "char": "\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_man_boy: {
+    keywords: [ "home", "parents", "people", "human", "children" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_man_girl: {
+    keywords: [ "home", "parents", "people", "human", "children" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_man_girl_boy: {
+    keywords: [ "home", "parents", "people", "human", "children" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_man_boy_boy: {
+    keywords: [ "home", "parents", "people", "human", "children" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_man_girl_girl: {
+    keywords: [ "home", "parents", "people", "human", "children" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_woman_boy: {
+    keywords: [ "home", "parent", "people", "human", "child" ],
+    "char": "\ud83d\udc69\u200d\ud83d\udc66",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_woman_girl: {
+    keywords: [ "home", "parent", "people", "human", "child" ],
+    "char": "\ud83d\udc69\u200d\ud83d\udc67",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_woman_girl_boy: {
+    keywords: [ "home", "parent", "people", "human", "children" ],
+    "char": "\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_woman_boy_boy: {
+    keywords: [ "home", "parent", "people", "human", "children" ],
+    "char": "\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_woman_girl_girl: {
+    keywords: [ "home", "parent", "people", "human", "children" ],
+    "char": "\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_boy: {
+    keywords: [ "home", "parent", "people", "human", "child" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udc66",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_girl: {
+    keywords: [ "home", "parent", "people", "human", "child" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udc67",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_girl_boy: {
+    keywords: [ "home", "parent", "people", "human", "children" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_boy_boy: {
+    keywords: [ "home", "parent", "people", "human", "children" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  family_man_girl_girl: {
+    keywords: [ "home", "parent", "people", "human", "children" ],
+    "char": "\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  coat: {
+    keywords: [ "jacket" ],
+    "char": "\ud83e\udde5",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  womans_clothes: {
+    keywords: [ "fashion", "shopping_bags", "female" ],
+    "char": "\ud83d\udc5a",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  tshirt: {
+    keywords: [ "fashion", "cloth", "casual", "shirt", "tee" ],
+    "char": "\ud83d\udc55",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  jeans: {
+    keywords: [ "fashion", "shopping" ],
+    "char": "\ud83d\udc56",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  necktie: {
+    keywords: [ "shirt", "suitup", "formal", "fashion", "cloth", "business" ],
+    "char": "\ud83d\udc54",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  dress: {
+    keywords: [ "clothes", "fashion", "shopping" ],
+    "char": "\ud83d\udc57",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  bikini: {
+    keywords: [ "swimming", "female", "woman", "girl", "fashion", "beach", "summer" ],
+    "char": "\ud83d\udc59",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  kimono: {
+    keywords: [ "dress", "fashion", "women", "female", "japanese" ],
+    "char": "\ud83d\udc58",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  lipstick: {
+    keywords: [ "female", "girl", "fashion", "woman" ],
+    "char": "\ud83d\udc84",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  kiss: {
+    keywords: [ "face", "lips", "love", "like", "affection", "valentines" ],
+    "char": "\ud83d\udc8b",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  footprints: {
+    keywords: [ "feet", "tracking", "walking", "beach" ],
+    "char": "\ud83d\udc63",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  high_heel: {
+    keywords: [ "fashion", "shoes", "female", "pumps", "stiletto" ],
+    "char": "\ud83d\udc60",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  sandal: {
+    keywords: [ "shoes", "fashion", "flip flops" ],
+    "char": "\ud83d\udc61",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  boot: {
+    keywords: [ "shoes", "fashion" ],
+    "char": "\ud83d\udc62",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  mans_shoe: {
+    keywords: [ "fashion", "male" ],
+    "char": "\ud83d\udc5e",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  athletic_shoe: {
+    keywords: [ "shoes", "sports", "sneakers" ],
+    "char": "\ud83d\udc5f",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  socks: {
+    keywords: [ "stockings", "clothes" ],
+    "char": "\ud83e\udde6",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  gloves: {
+    keywords: [ "hands", "winter", "clothes" ],
+    "char": "\ud83e\udde4",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  scarf: {
+    keywords: [ "neck", "winter", "clothes" ],
+    "char": "\ud83e\udde3",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  womans_hat: {
+    keywords: [ "fashion", "accessories", "female", "lady", "spring" ],
+    "char": "\ud83d\udc52",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  tophat: {
+    keywords: [ "magic", "gentleman", "classy", "circus" ],
+    "char": "\ud83c\udfa9",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  billed_hat: {
+    keywords: [ "cap", "baseball" ],
+    "char": "\ud83e\udde2",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  rescue_worker_helmet: {
+    keywords: [ "construction", "build" ],
+    "char": "\u26d1",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  mortar_board: {
+    keywords: [ "school", "college", "degree", "university", "graduation", "cap", "hat", "legal", "learn", "education" ],
+    "char": "\ud83c\udf93",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  crown: {
+    keywords: [ "king", "kod", "leader", "royalty", "lord" ],
+    "char": "\ud83d\udc51",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  school_satchel: {
+    keywords: [ "student", "education", "bag", "backpack" ],
+    "char": "\ud83c\udf92",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  pouch: {
+    keywords: [ "bag", "accessories", "shopping" ],
+    "char": "\ud83d\udc5d",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  purse: {
+    keywords: [ "fashion", "accessories", "money", "sales", "shopping" ],
+    "char": "\ud83d\udc5b",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  handbag: {
+    keywords: [ "fashion", "accessory", "accessories", "shopping" ],
+    "char": "\ud83d\udc5c",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  briefcase: {
+    keywords: [ "business", "documents", "work", "law", "legal", "job", "career" ],
+    "char": "\ud83d\udcbc",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  eyeglasses: {
+    keywords: [ "fashion", "accessories", "eyesight", "nerdy", "dork", "geek" ],
+    "char": "\ud83d\udc53",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  dark_sunglasses: {
+    keywords: [ "face", "cool", "accessories" ],
+    "char": "\ud83d\udd76",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  ring: {
+    keywords: [ "wedding", "propose", "marriage", "valentines", "diamond", "fashion", "jewelry", "gem", "engagement" ],
+    "char": "\ud83d\udc8d",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  closed_umbrella: {
+    keywords: [ "weather", "rain", "drizzle" ],
+    "char": "\ud83c\udf02",
+    fitzpatrick_scale: false,
+    category: "people"
+  },
+  dog: {
+    keywords: [ "animal", "friend", "nature", "woof", "puppy", "pet", "faithful" ],
+    "char": "\ud83d\udc36",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  cat: {
+    keywords: [ "animal", "meow", "nature", "pet", "kitten" ],
+    "char": "\ud83d\udc31",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  mouse: {
+    keywords: [ "animal", "nature", "cheese_wedge", "rodent" ],
+    "char": "\ud83d\udc2d",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  hamster: {
+    keywords: [ "animal", "nature" ],
+    "char": "\ud83d\udc39",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  rabbit: {
+    keywords: [ "animal", "nature", "pet", "spring", "magic", "bunny" ],
+    "char": "\ud83d\udc30",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  fox_face: {
+    keywords: [ "animal", "nature", "face" ],
+    "char": "\ud83e\udd8a",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  bear: {
+    keywords: [ "animal", "nature", "wild" ],
+    "char": "\ud83d\udc3b",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  panda_face: {
+    keywords: [ "animal", "nature", "panda" ],
+    "char": "\ud83d\udc3c",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  koala: {
+    keywords: [ "animal", "nature" ],
+    "char": "\ud83d\udc28",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  tiger: {
+    keywords: [ "animal", "cat", "danger", "wild", "nature", "roar" ],
+    "char": "\ud83d\udc2f",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  lion: {
+    keywords: [ "animal", "nature" ],
+    "char": "\ud83e\udd81",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  cow: {
+    keywords: [ "beef", "ox", "animal", "nature", "moo", "milk" ],
+    "char": "\ud83d\udc2e",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  pig: {
+    keywords: [ "animal", "oink", "nature" ],
+    "char": "\ud83d\udc37",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  pig_nose: {
+    keywords: [ "animal", "oink" ],
+    "char": "\ud83d\udc3d",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  frog: {
+    keywords: [ "animal", "nature", "croak", "toad" ],
+    "char": "\ud83d\udc38",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  squid: {
+    keywords: [ "animal", "nature", "ocean", "sea" ],
+    "char": "\ud83e\udd91",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  octopus: {
+    keywords: [ "animal", "creature", "ocean", "sea", "nature", "beach" ],
+    "char": "\ud83d\udc19",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  shrimp: {
+    keywords: [ "animal", "ocean", "nature", "seafood" ],
+    "char": "\ud83e\udd90",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  monkey_face: {
+    keywords: [ "animal", "nature", "circus" ],
+    "char": "\ud83d\udc35",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  gorilla: {
+    keywords: [ "animal", "nature", "circus" ],
+    "char": "\ud83e\udd8d",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  see_no_evil: {
+    keywords: [ "monkey", "animal", "nature", "haha" ],
+    "char": "\ud83d\ude48",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  hear_no_evil: {
+    keywords: [ "animal", "monkey", "nature" ],
+    "char": "\ud83d\ude49",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  speak_no_evil: {
+    keywords: [ "monkey", "animal", "nature", "omg" ],
+    "char": "\ud83d\ude4a",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  monkey: {
+    keywords: [ "animal", "nature", "banana", "circus" ],
+    "char": "\ud83d\udc12",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  chicken: {
+    keywords: [ "animal", "cluck", "nature", "bird" ],
+    "char": "\ud83d\udc14",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  penguin: {
+    keywords: [ "animal", "nature" ],
+    "char": "\ud83d\udc27",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  bird: {
+    keywords: [ "animal", "nature", "fly", "tweet", "spring" ],
+    "char": "\ud83d\udc26",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  baby_chick: {
+    keywords: [ "animal", "chicken", "bird" ],
+    "char": "\ud83d\udc24",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  hatching_chick: {
+    keywords: [ "animal", "chicken", "egg", "born", "baby", "bird" ],
+    "char": "\ud83d\udc23",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  hatched_chick: {
+    keywords: [ "animal", "chicken", "baby", "bird" ],
+    "char": "\ud83d\udc25",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  duck: {
+    keywords: [ "animal", "nature", "bird", "mallard" ],
+    "char": "\ud83e\udd86",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  eagle: {
+    keywords: [ "animal", "nature", "bird" ],
+    "char": "\ud83e\udd85",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  owl: {
+    keywords: [ "animal", "nature", "bird", "hoot" ],
+    "char": "\ud83e\udd89",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  bat: {
+    keywords: [ "animal", "nature", "blind", "vampire" ],
+    "char": "\ud83e\udd87",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  wolf: {
+    keywords: [ "animal", "nature", "wild" ],
+    "char": "\ud83d\udc3a",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  boar: {
+    keywords: [ "animal", "nature" ],
+    "char": "\ud83d\udc17",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  horse: {
+    keywords: [ "animal", "brown", "nature" ],
+    "char": "\ud83d\udc34",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  unicorn: {
+    keywords: [ "animal", "nature", "mystical" ],
+    "char": "\ud83e\udd84",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  honeybee: {
+    keywords: [ "animal", "insect", "nature", "bug", "spring", "honey" ],
+    "char": "\ud83d\udc1d",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  bug: {
+    keywords: [ "animal", "insect", "nature", "worm" ],
+    "char": "\ud83d\udc1b",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  butterfly: {
+    keywords: [ "animal", "insect", "nature", "caterpillar" ],
+    "char": "\ud83e\udd8b",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  snail: {
+    keywords: [ "slow", "animal", "shell" ],
+    "char": "\ud83d\udc0c",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  beetle: {
+    keywords: [ "animal", "insect", "nature", "ladybug" ],
+    "char": "\ud83d\udc1e",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  ant: {
+    keywords: [ "animal", "insect", "nature", "bug" ],
+    "char": "\ud83d\udc1c",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  grasshopper: {
+    keywords: [ "animal", "cricket", "chirp" ],
+    "char": "\ud83e\udd97",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  spider: {
+    keywords: [ "animal", "arachnid" ],
+    "char": "\ud83d\udd77",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  scorpion: {
+    keywords: [ "animal", "arachnid" ],
+    "char": "\ud83e\udd82",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  crab: {
+    keywords: [ "animal", "crustacean" ],
+    "char": "\ud83e\udd80",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  snake: {
+    keywords: [ "animal", "evil", "nature", "hiss", "python" ],
+    "char": "\ud83d\udc0d",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  lizard: {
+    keywords: [ "animal", "nature", "reptile" ],
+    "char": "\ud83e\udd8e",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  "t-rex": {
+    keywords: [ "animal", "nature", "dinosaur", "tyrannosaurus", "extinct" ],
+    "char": "\ud83e\udd96",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  sauropod: {
+    keywords: [ "animal", "nature", "dinosaur", "brachiosaurus", "brontosaurus", "diplodocus", "extinct" ],
+    "char": "\ud83e\udd95",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  turtle: {
+    keywords: [ "animal", "slow", "nature", "tortoise" ],
+    "char": "\ud83d\udc22",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  tropical_fish: {
+    keywords: [ "animal", "swim", "ocean", "beach", "nemo" ],
+    "char": "\ud83d\udc20",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  fish: {
+    keywords: [ "animal", "food", "nature" ],
+    "char": "\ud83d\udc1f",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  blowfish: {
+    keywords: [ "animal", "nature", "food", "sea", "ocean" ],
+    "char": "\ud83d\udc21",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  dolphin: {
+    keywords: [ "animal", "nature", "fish", "sea", "ocean", "flipper", "fins", "beach" ],
+    "char": "\ud83d\udc2c",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  shark: {
+    keywords: [ "animal", "nature", "fish", "sea", "ocean", "jaws", "fins", "beach" ],
+    "char": "\ud83e\udd88",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  whale: {
+    keywords: [ "animal", "nature", "sea", "ocean" ],
+    "char": "\ud83d\udc33",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  whale2: {
+    keywords: [ "animal", "nature", "sea", "ocean" ],
+    "char": "\ud83d\udc0b",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  crocodile: {
+    keywords: [ "animal", "nature", "reptile", "lizard", "alligator" ],
+    "char": "\ud83d\udc0a",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  leopard: {
+    keywords: [ "animal", "nature" ],
+    "char": "\ud83d\udc06",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  zebra: {
+    keywords: [ "animal", "nature", "stripes", "safari" ],
+    "char": "\ud83e\udd93",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  tiger2: {
+    keywords: [ "animal", "nature", "roar" ],
+    "char": "\ud83d\udc05",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  water_buffalo: {
+    keywords: [ "animal", "nature", "ox", "cow" ],
+    "char": "\ud83d\udc03",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  ox: {
+    keywords: [ "animal", "cow", "beef" ],
+    "char": "\ud83d\udc02",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  cow2: {
+    keywords: [ "beef", "ox", "animal", "nature", "moo", "milk" ],
+    "char": "\ud83d\udc04",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  deer: {
+    keywords: [ "animal", "nature", "horns", "venison" ],
+    "char": "\ud83e\udd8c",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  dromedary_camel: {
+    keywords: [ "animal", "hot", "desert", "hump" ],
+    "char": "\ud83d\udc2a",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  camel: {
+    keywords: [ "animal", "nature", "hot", "desert", "hump" ],
+    "char": "\ud83d\udc2b",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  giraffe: {
+    keywords: [ "animal", "nature", "spots", "safari" ],
+    "char": "\ud83e\udd92",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  elephant: {
+    keywords: [ "animal", "nature", "nose", "th", "circus" ],
+    "char": "\ud83d\udc18",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  rhinoceros: {
+    keywords: [ "animal", "nature", "horn" ],
+    "char": "\ud83e\udd8f",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  goat: {
+    keywords: [ "animal", "nature" ],
+    "char": "\ud83d\udc10",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  ram: {
+    keywords: [ "animal", "sheep", "nature" ],
+    "char": "\ud83d\udc0f",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  sheep: {
+    keywords: [ "animal", "nature", "wool", "shipit" ],
+    "char": "\ud83d\udc11",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  racehorse: {
+    keywords: [ "animal", "gamble", "luck" ],
+    "char": "\ud83d\udc0e",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  pig2: {
+    keywords: [ "animal", "nature" ],
+    "char": "\ud83d\udc16",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  rat: {
+    keywords: [ "animal", "mouse", "rodent" ],
+    "char": "\ud83d\udc00",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  mouse2: {
+    keywords: [ "animal", "nature", "rodent" ],
+    "char": "\ud83d\udc01",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  rooster: {
+    keywords: [ "animal", "nature", "chicken" ],
+    "char": "\ud83d\udc13",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  turkey: {
+    keywords: [ "animal", "bird" ],
+    "char": "\ud83e\udd83",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  dove: {
+    keywords: [ "animal", "bird" ],
+    "char": "\ud83d\udd4a",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  dog2: {
+    keywords: [ "animal", "nature", "friend", "doge", "pet", "faithful" ],
+    "char": "\ud83d\udc15",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  poodle: {
+    keywords: [ "dog", "animal", "101", "nature", "pet" ],
+    "char": "\ud83d\udc29",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  cat2: {
+    keywords: [ "animal", "meow", "pet", "cats" ],
+    "char": "\ud83d\udc08",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  rabbit2: {
+    keywords: [ "animal", "nature", "pet", "magic", "spring" ],
+    "char": "\ud83d\udc07",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  chipmunk: {
+    keywords: [ "animal", "nature", "rodent", "squirrel" ],
+    "char": "\ud83d\udc3f",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  hedgehog: {
+    keywords: [ "animal", "nature", "spiny" ],
+    "char": "\ud83e\udd94",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  paw_prints: {
+    keywords: [ "animal", "tracking", "footprints", "dog", "cat", "pet", "feet" ],
+    "char": "\ud83d\udc3e",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  dragon: {
+    keywords: [ "animal", "myth", "nature", "chinese", "green" ],
+    "char": "\ud83d\udc09",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  dragon_face: {
+    keywords: [ "animal", "myth", "nature", "chinese", "green" ],
+    "char": "\ud83d\udc32",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  cactus: {
+    keywords: [ "vegetable", "plant", "nature" ],
+    "char": "\ud83c\udf35",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  christmas_tree: {
+    keywords: [ "festival", "vacation", "december", "xmas", "celebration" ],
+    "char": "\ud83c\udf84",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  evergreen_tree: {
+    keywords: [ "plant", "nature" ],
+    "char": "\ud83c\udf32",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  deciduous_tree: {
+    keywords: [ "plant", "nature" ],
+    "char": "\ud83c\udf33",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  palm_tree: {
+    keywords: [ "plant", "vegetable", "nature", "summer", "beach", "mojito", "tropical" ],
+    "char": "\ud83c\udf34",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  seedling: {
+    keywords: [ "plant", "nature", "grass", "lawn", "spring" ],
+    "char": "\ud83c\udf31",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  herb: {
+    keywords: [ "vegetable", "plant", "medicine", "weed", "grass", "lawn" ],
+    "char": "\ud83c\udf3f",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  shamrock: {
+    keywords: [ "vegetable", "plant", "nature", "irish", "clover" ],
+    "char": "\u2618",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  four_leaf_clover: {
+    keywords: [ "vegetable", "plant", "nature", "lucky", "irish" ],
+    "char": "\ud83c\udf40",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  bamboo: {
+    keywords: [ "plant", "nature", "vegetable", "panda", "pine_decoration" ],
+    "char": "\ud83c\udf8d",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  tanabata_tree: {
+    keywords: [ "plant", "nature", "branch", "summer" ],
+    "char": "\ud83c\udf8b",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  leaves: {
+    keywords: [ "nature", "plant", "tree", "vegetable", "grass", "lawn", "spring" ],
+    "char": "\ud83c\udf43",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  fallen_leaf: {
+    keywords: [ "nature", "plant", "vegetable", "leaves" ],
+    "char": "\ud83c\udf42",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  maple_leaf: {
+    keywords: [ "nature", "plant", "vegetable", "ca", "fall" ],
+    "char": "\ud83c\udf41",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  ear_of_rice: {
+    keywords: [ "nature", "plant" ],
+    "char": "\ud83c\udf3e",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  hibiscus: {
+    keywords: [ "plant", "vegetable", "flowers", "beach" ],
+    "char": "\ud83c\udf3a",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  sunflower: {
+    keywords: [ "nature", "plant", "fall" ],
+    "char": "\ud83c\udf3b",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  rose: {
+    keywords: [ "flowers", "valentines", "love", "spring" ],
+    "char": "\ud83c\udf39",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  wilted_flower: {
+    keywords: [ "plant", "nature", "flower" ],
+    "char": "\ud83e\udd40",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  tulip: {
+    keywords: [ "flowers", "plant", "nature", "summer", "spring" ],
+    "char": "\ud83c\udf37",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  blossom: {
+    keywords: [ "nature", "flowers", "yellow" ],
+    "char": "\ud83c\udf3c",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  cherry_blossom: {
+    keywords: [ "nature", "plant", "spring", "flower" ],
+    "char": "\ud83c\udf38",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  bouquet: {
+    keywords: [ "flowers", "nature", "spring" ],
+    "char": "\ud83d\udc90",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  mushroom: {
+    keywords: [ "plant", "vegetable" ],
+    "char": "\ud83c\udf44",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  chestnut: {
+    keywords: [ "food", "squirrel" ],
+    "char": "\ud83c\udf30",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  jack_o_lantern: {
+    keywords: [ "halloween", "light", "pumpkin", "creepy", "fall" ],
+    "char": "\ud83c\udf83",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  shell: {
+    keywords: [ "nature", "sea", "beach" ],
+    "char": "\ud83d\udc1a",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  spider_web: {
+    keywords: [ "animal", "insect", "arachnid", "silk" ],
+    "char": "\ud83d\udd78",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  earth_americas: {
+    keywords: [ "globe", "world", "USA", "international" ],
+    "char": "\ud83c\udf0e",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  earth_africa: {
+    keywords: [ "globe", "world", "international" ],
+    "char": "\ud83c\udf0d",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  earth_asia: {
+    keywords: [ "globe", "world", "east", "international" ],
+    "char": "\ud83c\udf0f",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  full_moon: {
+    keywords: [ "nature", "yellow", "twilight", "planet", "space", "night", "evening", "sleep" ],
+    "char": "\ud83c\udf15",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  waning_gibbous_moon: {
+    keywords: [ "nature", "twilight", "planet", "space", "night", "evening", "sleep", "waxing_gibbous_moon" ],
+    "char": "\ud83c\udf16",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  last_quarter_moon: {
+    keywords: [ "nature", "twilight", "planet", "space", "night", "evening", "sleep" ],
+    "char": "\ud83c\udf17",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  waning_crescent_moon: {
+    keywords: [ "nature", "twilight", "planet", "space", "night", "evening", "sleep" ],
+    "char": "\ud83c\udf18",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  new_moon: {
+    keywords: [ "nature", "twilight", "planet", "space", "night", "evening", "sleep" ],
+    "char": "\ud83c\udf11",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  waxing_crescent_moon: {
+    keywords: [ "nature", "twilight", "planet", "space", "night", "evening", "sleep" ],
+    "char": "\ud83c\udf12",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  first_quarter_moon: {
+    keywords: [ "nature", "twilight", "planet", "space", "night", "evening", "sleep" ],
+    "char": "\ud83c\udf13",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  waxing_gibbous_moon: {
+    keywords: [ "nature", "night", "sky", "gray", "twilight", "planet", "space", "evening", "sleep" ],
+    "char": "\ud83c\udf14",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  new_moon_with_face: {
+    keywords: [ "nature", "twilight", "planet", "space", "night", "evening", "sleep" ],
+    "char": "\ud83c\udf1a",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  full_moon_with_face: {
+    keywords: [ "nature", "twilight", "planet", "space", "night", "evening", "sleep" ],
+    "char": "\ud83c\udf1d",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  first_quarter_moon_with_face: {
+    keywords: [ "nature", "twilight", "planet", "space", "night", "evening", "sleep" ],
+    "char": "\ud83c\udf1b",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  last_quarter_moon_with_face: {
+    keywords: [ "nature", "twilight", "planet", "space", "night", "evening", "sleep" ],
+    "char": "\ud83c\udf1c",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  sun_with_face: {
+    keywords: [ "nature", "morning", "sky" ],
+    "char": "\ud83c\udf1e",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  crescent_moon: {
+    keywords: [ "night", "sleep", "sky", "evening", "magic" ],
+    "char": "\ud83c\udf19",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  star: {
+    keywords: [ "night", "yellow" ],
+    "char": "\u2b50",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  star2: {
+    keywords: [ "night", "sparkle", "awesome", "good", "magic" ],
+    "char": "\ud83c\udf1f",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  dizzy: {
+    keywords: [ "star", "sparkle", "shoot", "magic" ],
+    "char": "\ud83d\udcab",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  sparkles: {
+    keywords: [ "stars", "shine", "shiny", "cool", "awesome", "good", "magic" ],
+    "char": "\u2728",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  comet: {
+    keywords: [ "space" ],
+    "char": "\u2604",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  sunny: {
+    keywords: [ "weather", "nature", "brightness", "summer", "beach", "spring" ],
+    "char": "\u2600\ufe0f",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  sun_behind_small_cloud: {
+    keywords: [ "weather" ],
+    "char": "\ud83c\udf24",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  partly_sunny: {
+    keywords: [ "weather", "nature", "cloudy", "morning", "fall", "spring" ],
+    "char": "\u26c5",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  sun_behind_large_cloud: {
+    keywords: [ "weather" ],
+    "char": "\ud83c\udf25",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  sun_behind_rain_cloud: {
+    keywords: [ "weather" ],
+    "char": "\ud83c\udf26",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  cloud: {
+    keywords: [ "weather", "sky" ],
+    "char": "\u2601\ufe0f",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  cloud_with_rain: {
+    keywords: [ "weather" ],
+    "char": "\ud83c\udf27",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  cloud_with_lightning_and_rain: {
+    keywords: [ "weather", "lightning" ],
+    "char": "\u26c8",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  cloud_with_lightning: {
+    keywords: [ "weather", "thunder" ],
+    "char": "\ud83c\udf29",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  zap: {
+    keywords: [ "thunder", "weather", "lightning bolt", "fast" ],
+    "char": "\u26a1",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  fire: {
+    keywords: [ "hot", "cook", "flame" ],
+    "char": "\ud83d\udd25",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  boom: {
+    keywords: [ "bomb", "explode", "explosion", "collision", "blown" ],
+    "char": "\ud83d\udca5",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  snowflake: {
+    keywords: [ "winter", "season", "cold", "weather", "christmas", "xmas" ],
+    "char": "\u2744\ufe0f",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  cloud_with_snow: {
+    keywords: [ "weather" ],
+    "char": "\ud83c\udf28",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  snowman: {
+    keywords: [ "winter", "season", "cold", "weather", "christmas", "xmas", "frozen", "without_snow" ],
+    "char": "\u26c4",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  snowman_with_snow: {
+    keywords: [ "winter", "season", "cold", "weather", "christmas", "xmas", "frozen" ],
+    "char": "\u2603",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  wind_face: {
+    keywords: [ "gust", "air" ],
+    "char": "\ud83c\udf2c",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  dash: {
+    keywords: [ "wind", "air", "fast", "shoo", "fart", "smoke", "puff" ],
+    "char": "\ud83d\udca8",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  tornado: {
+    keywords: [ "weather", "cyclone", "twister" ],
+    "char": "\ud83c\udf2a",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  fog: {
+    keywords: [ "weather" ],
+    "char": "\ud83c\udf2b",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  open_umbrella: {
+    keywords: [ "weather", "spring" ],
+    "char": "\u2602",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  umbrella: {
+    keywords: [ "rainy", "weather", "spring" ],
+    "char": "\u2614",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  droplet: {
+    keywords: [ "water", "drip", "faucet", "spring" ],
+    "char": "\ud83d\udca7",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  sweat_drops: {
+    keywords: [ "water", "drip", "oops" ],
+    "char": "\ud83d\udca6",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  ocean: {
+    keywords: [ "sea", "water", "wave", "nature", "tsunami", "disaster" ],
+    "char": "\ud83c\udf0a",
+    fitzpatrick_scale: false,
+    category: "animals_and_nature"
+  },
+  green_apple: {
+    keywords: [ "fruit", "nature" ],
+    "char": "\ud83c\udf4f",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  apple: {
+    keywords: [ "fruit", "mac", "school" ],
+    "char": "\ud83c\udf4e",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  pear: {
+    keywords: [ "fruit", "nature", "food" ],
+    "char": "\ud83c\udf50",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  tangerine: {
+    keywords: [ "food", "fruit", "nature", "orange" ],
+    "char": "\ud83c\udf4a",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  lemon: {
+    keywords: [ "fruit", "nature" ],
+    "char": "\ud83c\udf4b",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  banana: {
+    keywords: [ "fruit", "food", "monkey" ],
+    "char": "\ud83c\udf4c",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  watermelon: {
+    keywords: [ "fruit", "food", "picnic", "summer" ],
+    "char": "\ud83c\udf49",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  grapes: {
+    keywords: [ "fruit", "food", "wine" ],
+    "char": "\ud83c\udf47",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  strawberry: {
+    keywords: [ "fruit", "food", "nature" ],
+    "char": "\ud83c\udf53",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  melon: {
+    keywords: [ "fruit", "nature", "food" ],
+    "char": "\ud83c\udf48",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  cherries: {
+    keywords: [ "food", "fruit" ],
+    "char": "\ud83c\udf52",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  peach: {
+    keywords: [ "fruit", "nature", "food" ],
+    "char": "\ud83c\udf51",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  pineapple: {
+    keywords: [ "fruit", "nature", "food" ],
+    "char": "\ud83c\udf4d",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  coconut: {
+    keywords: [ "fruit", "nature", "food", "palm" ],
+    "char": "\ud83e\udd65",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  kiwi_fruit: {
+    keywords: [ "fruit", "food" ],
+    "char": "\ud83e\udd5d",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  avocado: {
+    keywords: [ "fruit", "food" ],
+    "char": "\ud83e\udd51",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  broccoli: {
+    keywords: [ "fruit", "food", "vegetable" ],
+    "char": "\ud83e\udd66",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  tomato: {
+    keywords: [ "fruit", "vegetable", "nature", "food" ],
+    "char": "\ud83c\udf45",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  eggplant: {
+    keywords: [ "vegetable", "nature", "food", "aubergine" ],
+    "char": "\ud83c\udf46",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  cucumber: {
+    keywords: [ "fruit", "food", "pickle" ],
+    "char": "\ud83e\udd52",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  carrot: {
+    keywords: [ "vegetable", "food", "orange" ],
+    "char": "\ud83e\udd55",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  hot_pepper: {
+    keywords: [ "food", "spicy", "chilli", "chili" ],
+    "char": "\ud83c\udf36",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  potato: {
+    keywords: [ "food", "tuber", "vegatable", "starch" ],
+    "char": "\ud83e\udd54",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  corn: {
+    keywords: [ "food", "vegetable", "plant" ],
+    "char": "\ud83c\udf3d",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  sweet_potato: {
+    keywords: [ "food", "nature" ],
+    "char": "\ud83c\udf60",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  peanuts: {
+    keywords: [ "food", "nut" ],
+    "char": "\ud83e\udd5c",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  honey_pot: {
+    keywords: [ "bees", "sweet", "kitchen" ],
+    "char": "\ud83c\udf6f",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  croissant: {
+    keywords: [ "food", "bread", "french" ],
+    "char": "\ud83e\udd50",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  bread: {
+    keywords: [ "food", "wheat", "breakfast", "toast" ],
+    "char": "\ud83c\udf5e",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  baguette_bread: {
+    keywords: [ "food", "bread", "french" ],
+    "char": "\ud83e\udd56",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  pretzel: {
+    keywords: [ "food", "bread", "twisted" ],
+    "char": "\ud83e\udd68",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  cheese: {
+    keywords: [ "food", "chadder" ],
+    "char": "\ud83e\uddc0",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  egg: {
+    keywords: [ "food", "chicken", "breakfast" ],
+    "char": "\ud83e\udd5a",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  bacon: {
+    keywords: [ "food", "breakfast", "pork", "pig", "meat" ],
+    "char": "\ud83e\udd53",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  steak: {
+    keywords: [ "food", "cow", "meat", "cut", "chop", "lambchop", "porkchop" ],
+    "char": "\ud83e\udd69",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  pancakes: {
+    keywords: [ "food", "breakfast", "flapjacks", "hotcakes" ],
+    "char": "\ud83e\udd5e",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  poultry_leg: {
+    keywords: [ "food", "meat", "drumstick", "bird", "chicken", "turkey" ],
+    "char": "\ud83c\udf57",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  meat_on_bone: {
+    keywords: [ "good", "food", "drumstick" ],
+    "char": "\ud83c\udf56",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  fried_shrimp: {
+    keywords: [ "food", "animal", "appetizer", "summer" ],
+    "char": "\ud83c\udf64",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  fried_egg: {
+    keywords: [ "food", "breakfast", "kitchen", "egg" ],
+    "char": "\ud83c\udf73",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  hamburger: {
+    keywords: [ "meat", "fast food", "beef", "cheeseburger", "mcdonalds", "burger king" ],
+    "char": "\ud83c\udf54",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  fries: {
+    keywords: [ "chips", "snack", "fast food" ],
+    "char": "\ud83c\udf5f",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  stuffed_flatbread: {
+    keywords: [ "food", "flatbread", "stuffed", "gyro" ],
+    "char": "\ud83e\udd59",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  hotdog: {
+    keywords: [ "food", "frankfurter" ],
+    "char": "\ud83c\udf2d",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  pizza: {
+    keywords: [ "food", "party" ],
+    "char": "\ud83c\udf55",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  sandwich: {
+    keywords: [ "food", "lunch", "bread" ],
+    "char": "\ud83e\udd6a",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  canned_food: {
+    keywords: [ "food", "soup" ],
+    "char": "\ud83e\udd6b",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  spaghetti: {
+    keywords: [ "food", "italian", "noodle" ],
+    "char": "\ud83c\udf5d",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  taco: {
+    keywords: [ "food", "mexican" ],
+    "char": "\ud83c\udf2e",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  burrito: {
+    keywords: [ "food", "mexican" ],
+    "char": "\ud83c\udf2f",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  green_salad: {
+    keywords: [ "food", "healthy", "lettuce" ],
+    "char": "\ud83e\udd57",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  shallow_pan_of_food: {
+    keywords: [ "food", "cooking", "casserole", "paella" ],
+    "char": "\ud83e\udd58",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  ramen: {
+    keywords: [ "food", "japanese", "noodle", "chopsticks" ],
+    "char": "\ud83c\udf5c",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  stew: {
+    keywords: [ "food", "meat", "soup" ],
+    "char": "\ud83c\udf72",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  fish_cake: {
+    keywords: [ "food", "japan", "sea", "beach", "narutomaki", "pink", "swirl", "kamaboko", "surimi", "ramen" ],
+    "char": "\ud83c\udf65",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  fortune_cookie: {
+    keywords: [ "food", "prophecy" ],
+    "char": "\ud83e\udd60",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  sushi: {
+    keywords: [ "food", "fish", "japanese", "rice" ],
+    "char": "\ud83c\udf63",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  bento: {
+    keywords: [ "food", "japanese", "box" ],
+    "char": "\ud83c\udf71",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  curry: {
+    keywords: [ "food", "spicy", "hot", "indian" ],
+    "char": "\ud83c\udf5b",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  rice_ball: {
+    keywords: [ "food", "japanese" ],
+    "char": "\ud83c\udf59",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  rice: {
+    keywords: [ "food", "china", "asian" ],
+    "char": "\ud83c\udf5a",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  rice_cracker: {
+    keywords: [ "food", "japanese" ],
+    "char": "\ud83c\udf58",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  oden: {
+    keywords: [ "food", "japanese" ],
+    "char": "\ud83c\udf62",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  dango: {
+    keywords: [ "food", "dessert", "sweet", "japanese", "barbecue", "meat" ],
+    "char": "\ud83c\udf61",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  shaved_ice: {
+    keywords: [ "hot", "dessert", "summer" ],
+    "char": "\ud83c\udf67",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  ice_cream: {
+    keywords: [ "food", "hot", "dessert" ],
+    "char": "\ud83c\udf68",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  icecream: {
+    keywords: [ "food", "hot", "dessert", "summer" ],
+    "char": "\ud83c\udf66",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  pie: {
+    keywords: [ "food", "dessert", "pastry" ],
+    "char": "\ud83e\udd67",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  cake: {
+    keywords: [ "food", "dessert" ],
+    "char": "\ud83c\udf70",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  birthday: {
+    keywords: [ "food", "dessert", "cake" ],
+    "char": "\ud83c\udf82",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  custard: {
+    keywords: [ "dessert", "food" ],
+    "char": "\ud83c\udf6e",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  candy: {
+    keywords: [ "snack", "dessert", "sweet", "lolly" ],
+    "char": "\ud83c\udf6c",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  lollipop: {
+    keywords: [ "food", "snack", "candy", "sweet" ],
+    "char": "\ud83c\udf6d",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  chocolate_bar: {
+    keywords: [ "food", "snack", "dessert", "sweet" ],
+    "char": "\ud83c\udf6b",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  popcorn: {
+    keywords: [ "food", "movie theater", "films", "snack" ],
+    "char": "\ud83c\udf7f",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  dumpling: {
+    keywords: [ "food", "empanada", "pierogi", "potsticker" ],
+    "char": "\ud83e\udd5f",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  doughnut: {
+    keywords: [ "food", "dessert", "snack", "sweet", "donut" ],
+    "char": "\ud83c\udf69",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  cookie: {
+    keywords: [ "food", "snack", "oreo", "chocolate", "sweet", "dessert" ],
+    "char": "\ud83c\udf6a",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  milk_glass: {
+    keywords: [ "beverage", "drink", "cow" ],
+    "char": "\ud83e\udd5b",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  beer: {
+    keywords: [ "relax", "beverage", "drink", "drunk", "party", "pub", "summer", "alcohol", "booze" ],
+    "char": "\ud83c\udf7a",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  beers: {
+    keywords: [ "relax", "beverage", "drink", "drunk", "party", "pub", "summer", "alcohol", "booze" ],
+    "char": "\ud83c\udf7b",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  clinking_glasses: {
+    keywords: [ "beverage", "drink", "party", "alcohol", "celebrate", "cheers", "wine", "champagne", "toast" ],
+    "char": "\ud83e\udd42",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  wine_glass: {
+    keywords: [ "drink", "beverage", "drunk", "alcohol", "booze" ],
+    "char": "\ud83c\udf77",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  tumbler_glass: {
+    keywords: [ "drink", "beverage", "drunk", "alcohol", "liquor", "booze", "bourbon", "scotch", "whisky", "glass", "shot" ],
+    "char": "\ud83e\udd43",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  cocktail: {
+    keywords: [ "drink", "drunk", "alcohol", "beverage", "booze", "mojito" ],
+    "char": "\ud83c\udf78",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  tropical_drink: {
+    keywords: [ "beverage", "cocktail", "summer", "beach", "alcohol", "booze", "mojito" ],
+    "char": "\ud83c\udf79",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  champagne: {
+    keywords: [ "drink", "wine", "bottle", "celebration" ],
+    "char": "\ud83c\udf7e",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  sake: {
+    keywords: [ "wine", "drink", "drunk", "beverage", "japanese", "alcohol", "booze" ],
+    "char": "\ud83c\udf76",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  tea: {
+    keywords: [ "drink", "bowl", "breakfast", "green", "british" ],
+    "char": "\ud83c\udf75",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  cup_with_straw: {
+    keywords: [ "drink", "soda" ],
+    "char": "\ud83e\udd64",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  coffee: {
+    keywords: [ "beverage", "caffeine", "latte", "espresso" ],
+    "char": "\u2615",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  baby_bottle: {
+    keywords: [ "food", "container", "milk" ],
+    "char": "\ud83c\udf7c",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  spoon: {
+    keywords: [ "cutlery", "kitchen", "tableware" ],
+    "char": "\ud83e\udd44",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  fork_and_knife: {
+    keywords: [ "cutlery", "kitchen" ],
+    "char": "\ud83c\udf74",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  plate_with_cutlery: {
+    keywords: [ "food", "eat", "meal", "lunch", "dinner", "restaurant" ],
+    "char": "\ud83c\udf7d",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  bowl_with_spoon: {
+    keywords: [ "food", "breakfast", "cereal", "oatmeal", "porridge" ],
+    "char": "\ud83e\udd63",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  takeout_box: {
+    keywords: [ "food", "leftovers" ],
+    "char": "\ud83e\udd61",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  chopsticks: {
+    keywords: [ "food" ],
+    "char": "\ud83e\udd62",
+    fitzpatrick_scale: false,
+    category: "food_and_drink"
+  },
+  soccer: {
+    keywords: [ "sports", "football" ],
+    "char": "\u26bd",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  basketball: {
+    keywords: [ "sports", "balls", "NBA" ],
+    "char": "\ud83c\udfc0",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  football: {
+    keywords: [ "sports", "balls", "NFL" ],
+    "char": "\ud83c\udfc8",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  baseball: {
+    keywords: [ "sports", "balls" ],
+    "char": "\u26be",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  tennis: {
+    keywords: [ "sports", "balls", "green" ],
+    "char": "\ud83c\udfbe",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  volleyball: {
+    keywords: [ "sports", "balls" ],
+    "char": "\ud83c\udfd0",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  rugby_football: {
+    keywords: [ "sports", "team" ],
+    "char": "\ud83c\udfc9",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  "8ball": {
+    keywords: [ "pool", "hobby", "game", "luck", "magic" ],
+    "char": "\ud83c\udfb1",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  golf: {
+    keywords: [ "sports", "business", "flag", "hole", "summer" ],
+    "char": "\u26f3",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  golfing_woman: {
+    keywords: [ "sports", "business", "woman", "female" ],
+    "char": "\ud83c\udfcc\ufe0f\u200d\u2640\ufe0f",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  golfing_man: {
+    keywords: [ "sports", "business" ],
+    "char": "\ud83c\udfcc",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  ping_pong: {
+    keywords: [ "sports", "pingpong" ],
+    "char": "\ud83c\udfd3",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  badminton: {
+    keywords: [ "sports" ],
+    "char": "\ud83c\udff8",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  goal_net: {
+    keywords: [ "sports" ],
+    "char": "\ud83e\udd45",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  ice_hockey: {
+    keywords: [ "sports" ],
+    "char": "\ud83c\udfd2",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  field_hockey: {
+    keywords: [ "sports" ],
+    "char": "\ud83c\udfd1",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  cricket: {
+    keywords: [ "sports" ],
+    "char": "\ud83c\udfcf",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  ski: {
+    keywords: [ "sports", "winter", "cold", "snow" ],
+    "char": "\ud83c\udfbf",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  skier: {
+    keywords: [ "sports", "winter", "snow" ],
+    "char": "\u26f7",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  snowboarder: {
+    keywords: [ "sports", "winter" ],
+    "char": "\ud83c\udfc2",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  person_fencing: {
+    keywords: [ "sports", "fencing", "sword" ],
+    "char": "\ud83e\udd3a",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  women_wrestling: {
+    keywords: [ "sports", "wrestlers" ],
+    "char": "\ud83e\udd3c\u200d\u2640\ufe0f",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  men_wrestling: {
+    keywords: [ "sports", "wrestlers" ],
+    "char": "\ud83e\udd3c\u200d\u2642\ufe0f",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  woman_cartwheeling: {
+    keywords: [ "gymnastics" ],
+    "char": "\ud83e\udd38\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  man_cartwheeling: {
+    keywords: [ "gymnastics" ],
+    "char": "\ud83e\udd38\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  woman_playing_handball: {
+    keywords: [ "sports" ],
+    "char": "\ud83e\udd3e\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  man_playing_handball: {
+    keywords: [ "sports" ],
+    "char": "\ud83e\udd3e\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  ice_skate: {
+    keywords: [ "sports" ],
+    "char": "\u26f8",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  curling_stone: {
+    keywords: [ "sports" ],
+    "char": "\ud83e\udd4c",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  sled: {
+    keywords: [ "sleigh", "luge", "toboggan" ],
+    "char": "\ud83d\udef7",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  bow_and_arrow: {
+    keywords: [ "sports" ],
+    "char": "\ud83c\udff9",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  fishing_pole_and_fish: {
+    keywords: [ "food", "hobby", "summer" ],
+    "char": "\ud83c\udfa3",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  boxing_glove: {
+    keywords: [ "sports", "fighting" ],
+    "char": "\ud83e\udd4a",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  martial_arts_uniform: {
+    keywords: [ "judo", "karate", "taekwondo" ],
+    "char": "\ud83e\udd4b",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  rowing_woman: {
+    keywords: [ "sports", "hobby", "water", "ship", "woman", "female" ],
+    "char": "\ud83d\udea3\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  rowing_man: {
+    keywords: [ "sports", "hobby", "water", "ship" ],
+    "char": "\ud83d\udea3",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  climbing_woman: {
+    keywords: [ "sports", "hobby", "woman", "female", "rock" ],
+    "char": "\ud83e\uddd7\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  climbing_man: {
+    keywords: [ "sports", "hobby", "man", "male", "rock" ],
+    "char": "\ud83e\uddd7\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  swimming_woman: {
+    keywords: [ "sports", "exercise", "human", "athlete", "water", "summer", "woman", "female" ],
+    "char": "\ud83c\udfca\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  swimming_man: {
+    keywords: [ "sports", "exercise", "human", "athlete", "water", "summer" ],
+    "char": "\ud83c\udfca",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  woman_playing_water_polo: {
+    keywords: [ "sports", "pool" ],
+    "char": "\ud83e\udd3d\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  man_playing_water_polo: {
+    keywords: [ "sports", "pool" ],
+    "char": "\ud83e\udd3d\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  woman_in_lotus_position: {
+    keywords: [ "woman", "female", "meditation", "yoga", "serenity", "zen", "mindfulness" ],
+    "char": "\ud83e\uddd8\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  man_in_lotus_position: {
+    keywords: [ "man", "male", "meditation", "yoga", "serenity", "zen", "mindfulness" ],
+    "char": "\ud83e\uddd8\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  surfing_woman: {
+    keywords: [ "sports", "ocean", "sea", "summer", "beach", "woman", "female" ],
+    "char": "\ud83c\udfc4\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  surfing_man: {
+    keywords: [ "sports", "ocean", "sea", "summer", "beach" ],
+    "char": "\ud83c\udfc4",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  bath: {
+    keywords: [ "clean", "shower", "bathroom" ],
+    "char": "\ud83d\udec0",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  basketball_woman: {
+    keywords: [ "sports", "human", "woman", "female" ],
+    "char": "\u26f9\ufe0f\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  basketball_man: {
+    keywords: [ "sports", "human" ],
+    "char": "\u26f9",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  weight_lifting_woman: {
+    keywords: [ "sports", "training", "exercise", "woman", "female" ],
+    "char": "\ud83c\udfcb\ufe0f\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  weight_lifting_man: {
+    keywords: [ "sports", "training", "exercise" ],
+    "char": "\ud83c\udfcb",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  biking_woman: {
+    keywords: [ "sports", "bike", "exercise", "hipster", "woman", "female" ],
+    "char": "\ud83d\udeb4\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  biking_man: {
+    keywords: [ "sports", "bike", "exercise", "hipster" ],
+    "char": "\ud83d\udeb4",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  mountain_biking_woman: {
+    keywords: [ "transportation", "sports", "human", "race", "bike", "woman", "female" ],
+    "char": "\ud83d\udeb5\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  mountain_biking_man: {
+    keywords: [ "transportation", "sports", "human", "race", "bike" ],
+    "char": "\ud83d\udeb5",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  horse_racing: {
+    keywords: [ "animal", "betting", "competition", "gambling", "luck" ],
+    "char": "\ud83c\udfc7",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  business_suit_levitating: {
+    keywords: [ "suit", "business", "levitate", "hover", "jump" ],
+    "char": "\ud83d\udd74",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  trophy: {
+    keywords: [ "win", "award", "contest", "place", "ftw", "ceremony" ],
+    "char": "\ud83c\udfc6",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  running_shirt_with_sash: {
+    keywords: [ "play", "pageant" ],
+    "char": "\ud83c\udfbd",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  medal_sports: {
+    keywords: [ "award", "winning" ],
+    "char": "\ud83c\udfc5",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  medal_military: {
+    keywords: [ "award", "winning", "army" ],
+    "char": "\ud83c\udf96",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  "1st_place_medal": {
+    keywords: [ "award", "winning", "first" ],
+    "char": "\ud83e\udd47",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  "2nd_place_medal": {
+    keywords: [ "award", "second" ],
+    "char": "\ud83e\udd48",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  "3rd_place_medal": {
+    keywords: [ "award", "third" ],
+    "char": "\ud83e\udd49",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  reminder_ribbon: {
+    keywords: [ "sports", "cause", "support", "awareness" ],
+    "char": "\ud83c\udf97",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  rosette: {
+    keywords: [ "flower", "decoration", "military" ],
+    "char": "\ud83c\udff5",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  ticket: {
+    keywords: [ "event", "concert", "pass" ],
+    "char": "\ud83c\udfab",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  tickets: {
+    keywords: [ "sports", "concert", "entrance" ],
+    "char": "\ud83c\udf9f",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  performing_arts: {
+    keywords: [ "acting", "theater", "drama" ],
+    "char": "\ud83c\udfad",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  art: {
+    keywords: [ "design", "paint", "draw", "colors" ],
+    "char": "\ud83c\udfa8",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  circus_tent: {
+    keywords: [ "festival", "carnival", "party" ],
+    "char": "\ud83c\udfaa",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  woman_juggling: {
+    keywords: [ "juggle", "balance", "skill", "multitask" ],
+    "char": "\ud83e\udd39\u200d\u2640\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  man_juggling: {
+    keywords: [ "juggle", "balance", "skill", "multitask" ],
+    "char": "\ud83e\udd39\u200d\u2642\ufe0f",
+    fitzpatrick_scale: true,
+    category: "activity"
+  },
+  microphone: {
+    keywords: [ "sound", "music", "PA", "sing", "talkshow" ],
+    "char": "\ud83c\udfa4",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  headphones: {
+    keywords: [ "music", "score", "gadgets" ],
+    "char": "\ud83c\udfa7",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  musical_score: {
+    keywords: [ "treble", "clef", "compose" ],
+    "char": "\ud83c\udfbc",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  musical_keyboard: {
+    keywords: [ "piano", "instrument", "compose" ],
+    "char": "\ud83c\udfb9",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  drum: {
+    keywords: [ "music", "instrument", "drumsticks", "snare" ],
+    "char": "\ud83e\udd41",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  saxophone: {
+    keywords: [ "music", "instrument", "jazz", "blues" ],
+    "char": "\ud83c\udfb7",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  trumpet: {
+    keywords: [ "music", "brass" ],
+    "char": "\ud83c\udfba",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  guitar: {
+    keywords: [ "music", "instrument" ],
+    "char": "\ud83c\udfb8",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  violin: {
+    keywords: [ "music", "instrument", "orchestra", "symphony" ],
+    "char": "\ud83c\udfbb",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  clapper: {
+    keywords: [ "movie", "film", "record" ],
+    "char": "\ud83c\udfac",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  video_game: {
+    keywords: [ "play", "console", "PS4", "controller" ],
+    "char": "\ud83c\udfae",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  space_invader: {
+    keywords: [ "game", "arcade", "play" ],
+    "char": "\ud83d\udc7e",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  dart: {
+    keywords: [ "game", "play", "bar", "target", "bullseye" ],
+    "char": "\ud83c\udfaf",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  game_die: {
+    keywords: [ "dice", "random", "tabletop", "play", "luck" ],
+    "char": "\ud83c\udfb2",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  slot_machine: {
+    keywords: [ "bet", "gamble", "vegas", "fruit machine", "luck", "casino" ],
+    "char": "\ud83c\udfb0",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  bowling: {
+    keywords: [ "sports", "fun", "play" ],
+    "char": "\ud83c\udfb3",
+    fitzpatrick_scale: false,
+    category: "activity"
+  },
+  red_car: {
+    keywords: [ "red", "transportation", "vehicle" ],
+    "char": "\ud83d\ude97",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  taxi: {
+    keywords: [ "uber", "vehicle", "cars", "transportation" ],
+    "char": "\ud83d\ude95",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  blue_car: {
+    keywords: [ "transportation", "vehicle" ],
+    "char": "\ud83d\ude99",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  bus: {
+    keywords: [ "car", "vehicle", "transportation" ],
+    "char": "\ud83d\ude8c",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  trolleybus: {
+    keywords: [ "bart", "transportation", "vehicle" ],
+    "char": "\ud83d\ude8e",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  racing_car: {
+    keywords: [ "sports", "race", "fast", "formula", "f1" ],
+    "char": "\ud83c\udfce",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  police_car: {
+    keywords: [ "vehicle", "cars", "transportation", "law", "legal", "enforcement" ],
+    "char": "\ud83d\ude93",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  ambulance: {
+    keywords: [ "health", "911", "hospital" ],
+    "char": "\ud83d\ude91",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  fire_engine: {
+    keywords: [ "transportation", "cars", "vehicle" ],
+    "char": "\ud83d\ude92",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  minibus: {
+    keywords: [ "vehicle", "car", "transportation" ],
+    "char": "\ud83d\ude90",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  truck: {
+    keywords: [ "cars", "transportation" ],
+    "char": "\ud83d\ude9a",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  articulated_lorry: {
+    keywords: [ "vehicle", "cars", "transportation", "express" ],
+    "char": "\ud83d\ude9b",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  tractor: {
+    keywords: [ "vehicle", "car", "farming", "agriculture" ],
+    "char": "\ud83d\ude9c",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  kick_scooter: {
+    keywords: [ "vehicle", "kick", "razor" ],
+    "char": "\ud83d\udef4",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  motorcycle: {
+    keywords: [ "race", "sports", "fast" ],
+    "char": "\ud83c\udfcd",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  bike: {
+    keywords: [ "sports", "bicycle", "exercise", "hipster" ],
+    "char": "\ud83d\udeb2",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  motor_scooter: {
+    keywords: [ "vehicle", "vespa", "sasha" ],
+    "char": "\ud83d\udef5",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  rotating_light: {
+    keywords: [ "police", "ambulance", "911", "emergency", "alert", "error", "pinged", "law", "legal" ],
+    "char": "\ud83d\udea8",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  oncoming_police_car: {
+    keywords: [ "vehicle", "law", "legal", "enforcement", "911" ],
+    "char": "\ud83d\ude94",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  oncoming_bus: {
+    keywords: [ "vehicle", "transportation" ],
+    "char": "\ud83d\ude8d",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  oncoming_automobile: {
+    keywords: [ "car", "vehicle", "transportation" ],
+    "char": "\ud83d\ude98",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  oncoming_taxi: {
+    keywords: [ "vehicle", "cars", "uber" ],
+    "char": "\ud83d\ude96",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  aerial_tramway: {
+    keywords: [ "transportation", "vehicle", "ski" ],
+    "char": "\ud83d\udea1",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  mountain_cableway: {
+    keywords: [ "transportation", "vehicle", "ski" ],
+    "char": "\ud83d\udea0",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  suspension_railway: {
+    keywords: [ "vehicle", "transportation" ],
+    "char": "\ud83d\ude9f",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  railway_car: {
+    keywords: [ "transportation", "vehicle" ],
+    "char": "\ud83d\ude83",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  train: {
+    keywords: [ "transportation", "vehicle", "carriage", "public", "travel" ],
+    "char": "\ud83d\ude8b",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  monorail: {
+    keywords: [ "transportation", "vehicle" ],
+    "char": "\ud83d\ude9d",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  bullettrain_side: {
+    keywords: [ "transportation", "vehicle" ],
+    "char": "\ud83d\ude84",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  bullettrain_front: {
+    keywords: [ "transportation", "vehicle", "speed", "fast", "public", "travel" ],
+    "char": "\ud83d\ude85",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  light_rail: {
+    keywords: [ "transportation", "vehicle" ],
+    "char": "\ud83d\ude88",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  mountain_railway: {
+    keywords: [ "transportation", "vehicle" ],
+    "char": "\ud83d\ude9e",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  steam_locomotive: {
+    keywords: [ "transportation", "vehicle", "train" ],
+    "char": "\ud83d\ude82",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  train2: {
+    keywords: [ "transportation", "vehicle" ],
+    "char": "\ud83d\ude86",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  metro: {
+    keywords: [ "transportation", "blue-square", "mrt", "underground", "tube" ],
+    "char": "\ud83d\ude87",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  tram: {
+    keywords: [ "transportation", "vehicle" ],
+    "char": "\ud83d\ude8a",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  station: {
+    keywords: [ "transportation", "vehicle", "public" ],
+    "char": "\ud83d\ude89",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  flying_saucer: {
+    keywords: [ "transportation", "vehicle", "ufo" ],
+    "char": "\ud83d\udef8",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  helicopter: {
+    keywords: [ "transportation", "vehicle", "fly" ],
+    "char": "\ud83d\ude81",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  small_airplane: {
+    keywords: [ "flight", "transportation", "fly", "vehicle" ],
+    "char": "\ud83d\udee9",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  airplane: {
+    keywords: [ "vehicle", "transportation", "flight", "fly" ],
+    "char": "\u2708\ufe0f",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  flight_departure: {
+    keywords: [ "airport", "flight", "landing" ],
+    "char": "\ud83d\udeeb",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  flight_arrival: {
+    keywords: [ "airport", "flight", "boarding" ],
+    "char": "\ud83d\udeec",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  sailboat: {
+    keywords: [ "ship", "summer", "transportation", "water", "sailing" ],
+    "char": "\u26f5",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  motor_boat: {
+    keywords: [ "ship" ],
+    "char": "\ud83d\udee5",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  speedboat: {
+    keywords: [ "ship", "transportation", "vehicle", "summer" ],
+    "char": "\ud83d\udea4",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  ferry: {
+    keywords: [ "boat", "ship", "yacht" ],
+    "char": "\u26f4",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  passenger_ship: {
+    keywords: [ "yacht", "cruise", "ferry" ],
+    "char": "\ud83d\udef3",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  rocket: {
+    keywords: [ "launch", "ship", "staffmode", "NASA", "outer space", "outer_space", "fly" ],
+    "char": "\ud83d\ude80",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  artificial_satellite: {
+    keywords: [ "communication", "gps", "orbit", "spaceflight", "NASA", "ISS" ],
+    "char": "\ud83d\udef0",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  seat: {
+    keywords: [ "sit", "airplane", "transport", "bus", "flight", "fly" ],
+    "char": "\ud83d\udcba",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  canoe: {
+    keywords: [ "boat", "paddle", "water", "ship" ],
+    "char": "\ud83d\udef6",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  anchor: {
+    keywords: [ "ship", "ferry", "sea", "boat" ],
+    "char": "\u2693",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  construction: {
+    keywords: [ "wip", "progress", "caution", "warning" ],
+    "char": "\ud83d\udea7",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  fuelpump: {
+    keywords: [ "gas station", "petroleum" ],
+    "char": "\u26fd",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  busstop: {
+    keywords: [ "transportation", "wait" ],
+    "char": "\ud83d\ude8f",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  vertical_traffic_light: {
+    keywords: [ "transportation", "driving" ],
+    "char": "\ud83d\udea6",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  traffic_light: {
+    keywords: [ "transportation", "signal" ],
+    "char": "\ud83d\udea5",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  checkered_flag: {
+    keywords: [ "contest", "finishline", "race", "gokart" ],
+    "char": "\ud83c\udfc1",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  ship: {
+    keywords: [ "transportation", "titanic", "deploy" ],
+    "char": "\ud83d\udea2",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  ferris_wheel: {
+    keywords: [ "photo", "carnival", "londoneye" ],
+    "char": "\ud83c\udfa1",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  roller_coaster: {
+    keywords: [ "carnival", "playground", "photo", "fun" ],
+    "char": "\ud83c\udfa2",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  carousel_horse: {
+    keywords: [ "photo", "carnival" ],
+    "char": "\ud83c\udfa0",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  building_construction: {
+    keywords: [ "wip", "working", "progress" ],
+    "char": "\ud83c\udfd7",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  foggy: {
+    keywords: [ "photo", "mountain" ],
+    "char": "\ud83c\udf01",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  tokyo_tower: {
+    keywords: [ "photo", "japanese" ],
+    "char": "\ud83d\uddfc",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  factory: {
+    keywords: [ "building", "industry", "pollution", "smoke" ],
+    "char": "\ud83c\udfed",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  fountain: {
+    keywords: [ "photo", "summer", "water", "fresh" ],
+    "char": "\u26f2",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  rice_scene: {
+    keywords: [ "photo", "japan", "asia", "tsukimi" ],
+    "char": "\ud83c\udf91",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  mountain: {
+    keywords: [ "photo", "nature", "environment" ],
+    "char": "\u26f0",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  mountain_snow: {
+    keywords: [ "photo", "nature", "environment", "winter", "cold" ],
+    "char": "\ud83c\udfd4",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  mount_fuji: {
+    keywords: [ "photo", "mountain", "nature", "japanese" ],
+    "char": "\ud83d\uddfb",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  volcano: {
+    keywords: [ "photo", "nature", "disaster" ],
+    "char": "\ud83c\udf0b",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  japan: {
+    keywords: [ "nation", "country", "japanese", "asia" ],
+    "char": "\ud83d\uddfe",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  camping: {
+    keywords: [ "photo", "outdoors", "tent" ],
+    "char": "\ud83c\udfd5",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  tent: {
+    keywords: [ "photo", "camping", "outdoors" ],
+    "char": "\u26fa",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  national_park: {
+    keywords: [ "photo", "environment", "nature" ],
+    "char": "\ud83c\udfde",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  motorway: {
+    keywords: [ "road", "cupertino", "interstate", "highway" ],
+    "char": "\ud83d\udee3",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  railway_track: {
+    keywords: [ "train", "transportation" ],
+    "char": "\ud83d\udee4",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  sunrise: {
+    keywords: [ "morning", "view", "vacation", "photo" ],
+    "char": "\ud83c\udf05",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  sunrise_over_mountains: {
+    keywords: [ "view", "vacation", "photo" ],
+    "char": "\ud83c\udf04",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  desert: {
+    keywords: [ "photo", "warm", "saharah" ],
+    "char": "\ud83c\udfdc",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  beach_umbrella: {
+    keywords: [ "weather", "summer", "sunny", "sand", "mojito" ],
+    "char": "\ud83c\udfd6",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  desert_island: {
+    keywords: [ "photo", "tropical", "mojito" ],
+    "char": "\ud83c\udfdd",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  city_sunrise: {
+    keywords: [ "photo", "good morning", "dawn" ],
+    "char": "\ud83c\udf07",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  city_sunset: {
+    keywords: [ "photo", "evening", "sky", "buildings" ],
+    "char": "\ud83c\udf06",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  cityscape: {
+    keywords: [ "photo", "night life", "urban" ],
+    "char": "\ud83c\udfd9",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  night_with_stars: {
+    keywords: [ "evening", "city", "downtown" ],
+    "char": "\ud83c\udf03",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  bridge_at_night: {
+    keywords: [ "photo", "sanfrancisco" ],
+    "char": "\ud83c\udf09",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  milky_way: {
+    keywords: [ "photo", "space", "stars" ],
+    "char": "\ud83c\udf0c",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  stars: {
+    keywords: [ "night", "photo" ],
+    "char": "\ud83c\udf20",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  sparkler: {
+    keywords: [ "stars", "night", "shine" ],
+    "char": "\ud83c\udf87",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  fireworks: {
+    keywords: [ "photo", "festival", "carnival", "congratulations" ],
+    "char": "\ud83c\udf86",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  rainbow: {
+    keywords: [ "nature", "happy", "unicorn_face", "photo", "sky", "spring" ],
+    "char": "\ud83c\udf08",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  houses: {
+    keywords: [ "buildings", "photo" ],
+    "char": "\ud83c\udfd8",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  european_castle: {
+    keywords: [ "building", "royalty", "history" ],
+    "char": "\ud83c\udff0",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  japanese_castle: {
+    keywords: [ "photo", "building" ],
+    "char": "\ud83c\udfef",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  stadium: {
+    keywords: [ "photo", "place", "sports", "concert", "venue" ],
+    "char": "\ud83c\udfdf",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  statue_of_liberty: {
+    keywords: [ "american", "newyork" ],
+    "char": "\ud83d\uddfd",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  house: {
+    keywords: [ "building", "home" ],
+    "char": "\ud83c\udfe0",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  house_with_garden: {
+    keywords: [ "home", "plant", "nature" ],
+    "char": "\ud83c\udfe1",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  derelict_house: {
+    keywords: [ "abandon", "evict", "broken", "building" ],
+    "char": "\ud83c\udfda",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  office: {
+    keywords: [ "building", "bureau", "work" ],
+    "char": "\ud83c\udfe2",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  department_store: {
+    keywords: [ "building", "shopping", "mall" ],
+    "char": "\ud83c\udfec",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  post_office: {
+    keywords: [ "building", "envelope", "communication" ],
+    "char": "\ud83c\udfe3",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  european_post_office: {
+    keywords: [ "building", "email" ],
+    "char": "\ud83c\udfe4",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  hospital: {
+    keywords: [ "building", "health", "surgery", "doctor" ],
+    "char": "\ud83c\udfe5",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  bank: {
+    keywords: [ "building", "money", "sales", "cash", "business", "enterprise" ],
+    "char": "\ud83c\udfe6",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  hotel: {
+    keywords: [ "building", "accomodation", "checkin" ],
+    "char": "\ud83c\udfe8",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  convenience_store: {
+    keywords: [ "building", "shopping", "groceries" ],
+    "char": "\ud83c\udfea",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  school: {
+    keywords: [ "building", "student", "education", "learn", "teach" ],
+    "char": "\ud83c\udfeb",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  love_hotel: {
+    keywords: [ "like", "affection", "dating" ],
+    "char": "\ud83c\udfe9",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  wedding: {
+    keywords: [ "love", "like", "affection", "couple", "marriage", "bride", "groom" ],
+    "char": "\ud83d\udc92",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  classical_building: {
+    keywords: [ "art", "culture", "history" ],
+    "char": "\ud83c\udfdb",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  church: {
+    keywords: [ "building", "religion", "christ" ],
+    "char": "\u26ea",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  mosque: {
+    keywords: [ "islam", "worship", "minaret" ],
+    "char": "\ud83d\udd4c",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  synagogue: {
+    keywords: [ "judaism", "worship", "temple", "jewish" ],
+    "char": "\ud83d\udd4d",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  kaaba: {
+    keywords: [ "mecca", "mosque", "islam" ],
+    "char": "\ud83d\udd4b",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  shinto_shrine: {
+    keywords: [ "temple", "japan", "kyoto" ],
+    "char": "\u26e9",
+    fitzpatrick_scale: false,
+    category: "travel_and_places"
+  },
+  watch: {
+    keywords: [ "time", "accessories" ],
+    "char": "\u231a",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  iphone: {
+    keywords: [ "technology", "apple", "gadgets", "dial" ],
+    "char": "\ud83d\udcf1",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  calling: {
+    keywords: [ "iphone", "incoming" ],
+    "char": "\ud83d\udcf2",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  computer: {
+    keywords: [ "technology", "laptop", "screen", "display", "monitor" ],
+    "char": "\ud83d\udcbb",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  keyboard: {
+    keywords: [ "technology", "computer", "type", "input", "text" ],
+    "char": "\u2328",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  desktop_computer: {
+    keywords: [ "technology", "computing", "screen" ],
+    "char": "\ud83d\udda5",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  printer: {
+    keywords: [ "paper", "ink" ],
+    "char": "\ud83d\udda8",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  computer_mouse: {
+    keywords: [ "click" ],
+    "char": "\ud83d\uddb1",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  trackball: {
+    keywords: [ "technology", "trackpad" ],
+    "char": "\ud83d\uddb2",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  joystick: {
+    keywords: [ "game", "play" ],
+    "char": "\ud83d\udd79",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  clamp: {
+    keywords: [ "tool" ],
+    "char": "\ud83d\udddc",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  minidisc: {
+    keywords: [ "technology", "record", "data", "disk", "90s" ],
+    "char": "\ud83d\udcbd",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  floppy_disk: {
+    keywords: [ "oldschool", "technology", "save", "90s", "80s" ],
+    "char": "\ud83d\udcbe",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  cd: {
+    keywords: [ "technology", "dvd", "disk", "disc", "90s" ],
+    "char": "\ud83d\udcbf",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  dvd: {
+    keywords: [ "cd", "disk", "disc" ],
+    "char": "\ud83d\udcc0",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  vhs: {
+    keywords: [ "record", "video", "oldschool", "90s", "80s" ],
+    "char": "\ud83d\udcfc",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  camera: {
+    keywords: [ "gadgets", "photography" ],
+    "char": "\ud83d\udcf7",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  camera_flash: {
+    keywords: [ "photography", "gadgets" ],
+    "char": "\ud83d\udcf8",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  video_camera: {
+    keywords: [ "film", "record" ],
+    "char": "\ud83d\udcf9",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  movie_camera: {
+    keywords: [ "film", "record" ],
+    "char": "\ud83c\udfa5",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  film_projector: {
+    keywords: [ "video", "tape", "record", "movie" ],
+    "char": "\ud83d\udcfd",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  film_strip: {
+    keywords: [ "movie" ],
+    "char": "\ud83c\udf9e",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  telephone_receiver: {
+    keywords: [ "technology", "communication", "dial" ],
+    "char": "\ud83d\udcde",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  phone: {
+    keywords: [ "technology", "communication", "dial", "telephone" ],
+    "char": "\u260e\ufe0f",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  pager: {
+    keywords: [ "bbcall", "oldschool", "90s" ],
+    "char": "\ud83d\udcdf",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  fax: {
+    keywords: [ "communication", "technology" ],
+    "char": "\ud83d\udce0",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  tv: {
+    keywords: [ "technology", "program", "oldschool", "show", "television" ],
+    "char": "\ud83d\udcfa",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  radio: {
+    keywords: [ "communication", "music", "podcast", "program" ],
+    "char": "\ud83d\udcfb",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  studio_microphone: {
+    keywords: [ "sing", "recording", "artist", "talkshow" ],
+    "char": "\ud83c\udf99",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  level_slider: {
+    keywords: [ "scale" ],
+    "char": "\ud83c\udf9a",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  control_knobs: {
+    keywords: [ "dial" ],
+    "char": "\ud83c\udf9b",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  stopwatch: {
+    keywords: [ "time", "deadline" ],
+    "char": "\u23f1",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  timer_clock: {
+    keywords: [ "alarm" ],
+    "char": "\u23f2",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  alarm_clock: {
+    keywords: [ "time", "wake" ],
+    "char": "\u23f0",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  mantelpiece_clock: {
+    keywords: [ "time" ],
+    "char": "\ud83d\udd70",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  hourglass_flowing_sand: {
+    keywords: [ "oldschool", "time", "countdown" ],
+    "char": "\u23f3",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  hourglass: {
+    keywords: [ "time", "clock", "oldschool", "limit", "exam", "quiz", "test" ],
+    "char": "\u231b",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  satellite: {
+    keywords: [ "communication", "future", "radio", "space" ],
+    "char": "\ud83d\udce1",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  battery: {
+    keywords: [ "power", "energy", "sustain" ],
+    "char": "\ud83d\udd0b",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  electric_plug: {
+    keywords: [ "charger", "power" ],
+    "char": "\ud83d\udd0c",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  bulb: {
+    keywords: [ "light", "electricity", "idea" ],
+    "char": "\ud83d\udca1",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  flashlight: {
+    keywords: [ "dark", "camping", "sight", "night" ],
+    "char": "\ud83d\udd26",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  candle: {
+    keywords: [ "fire", "wax" ],
+    "char": "\ud83d\udd6f",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  wastebasket: {
+    keywords: [ "bin", "trash", "rubbish", "garbage", "toss" ],
+    "char": "\ud83d\uddd1",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  oil_drum: {
+    keywords: [ "barrell" ],
+    "char": "\ud83d\udee2",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  money_with_wings: {
+    keywords: [ "dollar", "bills", "payment", "sale" ],
+    "char": "\ud83d\udcb8",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  dollar: {
+    keywords: [ "money", "sales", "bill", "currency" ],
+    "char": "\ud83d\udcb5",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  yen: {
+    keywords: [ "money", "sales", "japanese", "dollar", "currency" ],
+    "char": "\ud83d\udcb4",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  euro: {
+    keywords: [ "money", "sales", "dollar", "currency" ],
+    "char": "\ud83d\udcb6",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  pound: {
+    keywords: [ "british", "sterling", "money", "sales", "bills", "uk", "england", "currency" ],
+    "char": "\ud83d\udcb7",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  moneybag: {
+    keywords: [ "dollar", "payment", "coins", "sale" ],
+    "char": "\ud83d\udcb0",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  credit_card: {
+    keywords: [ "money", "sales", "dollar", "bill", "payment", "shopping" ],
+    "char": "\ud83d\udcb3",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  gem: {
+    keywords: [ "blue", "ruby", "diamond", "jewelry" ],
+    "char": "\ud83d\udc8e",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  balance_scale: {
+    keywords: [ "law", "fairness", "weight" ],
+    "char": "\u2696",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  wrench: {
+    keywords: [ "tools", "diy", "ikea", "fix", "maintainer" ],
+    "char": "\ud83d\udd27",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  hammer: {
+    keywords: [ "tools", "build", "create" ],
+    "char": "\ud83d\udd28",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  hammer_and_pick: {
+    keywords: [ "tools", "build", "create" ],
+    "char": "\u2692",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  hammer_and_wrench: {
+    keywords: [ "tools", "build", "create" ],
+    "char": "\ud83d\udee0",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  pick: {
+    keywords: [ "tools", "dig" ],
+    "char": "\u26cf",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  nut_and_bolt: {
+    keywords: [ "handy", "tools", "fix" ],
+    "char": "\ud83d\udd29",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  gear: {
+    keywords: [ "cog" ],
+    "char": "\u2699",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  chains: {
+    keywords: [ "lock", "arrest" ],
+    "char": "\u26d3",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  gun: {
+    keywords: [ "violence", "weapon", "pistol", "revolver" ],
+    "char": "\ud83d\udd2b",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  bomb: {
+    keywords: [ "boom", "explode", "explosion", "terrorism" ],
+    "char": "\ud83d\udca3",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  hocho: {
+    keywords: [ "knife", "blade", "cutlery", "kitchen", "weapon" ],
+    "char": "\ud83d\udd2a",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  dagger: {
+    keywords: [ "weapon" ],
+    "char": "\ud83d\udde1",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  crossed_swords: {
+    keywords: [ "weapon" ],
+    "char": "\u2694",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  shield: {
+    keywords: [ "protection", "security" ],
+    "char": "\ud83d\udee1",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  smoking: {
+    keywords: [ "kills", "tobacco", "cigarette", "joint", "smoke" ],
+    "char": "\ud83d\udeac",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  skull_and_crossbones: {
+    keywords: [ "poison", "danger", "deadly", "scary", "death", "pirate", "evil" ],
+    "char": "\u2620",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  coffin: {
+    keywords: [ "vampire", "dead", "die", "death", "rip", "graveyard", "cemetery", "casket", "funeral", "box" ],
+    "char": "\u26b0",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  funeral_urn: {
+    keywords: [ "dead", "die", "death", "rip", "ashes" ],
+    "char": "\u26b1",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  amphora: {
+    keywords: [ "vase", "jar" ],
+    "char": "\ud83c\udffa",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  crystal_ball: {
+    keywords: [ "disco", "party", "magic", "circus", "fortune_teller" ],
+    "char": "\ud83d\udd2e",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  prayer_beads: {
+    keywords: [ "dhikr", "religious" ],
+    "char": "\ud83d\udcff",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  barber: {
+    keywords: [ "hair", "salon", "style" ],
+    "char": "\ud83d\udc88",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  alembic: {
+    keywords: [ "distilling", "science", "experiment", "chemistry" ],
+    "char": "\u2697",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  telescope: {
+    keywords: [ "stars", "space", "zoom", "science", "astronomy" ],
+    "char": "\ud83d\udd2d",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  microscope: {
+    keywords: [ "laboratory", "experiment", "zoomin", "science", "study" ],
+    "char": "\ud83d\udd2c",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  hole: {
+    keywords: [ "embarrassing" ],
+    "char": "\ud83d\udd73",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  pill: {
+    keywords: [ "health", "medicine", "doctor", "pharmacy", "drug" ],
+    "char": "\ud83d\udc8a",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  syringe: {
+    keywords: [ "health", "hospital", "drugs", "blood", "medicine", "needle", "doctor", "nurse" ],
+    "char": "\ud83d\udc89",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  thermometer: {
+    keywords: [ "weather", "temperature", "hot", "cold" ],
+    "char": "\ud83c\udf21",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  label: {
+    keywords: [ "sale", "tag" ],
+    "char": "\ud83c\udff7",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  bookmark: {
+    keywords: [ "favorite", "label", "save" ],
+    "char": "\ud83d\udd16",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  toilet: {
+    keywords: [ "restroom", "wc", "washroom", "bathroom", "potty" ],
+    "char": "\ud83d\udebd",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  shower: {
+    keywords: [ "clean", "water", "bathroom" ],
+    "char": "\ud83d\udebf",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  bathtub: {
+    keywords: [ "clean", "shower", "bathroom" ],
+    "char": "\ud83d\udec1",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  key: {
+    keywords: [ "lock", "door", "password" ],
+    "char": "\ud83d\udd11",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  old_key: {
+    keywords: [ "lock", "door", "password" ],
+    "char": "\ud83d\udddd",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  couch_and_lamp: {
+    keywords: [ "read", "chill" ],
+    "char": "\ud83d\udecb",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  sleeping_bed: {
+    keywords: [ "bed", "rest" ],
+    "char": "\ud83d\udecc",
+    fitzpatrick_scale: true,
+    category: "objects"
+  },
+  bed: {
+    keywords: [ "sleep", "rest" ],
+    "char": "\ud83d\udecf",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  door: {
+    keywords: [ "house", "entry", "exit" ],
+    "char": "\ud83d\udeaa",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  bellhop_bell: {
+    keywords: [ "service" ],
+    "char": "\ud83d\udece",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  framed_picture: {
+    keywords: [ "photography" ],
+    "char": "\ud83d\uddbc",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  world_map: {
+    keywords: [ "location", "direction" ],
+    "char": "\ud83d\uddfa",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  parasol_on_ground: {
+    keywords: [ "weather", "summer" ],
+    "char": "\u26f1",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  moyai: {
+    keywords: [ "rock", "easter island", "moai" ],
+    "char": "\ud83d\uddff",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  shopping: {
+    keywords: [ "mall", "buy", "purchase" ],
+    "char": "\ud83d\udecd",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  shopping_cart: {
+    keywords: [ "trolley" ],
+    "char": "\ud83d\uded2",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  balloon: {
+    keywords: [ "party", "celebration", "birthday", "circus" ],
+    "char": "\ud83c\udf88",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  flags: {
+    keywords: [ "fish", "japanese", "koinobori", "carp", "banner" ],
+    "char": "\ud83c\udf8f",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  ribbon: {
+    keywords: [ "decoration", "pink", "girl", "bowtie" ],
+    "char": "\ud83c\udf80",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  gift: {
+    keywords: [ "present", "birthday", "christmas", "xmas" ],
+    "char": "\ud83c\udf81",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  confetti_ball: {
+    keywords: [ "festival", "party", "birthday", "circus" ],
+    "char": "\ud83c\udf8a",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  tada: {
+    keywords: [ "party", "congratulations", "birthday", "magic", "circus", "celebration" ],
+    "char": "\ud83c\udf89",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  dolls: {
+    keywords: [ "japanese", "toy", "kimono" ],
+    "char": "\ud83c\udf8e",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  wind_chime: {
+    keywords: [ "nature", "ding", "spring", "bell" ],
+    "char": "\ud83c\udf90",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  crossed_flags: {
+    keywords: [ "japanese", "nation", "country", "border" ],
+    "char": "\ud83c\udf8c",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  izakaya_lantern: {
+    keywords: [ "light", "paper", "halloween", "spooky" ],
+    "char": "\ud83c\udfee",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  email: {
+    keywords: [ "letter", "postal", "inbox", "communication" ],
+    "char": "\u2709\ufe0f",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  envelope_with_arrow: {
+    keywords: [ "email", "communication" ],
+    "char": "\ud83d\udce9",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  incoming_envelope: {
+    keywords: [ "email", "inbox" ],
+    "char": "\ud83d\udce8",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  "e-mail": {
+    keywords: [ "communication", "inbox" ],
+    "char": "\ud83d\udce7",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  love_letter: {
+    keywords: [ "email", "like", "affection", "envelope", "valentines" ],
+    "char": "\ud83d\udc8c",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  postbox: {
+    keywords: [ "email", "letter", "envelope" ],
+    "char": "\ud83d\udcee",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  mailbox_closed: {
+    keywords: [ "email", "communication", "inbox" ],
+    "char": "\ud83d\udcea",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  mailbox: {
+    keywords: [ "email", "inbox", "communication" ],
+    "char": "\ud83d\udceb",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  mailbox_with_mail: {
+    keywords: [ "email", "inbox", "communication" ],
+    "char": "\ud83d\udcec",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  mailbox_with_no_mail: {
+    keywords: [ "email", "inbox" ],
+    "char": "\ud83d\udced",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  "package": {
+    keywords: [ "mail", "gift", "cardboard", "box", "moving" ],
+    "char": "\ud83d\udce6",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  postal_horn: {
+    keywords: [ "instrument", "music" ],
+    "char": "\ud83d\udcef",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  inbox_tray: {
+    keywords: [ "email", "documents" ],
+    "char": "\ud83d\udce5",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  outbox_tray: {
+    keywords: [ "inbox", "email" ],
+    "char": "\ud83d\udce4",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  scroll: {
+    keywords: [ "documents", "ancient", "history", "paper" ],
+    "char": "\ud83d\udcdc",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  page_with_curl: {
+    keywords: [ "documents", "office", "paper" ],
+    "char": "\ud83d\udcc3",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  bookmark_tabs: {
+    keywords: [ "favorite", "save", "order", "tidy" ],
+    "char": "\ud83d\udcd1",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  bar_chart: {
+    keywords: [ "graph", "presentation", "stats" ],
+    "char": "\ud83d\udcca",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  chart_with_upwards_trend: {
+    keywords: [ "graph", "presentation", "stats", "recovery", "business", "economics", "money", "sales", "good", "success" ],
+    "char": "\ud83d\udcc8",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  chart_with_downwards_trend: {
+    keywords: [ "graph", "presentation", "stats", "recession", "business", "economics", "money", "sales", "bad", "failure" ],
+    "char": "\ud83d\udcc9",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  page_facing_up: {
+    keywords: [ "documents", "office", "paper", "information" ],
+    "char": "\ud83d\udcc4",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  date: {
+    keywords: [ "calendar", "schedule" ],
+    "char": "\ud83d\udcc5",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  calendar: {
+    keywords: [ "schedule", "date", "planning" ],
+    "char": "\ud83d\udcc6",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  spiral_calendar: {
+    keywords: [ "date", "schedule", "planning" ],
+    "char": "\ud83d\uddd3",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  card_index: {
+    keywords: [ "business", "stationery" ],
+    "char": "\ud83d\udcc7",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  card_file_box: {
+    keywords: [ "business", "stationery" ],
+    "char": "\ud83d\uddc3",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  ballot_box: {
+    keywords: [ "election", "vote" ],
+    "char": "\ud83d\uddf3",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  file_cabinet: {
+    keywords: [ "filing", "organizing" ],
+    "char": "\ud83d\uddc4",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  clipboard: {
+    keywords: [ "stationery", "documents" ],
+    "char": "\ud83d\udccb",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  spiral_notepad: {
+    keywords: [ "memo", "stationery" ],
+    "char": "\ud83d\uddd2",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  file_folder: {
+    keywords: [ "documents", "business", "office" ],
+    "char": "\ud83d\udcc1",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  open_file_folder: {
+    keywords: [ "documents", "load" ],
+    "char": "\ud83d\udcc2",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  card_index_dividers: {
+    keywords: [ "organizing", "business", "stationery" ],
+    "char": "\ud83d\uddc2",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  newspaper_roll: {
+    keywords: [ "press", "headline" ],
+    "char": "\ud83d\uddde",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  newspaper: {
+    keywords: [ "press", "headline" ],
+    "char": "\ud83d\udcf0",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  notebook: {
+    keywords: [ "stationery", "record", "notes", "paper", "study" ],
+    "char": "\ud83d\udcd3",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  closed_book: {
+    keywords: [ "read", "library", "knowledge", "textbook", "learn" ],
+    "char": "\ud83d\udcd5",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  green_book: {
+    keywords: [ "read", "library", "knowledge", "study" ],
+    "char": "\ud83d\udcd7",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  blue_book: {
+    keywords: [ "read", "library", "knowledge", "learn", "study" ],
+    "char": "\ud83d\udcd8",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  orange_book: {
+    keywords: [ "read", "library", "knowledge", "textbook", "study" ],
+    "char": "\ud83d\udcd9",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  notebook_with_decorative_cover: {
+    keywords: [ "classroom", "notes", "record", "paper", "study" ],
+    "char": "\ud83d\udcd4",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  ledger: {
+    keywords: [ "notes", "paper" ],
+    "char": "\ud83d\udcd2",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  books: {
+    keywords: [ "literature", "library", "study" ],
+    "char": "\ud83d\udcda",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  open_book: {
+    keywords: [ "book", "read", "library", "knowledge", "literature", "learn", "study" ],
+    "char": "\ud83d\udcd6",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  link: {
+    keywords: [ "rings", "url" ],
+    "char": "\ud83d\udd17",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  paperclip: {
+    keywords: [ "documents", "stationery" ],
+    "char": "\ud83d\udcce",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  paperclips: {
+    keywords: [ "documents", "stationery" ],
+    "char": "\ud83d\udd87",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  scissors: {
+    keywords: [ "stationery", "cut" ],
+    "char": "\u2702\ufe0f",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  triangular_ruler: {
+    keywords: [ "stationery", "math", "architect", "sketch" ],
+    "char": "\ud83d\udcd0",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  straight_ruler: {
+    keywords: [ "stationery", "calculate", "length", "math", "school", "drawing", "architect", "sketch" ],
+    "char": "\ud83d\udccf",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  pushpin: {
+    keywords: [ "stationery", "mark", "here" ],
+    "char": "\ud83d\udccc",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  round_pushpin: {
+    keywords: [ "stationery", "location", "map", "here" ],
+    "char": "\ud83d\udccd",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  triangular_flag_on_post: {
+    keywords: [ "mark", "milestone", "place" ],
+    "char": "\ud83d\udea9",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  white_flag: {
+    keywords: [ "losing", "loser", "lost", "surrender", "give up", "fail" ],
+    "char": "\ud83c\udff3",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  black_flag: {
+    keywords: [ "pirate" ],
+    "char": "\ud83c\udff4",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  rainbow_flag: {
+    keywords: [ "flag", "rainbow", "pride", "gay", "lgbt", "glbt", "queer", "homosexual", "lesbian", "bisexual", "transgender" ],
+    "char": "\ud83c\udff3\ufe0f\u200d\ud83c\udf08",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  closed_lock_with_key: {
+    keywords: [ "security", "privacy" ],
+    "char": "\ud83d\udd10",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  lock: {
+    keywords: [ "security", "password", "padlock" ],
+    "char": "\ud83d\udd12",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  unlock: {
+    keywords: [ "privacy", "security" ],
+    "char": "\ud83d\udd13",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  lock_with_ink_pen: {
+    keywords: [ "security", "secret" ],
+    "char": "\ud83d\udd0f",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  pen: {
+    keywords: [ "stationery", "writing", "write" ],
+    "char": "\ud83d\udd8a",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  fountain_pen: {
+    keywords: [ "stationery", "writing", "write" ],
+    "char": "\ud83d\udd8b",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  black_nib: {
+    keywords: [ "pen", "stationery", "writing", "write" ],
+    "char": "\u2712\ufe0f",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  memo: {
+    keywords: [ "write", "documents", "stationery", "pencil", "paper", "writing", "legal", "exam", "quiz", "test", "study", "compose" ],
+    "char": "\ud83d\udcdd",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  pencil2: {
+    keywords: [ "stationery", "write", "paper", "writing", "school", "study" ],
+    "char": "\u270f\ufe0f",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  crayon: {
+    keywords: [ "drawing", "creativity" ],
+    "char": "\ud83d\udd8d",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  paintbrush: {
+    keywords: [ "drawing", "creativity", "art" ],
+    "char": "\ud83d\udd8c",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  mag: {
+    keywords: [ "search", "zoom", "find", "detective" ],
+    "char": "\ud83d\udd0d",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  mag_right: {
+    keywords: [ "search", "zoom", "find", "detective" ],
+    "char": "\ud83d\udd0e",
+    fitzpatrick_scale: false,
+    category: "objects"
+  },
+  heart: {
+    keywords: [ "love", "like", "valentines" ],
+    "char": "\u2764\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  orange_heart: {
+    keywords: [ "love", "like", "affection", "valentines" ],
+    "char": "\ud83e\udde1",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  yellow_heart: {
+    keywords: [ "love", "like", "affection", "valentines" ],
+    "char": "\ud83d\udc9b",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  green_heart: {
+    keywords: [ "love", "like", "affection", "valentines" ],
+    "char": "\ud83d\udc9a",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  blue_heart: {
+    keywords: [ "love", "like", "affection", "valentines" ],
+    "char": "\ud83d\udc99",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  purple_heart: {
+    keywords: [ "love", "like", "affection", "valentines" ],
+    "char": "\ud83d\udc9c",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  black_heart: {
+    keywords: [ "evil" ],
+    "char": "\ud83d\udda4",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  broken_heart: {
+    keywords: [ "sad", "sorry", "break", "heart", "heartbreak" ],
+    "char": "\ud83d\udc94",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  heavy_heart_exclamation: {
+    keywords: [ "decoration", "love" ],
+    "char": "\u2763",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  two_hearts: {
+    keywords: [ "love", "like", "affection", "valentines", "heart" ],
+    "char": "\ud83d\udc95",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  revolving_hearts: {
+    keywords: [ "love", "like", "affection", "valentines" ],
+    "char": "\ud83d\udc9e",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  heartbeat: {
+    keywords: [ "love", "like", "affection", "valentines", "pink", "heart" ],
+    "char": "\ud83d\udc93",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  heartpulse: {
+    keywords: [ "like", "love", "affection", "valentines", "pink" ],
+    "char": "\ud83d\udc97",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  sparkling_heart: {
+    keywords: [ "love", "like", "affection", "valentines" ],
+    "char": "\ud83d\udc96",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  cupid: {
+    keywords: [ "love", "like", "heart", "affection", "valentines" ],
+    "char": "\ud83d\udc98",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  gift_heart: {
+    keywords: [ "love", "valentines" ],
+    "char": "\ud83d\udc9d",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  heart_decoration: {
+    keywords: [ "purple-square", "love", "like" ],
+    "char": "\ud83d\udc9f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  peace_symbol: {
+    keywords: [ "hippie" ],
+    "char": "\u262e",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  latin_cross: {
+    keywords: [ "christianity" ],
+    "char": "\u271d",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  star_and_crescent: {
+    keywords: [ "islam" ],
+    "char": "\u262a",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  om: {
+    keywords: [ "hinduism", "buddhism", "sikhism", "jainism" ],
+    "char": "\ud83d\udd49",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  wheel_of_dharma: {
+    keywords: [ "hinduism", "buddhism", "sikhism", "jainism" ],
+    "char": "\u2638",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  star_of_david: {
+    keywords: [ "judaism" ],
+    "char": "\u2721",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  six_pointed_star: {
+    keywords: [ "purple-square", "religion", "jewish", "hexagram" ],
+    "char": "\ud83d\udd2f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  menorah: {
+    keywords: [ "hanukkah", "candles", "jewish" ],
+    "char": "\ud83d\udd4e",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  yin_yang: {
+    keywords: [ "balance" ],
+    "char": "\u262f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  orthodox_cross: {
+    keywords: [ "suppedaneum", "religion" ],
+    "char": "\u2626",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  place_of_worship: {
+    keywords: [ "religion", "church", "temple", "prayer" ],
+    "char": "\ud83d\uded0",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  ophiuchus: {
+    keywords: [ "sign", "purple-square", "constellation", "astrology" ],
+    "char": "\u26ce",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  aries: {
+    keywords: [ "sign", "purple-square", "zodiac", "astrology" ],
+    "char": "\u2648",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  taurus: {
+    keywords: [ "purple-square", "sign", "zodiac", "astrology" ],
+    "char": "\u2649",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  gemini: {
+    keywords: [ "sign", "zodiac", "purple-square", "astrology" ],
+    "char": "\u264a",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  cancer: {
+    keywords: [ "sign", "zodiac", "purple-square", "astrology" ],
+    "char": "\u264b",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  leo: {
+    keywords: [ "sign", "purple-square", "zodiac", "astrology" ],
+    "char": "\u264c",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  virgo: {
+    keywords: [ "sign", "zodiac", "purple-square", "astrology" ],
+    "char": "\u264d",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  libra: {
+    keywords: [ "sign", "purple-square", "zodiac", "astrology" ],
+    "char": "\u264e",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  scorpius: {
+    keywords: [ "sign", "zodiac", "purple-square", "astrology", "scorpio" ],
+    "char": "\u264f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  sagittarius: {
+    keywords: [ "sign", "zodiac", "purple-square", "astrology" ],
+    "char": "\u2650",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  capricorn: {
+    keywords: [ "sign", "zodiac", "purple-square", "astrology" ],
+    "char": "\u2651",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  aquarius: {
+    keywords: [ "sign", "purple-square", "zodiac", "astrology" ],
+    "char": "\u2652",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  pisces: {
+    keywords: [ "purple-square", "sign", "zodiac", "astrology" ],
+    "char": "\u2653",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  id: {
+    keywords: [ "purple-square", "words" ],
+    "char": "\ud83c\udd94",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  atom_symbol: {
+    keywords: [ "science", "physics", "chemistry" ],
+    "char": "\u269b",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  u7a7a: {
+    keywords: [ "kanji", "japanese", "chinese", "empty", "sky", "blue-square" ],
+    "char": "\ud83c\ude33",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  u5272: {
+    keywords: [ "cut", "divide", "chinese", "kanji", "pink-square" ],
+    "char": "\ud83c\ude39",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  radioactive: {
+    keywords: [ "nuclear", "danger" ],
+    "char": "\u2622",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  biohazard: {
+    keywords: [ "danger" ],
+    "char": "\u2623",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  mobile_phone_off: {
+    keywords: [ "mute", "orange-square", "silence", "quiet" ],
+    "char": "\ud83d\udcf4",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  vibration_mode: {
+    keywords: [ "orange-square", "phone" ],
+    "char": "\ud83d\udcf3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  u6709: {
+    keywords: [ "orange-square", "chinese", "have", "kanji" ],
+    "char": "\ud83c\ude36",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  u7121: {
+    keywords: [ "nothing", "chinese", "kanji", "japanese", "orange-square" ],
+    "char": "\ud83c\ude1a",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  u7533: {
+    keywords: [ "chinese", "japanese", "kanji", "orange-square" ],
+    "char": "\ud83c\ude38",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  u55b6: {
+    keywords: [ "japanese", "opening hours", "orange-square" ],
+    "char": "\ud83c\ude3a",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  u6708: {
+    keywords: [ "chinese", "month", "moon", "japanese", "orange-square", "kanji" ],
+    "char": "\ud83c\ude37\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  eight_pointed_black_star: {
+    keywords: [ "orange-square", "shape", "polygon" ],
+    "char": "\u2734\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  vs: {
+    keywords: [ "words", "orange-square" ],
+    "char": "\ud83c\udd9a",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  accept: {
+    keywords: [ "ok", "good", "chinese", "kanji", "agree", "yes", "orange-circle" ],
+    "char": "\ud83c\ude51",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  white_flower: {
+    keywords: [ "japanese", "spring" ],
+    "char": "\ud83d\udcae",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  ideograph_advantage: {
+    keywords: [ "chinese", "kanji", "obtain", "get", "circle" ],
+    "char": "\ud83c\ude50",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  secret: {
+    keywords: [ "privacy", "chinese", "sshh", "kanji", "red-circle" ],
+    "char": "\u3299\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  congratulations: {
+    keywords: [ "chinese", "kanji", "japanese", "red-circle" ],
+    "char": "\u3297\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  u5408: {
+    keywords: [ "japanese", "chinese", "join", "kanji", "red-square" ],
+    "char": "\ud83c\ude34",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  u6e80: {
+    keywords: [ "full", "chinese", "japanese", "red-square", "kanji" ],
+    "char": "\ud83c\ude35",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  u7981: {
+    keywords: [ "kanji", "japanese", "chinese", "forbidden", "limit", "restricted", "red-square" ],
+    "char": "\ud83c\ude32",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  a: {
+    keywords: [ "red-square", "alphabet", "letter" ],
+    "char": "\ud83c\udd70\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  b: {
+    keywords: [ "red-square", "alphabet", "letter" ],
+    "char": "\ud83c\udd71\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  ab: {
+    keywords: [ "red-square", "alphabet" ],
+    "char": "\ud83c\udd8e",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  cl: {
+    keywords: [ "alphabet", "words", "red-square" ],
+    "char": "\ud83c\udd91",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  o2: {
+    keywords: [ "alphabet", "red-square", "letter" ],
+    "char": "\ud83c\udd7e\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  sos: {
+    keywords: [ "help", "red-square", "words", "emergency", "911" ],
+    "char": "\ud83c\udd98",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  no_entry: {
+    keywords: [ "limit", "security", "privacy", "bad", "denied", "stop", "circle" ],
+    "char": "\u26d4",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  name_badge: {
+    keywords: [ "fire", "forbid" ],
+    "char": "\ud83d\udcdb",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  no_entry_sign: {
+    keywords: [ "forbid", "stop", "limit", "denied", "disallow", "circle" ],
+    "char": "\ud83d\udeab",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  x: {
+    keywords: [ "no", "delete", "remove", "cancel" ],
+    "char": "\u274c",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  o: {
+    keywords: [ "circle", "round" ],
+    "char": "\u2b55",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  stop_sign: {
+    keywords: [ "stop" ],
+    "char": "\ud83d\uded1",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  anger: {
+    keywords: [ "angry", "mad" ],
+    "char": "\ud83d\udca2",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  hotsprings: {
+    keywords: [ "bath", "warm", "relax" ],
+    "char": "\u2668\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  no_pedestrians: {
+    keywords: [ "rules", "crossing", "walking", "circle" ],
+    "char": "\ud83d\udeb7",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  do_not_litter: {
+    keywords: [ "trash", "bin", "garbage", "circle" ],
+    "char": "\ud83d\udeaf",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  no_bicycles: {
+    keywords: [ "cyclist", "prohibited", "circle" ],
+    "char": "\ud83d\udeb3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  "non-potable_water": {
+    keywords: [ "drink", "faucet", "tap", "circle" ],
+    "char": "\ud83d\udeb1",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  underage: {
+    keywords: [ "18", "drink", "pub", "night", "minor", "circle" ],
+    "char": "\ud83d\udd1e",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  no_mobile_phones: {
+    keywords: [ "iphone", "mute", "circle" ],
+    "char": "\ud83d\udcf5",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  exclamation: {
+    keywords: [ "heavy_exclamation_mark", "danger", "surprise", "punctuation", "wow", "warning" ],
+    "char": "\u2757",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  grey_exclamation: {
+    keywords: [ "surprise", "punctuation", "gray", "wow", "warning" ],
+    "char": "\u2755",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  question: {
+    keywords: [ "doubt", "confused" ],
+    "char": "\u2753",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  grey_question: {
+    keywords: [ "doubts", "gray", "huh", "confused" ],
+    "char": "\u2754",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  bangbang: {
+    keywords: [ "exclamation", "surprise" ],
+    "char": "\u203c\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  interrobang: {
+    keywords: [ "wat", "punctuation", "surprise" ],
+    "char": "\u2049\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  100: {
+    keywords: [ "score", "perfect", "numbers", "century", "exam", "quiz", "test", "pass", "hundred" ],
+    "char": "\ud83d\udcaf",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  low_brightness: {
+    keywords: [ "sun", "afternoon", "warm", "summer" ],
+    "char": "\ud83d\udd05",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  high_brightness: {
+    keywords: [ "sun", "light" ],
+    "char": "\ud83d\udd06",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  trident: {
+    keywords: [ "weapon", "spear" ],
+    "char": "\ud83d\udd31",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  fleur_de_lis: {
+    keywords: [ "decorative", "scout" ],
+    "char": "\u269c",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  part_alternation_mark: {
+    keywords: [ "graph", "presentation", "stats", "business", "economics", "bad" ],
+    "char": "\u303d\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  warning: {
+    keywords: [ "exclamation", "wip", "alert", "error", "problem", "issue" ],
+    "char": "\u26a0\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  children_crossing: {
+    keywords: [ "school", "warning", "danger", "sign", "driving", "yellow-diamond" ],
+    "char": "\ud83d\udeb8",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  beginner: {
+    keywords: [ "badge", "shield" ],
+    "char": "\ud83d\udd30",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  recycle: {
+    keywords: [ "arrow", "environment", "garbage", "trash" ],
+    "char": "\u267b\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  u6307: {
+    keywords: [ "chinese", "point", "green-square", "kanji" ],
+    "char": "\ud83c\ude2f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  chart: {
+    keywords: [ "green-square", "graph", "presentation", "stats" ],
+    "char": "\ud83d\udcb9",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  sparkle: {
+    keywords: [ "stars", "green-square", "awesome", "good", "fireworks" ],
+    "char": "\u2747\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  eight_spoked_asterisk: {
+    keywords: [ "star", "sparkle", "green-square" ],
+    "char": "\u2733\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  negative_squared_cross_mark: {
+    keywords: [ "x", "green-square", "no", "deny" ],
+    "char": "\u274e",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  white_check_mark: {
+    keywords: [ "green-square", "ok", "agree", "vote", "election", "answer", "tick" ],
+    "char": "\u2705",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  diamond_shape_with_a_dot_inside: {
+    keywords: [ "jewel", "blue", "gem", "crystal", "fancy" ],
+    "char": "\ud83d\udca0",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  cyclone: {
+    keywords: [ "weather", "swirl", "blue", "cloud", "vortex", "spiral", "whirlpool", "spin", "tornado", "hurricane", "typhoon" ],
+    "char": "\ud83c\udf00",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  loop: {
+    keywords: [ "tape", "cassette" ],
+    "char": "\u27bf",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  globe_with_meridians: {
+    keywords: [ "earth", "international", "world", "internet", "interweb", "i18n" ],
+    "char": "\ud83c\udf10",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  m: {
+    keywords: [ "alphabet", "blue-circle", "letter" ],
+    "char": "\u24c2\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  atm: {
+    keywords: [ "money", "sales", "cash", "blue-square", "payment", "bank" ],
+    "char": "\ud83c\udfe7",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  sa: {
+    keywords: [ "japanese", "blue-square", "katakana" ],
+    "char": "\ud83c\ude02\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  passport_control: {
+    keywords: [ "custom", "blue-square" ],
+    "char": "\ud83d\udec2",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  customs: {
+    keywords: [ "passport", "border", "blue-square" ],
+    "char": "\ud83d\udec3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  baggage_claim: {
+    keywords: [ "blue-square", "airport", "transport" ],
+    "char": "\ud83d\udec4",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  left_luggage: {
+    keywords: [ "blue-square", "travel" ],
+    "char": "\ud83d\udec5",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  wheelchair: {
+    keywords: [ "blue-square", "disabled", "a11y", "accessibility" ],
+    "char": "\u267f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  no_smoking: {
+    keywords: [ "cigarette", "blue-square", "smell", "smoke" ],
+    "char": "\ud83d\udead",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  wc: {
+    keywords: [ "toilet", "restroom", "blue-square" ],
+    "char": "\ud83d\udebe",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  parking: {
+    keywords: [ "cars", "blue-square", "alphabet", "letter" ],
+    "char": "\ud83c\udd7f\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  potable_water: {
+    keywords: [ "blue-square", "liquid", "restroom", "cleaning", "faucet" ],
+    "char": "\ud83d\udeb0",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  mens: {
+    keywords: [ "toilet", "restroom", "wc", "blue-square", "gender", "male" ],
+    "char": "\ud83d\udeb9",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  womens: {
+    keywords: [ "purple-square", "woman", "female", "toilet", "loo", "restroom", "gender" ],
+    "char": "\ud83d\udeba",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  baby_symbol: {
+    keywords: [ "orange-square", "child" ],
+    "char": "\ud83d\udebc",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  restroom: {
+    keywords: [ "blue-square", "toilet", "refresh", "wc", "gender" ],
+    "char": "\ud83d\udebb",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  put_litter_in_its_place: {
+    keywords: [ "blue-square", "sign", "human", "info" ],
+    "char": "\ud83d\udeae",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  cinema: {
+    keywords: [ "blue-square", "record", "film", "movie", "curtain", "stage", "theater" ],
+    "char": "\ud83c\udfa6",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  signal_strength: {
+    keywords: [ "blue-square", "reception", "phone", "internet", "connection", "wifi", "bluetooth", "bars" ],
+    "char": "\ud83d\udcf6",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  koko: {
+    keywords: [ "blue-square", "here", "katakana", "japanese", "destination" ],
+    "char": "\ud83c\ude01",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  ng: {
+    keywords: [ "blue-square", "words", "shape", "icon" ],
+    "char": "\ud83c\udd96",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  ok: {
+    keywords: [ "good", "agree", "yes", "blue-square" ],
+    "char": "\ud83c\udd97",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  up: {
+    keywords: [ "blue-square", "above", "high" ],
+    "char": "\ud83c\udd99",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  cool: {
+    keywords: [ "words", "blue-square" ],
+    "char": "\ud83c\udd92",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  "new": {
+    keywords: [ "blue-square", "words", "start" ],
+    "char": "\ud83c\udd95",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  free: {
+    keywords: [ "blue-square", "words" ],
+    "char": "\ud83c\udd93",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  zero: {
+    keywords: [ "0", "numbers", "blue-square", "null" ],
+    "char": "0\ufe0f\u20e3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  one: {
+    keywords: [ "blue-square", "numbers", "1" ],
+    "char": "1\ufe0f\u20e3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  two: {
+    keywords: [ "numbers", "2", "prime", "blue-square" ],
+    "char": "2\ufe0f\u20e3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  three: {
+    keywords: [ "3", "numbers", "prime", "blue-square" ],
+    "char": "3\ufe0f\u20e3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  four: {
+    keywords: [ "4", "numbers", "blue-square" ],
+    "char": "4\ufe0f\u20e3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  five: {
+    keywords: [ "5", "numbers", "blue-square", "prime" ],
+    "char": "5\ufe0f\u20e3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  six: {
+    keywords: [ "6", "numbers", "blue-square" ],
+    "char": "6\ufe0f\u20e3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  seven: {
+    keywords: [ "7", "numbers", "blue-square", "prime" ],
+    "char": "7\ufe0f\u20e3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  eight: {
+    keywords: [ "8", "blue-square", "numbers" ],
+    "char": "8\ufe0f\u20e3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  nine: {
+    keywords: [ "blue-square", "numbers", "9" ],
+    "char": "9\ufe0f\u20e3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  keycap_ten: {
+    keywords: [ "numbers", "10", "blue-square" ],
+    "char": "\ud83d\udd1f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  asterisk: {
+    keywords: [ "star", "keycap" ],
+    "char": "*\u20e3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  1234: {
+    keywords: [ "numbers", "blue-square" ],
+    "char": "\ud83d\udd22",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  eject_button: {
+    keywords: [ "blue-square" ],
+    "char": "\u23cf\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_forward: {
+    keywords: [ "blue-square", "right", "direction", "play" ],
+    "char": "\u25b6\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  pause_button: {
+    keywords: [ "pause", "blue-square" ],
+    "char": "\u23f8",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  next_track_button: {
+    keywords: [ "forward", "next", "blue-square" ],
+    "char": "\u23ed",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  stop_button: {
+    keywords: [ "blue-square" ],
+    "char": "\u23f9",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  record_button: {
+    keywords: [ "blue-square" ],
+    "char": "\u23fa",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  play_or_pause_button: {
+    keywords: [ "blue-square", "play", "pause" ],
+    "char": "\u23ef",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  previous_track_button: {
+    keywords: [ "backward" ],
+    "char": "\u23ee",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  fast_forward: {
+    keywords: [ "blue-square", "play", "speed", "continue" ],
+    "char": "\u23e9",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  rewind: {
+    keywords: [ "play", "blue-square" ],
+    "char": "\u23ea",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  twisted_rightwards_arrows: {
+    keywords: [ "blue-square", "shuffle", "music", "random" ],
+    "char": "\ud83d\udd00",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  repeat: {
+    keywords: [ "loop", "record" ],
+    "char": "\ud83d\udd01",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  repeat_one: {
+    keywords: [ "blue-square", "loop" ],
+    "char": "\ud83d\udd02",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_backward: {
+    keywords: [ "blue-square", "left", "direction" ],
+    "char": "\u25c0\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_up_small: {
+    keywords: [ "blue-square", "triangle", "direction", "point", "forward", "top" ],
+    "char": "\ud83d\udd3c",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_down_small: {
+    keywords: [ "blue-square", "direction", "bottom" ],
+    "char": "\ud83d\udd3d",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_double_up: {
+    keywords: [ "blue-square", "direction", "top" ],
+    "char": "\u23eb",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_double_down: {
+    keywords: [ "blue-square", "direction", "bottom" ],
+    "char": "\u23ec",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_right: {
+    keywords: [ "blue-square", "next" ],
+    "char": "\u27a1\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_left: {
+    keywords: [ "blue-square", "previous", "back" ],
+    "char": "\u2b05\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_up: {
+    keywords: [ "blue-square", "continue", "top", "direction" ],
+    "char": "\u2b06\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_down: {
+    keywords: [ "blue-square", "direction", "bottom" ],
+    "char": "\u2b07\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_upper_right: {
+    keywords: [ "blue-square", "point", "direction", "diagonal", "northeast" ],
+    "char": "\u2197\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_lower_right: {
+    keywords: [ "blue-square", "direction", "diagonal", "southeast" ],
+    "char": "\u2198\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_lower_left: {
+    keywords: [ "blue-square", "direction", "diagonal", "southwest" ],
+    "char": "\u2199\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_upper_left: {
+    keywords: [ "blue-square", "point", "direction", "diagonal", "northwest" ],
+    "char": "\u2196\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_up_down: {
+    keywords: [ "blue-square", "direction", "way", "vertical" ],
+    "char": "\u2195\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  left_right_arrow: {
+    keywords: [ "shape", "direction", "horizontal", "sideways" ],
+    "char": "\u2194\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrows_counterclockwise: {
+    keywords: [ "blue-square", "sync", "cycle" ],
+    "char": "\ud83d\udd04",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_right_hook: {
+    keywords: [ "blue-square", "return", "rotate", "direction" ],
+    "char": "\u21aa\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  leftwards_arrow_with_hook: {
+    keywords: [ "back", "return", "blue-square", "undo", "enter" ],
+    "char": "\u21a9\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_heading_up: {
+    keywords: [ "blue-square", "direction", "top" ],
+    "char": "\u2934\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrow_heading_down: {
+    keywords: [ "blue-square", "direction", "bottom" ],
+    "char": "\u2935\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  hash: {
+    keywords: [ "symbol", "blue-square", "twitter" ],
+    "char": "#\ufe0f\u20e3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  information_source: {
+    keywords: [ "blue-square", "alphabet", "letter" ],
+    "char": "\u2139\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  abc: {
+    keywords: [ "blue-square", "alphabet" ],
+    "char": "\ud83d\udd24",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  abcd: {
+    keywords: [ "blue-square", "alphabet" ],
+    "char": "\ud83d\udd21",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  capital_abcd: {
+    keywords: [ "alphabet", "words", "blue-square" ],
+    "char": "\ud83d\udd20",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  symbols: {
+    keywords: [ "blue-square", "music", "note", "ampersand", "percent", "glyphs", "characters" ],
+    "char": "\ud83d\udd23",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  musical_note: {
+    keywords: [ "score", "tone", "sound" ],
+    "char": "\ud83c\udfb5",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  notes: {
+    keywords: [ "music", "score" ],
+    "char": "\ud83c\udfb6",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  wavy_dash: {
+    keywords: [ "draw", "line", "moustache", "mustache", "squiggle", "scribble" ],
+    "char": "\u3030\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  curly_loop: {
+    keywords: [ "scribble", "draw", "shape", "squiggle" ],
+    "char": "\u27b0",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  heavy_check_mark: {
+    keywords: [ "ok", "nike", "answer", "yes", "tick" ],
+    "char": "\u2714\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  arrows_clockwise: {
+    keywords: [ "sync", "cycle", "round", "repeat" ],
+    "char": "\ud83d\udd03",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  heavy_plus_sign: {
+    keywords: [ "math", "calculation", "addition", "more", "increase" ],
+    "char": "\u2795",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  heavy_minus_sign: {
+    keywords: [ "math", "calculation", "subtract", "less" ],
+    "char": "\u2796",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  heavy_division_sign: {
+    keywords: [ "divide", "math", "calculation" ],
+    "char": "\u2797",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  heavy_multiplication_x: {
+    keywords: [ "math", "calculation" ],
+    "char": "\u2716\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  heavy_dollar_sign: {
+    keywords: [ "money", "sales", "payment", "currency", "buck" ],
+    "char": "\ud83d\udcb2",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  currency_exchange: {
+    keywords: [ "money", "sales", "dollar", "travel" ],
+    "char": "\ud83d\udcb1",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  copyright: {
+    keywords: [ "ip", "license", "circle", "law", "legal" ],
+    "char": "\xa9\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  registered: {
+    keywords: [ "alphabet", "circle" ],
+    "char": "\xae\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  tm: {
+    keywords: [ "trademark", "brand", "law", "legal" ],
+    "char": "\u2122\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  end: {
+    keywords: [ "words", "arrow" ],
+    "char": "\ud83d\udd1a",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  back: {
+    keywords: [ "arrow", "words", "return" ],
+    "char": "\ud83d\udd19",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  on: {
+    keywords: [ "arrow", "words" ],
+    "char": "\ud83d\udd1b",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  top: {
+    keywords: [ "words", "blue-square" ],
+    "char": "\ud83d\udd1d",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  soon: {
+    keywords: [ "arrow", "words" ],
+    "char": "\ud83d\udd1c",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  ballot_box_with_check: {
+    keywords: [ "ok", "agree", "confirm", "black-square", "vote", "election", "yes", "tick" ],
+    "char": "\u2611\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  radio_button: {
+    keywords: [ "input", "old", "music", "circle" ],
+    "char": "\ud83d\udd18",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  white_circle: {
+    keywords: [ "shape", "round" ],
+    "char": "\u26aa",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  black_circle: {
+    keywords: [ "shape", "button", "round" ],
+    "char": "\u26ab",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  red_circle: {
+    keywords: [ "shape", "error", "danger" ],
+    "char": "\ud83d\udd34",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  large_blue_circle: {
+    keywords: [ "shape", "icon", "button" ],
+    "char": "\ud83d\udd35",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  small_orange_diamond: {
+    keywords: [ "shape", "jewel", "gem" ],
+    "char": "\ud83d\udd38",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  small_blue_diamond: {
+    keywords: [ "shape", "jewel", "gem" ],
+    "char": "\ud83d\udd39",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  large_orange_diamond: {
+    keywords: [ "shape", "jewel", "gem" ],
+    "char": "\ud83d\udd36",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  large_blue_diamond: {
+    keywords: [ "shape", "jewel", "gem" ],
+    "char": "\ud83d\udd37",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  small_red_triangle: {
+    keywords: [ "shape", "direction", "up", "top" ],
+    "char": "\ud83d\udd3a",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  black_small_square: {
+    keywords: [ "shape", "icon" ],
+    "char": "\u25aa\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  white_small_square: {
+    keywords: [ "shape", "icon" ],
+    "char": "\u25ab\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  black_large_square: {
+    keywords: [ "shape", "icon", "button" ],
+    "char": "\u2b1b",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  white_large_square: {
+    keywords: [ "shape", "icon", "stone", "button" ],
+    "char": "\u2b1c",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  small_red_triangle_down: {
+    keywords: [ "shape", "direction", "bottom" ],
+    "char": "\ud83d\udd3b",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  black_medium_square: {
+    keywords: [ "shape", "button", "icon" ],
+    "char": "\u25fc\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  white_medium_square: {
+    keywords: [ "shape", "stone", "icon" ],
+    "char": "\u25fb\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  black_medium_small_square: {
+    keywords: [ "icon", "shape", "button" ],
+    "char": "\u25fe",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  white_medium_small_square: {
+    keywords: [ "shape", "stone", "icon", "button" ],
+    "char": "\u25fd",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  black_square_button: {
+    keywords: [ "shape", "input", "frame" ],
+    "char": "\ud83d\udd32",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  white_square_button: {
+    keywords: [ "shape", "input" ],
+    "char": "\ud83d\udd33",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  speaker: {
+    keywords: [ "sound", "volume", "silence", "broadcast" ],
+    "char": "\ud83d\udd08",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  sound: {
+    keywords: [ "volume", "speaker", "broadcast" ],
+    "char": "\ud83d\udd09",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  loud_sound: {
+    keywords: [ "volume", "noise", "noisy", "speaker", "broadcast" ],
+    "char": "\ud83d\udd0a",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  mute: {
+    keywords: [ "sound", "volume", "silence", "quiet" ],
+    "char": "\ud83d\udd07",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  mega: {
+    keywords: [ "sound", "speaker", "volume" ],
+    "char": "\ud83d\udce3",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  loudspeaker: {
+    keywords: [ "volume", "sound" ],
+    "char": "\ud83d\udce2",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  bell: {
+    keywords: [ "sound", "notification", "christmas", "xmas", "chime" ],
+    "char": "\ud83d\udd14",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  no_bell: {
+    keywords: [ "sound", "volume", "mute", "quiet", "silent" ],
+    "char": "\ud83d\udd15",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  black_joker: {
+    keywords: [ "poker", "cards", "game", "play", "magic" ],
+    "char": "\ud83c\udccf",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  mahjong: {
+    keywords: [ "game", "play", "chinese", "kanji" ],
+    "char": "\ud83c\udc04",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  spades: {
+    keywords: [ "poker", "cards", "suits", "magic" ],
+    "char": "\u2660\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clubs: {
+    keywords: [ "poker", "cards", "magic", "suits" ],
+    "char": "\u2663\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  hearts: {
+    keywords: [ "poker", "cards", "magic", "suits" ],
+    "char": "\u2665\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  diamonds: {
+    keywords: [ "poker", "cards", "magic", "suits" ],
+    "char": "\u2666\ufe0f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  flower_playing_cards: {
+    keywords: [ "game", "sunset", "red" ],
+    "char": "\ud83c\udfb4",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  thought_balloon: {
+    keywords: [ "bubble", "cloud", "speech", "thinking", "dream" ],
+    "char": "\ud83d\udcad",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  right_anger_bubble: {
+    keywords: [ "caption", "speech", "thinking", "mad" ],
+    "char": "\ud83d\uddef",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  speech_balloon: {
+    keywords: [ "bubble", "words", "message", "talk", "chatting" ],
+    "char": "\ud83d\udcac",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  left_speech_bubble: {
+    keywords: [ "words", "message", "talk", "chatting" ],
+    "char": "\ud83d\udde8",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock1: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd50",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock2: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd51",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock3: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd52",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock4: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd53",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock5: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd54",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock6: {
+    keywords: [ "time", "late", "early", "schedule", "dawn", "dusk" ],
+    "char": "\ud83d\udd55",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock7: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd56",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock8: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd57",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock9: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd58",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock10: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd59",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock11: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd5a",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock12: {
+    keywords: [ "time", "noon", "midnight", "midday", "late", "early", "schedule" ],
+    "char": "\ud83d\udd5b",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock130: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd5c",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock230: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd5d",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock330: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd5e",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock430: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd5f",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock530: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd60",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock630: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd61",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock730: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd62",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock830: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd63",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock930: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd64",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock1030: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd65",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock1130: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd66",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  clock1230: {
+    keywords: [ "time", "late", "early", "schedule" ],
+    "char": "\ud83d\udd67",
+    fitzpatrick_scale: false,
+    category: "symbols"
+  },
+  afghanistan: {
+    keywords: [ "af", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddeb",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  aland_islands: {
+    keywords: [ "\xc5land", "islands", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddfd",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  albania: {
+    keywords: [ "al", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddf1",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  algeria: {
+    keywords: [ "dz", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde9\ud83c\uddff",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  american_samoa: {
+    keywords: [ "american", "ws", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddf8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  andorra: {
+    keywords: [ "ad", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\udde9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  angola: {
+    keywords: [ "ao", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddf4",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  anguilla: {
+    keywords: [ "ai", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddee",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  antarctica: {
+    keywords: [ "aq", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddf6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  antigua_barbuda: {
+    keywords: [ "antigua", "barbuda", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddec",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  argentina: {
+    keywords: [ "ar", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  armenia: {
+    keywords: [ "am", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  aruba: {
+    keywords: [ "aw", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddfc",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  australia: {
+    keywords: [ "au", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddfa",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  austria: {
+    keywords: [ "at", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddf9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  azerbaijan: {
+    keywords: [ "az", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddff",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  bahamas: {
+    keywords: [ "bs", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddf8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  bahrain: {
+    keywords: [ "bh", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\udded",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  bangladesh: {
+    keywords: [ "bd", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\udde9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  barbados: {
+    keywords: [ "bb", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\udde7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  belarus: {
+    keywords: [ "by", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddfe",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  belgium: {
+    keywords: [ "be", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  belize: {
+    keywords: [ "bz", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddff",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  benin: {
+    keywords: [ "bj", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddef",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  bermuda: {
+    keywords: [ "bm", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  bhutan: {
+    keywords: [ "bt", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddf9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  bolivia: {
+    keywords: [ "bo", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddf4",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  caribbean_netherlands: {
+    keywords: [ "bonaire", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddf6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  bosnia_herzegovina: {
+    keywords: [ "bosnia", "herzegovina", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\udde6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  botswana: {
+    keywords: [ "bw", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddfc",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  brazil: {
+    keywords: [ "br", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  british_indian_ocean_territory: {
+    keywords: [ "british", "indian", "ocean", "territory", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddee\ud83c\uddf4",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  british_virgin_islands: {
+    keywords: [ "british", "virgin", "islands", "bvi", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfb\ud83c\uddec",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  brunei: {
+    keywords: [ "bn", "darussalam", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddf3",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  bulgaria: {
+    keywords: [ "bg", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddec",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  burkina_faso: {
+    keywords: [ "burkina", "faso", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddeb",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  burundi: {
+    keywords: [ "bi", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddee",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  cape_verde: {
+    keywords: [ "cabo", "verde", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddfb",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  cambodia: {
+    keywords: [ "kh", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf0\ud83c\udded",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  cameroon: {
+    keywords: [ "cm", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  canada: {
+    keywords: [ "ca", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\udde6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  canary_islands: {
+    keywords: [ "canary", "islands", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddee\ud83c\udde8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  cayman_islands: {
+    keywords: [ "cayman", "islands", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf0\ud83c\uddfe",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  central_african_republic: {
+    keywords: [ "central", "african", "republic", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddeb",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  chad: {
+    keywords: [ "td", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\udde9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  chile: {
+    keywords: [ "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddf1",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  cn: {
+    keywords: [ "china", "chinese", "prc", "flag", "country", "nation", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddf3",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  christmas_island: {
+    keywords: [ "christmas", "island", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddfd",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  cocos_islands: {
+    keywords: [ "cocos", "keeling", "islands", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\udde8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  colombia: {
+    keywords: [ "co", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddf4",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  comoros: {
+    keywords: [ "km", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf0\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  congo_brazzaville: {
+    keywords: [ "congo", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddec",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  congo_kinshasa: {
+    keywords: [ "congo", "democratic", "republic", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\udde9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  cook_islands: {
+    keywords: [ "cook", "islands", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddf0",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  costa_rica: {
+    keywords: [ "costa", "rica", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  croatia: {
+    keywords: [ "hr", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udded\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  cuba: {
+    keywords: [ "cu", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddfa",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  curacao: {
+    keywords: [ "cura\xe7ao", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddfc",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  cyprus: {
+    keywords: [ "cy", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddfe",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  czech_republic: {
+    keywords: [ "cz", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddff",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  denmark: {
+    keywords: [ "dk", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde9\ud83c\uddf0",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  djibouti: {
+    keywords: [ "dj", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde9\ud83c\uddef",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  dominica: {
+    keywords: [ "dm", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde9\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  dominican_republic: {
+    keywords: [ "dominican", "republic", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde9\ud83c\uddf4",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  ecuador: {
+    keywords: [ "ec", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddea\ud83c\udde8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  egypt: {
+    keywords: [ "eg", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddea\ud83c\uddec",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  el_salvador: {
+    keywords: [ "el", "salvador", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddfb",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  equatorial_guinea: {
+    keywords: [ "equatorial", "gn", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddf6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  eritrea: {
+    keywords: [ "er", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddea\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  estonia: {
+    keywords: [ "ee", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddea\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  ethiopia: {
+    keywords: [ "et", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddea\ud83c\uddf9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  eu: {
+    keywords: [ "european", "union", "flag", "banner" ],
+    "char": "\ud83c\uddea\ud83c\uddfa",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  falkland_islands: {
+    keywords: [ "falkland", "islands", "malvinas", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddeb\ud83c\uddf0",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  faroe_islands: {
+    keywords: [ "faroe", "islands", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddeb\ud83c\uddf4",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  fiji: {
+    keywords: [ "fj", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddeb\ud83c\uddef",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  finland: {
+    keywords: [ "fi", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddeb\ud83c\uddee",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  fr: {
+    keywords: [ "banner", "flag", "nation", "france", "french", "country" ],
+    "char": "\ud83c\uddeb\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  french_guiana: {
+    keywords: [ "french", "guiana", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddeb",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  french_polynesia: {
+    keywords: [ "french", "polynesia", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf5\ud83c\uddeb",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  french_southern_territories: {
+    keywords: [ "french", "southern", "territories", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\uddeb",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  gabon: {
+    keywords: [ "ga", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\udde6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  gambia: {
+    keywords: [ "gm", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  georgia: {
+    keywords: [ "ge", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  de: {
+    keywords: [ "german", "nation", "flag", "country", "banner" ],
+    "char": "\ud83c\udde9\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  ghana: {
+    keywords: [ "gh", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\udded",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  gibraltar: {
+    keywords: [ "gi", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddee",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  greece: {
+    keywords: [ "gr", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  greenland: {
+    keywords: [ "gl", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddf1",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  grenada: {
+    keywords: [ "gd", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\udde9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  guadeloupe: {
+    keywords: [ "gp", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddf5",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  guam: {
+    keywords: [ "gu", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddfa",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  guatemala: {
+    keywords: [ "gt", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddf9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  guernsey: {
+    keywords: [ "gg", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddec",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  guinea: {
+    keywords: [ "gn", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddf3",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  guinea_bissau: {
+    keywords: [ "gw", "bissau", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddfc",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  guyana: {
+    keywords: [ "gy", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddfe",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  haiti: {
+    keywords: [ "ht", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udded\ud83c\uddf9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  honduras: {
+    keywords: [ "hn", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udded\ud83c\uddf3",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  hong_kong: {
+    keywords: [ "hong", "kong", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udded\ud83c\uddf0",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  hungary: {
+    keywords: [ "hu", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udded\ud83c\uddfa",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  iceland: {
+    keywords: [ "is", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddee\ud83c\uddf8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  india: {
+    keywords: [ "in", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddee\ud83c\uddf3",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  indonesia: {
+    keywords: [ "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddee\ud83c\udde9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  iran: {
+    keywords: [ "iran,", "islamic", "republic", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddee\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  iraq: {
+    keywords: [ "iq", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddee\ud83c\uddf6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  ireland: {
+    keywords: [ "ie", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddee\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  isle_of_man: {
+    keywords: [ "isle", "man", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddee\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  israel: {
+    keywords: [ "il", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddee\ud83c\uddf1",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  it: {
+    keywords: [ "italy", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddee\ud83c\uddf9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  cote_divoire: {
+    keywords: [ "ivory", "coast", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\uddee",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  jamaica: {
+    keywords: [ "jm", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddef\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  jp: {
+    keywords: [ "japanese", "nation", "flag", "country", "banner" ],
+    "char": "\ud83c\uddef\ud83c\uddf5",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  jersey: {
+    keywords: [ "je", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddef\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  jordan: {
+    keywords: [ "jo", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddef\ud83c\uddf4",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  kazakhstan: {
+    keywords: [ "kz", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf0\ud83c\uddff",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  kenya: {
+    keywords: [ "ke", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf0\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  kiribati: {
+    keywords: [ "ki", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf0\ud83c\uddee",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  kosovo: {
+    keywords: [ "xk", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfd\ud83c\uddf0",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  kuwait: {
+    keywords: [ "kw", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf0\ud83c\uddfc",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  kyrgyzstan: {
+    keywords: [ "kg", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf0\ud83c\uddec",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  laos: {
+    keywords: [ "lao", "democratic", "republic", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf1\ud83c\udde6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  latvia: {
+    keywords: [ "lv", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf1\ud83c\uddfb",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  lebanon: {
+    keywords: [ "lb", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf1\ud83c\udde7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  lesotho: {
+    keywords: [ "ls", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf1\ud83c\uddf8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  liberia: {
+    keywords: [ "lr", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf1\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  libya: {
+    keywords: [ "ly", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf1\ud83c\uddfe",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  liechtenstein: {
+    keywords: [ "li", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf1\ud83c\uddee",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  lithuania: {
+    keywords: [ "lt", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf1\ud83c\uddf9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  luxembourg: {
+    keywords: [ "lu", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf1\ud83c\uddfa",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  macau: {
+    keywords: [ "macao", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddf4",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  macedonia: {
+    keywords: [ "macedonia,", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddf0",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  madagascar: {
+    keywords: [ "mg", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddec",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  malawi: {
+    keywords: [ "mw", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddfc",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  malaysia: {
+    keywords: [ "my", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddfe",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  maldives: {
+    keywords: [ "mv", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddfb",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  mali: {
+    keywords: [ "ml", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddf1",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  malta: {
+    keywords: [ "mt", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddf9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  marshall_islands: {
+    keywords: [ "marshall", "islands", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\udded",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  martinique: {
+    keywords: [ "mq", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddf6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  mauritania: {
+    keywords: [ "mr", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  mauritius: {
+    keywords: [ "mu", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddfa",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  mayotte: {
+    keywords: [ "yt", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfe\ud83c\uddf9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  mexico: {
+    keywords: [ "mx", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddfd",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  micronesia: {
+    keywords: [ "micronesia,", "federated", "states", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddeb\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  moldova: {
+    keywords: [ "moldova,", "republic", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\udde9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  monaco: {
+    keywords: [ "mc", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\udde8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  mongolia: {
+    keywords: [ "mn", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddf3",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  montenegro: {
+    keywords: [ "me", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  montserrat: {
+    keywords: [ "ms", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddf8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  morocco: {
+    keywords: [ "ma", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\udde6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  mozambique: {
+    keywords: [ "mz", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddff",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  myanmar: {
+    keywords: [ "mm", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  namibia: {
+    keywords: [ "na", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf3\ud83c\udde6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  nauru: {
+    keywords: [ "nr", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf3\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  nepal: {
+    keywords: [ "np", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf3\ud83c\uddf5",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  netherlands: {
+    keywords: [ "nl", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf3\ud83c\uddf1",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  new_caledonia: {
+    keywords: [ "new", "caledonia", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf3\ud83c\udde8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  new_zealand: {
+    keywords: [ "new", "zealand", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf3\ud83c\uddff",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  nicaragua: {
+    keywords: [ "ni", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf3\ud83c\uddee",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  niger: {
+    keywords: [ "ne", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf3\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  nigeria: {
+    keywords: [ "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf3\ud83c\uddec",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  niue: {
+    keywords: [ "nu", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf3\ud83c\uddfa",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  norfolk_island: {
+    keywords: [ "norfolk", "island", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf3\ud83c\uddeb",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  northern_mariana_islands: {
+    keywords: [ "northern", "mariana", "islands", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf2\ud83c\uddf5",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  north_korea: {
+    keywords: [ "north", "korea", "nation", "flag", "country", "banner" ],
+    "char": "\ud83c\uddf0\ud83c\uddf5",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  norway: {
+    keywords: [ "no", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf3\ud83c\uddf4",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  oman: {
+    keywords: [ "om_symbol", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf4\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  pakistan: {
+    keywords: [ "pk", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf5\ud83c\uddf0",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  palau: {
+    keywords: [ "pw", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf5\ud83c\uddfc",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  palestinian_territories: {
+    keywords: [ "palestine", "palestinian", "territories", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf5\ud83c\uddf8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  panama: {
+    keywords: [ "pa", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf5\ud83c\udde6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  papua_new_guinea: {
+    keywords: [ "papua", "new", "guinea", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf5\ud83c\uddec",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  paraguay: {
+    keywords: [ "py", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf5\ud83c\uddfe",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  peru: {
+    keywords: [ "pe", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf5\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  philippines: {
+    keywords: [ "ph", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf5\ud83c\udded",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  pitcairn_islands: {
+    keywords: [ "pitcairn", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf5\ud83c\uddf3",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  poland: {
+    keywords: [ "pl", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf5\ud83c\uddf1",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  portugal: {
+    keywords: [ "pt", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf5\ud83c\uddf9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  puerto_rico: {
+    keywords: [ "puerto", "rico", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf5\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  qatar: {
+    keywords: [ "qa", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf6\ud83c\udde6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  reunion: {
+    keywords: [ "r\xe9union", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf7\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  romania: {
+    keywords: [ "ro", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf7\ud83c\uddf4",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  ru: {
+    keywords: [ "russian", "federation", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf7\ud83c\uddfa",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  rwanda: {
+    keywords: [ "rw", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf7\ud83c\uddfc",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  st_barthelemy: {
+    keywords: [ "saint", "barth\xe9lemy", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde7\ud83c\uddf1",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  st_helena: {
+    keywords: [ "saint", "helena", "ascension", "tristan", "cunha", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\udded",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  st_kitts_nevis: {
+    keywords: [ "saint", "kitts", "nevis", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf0\ud83c\uddf3",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  st_lucia: {
+    keywords: [ "saint", "lucia", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf1\ud83c\udde8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  st_pierre_miquelon: {
+    keywords: [ "saint", "pierre", "miquelon", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf5\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  st_vincent_grenadines: {
+    keywords: [ "saint", "vincent", "grenadines", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfb\ud83c\udde8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  samoa: {
+    keywords: [ "ws", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfc\ud83c\uddf8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  san_marino: {
+    keywords: [ "san", "marino", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  sao_tome_principe: {
+    keywords: [ "sao", "tome", "principe", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddf9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  saudi_arabia: {
+    keywords: [ "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\udde6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  senegal: {
+    keywords: [ "sn", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddf3",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  serbia: {
+    keywords: [ "rs", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf7\ud83c\uddf8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  seychelles: {
+    keywords: [ "sc", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\udde8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  sierra_leone: {
+    keywords: [ "sierra", "leone", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddf1",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  singapore: {
+    keywords: [ "sg", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddec",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  sint_maarten: {
+    keywords: [ "sint", "maarten", "dutch", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddfd",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  slovakia: {
+    keywords: [ "sk", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddf0",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  slovenia: {
+    keywords: [ "si", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddee",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  solomon_islands: {
+    keywords: [ "solomon", "islands", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\udde7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  somalia: {
+    keywords: [ "so", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddf4",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  south_africa: {
+    keywords: [ "south", "africa", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddff\ud83c\udde6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  south_georgia_south_sandwich_islands: {
+    keywords: [ "south", "georgia", "sandwich", "islands", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddec\ud83c\uddf8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  kr: {
+    keywords: [ "south", "korea", "nation", "flag", "country", "banner" ],
+    "char": "\ud83c\uddf0\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  south_sudan: {
+    keywords: [ "south", "sd", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddf8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  es: {
+    keywords: [ "spain", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddea\ud83c\uddf8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  sri_lanka: {
+    keywords: [ "sri", "lanka", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf1\ud83c\uddf0",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  sudan: {
+    keywords: [ "sd", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\udde9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  suriname: {
+    keywords: [ "sr", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  swaziland: {
+    keywords: [ "sz", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddff",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  sweden: {
+    keywords: [ "se", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  switzerland: {
+    keywords: [ "ch", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde8\ud83c\udded",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  syria: {
+    keywords: [ "syrian", "arab", "republic", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf8\ud83c\uddfe",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  taiwan: {
+    keywords: [ "tw", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\uddfc",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  tajikistan: {
+    keywords: [ "tj", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\uddef",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  tanzania: {
+    keywords: [ "tanzania,", "united", "republic", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\uddff",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  thailand: {
+    keywords: [ "th", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\udded",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  timor_leste: {
+    keywords: [ "timor", "leste", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\uddf1",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  togo: {
+    keywords: [ "tg", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\uddec",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  tokelau: {
+    keywords: [ "tk", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\uddf0",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  tonga: {
+    keywords: [ "to", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\uddf4",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  trinidad_tobago: {
+    keywords: [ "trinidad", "tobago", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\uddf9",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  tunisia: {
+    keywords: [ "tn", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\uddf3",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  tr: {
+    keywords: [ "turkey", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\uddf7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  turkmenistan: {
+    keywords: [ "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  turks_caicos_islands: {
+    keywords: [ "turks", "caicos", "islands", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\udde8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  tuvalu: {
+    keywords: [ "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddf9\ud83c\uddfb",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  uganda: {
+    keywords: [ "ug", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfa\ud83c\uddec",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  ukraine: {
+    keywords: [ "ua", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfa\ud83c\udde6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  united_arab_emirates: {
+    keywords: [ "united", "arab", "emirates", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\udde6\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  uk: {
+    keywords: [ "united", "kingdom", "great", "britain", "northern", "ireland", "flag", "nation", "country", "banner", "british", "UK", "english", "england", "union jack" ],
+    "char": "\ud83c\uddec\ud83c\udde7",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  england: {
+    keywords: [ "flag", "english" ],
+    "char": "\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  scotland: {
+    keywords: [ "flag", "scottish" ],
+    "char": "\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  wales: {
+    keywords: [ "flag", "welsh" ],
+    "char": "\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  us: {
+    keywords: [ "united", "states", "america", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfa\ud83c\uddf8",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  us_virgin_islands: {
+    keywords: [ "virgin", "islands", "us", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfb\ud83c\uddee",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  uruguay: {
+    keywords: [ "uy", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfa\ud83c\uddfe",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  uzbekistan: {
+    keywords: [ "uz", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfa\ud83c\uddff",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  vanuatu: {
+    keywords: [ "vu", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfb\ud83c\uddfa",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  vatican_city: {
+    keywords: [ "vatican", "city", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfb\ud83c\udde6",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  venezuela: {
+    keywords: [ "ve", "bolivarian", "republic", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfb\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  vietnam: {
+    keywords: [ "viet", "nam", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfb\ud83c\uddf3",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  wallis_futuna: {
+    keywords: [ "wallis", "futuna", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfc\ud83c\uddeb",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  western_sahara: {
+    keywords: [ "western", "sahara", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddea\ud83c\udded",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  yemen: {
+    keywords: [ "ye", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddfe\ud83c\uddea",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  zambia: {
+    keywords: [ "zm", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddff\ud83c\uddf2",
+    fitzpatrick_scale: false,
+    category: "flags"
+  },
+  zimbabwe: {
+    keywords: [ "zw", "flag", "nation", "country", "banner" ],
+    "char": "\ud83c\uddff\ud83c\uddfc",
+    fitzpatrick_scale: false,
+    category: "flags"
+  }
+});

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/emoticons/js/emojis.min.js
@@ -1,1 +1,2 @@
-
+// NOTE: Source: npm package: emojilib, file:emojis.json
+window.tinymce.Resource.add("tinymce.plugins.emoticons",{grinning:{keywords:["face","smile","happy","joy",":D","grin"],"char":"\ud83d\ude00",fitzpatrick_scale:!1,category:"people"},grimacing:{keywords:["face","grimace","teeth"],"char":"\ud83d\ude2c",fitzpatrick_scale:!1,category:"people"},grin:{keywords:["face","happy","smile","joy","kawaii"],"char":"\ud83d\ude01",fitzpatrick_scale:!1,category:"people"},joy:{keywords:["face","cry","tears","weep","happy","happytears","haha"],"char":"\ud83d\ude02",fitzpatrick_scale:!1,category:"people"},rofl:{keywords:["face","rolling","floor","laughing","lol","haha"],"char":"\ud83e\udd23",fitzpatrick_scale:!1,category:"people"},smiley:{keywords:["face","happy","joy","haha",":D",":)","smile","funny"],"char":"\ud83d\ude03",fitzpatrick_scale:!1,category:"people"},smile:{keywords:["face","happy","joy","funny","haha","laugh","like",":D",":)"],"char":"\ud83d\ude04",fitzpatrick_scale:!1,category:"people"},sweat_smile:{keywords:["face","hot","happy","laugh","sweat","smile","relief"],"char":"\ud83d\ude05",fitzpatrick_scale:!1,category:"people"},laughing:{keywords:["happy","joy","lol","satisfied","haha","face","glad","XD","laugh"],"char":"\ud83d\ude06",fitzpatrick_scale:!1,category:"people"},innocent:{keywords:["face","angel","heaven","halo"],"char":"\ud83d\ude07",fitzpatrick_scale:!1,category:"people"},wink:{keywords:["face","happy","mischievous","secret",";)","smile","eye"],"char":"\ud83d\ude09",fitzpatrick_scale:!1,category:"people"},blush:{keywords:["face","smile","happy","flushed","crush","embarrassed","shy","joy"],"char":"\ud83d\ude0a",fitzpatrick_scale:!1,category:"people"},slightly_smiling_face:{keywords:["face","smile"],"char":"\ud83d\ude42",fitzpatrick_scale:!1,category:"people"},upside_down_face:{keywords:["face","flipped","silly","smile"],"char":"\ud83d\ude43",fitzpatrick_scale:!1,category:"people"},relaxed:{keywords:["face","blush","massage","happiness"],"char":"\u263a\ufe0f",fitzpatrick_scale:!1,category:"people"},yum:{keywords:["happy","joy","tongue","smile","face","silly","yummy","nom","delicious","savouring"],"char":"\ud83d\ude0b",fitzpatrick_scale:!1,category:"people"},relieved:{keywords:["face","relaxed","phew","massage","happiness"],"char":"\ud83d\ude0c",fitzpatrick_scale:!1,category:"people"},heart_eyes:{keywords:["face","love","like","affection","valentines","infatuation","crush","heart"],"char":"\ud83d\ude0d",fitzpatrick_scale:!1,category:"people"},kissing_heart:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],"char":"\ud83d\ude18",fitzpatrick_scale:!1,category:"people"},kissing:{keywords:["love","like","face","3","valentines","infatuation","kiss"],"char":"\ud83d\ude17",fitzpatrick_scale:!1,category:"people"},kissing_smiling_eyes:{keywords:["face","affection","valentines","infatuation","kiss"],"char":"\ud83d\ude19",fitzpatrick_scale:!1,category:"people"},kissing_closed_eyes:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],"char":"\ud83d\ude1a",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_winking_eye:{keywords:["face","prank","childish","playful","mischievous","smile","wink","tongue"],"char":"\ud83d\ude1c",fitzpatrick_scale:!1,category:"people"},zany:{keywords:["face","goofy","crazy"],"char":"\ud83e\udd2a",fitzpatrick_scale:!1,category:"people"},raised_eyebrow:{keywords:["face","distrust","scepticism","disapproval","disbelief","surprise"],"char":"\ud83e\udd28",fitzpatrick_scale:!1,category:"people"},monocle:{keywords:["face","stuffy","wealthy"],"char":"\ud83e\uddd0",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_closed_eyes:{keywords:["face","prank","playful","mischievous","smile","tongue"],"char":"\ud83d\ude1d",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue:{keywords:["face","prank","childish","playful","mischievous","smile","tongue"],"char":"\ud83d\ude1b",fitzpatrick_scale:!1,category:"people"},money_mouth_face:{keywords:["face","rich","dollar","money"],"char":"\ud83e\udd11",fitzpatrick_scale:!1,category:"people"},nerd_face:{keywords:["face","nerdy","geek","dork"],"char":"\ud83e\udd13",fitzpatrick_scale:!1,category:"people"},sunglasses:{keywords:["face","cool","smile","summer","beach","sunglass"],"char":"\ud83d\ude0e",fitzpatrick_scale:!1,category:"people"},star_struck:{keywords:["face","smile","starry","eyes","grinning"],"char":"\ud83e\udd29",fitzpatrick_scale:!1,category:"people"},clown_face:{keywords:["face"],"char":"\ud83e\udd21",fitzpatrick_scale:!1,category:"people"},cowboy_hat_face:{keywords:["face","cowgirl","hat"],"char":"\ud83e\udd20",fitzpatrick_scale:!1,category:"people"},hugs:{keywords:["face","smile","hug"],"char":"\ud83e\udd17",fitzpatrick_scale:!1,category:"people"},smirk:{keywords:["face","smile","mean","prank","smug","sarcasm"],"char":"\ud83d\ude0f",fitzpatrick_scale:!1,category:"people"},no_mouth:{keywords:["face","hellokitty"],"char":"\ud83d\ude36",fitzpatrick_scale:!1,category:"people"},neutral_face:{keywords:["indifference","meh",":|","neutral"],"char":"\ud83d\ude10",fitzpatrick_scale:!1,category:"people"},expressionless:{keywords:["face","indifferent","-_-","meh","deadpan"],"char":"\ud83d\ude11",fitzpatrick_scale:!1,category:"people"},unamused:{keywords:["indifference","bored","straight face","serious","sarcasm","unimpressed","skeptical","dubious","side_eye"],"char":"\ud83d\ude12",fitzpatrick_scale:!1,category:"people"},roll_eyes:{keywords:["face","eyeroll","frustrated"],"char":"\ud83d\ude44",fitzpatrick_scale:!1,category:"people"},thinking:{keywords:["face","hmmm","think","consider"],"char":"\ud83e\udd14",fitzpatrick_scale:!1,category:"people"},lying_face:{keywords:["face","lie","pinocchio"],"char":"\ud83e\udd25",fitzpatrick_scale:!1,category:"people"},hand_over_mouth:{keywords:["face","whoops","shock","surprise"],"char":"\ud83e\udd2d",fitzpatrick_scale:!1,category:"people"},shushing:{keywords:["face","quiet","shhh"],"char":"\ud83e\udd2b",fitzpatrick_scale:!1,category:"people"},symbols_over_mouth:{keywords:["face","swearing","cursing","cussing","profanity","expletive"],"char":"\ud83e\udd2c",fitzpatrick_scale:!1,category:"people"},exploding_head:{keywords:["face","shocked","mind","blown"],"char":"\ud83e\udd2f",fitzpatrick_scale:!1,category:"people"},flushed:{keywords:["face","blush","shy","flattered"],"char":"\ud83d\ude33",fitzpatrick_scale:!1,category:"people"},disappointed:{keywords:["face","sad","upset","depressed",":("],"char":"\ud83d\ude1e",fitzpatrick_scale:!1,category:"people"},worried:{keywords:["face","concern","nervous",":("],"char":"\ud83d\ude1f",fitzpatrick_scale:!1,category:"people"},angry:{keywords:["mad","face","annoyed","frustrated"],"char":"\ud83d\ude20",fitzpatrick_scale:!1,category:"people"},rage:{keywords:["angry","mad","hate","despise"],"char":"\ud83d\ude21",fitzpatrick_scale:!1,category:"people"},pensive:{keywords:["face","sad","depressed","upset"],"char":"\ud83d\ude14",fitzpatrick_scale:!1,category:"people"},confused:{keywords:["face","indifference","huh","weird","hmmm",":/"],"char":"\ud83d\ude15",fitzpatrick_scale:!1,category:"people"},slightly_frowning_face:{keywords:["face","frowning","disappointed","sad","upset"],"char":"\ud83d\ude41",fitzpatrick_scale:!1,category:"people"},frowning_face:{keywords:["face","sad","upset","frown"],"char":"\u2639",fitzpatrick_scale:!1,category:"people"},persevere:{keywords:["face","sick","no","upset","oops"],"char":"\ud83d\ude23",fitzpatrick_scale:!1,category:"people"},confounded:{keywords:["face","confused","sick","unwell","oops",":S"],"char":"\ud83d\ude16",fitzpatrick_scale:!1,category:"people"},tired_face:{keywords:["sick","whine","upset","frustrated"],"char":"\ud83d\ude2b",fitzpatrick_scale:!1,category:"people"},weary:{keywords:["face","tired","sleepy","sad","frustrated","upset"],"char":"\ud83d\ude29",fitzpatrick_scale:!1,category:"people"},triumph:{keywords:["face","gas","phew","proud","pride"],"char":"\ud83d\ude24",fitzpatrick_scale:!1,category:"people"},open_mouth:{keywords:["face","surprise","impressed","wow","whoa",":O"],"char":"\ud83d\ude2e",fitzpatrick_scale:!1,category:"people"},scream:{keywords:["face","munch","scared","omg"],"char":"\ud83d\ude31",fitzpatrick_scale:!1,category:"people"},fearful:{keywords:["face","scared","terrified","nervous","oops","huh"],"char":"\ud83d\ude28",fitzpatrick_scale:!1,category:"people"},cold_sweat:{keywords:["face","nervous","sweat"],"char":"\ud83d\ude30",fitzpatrick_scale:!1,category:"people"},hushed:{keywords:["face","woo","shh"],"char":"\ud83d\ude2f",fitzpatrick_scale:!1,category:"people"},frowning:{keywords:["face","aw","what"],"char":"\ud83d\ude26",fitzpatrick_scale:!1,category:"people"},anguished:{keywords:["face","stunned","nervous"],"char":"\ud83d\ude27",fitzpatrick_scale:!1,category:"people"},cry:{keywords:["face","tears","sad","depressed","upset",":'("],"char":"\ud83d\ude22",fitzpatrick_scale:!1,category:"people"},disappointed_relieved:{keywords:["face","phew","sweat","nervous"],"char":"\ud83d\ude25",fitzpatrick_scale:!1,category:"people"},drooling_face:{keywords:["face"],"char":"\ud83e\udd24",fitzpatrick_scale:!1,category:"people"},sleepy:{keywords:["face","tired","rest","nap"],"char":"\ud83d\ude2a",fitzpatrick_scale:!1,category:"people"},sweat:{keywords:["face","hot","sad","tired","exercise"],"char":"\ud83d\ude13",fitzpatrick_scale:!1,category:"people"},sob:{keywords:["face","cry","tears","sad","upset","depressed"],"char":"\ud83d\ude2d",fitzpatrick_scale:!1,category:"people"},dizzy_face:{keywords:["spent","unconscious","xox","dizzy"],"char":"\ud83d\ude35",fitzpatrick_scale:!1,category:"people"},astonished:{keywords:["face","xox","surprised","poisoned"],"char":"\ud83d\ude32",fitzpatrick_scale:!1,category:"people"},zipper_mouth_face:{keywords:["face","sealed","zipper","secret"],"char":"\ud83e\udd10",fitzpatrick_scale:!1,category:"people"},nauseated_face:{keywords:["face","vomit","gross","green","sick","throw up","ill"],"char":"\ud83e\udd22",fitzpatrick_scale:!1,category:"people"},sneezing_face:{keywords:["face","gesundheit","sneeze","sick","allergy"],"char":"\ud83e\udd27",fitzpatrick_scale:!1,category:"people"},vomiting:{keywords:["face","sick"],"char":"\ud83e\udd2e",fitzpatrick_scale:!1,category:"people"},mask:{keywords:["face","sick","ill","disease"],"char":"\ud83d\ude37",fitzpatrick_scale:!1,category:"people"},face_with_thermometer:{keywords:["sick","temperature","thermometer","cold","fever"],"char":"\ud83e\udd12",fitzpatrick_scale:!1,category:"people"},face_with_head_bandage:{keywords:["injured","clumsy","bandage","hurt"],"char":"\ud83e\udd15",fitzpatrick_scale:!1,category:"people"},sleeping:{keywords:["face","tired","sleepy","night","zzz"],"char":"\ud83d\ude34",fitzpatrick_scale:!1,category:"people"},zzz:{keywords:["sleepy","tired","dream"],"char":"\ud83d\udca4",fitzpatrick_scale:!1,category:"people"},poop:{keywords:["hankey","shitface","fail","turd","shit"],"char":"\ud83d\udca9",fitzpatrick_scale:!1,category:"people"},smiling_imp:{keywords:["devil","horns"],"char":"\ud83d\ude08",fitzpatrick_scale:!1,category:"people"},imp:{keywords:["devil","angry","horns"],"char":"\ud83d\udc7f",fitzpatrick_scale:!1,category:"people"},japanese_ogre:{keywords:["monster","red","mask","halloween","scary","creepy","devil","demon","japanese","ogre"],"char":"\ud83d\udc79",fitzpatrick_scale:!1,category:"people"},japanese_goblin:{keywords:["red","evil","mask","monster","scary","creepy","japanese","goblin"],"char":"\ud83d\udc7a",fitzpatrick_scale:!1,category:"people"},skull:{keywords:["dead","skeleton","creepy","death"],"char":"\ud83d\udc80",fitzpatrick_scale:!1,category:"people"},ghost:{keywords:["halloween","spooky","scary"],"char":"\ud83d\udc7b",fitzpatrick_scale:!1,category:"people"},alien:{keywords:["UFO","paul","weird","outer_space"],"char":"\ud83d\udc7d",fitzpatrick_scale:!1,category:"people"},robot:{keywords:["computer","machine","bot"],"char":"\ud83e\udd16",fitzpatrick_scale:!1,category:"people"},smiley_cat:{keywords:["animal","cats","happy","smile"],"char":"\ud83d\ude3a",fitzpatrick_scale:!1,category:"people"},smile_cat:{keywords:["animal","cats","smile"],"char":"\ud83d\ude38",fitzpatrick_scale:!1,category:"people"},joy_cat:{keywords:["animal","cats","haha","happy","tears"],"char":"\ud83d\ude39",fitzpatrick_scale:!1,category:"people"},heart_eyes_cat:{keywords:["animal","love","like","affection","cats","valentines","heart"],"char":"\ud83d\ude3b",fitzpatrick_scale:!1,category:"people"},smirk_cat:{keywords:["animal","cats","smirk"],"char":"\ud83d\ude3c",fitzpatrick_scale:!1,category:"people"},kissing_cat:{keywords:["animal","cats","kiss"],"char":"\ud83d\ude3d",fitzpatrick_scale:!1,category:"people"},scream_cat:{keywords:["animal","cats","munch","scared","scream"],"char":"\ud83d\ude40",fitzpatrick_scale:!1,category:"people"},crying_cat_face:{keywords:["animal","tears","weep","sad","cats","upset","cry"],"char":"\ud83d\ude3f",fitzpatrick_scale:!1,category:"people"},pouting_cat:{keywords:["animal","cats"],"char":"\ud83d\ude3e",fitzpatrick_scale:!1,category:"people"},palms_up:{keywords:["hands","gesture","cupped","prayer"],"char":"\ud83e\udd32",fitzpatrick_scale:!0,category:"people"},raised_hands:{keywords:["gesture","hooray","yea","celebration","hands"],"char":"\ud83d\ude4c",fitzpatrick_scale:!0,category:"people"},clap:{keywords:["hands","praise","applause","congrats","yay"],"char":"\ud83d\udc4f",fitzpatrick_scale:!0,category:"people"},wave:{keywords:["hands","gesture","goodbye","solong","farewell","hello","hi","palm"],"char":"\ud83d\udc4b",fitzpatrick_scale:!0,category:"people"},call_me_hand:{keywords:["hands","gesture"],"char":"\ud83e\udd19",fitzpatrick_scale:!0,category:"people"},"+1":{keywords:["thumbsup","yes","awesome","good","agree","accept","cool","hand","like"],"char":"\ud83d\udc4d",fitzpatrick_scale:!0,category:"people"},"-1":{keywords:["thumbsdown","no","dislike","hand"],"char":"\ud83d\udc4e",fitzpatrick_scale:!0,category:"people"},facepunch:{keywords:["angry","violence","fist","hit","attack","hand"],"char":"\ud83d\udc4a",fitzpatrick_scale:!0,category:"people"},fist:{keywords:["fingers","hand","grasp"],"char":"\u270a",fitzpatrick_scale:!0,category:"people"},fist_left:{keywords:["hand","fistbump"],"char":"\ud83e\udd1b",fitzpatrick_scale:!0,category:"people"},fist_right:{keywords:["hand","fistbump"],"char":"\ud83e\udd1c",fitzpatrick_scale:!0,category:"people"},v:{keywords:["fingers","ohyeah","hand","peace","victory","two"],"char":"\u270c",fitzpatrick_scale:!0,category:"people"},ok_hand:{keywords:["fingers","limbs","perfect","ok","okay"],"char":"\ud83d\udc4c",fitzpatrick_scale:!0,category:"people"},raised_hand:{keywords:["fingers","stop","highfive","palm","ban"],"char":"\u270b",fitzpatrick_scale:!0,category:"people"},raised_back_of_hand:{keywords:["fingers","raised","backhand"],"char":"\ud83e\udd1a",fitzpatrick_scale:!0,category:"people"},open_hands:{keywords:["fingers","butterfly","hands","open"],"char":"\ud83d\udc50",fitzpatrick_scale:!0,category:"people"},muscle:{keywords:["arm","flex","hand","summer","strong","biceps"],"char":"\ud83d\udcaa",fitzpatrick_scale:!0,category:"people"},pray:{keywords:["please","hope","wish","namaste","highfive"],"char":"\ud83d\ude4f",fitzpatrick_scale:!0,category:"people"},handshake:{keywords:["agreement","shake"],"char":"\ud83e\udd1d",fitzpatrick_scale:!1,category:"people"},point_up:{keywords:["hand","fingers","direction","up"],"char":"\u261d",fitzpatrick_scale:!0,category:"people"},point_up_2:{keywords:["fingers","hand","direction","up"],"char":"\ud83d\udc46",fitzpatrick_scale:!0,category:"people"},point_down:{keywords:["fingers","hand","direction","down"],"char":"\ud83d\udc47",fitzpatrick_scale:!0,category:"people"},point_left:{keywords:["direction","fingers","hand","left"],"char":"\ud83d\udc48",fitzpatrick_scale:!0,category:"people"},point_right:{keywords:["fingers","hand","direction","right"],"char":"\ud83d\udc49",fitzpatrick_scale:!0,category:"people"},fu:{keywords:["hand","fingers","rude","middle","flipping"],"char":"\ud83d\udd95",fitzpatrick_scale:!0,category:"people"},raised_hand_with_fingers_splayed:{keywords:["hand","fingers","palm"],"char":"\ud83d\udd90",fitzpatrick_scale:!0,category:"people"},love_you:{keywords:["hand","fingers","gesture"],"char":"\ud83e\udd1f",fitzpatrick_scale:!0,category:"people"},metal:{keywords:["hand","fingers","evil_eye","sign_of_horns","rock_on"],"char":"\ud83e\udd18",fitzpatrick_scale:!0,category:"people"},crossed_fingers:{keywords:["good","lucky"],"char":"\ud83e\udd1e",fitzpatrick_scale:!0,category:"people"},vulcan_salute:{keywords:["hand","fingers","spock","star trek"],"char":"\ud83d\udd96",fitzpatrick_scale:!0,category:"people"},writing_hand:{keywords:["lower_left_ballpoint_pen","stationery","write","compose"],"char":"\u270d",fitzpatrick_scale:!0,category:"people"},selfie:{keywords:["camera","phone"],"char":"\ud83e\udd33",fitzpatrick_scale:!0,category:"people"},nail_care:{keywords:["beauty","manicure","finger","fashion","nail"],"char":"\ud83d\udc85",fitzpatrick_scale:!0,category:"people"},lips:{keywords:["mouth","kiss"],"char":"\ud83d\udc44",fitzpatrick_scale:!1,category:"people"},tongue:{keywords:["mouth","playful"],"char":"\ud83d\udc45",fitzpatrick_scale:!1,category:"people"},ear:{keywords:["face","hear","sound","listen"],"char":"\ud83d\udc42",fitzpatrick_scale:!0,category:"people"},nose:{keywords:["smell","sniff"],"char":"\ud83d\udc43",fitzpatrick_scale:!0,category:"people"},eye:{keywords:["face","look","see","watch","stare"],"char":"\ud83d\udc41",fitzpatrick_scale:!1,category:"people"},eyes:{keywords:["look","watch","stalk","peek","see"],"char":"\ud83d\udc40",fitzpatrick_scale:!1,category:"people"},brain:{keywords:["smart","intelligent"],"char":"\ud83e\udde0",fitzpatrick_scale:!1,category:"people"},bust_in_silhouette:{keywords:["user","person","human"],"char":"\ud83d\udc64",fitzpatrick_scale:!1,category:"people"},busts_in_silhouette:{keywords:["user","person","human","group","team"],"char":"\ud83d\udc65",fitzpatrick_scale:!1,category:"people"},speaking_head:{keywords:["user","person","human","sing","say","talk"],"char":"\ud83d\udde3",fitzpatrick_scale:!1,category:"people"},baby:{keywords:["child","boy","girl","toddler"],"char":"\ud83d\udc76",fitzpatrick_scale:!0,category:"people"},child:{keywords:["gender-neutral","young"],"char":"\ud83e\uddd2",fitzpatrick_scale:!0,category:"people"},boy:{keywords:["man","male","guy","teenager"],"char":"\ud83d\udc66",fitzpatrick_scale:!0,category:"people"},girl:{keywords:["female","woman","teenager"],"char":"\ud83d\udc67",fitzpatrick_scale:!0,category:"people"},adult:{keywords:["gender-neutral","person"],"char":"\ud83e\uddd1",fitzpatrick_scale:!0,category:"people"},man:{keywords:["mustache","father","dad","guy","classy","sir","moustache"],"char":"\ud83d\udc68",fitzpatrick_scale:!0,category:"people"},woman:{keywords:["female","girls","lady"],"char":"\ud83d\udc69",fitzpatrick_scale:!0,category:"people"},blonde_woman:{keywords:["woman","female","girl","blonde","person"],"char":"\ud83d\udc71\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},blonde_man:{keywords:["man","male","boy","blonde","guy","person"],"char":"\ud83d\udc71",fitzpatrick_scale:!0,category:"people"},bearded_person:{keywords:["person","bewhiskered"],"char":"\ud83e\uddd4",fitzpatrick_scale:!0,category:"people"},older_adult:{keywords:["human","elder","senior","gender-neutral"],"char":"\ud83e\uddd3",fitzpatrick_scale:!0,category:"people"},older_man:{keywords:["human","male","men","old","elder","senior"],"char":"\ud83d\udc74",fitzpatrick_scale:!0,category:"people"},older_woman:{keywords:["human","female","women","lady","old","elder","senior"],"char":"\ud83d\udc75",fitzpatrick_scale:!0,category:"people"},man_with_gua_pi_mao:{keywords:["male","boy","chinese"],"char":"\ud83d\udc72",fitzpatrick_scale:!0,category:"people"},woman_with_headscarf:{keywords:["female","hijab","mantilla","tichel"],"char":"\ud83e\uddd5",fitzpatrick_scale:!0,category:"people"},woman_with_turban:{keywords:["female","indian","hinduism","arabs","woman"],"char":"\ud83d\udc73\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},man_with_turban:{keywords:["male","indian","hinduism","arabs"],"char":"\ud83d\udc73",fitzpatrick_scale:!0,category:"people"},policewoman:{keywords:["woman","police","law","legal","enforcement","arrest","911","female"],"char":"\ud83d\udc6e\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},policeman:{keywords:["man","police","law","legal","enforcement","arrest","911"],"char":"\ud83d\udc6e",fitzpatrick_scale:!0,category:"people"},construction_worker_woman:{keywords:["female","human","wip","build","construction","worker","labor","woman"],"char":"\ud83d\udc77\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},construction_worker_man:{keywords:["male","human","wip","guy","build","construction","worker","labor"],"char":"\ud83d\udc77",fitzpatrick_scale:!0,category:"people"},guardswoman:{keywords:["uk","gb","british","female","royal","woman"],"char":"\ud83d\udc82\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},guardsman:{keywords:["uk","gb","british","male","guy","royal"],"char":"\ud83d\udc82",fitzpatrick_scale:!0,category:"people"},female_detective:{keywords:["human","spy","detective","female","woman"],"char":"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},male_detective:{keywords:["human","spy","detective"],"char":"\ud83d\udd75",fitzpatrick_scale:!0,category:"people"},woman_health_worker:{keywords:["doctor","nurse","therapist","healthcare","woman","human"],"char":"\ud83d\udc69\u200d\u2695\ufe0f",fitzpatrick_scale:!0,category:"people"},man_health_worker:{keywords:["doctor","nurse","therapist","healthcare","man","human"],"char":"\ud83d\udc68\u200d\u2695\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_farmer:{keywords:["rancher","gardener","woman","human"],"char":"\ud83d\udc69\u200d\ud83c\udf3e",fitzpatrick_scale:!0,category:"people"},man_farmer:{keywords:["rancher","gardener","man","human"],"char":"\ud83d\udc68\u200d\ud83c\udf3e",fitzpatrick_scale:!0,category:"people"},woman_cook:{keywords:["chef","woman","human"],"char":"\ud83d\udc69\u200d\ud83c\udf73",fitzpatrick_scale:!0,category:"people"},man_cook:{keywords:["chef","man","human"],"char":"\ud83d\udc68\u200d\ud83c\udf73",fitzpatrick_scale:!0,category:"people"},woman_student:{keywords:["graduate","woman","human"],"char":"\ud83d\udc69\u200d\ud83c\udf93",fitzpatrick_scale:!0,category:"people"},man_student:{keywords:["graduate","man","human"],"char":"\ud83d\udc68\u200d\ud83c\udf93",fitzpatrick_scale:!0,category:"people"},woman_singer:{keywords:["rockstar","entertainer","woman","human"],"char":"\ud83d\udc69\u200d\ud83c\udfa4",fitzpatrick_scale:!0,category:"people"},man_singer:{keywords:["rockstar","entertainer","man","human"],"char":"\ud83d\udc68\u200d\ud83c\udfa4",fitzpatrick_scale:!0,category:"people"},woman_teacher:{keywords:["instructor","professor","woman","human"],"char":"\ud83d\udc69\u200d\ud83c\udfeb",fitzpatrick_scale:!0,category:"people"},man_teacher:{keywords:["instructor","professor","man","human"],"char":"\ud83d\udc68\u200d\ud83c\udfeb",fitzpatrick_scale:!0,category:"people"},woman_factory_worker:{keywords:["assembly","industrial","woman","human"],"char":"\ud83d\udc69\u200d\ud83c\udfed",fitzpatrick_scale:!0,category:"people"},man_factory_worker:{keywords:["assembly","industrial","man","human"],"char":"\ud83d\udc68\u200d\ud83c\udfed",fitzpatrick_scale:!0,category:"people"},woman_technologist:{keywords:["coder","developer","engineer","programmer","software","woman","human","laptop","computer"],"char":"\ud83d\udc69\u200d\ud83d\udcbb",fitzpatrick_scale:!0,category:"people"},man_technologist:{keywords:["coder","developer","engineer","programmer","software","man","human","laptop","computer"],"char":"\ud83d\udc68\u200d\ud83d\udcbb",fitzpatrick_scale:!0,category:"people"},woman_office_worker:{keywords:["business","manager","woman","human"],"char":"\ud83d\udc69\u200d\ud83d\udcbc",fitzpatrick_scale:!0,category:"people"},man_office_worker:{keywords:["business","manager","man","human"],"char":"\ud83d\udc68\u200d\ud83d\udcbc",fitzpatrick_scale:!0,category:"people"},woman_mechanic:{keywords:["plumber","woman","human","wrench"],"char":"\ud83d\udc69\u200d\ud83d\udd27",fitzpatrick_scale:!0,category:"people"},man_mechanic:{keywords:["plumber","man","human","wrench"],"char":"\ud83d\udc68\u200d\ud83d\udd27",fitzpatrick_scale:!0,category:"people"},woman_scientist:{keywords:["biologist","chemist","engineer","physicist","woman","human"],"char":"\ud83d\udc69\u200d\ud83d\udd2c",fitzpatrick_scale:!0,category:"people"},man_scientist:{keywords:["biologist","chemist","engineer","physicist","man","human"],"char":"\ud83d\udc68\u200d\ud83d\udd2c",fitzpatrick_scale:!0,category:"people"},woman_artist:{keywords:["painter","woman","human"],"char":"\ud83d\udc69\u200d\ud83c\udfa8",fitzpatrick_scale:!0,category:"people"},man_artist:{keywords:["painter","man","human"],"char":"\ud83d\udc68\u200d\ud83c\udfa8",fitzpatrick_scale:!0,category:"people"},woman_firefighter:{keywords:["fireman","woman","human"],"char":"\ud83d\udc69\u200d\ud83d\ude92",fitzpatrick_scale:!0,category:"people"},man_firefighter:{keywords:["fireman","man","human"],"char":"\ud83d\udc68\u200d\ud83d\ude92",fitzpatrick_scale:!0,category:"people"},woman_pilot:{keywords:["aviator","plane","woman","human"],"char":"\ud83d\udc69\u200d\u2708\ufe0f",fitzpatrick_scale:!0,category:"people"},man_pilot:{keywords:["aviator","plane","man","human"],"char":"\ud83d\udc68\u200d\u2708\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_astronaut:{keywords:["space","rocket","woman","human"],"char":"\ud83d\udc69\u200d\ud83d\ude80",fitzpatrick_scale:!0,category:"people"},man_astronaut:{keywords:["space","rocket","man","human"],"char":"\ud83d\udc68\u200d\ud83d\ude80",fitzpatrick_scale:!0,category:"people"},woman_judge:{keywords:["justice","court","woman","human"],"char":"\ud83d\udc69\u200d\u2696\ufe0f",fitzpatrick_scale:!0,category:"people"},man_judge:{keywords:["justice","court","man","human"],"char":"\ud83d\udc68\u200d\u2696\ufe0f",fitzpatrick_scale:!0,category:"people"},mrs_claus:{keywords:["woman","female","xmas","mother christmas"],"char":"\ud83e\udd36",fitzpatrick_scale:!0,category:"people"},santa:{keywords:["festival","man","male","xmas","father christmas"],"char":"\ud83c\udf85",fitzpatrick_scale:!0,category:"people"},sorceress:{keywords:["woman","female","mage","witch"],"char":"\ud83e\uddd9\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},wizard:{keywords:["man","male","mage","sorcerer"],"char":"\ud83e\uddd9\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_elf:{keywords:["woman","female"],"char":"\ud83e\udddd\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},man_elf:{keywords:["man","male"],"char":"\ud83e\udddd\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_vampire:{keywords:["woman","female"],"char":"\ud83e\udddb\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},man_vampire:{keywords:["man","male","dracula"],"char":"\ud83e\udddb\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_zombie:{keywords:["woman","female","undead","walking dead"],"char":"\ud83e\udddf\u200d\u2640\ufe0f",fitzpatrick_scale:!1,category:"people"},man_zombie:{keywords:["man","male","dracula","undead","walking dead"],"char":"\ud83e\udddf\u200d\u2642\ufe0f",fitzpatrick_scale:!1,category:"people"},woman_genie:{keywords:["woman","female"],"char":"\ud83e\uddde\u200d\u2640\ufe0f",fitzpatrick_scale:!1,category:"people"},man_genie:{keywords:["man","male"],"char":"\ud83e\uddde\u200d\u2642\ufe0f",fitzpatrick_scale:!1,category:"people"},mermaid:{keywords:["woman","female","merwoman","ariel"],"char":"\ud83e\udddc\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},merman:{keywords:["man","male","triton"],"char":"\ud83e\udddc\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_fairy:{keywords:["woman","female"],"char":"\ud83e\uddda\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},man_fairy:{keywords:["man","male"],"char":"\ud83e\uddda\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},angel:{keywords:["heaven","wings","halo"],"char":"\ud83d\udc7c",fitzpatrick_scale:!0,category:"people"},pregnant_woman:{keywords:["baby"],"char":"\ud83e\udd30",fitzpatrick_scale:!0,category:"people"},breastfeeding:{keywords:["nursing","baby"],"char":"\ud83e\udd31",fitzpatrick_scale:!0,category:"people"},princess:{keywords:["girl","woman","female","blond","crown","royal","queen"],"char":"\ud83d\udc78",fitzpatrick_scale:!0,category:"people"},prince:{keywords:["boy","man","male","crown","royal","king"],"char":"\ud83e\udd34",fitzpatrick_scale:!0,category:"people"},bride_with_veil:{keywords:["couple","marriage","wedding","woman","bride"],"char":"\ud83d\udc70",fitzpatrick_scale:!0,category:"people"},man_in_tuxedo:{keywords:["couple","marriage","wedding","groom"],"char":"\ud83e\udd35",fitzpatrick_scale:!0,category:"people"},running_woman:{keywords:["woman","walking","exercise","race","running","female"],"char":"\ud83c\udfc3\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},running_man:{keywords:["man","walking","exercise","race","running"],"char":"\ud83c\udfc3",fitzpatrick_scale:!0,category:"people"},walking_woman:{keywords:["human","feet","steps","woman","female"],"char":"\ud83d\udeb6\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},walking_man:{keywords:["human","feet","steps"],"char":"\ud83d\udeb6",fitzpatrick_scale:!0,category:"people"},dancer:{keywords:["female","girl","woman","fun"],"char":"\ud83d\udc83",fitzpatrick_scale:!0,category:"people"},man_dancing:{keywords:["male","boy","fun","dancer"],"char":"\ud83d\udd7a",fitzpatrick_scale:!0,category:"people"},dancing_women:{keywords:["female","bunny","women","girls"],"char":"\ud83d\udc6f",fitzpatrick_scale:!1,category:"people"},dancing_men:{keywords:["male","bunny","men","boys"],"char":"\ud83d\udc6f\u200d\u2642\ufe0f",fitzpatrick_scale:!1,category:"people"},couple:{keywords:["pair","people","human","love","date","dating","like","affection","valentines","marriage"],"char":"\ud83d\udc6b",fitzpatrick_scale:!1,category:"people"},two_men_holding_hands:{keywords:["pair","couple","love","like","bromance","friendship","people","human"],"char":"\ud83d\udc6c",fitzpatrick_scale:!1,category:"people"},two_women_holding_hands:{keywords:["pair","friendship","couple","love","like","female","people","human"],"char":"\ud83d\udc6d",fitzpatrick_scale:!1,category:"people"},bowing_woman:{keywords:["woman","female","girl"],"char":"\ud83d\ude47\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},bowing_man:{keywords:["man","male","boy"],"char":"\ud83d\ude47",fitzpatrick_scale:!0,category:"people"},man_facepalming:{keywords:["man","male","boy","disbelief"],"char":"\ud83e\udd26",fitzpatrick_scale:!0,category:"people"},woman_facepalming:{keywords:["woman","female","girl","disbelief"],"char":"\ud83e\udd26\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_shrugging:{keywords:["woman","female","girl","confused","indifferent","doubt"],"char":"\ud83e\udd37",fitzpatrick_scale:!0,category:"people"},man_shrugging:{keywords:["man","male","boy","confused","indifferent","doubt"],"char":"\ud83e\udd37\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},tipping_hand_woman:{keywords:["female","girl","woman","human","information"],"char":"\ud83d\udc81",fitzpatrick_scale:!0,category:"people"},tipping_hand_man:{keywords:["male","boy","man","human","information"],"char":"\ud83d\udc81\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},no_good_woman:{keywords:["female","girl","woman","nope"],"char":"\ud83d\ude45",fitzpatrick_scale:!0,category:"people"},no_good_man:{keywords:["male","boy","man","nope"],"char":"\ud83d\ude45\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},ok_woman:{keywords:["women","girl","female","pink","human","woman"],"char":"\ud83d\ude46",fitzpatrick_scale:!0,category:"people"},ok_man:{keywords:["men","boy","male","blue","human","man"],"char":"\ud83d\ude46\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},raising_hand_woman:{keywords:["female","girl","woman"],"char":"\ud83d\ude4b",fitzpatrick_scale:!0,category:"people"},raising_hand_man:{keywords:["male","boy","man"],"char":"\ud83d\ude4b\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},pouting_woman:{keywords:["female","girl","woman"],"char":"\ud83d\ude4e",fitzpatrick_scale:!0,category:"people"},pouting_man:{keywords:["male","boy","man"],"char":"\ud83d\ude4e\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},frowning_woman:{keywords:["female","girl","woman","sad","depressed","discouraged","unhappy"],"char":"\ud83d\ude4d",fitzpatrick_scale:!0,category:"people"},frowning_man:{keywords:["male","boy","man","sad","depressed","discouraged","unhappy"],"char":"\ud83d\ude4d\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},haircut_woman:{keywords:["female","girl","woman"],"char":"\ud83d\udc87",fitzpatrick_scale:!0,category:"people"},haircut_man:{keywords:["male","boy","man"],"char":"\ud83d\udc87\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},massage_woman:{keywords:["female","girl","woman","head"],"char":"\ud83d\udc86",fitzpatrick_scale:!0,category:"people"},massage_man:{keywords:["male","boy","man","head"],"char":"\ud83d\udc86\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_in_steamy_room:{keywords:["female","woman","spa","steamroom","sauna"],"char":"\ud83e\uddd6\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},man_in_steamy_room:{keywords:["male","man","spa","steamroom","sauna"],"char":"\ud83e\uddd6\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},couple_with_heart_woman_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],"char":"\ud83d\udc91",fitzpatrick_scale:!1,category:"people"},couple_with_heart_woman_woman:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],"char":"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",fitzpatrick_scale:!1,category:"people"},couple_with_heart_man_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],"char":"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68",fitzpatrick_scale:!1,category:"people"},couplekiss_man_woman:{keywords:["pair","valentines","love","like","dating","marriage"],"char":"\ud83d\udc8f",fitzpatrick_scale:!1,category:"people"},couplekiss_woman_woman:{keywords:["pair","valentines","love","like","dating","marriage"],"char":"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69",fitzpatrick_scale:!1,category:"people"},couplekiss_man_man:{keywords:["pair","valentines","love","like","dating","marriage"],"char":"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",fitzpatrick_scale:!1,category:"people"},family_man_woman_boy:{keywords:["home","parents","child","mom","dad","father","mother","people","human"],"char":"\ud83d\udc6a",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl:{keywords:["home","parents","people","human","child"],"char":"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl_boy:{keywords:["home","parents","people","human","children"],"char":"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",fitzpatrick_scale:!1,category:"people"},family_man_woman_boy_boy:{keywords:["home","parents","people","human","children"],"char":"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl_girl:{keywords:["home","parents","people","human","children"],"char":"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",fitzpatrick_scale:!1,category:"people"},family_woman_woman_boy:{keywords:["home","parents","people","human","children"],"char":"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl:{keywords:["home","parents","people","human","children"],"char":"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl_boy:{keywords:["home","parents","people","human","children"],"char":"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",fitzpatrick_scale:!1,category:"people"},family_woman_woman_boy_boy:{keywords:["home","parents","people","human","children"],"char":"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl_girl:{keywords:["home","parents","people","human","children"],"char":"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",fitzpatrick_scale:!1,category:"people"},family_man_man_boy:{keywords:["home","parents","people","human","children"],"char":"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66",fitzpatrick_scale:!1,category:"people"},family_man_man_girl:{keywords:["home","parents","people","human","children"],"char":"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67",fitzpatrick_scale:!1,category:"people"},family_man_man_girl_boy:{keywords:["home","parents","people","human","children"],"char":"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",fitzpatrick_scale:!1,category:"people"},family_man_man_boy_boy:{keywords:["home","parents","people","human","children"],"char":"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",fitzpatrick_scale:!1,category:"people"},family_man_man_girl_girl:{keywords:["home","parents","people","human","children"],"char":"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",fitzpatrick_scale:!1,category:"people"},family_woman_boy:{keywords:["home","parent","people","human","child"],"char":"\ud83d\udc69\u200d\ud83d\udc66",fitzpatrick_scale:!1,category:"people"},family_woman_girl:{keywords:["home","parent","people","human","child"],"char":"\ud83d\udc69\u200d\ud83d\udc67",fitzpatrick_scale:!1,category:"people"},family_woman_girl_boy:{keywords:["home","parent","people","human","children"],"char":"\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",fitzpatrick_scale:!1,category:"people"},family_woman_boy_boy:{keywords:["home","parent","people","human","children"],"char":"\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",fitzpatrick_scale:!1,category:"people"},family_woman_girl_girl:{keywords:["home","parent","people","human","children"],"char":"\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",fitzpatrick_scale:!1,category:"people"},family_man_boy:{keywords:["home","parent","people","human","child"],"char":"\ud83d\udc68\u200d\ud83d\udc66",fitzpatrick_scale:!1,category:"people"},family_man_girl:{keywords:["home","parent","people","human","child"],"char":"\ud83d\udc68\u200d\ud83d\udc67",fitzpatrick_scale:!1,category:"people"},family_man_girl_boy:{keywords:["home","parent","people","human","children"],"char":"\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",fitzpatrick_scale:!1,category:"people"},family_man_boy_boy:{keywords:["home","parent","people","human","children"],"char":"\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",fitzpatrick_scale:!1,category:"people"},family_man_girl_girl:{keywords:["home","parent","people","human","children"],"char":"\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",fitzpatrick_scale:!1,category:"people"},coat:{keywords:["jacket"],"char":"\ud83e\udde5",fitzpatrick_scale:!1,category:"people"},womans_clothes:{keywords:["fashion","shopping_bags","female"],"char":"\ud83d\udc5a",fitzpatrick_scale:!1,category:"people"},tshirt:{keywords:["fashion","cloth","casual","shirt","tee"],"char":"\ud83d\udc55",fitzpatrick_scale:!1,category:"people"},jeans:{keywords:["fashion","shopping"],"char":"\ud83d\udc56",fitzpatrick_scale:!1,category:"people"},necktie:{keywords:["shirt","suitup","formal","fashion","cloth","business"],"char":"\ud83d\udc54",fitzpatrick_scale:!1,category:"people"},dress:{keywords:["clothes","fashion","shopping"],"char":"\ud83d\udc57",fitzpatrick_scale:!1,category:"people"},bikini:{keywords:["swimming","female","woman","girl","fashion","beach","summer"],"char":"\ud83d\udc59",fitzpatrick_scale:!1,category:"people"},kimono:{keywords:["dress","fashion","women","female","japanese"],"char":"\ud83d\udc58",fitzpatrick_scale:!1,category:"people"},lipstick:{keywords:["female","girl","fashion","woman"],"char":"\ud83d\udc84",fitzpatrick_scale:!1,category:"people"},kiss:{keywords:["face","lips","love","like","affection","valentines"],"char":"\ud83d\udc8b",fitzpatrick_scale:!1,category:"people"},footprints:{keywords:["feet","tracking","walking","beach"],"char":"\ud83d\udc63",fitzpatrick_scale:!1,category:"people"},high_heel:{keywords:["fashion","shoes","female","pumps","stiletto"],"char":"\ud83d\udc60",fitzpatrick_scale:!1,category:"people"},sandal:{keywords:["shoes","fashion","flip flops"],"char":"\ud83d\udc61",fitzpatrick_scale:!1,category:"people"},boot:{keywords:["shoes","fashion"],"char":"\ud83d\udc62",fitzpatrick_scale:!1,category:"people"},mans_shoe:{keywords:["fashion","male"],"char":"\ud83d\udc5e",fitzpatrick_scale:!1,category:"people"},athletic_shoe:{keywords:["shoes","sports","sneakers"],"char":"\ud83d\udc5f",fitzpatrick_scale:!1,category:"people"},socks:{keywords:["stockings","clothes"],"char":"\ud83e\udde6",fitzpatrick_scale:!1,category:"people"},gloves:{keywords:["hands","winter","clothes"],"char":"\ud83e\udde4",fitzpatrick_scale:!1,category:"people"},scarf:{keywords:["neck","winter","clothes"],"char":"\ud83e\udde3",fitzpatrick_scale:!1,category:"people"},womans_hat:{keywords:["fashion","accessories","female","lady","spring"],"char":"\ud83d\udc52",fitzpatrick_scale:!1,category:"people"},tophat:{keywords:["magic","gentleman","classy","circus"],"char":"\ud83c\udfa9",fitzpatrick_scale:!1,category:"people"},billed_hat:{keywords:["cap","baseball"],"char":"\ud83e\udde2",fitzpatrick_scale:!1,category:"people"},rescue_worker_helmet:{keywords:["construction","build"],"char":"\u26d1",fitzpatrick_scale:!1,category:"people"},mortar_board:{keywords:["school","college","degree","university","graduation","cap","hat","legal","learn","education"],"char":"\ud83c\udf93",fitzpatrick_scale:!1,category:"people"},crown:{keywords:["king","kod","leader","royalty","lord"],"char":"\ud83d\udc51",fitzpatrick_scale:!1,category:"people"},school_satchel:{keywords:["student","education","bag","backpack"],"char":"\ud83c\udf92",fitzpatrick_scale:!1,category:"people"},pouch:{keywords:["bag","accessories","shopping"],"char":"\ud83d\udc5d",fitzpatrick_scale:!1,category:"people"},purse:{keywords:["fashion","accessories","money","sales","shopping"],"char":"\ud83d\udc5b",fitzpatrick_scale:!1,category:"people"},handbag:{keywords:["fashion","accessory","accessories","shopping"],"char":"\ud83d\udc5c",fitzpatrick_scale:!1,category:"people"},briefcase:{keywords:["business","documents","work","law","legal","job","career"],"char":"\ud83d\udcbc",fitzpatrick_scale:!1,category:"people"},eyeglasses:{keywords:["fashion","accessories","eyesight","nerdy","dork","geek"],"char":"\ud83d\udc53",fitzpatrick_scale:!1,category:"people"},dark_sunglasses:{keywords:["face","cool","accessories"],"char":"\ud83d\udd76",fitzpatrick_scale:!1,category:"people"},ring:{keywords:["wedding","propose","marriage","valentines","diamond","fashion","jewelry","gem","engagement"],"char":"\ud83d\udc8d",fitzpatrick_scale:!1,category:"people"},closed_umbrella:{keywords:["weather","rain","drizzle"],"char":"\ud83c\udf02",fitzpatrick_scale:!1,category:"people"},dog:{keywords:["animal","friend","nature","woof","puppy","pet","faithful"],"char":"\ud83d\udc36",fitzpatrick_scale:!1,category:"animals_and_nature"},cat:{keywords:["animal","meow","nature","pet","kitten"],"char":"\ud83d\udc31",fitzpatrick_scale:!1,category:"animals_and_nature"},mouse:{keywords:["animal","nature","cheese_wedge","rodent"],"char":"\ud83d\udc2d",fitzpatrick_scale:!1,category:"animals_and_nature"},hamster:{keywords:["animal","nature"],"char":"\ud83d\udc39",fitzpatrick_scale:!1,category:"animals_and_nature"},rabbit:{keywords:["animal","nature","pet","spring","magic","bunny"],"char":"\ud83d\udc30",fitzpatrick_scale:!1,category:"animals_and_nature"},fox_face:{keywords:["animal","nature","face"],"char":"\ud83e\udd8a",fitzpatrick_scale:!1,category:"animals_and_nature"},bear:{keywords:["animal","nature","wild"],"char":"\ud83d\udc3b",fitzpatrick_scale:!1,category:"animals_and_nature"},panda_face:{keywords:["animal","nature","panda"],"char":"\ud83d\udc3c",fitzpatrick_scale:!1,category:"animals_and_nature"},koala:{keywords:["animal","nature"],"char":"\ud83d\udc28",fitzpatrick_scale:!1,category:"animals_and_nature"},tiger:{keywords:["animal","cat","danger","wild","nature","roar"],"char":"\ud83d\udc2f",fitzpatrick_scale:!1,category:"animals_and_nature"},lion:{keywords:["animal","nature"],"char":"\ud83e\udd81",fitzpatrick_scale:!1,category:"animals_and_nature"},cow:{keywords:["beef","ox","animal","nature","moo","milk"],"char":"\ud83d\udc2e",fitzpatrick_scale:!1,category:"animals_and_nature"},pig:{keywords:["animal","oink","nature"],"char":"\ud83d\udc37",fitzpatrick_scale:!1,category:"animals_and_nature"},pig_nose:{keywords:["animal","oink"],"char":"\ud83d\udc3d",fitzpatrick_scale:!1,category:"animals_and_nature"},frog:{keywords:["animal","nature","croak","toad"],"char":"\ud83d\udc38",fitzpatrick_scale:!1,category:"animals_and_nature"},squid:{keywords:["animal","nature","ocean","sea"],"char":"\ud83e\udd91",fitzpatrick_scale:!1,category:"animals_and_nature"},octopus:{keywords:["animal","creature","ocean","sea","nature","beach"],"char":"\ud83d\udc19",fitzpatrick_scale:!1,category:"animals_and_nature"},shrimp:{keywords:["animal","ocean","nature","seafood"],"char":"\ud83e\udd90",fitzpatrick_scale:!1,category:"animals_and_nature"},monkey_face:{keywords:["animal","nature","circus"],"char":"\ud83d\udc35",fitzpatrick_scale:!1,category:"animals_and_nature"},gorilla:{keywords:["animal","nature","circus"],"char":"\ud83e\udd8d",fitzpatrick_scale:!1,category:"animals_and_nature"},see_no_evil:{keywords:["monkey","animal","nature","haha"],"char":"\ud83d\ude48",fitzpatrick_scale:!1,category:"animals_and_nature"},hear_no_evil:{keywords:["animal","monkey","nature"],"char":"\ud83d\ude49",fitzpatrick_scale:!1,category:"animals_and_nature"},speak_no_evil:{keywords:["monkey","animal","nature","omg"],"char":"\ud83d\ude4a",fitzpatrick_scale:!1,category:"animals_and_nature"},monkey:{keywords:["animal","nature","banana","circus"],"char":"\ud83d\udc12",fitzpatrick_scale:!1,category:"animals_and_nature"},chicken:{keywords:["animal","cluck","nature","bird"],"char":"\ud83d\udc14",fitzpatrick_scale:!1,category:"animals_and_nature"},penguin:{keywords:["animal","nature"],"char":"\ud83d\udc27",fitzpatrick_scale:!1,category:"animals_and_nature"},bird:{keywords:["animal","nature","fly","tweet","spring"],"char":"\ud83d\udc26",fitzpatrick_scale:!1,category:"animals_and_nature"},baby_chick:{keywords:["animal","chicken","bird"],"char":"\ud83d\udc24",fitzpatrick_scale:!1,category:"animals_and_nature"},hatching_chick:{keywords:["animal","chicken","egg","born","baby","bird"],"char":"\ud83d\udc23",fitzpatrick_scale:!1,category:"animals_and_nature"},hatched_chick:{keywords:["animal","chicken","baby","bird"],"char":"\ud83d\udc25",fitzpatrick_scale:!1,category:"animals_and_nature"},duck:{keywords:["animal","nature","bird","mallard"],"char":"\ud83e\udd86",fitzpatrick_scale:!1,category:"animals_and_nature"},eagle:{keywords:["animal","nature","bird"],"char":"\ud83e\udd85",fitzpatrick_scale:!1,category:"animals_and_nature"},owl:{keywords:["animal","nature","bird","hoot"],"char":"\ud83e\udd89",fitzpatrick_scale:!1,category:"animals_and_nature"},bat:{keywords:["animal","nature","blind","vampire"],"char":"\ud83e\udd87",fitzpatrick_scale:!1,category:"animals_and_nature"},wolf:{keywords:["animal","nature","wild"],"char":"\ud83d\udc3a",fitzpatrick_scale:!1,category:"animals_and_nature"},boar:{keywords:["animal","nature"],"char":"\ud83d\udc17",fitzpatrick_scale:!1,category:"animals_and_nature"},horse:{keywords:["animal","brown","nature"],"char":"\ud83d\udc34",fitzpatrick_scale:!1,category:"animals_and_nature"},unicorn:{keywords:["animal","nature","mystical"],"char":"\ud83e\udd84",fitzpatrick_scale:!1,category:"animals_and_nature"},honeybee:{keywords:["animal","insect","nature","bug","spring","honey"],"char":"\ud83d\udc1d",fitzpatrick_scale:!1,category:"animals_and_nature"},bug:{keywords:["animal","insect","nature","worm"],"char":"\ud83d\udc1b",fitzpatrick_scale:!1,category:"animals_and_nature"},butterfly:{keywords:["animal","insect","nature","caterpillar"],"char":"\ud83e\udd8b",fitzpatrick_scale:!1,category:"animals_and_nature"},snail:{keywords:["slow","animal","shell"],"char":"\ud83d\udc0c",fitzpatrick_scale:!1,category:"animals_and_nature"},beetle:{keywords:["animal","insect","nature","ladybug"],"char":"\ud83d\udc1e",fitzpatrick_scale:!1,category:"animals_and_nature"},ant:{keywords:["animal","insect","nature","bug"],"char":"\ud83d\udc1c",fitzpatrick_scale:!1,category:"animals_and_nature"},grasshopper:{keywords:["animal","cricket","chirp"],"char":"\ud83e\udd97",fitzpatrick_scale:!1,category:"animals_and_nature"},spider:{keywords:["animal","arachnid"],"char":"\ud83d\udd77",fitzpatrick_scale:!1,category:"animals_and_nature"},scorpion:{keywords:["animal","arachnid"],"char":"\ud83e\udd82",fitzpatrick_scale:!1,category:"animals_and_nature"},crab:{keywords:["animal","crustacean"],"char":"\ud83e\udd80",fitzpatrick_scale:!1,category:"animals_and_nature"},snake:{keywords:["animal","evil","nature","hiss","python"],"char":"\ud83d\udc0d",fitzpatrick_scale:!1,category:"animals_and_nature"},lizard:{keywords:["animal","nature","reptile"],"char":"\ud83e\udd8e",fitzpatrick_scale:!1,category:"animals_and_nature"},"t-rex":{keywords:["animal","nature","dinosaur","tyrannosaurus","extinct"],"char":"\ud83e\udd96",fitzpatrick_scale:!1,category:"animals_and_nature"},sauropod:{keywords:["animal","nature","dinosaur","brachiosaurus","brontosaurus","diplodocus","extinct"],"char":"\ud83e\udd95",fitzpatrick_scale:!1,category:"animals_and_nature"},turtle:{keywords:["animal","slow","nature","tortoise"],"char":"\ud83d\udc22",fitzpatrick_scale:!1,category:"animals_and_nature"},tropical_fish:{keywords:["animal","swim","ocean","beach","nemo"],"char":"\ud83d\udc20",fitzpatrick_scale:!1,category:"animals_and_nature"},fish:{keywords:["animal","food","nature"],"char":"\ud83d\udc1f",fitzpatrick_scale:!1,category:"animals_and_nature"},blowfish:{keywords:["animal","nature","food","sea","ocean"],"char":"\ud83d\udc21",fitzpatrick_scale:!1,category:"animals_and_nature"},dolphin:{keywords:["animal","nature","fish","sea","ocean","flipper","fins","beach"],"char":"\ud83d\udc2c",fitzpatrick_scale:!1,category:"animals_and_nature"},shark:{keywords:["animal","nature","fish","sea","ocean","jaws","fins","beach"],"char":"\ud83e\udd88",fitzpatrick_scale:!1,category:"animals_and_nature"},whale:{keywords:["animal","nature","sea","ocean"],"char":"\ud83d\udc33",fitzpatrick_scale:!1,category:"animals_and_nature"},whale2:{keywords:["animal","nature","sea","ocean"],"char":"\ud83d\udc0b",fitzpatrick_scale:!1,category:"animals_and_nature"},crocodile:{keywords:["animal","nature","reptile","lizard","alligator"],"char":"\ud83d\udc0a",fitzpatrick_scale:!1,category:"animals_and_nature"},leopard:{keywords:["animal","nature"],"char":"\ud83d\udc06",fitzpatrick_scale:!1,category:"animals_and_nature"},zebra:{keywords:["animal","nature","stripes","safari"],"char":"\ud83e\udd93",fitzpatrick_scale:!1,category:"animals_and_nature"},tiger2:{keywords:["animal","nature","roar"],"char":"\ud83d\udc05",fitzpatrick_scale:!1,category:"animals_and_nature"},water_buffalo:{keywords:["animal","nature","ox","cow"],"char":"\ud83d\udc03",fitzpatrick_scale:!1,category:"animals_and_nature"},ox:{keywords:["animal","cow","beef"],"char":"\ud83d\udc02",fitzpatrick_scale:!1,category:"animals_and_nature"},cow2:{keywords:["beef","ox","animal","nature","moo","milk"],"char":"\ud83d\udc04",fitzpatrick_scale:!1,category:"animals_and_nature"},deer:{keywords:["animal","nature","horns","venison"],"char":"\ud83e\udd8c",fitzpatrick_scale:!1,category:"animals_and_nature"},dromedary_camel:{keywords:["animal","hot","desert","hump"],"char":"\ud83d\udc2a",fitzpatrick_scale:!1,category:"animals_and_nature"},camel:{keywords:["animal","nature","hot","desert","hump"],"char":"\ud83d\udc2b",fitzpatrick_scale:!1,category:"animals_and_nature"},giraffe:{keywords:["animal","nature","spots","safari"],"char":"\ud83e\udd92",fitzpatrick_scale:!1,category:"animals_and_nature"},elephant:{keywords:["animal","nature","nose","th","circus"],"char":"\ud83d\udc18",fitzpatrick_scale:!1,category:"animals_and_nature"},rhinoceros:{keywords:["animal","nature","horn"],"char":"\ud83e\udd8f",fitzpatrick_scale:!1,category:"animals_and_nature"},goat:{keywords:["animal","nature"],"char":"\ud83d\udc10",fitzpatrick_scale:!1,category:"animals_and_nature"},ram:{keywords:["animal","sheep","nature"],"char":"\ud83d\udc0f",fitzpatrick_scale:!1,category:"animals_and_nature"},sheep:{keywords:["animal","nature","wool","shipit"],"char":"\ud83d\udc11",fitzpatrick_scale:!1,category:"animals_and_nature"},racehorse:{keywords:["animal","gamble","luck"],"char":"\ud83d\udc0e",fitzpatrick_scale:!1,category:"animals_and_nature"},pig2:{keywords:["animal","nature"],"char":"\ud83d\udc16",fitzpatrick_scale:!1,category:"animals_and_nature"},rat:{keywords:["animal","mouse","rodent"],"char":"\ud83d\udc00",fitzpatrick_scale:!1,category:"animals_and_nature"},mouse2:{keywords:["animal","nature","rodent"],"char":"\ud83d\udc01",fitzpatrick_scale:!1,category:"animals_and_nature"},rooster:{keywords:["animal","nature","chicken"],"char":"\ud83d\udc13",fitzpatrick_scale:!1,category:"animals_and_nature"},turkey:{keywords:["animal","bird"],"char":"\ud83e\udd83",fitzpatrick_scale:!1,category:"animals_and_nature"},dove:{keywords:["animal","bird"],"char":"\ud83d\udd4a",fitzpatrick_scale:!1,category:"animals_and_nature"},dog2:{keywords:["animal","nature","friend","doge","pet","faithful"],"char":"\ud83d\udc15",fitzpatrick_scale:!1,category:"animals_and_nature"},poodle:{keywords:["dog","animal","101","nature","pet"],"char":"\ud83d\udc29",fitzpatrick_scale:!1,category:"animals_and_nature"},cat2:{keywords:["animal","meow","pet","cats"],"char":"\ud83d\udc08",fitzpatrick_scale:!1,category:"animals_and_nature"},rabbit2:{keywords:["animal","nature","pet","magic","spring"],"char":"\ud83d\udc07",fitzpatrick_scale:!1,category:"animals_and_nature"},chipmunk:{keywords:["animal","nature","rodent","squirrel"],"char":"\ud83d\udc3f",fitzpatrick_scale:!1,category:"animals_and_nature"},hedgehog:{keywords:["animal","nature","spiny"],"char":"\ud83e\udd94",fitzpatrick_scale:!1,category:"animals_and_nature"},paw_prints:{keywords:["animal","tracking","footprints","dog","cat","pet","feet"],"char":"\ud83d\udc3e",fitzpatrick_scale:!1,category:"animals_and_nature"},dragon:{keywords:["animal","myth","nature","chinese","green"],"char":"\ud83d\udc09",fitzpatrick_scale:!1,category:"animals_and_nature"},dragon_face:{keywords:["animal","myth","nature","chinese","green"],"char":"\ud83d\udc32",fitzpatrick_scale:!1,category:"animals_and_nature"},cactus:{keywords:["vegetable","plant","nature"],"char":"\ud83c\udf35",fitzpatrick_scale:!1,category:"animals_and_nature"},christmas_tree:{keywords:["festival","vacation","december","xmas","celebration"],"char":"\ud83c\udf84",fitzpatrick_scale:!1,category:"animals_and_nature"},evergreen_tree:{keywords:["plant","nature"],"char":"\ud83c\udf32",fitzpatrick_scale:!1,category:"animals_and_nature"},deciduous_tree:{keywords:["plant","nature"],"char":"\ud83c\udf33",fitzpatrick_scale:!1,category:"animals_and_nature"},palm_tree:{keywords:["plant","vegetable","nature","summer","beach","mojito","tropical"],"char":"\ud83c\udf34",fitzpatrick_scale:!1,category:"animals_and_nature"},seedling:{keywords:["plant","nature","grass","lawn","spring"],"char":"\ud83c\udf31",fitzpatrick_scale:!1,category:"animals_and_nature"},herb:{keywords:["vegetable","plant","medicine","weed","grass","lawn"],"char":"\ud83c\udf3f",fitzpatrick_scale:!1,category:"animals_and_nature"},shamrock:{keywords:["vegetable","plant","nature","irish","clover"],"char":"\u2618",fitzpatrick_scale:!1,category:"animals_and_nature"},four_leaf_clover:{keywords:["vegetable","plant","nature","lucky","irish"],"char":"\ud83c\udf40",fitzpatrick_scale:!1,category:"animals_and_nature"},bamboo:{keywords:["plant","nature","vegetable","panda","pine_decoration"],"char":"\ud83c\udf8d",fitzpatrick_scale:!1,category:"animals_and_nature"},tanabata_tree:{keywords:["plant","nature","branch","summer"],"char":"\ud83c\udf8b",fitzpatrick_scale:!1,category:"animals_and_nature"},leaves:{keywords:["nature","plant","tree","vegetable","grass","lawn","spring"],"char":"\ud83c\udf43",fitzpatrick_scale:!1,category:"animals_and_nature"},fallen_leaf:{keywords:["nature","plant","vegetable","leaves"],"char":"\ud83c\udf42",fitzpatrick_scale:!1,category:"animals_and_nature"},maple_leaf:{keywords:["nature","plant","vegetable","ca","fall"],"char":"\ud83c\udf41",fitzpatrick_scale:!1,category:"animals_and_nature"},ear_of_rice:{keywords:["nature","plant"],"char":"\ud83c\udf3e",fitzpatrick_scale:!1,category:"animals_and_nature"},hibiscus:{keywords:["plant","vegetable","flowers","beach"],"char":"\ud83c\udf3a",fitzpatrick_scale:!1,category:"animals_and_nature"},sunflower:{keywords:["nature","plant","fall"],"char":"\ud83c\udf3b",fitzpatrick_scale:!1,category:"animals_and_nature"},rose:{keywords:["flowers","valentines","love","spring"],"char":"\ud83c\udf39",fitzpatrick_scale:!1,category:"animals_and_nature"},wilted_flower:{keywords:["plant","nature","flower"],"char":"\ud83e\udd40",fitzpatrick_scale:!1,category:"animals_and_nature"},tulip:{keywords:["flowers","plant","nature","summer","spring"],"char":"\ud83c\udf37",fitzpatrick_scale:!1,category:"animals_and_nature"},blossom:{keywords:["nature","flowers","yellow"],"char":"\ud83c\udf3c",fitzpatrick_scale:!1,category:"animals_and_nature"},cherry_blossom:{keywords:["nature","plant","spring","flower"],"char":"\ud83c\udf38",fitzpatrick_scale:!1,category:"animals_and_nature"},bouquet:{keywords:["flowers","nature","spring"],"char":"\ud83d\udc90",fitzpatrick_scale:!1,category:"animals_and_nature"},mushroom:{keywords:["plant","vegetable"],"char":"\ud83c\udf44",fitzpatrick_scale:!1,category:"animals_and_nature"},chestnut:{keywords:["food","squirrel"],"char":"\ud83c\udf30",fitzpatrick_scale:!1,category:"animals_and_nature"},jack_o_lantern:{keywords:["halloween","light","pumpkin","creepy","fall"],"char":"\ud83c\udf83",fitzpatrick_scale:!1,category:"animals_and_nature"},shell:{keywords:["nature","sea","beach"],"char":"\ud83d\udc1a",fitzpatrick_scale:!1,category:"animals_and_nature"},spider_web:{keywords:["animal","insect","arachnid","silk"],"char":"\ud83d\udd78",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_americas:{keywords:["globe","world","USA","international"],"char":"\ud83c\udf0e",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_africa:{keywords:["globe","world","international"],"char":"\ud83c\udf0d",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_asia:{keywords:["globe","world","east","international"],"char":"\ud83c\udf0f",fitzpatrick_scale:!1,category:"animals_and_nature"},full_moon:{keywords:["nature","yellow","twilight","planet","space","night","evening","sleep"],"char":"\ud83c\udf15",fitzpatrick_scale:!1,category:"animals_and_nature"},waning_gibbous_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep","waxing_gibbous_moon"],"char":"\ud83c\udf16",fitzpatrick_scale:!1,category:"animals_and_nature"},last_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"\ud83c\udf17",fitzpatrick_scale:!1,category:"animals_and_nature"},waning_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"\ud83c\udf18",fitzpatrick_scale:!1,category:"animals_and_nature"},new_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"\ud83c\udf11",fitzpatrick_scale:!1,category:"animals_and_nature"},waxing_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"\ud83c\udf12",fitzpatrick_scale:!1,category:"animals_and_nature"},first_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"\ud83c\udf13",fitzpatrick_scale:!1,category:"animals_and_nature"},waxing_gibbous_moon:{keywords:["nature","night","sky","gray","twilight","planet","space","evening","sleep"],"char":"\ud83c\udf14",fitzpatrick_scale:!1,category:"animals_and_nature"},new_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"\ud83c\udf1a",fitzpatrick_scale:!1,category:"animals_and_nature"},full_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"\ud83c\udf1d",fitzpatrick_scale:!1,category:"animals_and_nature"},first_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"\ud83c\udf1b",fitzpatrick_scale:!1,category:"animals_and_nature"},last_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"\ud83c\udf1c",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_with_face:{keywords:["nature","morning","sky"],"char":"\ud83c\udf1e",fitzpatrick_scale:!1,category:"animals_and_nature"},crescent_moon:{keywords:["night","sleep","sky","evening","magic"],"char":"\ud83c\udf19",fitzpatrick_scale:!1,category:"animals_and_nature"},star:{keywords:["night","yellow"],"char":"\u2b50",fitzpatrick_scale:!1,category:"animals_and_nature"},star2:{keywords:["night","sparkle","awesome","good","magic"],"char":"\ud83c\udf1f",fitzpatrick_scale:!1,category:"animals_and_nature"},dizzy:{keywords:["star","sparkle","shoot","magic"],"char":"\ud83d\udcab",fitzpatrick_scale:!1,category:"animals_and_nature"},sparkles:{keywords:["stars","shine","shiny","cool","awesome","good","magic"],"char":"\u2728",fitzpatrick_scale:!1,category:"animals_and_nature"},comet:{keywords:["space"],"char":"\u2604",fitzpatrick_scale:!1,category:"animals_and_nature"},sunny:{keywords:["weather","nature","brightness","summer","beach","spring"],"char":"\u2600\ufe0f",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_small_cloud:{keywords:["weather"],"char":"\ud83c\udf24",fitzpatrick_scale:!1,category:"animals_and_nature"},partly_sunny:{keywords:["weather","nature","cloudy","morning","fall","spring"],"char":"\u26c5",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_large_cloud:{keywords:["weather"],"char":"\ud83c\udf25",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_rain_cloud:{keywords:["weather"],"char":"\ud83c\udf26",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud:{keywords:["weather","sky"],"char":"\u2601\ufe0f",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_rain:{keywords:["weather"],"char":"\ud83c\udf27",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_lightning_and_rain:{keywords:["weather","lightning"],"char":"\u26c8",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_lightning:{keywords:["weather","thunder"],"char":"\ud83c\udf29",fitzpatrick_scale:!1,category:"animals_and_nature"},zap:{keywords:["thunder","weather","lightning bolt","fast"],"char":"\u26a1",fitzpatrick_scale:!1,category:"animals_and_nature"},fire:{keywords:["hot","cook","flame"],"char":"\ud83d\udd25",fitzpatrick_scale:!1,category:"animals_and_nature"},boom:{keywords:["bomb","explode","explosion","collision","blown"],"char":"\ud83d\udca5",fitzpatrick_scale:!1,category:"animals_and_nature"},snowflake:{keywords:["winter","season","cold","weather","christmas","xmas"],"char":"\u2744\ufe0f",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_snow:{keywords:["weather"],"char":"\ud83c\udf28",fitzpatrick_scale:!1,category:"animals_and_nature"},snowman:{keywords:["winter","season","cold","weather","christmas","xmas","frozen","without_snow"],"char":"\u26c4",fitzpatrick_scale:!1,category:"animals_and_nature"},snowman_with_snow:{keywords:["winter","season","cold","weather","christmas","xmas","frozen"],"char":"\u2603",fitzpatrick_scale:!1,category:"animals_and_nature"},wind_face:{keywords:["gust","air"],"char":"\ud83c\udf2c",fitzpatrick_scale:!1,category:"animals_and_nature"},dash:{keywords:["wind","air","fast","shoo","fart","smoke","puff"],"char":"\ud83d\udca8",fitzpatrick_scale:!1,category:"animals_and_nature"},tornado:{keywords:["weather","cyclone","twister"],"char":"\ud83c\udf2a",fitzpatrick_scale:!1,category:"animals_and_nature"},fog:{keywords:["weather"],"char":"\ud83c\udf2b",fitzpatrick_scale:!1,category:"animals_and_nature"},open_umbrella:{keywords:["weather","spring"],"char":"\u2602",fitzpatrick_scale:!1,category:"animals_and_nature"},umbrella:{keywords:["rainy","weather","spring"],"char":"\u2614",fitzpatrick_scale:!1,category:"animals_and_nature"},droplet:{keywords:["water","drip","faucet","spring"],"char":"\ud83d\udca7",fitzpatrick_scale:!1,category:"animals_and_nature"},sweat_drops:{keywords:["water","drip","oops"],"char":"\ud83d\udca6",fitzpatrick_scale:!1,category:"animals_and_nature"},ocean:{keywords:["sea","water","wave","nature","tsunami","disaster"],"char":"\ud83c\udf0a",fitzpatrick_scale:!1,category:"animals_and_nature"},green_apple:{keywords:["fruit","nature"],"char":"\ud83c\udf4f",fitzpatrick_scale:!1,category:"food_and_drink"},apple:{keywords:["fruit","mac","school"],"char":"\ud83c\udf4e",fitzpatrick_scale:!1,category:"food_and_drink"},pear:{keywords:["fruit","nature","food"],"char":"\ud83c\udf50",fitzpatrick_scale:!1,category:"food_and_drink"},tangerine:{keywords:["food","fruit","nature","orange"],"char":"\ud83c\udf4a",fitzpatrick_scale:!1,category:"food_and_drink"},lemon:{keywords:["fruit","nature"],"char":"\ud83c\udf4b",fitzpatrick_scale:!1,category:"food_and_drink"},banana:{keywords:["fruit","food","monkey"],"char":"\ud83c\udf4c",fitzpatrick_scale:!1,category:"food_and_drink"},watermelon:{keywords:["fruit","food","picnic","summer"],"char":"\ud83c\udf49",fitzpatrick_scale:!1,category:"food_and_drink"},grapes:{keywords:["fruit","food","wine"],"char":"\ud83c\udf47",fitzpatrick_scale:!1,category:"food_and_drink"},strawberry:{keywords:["fruit","food","nature"],"char":"\ud83c\udf53",fitzpatrick_scale:!1,category:"food_and_drink"},melon:{keywords:["fruit","nature","food"],"char":"\ud83c\udf48",fitzpatrick_scale:!1,category:"food_and_drink"},cherries:{keywords:["food","fruit"],"char":"\ud83c\udf52",fitzpatrick_scale:!1,category:"food_and_drink"},peach:{keywords:["fruit","nature","food"],"char":"\ud83c\udf51",fitzpatrick_scale:!1,category:"food_and_drink"},pineapple:{keywords:["fruit","nature","food"],"char":"\ud83c\udf4d",fitzpatrick_scale:!1,category:"food_and_drink"},coconut:{keywords:["fruit","nature","food","palm"],"char":"\ud83e\udd65",fitzpatrick_scale:!1,category:"food_and_drink"},kiwi_fruit:{keywords:["fruit","food"],"char":"\ud83e\udd5d",fitzpatrick_scale:!1,category:"food_and_drink"},avocado:{keywords:["fruit","food"],"char":"\ud83e\udd51",fitzpatrick_scale:!1,category:"food_and_drink"},broccoli:{keywords:["fruit","food","vegetable"],"char":"\ud83e\udd66",fitzpatrick_scale:!1,category:"food_and_drink"},tomato:{keywords:["fruit","vegetable","nature","food"],"char":"\ud83c\udf45",fitzpatrick_scale:!1,category:"food_and_drink"},eggplant:{keywords:["vegetable","nature","food","aubergine"],"char":"\ud83c\udf46",fitzpatrick_scale:!1,category:"food_and_drink"},cucumber:{keywords:["fruit","food","pickle"],"char":"\ud83e\udd52",fitzpatrick_scale:!1,category:"food_and_drink"},carrot:{keywords:["vegetable","food","orange"],"char":"\ud83e\udd55",fitzpatrick_scale:!1,category:"food_and_drink"},hot_pepper:{keywords:["food","spicy","chilli","chili"],"char":"\ud83c\udf36",fitzpatrick_scale:!1,category:"food_and_drink"},potato:{keywords:["food","tuber","vegatable","starch"],"char":"\ud83e\udd54",fitzpatrick_scale:!1,category:"food_and_drink"},corn:{keywords:["food","vegetable","plant"],"char":"\ud83c\udf3d",fitzpatrick_scale:!1,category:"food_and_drink"},sweet_potato:{keywords:["food","nature"],"char":"\ud83c\udf60",fitzpatrick_scale:!1,category:"food_and_drink"},peanuts:{keywords:["food","nut"],"char":"\ud83e\udd5c",fitzpatrick_scale:!1,category:"food_and_drink"},honey_pot:{keywords:["bees","sweet","kitchen"],"char":"\ud83c\udf6f",fitzpatrick_scale:!1,category:"food_and_drink"},croissant:{keywords:["food","bread","french"],"char":"\ud83e\udd50",fitzpatrick_scale:!1,category:"food_and_drink"},bread:{keywords:["food","wheat","breakfast","toast"],"char":"\ud83c\udf5e",fitzpatrick_scale:!1,category:"food_and_drink"},baguette_bread:{keywords:["food","bread","french"],"char":"\ud83e\udd56",fitzpatrick_scale:!1,category:"food_and_drink"},pretzel:{keywords:["food","bread","twisted"],"char":"\ud83e\udd68",fitzpatrick_scale:!1,category:"food_and_drink"},cheese:{keywords:["food","chadder"],"char":"\ud83e\uddc0",fitzpatrick_scale:!1,category:"food_and_drink"},egg:{keywords:["food","chicken","breakfast"],"char":"\ud83e\udd5a",fitzpatrick_scale:!1,category:"food_and_drink"},bacon:{keywords:["food","breakfast","pork","pig","meat"],"char":"\ud83e\udd53",fitzpatrick_scale:!1,category:"food_and_drink"},steak:{keywords:["food","cow","meat","cut","chop","lambchop","porkchop"],"char":"\ud83e\udd69",fitzpatrick_scale:!1,category:"food_and_drink"},pancakes:{keywords:["food","breakfast","flapjacks","hotcakes"],"char":"\ud83e\udd5e",fitzpatrick_scale:!1,category:"food_and_drink"},poultry_leg:{keywords:["food","meat","drumstick","bird","chicken","turkey"],"char":"\ud83c\udf57",fitzpatrick_scale:!1,category:"food_and_drink"},meat_on_bone:{keywords:["good","food","drumstick"],"char":"\ud83c\udf56",fitzpatrick_scale:!1,category:"food_and_drink"},fried_shrimp:{keywords:["food","animal","appetizer","summer"],"char":"\ud83c\udf64",fitzpatrick_scale:!1,category:"food_and_drink"},fried_egg:{keywords:["food","breakfast","kitchen","egg"],"char":"\ud83c\udf73",fitzpatrick_scale:!1,category:"food_and_drink"},hamburger:{keywords:["meat","fast food","beef","cheeseburger","mcdonalds","burger king"],"char":"\ud83c\udf54",fitzpatrick_scale:!1,category:"food_and_drink"},fries:{keywords:["chips","snack","fast food"],"char":"\ud83c\udf5f",fitzpatrick_scale:!1,category:"food_and_drink"},stuffed_flatbread:{keywords:["food","flatbread","stuffed","gyro"],"char":"\ud83e\udd59",fitzpatrick_scale:!1,category:"food_and_drink"},hotdog:{keywords:["food","frankfurter"],"char":"\ud83c\udf2d",fitzpatrick_scale:!1,category:"food_and_drink"},pizza:{keywords:["food","party"],"char":"\ud83c\udf55",fitzpatrick_scale:!1,category:"food_and_drink"},sandwich:{keywords:["food","lunch","bread"],"char":"\ud83e\udd6a",fitzpatrick_scale:!1,category:"food_and_drink"},canned_food:{keywords:["food","soup"],"char":"\ud83e\udd6b",fitzpatrick_scale:!1,category:"food_and_drink"},spaghetti:{keywords:["food","italian","noodle"],"char":"\ud83c\udf5d",fitzpatrick_scale:!1,category:"food_and_drink"},taco:{keywords:["food","mexican"],"char":"\ud83c\udf2e",fitzpatrick_scale:!1,category:"food_and_drink"},burrito:{keywords:["food","mexican"],"char":"\ud83c\udf2f",fitzpatrick_scale:!1,category:"food_and_drink"},green_salad:{keywords:["food","healthy","lettuce"],"char":"\ud83e\udd57",fitzpatrick_scale:!1,category:"food_and_drink"},shallow_pan_of_food:{keywords:["food","cooking","casserole","paella"],"char":"\ud83e\udd58",fitzpatrick_scale:!1,category:"food_and_drink"},ramen:{keywords:["food","japanese","noodle","chopsticks"],"char":"\ud83c\udf5c",fitzpatrick_scale:!1,category:"food_and_drink"},stew:{keywords:["food","meat","soup"],"char":"\ud83c\udf72",fitzpatrick_scale:!1,category:"food_and_drink"},fish_cake:{keywords:["food","japan","sea","beach","narutomaki","pink","swirl","kamaboko","surimi","ramen"],"char":"\ud83c\udf65",fitzpatrick_scale:!1,category:"food_and_drink"},fortune_cookie:{keywords:["food","prophecy"],"char":"\ud83e\udd60",fitzpatrick_scale:!1,category:"food_and_drink"},sushi:{keywords:["food","fish","japanese","rice"],"char":"\ud83c\udf63",fitzpatrick_scale:!1,category:"food_and_drink"},bento:{keywords:["food","japanese","box"],"char":"\ud83c\udf71",fitzpatrick_scale:!1,category:"food_and_drink"},curry:{keywords:["food","spicy","hot","indian"],"char":"\ud83c\udf5b",fitzpatrick_scale:!1,category:"food_and_drink"},rice_ball:{keywords:["food","japanese"],"char":"\ud83c\udf59",fitzpatrick_scale:!1,category:"food_and_drink"},rice:{keywords:["food","china","asian"],"char":"\ud83c\udf5a",fitzpatrick_scale:!1,category:"food_and_drink"},rice_cracker:{keywords:["food","japanese"],"char":"\ud83c\udf58",fitzpatrick_scale:!1,category:"food_and_drink"},oden:{keywords:["food","japanese"],"char":"\ud83c\udf62",fitzpatrick_scale:!1,category:"food_and_drink"},dango:{keywords:["food","dessert","sweet","japanese","barbecue","meat"],"char":"\ud83c\udf61",fitzpatrick_scale:!1,category:"food_and_drink"},shaved_ice:{keywords:["hot","dessert","summer"],"char":"\ud83c\udf67",fitzpatrick_scale:!1,category:"food_and_drink"},ice_cream:{keywords:["food","hot","dessert"],"char":"\ud83c\udf68",fitzpatrick_scale:!1,category:"food_and_drink"},icecream:{keywords:["food","hot","dessert","summer"],"char":"\ud83c\udf66",fitzpatrick_scale:!1,category:"food_and_drink"},pie:{keywords:["food","dessert","pastry"],"char":"\ud83e\udd67",fitzpatrick_scale:!1,category:"food_and_drink"},cake:{keywords:["food","dessert"],"char":"\ud83c\udf70",fitzpatrick_scale:!1,category:"food_and_drink"},birthday:{keywords:["food","dessert","cake"],"char":"\ud83c\udf82",fitzpatrick_scale:!1,category:"food_and_drink"},custard:{keywords:["dessert","food"],"char":"\ud83c\udf6e",fitzpatrick_scale:!1,category:"food_and_drink"},candy:{keywords:["snack","dessert","sweet","lolly"],"char":"\ud83c\udf6c",fitzpatrick_scale:!1,category:"food_and_drink"},lollipop:{keywords:["food","snack","candy","sweet"],"char":"\ud83c\udf6d",fitzpatrick_scale:!1,category:"food_and_drink"},chocolate_bar:{keywords:["food","snack","dessert","sweet"],"char":"\ud83c\udf6b",fitzpatrick_scale:!1,category:"food_and_drink"},popcorn:{keywords:["food","movie theater","films","snack"],"char":"\ud83c\udf7f",fitzpatrick_scale:!1,category:"food_and_drink"},dumpling:{keywords:["food","empanada","pierogi","potsticker"],"char":"\ud83e\udd5f",fitzpatrick_scale:!1,category:"food_and_drink"},doughnut:{keywords:["food","dessert","snack","sweet","donut"],"char":"\ud83c\udf69",fitzpatrick_scale:!1,category:"food_and_drink"},cookie:{keywords:["food","snack","oreo","chocolate","sweet","dessert"],"char":"\ud83c\udf6a",fitzpatrick_scale:!1,category:"food_and_drink"},milk_glass:{keywords:["beverage","drink","cow"],"char":"\ud83e\udd5b",fitzpatrick_scale:!1,category:"food_and_drink"},beer:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],"char":"\ud83c\udf7a",fitzpatrick_scale:!1,category:"food_and_drink"},beers:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],"char":"\ud83c\udf7b",fitzpatrick_scale:!1,category:"food_and_drink"},clinking_glasses:{keywords:["beverage","drink","party","alcohol","celebrate","cheers","wine","champagne","toast"],"char":"\ud83e\udd42",fitzpatrick_scale:!1,category:"food_and_drink"},wine_glass:{keywords:["drink","beverage","drunk","alcohol","booze"],"char":"\ud83c\udf77",fitzpatrick_scale:!1,category:"food_and_drink"},tumbler_glass:{keywords:["drink","beverage","drunk","alcohol","liquor","booze","bourbon","scotch","whisky","glass","shot"],"char":"\ud83e\udd43",fitzpatrick_scale:!1,category:"food_and_drink"},cocktail:{keywords:["drink","drunk","alcohol","beverage","booze","mojito"],"char":"\ud83c\udf78",fitzpatrick_scale:!1,category:"food_and_drink"},tropical_drink:{keywords:["beverage","cocktail","summer","beach","alcohol","booze","mojito"],"char":"\ud83c\udf79",fitzpatrick_scale:!1,category:"food_and_drink"},champagne:{keywords:["drink","wine","bottle","celebration"],"char":"\ud83c\udf7e",fitzpatrick_scale:!1,category:"food_and_drink"},sake:{keywords:["wine","drink","drunk","beverage","japanese","alcohol","booze"],"char":"\ud83c\udf76",fitzpatrick_scale:!1,category:"food_and_drink"},tea:{keywords:["drink","bowl","breakfast","green","british"],"char":"\ud83c\udf75",fitzpatrick_scale:!1,category:"food_and_drink"},cup_with_straw:{keywords:["drink","soda"],"char":"\ud83e\udd64",fitzpatrick_scale:!1,category:"food_and_drink"},coffee:{keywords:["beverage","caffeine","latte","espresso"],"char":"\u2615",fitzpatrick_scale:!1,category:"food_and_drink"},baby_bottle:{keywords:["food","container","milk"],"char":"\ud83c\udf7c",fitzpatrick_scale:!1,category:"food_and_drink"},spoon:{keywords:["cutlery","kitchen","tableware"],"char":"\ud83e\udd44",fitzpatrick_scale:!1,category:"food_and_drink"},fork_and_knife:{keywords:["cutlery","kitchen"],"char":"\ud83c\udf74",fitzpatrick_scale:!1,category:"food_and_drink"},plate_with_cutlery:{keywords:["food","eat","meal","lunch","dinner","restaurant"],"char":"\ud83c\udf7d",fitzpatrick_scale:!1,category:"food_and_drink"},bowl_with_spoon:{keywords:["food","breakfast","cereal","oatmeal","porridge"],"char":"\ud83e\udd63",fitzpatrick_scale:!1,category:"food_and_drink"},takeout_box:{keywords:["food","leftovers"],"char":"\ud83e\udd61",fitzpatrick_scale:!1,category:"food_and_drink"},chopsticks:{keywords:["food"],"char":"\ud83e\udd62",fitzpatrick_scale:!1,category:"food_and_drink"},soccer:{keywords:["sports","football"],"char":"\u26bd",fitzpatrick_scale:!1,category:"activity"},basketball:{keywords:["sports","balls","NBA"],"char":"\ud83c\udfc0",fitzpatrick_scale:!1,category:"activity"},football:{keywords:["sports","balls","NFL"],"char":"\ud83c\udfc8",fitzpatrick_scale:!1,category:"activity"},baseball:{keywords:["sports","balls"],"char":"\u26be",fitzpatrick_scale:!1,category:"activity"},tennis:{keywords:["sports","balls","green"],"char":"\ud83c\udfbe",fitzpatrick_scale:!1,category:"activity"},volleyball:{keywords:["sports","balls"],"char":"\ud83c\udfd0",fitzpatrick_scale:!1,category:"activity"},rugby_football:{keywords:["sports","team"],"char":"\ud83c\udfc9",fitzpatrick_scale:!1,category:"activity"},"8ball":{keywords:["pool","hobby","game","luck","magic"],"char":"\ud83c\udfb1",fitzpatrick_scale:!1,category:"activity"},golf:{keywords:["sports","business","flag","hole","summer"],"char":"\u26f3",fitzpatrick_scale:!1,category:"activity"},golfing_woman:{keywords:["sports","business","woman","female"],"char":"\ud83c\udfcc\ufe0f\u200d\u2640\ufe0f",fitzpatrick_scale:!1,category:"activity"},golfing_man:{keywords:["sports","business"],"char":"\ud83c\udfcc",fitzpatrick_scale:!0,category:"activity"},ping_pong:{keywords:["sports","pingpong"],"char":"\ud83c\udfd3",fitzpatrick_scale:!1,category:"activity"},badminton:{keywords:["sports"],"char":"\ud83c\udff8",fitzpatrick_scale:!1,category:"activity"},goal_net:{keywords:["sports"],"char":"\ud83e\udd45",fitzpatrick_scale:!1,category:"activity"},ice_hockey:{keywords:["sports"],"char":"\ud83c\udfd2",fitzpatrick_scale:!1,category:"activity"},field_hockey:{keywords:["sports"],"char":"\ud83c\udfd1",fitzpatrick_scale:!1,category:"activity"},cricket:{keywords:["sports"],"char":"\ud83c\udfcf",fitzpatrick_scale:!1,category:"activity"},ski:{keywords:["sports","winter","cold","snow"],"char":"\ud83c\udfbf",fitzpatrick_scale:!1,category:"activity"},skier:{keywords:["sports","winter","snow"],"char":"\u26f7",fitzpatrick_scale:!1,category:"activity"},snowboarder:{keywords:["sports","winter"],"char":"\ud83c\udfc2",fitzpatrick_scale:!0,category:"activity"},person_fencing:{keywords:["sports","fencing","sword"],"char":"\ud83e\udd3a",fitzpatrick_scale:!1,category:"activity"},women_wrestling:{keywords:["sports","wrestlers"],"char":"\ud83e\udd3c\u200d\u2640\ufe0f",fitzpatrick_scale:!1,category:"activity"},men_wrestling:{keywords:["sports","wrestlers"],"char":"\ud83e\udd3c\u200d\u2642\ufe0f",fitzpatrick_scale:!1,category:"activity"},woman_cartwheeling:{keywords:["gymnastics"],"char":"\ud83e\udd38\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},man_cartwheeling:{keywords:["gymnastics"],"char":"\ud83e\udd38\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"activity"},woman_playing_handball:{keywords:["sports"],"char":"\ud83e\udd3e\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},man_playing_handball:{keywords:["sports"],"char":"\ud83e\udd3e\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"activity"},ice_skate:{keywords:["sports"],"char":"\u26f8",fitzpatrick_scale:!1,category:"activity"},curling_stone:{keywords:["sports"],"char":"\ud83e\udd4c",fitzpatrick_scale:!1,category:"activity"},sled:{keywords:["sleigh","luge","toboggan"],"char":"\ud83d\udef7",fitzpatrick_scale:!1,category:"activity"},bow_and_arrow:{keywords:["sports"],"char":"\ud83c\udff9",fitzpatrick_scale:!1,category:"activity"},fishing_pole_and_fish:{keywords:["food","hobby","summer"],"char":"\ud83c\udfa3",fitzpatrick_scale:!1,category:"activity"},boxing_glove:{keywords:["sports","fighting"],"char":"\ud83e\udd4a",fitzpatrick_scale:!1,category:"activity"},martial_arts_uniform:{keywords:["judo","karate","taekwondo"],"char":"\ud83e\udd4b",fitzpatrick_scale:!1,category:"activity"},rowing_woman:{keywords:["sports","hobby","water","ship","woman","female"],"char":"\ud83d\udea3\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},rowing_man:{keywords:["sports","hobby","water","ship"],"char":"\ud83d\udea3",fitzpatrick_scale:!0,category:"activity"},climbing_woman:{keywords:["sports","hobby","woman","female","rock"],"char":"\ud83e\uddd7\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},climbing_man:{keywords:["sports","hobby","man","male","rock"],"char":"\ud83e\uddd7\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"activity"},swimming_woman:{keywords:["sports","exercise","human","athlete","water","summer","woman","female"],"char":"\ud83c\udfca\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},swimming_man:{keywords:["sports","exercise","human","athlete","water","summer"],"char":"\ud83c\udfca",fitzpatrick_scale:!0,category:"activity"},woman_playing_water_polo:{keywords:["sports","pool"],"char":"\ud83e\udd3d\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},man_playing_water_polo:{keywords:["sports","pool"],"char":"\ud83e\udd3d\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"activity"},woman_in_lotus_position:{keywords:["woman","female","meditation","yoga","serenity","zen","mindfulness"],"char":"\ud83e\uddd8\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},man_in_lotus_position:{keywords:["man","male","meditation","yoga","serenity","zen","mindfulness"],"char":"\ud83e\uddd8\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"activity"},surfing_woman:{keywords:["sports","ocean","sea","summer","beach","woman","female"],"char":"\ud83c\udfc4\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},surfing_man:{keywords:["sports","ocean","sea","summer","beach"],"char":"\ud83c\udfc4",fitzpatrick_scale:!0,category:"activity"},bath:{keywords:["clean","shower","bathroom"],"char":"\ud83d\udec0",fitzpatrick_scale:!0,category:"activity"},basketball_woman:{keywords:["sports","human","woman","female"],"char":"\u26f9\ufe0f\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},basketball_man:{keywords:["sports","human"],"char":"\u26f9",fitzpatrick_scale:!0,category:"activity"},weight_lifting_woman:{keywords:["sports","training","exercise","woman","female"],"char":"\ud83c\udfcb\ufe0f\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},weight_lifting_man:{keywords:["sports","training","exercise"],"char":"\ud83c\udfcb",fitzpatrick_scale:!0,category:"activity"},biking_woman:{keywords:["sports","bike","exercise","hipster","woman","female"],"char":"\ud83d\udeb4\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},biking_man:{keywords:["sports","bike","exercise","hipster"],"char":"\ud83d\udeb4",fitzpatrick_scale:!0,category:"activity"},mountain_biking_woman:{keywords:["transportation","sports","human","race","bike","woman","female"],"char":"\ud83d\udeb5\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},mountain_biking_man:{keywords:["transportation","sports","human","race","bike"],"char":"\ud83d\udeb5",fitzpatrick_scale:!0,category:"activity"},horse_racing:{keywords:["animal","betting","competition","gambling","luck"],"char":"\ud83c\udfc7",fitzpatrick_scale:!0,category:"activity"},business_suit_levitating:{keywords:["suit","business","levitate","hover","jump"],"char":"\ud83d\udd74",fitzpatrick_scale:!0,category:"activity"},trophy:{keywords:["win","award","contest","place","ftw","ceremony"],"char":"\ud83c\udfc6",fitzpatrick_scale:!1,category:"activity"},running_shirt_with_sash:{keywords:["play","pageant"],"char":"\ud83c\udfbd",fitzpatrick_scale:!1,category:"activity"},medal_sports:{keywords:["award","winning"],"char":"\ud83c\udfc5",fitzpatrick_scale:!1,category:"activity"},medal_military:{keywords:["award","winning","army"],"char":"\ud83c\udf96",fitzpatrick_scale:!1,category:"activity"},"1st_place_medal":{keywords:["award","winning","first"],"char":"\ud83e\udd47",fitzpatrick_scale:!1,category:"activity"},"2nd_place_medal":{keywords:["award","second"],"char":"\ud83e\udd48",fitzpatrick_scale:!1,category:"activity"},"3rd_place_medal":{keywords:["award","third"],"char":"\ud83e\udd49",fitzpatrick_scale:!1,category:"activity"},reminder_ribbon:{keywords:["sports","cause","support","awareness"],"char":"\ud83c\udf97",fitzpatrick_scale:!1,category:"activity"},rosette:{keywords:["flower","decoration","military"],"char":"\ud83c\udff5",fitzpatrick_scale:!1,category:"activity"},ticket:{keywords:["event","concert","pass"],"char":"\ud83c\udfab",fitzpatrick_scale:!1,category:"activity"},tickets:{keywords:["sports","concert","entrance"],"char":"\ud83c\udf9f",fitzpatrick_scale:!1,category:"activity"},performing_arts:{keywords:["acting","theater","drama"],"char":"\ud83c\udfad",fitzpatrick_scale:!1,category:"activity"},art:{keywords:["design","paint","draw","colors"],"char":"\ud83c\udfa8",fitzpatrick_scale:!1,category:"activity"},circus_tent:{keywords:["festival","carnival","party"],"char":"\ud83c\udfaa",fitzpatrick_scale:!1,category:"activity"},woman_juggling:{keywords:["juggle","balance","skill","multitask"],"char":"\ud83e\udd39\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},man_juggling:{keywords:["juggle","balance","skill","multitask"],"char":"\ud83e\udd39\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"activity"},microphone:{keywords:["sound","music","PA","sing","talkshow"],"char":"\ud83c\udfa4",fitzpatrick_scale:!1,category:"activity"},headphones:{keywords:["music","score","gadgets"],"char":"\ud83c\udfa7",fitzpatrick_scale:!1,category:"activity"},musical_score:{keywords:["treble","clef","compose"],"char":"\ud83c\udfbc",fitzpatrick_scale:!1,category:"activity"},musical_keyboard:{keywords:["piano","instrument","compose"],"char":"\ud83c\udfb9",fitzpatrick_scale:!1,category:"activity"},drum:{keywords:["music","instrument","drumsticks","snare"],"char":"\ud83e\udd41",fitzpatrick_scale:!1,category:"activity"},saxophone:{keywords:["music","instrument","jazz","blues"],"char":"\ud83c\udfb7",fitzpatrick_scale:!1,category:"activity"},trumpet:{keywords:["music","brass"],"char":"\ud83c\udfba",fitzpatrick_scale:!1,category:"activity"},guitar:{keywords:["music","instrument"],"char":"\ud83c\udfb8",fitzpatrick_scale:!1,category:"activity"},violin:{keywords:["music","instrument","orchestra","symphony"],"char":"\ud83c\udfbb",fitzpatrick_scale:!1,category:"activity"},clapper:{keywords:["movie","film","record"],"char":"\ud83c\udfac",fitzpatrick_scale:!1,category:"activity"},video_game:{keywords:["play","console","PS4","controller"],"char":"\ud83c\udfae",fitzpatrick_scale:!1,category:"activity"},space_invader:{keywords:["game","arcade","play"],"char":"\ud83d\udc7e",fitzpatrick_scale:!1,category:"activity"},dart:{keywords:["game","play","bar","target","bullseye"],"char":"\ud83c\udfaf",fitzpatrick_scale:!1,category:"activity"},game_die:{keywords:["dice","random","tabletop","play","luck"],"char":"\ud83c\udfb2",fitzpatrick_scale:!1,category:"activity"},slot_machine:{keywords:["bet","gamble","vegas","fruit machine","luck","casino"],"char":"\ud83c\udfb0",fitzpatrick_scale:!1,category:"activity"},bowling:{keywords:["sports","fun","play"],"char":"\ud83c\udfb3",fitzpatrick_scale:!1,category:"activity"},red_car:{keywords:["red","transportation","vehicle"],"char":"\ud83d\ude97",fitzpatrick_scale:!1,category:"travel_and_places"},taxi:{keywords:["uber","vehicle","cars","transportation"],"char":"\ud83d\ude95",fitzpatrick_scale:!1,category:"travel_and_places"},blue_car:{keywords:["transportation","vehicle"],"char":"\ud83d\ude99",fitzpatrick_scale:!1,category:"travel_and_places"},bus:{keywords:["car","vehicle","transportation"],"char":"\ud83d\ude8c",fitzpatrick_scale:!1,category:"travel_and_places"},trolleybus:{keywords:["bart","transportation","vehicle"],"char":"\ud83d\ude8e",fitzpatrick_scale:!1,category:"travel_and_places"},racing_car:{keywords:["sports","race","fast","formula","f1"],"char":"\ud83c\udfce",fitzpatrick_scale:!1,category:"travel_and_places"},police_car:{keywords:["vehicle","cars","transportation","law","legal","enforcement"],"char":"\ud83d\ude93",fitzpatrick_scale:!1,category:"travel_and_places"},ambulance:{keywords:["health","911","hospital"],"char":"\ud83d\ude91",fitzpatrick_scale:!1,category:"travel_and_places"},fire_engine:{keywords:["transportation","cars","vehicle"],"char":"\ud83d\ude92",fitzpatrick_scale:!1,category:"travel_and_places"},minibus:{keywords:["vehicle","car","transportation"],"char":"\ud83d\ude90",fitzpatrick_scale:!1,category:"travel_and_places"},truck:{keywords:["cars","transportation"],"char":"\ud83d\ude9a",fitzpatrick_scale:!1,category:"travel_and_places"},articulated_lorry:{keywords:["vehicle","cars","transportation","express"],"char":"\ud83d\ude9b",fitzpatrick_scale:!1,category:"travel_and_places"},tractor:{keywords:["vehicle","car","farming","agriculture"],"char":"\ud83d\ude9c",fitzpatrick_scale:!1,category:"travel_and_places"},kick_scooter:{keywords:["vehicle","kick","razor"],"char":"\ud83d\udef4",fitzpatrick_scale:!1,category:"travel_and_places"},motorcycle:{keywords:["race","sports","fast"],"char":"\ud83c\udfcd",fitzpatrick_scale:!1,category:"travel_and_places"},bike:{keywords:["sports","bicycle","exercise","hipster"],"char":"\ud83d\udeb2",fitzpatrick_scale:!1,category:"travel_and_places"},motor_scooter:{keywords:["vehicle","vespa","sasha"],"char":"\ud83d\udef5",fitzpatrick_scale:!1,category:"travel_and_places"},rotating_light:{keywords:["police","ambulance","911","emergency","alert","error","pinged","law","legal"],"char":"\ud83d\udea8",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_police_car:{keywords:["vehicle","law","legal","enforcement","911"],"char":"\ud83d\ude94",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_bus:{keywords:["vehicle","transportation"],"char":"\ud83d\ude8d",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_automobile:{keywords:["car","vehicle","transportation"],"char":"\ud83d\ude98",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_taxi:{keywords:["vehicle","cars","uber"],"char":"\ud83d\ude96",fitzpatrick_scale:!1,category:"travel_and_places"},aerial_tramway:{keywords:["transportation","vehicle","ski"],"char":"\ud83d\udea1",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_cableway:{keywords:["transportation","vehicle","ski"],"char":"\ud83d\udea0",fitzpatrick_scale:!1,category:"travel_and_places"},suspension_railway:{keywords:["vehicle","transportation"],"char":"\ud83d\ude9f",fitzpatrick_scale:!1,category:"travel_and_places"},railway_car:{keywords:["transportation","vehicle"],"char":"\ud83d\ude83",fitzpatrick_scale:!1,category:"travel_and_places"},train:{keywords:["transportation","vehicle","carriage","public","travel"],"char":"\ud83d\ude8b",fitzpatrick_scale:!1,category:"travel_and_places"},monorail:{keywords:["transportation","vehicle"],"char":"\ud83d\ude9d",fitzpatrick_scale:!1,category:"travel_and_places"},bullettrain_side:{keywords:["transportation","vehicle"],"char":"\ud83d\ude84",fitzpatrick_scale:!1,category:"travel_and_places"},bullettrain_front:{keywords:["transportation","vehicle","speed","fast","public","travel"],"char":"\ud83d\ude85",fitzpatrick_scale:!1,category:"travel_and_places"},light_rail:{keywords:["transportation","vehicle"],"char":"\ud83d\ude88",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_railway:{keywords:["transportation","vehicle"],"char":"\ud83d\ude9e",fitzpatrick_scale:!1,category:"travel_and_places"},steam_locomotive:{keywords:["transportation","vehicle","train"],"char":"\ud83d\ude82",fitzpatrick_scale:!1,category:"travel_and_places"},train2:{keywords:["transportation","vehicle"],"char":"\ud83d\ude86",fitzpatrick_scale:!1,category:"travel_and_places"},metro:{keywords:["transportation","blue-square","mrt","underground","tube"],"char":"\ud83d\ude87",fitzpatrick_scale:!1,category:"travel_and_places"},tram:{keywords:["transportation","vehicle"],"char":"\ud83d\ude8a",fitzpatrick_scale:!1,category:"travel_and_places"},station:{keywords:["transportation","vehicle","public"],"char":"\ud83d\ude89",fitzpatrick_scale:!1,category:"travel_and_places"},flying_saucer:{keywords:["transportation","vehicle","ufo"],"char":"\ud83d\udef8",fitzpatrick_scale:!1,category:"travel_and_places"},helicopter:{keywords:["transportation","vehicle","fly"],"char":"\ud83d\ude81",fitzpatrick_scale:!1,category:"travel_and_places"},small_airplane:{keywords:["flight","transportation","fly","vehicle"],"char":"\ud83d\udee9",fitzpatrick_scale:!1,category:"travel_and_places"},airplane:{keywords:["vehicle","transportation","flight","fly"],"char":"\u2708\ufe0f",fitzpatrick_scale:!1,category:"travel_and_places"},flight_departure:{keywords:["airport","flight","landing"],"char":"\ud83d\udeeb",fitzpatrick_scale:!1,category:"travel_and_places"},flight_arrival:{keywords:["airport","flight","boarding"],"char":"\ud83d\udeec",fitzpatrick_scale:!1,category:"travel_and_places"},sailboat:{keywords:["ship","summer","transportation","water","sailing"],"char":"\u26f5",fitzpatrick_scale:!1,category:"travel_and_places"},motor_boat:{keywords:["ship"],"char":"\ud83d\udee5",fitzpatrick_scale:!1,category:"travel_and_places"},speedboat:{keywords:["ship","transportation","vehicle","summer"],"char":"\ud83d\udea4",fitzpatrick_scale:!1,category:"travel_and_places"},ferry:{keywords:["boat","ship","yacht"],"char":"\u26f4",fitzpatrick_scale:!1,category:"travel_and_places"},passenger_ship:{keywords:["yacht","cruise","ferry"],"char":"\ud83d\udef3",fitzpatrick_scale:!1,category:"travel_and_places"},rocket:{keywords:["launch","ship","staffmode","NASA","outer space","outer_space","fly"],"char":"\ud83d\ude80",fitzpatrick_scale:!1,category:"travel_and_places"},artificial_satellite:{keywords:["communication","gps","orbit","spaceflight","NASA","ISS"],"char":"\ud83d\udef0",fitzpatrick_scale:!1,category:"travel_and_places"},seat:{keywords:["sit","airplane","transport","bus","flight","fly"],"char":"\ud83d\udcba",fitzpatrick_scale:!1,category:"travel_and_places"},canoe:{keywords:["boat","paddle","water","ship"],"char":"\ud83d\udef6",fitzpatrick_scale:!1,category:"travel_and_places"},anchor:{keywords:["ship","ferry","sea","boat"],"char":"\u2693",fitzpatrick_scale:!1,category:"travel_and_places"},construction:{keywords:["wip","progress","caution","warning"],"char":"\ud83d\udea7",fitzpatrick_scale:!1,category:"travel_and_places"},fuelpump:{keywords:["gas station","petroleum"],"char":"\u26fd",fitzpatrick_scale:!1,category:"travel_and_places"},busstop:{keywords:["transportation","wait"],"char":"\ud83d\ude8f",fitzpatrick_scale:!1,category:"travel_and_places"},vertical_traffic_light:{keywords:["transportation","driving"],"char":"\ud83d\udea6",fitzpatrick_scale:!1,category:"travel_and_places"},traffic_light:{keywords:["transportation","signal"],"char":"\ud83d\udea5",fitzpatrick_scale:!1,category:"travel_and_places"},checkered_flag:{keywords:["contest","finishline","race","gokart"],"char":"\ud83c\udfc1",fitzpatrick_scale:!1,category:"travel_and_places"},ship:{keywords:["transportation","titanic","deploy"],"char":"\ud83d\udea2",fitzpatrick_scale:!1,category:"travel_and_places"},ferris_wheel:{keywords:["photo","carnival","londoneye"],"char":"\ud83c\udfa1",fitzpatrick_scale:!1,category:"travel_and_places"},roller_coaster:{keywords:["carnival","playground","photo","fun"],"char":"\ud83c\udfa2",fitzpatrick_scale:!1,category:"travel_and_places"},carousel_horse:{keywords:["photo","carnival"],"char":"\ud83c\udfa0",fitzpatrick_scale:!1,category:"travel_and_places"},building_construction:{keywords:["wip","working","progress"],"char":"\ud83c\udfd7",fitzpatrick_scale:!1,category:"travel_and_places"},foggy:{keywords:["photo","mountain"],"char":"\ud83c\udf01",fitzpatrick_scale:!1,category:"travel_and_places"},tokyo_tower:{keywords:["photo","japanese"],"char":"\ud83d\uddfc",fitzpatrick_scale:!1,category:"travel_and_places"},factory:{keywords:["building","industry","pollution","smoke"],"char":"\ud83c\udfed",fitzpatrick_scale:!1,category:"travel_and_places"},fountain:{keywords:["photo","summer","water","fresh"],"char":"\u26f2",fitzpatrick_scale:!1,category:"travel_and_places"},rice_scene:{keywords:["photo","japan","asia","tsukimi"],"char":"\ud83c\udf91",fitzpatrick_scale:!1,category:"travel_and_places"},mountain:{keywords:["photo","nature","environment"],"char":"\u26f0",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_snow:{keywords:["photo","nature","environment","winter","cold"],"char":"\ud83c\udfd4",fitzpatrick_scale:!1,category:"travel_and_places"},mount_fuji:{keywords:["photo","mountain","nature","japanese"],"char":"\ud83d\uddfb",fitzpatrick_scale:!1,category:"travel_and_places"},volcano:{keywords:["photo","nature","disaster"],"char":"\ud83c\udf0b",fitzpatrick_scale:!1,category:"travel_and_places"},japan:{keywords:["nation","country","japanese","asia"],"char":"\ud83d\uddfe",fitzpatrick_scale:!1,category:"travel_and_places"},camping:{keywords:["photo","outdoors","tent"],"char":"\ud83c\udfd5",fitzpatrick_scale:!1,category:"travel_and_places"},tent:{keywords:["photo","camping","outdoors"],"char":"\u26fa",fitzpatrick_scale:!1,category:"travel_and_places"},national_park:{keywords:["photo","environment","nature"],"char":"\ud83c\udfde",fitzpatrick_scale:!1,category:"travel_and_places"},motorway:{keywords:["road","cupertino","interstate","highway"],"char":"\ud83d\udee3",fitzpatrick_scale:!1,category:"travel_and_places"},railway_track:{keywords:["train","transportation"],"char":"\ud83d\udee4",fitzpatrick_scale:!1,category:"travel_and_places"},sunrise:{keywords:["morning","view","vacation","photo"],"char":"\ud83c\udf05",fitzpatrick_scale:!1,category:"travel_and_places"},sunrise_over_mountains:{keywords:["view","vacation","photo"],"char":"\ud83c\udf04",fitzpatrick_scale:!1,category:"travel_and_places"},desert:{keywords:["photo","warm","saharah"],"char":"\ud83c\udfdc",fitzpatrick_scale:!1,category:"travel_and_places"},beach_umbrella:{keywords:["weather","summer","sunny","sand","mojito"],"char":"\ud83c\udfd6",fitzpatrick_scale:!1,category:"travel_and_places"},desert_island:{keywords:["photo","tropical","mojito"],"char":"\ud83c\udfdd",fitzpatrick_scale:!1,category:"travel_and_places"},city_sunrise:{keywords:["photo","good morning","dawn"],"char":"\ud83c\udf07",fitzpatrick_scale:!1,category:"travel_and_places"},city_sunset:{keywords:["photo","evening","sky","buildings"],"char":"\ud83c\udf06",fitzpatrick_scale:!1,category:"travel_and_places"},cityscape:{keywords:["photo","night life","urban"],"char":"\ud83c\udfd9",fitzpatrick_scale:!1,category:"travel_and_places"},night_with_stars:{keywords:["evening","city","downtown"],"char":"\ud83c\udf03",fitzpatrick_scale:!1,category:"travel_and_places"},bridge_at_night:{keywords:["photo","sanfrancisco"],"char":"\ud83c\udf09",fitzpatrick_scale:!1,category:"travel_and_places"},milky_way:{keywords:["photo","space","stars"],"char":"\ud83c\udf0c",fitzpatrick_scale:!1,category:"travel_and_places"},stars:{keywords:["night","photo"],"char":"\ud83c\udf20",fitzpatrick_scale:!1,category:"travel_and_places"},sparkler:{keywords:["stars","night","shine"],"char":"\ud83c\udf87",fitzpatrick_scale:!1,category:"travel_and_places"},fireworks:{keywords:["photo","festival","carnival","congratulations"],"char":"\ud83c\udf86",fitzpatrick_scale:!1,category:"travel_and_places"},rainbow:{keywords:["nature","happy","unicorn_face","photo","sky","spring"],"char":"\ud83c\udf08",fitzpatrick_scale:!1,category:"travel_and_places"},houses:{keywords:["buildings","photo"],"char":"\ud83c\udfd8",fitzpatrick_scale:!1,category:"travel_and_places"},european_castle:{keywords:["building","royalty","history"],"char":"\ud83c\udff0",fitzpatrick_scale:!1,category:"travel_and_places"},japanese_castle:{keywords:["photo","building"],"char":"\ud83c\udfef",fitzpatrick_scale:!1,category:"travel_and_places"},stadium:{keywords:["photo","place","sports","concert","venue"],"char":"\ud83c\udfdf",fitzpatrick_scale:!1,category:"travel_and_places"},statue_of_liberty:{keywords:["american","newyork"],"char":"\ud83d\uddfd",fitzpatrick_scale:!1,category:"travel_and_places"},house:{keywords:["building","home"],"char":"\ud83c\udfe0",fitzpatrick_scale:!1,category:"travel_and_places"},house_with_garden:{keywords:["home","plant","nature"],"char":"\ud83c\udfe1",fitzpatrick_scale:!1,category:"travel_and_places"},derelict_house:{keywords:["abandon","evict","broken","building"],"char":"\ud83c\udfda",fitzpatrick_scale:!1,category:"travel_and_places"},office:{keywords:["building","bureau","work"],"char":"\ud83c\udfe2",fitzpatrick_scale:!1,category:"travel_and_places"},department_store:{keywords:["building","shopping","mall"],"char":"\ud83c\udfec",fitzpatrick_scale:!1,category:"travel_and_places"},post_office:{keywords:["building","envelope","communication"],"char":"\ud83c\udfe3",fitzpatrick_scale:!1,category:"travel_and_places"},european_post_office:{keywords:["building","email"],"char":"\ud83c\udfe4",fitzpatrick_scale:!1,category:"travel_and_places"},hospital:{keywords:["building","health","surgery","doctor"],"char":"\ud83c\udfe5",fitzpatrick_scale:!1,category:"travel_and_places"},bank:{keywords:["building","money","sales","cash","business","enterprise"],"char":"\ud83c\udfe6",fitzpatrick_scale:!1,category:"travel_and_places"},hotel:{keywords:["building","accomodation","checkin"],"char":"\ud83c\udfe8",fitzpatrick_scale:!1,category:"travel_and_places"},convenience_store:{keywords:["building","shopping","groceries"],"char":"\ud83c\udfea",fitzpatrick_scale:!1,category:"travel_and_places"},school:{keywords:["building","student","education","learn","teach"],"char":"\ud83c\udfeb",fitzpatrick_scale:!1,category:"travel_and_places"},love_hotel:{keywords:["like","affection","dating"],"char":"\ud83c\udfe9",fitzpatrick_scale:!1,category:"travel_and_places"},wedding:{keywords:["love","like","affection","couple","marriage","bride","groom"],"char":"\ud83d\udc92",fitzpatrick_scale:!1,category:"travel_and_places"},classical_building:{keywords:["art","culture","history"],"char":"\ud83c\udfdb",fitzpatrick_scale:!1,category:"travel_and_places"},church:{keywords:["building","religion","christ"],"char":"\u26ea",fitzpatrick_scale:!1,category:"travel_and_places"},mosque:{keywords:["islam","worship","minaret"],"char":"\ud83d\udd4c",fitzpatrick_scale:!1,category:"travel_and_places"},synagogue:{keywords:["judaism","worship","temple","jewish"],"char":"\ud83d\udd4d",fitzpatrick_scale:!1,category:"travel_and_places"},kaaba:{keywords:["mecca","mosque","islam"],"char":"\ud83d\udd4b",fitzpatrick_scale:!1,category:"travel_and_places"},shinto_shrine:{keywords:["temple","japan","kyoto"],"char":"\u26e9",fitzpatrick_scale:!1,category:"travel_and_places"},watch:{keywords:["time","accessories"],"char":"\u231a",fitzpatrick_scale:!1,category:"objects"},iphone:{keywords:["technology","apple","gadgets","dial"],"char":"\ud83d\udcf1",fitzpatrick_scale:!1,category:"objects"},calling:{keywords:["iphone","incoming"],"char":"\ud83d\udcf2",fitzpatrick_scale:!1,category:"objects"},computer:{keywords:["technology","laptop","screen","display","monitor"],"char":"\ud83d\udcbb",fitzpatrick_scale:!1,category:"objects"},keyboard:{keywords:["technology","computer","type","input","text"],"char":"\u2328",fitzpatrick_scale:!1,category:"objects"},desktop_computer:{keywords:["technology","computing","screen"],"char":"\ud83d\udda5",fitzpatrick_scale:!1,category:"objects"},printer:{keywords:["paper","ink"],"char":"\ud83d\udda8",fitzpatrick_scale:!1,category:"objects"},computer_mouse:{keywords:["click"],"char":"\ud83d\uddb1",fitzpatrick_scale:!1,category:"objects"},trackball:{keywords:["technology","trackpad"],"char":"\ud83d\uddb2",fitzpatrick_scale:!1,category:"objects"},joystick:{keywords:["game","play"],"char":"\ud83d\udd79",fitzpatrick_scale:!1,category:"objects"},clamp:{keywords:["tool"],"char":"\ud83d\udddc",fitzpatrick_scale:!1,category:"objects"},minidisc:{keywords:["technology","record","data","disk","90s"],"char":"\ud83d\udcbd",fitzpatrick_scale:!1,category:"objects"},floppy_disk:{keywords:["oldschool","technology","save","90s","80s"],"char":"\ud83d\udcbe",fitzpatrick_scale:!1,category:"objects"},cd:{keywords:["technology","dvd","disk","disc","90s"],"char":"\ud83d\udcbf",fitzpatrick_scale:!1,category:"objects"},dvd:{keywords:["cd","disk","disc"],"char":"\ud83d\udcc0",fitzpatrick_scale:!1,category:"objects"},vhs:{keywords:["record","video","oldschool","90s","80s"],"char":"\ud83d\udcfc",fitzpatrick_scale:!1,category:"objects"},camera:{keywords:["gadgets","photography"],"char":"\ud83d\udcf7",fitzpatrick_scale:!1,category:"objects"},camera_flash:{keywords:["photography","gadgets"],"char":"\ud83d\udcf8",fitzpatrick_scale:!1,category:"objects"},video_camera:{keywords:["film","record"],"char":"\ud83d\udcf9",fitzpatrick_scale:!1,category:"objects"},movie_camera:{keywords:["film","record"],"char":"\ud83c\udfa5",fitzpatrick_scale:!1,category:"objects"},film_projector:{keywords:["video","tape","record","movie"],"char":"\ud83d\udcfd",fitzpatrick_scale:!1,category:"objects"},film_strip:{keywords:["movie"],"char":"\ud83c\udf9e",fitzpatrick_scale:!1,category:"objects"},telephone_receiver:{keywords:["technology","communication","dial"],"char":"\ud83d\udcde",fitzpatrick_scale:!1,category:"objects"},phone:{keywords:["technology","communication","dial","telephone"],"char":"\u260e\ufe0f",fitzpatrick_scale:!1,category:"objects"},pager:{keywords:["bbcall","oldschool","90s"],"char":"\ud83d\udcdf",fitzpatrick_scale:!1,category:"objects"},fax:{keywords:["communication","technology"],"char":"\ud83d\udce0",fitzpatrick_scale:!1,category:"objects"},tv:{keywords:["technology","program","oldschool","show","television"],"char":"\ud83d\udcfa",fitzpatrick_scale:!1,category:"objects"},radio:{keywords:["communication","music","podcast","program"],"char":"\ud83d\udcfb",fitzpatrick_scale:!1,category:"objects"},studio_microphone:{keywords:["sing","recording","artist","talkshow"],"char":"\ud83c\udf99",fitzpatrick_scale:!1,category:"objects"},level_slider:{keywords:["scale"],"char":"\ud83c\udf9a",fitzpatrick_scale:!1,category:"objects"},control_knobs:{keywords:["dial"],"char":"\ud83c\udf9b",fitzpatrick_scale:!1,category:"objects"},stopwatch:{keywords:["time","deadline"],"char":"\u23f1",fitzpatrick_scale:!1,category:"objects"},timer_clock:{keywords:["alarm"],"char":"\u23f2",fitzpatrick_scale:!1,category:"objects"},alarm_clock:{keywords:["time","wake"],"char":"\u23f0",fitzpatrick_scale:!1,category:"objects"},mantelpiece_clock:{keywords:["time"],"char":"\ud83d\udd70",fitzpatrick_scale:!1,category:"objects"},hourglass_flowing_sand:{keywords:["oldschool","time","countdown"],"char":"\u23f3",fitzpatrick_scale:!1,category:"objects"},hourglass:{keywords:["time","clock","oldschool","limit","exam","quiz","test"],"char":"\u231b",fitzpatrick_scale:!1,category:"objects"},satellite:{keywords:["communication","future","radio","space"],"char":"\ud83d\udce1",fitzpatrick_scale:!1,category:"objects"},battery:{keywords:["power","energy","sustain"],"char":"\ud83d\udd0b",fitzpatrick_scale:!1,category:"objects"},electric_plug:{keywords:["charger","power"],"char":"\ud83d\udd0c",fitzpatrick_scale:!1,category:"objects"},bulb:{keywords:["light","electricity","idea"],"char":"\ud83d\udca1",fitzpatrick_scale:!1,category:"objects"},flashlight:{keywords:["dark","camping","sight","night"],"char":"\ud83d\udd26",fitzpatrick_scale:!1,category:"objects"},candle:{keywords:["fire","wax"],"char":"\ud83d\udd6f",fitzpatrick_scale:!1,category:"objects"},wastebasket:{keywords:["bin","trash","rubbish","garbage","toss"],"char":"\ud83d\uddd1",fitzpatrick_scale:!1,category:"objects"},oil_drum:{keywords:["barrell"],"char":"\ud83d\udee2",fitzpatrick_scale:!1,category:"objects"},money_with_wings:{keywords:["dollar","bills","payment","sale"],"char":"\ud83d\udcb8",fitzpatrick_scale:!1,category:"objects"},dollar:{keywords:["money","sales","bill","currency"],"char":"\ud83d\udcb5",fitzpatrick_scale:!1,category:"objects"},yen:{keywords:["money","sales","japanese","dollar","currency"],"char":"\ud83d\udcb4",fitzpatrick_scale:!1,category:"objects"},euro:{keywords:["money","sales","dollar","currency"],"char":"\ud83d\udcb6",fitzpatrick_scale:!1,category:"objects"},pound:{keywords:["british","sterling","money","sales","bills","uk","england","currency"],"char":"\ud83d\udcb7",fitzpatrick_scale:!1,category:"objects"},moneybag:{keywords:["dollar","payment","coins","sale"],"char":"\ud83d\udcb0",fitzpatrick_scale:!1,category:"objects"},credit_card:{keywords:["money","sales","dollar","bill","payment","shopping"],"char":"\ud83d\udcb3",fitzpatrick_scale:!1,category:"objects"},gem:{keywords:["blue","ruby","diamond","jewelry"],"char":"\ud83d\udc8e",fitzpatrick_scale:!1,category:"objects"},balance_scale:{keywords:["law","fairness","weight"],"char":"\u2696",fitzpatrick_scale:!1,category:"objects"},wrench:{keywords:["tools","diy","ikea","fix","maintainer"],"char":"\ud83d\udd27",fitzpatrick_scale:!1,category:"objects"},hammer:{keywords:["tools","build","create"],"char":"\ud83d\udd28",fitzpatrick_scale:!1,category:"objects"},hammer_and_pick:{keywords:["tools","build","create"],"char":"\u2692",fitzpatrick_scale:!1,category:"objects"},hammer_and_wrench:{keywords:["tools","build","create"],"char":"\ud83d\udee0",fitzpatrick_scale:!1,category:"objects"},pick:{keywords:["tools","dig"],"char":"\u26cf",fitzpatrick_scale:!1,category:"objects"},nut_and_bolt:{keywords:["handy","tools","fix"],"char":"\ud83d\udd29",fitzpatrick_scale:!1,category:"objects"},gear:{keywords:["cog"],"char":"\u2699",fitzpatrick_scale:!1,category:"objects"},chains:{keywords:["lock","arrest"],"char":"\u26d3",fitzpatrick_scale:!1,category:"objects"},gun:{keywords:["violence","weapon","pistol","revolver"],"char":"\ud83d\udd2b",fitzpatrick_scale:!1,category:"objects"},bomb:{keywords:["boom","explode","explosion","terrorism"],"char":"\ud83d\udca3",fitzpatrick_scale:!1,category:"objects"},hocho:{keywords:["knife","blade","cutlery","kitchen","weapon"],"char":"\ud83d\udd2a",fitzpatrick_scale:!1,category:"objects"},dagger:{keywords:["weapon"],"char":"\ud83d\udde1",fitzpatrick_scale:!1,category:"objects"},crossed_swords:{keywords:["weapon"],"char":"\u2694",fitzpatrick_scale:!1,category:"objects"},shield:{keywords:["protection","security"],"char":"\ud83d\udee1",fitzpatrick_scale:!1,category:"objects"},smoking:{keywords:["kills","tobacco","cigarette","joint","smoke"],"char":"\ud83d\udeac",fitzpatrick_scale:!1,category:"objects"},skull_and_crossbones:{keywords:["poison","danger","deadly","scary","death","pirate","evil"],"char":"\u2620",fitzpatrick_scale:!1,category:"objects"},coffin:{keywords:["vampire","dead","die","death","rip","graveyard","cemetery","casket","funeral","box"],"char":"\u26b0",fitzpatrick_scale:!1,category:"objects"},funeral_urn:{keywords:["dead","die","death","rip","ashes"],"char":"\u26b1",fitzpatrick_scale:!1,category:"objects"},amphora:{keywords:["vase","jar"],"char":"\ud83c\udffa",fitzpatrick_scale:!1,category:"objects"},crystal_ball:{keywords:["disco","party","magic","circus","fortune_teller"],"char":"\ud83d\udd2e",fitzpatrick_scale:!1,category:"objects"},prayer_beads:{keywords:["dhikr","religious"],"char":"\ud83d\udcff",fitzpatrick_scale:!1,category:"objects"},barber:{keywords:["hair","salon","style"],"char":"\ud83d\udc88",fitzpatrick_scale:!1,category:"objects"},alembic:{keywords:["distilling","science","experiment","chemistry"],"char":"\u2697",fitzpatrick_scale:!1,category:"objects"},telescope:{keywords:["stars","space","zoom","science","astronomy"],"char":"\ud83d\udd2d",fitzpatrick_scale:!1,category:"objects"},microscope:{keywords:["laboratory","experiment","zoomin","science","study"],"char":"\ud83d\udd2c",fitzpatrick_scale:!1,category:"objects"},hole:{keywords:["embarrassing"],"char":"\ud83d\udd73",fitzpatrick_scale:!1,category:"objects"},pill:{keywords:["health","medicine","doctor","pharmacy","drug"],"char":"\ud83d\udc8a",fitzpatrick_scale:!1,category:"objects"},syringe:{keywords:["health","hospital","drugs","blood","medicine","needle","doctor","nurse"],"char":"\ud83d\udc89",fitzpatrick_scale:!1,category:"objects"},thermometer:{keywords:["weather","temperature","hot","cold"],"char":"\ud83c\udf21",fitzpatrick_scale:!1,category:"objects"},label:{keywords:["sale","tag"],"char":"\ud83c\udff7",fitzpatrick_scale:!1,category:"objects"},bookmark:{keywords:["favorite","label","save"],"char":"\ud83d\udd16",fitzpatrick_scale:!1,category:"objects"},toilet:{keywords:["restroom","wc","washroom","bathroom","potty"],"char":"\ud83d\udebd",fitzpatrick_scale:!1,category:"objects"},shower:{keywords:["clean","water","bathroom"],"char":"\ud83d\udebf",fitzpatrick_scale:!1,category:"objects"},bathtub:{keywords:["clean","shower","bathroom"],"char":"\ud83d\udec1",fitzpatrick_scale:!1,category:"objects"},key:{keywords:["lock","door","password"],"char":"\ud83d\udd11",fitzpatrick_scale:!1,category:"objects"},old_key:{keywords:["lock","door","password"],"char":"\ud83d\udddd",fitzpatrick_scale:!1,category:"objects"},couch_and_lamp:{keywords:["read","chill"],"char":"\ud83d\udecb",fitzpatrick_scale:!1,category:"objects"},sleeping_bed:{keywords:["bed","rest"],"char":"\ud83d\udecc",fitzpatrick_scale:!0,category:"objects"},bed:{keywords:["sleep","rest"],"char":"\ud83d\udecf",fitzpatrick_scale:!1,category:"objects"},door:{keywords:["house","entry","exit"],"char":"\ud83d\udeaa",fitzpatrick_scale:!1,category:"objects"},bellhop_bell:{keywords:["service"],"char":"\ud83d\udece",fitzpatrick_scale:!1,category:"objects"},framed_picture:{keywords:["photography"],"char":"\ud83d\uddbc",fitzpatrick_scale:!1,category:"objects"},world_map:{keywords:["location","direction"],"char":"\ud83d\uddfa",fitzpatrick_scale:!1,category:"objects"},parasol_on_ground:{keywords:["weather","summer"],"char":"\u26f1",fitzpatrick_scale:!1,category:"objects"},moyai:{keywords:["rock","easter island","moai"],"char":"\ud83d\uddff",fitzpatrick_scale:!1,category:"objects"},shopping:{keywords:["mall","buy","purchase"],"char":"\ud83d\udecd",fitzpatrick_scale:!1,category:"objects"},shopping_cart:{keywords:["trolley"],"char":"\ud83d\uded2",fitzpatrick_scale:!1,category:"objects"},balloon:{keywords:["party","celebration","birthday","circus"],"char":"\ud83c\udf88",fitzpatrick_scale:!1,category:"objects"},flags:{keywords:["fish","japanese","koinobori","carp","banner"],"char":"\ud83c\udf8f",fitzpatrick_scale:!1,category:"objects"},ribbon:{keywords:["decoration","pink","girl","bowtie"],"char":"\ud83c\udf80",fitzpatrick_scale:!1,category:"objects"},gift:{keywords:["present","birthday","christmas","xmas"],"char":"\ud83c\udf81",fitzpatrick_scale:!1,category:"objects"},confetti_ball:{keywords:["festival","party","birthday","circus"],"char":"\ud83c\udf8a",fitzpatrick_scale:!1,category:"objects"},tada:{keywords:["party","congratulations","birthday","magic","circus","celebration"],"char":"\ud83c\udf89",fitzpatrick_scale:!1,category:"objects"},dolls:{keywords:["japanese","toy","kimono"],"char":"\ud83c\udf8e",fitzpatrick_scale:!1,category:"objects"},wind_chime:{keywords:["nature","ding","spring","bell"],"char":"\ud83c\udf90",fitzpatrick_scale:!1,category:"objects"},crossed_flags:{keywords:["japanese","nation","country","border"],"char":"\ud83c\udf8c",fitzpatrick_scale:!1,category:"objects"},izakaya_lantern:{keywords:["light","paper","halloween","spooky"],"char":"\ud83c\udfee",fitzpatrick_scale:!1,category:"objects"},email:{keywords:["letter","postal","inbox","communication"],"char":"\u2709\ufe0f",fitzpatrick_scale:!1,category:"objects"},envelope_with_arrow:{keywords:["email","communication"],"char":"\ud83d\udce9",fitzpatrick_scale:!1,category:"objects"},incoming_envelope:{keywords:["email","inbox"],"char":"\ud83d\udce8",fitzpatrick_scale:!1,category:"objects"},"e-mail":{keywords:["communication","inbox"],"char":"\ud83d\udce7",fitzpatrick_scale:!1,category:"objects"},love_letter:{keywords:["email","like","affection","envelope","valentines"],"char":"\ud83d\udc8c",fitzpatrick_scale:!1,category:"objects"},postbox:{keywords:["email","letter","envelope"],"char":"\ud83d\udcee",fitzpatrick_scale:!1,category:"objects"},mailbox_closed:{keywords:["email","communication","inbox"],"char":"\ud83d\udcea",fitzpatrick_scale:!1,category:"objects"},mailbox:{keywords:["email","inbox","communication"],"char":"\ud83d\udceb",fitzpatrick_scale:!1,category:"objects"},mailbox_with_mail:{keywords:["email","inbox","communication"],"char":"\ud83d\udcec",fitzpatrick_scale:!1,category:"objects"},mailbox_with_no_mail:{keywords:["email","inbox"],"char":"\ud83d\udced",fitzpatrick_scale:!1,category:"objects"},"package":{keywords:["mail","gift","cardboard","box","moving"],"char":"\ud83d\udce6",fitzpatrick_scale:!1,category:"objects"},postal_horn:{keywords:["instrument","music"],"char":"\ud83d\udcef",fitzpatrick_scale:!1,category:"objects"},inbox_tray:{keywords:["email","documents"],"char":"\ud83d\udce5",fitzpatrick_scale:!1,category:"objects"},outbox_tray:{keywords:["inbox","email"],"char":"\ud83d\udce4",fitzpatrick_scale:!1,category:"objects"},scroll:{keywords:["documents","ancient","history","paper"],"char":"\ud83d\udcdc",fitzpatrick_scale:!1,category:"objects"},page_with_curl:{keywords:["documents","office","paper"],"char":"\ud83d\udcc3",fitzpatrick_scale:!1,category:"objects"},bookmark_tabs:{keywords:["favorite","save","order","tidy"],"char":"\ud83d\udcd1",fitzpatrick_scale:!1,category:"objects"},bar_chart:{keywords:["graph","presentation","stats"],"char":"\ud83d\udcca",fitzpatrick_scale:!1,category:"objects"},chart_with_upwards_trend:{keywords:["graph","presentation","stats","recovery","business","economics","money","sales","good","success"],"char":"\ud83d\udcc8",fitzpatrick_scale:!1,category:"objects"},chart_with_downwards_trend:{keywords:["graph","presentation","stats","recession","business","economics","money","sales","bad","failure"],"char":"\ud83d\udcc9",fitzpatrick_scale:!1,category:"objects"},page_facing_up:{keywords:["documents","office","paper","information"],"char":"\ud83d\udcc4",fitzpatrick_scale:!1,category:"objects"},date:{keywords:["calendar","schedule"],"char":"\ud83d\udcc5",fitzpatrick_scale:!1,category:"objects"},calendar:{keywords:["schedule","date","planning"],"char":"\ud83d\udcc6",fitzpatrick_scale:!1,category:"objects"},spiral_calendar:{keywords:["date","schedule","planning"],"char":"\ud83d\uddd3",fitzpatrick_scale:!1,category:"objects"},card_index:{keywords:["business","stationery"],"char":"\ud83d\udcc7",fitzpatrick_scale:!1,category:"objects"},card_file_box:{keywords:["business","stationery"],"char":"\ud83d\uddc3",fitzpatrick_scale:!1,category:"objects"},ballot_box:{keywords:["election","vote"],"char":"\ud83d\uddf3",fitzpatrick_scale:!1,category:"objects"},file_cabinet:{keywords:["filing","organizing"],"char":"\ud83d\uddc4",fitzpatrick_scale:!1,category:"objects"},clipboard:{keywords:["stationery","documents"],"char":"\ud83d\udccb",fitzpatrick_scale:!1,category:"objects"},spiral_notepad:{keywords:["memo","stationery"],"char":"\ud83d\uddd2",fitzpatrick_scale:!1,category:"objects"},file_folder:{keywords:["documents","business","office"],"char":"\ud83d\udcc1",fitzpatrick_scale:!1,category:"objects"},open_file_folder:{keywords:["documents","load"],"char":"\ud83d\udcc2",fitzpatrick_scale:!1,category:"objects"},card_index_dividers:{keywords:["organizing","business","stationery"],"char":"\ud83d\uddc2",fitzpatrick_scale:!1,category:"objects"},newspaper_roll:{keywords:["press","headline"],"char":"\ud83d\uddde",fitzpatrick_scale:!1,category:"objects"},newspaper:{keywords:["press","headline"],"char":"\ud83d\udcf0",fitzpatrick_scale:!1,category:"objects"},notebook:{keywords:["stationery","record","notes","paper","study"],"char":"\ud83d\udcd3",fitzpatrick_scale:!1,category:"objects"},closed_book:{keywords:["read","library","knowledge","textbook","learn"],"char":"\ud83d\udcd5",fitzpatrick_scale:!1,category:"objects"},green_book:{keywords:["read","library","knowledge","study"],"char":"\ud83d\udcd7",fitzpatrick_scale:!1,category:"objects"},blue_book:{keywords:["read","library","knowledge","learn","study"],"char":"\ud83d\udcd8",fitzpatrick_scale:!1,category:"objects"},orange_book:{keywords:["read","library","knowledge","textbook","study"],"char":"\ud83d\udcd9",fitzpatrick_scale:!1,category:"objects"},notebook_with_decorative_cover:{keywords:["classroom","notes","record","paper","study"],"char":"\ud83d\udcd4",fitzpatrick_scale:!1,category:"objects"},ledger:{keywords:["notes","paper"],"char":"\ud83d\udcd2",fitzpatrick_scale:!1,category:"objects"},books:{keywords:["literature","library","study"],"char":"\ud83d\udcda",fitzpatrick_scale:!1,category:"objects"},open_book:{keywords:["book","read","library","knowledge","literature","learn","study"],"char":"\ud83d\udcd6",fitzpatrick_scale:!1,category:"objects"},link:{keywords:["rings","url"],"char":"\ud83d\udd17",fitzpatrick_scale:!1,category:"objects"},paperclip:{keywords:["documents","stationery"],"char":"\ud83d\udcce",fitzpatrick_scale:!1,category:"objects"},paperclips:{keywords:["documents","stationery"],"char":"\ud83d\udd87",fitzpatrick_scale:!1,category:"objects"},scissors:{keywords:["stationery","cut"],"char":"\u2702\ufe0f",fitzpatrick_scale:!1,category:"objects"},triangular_ruler:{keywords:["stationery","math","architect","sketch"],"char":"\ud83d\udcd0",fitzpatrick_scale:!1,category:"objects"},straight_ruler:{keywords:["stationery","calculate","length","math","school","drawing","architect","sketch"],"char":"\ud83d\udccf",fitzpatrick_scale:!1,category:"objects"},pushpin:{keywords:["stationery","mark","here"],"char":"\ud83d\udccc",fitzpatrick_scale:!1,category:"objects"},round_pushpin:{keywords:["stationery","location","map","here"],"char":"\ud83d\udccd",fitzpatrick_scale:!1,category:"objects"},triangular_flag_on_post:{keywords:["mark","milestone","place"],"char":"\ud83d\udea9",fitzpatrick_scale:!1,category:"objects"},white_flag:{keywords:["losing","loser","lost","surrender","give up","fail"],"char":"\ud83c\udff3",fitzpatrick_scale:!1,category:"objects"},black_flag:{keywords:["pirate"],"char":"\ud83c\udff4",fitzpatrick_scale:!1,category:"objects"},rainbow_flag:{keywords:["flag","rainbow","pride","gay","lgbt","glbt","queer","homosexual","lesbian","bisexual","transgender"],"char":"\ud83c\udff3\ufe0f\u200d\ud83c\udf08",fitzpatrick_scale:!1,category:"objects"},closed_lock_with_key:{keywords:["security","privacy"],"char":"\ud83d\udd10",fitzpatrick_scale:!1,category:"objects"},lock:{keywords:["security","password","padlock"],"char":"\ud83d\udd12",fitzpatrick_scale:!1,category:"objects"},unlock:{keywords:["privacy","security"],"char":"\ud83d\udd13",fitzpatrick_scale:!1,category:"objects"},lock_with_ink_pen:{keywords:["security","secret"],"char":"\ud83d\udd0f",fitzpatrick_scale:!1,category:"objects"},pen:{keywords:["stationery","writing","write"],"char":"\ud83d\udd8a",fitzpatrick_scale:!1,category:"objects"},fountain_pen:{keywords:["stationery","writing","write"],"char":"\ud83d\udd8b",fitzpatrick_scale:!1,category:"objects"},black_nib:{keywords:["pen","stationery","writing","write"],"char":"\u2712\ufe0f",fitzpatrick_scale:!1,category:"objects"},memo:{keywords:["write","documents","stationery","pencil","paper","writing","legal","exam","quiz","test","study","compose"],"char":"\ud83d\udcdd",fitzpatrick_scale:!1,category:"objects"},pencil2:{keywords:["stationery","write","paper","writing","school","study"],"char":"\u270f\ufe0f",fitzpatrick_scale:!1,category:"objects"},crayon:{keywords:["drawing","creativity"],"char":"\ud83d\udd8d",fitzpatrick_scale:!1,category:"objects"},paintbrush:{keywords:["drawing","creativity","art"],"char":"\ud83d\udd8c",fitzpatrick_scale:!1,category:"objects"},mag:{keywords:["search","zoom","find","detective"],"char":"\ud83d\udd0d",fitzpatrick_scale:!1,category:"objects"},mag_right:{keywords:["search","zoom","find","detective"],"char":"\ud83d\udd0e",fitzpatrick_scale:!1,category:"objects"},heart:{keywords:["love","like","valentines"],"char":"\u2764\ufe0f",fitzpatrick_scale:!1,category:"symbols"},orange_heart:{keywords:["love","like","affection","valentines"],"char":"\ud83e\udde1",fitzpatrick_scale:!1,category:"symbols"},yellow_heart:{keywords:["love","like","affection","valentines"],"char":"\ud83d\udc9b",fitzpatrick_scale:!1,category:"symbols"},green_heart:{keywords:["love","like","affection","valentines"],"char":"\ud83d\udc9a",fitzpatrick_scale:!1,category:"symbols"},blue_heart:{keywords:["love","like","affection","valentines"],"char":"\ud83d\udc99",fitzpatrick_scale:!1,category:"symbols"},purple_heart:{keywords:["love","like","affection","valentines"],"char":"\ud83d\udc9c",fitzpatrick_scale:!1,category:"symbols"},black_heart:{keywords:["evil"],"char":"\ud83d\udda4",fitzpatrick_scale:!1,category:"symbols"},broken_heart:{keywords:["sad","sorry","break","heart","heartbreak"],"char":"\ud83d\udc94",fitzpatrick_scale:!1,category:"symbols"},heavy_heart_exclamation:{keywords:["decoration","love"],"char":"\u2763",fitzpatrick_scale:!1,category:"symbols"},two_hearts:{keywords:["love","like","affection","valentines","heart"],"char":"\ud83d\udc95",fitzpatrick_scale:!1,category:"symbols"},revolving_hearts:{keywords:["love","like","affection","valentines"],"char":"\ud83d\udc9e",fitzpatrick_scale:!1,category:"symbols"},heartbeat:{keywords:["love","like","affection","valentines","pink","heart"],"char":"\ud83d\udc93",fitzpatrick_scale:!1,category:"symbols"},heartpulse:{keywords:["like","love","affection","valentines","pink"],"char":"\ud83d\udc97",fitzpatrick_scale:!1,category:"symbols"},sparkling_heart:{keywords:["love","like","affection","valentines"],"char":"\ud83d\udc96",fitzpatrick_scale:!1,category:"symbols"},cupid:{keywords:["love","like","heart","affection","valentines"],"char":"\ud83d\udc98",fitzpatrick_scale:!1,category:"symbols"},gift_heart:{keywords:["love","valentines"],"char":"\ud83d\udc9d",fitzpatrick_scale:!1,category:"symbols"},heart_decoration:{keywords:["purple-square","love","like"],"char":"\ud83d\udc9f",fitzpatrick_scale:!1,category:"symbols"},peace_symbol:{keywords:["hippie"],"char":"\u262e",fitzpatrick_scale:!1,category:"symbols"},latin_cross:{keywords:["christianity"],"char":"\u271d",fitzpatrick_scale:!1,category:"symbols"},star_and_crescent:{keywords:["islam"],"char":"\u262a",fitzpatrick_scale:!1,category:"symbols"},om:{keywords:["hinduism","buddhism","sikhism","jainism"],"char":"\ud83d\udd49",fitzpatrick_scale:!1,category:"symbols"},wheel_of_dharma:{keywords:["hinduism","buddhism","sikhism","jainism"],"char":"\u2638",fitzpatrick_scale:!1,category:"symbols"},star_of_david:{keywords:["judaism"],"char":"\u2721",fitzpatrick_scale:!1,category:"symbols"},six_pointed_star:{keywords:["purple-square","religion","jewish","hexagram"],"char":"\ud83d\udd2f",fitzpatrick_scale:!1,category:"symbols"},menorah:{keywords:["hanukkah","candles","jewish"],"char":"\ud83d\udd4e",fitzpatrick_scale:!1,category:"symbols"},yin_yang:{keywords:["balance"],"char":"\u262f",fitzpatrick_scale:!1,category:"symbols"},orthodox_cross:{keywords:["suppedaneum","religion"],"char":"\u2626",fitzpatrick_scale:!1,category:"symbols"},place_of_worship:{keywords:["religion","church","temple","prayer"],"char":"\ud83d\uded0",fitzpatrick_scale:!1,category:"symbols"},ophiuchus:{keywords:["sign","purple-square","constellation","astrology"],"char":"\u26ce",fitzpatrick_scale:!1,category:"symbols"},aries:{keywords:["sign","purple-square","zodiac","astrology"],"char":"\u2648",fitzpatrick_scale:!1,category:"symbols"},taurus:{keywords:["purple-square","sign","zodiac","astrology"],"char":"\u2649",fitzpatrick_scale:!1,category:"symbols"},gemini:{keywords:["sign","zodiac","purple-square","astrology"],"char":"\u264a",fitzpatrick_scale:!1,category:"symbols"},cancer:{keywords:["sign","zodiac","purple-square","astrology"],"char":"\u264b",fitzpatrick_scale:!1,category:"symbols"},leo:{keywords:["sign","purple-square","zodiac","astrology"],"char":"\u264c",fitzpatrick_scale:!1,category:"symbols"},virgo:{keywords:["sign","zodiac","purple-square","astrology"],"char":"\u264d",fitzpatrick_scale:!1,category:"symbols"},libra:{keywords:["sign","purple-square","zodiac","astrology"],"char":"\u264e",fitzpatrick_scale:!1,category:"symbols"},scorpius:{keywords:["sign","zodiac","purple-square","astrology","scorpio"],"char":"\u264f",fitzpatrick_scale:!1,category:"symbols"},sagittarius:{keywords:["sign","zodiac","purple-square","astrology"],"char":"\u2650",fitzpatrick_scale:!1,category:"symbols"},capricorn:{keywords:["sign","zodiac","purple-square","astrology"],"char":"\u2651",fitzpatrick_scale:!1,category:"symbols"},aquarius:{keywords:["sign","purple-square","zodiac","astrology"],"char":"\u2652",fitzpatrick_scale:!1,category:"symbols"},pisces:{keywords:["purple-square","sign","zodiac","astrology"],"char":"\u2653",fitzpatrick_scale:!1,category:"symbols"},id:{keywords:["purple-square","words"],"char":"\ud83c\udd94",fitzpatrick_scale:!1,category:"symbols"},atom_symbol:{keywords:["science","physics","chemistry"],"char":"\u269b",fitzpatrick_scale:!1,category:"symbols"},u7a7a:{keywords:["kanji","japanese","chinese","empty","sky","blue-square"],"char":"\ud83c\ude33",fitzpatrick_scale:!1,category:"symbols"},u5272:{keywords:["cut","divide","chinese","kanji","pink-square"],"char":"\ud83c\ude39",fitzpatrick_scale:!1,category:"symbols"},radioactive:{keywords:["nuclear","danger"],"char":"\u2622",fitzpatrick_scale:!1,category:"symbols"},biohazard:{keywords:["danger"],"char":"\u2623",fitzpatrick_scale:!1,category:"symbols"},mobile_phone_off:{keywords:["mute","orange-square","silence","quiet"],"char":"\ud83d\udcf4",fitzpatrick_scale:!1,category:"symbols"},vibration_mode:{keywords:["orange-square","phone"],"char":"\ud83d\udcf3",fitzpatrick_scale:!1,category:"symbols"},u6709:{keywords:["orange-square","chinese","have","kanji"],"char":"\ud83c\ude36",fitzpatrick_scale:!1,category:"symbols"},u7121:{keywords:["nothing","chinese","kanji","japanese","orange-square"],"char":"\ud83c\ude1a",fitzpatrick_scale:!1,category:"symbols"},u7533:{keywords:["chinese","japanese","kanji","orange-square"],"char":"\ud83c\ude38",fitzpatrick_scale:!1,category:"symbols"},u55b6:{keywords:["japanese","opening hours","orange-square"],"char":"\ud83c\ude3a",fitzpatrick_scale:!1,category:"symbols"},u6708:{keywords:["chinese","month","moon","japanese","orange-square","kanji"],"char":"\ud83c\ude37\ufe0f",fitzpatrick_scale:!1,category:"symbols"},eight_pointed_black_star:{keywords:["orange-square","shape","polygon"],"char":"\u2734\ufe0f",fitzpatrick_scale:!1,category:"symbols"},vs:{keywords:["words","orange-square"],"char":"\ud83c\udd9a",fitzpatrick_scale:!1,category:"symbols"},accept:{keywords:["ok","good","chinese","kanji","agree","yes","orange-circle"],"char":"\ud83c\ude51",fitzpatrick_scale:!1,category:"symbols"},white_flower:{keywords:["japanese","spring"],"char":"\ud83d\udcae",fitzpatrick_scale:!1,category:"symbols"},ideograph_advantage:{keywords:["chinese","kanji","obtain","get","circle"],"char":"\ud83c\ude50",fitzpatrick_scale:!1,category:"symbols"},secret:{keywords:["privacy","chinese","sshh","kanji","red-circle"],"char":"\u3299\ufe0f",fitzpatrick_scale:!1,category:"symbols"},congratulations:{keywords:["chinese","kanji","japanese","red-circle"],"char":"\u3297\ufe0f",fitzpatrick_scale:!1,category:"symbols"},u5408:{keywords:["japanese","chinese","join","kanji","red-square"],"char":"\ud83c\ude34",fitzpatrick_scale:!1,category:"symbols"},u6e80:{keywords:["full","chinese","japanese","red-square","kanji"],"char":"\ud83c\ude35",fitzpatrick_scale:!1,category:"symbols"},u7981:{keywords:["kanji","japanese","chinese","forbidden","limit","restricted","red-square"],"char":"\ud83c\ude32",fitzpatrick_scale:!1,category:"symbols"},a:{keywords:["red-square","alphabet","letter"],"char":"\ud83c\udd70\ufe0f",fitzpatrick_scale:!1,category:"symbols"},b:{keywords:["red-square","alphabet","letter"],"char":"\ud83c\udd71\ufe0f",fitzpatrick_scale:!1,category:"symbols"},ab:{keywords:["red-square","alphabet"],"char":"\ud83c\udd8e",fitzpatrick_scale:!1,category:"symbols"},cl:{keywords:["alphabet","words","red-square"],"char":"\ud83c\udd91",fitzpatrick_scale:!1,category:"symbols"},o2:{keywords:["alphabet","red-square","letter"],"char":"\ud83c\udd7e\ufe0f",fitzpatrick_scale:!1,category:"symbols"},sos:{keywords:["help","red-square","words","emergency","911"],"char":"\ud83c\udd98",fitzpatrick_scale:!1,category:"symbols"},no_entry:{keywords:["limit","security","privacy","bad","denied","stop","circle"],"char":"\u26d4",fitzpatrick_scale:!1,category:"symbols"},name_badge:{keywords:["fire","forbid"],"char":"\ud83d\udcdb",fitzpatrick_scale:!1,category:"symbols"},no_entry_sign:{keywords:["forbid","stop","limit","denied","disallow","circle"],"char":"\ud83d\udeab",fitzpatrick_scale:!1,category:"symbols"},x:{keywords:["no","delete","remove","cancel"],"char":"\u274c",fitzpatrick_scale:!1,category:"symbols"},o:{keywords:["circle","round"],"char":"\u2b55",fitzpatrick_scale:!1,category:"symbols"},stop_sign:{keywords:["stop"],"char":"\ud83d\uded1",fitzpatrick_scale:!1,category:"symbols"},anger:{keywords:["angry","mad"],"char":"\ud83d\udca2",fitzpatrick_scale:!1,category:"symbols"},hotsprings:{keywords:["bath","warm","relax"],"char":"\u2668\ufe0f",fitzpatrick_scale:!1,category:"symbols"},no_pedestrians:{keywords:["rules","crossing","walking","circle"],"char":"\ud83d\udeb7",fitzpatrick_scale:!1,category:"symbols"},do_not_litter:{keywords:["trash","bin","garbage","circle"],"char":"\ud83d\udeaf",fitzpatrick_scale:!1,category:"symbols"},no_bicycles:{keywords:["cyclist","prohibited","circle"],"char":"\ud83d\udeb3",fitzpatrick_scale:!1,category:"symbols"},"non-potable_water":{keywords:["drink","faucet","tap","circle"],"char":"\ud83d\udeb1",fitzpatrick_scale:!1,category:"symbols"},underage:{keywords:["18","drink","pub","night","minor","circle"],"char":"\ud83d\udd1e",fitzpatrick_scale:!1,category:"symbols"},no_mobile_phones:{keywords:["iphone","mute","circle"],"char":"\ud83d\udcf5",fitzpatrick_scale:!1,category:"symbols"},exclamation:{keywords:["heavy_exclamation_mark","danger","surprise","punctuation","wow","warning"],"char":"\u2757",fitzpatrick_scale:!1,category:"symbols"},grey_exclamation:{keywords:["surprise","punctuation","gray","wow","warning"],"char":"\u2755",fitzpatrick_scale:!1,category:"symbols"},question:{keywords:["doubt","confused"],"char":"\u2753",fitzpatrick_scale:!1,category:"symbols"},grey_question:{keywords:["doubts","gray","huh","confused"],"char":"\u2754",fitzpatrick_scale:!1,category:"symbols"},bangbang:{keywords:["exclamation","surprise"],"char":"\u203c\ufe0f",fitzpatrick_scale:!1,category:"symbols"},interrobang:{keywords:["wat","punctuation","surprise"],"char":"\u2049\ufe0f",fitzpatrick_scale:!1,category:"symbols"},100:{keywords:["score","perfect","numbers","century","exam","quiz","test","pass","hundred"],"char":"\ud83d\udcaf",fitzpatrick_scale:!1,category:"symbols"},low_brightness:{keywords:["sun","afternoon","warm","summer"],"char":"\ud83d\udd05",fitzpatrick_scale:!1,category:"symbols"},high_brightness:{keywords:["sun","light"],"char":"\ud83d\udd06",fitzpatrick_scale:!1,category:"symbols"},trident:{keywords:["weapon","spear"],"char":"\ud83d\udd31",fitzpatrick_scale:!1,category:"symbols"},fleur_de_lis:{keywords:["decorative","scout"],"char":"\u269c",fitzpatrick_scale:!1,category:"symbols"},part_alternation_mark:{keywords:["graph","presentation","stats","business","economics","bad"],"char":"\u303d\ufe0f",fitzpatrick_scale:!1,category:"symbols"},warning:{keywords:["exclamation","wip","alert","error","problem","issue"],"char":"\u26a0\ufe0f",fitzpatrick_scale:!1,category:"symbols"},children_crossing:{keywords:["school","warning","danger","sign","driving","yellow-diamond"],"char":"\ud83d\udeb8",fitzpatrick_scale:!1,category:"symbols"},beginner:{keywords:["badge","shield"],"char":"\ud83d\udd30",fitzpatrick_scale:!1,category:"symbols"},recycle:{keywords:["arrow","environment","garbage","trash"],"char":"\u267b\ufe0f",fitzpatrick_scale:!1,category:"symbols"},u6307:{keywords:["chinese","point","green-square","kanji"],"char":"\ud83c\ude2f",fitzpatrick_scale:!1,category:"symbols"},chart:{keywords:["green-square","graph","presentation","stats"],"char":"\ud83d\udcb9",fitzpatrick_scale:!1,category:"symbols"},sparkle:{keywords:["stars","green-square","awesome","good","fireworks"],"char":"\u2747\ufe0f",fitzpatrick_scale:!1,category:"symbols"},eight_spoked_asterisk:{keywords:["star","sparkle","green-square"],"char":"\u2733\ufe0f",fitzpatrick_scale:!1,category:"symbols"},negative_squared_cross_mark:{keywords:["x","green-square","no","deny"],"char":"\u274e",fitzpatrick_scale:!1,category:"symbols"},white_check_mark:{keywords:["green-square","ok","agree","vote","election","answer","tick"],"char":"\u2705",fitzpatrick_scale:!1,category:"symbols"},diamond_shape_with_a_dot_inside:{keywords:["jewel","blue","gem","crystal","fancy"],"char":"\ud83d\udca0",fitzpatrick_scale:!1,category:"symbols"},cyclone:{keywords:["weather","swirl","blue","cloud","vortex","spiral","whirlpool","spin","tornado","hurricane","typhoon"],"char":"\ud83c\udf00",fitzpatrick_scale:!1,category:"symbols"},loop:{keywords:["tape","cassette"],"char":"\u27bf",fitzpatrick_scale:!1,category:"symbols"},globe_with_meridians:{keywords:["earth","international","world","internet","interweb","i18n"],"char":"\ud83c\udf10",fitzpatrick_scale:!1,category:"symbols"},m:{keywords:["alphabet","blue-circle","letter"],"char":"\u24c2\ufe0f",fitzpatrick_scale:!1,category:"symbols"},atm:{keywords:["money","sales","cash","blue-square","payment","bank"],"char":"\ud83c\udfe7",fitzpatrick_scale:!1,category:"symbols"},sa:{keywords:["japanese","blue-square","katakana"],"char":"\ud83c\ude02\ufe0f",fitzpatrick_scale:!1,category:"symbols"},passport_control:{keywords:["custom","blue-square"],"char":"\ud83d\udec2",fitzpatrick_scale:!1,category:"symbols"},customs:{keywords:["passport","border","blue-square"],"char":"\ud83d\udec3",fitzpatrick_scale:!1,category:"symbols"},baggage_claim:{keywords:["blue-square","airport","transport"],"char":"\ud83d\udec4",fitzpatrick_scale:!1,category:"symbols"},left_luggage:{keywords:["blue-square","travel"],"char":"\ud83d\udec5",fitzpatrick_scale:!1,category:"symbols"},wheelchair:{keywords:["blue-square","disabled","a11y","accessibility"],"char":"\u267f",fitzpatrick_scale:!1,category:"symbols"},no_smoking:{keywords:["cigarette","blue-square","smell","smoke"],"char":"\ud83d\udead",fitzpatrick_scale:!1,category:"symbols"},wc:{keywords:["toilet","restroom","blue-square"],"char":"\ud83d\udebe",fitzpatrick_scale:!1,category:"symbols"},parking:{keywords:["cars","blue-square","alphabet","letter"],"char":"\ud83c\udd7f\ufe0f",fitzpatrick_scale:!1,category:"symbols"},potable_water:{keywords:["blue-square","liquid","restroom","cleaning","faucet"],"char":"\ud83d\udeb0",fitzpatrick_scale:!1,category:"symbols"},mens:{keywords:["toilet","restroom","wc","blue-square","gender","male"],"char":"\ud83d\udeb9",fitzpatrick_scale:!1,category:"symbols"},womens:{keywords:["purple-square","woman","female","toilet","loo","restroom","gender"],"char":"\ud83d\udeba",fitzpatrick_scale:!1,category:"symbols"},baby_symbol:{keywords:["orange-square","child"],"char":"\ud83d\udebc",fitzpatrick_scale:!1,category:"symbols"},restroom:{keywords:["blue-square","toilet","refresh","wc","gender"],"char":"\ud83d\udebb",fitzpatrick_scale:!1,category:"symbols"},put_litter_in_its_place:{keywords:["blue-square","sign","human","info"],"char":"\ud83d\udeae",fitzpatrick_scale:!1,category:"symbols"},cinema:{keywords:["blue-square","record","film","movie","curtain","stage","theater"],"char":"\ud83c\udfa6",fitzpatrick_scale:!1,category:"symbols"},signal_strength:{keywords:["blue-square","reception","phone","internet","connection","wifi","bluetooth","bars"],"char":"\ud83d\udcf6",fitzpatrick_scale:!1,category:"symbols"},koko:{keywords:["blue-square","here","katakana","japanese","destination"],"char":"\ud83c\ude01",fitzpatrick_scale:!1,category:"symbols"},ng:{keywords:["blue-square","words","shape","icon"],"char":"\ud83c\udd96",fitzpatrick_scale:!1,category:"symbols"},ok:{keywords:["good","agree","yes","blue-square"],"char":"\ud83c\udd97",fitzpatrick_scale:!1,category:"symbols"},up:{keywords:["blue-square","above","high"],"char":"\ud83c\udd99",fitzpatrick_scale:!1,category:"symbols"},cool:{keywords:["words","blue-square"],"char":"\ud83c\udd92",fitzpatrick_scale:!1,category:"symbols"},"new":{keywords:["blue-square","words","start"],"char":"\ud83c\udd95",fitzpatrick_scale:!1,category:"symbols"},free:{keywords:["blue-square","words"],"char":"\ud83c\udd93",fitzpatrick_scale:!1,category:"symbols"},zero:{keywords:["0","numbers","blue-square","null"],"char":"0\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},one:{keywords:["blue-square","numbers","1"],"char":"1\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},two:{keywords:["numbers","2","prime","blue-square"],"char":"2\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},three:{keywords:["3","numbers","prime","blue-square"],"char":"3\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},four:{keywords:["4","numbers","blue-square"],"char":"4\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},five:{keywords:["5","numbers","blue-square","prime"],"char":"5\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},six:{keywords:["6","numbers","blue-square"],"char":"6\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},seven:{keywords:["7","numbers","blue-square","prime"],"char":"7\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},eight:{keywords:["8","blue-square","numbers"],"char":"8\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},nine:{keywords:["blue-square","numbers","9"],"char":"9\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},keycap_ten:{keywords:["numbers","10","blue-square"],"char":"\ud83d\udd1f",fitzpatrick_scale:!1,category:"symbols"},asterisk:{keywords:["star","keycap"],"char":"*\u20e3",fitzpatrick_scale:!1,category:"symbols"},1234:{keywords:["numbers","blue-square"],"char":"\ud83d\udd22",fitzpatrick_scale:!1,category:"symbols"},eject_button:{keywords:["blue-square"],"char":"\u23cf\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_forward:{keywords:["blue-square","right","direction","play"],"char":"\u25b6\ufe0f",fitzpatrick_scale:!1,category:"symbols"},pause_button:{keywords:["pause","blue-square"],"char":"\u23f8",fitzpatrick_scale:!1,category:"symbols"},next_track_button:{keywords:["forward","next","blue-square"],"char":"\u23ed",fitzpatrick_scale:!1,category:"symbols"},stop_button:{keywords:["blue-square"],"char":"\u23f9",fitzpatrick_scale:!1,category:"symbols"},record_button:{keywords:["blue-square"],"char":"\u23fa",fitzpatrick_scale:!1,category:"symbols"},play_or_pause_button:{keywords:["blue-square","play","pause"],"char":"\u23ef",fitzpatrick_scale:!1,category:"symbols"},previous_track_button:{keywords:["backward"],"char":"\u23ee",fitzpatrick_scale:!1,category:"symbols"},fast_forward:{keywords:["blue-square","play","speed","continue"],"char":"\u23e9",fitzpatrick_scale:!1,category:"symbols"},rewind:{keywords:["play","blue-square"],"char":"\u23ea",fitzpatrick_scale:!1,category:"symbols"},twisted_rightwards_arrows:{keywords:["blue-square","shuffle","music","random"],"char":"\ud83d\udd00",fitzpatrick_scale:!1,category:"symbols"},repeat:{keywords:["loop","record"],"char":"\ud83d\udd01",fitzpatrick_scale:!1,category:"symbols"},repeat_one:{keywords:["blue-square","loop"],"char":"\ud83d\udd02",fitzpatrick_scale:!1,category:"symbols"},arrow_backward:{keywords:["blue-square","left","direction"],"char":"\u25c0\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_up_small:{keywords:["blue-square","triangle","direction","point","forward","top"],"char":"\ud83d\udd3c",fitzpatrick_scale:!1,category:"symbols"},arrow_down_small:{keywords:["blue-square","direction","bottom"],"char":"\ud83d\udd3d",fitzpatrick_scale:!1,category:"symbols"},arrow_double_up:{keywords:["blue-square","direction","top"],"char":"\u23eb",fitzpatrick_scale:!1,category:"symbols"},arrow_double_down:{keywords:["blue-square","direction","bottom"],"char":"\u23ec",fitzpatrick_scale:!1,category:"symbols"},arrow_right:{keywords:["blue-square","next"],"char":"\u27a1\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_left:{keywords:["blue-square","previous","back"],"char":"\u2b05\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_up:{keywords:["blue-square","continue","top","direction"],"char":"\u2b06\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_down:{keywords:["blue-square","direction","bottom"],"char":"\u2b07\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_upper_right:{keywords:["blue-square","point","direction","diagonal","northeast"],"char":"\u2197\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_lower_right:{keywords:["blue-square","direction","diagonal","southeast"],"char":"\u2198\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_lower_left:{keywords:["blue-square","direction","diagonal","southwest"],"char":"\u2199\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_upper_left:{keywords:["blue-square","point","direction","diagonal","northwest"],"char":"\u2196\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_up_down:{keywords:["blue-square","direction","way","vertical"],"char":"\u2195\ufe0f",fitzpatrick_scale:!1,category:"symbols"},left_right_arrow:{keywords:["shape","direction","horizontal","sideways"],"char":"\u2194\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrows_counterclockwise:{keywords:["blue-square","sync","cycle"],"char":"\ud83d\udd04",fitzpatrick_scale:!1,category:"symbols"},arrow_right_hook:{keywords:["blue-square","return","rotate","direction"],"char":"\u21aa\ufe0f",fitzpatrick_scale:!1,category:"symbols"},leftwards_arrow_with_hook:{keywords:["back","return","blue-square","undo","enter"],"char":"\u21a9\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_heading_up:{keywords:["blue-square","direction","top"],"char":"\u2934\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_heading_down:{keywords:["blue-square","direction","bottom"],"char":"\u2935\ufe0f",fitzpatrick_scale:!1,category:"symbols"},hash:{keywords:["symbol","blue-square","twitter"],"char":"#\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},information_source:{keywords:["blue-square","alphabet","letter"],"char":"\u2139\ufe0f",fitzpatrick_scale:!1,category:"symbols"},abc:{keywords:["blue-square","alphabet"],"char":"\ud83d\udd24",fitzpatrick_scale:!1,category:"symbols"},abcd:{keywords:["blue-square","alphabet"],"char":"\ud83d\udd21",fitzpatrick_scale:!1,category:"symbols"},capital_abcd:{keywords:["alphabet","words","blue-square"],"char":"\ud83d\udd20",fitzpatrick_scale:!1,category:"symbols"},symbols:{keywords:["blue-square","music","note","ampersand","percent","glyphs","characters"],"char":"\ud83d\udd23",fitzpatrick_scale:!1,category:"symbols"},musical_note:{keywords:["score","tone","sound"],"char":"\ud83c\udfb5",fitzpatrick_scale:!1,category:"symbols"},notes:{keywords:["music","score"],"char":"\ud83c\udfb6",fitzpatrick_scale:!1,category:"symbols"},wavy_dash:{keywords:["draw","line","moustache","mustache","squiggle","scribble"],"char":"\u3030\ufe0f",fitzpatrick_scale:!1,category:"symbols"},curly_loop:{keywords:["scribble","draw","shape","squiggle"],"char":"\u27b0",fitzpatrick_scale:!1,category:"symbols"},heavy_check_mark:{keywords:["ok","nike","answer","yes","tick"],"char":"\u2714\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrows_clockwise:{keywords:["sync","cycle","round","repeat"],"char":"\ud83d\udd03",fitzpatrick_scale:!1,category:"symbols"},heavy_plus_sign:{keywords:["math","calculation","addition","more","increase"],"char":"\u2795",fitzpatrick_scale:!1,category:"symbols"},heavy_minus_sign:{keywords:["math","calculation","subtract","less"],"char":"\u2796",fitzpatrick_scale:!1,category:"symbols"},heavy_division_sign:{keywords:["divide","math","calculation"],"char":"\u2797",fitzpatrick_scale:!1,category:"symbols"},heavy_multiplication_x:{keywords:["math","calculation"],"char":"\u2716\ufe0f",fitzpatrick_scale:!1,category:"symbols"},heavy_dollar_sign:{keywords:["money","sales","payment","currency","buck"],"char":"\ud83d\udcb2",fitzpatrick_scale:!1,category:"symbols"},currency_exchange:{keywords:["money","sales","dollar","travel"],"char":"\ud83d\udcb1",fitzpatrick_scale:!1,category:"symbols"},copyright:{keywords:["ip","license","circle","law","legal"],"char":"\xa9\ufe0f",fitzpatrick_scale:!1,category:"symbols"},registered:{keywords:["alphabet","circle"],"char":"\xae\ufe0f",fitzpatrick_scale:!1,category:"symbols"},tm:{keywords:["trademark","brand","law","legal"],"char":"\u2122\ufe0f",fitzpatrick_scale:!1,category:"symbols"},end:{keywords:["words","arrow"],"char":"\ud83d\udd1a",fitzpatrick_scale:!1,category:"symbols"},back:{keywords:["arrow","words","return"],"char":"\ud83d\udd19",fitzpatrick_scale:!1,category:"symbols"},on:{keywords:["arrow","words"],"char":"\ud83d\udd1b",fitzpatrick_scale:!1,category:"symbols"},top:{keywords:["words","blue-square"],"char":"\ud83d\udd1d",fitzpatrick_scale:!1,category:"symbols"},soon:{keywords:["arrow","words"],"char":"\ud83d\udd1c",fitzpatrick_scale:!1,category:"symbols"},ballot_box_with_check:{keywords:["ok","agree","confirm","black-square","vote","election","yes","tick"],"char":"\u2611\ufe0f",fitzpatrick_scale:!1,category:"symbols"},radio_button:{keywords:["input","old","music","circle"],"char":"\ud83d\udd18",fitzpatrick_scale:!1,category:"symbols"},white_circle:{keywords:["shape","round"],"char":"\u26aa",fitzpatrick_scale:!1,category:"symbols"},black_circle:{keywords:["shape","button","round"],"char":"\u26ab",fitzpatrick_scale:!1,category:"symbols"},red_circle:{keywords:["shape","error","danger"],"char":"\ud83d\udd34",fitzpatrick_scale:!1,category:"symbols"},large_blue_circle:{keywords:["shape","icon","button"],"char":"\ud83d\udd35",fitzpatrick_scale:!1,category:"symbols"},small_orange_diamond:{keywords:["shape","jewel","gem"],"char":"\ud83d\udd38",fitzpatrick_scale:!1,category:"symbols"},small_blue_diamond:{keywords:["shape","jewel","gem"],"char":"\ud83d\udd39",fitzpatrick_scale:!1,category:"symbols"},large_orange_diamond:{keywords:["shape","jewel","gem"],"char":"\ud83d\udd36",fitzpatrick_scale:!1,category:"symbols"},large_blue_diamond:{keywords:["shape","jewel","gem"],"char":"\ud83d\udd37",fitzpatrick_scale:!1,category:"symbols"},small_red_triangle:{keywords:["shape","direction","up","top"],"char":"\ud83d\udd3a",fitzpatrick_scale:!1,category:"symbols"},black_small_square:{keywords:["shape","icon"],"char":"\u25aa\ufe0f",fitzpatrick_scale:!1,category:"symbols"},white_small_square:{keywords:["shape","icon"],"char":"\u25ab\ufe0f",fitzpatrick_scale:!1,category:"symbols"},black_large_square:{keywords:["shape","icon","button"],"char":"\u2b1b",fitzpatrick_scale:!1,category:"symbols"},white_large_square:{keywords:["shape","icon","stone","button"],"char":"\u2b1c",fitzpatrick_scale:!1,category:"symbols"},small_red_triangle_down:{keywords:["shape","direction","bottom"],"char":"\ud83d\udd3b",fitzpatrick_scale:!1,category:"symbols"},black_medium_square:{keywords:["shape","button","icon"],"char":"\u25fc\ufe0f",fitzpatrick_scale:!1,category:"symbols"},white_medium_square:{keywords:["shape","stone","icon"],"char":"\u25fb\ufe0f",fitzpatrick_scale:!1,category:"symbols"},black_medium_small_square:{keywords:["icon","shape","button"],"char":"\u25fe",fitzpatrick_scale:!1,category:"symbols"},white_medium_small_square:{keywords:["shape","stone","icon","button"],"char":"\u25fd",fitzpatrick_scale:!1,category:"symbols"},black_square_button:{keywords:["shape","input","frame"],"char":"\ud83d\udd32",fitzpatrick_scale:!1,category:"symbols"},white_square_button:{keywords:["shape","input"],"char":"\ud83d\udd33",fitzpatrick_scale:!1,category:"symbols"},speaker:{keywords:["sound","volume","silence","broadcast"],"char":"\ud83d\udd08",fitzpatrick_scale:!1,category:"symbols"},sound:{keywords:["volume","speaker","broadcast"],"char":"\ud83d\udd09",fitzpatrick_scale:!1,category:"symbols"},loud_sound:{keywords:["volume","noise","noisy","speaker","broadcast"],"char":"\ud83d\udd0a",fitzpatrick_scale:!1,category:"symbols"},mute:{keywords:["sound","volume","silence","quiet"],"char":"\ud83d\udd07",fitzpatrick_scale:!1,category:"symbols"},mega:{keywords:["sound","speaker","volume"],"char":"\ud83d\udce3",fitzpatrick_scale:!1,category:"symbols"},loudspeaker:{keywords:["volume","sound"],"char":"\ud83d\udce2",fitzpatrick_scale:!1,category:"symbols"},bell:{keywords:["sound","notification","christmas","xmas","chime"],"char":"\ud83d\udd14",fitzpatrick_scale:!1,category:"symbols"},no_bell:{keywords:["sound","volume","mute","quiet","silent"],"char":"\ud83d\udd15",fitzpatrick_scale:!1,category:"symbols"},black_joker:{keywords:["poker","cards","game","play","magic"],"char":"\ud83c\udccf",fitzpatrick_scale:!1,category:"symbols"},mahjong:{keywords:["game","play","chinese","kanji"],"char":"\ud83c\udc04",fitzpatrick_scale:!1,category:"symbols"},spades:{keywords:["poker","cards","suits","magic"],"char":"\u2660\ufe0f",fitzpatrick_scale:!1,category:"symbols"},clubs:{keywords:["poker","cards","magic","suits"],"char":"\u2663\ufe0f",fitzpatrick_scale:!1,category:"symbols"},hearts:{keywords:["poker","cards","magic","suits"],"char":"\u2665\ufe0f",fitzpatrick_scale:!1,category:"symbols"},diamonds:{keywords:["poker","cards","magic","suits"],"char":"\u2666\ufe0f",fitzpatrick_scale:!1,category:"symbols"},flower_playing_cards:{keywords:["game","sunset","red"],"char":"\ud83c\udfb4",fitzpatrick_scale:!1,category:"symbols"},thought_balloon:{keywords:["bubble","cloud","speech","thinking","dream"],"char":"\ud83d\udcad",fitzpatrick_scale:!1,category:"symbols"},right_anger_bubble:{keywords:["caption","speech","thinking","mad"],"char":"\ud83d\uddef",fitzpatrick_scale:!1,category:"symbols"},speech_balloon:{keywords:["bubble","words","message","talk","chatting"],"char":"\ud83d\udcac",fitzpatrick_scale:!1,category:"symbols"},left_speech_bubble:{keywords:["words","message","talk","chatting"],"char":"\ud83d\udde8",fitzpatrick_scale:!1,category:"symbols"},clock1:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd50",fitzpatrick_scale:!1,category:"symbols"},clock2:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd51",fitzpatrick_scale:!1,category:"symbols"},clock3:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd52",fitzpatrick_scale:!1,category:"symbols"},clock4:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd53",fitzpatrick_scale:!1,category:"symbols"},clock5:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd54",fitzpatrick_scale:!1,category:"symbols"},clock6:{keywords:["time","late","early","schedule","dawn","dusk"],"char":"\ud83d\udd55",fitzpatrick_scale:!1,category:"symbols"},clock7:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd56",fitzpatrick_scale:!1,category:"symbols"},clock8:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd57",fitzpatrick_scale:!1,category:"symbols"},clock9:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd58",fitzpatrick_scale:!1,category:"symbols"},clock10:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd59",fitzpatrick_scale:!1,category:"symbols"},clock11:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd5a",fitzpatrick_scale:!1,category:"symbols"},clock12:{keywords:["time","noon","midnight","midday","late","early","schedule"],"char":"\ud83d\udd5b",fitzpatrick_scale:!1,category:"symbols"},clock130:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd5c",fitzpatrick_scale:!1,category:"symbols"},clock230:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd5d",fitzpatrick_scale:!1,category:"symbols"},clock330:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd5e",fitzpatrick_scale:!1,category:"symbols"},clock430:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd5f",fitzpatrick_scale:!1,category:"symbols"},clock530:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd60",fitzpatrick_scale:!1,category:"symbols"},clock630:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd61",fitzpatrick_scale:!1,category:"symbols"},clock730:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd62",fitzpatrick_scale:!1,category:"symbols"},clock830:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd63",fitzpatrick_scale:!1,category:"symbols"},clock930:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd64",fitzpatrick_scale:!1,category:"symbols"},clock1030:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd65",fitzpatrick_scale:!1,category:"symbols"},clock1130:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd66",fitzpatrick_scale:!1,category:"symbols"},clock1230:{keywords:["time","late","early","schedule"],"char":"\ud83d\udd67",fitzpatrick_scale:!1,category:"symbols"},afghanistan:{keywords:["af","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddeb",fitzpatrick_scale:!1,category:"flags"},aland_islands:{keywords:["\xc5land","islands","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddfd",fitzpatrick_scale:!1,category:"flags"},albania:{keywords:["al","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddf1",fitzpatrick_scale:!1,category:"flags"},algeria:{keywords:["dz","flag","nation","country","banner"],"char":"\ud83c\udde9\ud83c\uddff",fitzpatrick_scale:!1,category:"flags"},american_samoa:{keywords:["american","ws","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddf8",fitzpatrick_scale:!1,category:"flags"},andorra:{keywords:["ad","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\udde9",fitzpatrick_scale:!1,category:"flags"},angola:{keywords:["ao","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddf4",fitzpatrick_scale:!1,category:"flags"},anguilla:{keywords:["ai","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddee",fitzpatrick_scale:!1,category:"flags"},antarctica:{keywords:["aq","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddf6",fitzpatrick_scale:!1,category:"flags"},antigua_barbuda:{keywords:["antigua","barbuda","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddec",fitzpatrick_scale:!1,category:"flags"},argentina:{keywords:["ar","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},armenia:{keywords:["am","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},aruba:{keywords:["aw","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddfc",fitzpatrick_scale:!1,category:"flags"},australia:{keywords:["au","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddfa",fitzpatrick_scale:!1,category:"flags"},austria:{keywords:["at","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddf9",fitzpatrick_scale:!1,category:"flags"},azerbaijan:{keywords:["az","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddff",fitzpatrick_scale:!1,category:"flags"},bahamas:{keywords:["bs","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddf8",fitzpatrick_scale:!1,category:"flags"},bahrain:{keywords:["bh","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\udded",fitzpatrick_scale:!1,category:"flags"},bangladesh:{keywords:["bd","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\udde9",fitzpatrick_scale:!1,category:"flags"},barbados:{keywords:["bb","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\udde7",fitzpatrick_scale:!1,category:"flags"},belarus:{keywords:["by","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddfe",fitzpatrick_scale:!1,category:"flags"},belgium:{keywords:["be","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},belize:{keywords:["bz","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddff",fitzpatrick_scale:!1,category:"flags"},benin:{keywords:["bj","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddef",fitzpatrick_scale:!1,category:"flags"},bermuda:{keywords:["bm","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},bhutan:{keywords:["bt","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddf9",fitzpatrick_scale:!1,category:"flags"},bolivia:{keywords:["bo","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddf4",fitzpatrick_scale:!1,category:"flags"},caribbean_netherlands:{keywords:["bonaire","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddf6",fitzpatrick_scale:!1,category:"flags"},bosnia_herzegovina:{keywords:["bosnia","herzegovina","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\udde6",fitzpatrick_scale:!1,category:"flags"},botswana:{keywords:["bw","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddfc",fitzpatrick_scale:!1,category:"flags"},brazil:{keywords:["br","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},british_indian_ocean_territory:{keywords:["british","indian","ocean","territory","flag","nation","country","banner"],"char":"\ud83c\uddee\ud83c\uddf4",fitzpatrick_scale:!1,category:"flags"},british_virgin_islands:{keywords:["british","virgin","islands","bvi","flag","nation","country","banner"],"char":"\ud83c\uddfb\ud83c\uddec",fitzpatrick_scale:!1,category:"flags"},brunei:{keywords:["bn","darussalam","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddf3",fitzpatrick_scale:!1,category:"flags"},bulgaria:{keywords:["bg","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddec",fitzpatrick_scale:!1,category:"flags"},burkina_faso:{keywords:["burkina","faso","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddeb",fitzpatrick_scale:!1,category:"flags"},burundi:{keywords:["bi","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddee",fitzpatrick_scale:!1,category:"flags"},cape_verde:{keywords:["cabo","verde","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\uddfb",fitzpatrick_scale:!1,category:"flags"},cambodia:{keywords:["kh","flag","nation","country","banner"],"char":"\ud83c\uddf0\ud83c\udded",fitzpatrick_scale:!1,category:"flags"},cameroon:{keywords:["cm","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},canada:{keywords:["ca","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\udde6",fitzpatrick_scale:!1,category:"flags"},canary_islands:{keywords:["canary","islands","flag","nation","country","banner"],"char":"\ud83c\uddee\ud83c\udde8",fitzpatrick_scale:!1,category:"flags"},cayman_islands:{keywords:["cayman","islands","flag","nation","country","banner"],"char":"\ud83c\uddf0\ud83c\uddfe",fitzpatrick_scale:!1,category:"flags"},central_african_republic:{keywords:["central","african","republic","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\uddeb",fitzpatrick_scale:!1,category:"flags"},chad:{keywords:["td","flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\udde9",fitzpatrick_scale:!1,category:"flags"},chile:{keywords:["flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\uddf1",fitzpatrick_scale:!1,category:"flags"},cn:{keywords:["china","chinese","prc","flag","country","nation","banner"],"char":"\ud83c\udde8\ud83c\uddf3",fitzpatrick_scale:!1,category:"flags"},christmas_island:{keywords:["christmas","island","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\uddfd",fitzpatrick_scale:!1,category:"flags"},cocos_islands:{keywords:["cocos","keeling","islands","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\udde8",fitzpatrick_scale:!1,category:"flags"},colombia:{keywords:["co","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\uddf4",fitzpatrick_scale:!1,category:"flags"},comoros:{keywords:["km","flag","nation","country","banner"],"char":"\ud83c\uddf0\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},congo_brazzaville:{keywords:["congo","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\uddec",fitzpatrick_scale:!1,category:"flags"},congo_kinshasa:{keywords:["congo","democratic","republic","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\udde9",fitzpatrick_scale:!1,category:"flags"},cook_islands:{keywords:["cook","islands","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\uddf0",fitzpatrick_scale:!1,category:"flags"},costa_rica:{keywords:["costa","rica","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},croatia:{keywords:["hr","flag","nation","country","banner"],"char":"\ud83c\udded\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},cuba:{keywords:["cu","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\uddfa",fitzpatrick_scale:!1,category:"flags"},curacao:{keywords:["cura\xe7ao","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\uddfc",fitzpatrick_scale:!1,category:"flags"},cyprus:{keywords:["cy","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\uddfe",fitzpatrick_scale:!1,category:"flags"},czech_republic:{keywords:["cz","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\uddff",fitzpatrick_scale:!1,category:"flags"},denmark:{keywords:["dk","flag","nation","country","banner"],"char":"\ud83c\udde9\ud83c\uddf0",fitzpatrick_scale:!1,category:"flags"},djibouti:{keywords:["dj","flag","nation","country","banner"],"char":"\ud83c\udde9\ud83c\uddef",fitzpatrick_scale:!1,category:"flags"},dominica:{keywords:["dm","flag","nation","country","banner"],"char":"\ud83c\udde9\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},dominican_republic:{keywords:["dominican","republic","flag","nation","country","banner"],"char":"\ud83c\udde9\ud83c\uddf4",fitzpatrick_scale:!1,category:"flags"},ecuador:{keywords:["ec","flag","nation","country","banner"],"char":"\ud83c\uddea\ud83c\udde8",fitzpatrick_scale:!1,category:"flags"},egypt:{keywords:["eg","flag","nation","country","banner"],"char":"\ud83c\uddea\ud83c\uddec",fitzpatrick_scale:!1,category:"flags"},el_salvador:{keywords:["el","salvador","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddfb",fitzpatrick_scale:!1,category:"flags"},equatorial_guinea:{keywords:["equatorial","gn","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddf6",fitzpatrick_scale:!1,category:"flags"},eritrea:{keywords:["er","flag","nation","country","banner"],"char":"\ud83c\uddea\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},estonia:{keywords:["ee","flag","nation","country","banner"],"char":"\ud83c\uddea\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},ethiopia:{keywords:["et","flag","nation","country","banner"],"char":"\ud83c\uddea\ud83c\uddf9",fitzpatrick_scale:!1,category:"flags"},eu:{keywords:["european","union","flag","banner"],"char":"\ud83c\uddea\ud83c\uddfa",fitzpatrick_scale:!1,category:"flags"},falkland_islands:{keywords:["falkland","islands","malvinas","flag","nation","country","banner"],"char":"\ud83c\uddeb\ud83c\uddf0",fitzpatrick_scale:!1,category:"flags"},faroe_islands:{keywords:["faroe","islands","flag","nation","country","banner"],"char":"\ud83c\uddeb\ud83c\uddf4",fitzpatrick_scale:!1,category:"flags"},fiji:{keywords:["fj","flag","nation","country","banner"],"char":"\ud83c\uddeb\ud83c\uddef",fitzpatrick_scale:!1,category:"flags"},finland:{keywords:["fi","flag","nation","country","banner"],"char":"\ud83c\uddeb\ud83c\uddee",fitzpatrick_scale:!1,category:"flags"},fr:{keywords:["banner","flag","nation","france","french","country"],"char":"\ud83c\uddeb\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},french_guiana:{keywords:["french","guiana","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddeb",fitzpatrick_scale:!1,category:"flags"},french_polynesia:{keywords:["french","polynesia","flag","nation","country","banner"],"char":"\ud83c\uddf5\ud83c\uddeb",fitzpatrick_scale:!1,category:"flags"},french_southern_territories:{keywords:["french","southern","territories","flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\uddeb",fitzpatrick_scale:!1,category:"flags"},gabon:{keywords:["ga","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\udde6",fitzpatrick_scale:!1,category:"flags"},gambia:{keywords:["gm","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},georgia:{keywords:["ge","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},de:{keywords:["german","nation","flag","country","banner"],"char":"\ud83c\udde9\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},ghana:{keywords:["gh","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\udded",fitzpatrick_scale:!1,category:"flags"},gibraltar:{keywords:["gi","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddee",fitzpatrick_scale:!1,category:"flags"},greece:{keywords:["gr","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},greenland:{keywords:["gl","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddf1",fitzpatrick_scale:!1,category:"flags"},grenada:{keywords:["gd","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\udde9",fitzpatrick_scale:!1,category:"flags"},guadeloupe:{keywords:["gp","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddf5",fitzpatrick_scale:!1,category:"flags"},guam:{keywords:["gu","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddfa",fitzpatrick_scale:!1,category:"flags"},guatemala:{keywords:["gt","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddf9",fitzpatrick_scale:!1,category:"flags"},guernsey:{keywords:["gg","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddec",fitzpatrick_scale:!1,category:"flags"},guinea:{keywords:["gn","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddf3",fitzpatrick_scale:!1,category:"flags"},guinea_bissau:{keywords:["gw","bissau","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddfc",fitzpatrick_scale:!1,category:"flags"},guyana:{keywords:["gy","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddfe",fitzpatrick_scale:!1,category:"flags"},haiti:{keywords:["ht","flag","nation","country","banner"],"char":"\ud83c\udded\ud83c\uddf9",fitzpatrick_scale:!1,category:"flags"},honduras:{keywords:["hn","flag","nation","country","banner"],"char":"\ud83c\udded\ud83c\uddf3",fitzpatrick_scale:!1,category:"flags"},hong_kong:{keywords:["hong","kong","flag","nation","country","banner"],"char":"\ud83c\udded\ud83c\uddf0",fitzpatrick_scale:!1,category:"flags"},hungary:{keywords:["hu","flag","nation","country","banner"],"char":"\ud83c\udded\ud83c\uddfa",fitzpatrick_scale:!1,category:"flags"},iceland:{keywords:["is","flag","nation","country","banner"],"char":"\ud83c\uddee\ud83c\uddf8",fitzpatrick_scale:!1,category:"flags"},india:{keywords:["in","flag","nation","country","banner"],"char":"\ud83c\uddee\ud83c\uddf3",fitzpatrick_scale:!1,category:"flags"},indonesia:{keywords:["flag","nation","country","banner"],"char":"\ud83c\uddee\ud83c\udde9",fitzpatrick_scale:!1,category:"flags"},iran:{keywords:["iran,","islamic","republic","flag","nation","country","banner"],"char":"\ud83c\uddee\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},iraq:{keywords:["iq","flag","nation","country","banner"],"char":"\ud83c\uddee\ud83c\uddf6",fitzpatrick_scale:!1,category:"flags"},ireland:{keywords:["ie","flag","nation","country","banner"],"char":"\ud83c\uddee\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},isle_of_man:{keywords:["isle","man","flag","nation","country","banner"],"char":"\ud83c\uddee\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},israel:{keywords:["il","flag","nation","country","banner"],"char":"\ud83c\uddee\ud83c\uddf1",fitzpatrick_scale:!1,category:"flags"},it:{keywords:["italy","flag","nation","country","banner"],"char":"\ud83c\uddee\ud83c\uddf9",fitzpatrick_scale:!1,category:"flags"},cote_divoire:{keywords:["ivory","coast","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\uddee",fitzpatrick_scale:!1,category:"flags"},jamaica:{keywords:["jm","flag","nation","country","banner"],"char":"\ud83c\uddef\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},jp:{keywords:["japanese","nation","flag","country","banner"],"char":"\ud83c\uddef\ud83c\uddf5",fitzpatrick_scale:!1,category:"flags"},jersey:{keywords:["je","flag","nation","country","banner"],"char":"\ud83c\uddef\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},jordan:{keywords:["jo","flag","nation","country","banner"],"char":"\ud83c\uddef\ud83c\uddf4",fitzpatrick_scale:!1,category:"flags"},kazakhstan:{keywords:["kz","flag","nation","country","banner"],"char":"\ud83c\uddf0\ud83c\uddff",fitzpatrick_scale:!1,category:"flags"},kenya:{keywords:["ke","flag","nation","country","banner"],"char":"\ud83c\uddf0\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},kiribati:{keywords:["ki","flag","nation","country","banner"],"char":"\ud83c\uddf0\ud83c\uddee",fitzpatrick_scale:!1,category:"flags"},kosovo:{keywords:["xk","flag","nation","country","banner"],"char":"\ud83c\uddfd\ud83c\uddf0",fitzpatrick_scale:!1,category:"flags"},kuwait:{keywords:["kw","flag","nation","country","banner"],"char":"\ud83c\uddf0\ud83c\uddfc",fitzpatrick_scale:!1,category:"flags"},kyrgyzstan:{keywords:["kg","flag","nation","country","banner"],"char":"\ud83c\uddf0\ud83c\uddec",fitzpatrick_scale:!1,category:"flags"},laos:{keywords:["lao","democratic","republic","flag","nation","country","banner"],"char":"\ud83c\uddf1\ud83c\udde6",fitzpatrick_scale:!1,category:"flags"},latvia:{keywords:["lv","flag","nation","country","banner"],"char":"\ud83c\uddf1\ud83c\uddfb",fitzpatrick_scale:!1,category:"flags"},lebanon:{keywords:["lb","flag","nation","country","banner"],"char":"\ud83c\uddf1\ud83c\udde7",fitzpatrick_scale:!1,category:"flags"},lesotho:{keywords:["ls","flag","nation","country","banner"],"char":"\ud83c\uddf1\ud83c\uddf8",fitzpatrick_scale:!1,category:"flags"},liberia:{keywords:["lr","flag","nation","country","banner"],"char":"\ud83c\uddf1\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},libya:{keywords:["ly","flag","nation","country","banner"],"char":"\ud83c\uddf1\ud83c\uddfe",fitzpatrick_scale:!1,category:"flags"},liechtenstein:{keywords:["li","flag","nation","country","banner"],"char":"\ud83c\uddf1\ud83c\uddee",fitzpatrick_scale:!1,category:"flags"},lithuania:{keywords:["lt","flag","nation","country","banner"],"char":"\ud83c\uddf1\ud83c\uddf9",fitzpatrick_scale:!1,category:"flags"},luxembourg:{keywords:["lu","flag","nation","country","banner"],"char":"\ud83c\uddf1\ud83c\uddfa",fitzpatrick_scale:!1,category:"flags"},macau:{keywords:["macao","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddf4",fitzpatrick_scale:!1,category:"flags"},macedonia:{keywords:["macedonia,","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddf0",fitzpatrick_scale:!1,category:"flags"},madagascar:{keywords:["mg","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddec",fitzpatrick_scale:!1,category:"flags"},malawi:{keywords:["mw","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddfc",fitzpatrick_scale:!1,category:"flags"},malaysia:{keywords:["my","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddfe",fitzpatrick_scale:!1,category:"flags"},maldives:{keywords:["mv","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddfb",fitzpatrick_scale:!1,category:"flags"},mali:{keywords:["ml","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddf1",fitzpatrick_scale:!1,category:"flags"},malta:{keywords:["mt","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddf9",fitzpatrick_scale:!1,category:"flags"},marshall_islands:{keywords:["marshall","islands","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\udded",fitzpatrick_scale:!1,category:"flags"},martinique:{keywords:["mq","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddf6",fitzpatrick_scale:!1,category:"flags"},mauritania:{keywords:["mr","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},mauritius:{keywords:["mu","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddfa",fitzpatrick_scale:!1,category:"flags"},mayotte:{keywords:["yt","flag","nation","country","banner"],"char":"\ud83c\uddfe\ud83c\uddf9",fitzpatrick_scale:!1,category:"flags"},mexico:{keywords:["mx","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddfd",fitzpatrick_scale:!1,category:"flags"},micronesia:{keywords:["micronesia,","federated","states","flag","nation","country","banner"],"char":"\ud83c\uddeb\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},moldova:{keywords:["moldova,","republic","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\udde9",fitzpatrick_scale:!1,category:"flags"},monaco:{keywords:["mc","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\udde8",fitzpatrick_scale:!1,category:"flags"},mongolia:{keywords:["mn","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddf3",fitzpatrick_scale:!1,category:"flags"},montenegro:{keywords:["me","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},montserrat:{keywords:["ms","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddf8",fitzpatrick_scale:!1,category:"flags"},morocco:{keywords:["ma","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\udde6",fitzpatrick_scale:!1,category:"flags"},mozambique:{keywords:["mz","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddff",fitzpatrick_scale:!1,category:"flags"},myanmar:{keywords:["mm","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},namibia:{keywords:["na","flag","nation","country","banner"],"char":"\ud83c\uddf3\ud83c\udde6",fitzpatrick_scale:!1,category:"flags"},nauru:{keywords:["nr","flag","nation","country","banner"],"char":"\ud83c\uddf3\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},nepal:{keywords:["np","flag","nation","country","banner"],"char":"\ud83c\uddf3\ud83c\uddf5",fitzpatrick_scale:!1,category:"flags"},netherlands:{keywords:["nl","flag","nation","country","banner"],"char":"\ud83c\uddf3\ud83c\uddf1",fitzpatrick_scale:!1,category:"flags"},new_caledonia:{keywords:["new","caledonia","flag","nation","country","banner"],"char":"\ud83c\uddf3\ud83c\udde8",fitzpatrick_scale:!1,category:"flags"},new_zealand:{keywords:["new","zealand","flag","nation","country","banner"],"char":"\ud83c\uddf3\ud83c\uddff",fitzpatrick_scale:!1,category:"flags"},nicaragua:{keywords:["ni","flag","nation","country","banner"],"char":"\ud83c\uddf3\ud83c\uddee",fitzpatrick_scale:!1,category:"flags"},niger:{keywords:["ne","flag","nation","country","banner"],"char":"\ud83c\uddf3\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},nigeria:{keywords:["flag","nation","country","banner"],"char":"\ud83c\uddf3\ud83c\uddec",fitzpatrick_scale:!1,category:"flags"},niue:{keywords:["nu","flag","nation","country","banner"],"char":"\ud83c\uddf3\ud83c\uddfa",fitzpatrick_scale:!1,category:"flags"},norfolk_island:{keywords:["norfolk","island","flag","nation","country","banner"],"char":"\ud83c\uddf3\ud83c\uddeb",fitzpatrick_scale:!1,category:"flags"},northern_mariana_islands:{keywords:["northern","mariana","islands","flag","nation","country","banner"],"char":"\ud83c\uddf2\ud83c\uddf5",fitzpatrick_scale:!1,category:"flags"},north_korea:{keywords:["north","korea","nation","flag","country","banner"],"char":"\ud83c\uddf0\ud83c\uddf5",fitzpatrick_scale:!1,category:"flags"},norway:{keywords:["no","flag","nation","country","banner"],"char":"\ud83c\uddf3\ud83c\uddf4",fitzpatrick_scale:!1,category:"flags"},oman:{keywords:["om_symbol","flag","nation","country","banner"],"char":"\ud83c\uddf4\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},pakistan:{keywords:["pk","flag","nation","country","banner"],"char":"\ud83c\uddf5\ud83c\uddf0",fitzpatrick_scale:!1,category:"flags"},palau:{keywords:["pw","flag","nation","country","banner"],"char":"\ud83c\uddf5\ud83c\uddfc",fitzpatrick_scale:!1,category:"flags"},palestinian_territories:{keywords:["palestine","palestinian","territories","flag","nation","country","banner"],"char":"\ud83c\uddf5\ud83c\uddf8",fitzpatrick_scale:!1,category:"flags"},panama:{keywords:["pa","flag","nation","country","banner"],"char":"\ud83c\uddf5\ud83c\udde6",fitzpatrick_scale:!1,category:"flags"},papua_new_guinea:{keywords:["papua","new","guinea","flag","nation","country","banner"],"char":"\ud83c\uddf5\ud83c\uddec",fitzpatrick_scale:!1,category:"flags"},paraguay:{keywords:["py","flag","nation","country","banner"],"char":"\ud83c\uddf5\ud83c\uddfe",fitzpatrick_scale:!1,category:"flags"},peru:{keywords:["pe","flag","nation","country","banner"],"char":"\ud83c\uddf5\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},philippines:{keywords:["ph","flag","nation","country","banner"],"char":"\ud83c\uddf5\ud83c\udded",fitzpatrick_scale:!1,category:"flags"},pitcairn_islands:{keywords:["pitcairn","flag","nation","country","banner"],"char":"\ud83c\uddf5\ud83c\uddf3",fitzpatrick_scale:!1,category:"flags"},poland:{keywords:["pl","flag","nation","country","banner"],"char":"\ud83c\uddf5\ud83c\uddf1",fitzpatrick_scale:!1,category:"flags"},portugal:{keywords:["pt","flag","nation","country","banner"],"char":"\ud83c\uddf5\ud83c\uddf9",fitzpatrick_scale:!1,category:"flags"},puerto_rico:{keywords:["puerto","rico","flag","nation","country","banner"],"char":"\ud83c\uddf5\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},qatar:{keywords:["qa","flag","nation","country","banner"],"char":"\ud83c\uddf6\ud83c\udde6",fitzpatrick_scale:!1,category:"flags"},reunion:{keywords:["r\xe9union","flag","nation","country","banner"],"char":"\ud83c\uddf7\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},romania:{keywords:["ro","flag","nation","country","banner"],"char":"\ud83c\uddf7\ud83c\uddf4",fitzpatrick_scale:!1,category:"flags"},ru:{keywords:["russian","federation","flag","nation","country","banner"],"char":"\ud83c\uddf7\ud83c\uddfa",fitzpatrick_scale:!1,category:"flags"},rwanda:{keywords:["rw","flag","nation","country","banner"],"char":"\ud83c\uddf7\ud83c\uddfc",fitzpatrick_scale:!1,category:"flags"},st_barthelemy:{keywords:["saint","barth\xe9lemy","flag","nation","country","banner"],"char":"\ud83c\udde7\ud83c\uddf1",fitzpatrick_scale:!1,category:"flags"},st_helena:{keywords:["saint","helena","ascension","tristan","cunha","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\udded",fitzpatrick_scale:!1,category:"flags"},st_kitts_nevis:{keywords:["saint","kitts","nevis","flag","nation","country","banner"],"char":"\ud83c\uddf0\ud83c\uddf3",fitzpatrick_scale:!1,category:"flags"},st_lucia:{keywords:["saint","lucia","flag","nation","country","banner"],"char":"\ud83c\uddf1\ud83c\udde8",fitzpatrick_scale:!1,category:"flags"},st_pierre_miquelon:{keywords:["saint","pierre","miquelon","flag","nation","country","banner"],"char":"\ud83c\uddf5\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},st_vincent_grenadines:{keywords:["saint","vincent","grenadines","flag","nation","country","banner"],"char":"\ud83c\uddfb\ud83c\udde8",fitzpatrick_scale:!1,category:"flags"},samoa:{keywords:["ws","flag","nation","country","banner"],"char":"\ud83c\uddfc\ud83c\uddf8",fitzpatrick_scale:!1,category:"flags"},san_marino:{keywords:["san","marino","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},sao_tome_principe:{keywords:["sao","tome","principe","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddf9",fitzpatrick_scale:!1,category:"flags"},saudi_arabia:{keywords:["flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\udde6",fitzpatrick_scale:!1,category:"flags"},senegal:{keywords:["sn","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddf3",fitzpatrick_scale:!1,category:"flags"},serbia:{keywords:["rs","flag","nation","country","banner"],"char":"\ud83c\uddf7\ud83c\uddf8",fitzpatrick_scale:!1,category:"flags"},seychelles:{keywords:["sc","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\udde8",fitzpatrick_scale:!1,category:"flags"},sierra_leone:{keywords:["sierra","leone","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddf1",fitzpatrick_scale:!1,category:"flags"},singapore:{keywords:["sg","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddec",fitzpatrick_scale:!1,category:"flags"},sint_maarten:{keywords:["sint","maarten","dutch","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddfd",fitzpatrick_scale:!1,category:"flags"},slovakia:{keywords:["sk","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddf0",fitzpatrick_scale:!1,category:"flags"},slovenia:{keywords:["si","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddee",fitzpatrick_scale:!1,category:"flags"},solomon_islands:{keywords:["solomon","islands","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\udde7",fitzpatrick_scale:!1,category:"flags"},somalia:{keywords:["so","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddf4",fitzpatrick_scale:!1,category:"flags"},south_africa:{keywords:["south","africa","flag","nation","country","banner"],"char":"\ud83c\uddff\ud83c\udde6",fitzpatrick_scale:!1,category:"flags"},south_georgia_south_sandwich_islands:{keywords:["south","georgia","sandwich","islands","flag","nation","country","banner"],"char":"\ud83c\uddec\ud83c\uddf8",fitzpatrick_scale:!1,category:"flags"},kr:{keywords:["south","korea","nation","flag","country","banner"],"char":"\ud83c\uddf0\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},south_sudan:{keywords:["south","sd","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddf8",fitzpatrick_scale:!1,category:"flags"},es:{keywords:["spain","flag","nation","country","banner"],"char":"\ud83c\uddea\ud83c\uddf8",fitzpatrick_scale:!1,category:"flags"},sri_lanka:{keywords:["sri","lanka","flag","nation","country","banner"],"char":"\ud83c\uddf1\ud83c\uddf0",fitzpatrick_scale:!1,category:"flags"},sudan:{keywords:["sd","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\udde9",fitzpatrick_scale:!1,category:"flags"},suriname:{keywords:["sr","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},swaziland:{keywords:["sz","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddff",fitzpatrick_scale:!1,category:"flags"},sweden:{keywords:["se","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},switzerland:{keywords:["ch","flag","nation","country","banner"],"char":"\ud83c\udde8\ud83c\udded",fitzpatrick_scale:!1,category:"flags"},syria:{keywords:["syrian","arab","republic","flag","nation","country","banner"],"char":"\ud83c\uddf8\ud83c\uddfe",fitzpatrick_scale:!1,category:"flags"},taiwan:{keywords:["tw","flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\uddfc",fitzpatrick_scale:!1,category:"flags"},tajikistan:{keywords:["tj","flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\uddef",fitzpatrick_scale:!1,category:"flags"},tanzania:{keywords:["tanzania,","united","republic","flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\uddff",fitzpatrick_scale:!1,category:"flags"},thailand:{keywords:["th","flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\udded",fitzpatrick_scale:!1,category:"flags"},timor_leste:{keywords:["timor","leste","flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\uddf1",fitzpatrick_scale:!1,category:"flags"},togo:{keywords:["tg","flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\uddec",fitzpatrick_scale:!1,category:"flags"},tokelau:{keywords:["tk","flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\uddf0",fitzpatrick_scale:!1,category:"flags"},tonga:{keywords:["to","flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\uddf4",fitzpatrick_scale:!1,category:"flags"},trinidad_tobago:{keywords:["trinidad","tobago","flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\uddf9",fitzpatrick_scale:!1,category:"flags"},tunisia:{keywords:["tn","flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\uddf3",fitzpatrick_scale:!1,category:"flags"},tr:{keywords:["turkey","flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\uddf7",fitzpatrick_scale:!1,category:"flags"},turkmenistan:{keywords:["flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},turks_caicos_islands:{keywords:["turks","caicos","islands","flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\udde8",fitzpatrick_scale:!1,category:"flags"},tuvalu:{keywords:["flag","nation","country","banner"],"char":"\ud83c\uddf9\ud83c\uddfb",fitzpatrick_scale:!1,category:"flags"},uganda:{keywords:["ug","flag","nation","country","banner"],"char":"\ud83c\uddfa\ud83c\uddec",fitzpatrick_scale:!1,category:"flags"},ukraine:{keywords:["ua","flag","nation","country","banner"],"char":"\ud83c\uddfa\ud83c\udde6",fitzpatrick_scale:!1,category:"flags"},united_arab_emirates:{keywords:["united","arab","emirates","flag","nation","country","banner"],"char":"\ud83c\udde6\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},uk:{keywords:["united","kingdom","great","britain","northern","ireland","flag","nation","country","banner","british","UK","english","england","union jack"],"char":"\ud83c\uddec\ud83c\udde7",fitzpatrick_scale:!1,category:"flags"},england:{keywords:["flag","english"],"char":"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f",fitzpatrick_scale:!1,category:"flags"},scotland:{keywords:["flag","scottish"],"char":"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f",fitzpatrick_scale:!1,category:"flags"},wales:{keywords:["flag","welsh"],"char":"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f",fitzpatrick_scale:!1,category:"flags"},us:{keywords:["united","states","america","flag","nation","country","banner"],"char":"\ud83c\uddfa\ud83c\uddf8",fitzpatrick_scale:!1,category:"flags"},us_virgin_islands:{keywords:["virgin","islands","us","flag","nation","country","banner"],"char":"\ud83c\uddfb\ud83c\uddee",fitzpatrick_scale:!1,category:"flags"},uruguay:{keywords:["uy","flag","nation","country","banner"],"char":"\ud83c\uddfa\ud83c\uddfe",fitzpatrick_scale:!1,category:"flags"},uzbekistan:{keywords:["uz","flag","nation","country","banner"],"char":"\ud83c\uddfa\ud83c\uddff",fitzpatrick_scale:!1,category:"flags"},vanuatu:{keywords:["vu","flag","nation","country","banner"],"char":"\ud83c\uddfb\ud83c\uddfa",fitzpatrick_scale:!1,category:"flags"},vatican_city:{keywords:["vatican","city","flag","nation","country","banner"],"char":"\ud83c\uddfb\ud83c\udde6",fitzpatrick_scale:!1,category:"flags"},venezuela:{keywords:["ve","bolivarian","republic","flag","nation","country","banner"],"char":"\ud83c\uddfb\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},vietnam:{keywords:["viet","nam","flag","nation","country","banner"],"char":"\ud83c\uddfb\ud83c\uddf3",fitzpatrick_scale:!1,category:"flags"},wallis_futuna:{keywords:["wallis","futuna","flag","nation","country","banner"],"char":"\ud83c\uddfc\ud83c\uddeb",fitzpatrick_scale:!1,category:"flags"},western_sahara:{keywords:["western","sahara","flag","nation","country","banner"],"char":"\ud83c\uddea\ud83c\udded",fitzpatrick_scale:!1,category:"flags"},yemen:{keywords:["ye","flag","nation","country","banner"],"char":"\ud83c\uddfe\ud83c\uddea",fitzpatrick_scale:!1,category:"flags"},zambia:{keywords:["zm","flag","nation","country","banner"],"char":"\ud83c\uddff\ud83c\uddf2",fitzpatrick_scale:!1,category:"flags"},zimbabwe:{keywords:["zw","flag","nation","country","banner"],"char":"\ud83c\uddff\ud83c\uddfc",fitzpatrick_scale:!1,category:"flags"}});

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/emoticons/plugin.js
@@ -1,1 +1,565 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var exists = function (xs, pred) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return true;
+        }
+      }
+      return false;
+    };
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+
+    var contains = function (str, substr) {
+      return str.indexOf(substr) !== -1;
+    };
+
+    var emojiMatches = function (emoji, lowerCasePattern) {
+      return contains(emoji.title.toLowerCase(), lowerCasePattern) || exists(emoji.keywords, function (k) {
+        return contains(k.toLowerCase(), lowerCasePattern);
+      });
+    };
+    var emojisFrom = function (list, pattern, maxResults) {
+      var matches = [];
+      var lowerCasePattern = pattern.toLowerCase();
+      var reachedLimit = maxResults.fold(function () {
+        return never;
+      }, function (max) {
+        return function (size) {
+          return size >= max;
+        };
+      });
+      for (var i = 0; i < list.length; i++) {
+        if (pattern.length === 0 || emojiMatches(list[i], lowerCasePattern)) {
+          matches.push({
+            value: list[i].char,
+            text: list[i].title,
+            icon: list[i].char
+          });
+          if (reachedLimit(matches.length)) {
+            break;
+          }
+        }
+      }
+      return matches;
+    };
+
+    var init = function (editor, database) {
+      editor.ui.registry.addAutocompleter('emoticons', {
+        ch: ':',
+        columns: 'auto',
+        minChars: 2,
+        fetch: function (pattern, maxResults) {
+          return database.waitForLoad().then(function () {
+            var candidates = database.listAll();
+            return emojisFrom(candidates, pattern, Option.some(maxResults));
+          });
+        },
+        onAction: function (autocompleteApi, rng, value) {
+          editor.selection.setRng(rng);
+          editor.insertContent(value);
+          autocompleteApi.hide();
+        }
+      });
+    };
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var last = function (fn, rate) {
+      var timer = null;
+      var cancel = function () {
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+          timer = null;
+        }
+      };
+      var throttle = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+        }
+        timer = domGlobals.setTimeout(function () {
+          fn.apply(null, args);
+          timer = null;
+        }, rate);
+      };
+      return {
+        cancel: cancel,
+        throttle: throttle
+      };
+    };
+
+    var insertEmoticon = function (editor, ch) {
+      editor.insertContent(ch);
+    };
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+
+    var hasOwnProperty = Object.prototype.hasOwnProperty;
+    var shallow = function (old, nu) {
+      return nu;
+    };
+    var baseMerge = function (merger) {
+      return function () {
+        var objects = new Array(arguments.length);
+        for (var i = 0; i < objects.length; i++) {
+          objects[i] = arguments[i];
+        }
+        if (objects.length === 0) {
+          throw new Error('Can\'t merge zero objects');
+        }
+        var ret = {};
+        for (var j = 0; j < objects.length; j++) {
+          var curObject = objects[j];
+          for (var key in curObject) {
+            if (hasOwnProperty.call(curObject, key)) {
+              ret[key] = merger(ret[key], curObject[key]);
+            }
+          }
+        }
+        return ret;
+      };
+    };
+    var merge = baseMerge(shallow);
+
+    var keys = Object.keys;
+    var hasOwnProperty$1 = Object.hasOwnProperty;
+    var each = function (obj, f) {
+      var props = keys(obj);
+      for (var k = 0, len = props.length; k < len; k++) {
+        var i = props[k];
+        var x = obj[i];
+        f(x, i);
+      }
+    };
+    var map$1 = function (obj, f) {
+      return tupleMap(obj, function (x, i) {
+        return {
+          k: i,
+          v: f(x, i)
+        };
+      });
+    };
+    var tupleMap = function (obj, f) {
+      var r = {};
+      each(obj, function (x, i) {
+        var tuple = f(x, i);
+        r[tuple.k] = tuple.v;
+      });
+      return r;
+    };
+    var has = function (obj, key) {
+      return hasOwnProperty$1.call(obj, key);
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.Resource');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Delay');
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.Promise');
+
+    var DEFAULT_ID = 'tinymce.plugins.emoticons';
+    var getEmoticonDatabaseUrl = function (editor, pluginUrl) {
+      return editor.getParam('emoticons_database_url', pluginUrl + '/js/emojis' + editor.suffix + '.js');
+    };
+    var getEmoticonDatabaseId = function (editor) {
+      return editor.getParam('emoticons_database_id', DEFAULT_ID, 'string');
+    };
+    var getAppendedEmoticons = function (editor) {
+      return editor.getParam('emoticons_append', {}, 'object');
+    };
+
+    var ALL_CATEGORY = 'All';
+    var categoryNameMap = {
+      symbols: 'Symbols',
+      people: 'People',
+      animals_and_nature: 'Animals and Nature',
+      food_and_drink: 'Food and Drink',
+      activity: 'Activity',
+      travel_and_places: 'Travel and Places',
+      objects: 'Objects',
+      flags: 'Flags',
+      user: 'User Defined'
+    };
+    var translateCategory = function (categories, name) {
+      return has(categories, name) ? categories[name] : name;
+    };
+    var getUserDefinedEmoticons = function (editor) {
+      var userDefinedEmoticons = getAppendedEmoticons(editor);
+      return map$1(userDefinedEmoticons, function (value) {
+        return __assign({
+          keywords: [],
+          category: 'user'
+        }, value);
+      });
+    };
+    var initDatabase = function (editor, databaseUrl, databaseId) {
+      var categories = Cell(Option.none());
+      var all = Cell(Option.none());
+      var processEmojis = function (emojis) {
+        var cats = {};
+        var everything = [];
+        each(emojis, function (lib, title) {
+          var entry = {
+            title: title,
+            keywords: lib.keywords,
+            char: lib.char,
+            category: translateCategory(categoryNameMap, lib.category)
+          };
+          var current = cats[entry.category] !== undefined ? cats[entry.category] : [];
+          cats[entry.category] = current.concat([entry]);
+          everything.push(entry);
+        });
+        categories.set(Option.some(cats));
+        all.set(Option.some(everything));
+      };
+      editor.on('init', function () {
+        global$1.load(databaseId, databaseUrl).then(function (emojis) {
+          var userEmojis = getUserDefinedEmoticons(editor);
+          processEmojis(merge(emojis, userEmojis));
+        }, function (err) {
+          domGlobals.console.log('Failed to load emoticons: ' + err);
+          categories.set(Option.some({}));
+          all.set(Option.some([]));
+        });
+      });
+      var listCategory = function (category) {
+        if (category === ALL_CATEGORY) {
+          return listAll();
+        }
+        return categories.get().bind(function (cats) {
+          return Option.from(cats[category]);
+        }).getOr([]);
+      };
+      var listAll = function () {
+        return all.get().getOr([]);
+      };
+      var listCategories = function () {
+        return [ALL_CATEGORY].concat(keys(categories.get().getOr({})));
+      };
+      var waitForLoad = function () {
+        if (hasLoaded()) {
+          return global$3.resolve(true);
+        } else {
+          return new global$3(function (resolve, reject) {
+            var numRetries = 15;
+            var interval = global$2.setInterval(function () {
+              if (hasLoaded()) {
+                global$2.clearInterval(interval);
+                resolve(true);
+              } else {
+                numRetries--;
+                if (numRetries < 0) {
+                  domGlobals.console.log('Could not load emojis from url: ' + databaseUrl);
+                  global$2.clearInterval(interval);
+                  reject(false);
+                }
+              }
+            }, 100);
+          });
+        }
+      };
+      var hasLoaded = function () {
+        return categories.get().isSome() && all.get().isSome();
+      };
+      return {
+        listCategories: listCategories,
+        hasLoaded: hasLoaded,
+        waitForLoad: waitForLoad,
+        listAll: listAll,
+        listCategory: listCategory
+      };
+    };
+
+    var patternName = 'pattern';
+    var open = function (editor, database) {
+      var initialState = {
+        pattern: '',
+        results: emojisFrom(database.listAll(), '', Option.some(300))
+      };
+      var currentTab = Cell(ALL_CATEGORY);
+      var scan = function (dialogApi) {
+        var dialogData = dialogApi.getData();
+        var category = currentTab.get();
+        var candidates = database.listCategory(category);
+        var results = emojisFrom(candidates, dialogData[patternName], category === ALL_CATEGORY ? Option.some(300) : Option.none());
+        dialogApi.setData({ results: results });
+      };
+      var updateFilter = last(function (dialogApi) {
+        scan(dialogApi);
+      }, 200);
+      var searchField = {
+        label: 'Search',
+        type: 'input',
+        name: patternName
+      };
+      var resultsField = {
+        type: 'collection',
+        name: 'results'
+      };
+      var getInitialState = function () {
+        var body = {
+          type: 'tabpanel',
+          tabs: map(database.listCategories(), function (cat) {
+            return {
+              title: cat,
+              name: cat,
+              items: [
+                searchField,
+                resultsField
+              ]
+            };
+          })
+        };
+        return {
+          title: 'Emoticons',
+          size: 'normal',
+          body: body,
+          initialData: initialState,
+          onTabChange: function (dialogApi, details) {
+            currentTab.set(details.newTabName);
+            updateFilter.throttle(dialogApi);
+          },
+          onChange: updateFilter.throttle,
+          onAction: function (dialogApi, actionData) {
+            if (actionData.name === 'results') {
+              insertEmoticon(editor, actionData.value);
+              dialogApi.close();
+            }
+          },
+          buttons: [{
+              type: 'cancel',
+              text: 'Close',
+              primary: true
+            }]
+        };
+      };
+      var dialogApi = editor.windowManager.open(getInitialState());
+      dialogApi.focus(patternName);
+      if (!database.hasLoaded()) {
+        dialogApi.block('Loading emoticons...');
+        database.waitForLoad().then(function () {
+          dialogApi.redial(getInitialState());
+          updateFilter.throttle(dialogApi);
+          dialogApi.focus(patternName);
+          dialogApi.unblock();
+        }).catch(function (_err) {
+          dialogApi.redial({
+            title: 'Emoticons',
+            body: {
+              type: 'panel',
+              items: [{
+                  type: 'alertbanner',
+                  level: 'error',
+                  icon: 'warning',
+                  text: '<p>Could not load emoticons</p>'
+                }]
+            },
+            buttons: [{
+                type: 'cancel',
+                text: 'Close',
+                primary: true
+              }],
+            initialData: {
+              pattern: '',
+              results: []
+            }
+          });
+          dialogApi.focus(patternName);
+          dialogApi.unblock();
+        });
+      }
+    };
+
+    var register = function (editor, database) {
+      var onAction = function () {
+        return open(editor, database);
+      };
+      editor.ui.registry.addButton('emoticons', {
+        tooltip: 'Emoticons',
+        icon: 'emoji',
+        onAction: onAction
+      });
+      editor.ui.registry.addMenuItem('emoticons', {
+        text: 'Emoticons...',
+        icon: 'emoji',
+        onAction: onAction
+      });
+    };
+
+    function Plugin () {
+      global.add('emoticons', function (editor, pluginUrl) {
+        var databaseUrl = getEmoticonDatabaseUrl(editor, pluginUrl);
+        var databaseId = getEmoticonDatabaseId(editor);
+        var database = initDatabase(editor, databaseUrl, databaseId);
+        register(editor, database);
+        init(editor, database);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/emoticons/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(m){"use strict";var n,t,e,u,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n){return function(){return n}},a=i(!1),c=i(!0),r=function(){return l},l=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:a,isSome:a,isNone:c,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:e,orThunk:t,map:r,each:function(){},bind:r,exists:a,forall:c,filter:r,equals:n,equals_:n,toArray:function(){return[]},toString:i("none()")}),s=function(e){var n=i(e),t=function(){return r},o=function(n){return n(e)},r={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:c,isNone:a,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return s(n(e))},each:function(n){n(e)},bind:o,exists:o,forall:o,filter:function(n){return n(e)?r:l},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(a,function(n){return t(e,n)})}};return r},g={some:s,none:r,from:function(n){return null===n||n===undefined?l:s(n)}},f=function(n,t){return-1!==n.indexOf(t)},d=function(n,t){return f(n.title.toLowerCase(),t)||function(n,t){for(var e=0,o=n.length;e<o;e++){if(t(n[e],e))return!0}return!1}(n.keywords,function(n){return f(n.toLowerCase(),t)})},y=function(n,t,e){for(var o=[],r=t.toLowerCase(),i=e.fold(function(){return a},function(t){return function(n){return t<=n}}),u=0;u<n.length&&(0!==t.length&&!d(n[u],r)||(o.push({value:n[u]["char"],text:n[u].title,icon:n[u]["char"]}),!i(o.length)));u++);return o},h=function(n){var t=n;return{get:function(){return t},set:function(n){t=n}}},v=function(){return(v=Object.assign||function(n){for(var t,e=1,o=arguments.length;e<o;e++)for(var r in t=arguments[e])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}).apply(this,arguments)},p=Object.prototype.hasOwnProperty,b=(u=function(n,t){return t},function(){for(var n=new Array(arguments.length),t=0;t<n.length;t++)n[t]=arguments[t];if(0===n.length)throw new Error("Can't merge zero objects");for(var e={},o=0;o<n.length;o++){var r=n[o];for(var i in r)p.call(r,i)&&(e[i]=u(e[i],r[i]))}return e}),w=Object.keys,O=Object.hasOwnProperty,C=function(n,t){for(var e=w(n),o=0,r=e.length;o<r;o++){var i=e[o];t(n[i],i)}},k=function(n,o){var r={};return C(n,function(n,t){var e=o(n,t);r[e.k]=e.v}),r},j=tinymce.util.Tools.resolve("tinymce.Resource"),A=tinymce.util.Tools.resolve("tinymce.util.Delay"),T=tinymce.util.Tools.resolve("tinymce.util.Promise"),_="All",D={symbols:"Symbols",people:"People",animals_and_nature:"Animals and Nature",food_and_drink:"Food and Drink",activity:"Activity",travel_and_places:"Travel and Places",objects:"Objects",flags:"Flags",user:"User Defined"},P=function(n,t){return e=n,o=t,O.call(e,o)?n[t]:t;var e,o},x=function(n){var e,t=n.getParam("emoticons_append",{},"object");return e=function(n){return v({keywords:[],category:"user"},n)},k(t,function(n,t){return{k:t,v:e(n,t)}})},L=function(o,r,n){var u=h(g.none()),a=h(g.none());o.on("init",function(){j.load(n,r).then(function(n){var t,r,i,e=x(o);t=b(n,e),r={},i=[],C(t,function(n,t){var e={title:t,keywords:n.keywords,"char":n["char"],category:P(D,n.category)},o=r[e.category]!==undefined?r[e.category]:[];r[e.category]=o.concat([e]),i.push(e)}),u.set(g.some(r)),a.set(g.some(i))},function(n){m.console.log("Failed to load emoticons: "+n),u.set(g.some({})),a.set(g.some([]))})});var e=function(){return a.get().getOr([])},i=function(){return u.get().isSome()&&a.get().isSome()};return{listCategories:function(){return[_].concat(w(u.get().getOr({})))},hasLoaded:i,waitForLoad:function(){return i()?T.resolve(!0):new T(function(n,t){var e=15,o=A.setInterval(function(){i()?(A.clearInterval(o),n(!0)):--e<0&&(m.console.log("Could not load emojis from url: "+r),A.clearInterval(o),t(!1))},100)})},listAll:e,listCategory:function(t){return t===_?e():u.get().bind(function(n){return g.from(n[t])}).getOr([])}}},S="pattern",N=function(r,u){var e,o,i,n={pattern:"",results:y(u.listAll(),"",g.some(300))},a=h(_),c=(e=function(n){var t,e,o,r,i;e=(t=n).getData(),o=a.get(),r=u.listCategory(o),i=y(r,e[S],o===_?g.some(300):g.none()),t.setData({results:i})},o=200,i=null,{cancel:function(){null!==i&&(m.clearTimeout(i),i=null)},throttle:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];null!==i&&m.clearTimeout(i),i=m.setTimeout(function(){e.apply(null,n),i=null},o)}}),t={label:"Search",type:"input",name:S},l={type:"collection",name:"results"},s=function(){return{title:"Emoticons",size:"normal",body:{type:"tabpanel",tabs:function(n,t){for(var e=n.length,o=new Array(e),r=0;r<e;r++){var i=n[r];o[r]=t(i,r)}return o}(u.listCategories(),function(n){return{title:n,name:n,items:[t,l]}})},initialData:n,onTabChange:function(n,t){a.set(t.newTabName),c.throttle(n)},onChange:c.throttle,onAction:function(n,t){var e,o;"results"===t.name&&(e=r,o=t.value,e.insertContent(o),n.close())},buttons:[{type:"cancel",text:"Close",primary:!0}]}},f=r.windowManager.open(s());f.focus(S),u.hasLoaded()||(f.block("Loading emoticons..."),u.waitForLoad().then(function(){f.redial(s()),c.throttle(f),f.focus(S),f.unblock()})["catch"](function(n){f.redial({title:"Emoticons",body:{type:"panel",items:[{type:"alertbanner",level:"error",icon:"warning",text:"<p>Could not load emoticons</p>"}]},buttons:[{type:"cancel",text:"Close",primary:!0}],initialData:{pattern:"",results:[]}}),f.focus(S),f.unblock()}))};!function E(){o.add("emoticons",function(n,t){var e,o,r,i,u,a,c,l=(o=t,(e=n).getParam("emoticons_database_url",o+"/js/emojis"+e.suffix+".js")),s=n.getParam("emoticons_database_id","tinymce.plugins.emoticons","string"),f=L(n,l,s);i=f,u=function(){return N(r,i)},(r=n).ui.registry.addButton("emoticons",{tooltip:"Emoticons",icon:"emoji",onAction:u}),r.ui.registry.addMenuItem("emoticons",{text:"Emoticons...",icon:"emoji",onAction:u}),c=f,(a=n).ui.registry.addAutocompleter("emoticons",{ch:":",columns:"auto",minChars:2,fetch:function(t,e){return c.waitForLoad().then(function(){var n=c.listAll();return y(n,t,g.some(e))})},onAction:function(n,t,e){a.selection.setRng(t),a.insertContent(e),n.hide()}})})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/fullpage/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "fullpage" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/fullpage')
+//   ES2015:
+//     import 'tinymce/plugins/fullpage'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/fullpage/plugin.js
@@ -1,1 +1,542 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.html.DomParser');
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.html.Node');
+
+    var global$4 = tinymce.util.Tools.resolve('tinymce.html.Serializer');
+
+    var shouldHideInSourceView = function (editor) {
+      return editor.getParam('fullpage_hide_in_source_view');
+    };
+    var getDefaultXmlPi = function (editor) {
+      return editor.getParam('fullpage_default_xml_pi');
+    };
+    var getDefaultEncoding = function (editor) {
+      return editor.getParam('fullpage_default_encoding');
+    };
+    var getDefaultFontFamily = function (editor) {
+      return editor.getParam('fullpage_default_font_family');
+    };
+    var getDefaultFontSize = function (editor) {
+      return editor.getParam('fullpage_default_font_size');
+    };
+    var getDefaultTextColor = function (editor) {
+      return editor.getParam('fullpage_default_text_color');
+    };
+    var getDefaultTitle = function (editor) {
+      return editor.getParam('fullpage_default_title');
+    };
+    var getDefaultDocType = function (editor) {
+      return editor.getParam('fullpage_default_doctype', '<!DOCTYPE html>');
+    };
+
+    var parseHeader = function (head) {
+      return global$2({
+        validate: false,
+        root_name: '#document'
+      }).parse(head, { format: 'xhtml' });
+    };
+    var htmlToData = function (editor, head) {
+      var headerFragment = parseHeader(head);
+      var data = {};
+      var elm, matches;
+      function getAttr(elm, name) {
+        var value = elm.attr(name);
+        return value || '';
+      }
+      data.fontface = getDefaultFontFamily(editor);
+      data.fontsize = getDefaultFontSize(editor);
+      elm = headerFragment.firstChild;
+      if (elm.type === 7) {
+        data.xml_pi = true;
+        matches = /encoding="([^"]+)"/.exec(elm.value);
+        if (matches) {
+          data.docencoding = matches[1];
+        }
+      }
+      elm = headerFragment.getAll('#doctype')[0];
+      if (elm) {
+        data.doctype = '<!DOCTYPE' + elm.value + '>';
+      }
+      elm = headerFragment.getAll('title')[0];
+      if (elm && elm.firstChild) {
+        data.title = elm.firstChild.value;
+      }
+      global$1.each(headerFragment.getAll('meta'), function (meta) {
+        var name = meta.attr('name');
+        var httpEquiv = meta.attr('http-equiv');
+        var matches;
+        if (name) {
+          data[name.toLowerCase()] = meta.attr('content');
+        } else if (httpEquiv === 'Content-Type') {
+          matches = /charset\s*=\s*(.*)\s*/gi.exec(meta.attr('content'));
+          if (matches) {
+            data.docencoding = matches[1];
+          }
+        }
+      });
+      elm = headerFragment.getAll('html')[0];
+      if (elm) {
+        data.langcode = getAttr(elm, 'lang') || getAttr(elm, 'xml:lang');
+      }
+      data.stylesheets = [];
+      global$1.each(headerFragment.getAll('link'), function (link) {
+        if (link.attr('rel') === 'stylesheet') {
+          data.stylesheets.push(link.attr('href'));
+        }
+      });
+      elm = headerFragment.getAll('body')[0];
+      if (elm) {
+        data.langdir = getAttr(elm, 'dir');
+        data.style = getAttr(elm, 'style');
+        data.visited_color = getAttr(elm, 'vlink');
+        data.link_color = getAttr(elm, 'link');
+        data.active_color = getAttr(elm, 'alink');
+      }
+      return data;
+    };
+    var dataToHtml = function (editor, data, head) {
+      var headerFragment, headElement, html, elm, value;
+      var dom = editor.dom;
+      function setAttr(elm, name, value) {
+        elm.attr(name, value ? value : undefined);
+      }
+      function addHeadNode(node) {
+        if (headElement.firstChild) {
+          headElement.insert(node, headElement.firstChild);
+        } else {
+          headElement.append(node);
+        }
+      }
+      headerFragment = parseHeader(head);
+      headElement = headerFragment.getAll('head')[0];
+      if (!headElement) {
+        elm = headerFragment.getAll('html')[0];
+        headElement = new global$3('head', 1);
+        if (elm.firstChild) {
+          elm.insert(headElement, elm.firstChild, true);
+        } else {
+          elm.append(headElement);
+        }
+      }
+      elm = headerFragment.firstChild;
+      if (data.xml_pi) {
+        value = 'version="1.0"';
+        if (data.docencoding) {
+          value += ' encoding="' + data.docencoding + '"';
+        }
+        if (elm.type !== 7) {
+          elm = new global$3('xml', 7);
+          headerFragment.insert(elm, headerFragment.firstChild, true);
+        }
+        elm.value = value;
+      } else if (elm && elm.type === 7) {
+        elm.remove();
+      }
+      elm = headerFragment.getAll('#doctype')[0];
+      if (data.doctype) {
+        if (!elm) {
+          elm = new global$3('#doctype', 10);
+          if (data.xml_pi) {
+            headerFragment.insert(elm, headerFragment.firstChild);
+          } else {
+            addHeadNode(elm);
+          }
+        }
+        elm.value = data.doctype.substring(9, data.doctype.length - 1);
+      } else if (elm) {
+        elm.remove();
+      }
+      elm = null;
+      global$1.each(headerFragment.getAll('meta'), function (meta) {
+        if (meta.attr('http-equiv') === 'Content-Type') {
+          elm = meta;
+        }
+      });
+      if (data.docencoding) {
+        if (!elm) {
+          elm = new global$3('meta', 1);
+          elm.attr('http-equiv', 'Content-Type');
+          elm.shortEnded = true;
+          addHeadNode(elm);
+        }
+        elm.attr('content', 'text/html; charset=' + data.docencoding);
+      } else if (elm) {
+        elm.remove();
+      }
+      elm = headerFragment.getAll('title')[0];
+      if (data.title) {
+        if (!elm) {
+          elm = new global$3('title', 1);
+          addHeadNode(elm);
+        } else {
+          elm.empty();
+        }
+        elm.append(new global$3('#text', 3)).value = data.title;
+      } else if (elm) {
+        elm.remove();
+      }
+      global$1.each('keywords,description,author,copyright,robots'.split(','), function (name) {
+        var nodes = headerFragment.getAll('meta');
+        var i, meta;
+        var value = data[name];
+        for (i = 0; i < nodes.length; i++) {
+          meta = nodes[i];
+          if (meta.attr('name') === name) {
+            if (value) {
+              meta.attr('content', value);
+            } else {
+              meta.remove();
+            }
+            return;
+          }
+        }
+        if (value) {
+          elm = new global$3('meta', 1);
+          elm.attr('name', name);
+          elm.attr('content', value);
+          elm.shortEnded = true;
+          addHeadNode(elm);
+        }
+      });
+      var currentStyleSheetsMap = {};
+      global$1.each(headerFragment.getAll('link'), function (stylesheet) {
+        if (stylesheet.attr('rel') === 'stylesheet') {
+          currentStyleSheetsMap[stylesheet.attr('href')] = stylesheet;
+        }
+      });
+      global$1.each(data.stylesheets, function (stylesheet) {
+        if (!currentStyleSheetsMap[stylesheet]) {
+          elm = new global$3('link', 1);
+          elm.attr({
+            rel: 'stylesheet',
+            text: 'text/css',
+            href: stylesheet
+          });
+          elm.shortEnded = true;
+          addHeadNode(elm);
+        }
+        delete currentStyleSheetsMap[stylesheet];
+      });
+      global$1.each(currentStyleSheetsMap, function (stylesheet) {
+        stylesheet.remove();
+      });
+      elm = headerFragment.getAll('body')[0];
+      if (elm) {
+        setAttr(elm, 'dir', data.langdir);
+        setAttr(elm, 'style', data.style);
+        setAttr(elm, 'vlink', data.visited_color);
+        setAttr(elm, 'link', data.link_color);
+        setAttr(elm, 'alink', data.active_color);
+        dom.setAttribs(editor.getBody(), {
+          style: data.style,
+          dir: data.dir,
+          vLink: data.visited_color,
+          link: data.link_color,
+          aLink: data.active_color
+        });
+      }
+      elm = headerFragment.getAll('html')[0];
+      if (elm) {
+        setAttr(elm, 'lang', data.langcode);
+        setAttr(elm, 'xml:lang', data.langcode);
+      }
+      if (!headElement.firstChild) {
+        headElement.remove();
+      }
+      html = global$4({
+        validate: false,
+        indent: true,
+        indent_before: 'head,html,body,meta,title,script,link,style',
+        indent_after: 'head,html,body,meta,title,script,link,style'
+      }).serialize(headerFragment);
+      return html.substring(0, html.indexOf('</body>'));
+    };
+
+    var open = function (editor, headState) {
+      var data = htmlToData(editor, headState.get());
+      var defaultData = {
+        title: '',
+        keywords: '',
+        description: '',
+        robots: '',
+        author: '',
+        docencoding: ''
+      };
+      var initialData = __assign(__assign({}, defaultData), data);
+      editor.windowManager.open({
+        title: 'Metadata and Document Properties',
+        size: 'normal',
+        body: {
+          type: 'panel',
+          items: [
+            {
+              name: 'title',
+              type: 'input',
+              label: 'Title'
+            },
+            {
+              name: 'keywords',
+              type: 'input',
+              label: 'Keywords'
+            },
+            {
+              name: 'description',
+              type: 'input',
+              label: 'Description'
+            },
+            {
+              name: 'robots',
+              type: 'input',
+              label: 'Robots'
+            },
+            {
+              name: 'author',
+              type: 'input',
+              label: 'Author'
+            },
+            {
+              name: 'docencoding',
+              type: 'input',
+              label: 'Encoding'
+            }
+          ]
+        },
+        buttons: [
+          {
+            type: 'cancel',
+            name: 'cancel',
+            text: 'Cancel'
+          },
+          {
+            type: 'submit',
+            name: 'save',
+            text: 'Save',
+            primary: true
+          }
+        ],
+        initialData: initialData,
+        onSubmit: function (api) {
+          var nuData = api.getData();
+          var headHtml = dataToHtml(editor, global$1.extend(data, nuData), headState.get());
+          headState.set(headHtml);
+          api.close();
+        }
+      });
+    };
+
+    var register = function (editor, headState) {
+      editor.addCommand('mceFullPageProperties', function () {
+        open(editor, headState);
+      });
+    };
+
+    var protectHtml = function (protect, html) {
+      global$1.each(protect, function (pattern) {
+        html = html.replace(pattern, function (str) {
+          return '<!--mce:protected ' + escape(str) + '-->';
+        });
+      });
+      return html;
+    };
+    var unprotectHtml = function (html) {
+      return html.replace(/<!--mce:protected ([\s\S]*?)-->/g, function (a, m) {
+        return unescape(m);
+      });
+    };
+
+    var each = global$1.each;
+    var low = function (s) {
+      return s.replace(/<\/?[A-Z]+/g, function (a) {
+        return a.toLowerCase();
+      });
+    };
+    var handleSetContent = function (editor, headState, footState, evt) {
+      var startPos, endPos, content, headerFragment, styles = '';
+      var dom = editor.dom;
+      if (evt.selection) {
+        return;
+      }
+      content = protectHtml(editor.settings.protect, evt.content);
+      if (evt.format === 'raw' && headState.get()) {
+        return;
+      }
+      if (evt.source_view && shouldHideInSourceView(editor)) {
+        return;
+      }
+      if (content.length === 0 && !evt.source_view) {
+        content = global$1.trim(headState.get()) + '\n' + global$1.trim(content) + '\n' + global$1.trim(footState.get());
+      }
+      content = content.replace(/<(\/?)BODY/gi, '<$1body');
+      startPos = content.indexOf('<body');
+      if (startPos !== -1) {
+        startPos = content.indexOf('>', startPos);
+        headState.set(low(content.substring(0, startPos + 1)));
+        endPos = content.indexOf('</body', startPos);
+        if (endPos === -1) {
+          endPos = content.length;
+        }
+        evt.content = global$1.trim(content.substring(startPos + 1, endPos));
+        footState.set(low(content.substring(endPos)));
+      } else {
+        headState.set(getDefaultHeader(editor));
+        footState.set('\n</body>\n</html>');
+      }
+      headerFragment = parseHeader(headState.get());
+      each(headerFragment.getAll('style'), function (node) {
+        if (node.firstChild) {
+          styles += node.firstChild.value;
+        }
+      });
+      var bodyElm = headerFragment.getAll('body')[0];
+      if (bodyElm) {
+        dom.setAttribs(editor.getBody(), {
+          style: bodyElm.attr('style') || '',
+          dir: bodyElm.attr('dir') || '',
+          vLink: bodyElm.attr('vlink') || '',
+          link: bodyElm.attr('link') || '',
+          aLink: bodyElm.attr('alink') || ''
+        });
+      }
+      dom.remove('fullpage_styles');
+      var headElm = editor.getDoc().getElementsByTagName('head')[0];
+      if (styles) {
+        var styleElm = dom.add(headElm, 'style', { id: 'fullpage_styles' });
+        styleElm.appendChild(domGlobals.document.createTextNode(styles));
+      }
+      var currentStyleSheetsMap = {};
+      global$1.each(headElm.getElementsByTagName('link'), function (stylesheet) {
+        if (stylesheet.rel === 'stylesheet' && stylesheet.getAttribute('data-mce-fullpage')) {
+          currentStyleSheetsMap[stylesheet.href] = stylesheet;
+        }
+      });
+      global$1.each(headerFragment.getAll('link'), function (stylesheet) {
+        var href = stylesheet.attr('href');
+        if (!href) {
+          return true;
+        }
+        if (!currentStyleSheetsMap[href] && stylesheet.attr('rel') === 'stylesheet') {
+          dom.add(headElm, 'link', {
+            'rel': 'stylesheet',
+            'text': 'text/css',
+            href: href,
+            'data-mce-fullpage': '1'
+          });
+        }
+        delete currentStyleSheetsMap[href];
+      });
+      global$1.each(currentStyleSheetsMap, function (stylesheet) {
+        stylesheet.parentNode.removeChild(stylesheet);
+      });
+    };
+    var getDefaultHeader = function (editor) {
+      var header = '', value, styles = '';
+      if (getDefaultXmlPi(editor)) {
+        var piEncoding = getDefaultEncoding(editor);
+        header += '<?xml version="1.0" encoding="' + (piEncoding ? piEncoding : 'ISO-8859-1') + '" ?>\n';
+      }
+      header += getDefaultDocType(editor);
+      header += '\n<html>\n<head>\n';
+      if (value = getDefaultTitle(editor)) {
+        header += '<title>' + value + '</title>\n';
+      }
+      if (value = getDefaultEncoding(editor)) {
+        header += '<meta http-equiv="Content-Type" content="text/html; charset=' + value + '" />\n';
+      }
+      if (value = getDefaultFontFamily(editor)) {
+        styles += 'font-family: ' + value + ';';
+      }
+      if (value = getDefaultFontSize(editor)) {
+        styles += 'font-size: ' + value + ';';
+      }
+      if (value = getDefaultTextColor(editor)) {
+        styles += 'color: ' + value + ';';
+      }
+      header += '</head>\n<body' + (styles ? ' style="' + styles + '"' : '') + '>\n';
+      return header;
+    };
+    var handleGetContent = function (editor, head, foot, evt) {
+      if (!evt.selection && (!evt.source_view || !shouldHideInSourceView(editor))) {
+        evt.content = unprotectHtml(global$1.trim(head) + '\n' + global$1.trim(evt.content) + '\n' + global$1.trim(foot));
+      }
+    };
+    var setup = function (editor, headState, footState) {
+      editor.on('BeforeSetContent', function (evt) {
+        handleSetContent(editor, headState, footState, evt);
+      });
+      editor.on('GetContent', function (evt) {
+        handleGetContent(editor, headState.get(), footState.get(), evt);
+      });
+    };
+
+    var register$1 = function (editor) {
+      editor.ui.registry.addButton('fullpage', {
+        tooltip: 'Metadata and document properties',
+        icon: 'document-properties',
+        onAction: function () {
+          editor.execCommand('mceFullPageProperties');
+        }
+      });
+      editor.ui.registry.addMenuItem('fullpage', {
+        text: 'Metadata and document properties',
+        icon: 'document-properties',
+        onAction: function () {
+          editor.execCommand('mceFullPageProperties');
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('fullpage', function (editor) {
+        var headState = Cell(''), footState = Cell('');
+        register(editor, headState);
+        register$1(editor);
+        setup(editor, headState, footState);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/fullpage/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(p){"use strict";var s=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(){return(u=Object.assign||function(e){for(var t,n=1,l=arguments.length;n<l;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},y=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=tinymce.util.Tools.resolve("tinymce.html.DomParser"),m=tinymce.util.Tools.resolve("tinymce.html.Node"),f=tinymce.util.Tools.resolve("tinymce.html.Serializer"),h=function(e){return e.getParam("fullpage_hide_in_source_view")},o=function(e){return e.getParam("fullpage_default_encoding")},g=function(e){return e.getParam("fullpage_default_font_family")},v=function(e){return e.getParam("fullpage_default_font_size")},_=function(e){return t({validate:!1,root_name:"#document"}).parse(e,{format:"xhtml"})},d=function(l,i){var e,t,n,o,r,a,c=(e=l,t=i.get(),r=_(t),(a={}).fontface=g(e),a.fontsize=v(e),7===(n=r.firstChild).type&&(a.xml_pi=!0,(o=/encoding="([^"]+)"/.exec(n.value))&&(a.docencoding=o[1])),(n=r.getAll("#doctype")[0])&&(a.doctype="<!DOCTYPE"+n.value+">"),(n=r.getAll("title")[0])&&n.firstChild&&(a.title=n.firstChild.value),y.each(r.getAll("meta"),function(e){var t,n=e.attr("name"),l=e.attr("http-equiv");n?a[n.toLowerCase()]=e.attr("content"):"Content-Type"===l&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")))&&(a.docencoding=t[1])}),(n=r.getAll("html")[0])&&(a.langcode=s(n,"lang")||s(n,"xml:lang")),a.stylesheets=[],y.each(r.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&a.stylesheets.push(e.attr("href"))}),(n=r.getAll("body")[0])&&(a.langdir=s(n,"dir"),a.style=s(n,"style"),a.visited_color=s(n,"vlink"),a.link_color=s(n,"link"),a.active_color=s(n,"alink")),a);function s(e,t){return e.attr(t)||""}var d=u(u({},{title:"",keywords:"",description:"",robots:"",author:"",docencoding:""}),c);l.windowManager.open({title:"Metadata and Document Properties",size:"normal",body:{type:"panel",items:[{name:"title",type:"input",label:"Title"},{name:"keywords",type:"input",label:"Keywords"},{name:"description",type:"input",label:"Description"},{name:"robots",type:"input",label:"Robots"},{name:"author",type:"input",label:"Author"},{name:"docencoding",type:"input",label:"Encoding"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:d,onSubmit:function(e){var t=e.getData(),n=function(e,o,t){var r,n,l,a,i,c=e.dom;function s(e,t,n){e.attr(t,n||undefined)}function d(e){n.firstChild?n.insert(e,n.firstChild):n.append(e)}r=_(t),(n=r.getAll("head")[0])||(a=r.getAll("html")[0],n=new m("head",1),a.firstChild?a.insert(n,a.firstChild,!0):a.append(n)),a=r.firstChild,o.xml_pi?(i='version="1.0"',o.docencoding&&(i+=' encoding="'+o.docencoding+'"'),7!==a.type&&(a=new m("xml",7),r.insert(a,r.firstChild,!0)),a.value=i):a&&7===a.type&&a.remove(),a=r.getAll("#doctype")[0],o.doctype?(a||(a=new m("#doctype",10),o.xml_pi?r.insert(a,r.firstChild):d(a)),a.value=o.doctype.substring(9,o.doctype.length-1)):a&&a.remove(),a=null,y.each(r.getAll("meta"),function(e){"Content-Type"===e.attr("http-equiv")&&(a=e)}),o.docencoding?(a||((a=new m("meta",1)).attr("http-equiv","Content-Type"),a.shortEnded=!0,d(a)),a.attr("content","text/html; charset="+o.docencoding)):a&&a.remove(),a=r.getAll("title")[0],o.title?(a?a.empty():d(a=new m("title",1)),a.append(new m("#text",3)).value=o.title):a&&a.remove(),y.each("keywords,description,author,copyright,robots".split(","),function(e){var t,n,l=r.getAll("meta"),i=o[e];for(t=0;t<l.length;t++)if((n=l[t]).attr("name")===e)return void(i?n.attr("content",i):n.remove());i&&((a=new m("meta",1)).attr("name",e),a.attr("content",i),a.shortEnded=!0,d(a))});var u={};return y.each(r.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&(u[e.attr("href")]=e)}),y.each(o.stylesheets,function(e){u[e]||((a=new m("link",1)).attr({rel:"stylesheet",text:"text/css",href:e}),a.shortEnded=!0,d(a)),delete u[e]}),y.each(u,function(e){e.remove()}),(a=r.getAll("body")[0])&&(s(a,"dir",o.langdir),s(a,"style",o.style),s(a,"vlink",o.visited_color),s(a,"link",o.link_color),s(a,"alink",o.active_color),c.setAttribs(e.getBody(),{style:o.style,dir:o.dir,vLink:o.visited_color,link:o.link_color,aLink:o.active_color})),(a=r.getAll("html")[0])&&(s(a,"lang",o.langcode),s(a,"xml:lang",o.langcode)),n.firstChild||n.remove(),(l=f({validate:!1,indent:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(r)).substring(0,l.indexOf("</body>"))}(l,y.extend(c,t),i.get());i.set(n),e.close()}})},b=y.each,x=function(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})},k=function(e,t,n,l){var i,o,r,a,c,s,d="",u=e.dom;if(!l.selection&&(c=e.settings.protect,s=l.content,y.each(c,function(e){s=s.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})}),r=s,!("raw"===l.format&&t.get()||l.source_view&&h(e)))){0!==r.length||l.source_view||(r=y.trim(t.get())+"\n"+y.trim(r)+"\n"+y.trim(n.get())),-1!==(i=(r=r.replace(/<(\/?)BODY/gi,"<$1body")).indexOf("<body"))?(i=r.indexOf(">",i),t.set(x(r.substring(0,i+1))),-1===(o=r.indexOf("</body",i))&&(o=r.length),l.content=y.trim(r.substring(i+1,o)),n.set(x(r.substring(o)))):(t.set(C(e)),n.set("\n</body>\n</html>")),a=_(t.get()),b(a.getAll("style"),function(e){e.firstChild&&(d+=e.firstChild.value)});var m=a.getAll("body")[0];m&&u.setAttribs(e.getBody(),{style:m.attr("style")||"",dir:m.attr("dir")||"",vLink:m.attr("vlink")||"",link:m.attr("link")||"",aLink:m.attr("alink")||""}),u.remove("fullpage_styles");var f=e.getDoc().getElementsByTagName("head")[0];if(d)u.add(f,"style",{id:"fullpage_styles"}).appendChild(p.document.createTextNode(d));var g={};y.each(f.getElementsByTagName("link"),function(e){"stylesheet"===e.rel&&e.getAttribute("data-mce-fullpage")&&(g[e.href]=e)}),y.each(a.getAll("link"),function(e){var t=e.attr("href");if(!t)return!0;g[t]||"stylesheet"!==e.attr("rel")||u.add(f,"link",{rel:"stylesheet",text:"text/css",href:t,"data-mce-fullpage":"1"}),delete g[t]}),y.each(g,function(e){e.parentNode.removeChild(e)})}},C=function(e){var t,n="",l="";if(e.getParam("fullpage_default_xml_pi")){var i=o(e);n+='<?xml version="1.0" encoding="'+(i||"ISO-8859-1")+'" ?>\n'}return n+=e.getParam("fullpage_default_doctype","<!DOCTYPE html>"),n+="\n<html>\n<head>\n",(t=e.getParam("fullpage_default_title"))&&(n+="<title>"+t+"</title>\n"),(t=o(e))&&(n+='<meta http-equiv="Content-Type" content="text/html; charset='+t+'" />\n'),(t=g(e))&&(l+="font-family: "+t+";"),(t=v(e))&&(l+="font-size: "+t+";"),(t=e.getParam("fullpage_default_text_color"))&&(l+="color: "+t+";"),n+="</head>\n<body"+(l?' style="'+l+'"':"")+">\n"},A=function(e,t,n,l){l.selection||l.source_view&&h(e)||(l.content=(y.trim(t)+"\n"+y.trim(l.content)+"\n"+y.trim(n)).replace(/<!--mce:protected ([\s\S]*?)-->/g,function(e,t){return unescape(t)}))};!function n(){e.add("fullpage",function(e){var t,n,l,i,o,r,a=s(""),c=s("");n=a,(t=e).addCommand("mceFullPageProperties",function(){d(t,n)}),(l=e).ui.registry.addButton("fullpage",{tooltip:"Metadata and document properties",icon:"document-properties",onAction:function(){l.execCommand("mceFullPageProperties")}}),l.ui.registry.addMenuItem("fullpage",{text:"Metadata and document properties",icon:"document-properties",onAction:function(){l.execCommand("mceFullPageProperties")}}),o=a,r=c,(i=e).on("BeforeSetContent",function(e){k(i,o,r,e)}),i.on("GetContent",function(e){A(i,o.get(),r.get(),e)})})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/fullscreen/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "fullscreen" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/fullscreen')
+//   ES2015:
+//     import 'tinymce/plugins/fullscreen'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/fullscreen/plugin.js
@@ -1,1 +1,790 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var get = function (fullscreenState) {
+      return {
+        isFullscreen: function () {
+          return fullscreenState.get() !== null;
+        }
+      };
+    };
+
+    var noop = function () {
+    };
+    var compose = function (fa, fb) {
+      return function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        return fa(fb.apply(null, args));
+      };
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var revocable = function (doRevoke) {
+      var subject = Cell(Option.none());
+      var revoke = function () {
+        subject.get().each(doRevoke);
+      };
+      var clear = function () {
+        revoke();
+        subject.set(Option.none());
+      };
+      var set = function (s) {
+        revoke();
+        subject.set(Option.some(s));
+      };
+      var isSet = function () {
+        return subject.get().isSome();
+      };
+      return {
+        clear: clear,
+        isSet: isSet,
+        set: set
+      };
+    };
+    var unbindable = function () {
+      return revocable(function (s) {
+        s.unbind();
+      });
+    };
+    var value = function () {
+      var subject = Cell(Option.none());
+      var clear = function () {
+        subject.set(Option.none());
+      };
+      var set = function (s) {
+        subject.set(Option.some(s));
+      };
+      var on = function (f) {
+        subject.get().each(f);
+      };
+      var isSet = function () {
+        return subject.get().isSome();
+      };
+      return {
+        clear: clear,
+        set: set,
+        isSet: isSet,
+        on: on
+      };
+    };
+
+    var typeOf = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf(value) === type;
+      };
+    };
+    var isSimpleType = function (type) {
+      return function (value) {
+        return typeof value === type;
+      };
+    };
+    var isString = isType('string');
+    var isArray = isType('array');
+    var isBoolean = isSimpleType('boolean');
+    var isFunction = isSimpleType('function');
+    var isNumber = isSimpleType('number');
+
+    var nativePush = Array.prototype.push;
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var each = function (xs, f) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var filter = function (xs, pred) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          r.push(x);
+        }
+      }
+      return r;
+    };
+    var flatten = function (xs) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        if (!isArray(xs[i])) {
+          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
+        }
+        nativePush.apply(r, xs[i]);
+      }
+      return r;
+    };
+    var bind = function (xs, f) {
+      return flatten(map(xs, f));
+    };
+
+    var keys = Object.keys;
+    var each$1 = function (obj, f) {
+      var props = keys(obj);
+      for (var k = 0, len = props.length; k < len; k++) {
+        var i = props[k];
+        var x = obj[i];
+        f(x, i);
+      }
+    };
+
+    var isSupported = function (dom) {
+      return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
+    };
+
+    var fromHtml = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      if (!div.hasChildNodes() || div.childNodes.length > 1) {
+        domGlobals.console.error('HTML does not have a single root node', html);
+        throw new Error('HTML must have a single root node');
+      }
+      return fromDom(div.childNodes[0]);
+    };
+    var fromTag = function (tag, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createElement(tag);
+      return fromDom(node);
+    };
+    var fromText = function (text, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createTextNode(text);
+      return fromDom(node);
+    };
+    var fromDom = function (node) {
+      if (node === null || node === undefined) {
+        throw new Error('Node cannot be null or undefined');
+      }
+      return { dom: constant(node) };
+    };
+    var fromPoint = function (docElm, x, y) {
+      var doc = docElm.dom();
+      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
+    };
+    var Element = {
+      fromHtml: fromHtml,
+      fromTag: fromTag,
+      fromText: fromText,
+      fromDom: fromDom,
+      fromPoint: fromPoint
+    };
+
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
+
+    var DOCUMENT = 9;
+    var ELEMENT = 1;
+    var TEXT = 3;
+
+    var type = function (element) {
+      return element.dom().nodeType;
+    };
+    var isType$1 = function (t) {
+      return function (element) {
+        return type(element) === t;
+      };
+    };
+    var isText = isType$1(TEXT);
+
+    var inBody = function (element) {
+      var dom = isText(element) ? element.dom().parentNode : element.dom();
+      return dom !== undefined && dom !== null && dom.ownerDocument.body.contains(dom);
+    };
+
+    var rawSet = function (dom, key, value) {
+      if (isString(value) || isBoolean(value) || isNumber(value)) {
+        dom.setAttribute(key, value + '');
+      } else {
+        domGlobals.console.error('Invalid call to Attr.set. Key ', key, ':: Value ', value, ':: Element ', dom);
+        throw new Error('Attribute value was not simple');
+      }
+    };
+    var set = function (element, key, value) {
+      rawSet(element.dom(), key, value);
+    };
+    var get$1 = function (element, key) {
+      var v = element.dom().getAttribute(key);
+      return v === null ? undefined : v;
+    };
+    var remove = function (element, key) {
+      element.dom().removeAttribute(key);
+    };
+
+    var internalSet = function (dom, property, value) {
+      if (!isString(value)) {
+        domGlobals.console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);
+        throw new Error('CSS value must be a string: ' + value);
+      }
+      if (isSupported(dom)) {
+        dom.style.setProperty(property, value);
+      }
+    };
+    var setAll = function (element, css) {
+      var dom = element.dom();
+      each$1(css, function (v, k) {
+        internalSet(dom, k, v);
+      });
+    };
+    var get$2 = function (element, property) {
+      var dom = element.dom();
+      var styles = domGlobals.window.getComputedStyle(dom);
+      var r = styles.getPropertyValue(property);
+      return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
+    };
+    var getUnsafeProperty = function (dom, property) {
+      return isSupported(dom) ? dom.style.getPropertyValue(property) : '';
+    };
+
+    var mkEvent = function (target, x, y, stop, prevent, kill, raw) {
+      return {
+        target: constant(target),
+        x: constant(x),
+        y: constant(y),
+        stop: stop,
+        prevent: prevent,
+        kill: kill,
+        raw: constant(raw)
+      };
+    };
+    var fromRawEvent = function (rawEvent) {
+      var target = Element.fromDom(rawEvent.target);
+      var stop = function () {
+        return rawEvent.stopPropagation();
+      };
+      var prevent = function () {
+        return rawEvent.preventDefault();
+      };
+      var kill = compose(prevent, stop);
+      return mkEvent(target, rawEvent.clientX, rawEvent.clientY, stop, prevent, kill, rawEvent);
+    };
+
+    var ELEMENT$1 = ELEMENT;
+    var DOCUMENT$1 = DOCUMENT;
+    var is = function (element, selector) {
+      var dom = element.dom();
+      if (dom.nodeType !== ELEMENT$1) {
+        return false;
+      } else {
+        var elem = dom;
+        if (elem.matches !== undefined) {
+          return elem.matches(selector);
+        } else if (elem.msMatchesSelector !== undefined) {
+          return elem.msMatchesSelector(selector);
+        } else if (elem.webkitMatchesSelector !== undefined) {
+          return elem.webkitMatchesSelector(selector);
+        } else if (elem.mozMatchesSelector !== undefined) {
+          return elem.mozMatchesSelector(selector);
+        } else {
+          throw new Error('Browser lacks native selectors');
+        }
+      }
+    };
+    var bypassSelector = function (dom) {
+      return dom.nodeType !== ELEMENT$1 && dom.nodeType !== DOCUMENT$1 || dom.childElementCount === 0;
+    };
+    var all = function (selector, scope) {
+      var base = scope === undefined ? domGlobals.document : scope.dom();
+      return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), Element.fromDom);
+    };
+
+    var eq = function (e1, e2) {
+      return e1.dom() === e2.dom();
+    };
+
+    var parent = function (element) {
+      return Option.from(element.dom().parentNode).map(Element.fromDom);
+    };
+    var parents = function (element, isRoot) {
+      var stop = isFunction(isRoot) ? isRoot : never;
+      var dom = element.dom();
+      var ret = [];
+      while (dom.parentNode !== null && dom.parentNode !== undefined) {
+        var rawParent = dom.parentNode;
+        var p = Element.fromDom(rawParent);
+        ret.push(p);
+        if (stop(p) === true) {
+          break;
+        } else {
+          dom = rawParent;
+        }
+      }
+      return ret;
+    };
+    var siblings = function (element) {
+      var filterSelf = function (elements) {
+        return filter(elements, function (x) {
+          return !eq(element, x);
+        });
+      };
+      return parent(element).map(children).map(filterSelf).getOr([]);
+    };
+    var children = function (element) {
+      return map(element.dom().childNodes, Element.fromDom);
+    };
+
+    var r = function (left, top) {
+      var translate = function (x, y) {
+        return r(left + x, top + y);
+      };
+      return {
+        left: constant(left),
+        top: constant(top),
+        translate: translate
+      };
+    };
+    var Position = r;
+
+    var get$3 = function (_DOC) {
+      var doc = _DOC !== undefined ? _DOC.dom() : domGlobals.document;
+      var x = doc.body.scrollLeft || doc.documentElement.scrollLeft;
+      var y = doc.body.scrollTop || doc.documentElement.scrollTop;
+      return Position(x, y);
+    };
+
+    var get$4 = function (_win) {
+      var win = _win === undefined ? domGlobals.window : _win;
+      return Option.from(win['visualViewport']);
+    };
+    var bounds = function (x, y, width, height) {
+      return {
+        x: x,
+        y: y,
+        width: width,
+        height: height,
+        right: x + width,
+        bottom: y + height
+      };
+    };
+    var getBounds = function (_win) {
+      var win = _win === undefined ? domGlobals.window : _win;
+      var doc = win.document;
+      var scroll = get$3(Element.fromDom(doc));
+      return get$4(win).fold(function () {
+        var html = win.document.documentElement;
+        var width = html.clientWidth;
+        var height = html.clientHeight;
+        return bounds(scroll.left(), scroll.top(), width, height);
+      }, function (visualViewport) {
+        return bounds(Math.max(visualViewport.pageLeft, scroll.left()), Math.max(visualViewport.pageTop, scroll.top()), visualViewport.width, visualViewport.height);
+      });
+    };
+    var bind$1 = function (name, callback, _win) {
+      return get$4(_win).map(function (visualViewport) {
+        var handler = function (e) {
+          return fromRawEvent(e);
+        };
+        visualViewport.addEventListener(name, handler);
+        return {
+          unbind: function () {
+            return visualViewport.removeEventListener(name, handler);
+          }
+        };
+      }).getOrThunk(function () {
+        return { unbind: noop };
+      });
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.Delay');
+
+    var fireFullscreenStateChanged = function (editor, state) {
+      editor.fire('FullscreenStateChanged', { state: state });
+    };
+
+    var ancestors = function (scope, predicate, isRoot) {
+      return filter(parents(scope, isRoot), predicate);
+    };
+    var siblings$1 = function (scope, predicate) {
+      return filter(siblings(scope), predicate);
+    };
+
+    var all$1 = function (selector) {
+      return all(selector);
+    };
+    var ancestors$1 = function (scope, selector, isRoot) {
+      return ancestors(scope, function (e) {
+        return is(e, selector);
+      }, isRoot);
+    };
+    var siblings$2 = function (scope, selector) {
+      return siblings$1(scope, function (e) {
+        return is(e, selector);
+      });
+    };
+
+    var attr = 'data-ephox-mobile-fullscreen-style';
+    var siblingStyles = 'display:none!important;';
+    var ancestorPosition = 'position:absolute!important;';
+    var ancestorStyles = 'top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;';
+    var bgFallback = 'background-color:rgb(255,255,255)!important;';
+    var isAndroid = global$2.os.isAndroid();
+    var matchColor = function (editorBody) {
+      var color = get$2(editorBody, 'background-color');
+      return color !== undefined && color !== '' ? 'background-color:' + color + '!important' : bgFallback;
+    };
+    var clobberStyles = function (dom, container, editorBody) {
+      var gatherSibilings = function (element) {
+        return siblings$2(element, '*:not(.tox-silver-sink)');
+      };
+      var clobber = function (clobberStyle) {
+        return function (element) {
+          var styles = get$1(element, 'style');
+          var backup = styles === undefined ? 'no-styles' : styles.trim();
+          if (backup === clobberStyle) {
+            return;
+          } else {
+            set(element, attr, backup);
+            setAll(element, dom.parseStyle(clobberStyle));
+          }
+        };
+      };
+      var ancestors = ancestors$1(container, '*');
+      var siblings = bind(ancestors, gatherSibilings);
+      var bgColor = matchColor(editorBody);
+      each(siblings, clobber(siblingStyles));
+      each(ancestors, clobber(ancestorPosition + ancestorStyles + bgColor));
+      var containerStyles = isAndroid === true ? '' : ancestorPosition;
+      clobber(containerStyles + ancestorStyles + bgColor)(container);
+    };
+    var restoreStyles = function (dom) {
+      var clobberedEls = all$1('[' + attr + ']');
+      each(clobberedEls, function (element) {
+        var restore = get$1(element, attr);
+        if (restore !== 'no-styles') {
+          setAll(element, dom.parseStyle(restore));
+        } else {
+          remove(element, 'style');
+        }
+        remove(element, attr);
+      });
+    };
+
+    var DOM = global$1.DOM;
+    var getScrollPos = function () {
+      var vp = getBounds(domGlobals.window);
+      return {
+        x: vp.x,
+        y: vp.y
+      };
+    };
+    var setScrollPos = function (pos) {
+      domGlobals.window.scrollTo(pos.x, pos.y);
+    };
+    var viewportUpdate = get$4().fold(function () {
+      return {
+        bind: noop,
+        unbind: noop
+      };
+    }, function (visualViewport) {
+      var editorContainer = value();
+      var resizeBinder = unbindable();
+      var scrollBinder = unbindable();
+      var refreshScroll = function () {
+        domGlobals.document.body.scrollTop = 0;
+        domGlobals.document.documentElement.scrollTop = 0;
+      };
+      var refreshVisualViewport = function () {
+        domGlobals.window.requestAnimationFrame(function () {
+          editorContainer.on(function (container) {
+            return setAll(container, {
+              top: visualViewport.offsetTop + 'px',
+              left: visualViewport.offsetLeft + 'px',
+              height: visualViewport.height + 'px',
+              width: visualViewport.width + 'px'
+            });
+          });
+        });
+      };
+      var update = global$3.throttle(function () {
+        refreshScroll();
+        refreshVisualViewport();
+      }, 50);
+      var bind = function (element) {
+        editorContainer.set(element);
+        update();
+        resizeBinder.set(bind$1('resize'));
+        scrollBinder.set(bind$1('scroll'));
+      };
+      var unbind = function () {
+        editorContainer.on(function () {
+          resizeBinder.clear();
+          scrollBinder.clear();
+        });
+        editorContainer.clear();
+      };
+      return {
+        bind: bind,
+        unbind: unbind
+      };
+    });
+    var toggleFullscreen = function (editor, fullscreenState) {
+      var body = domGlobals.document.body;
+      var documentElement = domGlobals.document.documentElement;
+      var editorContainerStyle;
+      var editorContainer, iframe, iframeStyle;
+      editorContainer = editor.getContainer();
+      var editorContainerS = Element.fromDom(editorContainer);
+      var fullscreenInfo = fullscreenState.get();
+      var editorBody = Element.fromDom(editor.getBody());
+      var isTouch = global$2.deviceType.isTouch();
+      editorContainerStyle = editorContainer.style;
+      iframe = editor.getContentAreaContainer().firstChild;
+      iframeStyle = iframe.style;
+      if (!fullscreenInfo) {
+        var newFullScreenInfo = {
+          scrollPos: getScrollPos(),
+          containerWidth: editorContainerStyle.width,
+          containerHeight: editorContainerStyle.height,
+          containerTop: editorContainerStyle.top,
+          containerLeft: editorContainerStyle.left,
+          iframeWidth: iframeStyle.width,
+          iframeHeight: iframeStyle.height
+        };
+        if (isTouch) {
+          clobberStyles(editor.dom, editorContainerS, editorBody);
+        }
+        iframeStyle.width = iframeStyle.height = '100%';
+        editorContainerStyle.width = editorContainerStyle.height = '';
+        DOM.addClass(body, 'tox-fullscreen');
+        DOM.addClass(documentElement, 'tox-fullscreen');
+        DOM.addClass(editorContainer, 'tox-fullscreen');
+        viewportUpdate.bind(editorContainerS);
+        editor.on('remove', viewportUpdate.unbind);
+        fullscreenState.set(newFullScreenInfo);
+        fireFullscreenStateChanged(editor, true);
+      } else {
+        iframeStyle.width = fullscreenInfo.iframeWidth;
+        iframeStyle.height = fullscreenInfo.iframeHeight;
+        editorContainerStyle.width = fullscreenInfo.containerWidth;
+        editorContainerStyle.height = fullscreenInfo.containerHeight;
+        editorContainerStyle.top = fullscreenInfo.containerTop;
+        editorContainerStyle.left = fullscreenInfo.containerLeft;
+        if (isTouch) {
+          restoreStyles(editor.dom);
+        }
+        DOM.removeClass(body, 'tox-fullscreen');
+        DOM.removeClass(documentElement, 'tox-fullscreen');
+        DOM.removeClass(editorContainer, 'tox-fullscreen');
+        setScrollPos(fullscreenInfo.scrollPos);
+        fullscreenState.set(null);
+        fireFullscreenStateChanged(editor, false);
+        viewportUpdate.unbind();
+        editor.off('remove', viewportUpdate.unbind);
+      }
+    };
+
+    var register = function (editor, fullscreenState) {
+      editor.addCommand('mceFullScreen', function () {
+        toggleFullscreen(editor, fullscreenState);
+      });
+    };
+
+    var makeSetupHandler = function (editor, fullscreenState) {
+      return function (api) {
+        api.setActive(fullscreenState.get() !== null);
+        var editorEventCallback = function (e) {
+          return api.setActive(e.state);
+        };
+        editor.on('FullscreenStateChanged', editorEventCallback);
+        return function () {
+          return editor.off('FullscreenStateChanged', editorEventCallback);
+        };
+      };
+    };
+    var register$1 = function (editor, fullscreenState) {
+      editor.ui.registry.addToggleMenuItem('fullscreen', {
+        text: 'Fullscreen',
+        icon: 'fullscreen',
+        shortcut: 'Meta+Shift+F',
+        onAction: function () {
+          return editor.execCommand('mceFullScreen');
+        },
+        onSetup: makeSetupHandler(editor, fullscreenState)
+      });
+      editor.ui.registry.addToggleButton('fullscreen', {
+        tooltip: 'Fullscreen',
+        icon: 'fullscreen',
+        onAction: function () {
+          return editor.execCommand('mceFullScreen');
+        },
+        onSetup: makeSetupHandler(editor, fullscreenState)
+      });
+    };
+
+    function Plugin () {
+      global.add('fullscreen', function (editor) {
+        var fullscreenState = Cell(null);
+        if (editor.settings.inline) {
+          return get(fullscreenState);
+        }
+        register(editor, fullscreenState);
+        register$1(editor, fullscreenState);
+        editor.addShortcut('Meta+Shift+F', '', 'mceFullScreen');
+        return get(fullscreenState);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/fullscreen/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(g){"use strict";var n,t,e,r,c=function(n){var t=n;return{get:function(){return t},set:function(n){t=n}}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(n){return{isFullscreen:function(){return null!==n.get()}}},i=function(){},a=function(n){return function(){return n}},l=a(!1),f=a(!0),d=function(){return s},s=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:l,isSome:l,isNone:f,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(undefined),or:e,orThunk:t,map:d,each:i,bind:d,exists:l,forall:f,filter:d,equals:n,equals_:n,toArray:function(){return[]},toString:a("none()")}),m=function(e){var n=a(e),t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:f,isNone:l,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return m(n(e))},each:function(n){n(e)},bind:r,exists:r,forall:r,filter:function(n){return n(e)?o:s},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(l,function(n){return t(e,n)})}};return o},h={some:m,none:d,from:function(n){return null===n||n===undefined?s:m(n)}},p=function(){return n=function(n){n.unbind()},t=c(h.none()),e=function(){t.get().each(n)},{clear:function(){e(),t.set(h.none())},isSet:function(){return t.get().isSome()},set:function(n){e(),t.set(h.some(n))}};var n,t,e},v=function(r){return function(n){return e=typeof(t=n),(null===t?"null":"object"==e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e)===r;var t,e}},y=function(t){return function(n){return typeof n===t}},w=v("string"),b=v("array"),S=y("boolean"),T=y("function"),x=y("number"),C=Array.prototype.push,A=function(n,t){for(var e=n.length,r=new Array(e),o=0;o<e;o++){var i=n[o];r[o]=t(i,o)}return r},E=function(n,t){for(var e=0,r=n.length;e<r;e++){t(n[e],e)}},O=function(n,t){for(var e=[],r=0,o=n.length;r<o;r++){var i=n[r];t(i,r)&&e.push(i)}return e},D=function(n,t){return function(n){for(var t=[],e=0,r=n.length;e<r;++e){if(!b(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);C.apply(t,n[e])}return t}(A(n,t))},M=Object.keys,N=function(n){return n.style!==undefined&&T(n.style.getPropertyValue)},k=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:a(n)}},F={fromHtml:function(n,t){var e=(t||g.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw g.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return k(e.childNodes[0])},fromTag:function(n,t){var e=(t||g.document).createElement(n);return k(e)},fromText:function(n,t){var e=(t||g.document).createTextNode(n);return k(e)},fromDom:k,fromPoint:function(n,t,e){var r=n.dom();return h.from(r.elementFromPoint(t,e)).map(k)}},P=("undefined"!=typeof g.window?g.window:Function("return this;")(),r=3,function(n){return n.dom().nodeType===r}),L=function(n,t,e){!function(n,t,e){if(!(w(e)||S(e)||x(e)))throw g.console.error("Invalid call to Attr.set. Key ",t,":: Value ",e,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(t,e+"")}(n.dom(),t,e)},H=function(n,t){var e=n.dom().getAttribute(t);return null===e?undefined:e},q=function(n,t){n.dom().removeAttribute(t)},V=function(n,t){var e=n.dom();!function(n,t){for(var e=M(n),r=0,o=e.length;r<o;r++){var i=e[r];t(n[i],i)}}(t,function(n,t){!function(n,t,e){if(!w(e))throw g.console.error("Invalid call to CSS.set. Property ",t,":: Value ",e,":: Element ",n),new Error("CSS value must be a string: "+e);N(n)&&n.style.setProperty(t,e)}(e,t,n)})},W=function(n,t){var e,r,o=n.dom(),i=g.window.getComputedStyle(o).getPropertyValue(t);return""!==i||(r=P(e=n)?e.dom().parentNode:e.dom())!==undefined&&null!==r&&r.ownerDocument.body.contains(r)?i:j(o,t)},j=function(n,t){return N(n)?n.style.getPropertyValue(t):""},z=function(n){var e,r,t,o,i,u=F.fromDom(n.target),c=function(){return n.stopPropagation()},l=function(){return n.preventDefault()},f=(e=l,r=c,function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return e(r.apply(null,n))});return t=u,o=n.clientX,i=n.clientY,{target:a(t),x:a(o),y:a(i),stop:c,prevent:l,kill:f,raw:a(n)}},B=function(n,t){var e=n.dom();if(1!==e.nodeType)return!1;var r=e;if(r.matches!==undefined)return r.matches(t);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},I=function(e){var n;return n=e,h.from(n.dom().parentNode).map(F.fromDom).map(U).map(function(n){return O(n,function(n){return t=n,e.dom()!==t.dom();var t})}).getOr([])},U=function(n){return A(n.dom().childNodes,F.fromDom)},_=function(e,r){return{left:a(e),top:a(r),translate:function(n,t){return _(e+n,r+t)}}},K=_,X=function(n){var t=n===undefined?g.window:n;return h.from(t.visualViewport)},Y=function(n,t,e,r){return{x:n,y:t,width:e,height:r,right:n+e,bottom:t+r}},G=function(n){var t,e,r,o,i=n===undefined?g.window:n,u=i.document,c=(t=F.fromDom(u),e=t!==undefined?t.dom():g.document,r=e.body.scrollLeft||e.documentElement.scrollLeft,o=e.body.scrollTop||e.documentElement.scrollTop,K(r,o));return X(i).fold(function(){var n=i.document.documentElement,t=n.clientWidth,e=n.clientHeight;return Y(c.left(),c.top(),t,e)},function(n){return Y(Math.max(n.pageLeft,c.left()),Math.max(n.pageTop,c.top()),n.width,n.height)})},J=function(e,n,t){return X(t).map(function(n){var t=function(n){return z(n)};return n.addEventListener(e,t),{unbind:function(){return n.removeEventListener(e,t)}}}).getOrThunk(function(){return{unbind:i}})},Q=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),R=tinymce.util.Tools.resolve("tinymce.Env"),Z=tinymce.util.Tools.resolve("tinymce.util.Delay"),$=function(n,t){n.fire("FullscreenStateChanged",{state:t})},nn=function(n,t,e){return O(function(n,t){for(var e=T(t)?t:l,r=n.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,u=F.fromDom(i);if(o.push(u),!0===e(u))break;r=i}return o}(n,e),t)},tn=function(n){return t=n,o=e===undefined?g.document:e.dom(),1!==(r=o).nodeType&&9!==r.nodeType||0===r.childElementCount?[]:A(o.querySelectorAll(t),F.fromDom);var t,e,r,o},en=function(n,t){return e=function(n){return B(n,t)},O(I(n),e);var e},rn="data-ephox-mobile-fullscreen-style",on="position:absolute!important;",un="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",cn=R.os.isAndroid(),ln=function(o,n,t){var e,r,i,u=function(r){return function(n){var t=H(n,"style"),e=t===undefined?"no-styles":t.trim();e!==r&&(L(n,rn,e),V(n,o.parseStyle(r)))}},c=(e="*",nn(n,function(n){return B(n,e)},r)),l=D(c,function(n){return en(n,"*:not(.tox-silver-sink)")}),f=(i=W(t,"background-color"))!==undefined&&""!==i?"background-color:"+i+"!important":"background-color:rgb(255,255,255)!important;";E(l,u("display:none!important;")),E(c,u(on+un+f)),u((!0===cn?"":on)+un+f)(n)},fn=Q.DOM,an=X().fold(function(){return{bind:i,unbind:i}},function(t){var e,r=(e=c(h.none()),{clear:function(){e.set(h.none())},set:function(n){e.set(h.some(n))},isSet:function(){return e.get().isSome()},on:function(n){e.get().each(n)}}),o=p(),i=p(),u=Z.throttle(function(){g.document.body.scrollTop=0,g.document.documentElement.scrollTop=0,g.window.requestAnimationFrame(function(){r.on(function(n){return V(n,{top:t.offsetTop+"px",left:t.offsetLeft+"px",height:t.height+"px",width:t.width+"px"})})})},50);return{bind:function(n){r.set(n),u(),o.set(J("resize")),i.set(J("scroll"))},unbind:function(){r.on(function(){o.clear(),i.clear()}),r.clear()}}}),dn=function(n,t){var e,r,o,i=g.document.body,u=g.document.documentElement;r=n.getContainer();var c,l,f,a,d=F.fromDom(r),s=t.get(),m=F.fromDom(n.getBody()),h=R.deviceType.isTouch();if(e=r.style,o=n.getContentAreaContainer().firstChild.style,s)o.width=s.iframeWidth,o.height=s.iframeHeight,e.width=s.containerWidth,e.height=s.containerHeight,e.top=s.containerTop,e.left=s.containerLeft,h&&(l=n.dom,f=tn("["+rn+"]"),E(f,function(n){var t=H(n,rn);"no-styles"!==t?V(n,l.parseStyle(t)):q(n,"style"),q(n,rn)})),fn.removeClass(i,"tox-fullscreen"),fn.removeClass(u,"tox-fullscreen"),fn.removeClass(r,"tox-fullscreen"),c=s.scrollPos,g.window.scrollTo(c.x,c.y),t.set(null),$(n,!1),an.unbind(),n.off("remove",an.unbind);else{var p={scrollPos:{x:(a=G(g.window)).x,y:a.y},containerWidth:e.width,containerHeight:e.height,containerTop:e.top,containerLeft:e.left,iframeWidth:o.width,iframeHeight:o.height};h&&ln(n.dom,d,m),o.width=o.height="100%",e.width=e.height="",fn.addClass(i,"tox-fullscreen"),fn.addClass(u,"tox-fullscreen"),fn.addClass(r,"tox-fullscreen"),an.bind(d),n.on("remove",an.unbind),t.set(p),$(n,!0)}},sn=function(e,r){return function(t){t.setActive(null!==r.get());var n=function(n){return t.setActive(n.state)};return e.on("FullscreenStateChanged",n),function(){return e.off("FullscreenStateChanged",n)}}};!function mn(){o.add("fullscreen",function(n){var t,e,r,o,i=c(null);return n.settings.inline||(e=i,(t=n).addCommand("mceFullScreen",function(){dn(t,e)}),o=i,(r=n).ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:function(){return r.execCommand("mceFullScreen")},onSetup:sn(r,o)}),r.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:function(){return r.execCommand("mceFullScreen")},onSetup:sn(r,o)}),n.addShortcut("Meta+Shift+F","","mceFullScreen")),u(i)})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/help/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "help" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/help')
+//   ES2015:
+//     import 'tinymce/plugins/help'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/help/plugin.js
@@ -1,1 +1,840 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var get = function (customTabs) {
+      var addTab = function (spec) {
+        var currentCustomTabs = customTabs.get();
+        currentCustomTabs[spec.name] = spec;
+        customTabs.set(currentCustomTabs);
+      };
+      return { addTab: addTab };
+    };
+
+    var register = function (editor, dialogOpener) {
+      editor.addCommand('mceHelp', dialogOpener);
+    };
+
+    var register$1 = function (editor, dialogOpener) {
+      editor.ui.registry.addButton('help', {
+        icon: 'help',
+        tooltip: 'Help',
+        onAction: dialogOpener
+      });
+      editor.ui.registry.addMenuItem('help', {
+        text: 'Help',
+        icon: 'help',
+        shortcut: 'Alt+0',
+        onAction: dialogOpener
+      });
+    };
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var nativeIndexOf = Array.prototype.indexOf;
+    var rawIndexOf = function (ts, t) {
+      return nativeIndexOf.call(ts, t);
+    };
+    var contains = function (xs, x) {
+      return rawIndexOf(xs, x) > -1;
+    };
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var filter = function (xs, pred) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          r.push(x);
+        }
+      }
+      return r;
+    };
+    var findUntil = function (xs, pred, until) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return Option.some(x);
+        } else if (until(x, i)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var find = function (xs, pred) {
+      return findUntil(xs, pred, never);
+    };
+
+    var keys = Object.keys;
+    var hasOwnProperty = Object.hasOwnProperty;
+    var get$1 = function (obj, key) {
+      return has(obj, key) ? Option.from(obj[key]) : Option.none();
+    };
+    var has = function (obj, key) {
+      return hasOwnProperty.call(obj, key);
+    };
+
+    var cat = function (arr) {
+      var r = [];
+      var push = function (x) {
+        r.push(x);
+      };
+      for (var i = 0; i < arr.length; i++) {
+        arr[i].each(push);
+      }
+      return r;
+    };
+
+    var getHelpTabs = function (editor) {
+      return Option.from(editor.getParam('help_tabs'));
+    };
+
+    var shortcuts = [
+      {
+        shortcuts: ['Meta + B'],
+        action: 'Bold'
+      },
+      {
+        shortcuts: ['Meta + I'],
+        action: 'Italic'
+      },
+      {
+        shortcuts: ['Meta + U'],
+        action: 'Underline'
+      },
+      {
+        shortcuts: ['Meta + A'],
+        action: 'Select all'
+      },
+      {
+        shortcuts: [
+          'Meta + Y',
+          'Meta + Shift + Z'
+        ],
+        action: 'Redo'
+      },
+      {
+        shortcuts: ['Meta + Z'],
+        action: 'Undo'
+      },
+      {
+        shortcuts: ['Access + 1'],
+        action: 'Header 1'
+      },
+      {
+        shortcuts: ['Access + 2'],
+        action: 'Header 2'
+      },
+      {
+        shortcuts: ['Access + 3'],
+        action: 'Header 3'
+      },
+      {
+        shortcuts: ['Access + 4'],
+        action: 'Header 4'
+      },
+      {
+        shortcuts: ['Access + 5'],
+        action: 'Header 5'
+      },
+      {
+        shortcuts: ['Access + 6'],
+        action: 'Header 6'
+      },
+      {
+        shortcuts: ['Access + 7'],
+        action: 'Paragraph'
+      },
+      {
+        shortcuts: ['Access + 8'],
+        action: 'Div'
+      },
+      {
+        shortcuts: ['Access + 9'],
+        action: 'Address'
+      },
+      {
+        shortcuts: ['Alt + 0'],
+        action: 'Open help dialog'
+      },
+      {
+        shortcuts: ['Alt + F9'],
+        action: 'Focus to menubar'
+      },
+      {
+        shortcuts: ['Alt + F10'],
+        action: 'Focus to toolbar'
+      },
+      {
+        shortcuts: ['Alt + F11'],
+        action: 'Focus to element path'
+      },
+      {
+        shortcuts: ['Ctrl + F9'],
+        action: 'Focus to contextual toolbar'
+      },
+      {
+        shortcuts: ['Shift + Enter'],
+        action: 'Open popup menu for split buttons'
+      },
+      {
+        shortcuts: ['Meta + K'],
+        action: 'Insert link (if link plugin activated)'
+      },
+      {
+        shortcuts: ['Meta + S'],
+        action: 'Save (if save plugin activated)'
+      },
+      {
+        shortcuts: ['Meta + F'],
+        action: 'Find (if searchreplace plugin activated)'
+      },
+      {
+        shortcuts: ['Meta + Shift + F'],
+        action: 'Switch to or from fullscreen mode'
+      }
+    ];
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var convertText = function (source) {
+      var mac = {
+        alt: '&#x2325;',
+        ctrl: '&#x2303;',
+        shift: '&#x21E7;',
+        meta: '&#x2318;',
+        access: '&#x2303;&#x2325;'
+      };
+      var other = {
+        meta: 'Ctrl ',
+        access: 'Shift + Alt '
+      };
+      var replace = global$1.mac ? mac : other;
+      var shortcut = source.split('+');
+      var updated = map(shortcut, function (segment) {
+        var search = segment.toLowerCase().trim();
+        return has(replace, search) ? replace[search] : segment;
+      });
+      return global$1.mac ? updated.join('').replace(/\s/, '') : updated.join('+');
+    };
+
+    var tab = function () {
+      var shortcutList = map(shortcuts, function (shortcut) {
+        var shortcutText = map(shortcut.shortcuts, convertText).join(' or ');
+        return [
+          shortcut.action,
+          shortcutText
+        ];
+      });
+      var tablePanel = {
+        type: 'table',
+        header: [
+          'Action',
+          'Shortcut'
+        ],
+        cells: shortcutList
+      };
+      return {
+        name: 'shortcuts',
+        title: 'Handy Shortcuts',
+        items: [tablePanel]
+      };
+    };
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.I18n');
+
+    var urls = [
+      {
+        key: 'advlist',
+        name: 'Advanced List'
+      },
+      {
+        key: 'anchor',
+        name: 'Anchor'
+      },
+      {
+        key: 'autolink',
+        name: 'Autolink'
+      },
+      {
+        key: 'autoresize',
+        name: 'Autoresize'
+      },
+      {
+        key: 'autosave',
+        name: 'Autosave'
+      },
+      {
+        key: 'bbcode',
+        name: 'BBCode'
+      },
+      {
+        key: 'charmap',
+        name: 'Character Map'
+      },
+      {
+        key: 'code',
+        name: 'Code'
+      },
+      {
+        key: 'codesample',
+        name: 'Code Sample'
+      },
+      {
+        key: 'colorpicker',
+        name: 'Color Picker'
+      },
+      {
+        key: 'directionality',
+        name: 'Directionality'
+      },
+      {
+        key: 'emoticons',
+        name: 'Emoticons'
+      },
+      {
+        key: 'fullpage',
+        name: 'Full Page'
+      },
+      {
+        key: 'fullscreen',
+        name: 'Full Screen'
+      },
+      {
+        key: 'help',
+        name: 'Help'
+      },
+      {
+        key: 'hr',
+        name: 'Horizontal Rule'
+      },
+      {
+        key: 'image',
+        name: 'Image'
+      },
+      {
+        key: 'imagetools',
+        name: 'Image Tools'
+      },
+      {
+        key: 'importcss',
+        name: 'Import CSS'
+      },
+      {
+        key: 'insertdatetime',
+        name: 'Insert Date/Time'
+      },
+      {
+        key: 'legacyoutput',
+        name: 'Legacy Output'
+      },
+      {
+        key: 'link',
+        name: 'Link'
+      },
+      {
+        key: 'lists',
+        name: 'Lists'
+      },
+      {
+        key: 'media',
+        name: 'Media'
+      },
+      {
+        key: 'nonbreaking',
+        name: 'Nonbreaking'
+      },
+      {
+        key: 'noneditable',
+        name: 'Noneditable'
+      },
+      {
+        key: 'pagebreak',
+        name: 'Page Break'
+      },
+      {
+        key: 'paste',
+        name: 'Paste'
+      },
+      {
+        key: 'preview',
+        name: 'Preview'
+      },
+      {
+        key: 'print',
+        name: 'Print'
+      },
+      {
+        key: 'save',
+        name: 'Save'
+      },
+      {
+        key: 'searchreplace',
+        name: 'Search and Replace'
+      },
+      {
+        key: 'spellchecker',
+        name: 'Spell Checker'
+      },
+      {
+        key: 'tabfocus',
+        name: 'Tab Focus'
+      },
+      {
+        key: 'table',
+        name: 'Table'
+      },
+      {
+        key: 'template',
+        name: 'Template'
+      },
+      {
+        key: 'textcolor',
+        name: 'Text Color'
+      },
+      {
+        key: 'textpattern',
+        name: 'Text Pattern'
+      },
+      {
+        key: 'toc',
+        name: 'Table of Contents'
+      },
+      {
+        key: 'visualblocks',
+        name: 'Visual Blocks'
+      },
+      {
+        key: 'visualchars',
+        name: 'Visual Characters'
+      },
+      {
+        key: 'wordcount',
+        name: 'Word Count'
+      },
+      {
+        key: 'advcode',
+        name: 'Advanced Code Editor*'
+      },
+      {
+        key: 'formatpainter',
+        name: 'Format Painter*'
+      },
+      {
+        key: 'powerpaste',
+        name: 'PowerPaste*'
+      },
+      {
+        key: 'tinydrive',
+        name: 'Tiny Drive*'
+      },
+      {
+        key: 'tinymcespellchecker',
+        name: 'Spell Checker Pro*'
+      },
+      {
+        key: 'a11ychecker',
+        name: 'Accessibility Checker*'
+      },
+      {
+        key: 'linkchecker',
+        name: 'Link Checker*'
+      },
+      {
+        key: 'mentions',
+        name: 'Mentions*'
+      },
+      {
+        key: 'mediaembed',
+        name: 'Enhanced Media Embed*'
+      },
+      {
+        key: 'checklist',
+        name: 'Checklist*'
+      },
+      {
+        key: 'casechange',
+        name: 'Case Change*'
+      },
+      {
+        key: 'permanentpen',
+        name: 'Permanent Pen*'
+      },
+      {
+        key: 'pageembed',
+        name: 'Page Embed*'
+      },
+      {
+        key: 'tinycomments',
+        name: 'Tiny Comments*'
+      },
+      {
+        key: 'advtable',
+        name: 'Advanced Tables*'
+      },
+      {
+        key: 'autocorrect',
+        name: 'Autocorrect*'
+      }
+    ];
+
+    var tab$1 = function (editor) {
+      var availablePlugins = function () {
+        var premiumPlugins = [
+          'Accessibility Checker',
+          'Advanced Code Editor',
+          'Advanced Tables',
+          'Case Change',
+          'Checklist',
+          'Tiny Comments',
+          'Tiny Drive',
+          'Enhanced Media Embed',
+          'Format Painter',
+          'Link Checker',
+          'Mentions',
+          'MoxieManager',
+          'Page Embed',
+          'Permanent Pen',
+          'PowerPaste',
+          'Spell Checker Pro'
+        ];
+        var premiumPluginList = map(premiumPlugins, function (plugin) {
+          return '<li>' + global$2.translate(plugin) + '</li>';
+        }).join('');
+        return '<div data-mce-tabstop="1" tabindex="-1">' + '<p><b>' + global$2.translate('Premium plugins:') + '</b></p>' + '<ul>' + premiumPluginList + '<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">' + global$2.translate('Learn more...') + '</a></li>' + '</ul>' + '</div>';
+      };
+      var makeLink = function (p) {
+        return '<a href="' + p.url + '" target="_blank" rel="noopener">' + p.name + '</a>';
+      };
+      var maybeUrlize = function (editor, key) {
+        return find(urls, function (x) {
+          return x.key === key;
+        }).fold(function () {
+          var getMetadata = editor.plugins[key].getMetadata;
+          return typeof getMetadata === 'function' ? makeLink(getMetadata()) : key;
+        }, function (x) {
+          return makeLink({
+            name: x.name,
+            url: 'https://www.tiny.cloud/docs/plugins/' + x.key
+          });
+        });
+      };
+      var getPluginKeys = function (editor) {
+        var keys$1 = keys(editor.plugins);
+        return editor.settings.forced_plugins === undefined ? keys$1 : filter(keys$1, function (k) {
+          return !contains(editor.settings.forced_plugins, k);
+        });
+      };
+      var pluginLister = function (editor) {
+        var pluginKeys = getPluginKeys(editor);
+        var pluginLis = map(pluginKeys, function (key) {
+          return '<li>' + maybeUrlize(editor, key) + '</li>';
+        });
+        var count = pluginLis.length;
+        var pluginsString = pluginLis.join('');
+        var html = '<p><b>' + global$2.translate([
+          'Plugins installed ({0}):',
+          count
+        ]) + '</b></p>' + '<ul>' + pluginsString + '</ul>';
+        return html;
+      };
+      var installedPlugins = function (editor) {
+        if (editor == null) {
+          return '';
+        }
+        return '<div data-mce-tabstop="1" tabindex="-1">' + pluginLister(editor) + '</div>';
+      };
+      var htmlPanel = {
+        type: 'htmlpanel',
+        presets: 'document',
+        html: [
+          installedPlugins(editor),
+          availablePlugins()
+        ].join('')
+      };
+      return {
+        name: 'plugins',
+        title: 'Plugins',
+        items: [htmlPanel]
+      };
+    };
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.EditorManager');
+
+    var tab$2 = function () {
+      var getVersion = function (major, minor) {
+        return major.indexOf('@') === 0 ? 'X.X.X' : major + '.' + minor;
+      };
+      var version = getVersion(global$3.majorVersion, global$3.minorVersion);
+      var changeLogLink = '<a href="https://www.tinymce.com/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE ' + version + '</a>';
+      var htmlPanel = {
+        type: 'htmlpanel',
+        html: '<p>' + global$2.translate([
+          'You are using {0}',
+          changeLogLink
+        ]) + '</p>',
+        presets: 'document'
+      };
+      return {
+        name: 'versions',
+        title: 'Version',
+        items: [htmlPanel]
+      };
+    };
+
+    var description = '<h1>Editor UI keyboard navigation</h1>\n\n<h2>Activating keyboard navigation</h2>\n\n<p>The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:</p>\n<ul>\n  <li>Focus the menubar: Alt + F9 (Windows) or &#x2325;F9 (MacOS)</li>\n  <li>Focus the toolbar: Alt + F10 (Windows) or &#x2325;F10 (MacOS)</li>\n  <li>Focus the footer: Alt + F11 (Windows) or &#x2325;F11 (MacOS)</li>\n</ul>\n\n<p>Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline. </p>\n\n<h2>Moving between UI sections</h2>\n\n<p>When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:</p>\n<ul>\n  <li>the menubar</li>\n  <li>each group of the toolbar </li>\n  <li>the sidebar</li>\n  <li>the element path in the footer </li>\n  <li>the wordcount toggle button in the footer </li>\n  <li>the branding link in the footer </li>\n</ul>\n\n<p>Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.</p>\n\n<h2>Moving within UI sections</h2>\n\n<p>Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:</p>\n<ul>\n  <li>moving between menus in the menubar</li>\n  <li>moving between buttons in a toolbar group</li>\n  <li>moving between items in the element path</li>\n</ul>\n\n<p>In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group. </p>\n\n<h1>Executing buttons</h1>\n\n<p>To execute a button, navigate the selection to the desired button and hit space or enter.</p>\n\n<h1>Opening, navigating and closing menus</h1>\n\n<p>When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.</p>\n\n<p>To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.</p>\n\n<h1>Context toolbars and menus</h1>\n\n<p>To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or &#x2303;F9 (MacOS).</p>\n\n<p>Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.</p>\n\n<h1>Dialog navigation</h1>\n\n<p>There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.</p>\n\n<p>When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.</p>\n\n<p>When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab\u2019s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.</p>';
+    var tab$3 = function () {
+      var body = {
+        type: 'htmlpanel',
+        presets: 'document',
+        html: description
+      };
+      return {
+        name: 'keyboardnav',
+        title: 'Keyboard Navigation',
+        items: [body]
+      };
+    };
+
+    var parseHelpTabsSetting = function (tabsFromSettings, tabs) {
+      var newTabs = {};
+      var names = map(tabsFromSettings, function (t) {
+        if (typeof t === 'string') {
+          if (has(tabs, t)) {
+            newTabs[t] = tabs[t];
+          }
+          return t;
+        } else {
+          newTabs[t.name] = t;
+          return t.name;
+        }
+      });
+      return {
+        tabs: newTabs,
+        names: names
+      };
+    };
+    var getNamesFromTabs = function (tabs) {
+      var names = keys(tabs);
+      var idx = names.indexOf('versions');
+      if (idx !== -1) {
+        names.splice(idx, 1);
+        names.push('versions');
+      }
+      return {
+        tabs: tabs,
+        names: names
+      };
+    };
+    var parseCustomTabs = function (editor, customTabs) {
+      var _a;
+      var shortcuts = tab();
+      var nav = tab$3();
+      var plugins = tab$1(editor);
+      var versions = tab$2();
+      var tabs = __assign((_a = {}, _a[shortcuts.name] = shortcuts, _a[nav.name] = nav, _a[plugins.name] = plugins, _a[versions.name] = versions, _a), customTabs.get());
+      return getHelpTabs(editor).fold(function () {
+        return getNamesFromTabs(tabs);
+      }, function (tabsFromSettings) {
+        return parseHelpTabsSetting(tabsFromSettings, tabs);
+      });
+    };
+    var init = function (editor, customTabs) {
+      return function () {
+        var _a = parseCustomTabs(editor, customTabs), tabs = _a.tabs, names = _a.names;
+        var foundTabs = map(names, function (name) {
+          return get$1(tabs, name);
+        });
+        var dialogTabs = cat(foundTabs);
+        var body = {
+          type: 'tabpanel',
+          tabs: dialogTabs
+        };
+        editor.windowManager.open({
+          title: 'Help',
+          size: 'medium',
+          body: body,
+          buttons: [{
+              type: 'cancel',
+              name: 'close',
+              text: 'Close',
+              primary: true
+            }],
+          initialData: {}
+        });
+      };
+    };
+
+    function Plugin () {
+      global.add('help', function (editor) {
+        var customTabs = Cell({});
+        var api = get(customTabs);
+        var dialogOpener = init(editor, customTabs);
+        register$1(editor, dialogOpener);
+        register(editor, dialogOpener);
+        editor.shortcuts.add('Alt+0', 'Open help dialog', 'mceHelp');
+        return api;
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/help/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var e,t,n,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),m=function(){return(m=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i=function(e){return function(){return e}},r=i(!1),s=i(!0),o=function(){return c},c=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:r,isSome:r,isNone:s,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:n,orThunk:t,map:o,each:function(){},bind:o,exists:r,forall:s,filter:o,equals:e,equals_:e,toArray:function(){return[]},toString:i("none()")}),l=function(n){var e=i(n),t=function(){return o},a=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:s,isNone:r,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return l(e(n))},each:function(e){e(n)},bind:a,exists:a,forall:a,filter:function(e){return e(n)?o:c},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(r,function(e){return t(n,e)})}};return o},d={some:l,none:o,from:function(e){return null===e||e===undefined?c:l(e)}},u=Array.prototype.indexOf,h=function(e,t){return n=e,a=t,-1<u.call(n,a);var n,a},p=function(e,t){for(var n=e.length,a=new Array(n),o=0;o<n;o++){var i=e[o];a[o]=t(i,o)}return a},g=function(e,t){return function(e,t,n){for(var a=0,o=e.length;a<o;a++){var i=e[a];if(t(i,a))return d.some(i);if(n(i,a))break}return d.none()}(e,t,r)},f=Object.keys,b=Object.hasOwnProperty,y=function(e,t){return b.call(e,t)},k=[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Header 1"},{shortcuts:["Access + 2"],action:"Header 2"},{shortcuts:["Access + 3"],action:"Header 3"},{shortcuts:["Access + 4"],action:"Header 4"},{shortcuts:["Access + 5"],action:"Header 5"},{shortcuts:["Access + 6"],action:"Header 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}],v=tinymce.util.Tools.resolve("tinymce.Env"),w=function(e){var n=v.mac?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl ",access:"Shift + Alt "},t=e.split("+"),a=p(t,function(e){var t=e.toLowerCase().trim();return y(n,t)?n[t]:e});return v.mac?a.join("").replace(/\s/,""):a.join("+")},A=tinymce.util.Tools.resolve("tinymce.util.I18n"),C=[{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"bbcode",name:"BBCode"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullpage",name:"Full Page"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"hr",name:"Horizontal Rule"},{key:"image",name:"Image"},{key:"imagetools",name:"Image Tools"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"legacyoutput",name:"Legacy Output"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"noneditable",name:"Noneditable"},{key:"pagebreak",name:"Page Break"},{key:"paste",name:"Paste"},{key:"preview",name:"Preview"},{key:"print",name:"Print"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"spellchecker",name:"Spell Checker"},{key:"tabfocus",name:"Tab Focus"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"textpattern",name:"Text Pattern"},{key:"toc",name:"Table of Contents"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"advcode",name:"Advanced Code Editor*"},{key:"formatpainter",name:"Format Painter*"},{key:"powerpaste",name:"PowerPaste*"},{key:"tinydrive",name:"Tiny Drive*"},{key:"tinymcespellchecker",name:"Spell Checker Pro*"},{key:"a11ychecker",name:"Accessibility Checker*"},{key:"linkchecker",name:"Link Checker*"},{key:"mentions",name:"Mentions*"},{key:"mediaembed",name:"Enhanced Media Embed*"},{key:"checklist",name:"Checklist*"},{key:"casechange",name:"Case Change*"},{key:"permanentpen",name:"Permanent Pen*"},{key:"pageembed",name:"Page Embed*"},{key:"tinycomments",name:"Tiny Comments*"},{key:"advtable",name:"Advanced Tables*"},{key:"autocorrect",name:"Autocorrect*"}],T=function(e){var t,n,s=function(e){return'<a href="'+e.url+'" target="_blank" rel="noopener">'+e.name+"</a>"};return{name:"plugins",title:"Plugins",items:[{type:"htmlpanel",presets:"document",html:[null==(n=e)?"":'<div data-mce-tabstop="1" tabindex="-1">'+function(a){var t,e,n=(e=f((t=a).plugins),t.settings.forced_plugins===undefined?e:function(e,t){for(var n=[],a=0,o=e.length;a<o;a++){var i=e[a];t(i,a)&&n.push(i)}return n}(e,function(e){return!h(t.settings.forced_plugins,e)})),o=p(n,function(e){return"<li>"+(t=a,n=e,g(C,function(e){return e.key===n}).fold(function(){var e=t.plugins[n].getMetadata;return"function"==typeof e?s(e()):n},function(e){return s({name:e.name,url:"https://www.tiny.cloud/docs/plugins/"+e.key})}))+"</li>";var t,n}),i=o.length,r=o.join("");return"<p><b>"+A.translate(["Plugins installed ({0}):",i])+"</b></p><ul>"+r+"</ul>"}(n)+"</div>",(t=p(["Accessibility Checker","Advanced Code Editor","Advanced Tables","Case Change","Checklist","Tiny Comments","Tiny Drive","Enhanced Media Embed","Format Painter","Link Checker","Mentions","MoxieManager","Page Embed","Permanent Pen","PowerPaste","Spell Checker Pro"],function(e){return"<li>"+A.translate(e)+"</li>"}).join(""),'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+A.translate("Premium plugins:")+"</b></p><ul>"+t+'<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">'+A.translate("Learn more...")+"</a></li></ul></div>")].join("")}]}},x=tinymce.util.Tools.resolve("tinymce.EditorManager"),M=function(e,t){var n,a,o,i,r,s={name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:p(k,function(e){var t=p(e.shortcuts,w).join(" or ");return[e.action,t]})}]},c={name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:"<h1>Editor UI keyboard navigation</h1>\n\n<h2>Activating keyboard navigation</h2>\n\n<p>The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:</p>\n<ul>\n  <li>Focus the menubar: Alt + F9 (Windows) or &#x2325;F9 (MacOS)</li>\n  <li>Focus the toolbar: Alt + F10 (Windows) or &#x2325;F10 (MacOS)</li>\n  <li>Focus the footer: Alt + F11 (Windows) or &#x2325;F11 (MacOS)</li>\n</ul>\n\n<p>Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline. </p>\n\n<h2>Moving between UI sections</h2>\n\n<p>When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:</p>\n<ul>\n  <li>the menubar</li>\n  <li>each group of the toolbar </li>\n  <li>the sidebar</li>\n  <li>the element path in the footer </li>\n  <li>the wordcount toggle button in the footer </li>\n  <li>the branding link in the footer </li>\n</ul>\n\n<p>Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.</p>\n\n<h2>Moving within UI sections</h2>\n\n<p>Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:</p>\n<ul>\n  <li>moving between menus in the menubar</li>\n  <li>moving between buttons in a toolbar group</li>\n  <li>moving between items in the element path</li>\n</ul>\n\n<p>In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group. </p>\n\n<h1>Executing buttons</h1>\n\n<p>To execute a button, navigate the selection to the desired button and hit space or enter.</p>\n\n<h1>Opening, navigating and closing menus</h1>\n\n<p>When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.</p>\n\n<p>To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.</p>\n\n<h1>Context toolbars and menus</h1>\n\n<p>To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or &#x2303;F9 (MacOS).</p>\n\n<p>Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.</p>\n\n<h1>Dialog navigation</h1>\n\n<p>There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.</p>\n\n<p>When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.</p>\n\n<p>When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab\u2019s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.</p>"}]},l=T(e),u=(i='<a href="https://www.tinymce.com/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE '+(a=x.majorVersion,o=x.minorVersion,0===a.indexOf("@")?"X.X.X":a+"."+o)+"</a>",{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"<p>"+A.translate(["You are using {0}",i])+"</p>",presets:"document"}]}),h=m(((n={})[s.name]=s,n[c.name]=c,n[l.name]=l,n[u.name]=u,n),t.get());return r=e,d.from(r.getParam("help_tabs")).fold(function(){return t=f(e=h),-1!==(n=t.indexOf("versions"))&&(t.splice(n,1),t.push("versions")),{tabs:e,names:t};var e,t,n},function(e){return t=h,n={},a=p(e,function(e){return"string"==typeof e?(y(t,e)&&(n[e]=t[e]),e):(n[e.name]=e).name}),{tabs:n,names:a};var t,n,a})},P=function(o,i){return function(){var e=M(o,i),a=e.tabs,t=e.names,n={type:"tabpanel",tabs:function(e){for(var t=[],n=function(e){t.push(e)},a=0;a<e.length;a++)e[a].each(n);return t}(p(t,function(e){return y(t=a,n=e)?d.from(t[n]):d.none();var t,n}))};o.windowManager.open({title:"Help",size:"medium",body:n,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})}};!function F(){a.add("help",function(e){var t,n,a,o,i,r=(t={},{get:function(){return t},set:function(e){t=e}}),s={addTab:function(e){var t=n.get();t[e.name]=e,n.set(t)}},c=P(e,n=r);return o=c,(a=e).ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:o}),a.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:o}),i=c,e.addCommand("mceHelp",i),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),s})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/hr/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "hr" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/hr')
+//   ES2015:
+//     import 'tinymce/plugins/hr'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/hr/plugin.js
@@ -1,1 +1,47 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var register = function (editor) {
+      editor.addCommand('InsertHorizontalRule', function () {
+        editor.execCommand('mceInsertContent', false, '<hr />');
+      });
+    };
+
+    var register$1 = function (editor) {
+      editor.ui.registry.addButton('hr', {
+        icon: 'horizontal-rule',
+        tooltip: 'Horizontal line',
+        onAction: function () {
+          return editor.execCommand('InsertHorizontalRule');
+        }
+      });
+      editor.ui.registry.addMenuItem('hr', {
+        icon: 'horizontal-rule',
+        text: 'Horizontal line',
+        onAction: function () {
+          return editor.execCommand('InsertHorizontalRule');
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('hr', function (editor) {
+        register(editor);
+        register$1(editor);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/hr/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager");!function o(){n.add("hr",function(n){var o,t;(o=n).addCommand("InsertHorizontalRule",function(){o.execCommand("mceInsertContent",!1,"<hr />")}),(t=n).ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return t.execCommand("InsertHorizontalRule")}}),t.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return t.execCommand("InsertHorizontalRule")}})})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/image/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "image" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/image')
+//   ES2015:
+//     import 'tinymce/plugins/image'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/image/plugin.js
@@ -1,1 +1,1663 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var typeOf = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf(value) === type;
+      };
+    };
+    var isSimpleType = function (type) {
+      return function (value) {
+        return typeof value === type;
+      };
+    };
+    var eq = function (t) {
+      return function (a) {
+        return t === a;
+      };
+    };
+    var isString = isType('string');
+    var isObject = isType('object');
+    var isArray = isType('array');
+    var isNull = eq(null);
+    var isBoolean = isSimpleType('boolean');
+    var isNumber = isSimpleType('number');
+
+    var nativePush = Array.prototype.push;
+    var flatten = function (xs) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        if (!isArray(xs[i])) {
+          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
+        }
+        nativePush.apply(r, xs[i]);
+      }
+      return r;
+    };
+    var head = function (xs) {
+      return xs.length === 0 ? Option.none() : Option.some(xs[0]);
+    };
+    var findMap = function (arr, f) {
+      for (var i = 0; i < arr.length; i++) {
+        var r = f(arr[i], i);
+        if (r.isSome()) {
+          return r;
+        }
+      }
+      return Option.none();
+    };
+
+    var hasOwnProperty = Object.prototype.hasOwnProperty;
+    var deep = function (old, nu) {
+      var bothObjects = isObject(old) && isObject(nu);
+      return bothObjects ? deepMerge(old, nu) : nu;
+    };
+    var baseMerge = function (merger) {
+      return function () {
+        var objects = new Array(arguments.length);
+        for (var i = 0; i < objects.length; i++) {
+          objects[i] = arguments[i];
+        }
+        if (objects.length === 0) {
+          throw new Error('Can\'t merge zero objects');
+        }
+        var ret = {};
+        for (var j = 0; j < objects.length; j++) {
+          var curObject = objects[j];
+          for (var key in curObject) {
+            if (hasOwnProperty.call(curObject, key)) {
+              ret[key] = merger(ret[key], curObject[key]);
+            }
+          }
+        }
+        return ret;
+      };
+    };
+    var deepMerge = baseMerge(deep);
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
+
+    var rawSet = function (dom, key, value) {
+      if (isString(value) || isBoolean(value) || isNumber(value)) {
+        dom.setAttribute(key, value + '');
+      } else {
+        domGlobals.console.error('Invalid call to Attr.set. Key ', key, ':: Value ', value, ':: Element ', dom);
+        throw new Error('Attribute value was not simple');
+      }
+    };
+    var set = function (element, key, value) {
+      rawSet(element.dom(), key, value);
+    };
+    var remove = function (element, key) {
+      element.dom().removeAttribute(key);
+    };
+
+    var fromHtml = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      if (!div.hasChildNodes() || div.childNodes.length > 1) {
+        domGlobals.console.error('HTML does not have a single root node', html);
+        throw new Error('HTML must have a single root node');
+      }
+      return fromDom(div.childNodes[0]);
+    };
+    var fromTag = function (tag, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createElement(tag);
+      return fromDom(node);
+    };
+    var fromText = function (text, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createTextNode(text);
+      return fromDom(node);
+    };
+    var fromDom = function (node) {
+      if (node === null || node === undefined) {
+        throw new Error('Node cannot be null or undefined');
+      }
+      return { dom: constant(node) };
+    };
+    var fromPoint = function (docElm, x, y) {
+      var doc = docElm.dom();
+      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
+    };
+    var Element = {
+      fromHtml: fromHtml,
+      fromTag: fromTag,
+      fromText: fromText,
+      fromDom: fromDom,
+      fromPoint: fromPoint
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Promise');
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.XHR');
+
+    var hasDimensions = function (editor) {
+      return editor.getParam('image_dimensions', true, 'boolean');
+    };
+    var hasAdvTab = function (editor) {
+      return editor.getParam('image_advtab', false, 'boolean');
+    };
+    var hasUploadTab = function (editor) {
+      return editor.getParam('image_uploadtab', true, 'boolean');
+    };
+    var getPrependUrl = function (editor) {
+      return editor.getParam('image_prepend_url', '', 'string');
+    };
+    var getClassList = function (editor) {
+      return editor.getParam('image_class_list');
+    };
+    var hasDescription = function (editor) {
+      return editor.getParam('image_description', true, 'boolean');
+    };
+    var hasImageTitle = function (editor) {
+      return editor.getParam('image_title', false, 'boolean');
+    };
+    var hasImageCaption = function (editor) {
+      return editor.getParam('image_caption', false, 'boolean');
+    };
+    var getImageList = function (editor) {
+      return editor.getParam('image_list', false);
+    };
+    var hasUploadUrl = function (editor) {
+      return !!getUploadUrl(editor);
+    };
+    var hasUploadHandler = function (editor) {
+      return !!getUploadHandler(editor);
+    };
+    var getUploadUrl = function (editor) {
+      return editor.getParam('images_upload_url', '', 'string');
+    };
+    var getUploadHandler = function (editor) {
+      return editor.getParam('images_upload_handler', undefined, 'function');
+    };
+    var getUploadBasePath = function (editor) {
+      return editor.getParam('images_upload_base_path', undefined, 'string');
+    };
+    var getUploadCredentials = function (editor) {
+      return editor.getParam('images_upload_credentials', false, 'boolean');
+    };
+    var showAccessibilityOptions = function (editor) {
+      return editor.getParam('a11y_advanced_options', false, 'boolean');
+    };
+    var isAutomaticUploadsEnabled = function (editor) {
+      return editor.getParam('automatic_uploads', true, 'boolean');
+    };
+
+    var parseIntAndGetMax = function (val1, val2) {
+      return Math.max(parseInt(val1, 10), parseInt(val2, 10));
+    };
+    var getImageSize = function (url) {
+      return new global$2(function (callback) {
+        var img = domGlobals.document.createElement('img');
+        var done = function (dimensions) {
+          if (img.parentNode) {
+            img.parentNode.removeChild(img);
+          }
+          callback(dimensions);
+        };
+        img.onload = function () {
+          var width = parseIntAndGetMax(img.width, img.clientWidth);
+          var height = parseIntAndGetMax(img.height, img.clientHeight);
+          var dimensions = {
+            width: width,
+            height: height
+          };
+          done(global$2.resolve(dimensions));
+        };
+        img.onerror = function () {
+          done(global$2.reject('Failed to get image dimensions for: ' + url));
+        };
+        var style = img.style;
+        style.visibility = 'hidden';
+        style.position = 'fixed';
+        style.bottom = style.left = '0px';
+        style.width = style.height = 'auto';
+        domGlobals.document.body.appendChild(img);
+        img.src = url;
+      });
+    };
+    var removePixelSuffix = function (value) {
+      if (value) {
+        value = value.replace(/px$/, '');
+      }
+      return value;
+    };
+    var addPixelSuffix = function (value) {
+      if (value.length > 0 && /^[0-9]+$/.test(value)) {
+        value += 'px';
+      }
+      return value;
+    };
+    var mergeMargins = function (css) {
+      if (css.margin) {
+        var splitMargin = String(css.margin).split(' ');
+        switch (splitMargin.length) {
+        case 1:
+          css['margin-top'] = css['margin-top'] || splitMargin[0];
+          css['margin-right'] = css['margin-right'] || splitMargin[0];
+          css['margin-bottom'] = css['margin-bottom'] || splitMargin[0];
+          css['margin-left'] = css['margin-left'] || splitMargin[0];
+          break;
+        case 2:
+          css['margin-top'] = css['margin-top'] || splitMargin[0];
+          css['margin-right'] = css['margin-right'] || splitMargin[1];
+          css['margin-bottom'] = css['margin-bottom'] || splitMargin[0];
+          css['margin-left'] = css['margin-left'] || splitMargin[1];
+          break;
+        case 3:
+          css['margin-top'] = css['margin-top'] || splitMargin[0];
+          css['margin-right'] = css['margin-right'] || splitMargin[1];
+          css['margin-bottom'] = css['margin-bottom'] || splitMargin[2];
+          css['margin-left'] = css['margin-left'] || splitMargin[1];
+          break;
+        case 4:
+          css['margin-top'] = css['margin-top'] || splitMargin[0];
+          css['margin-right'] = css['margin-right'] || splitMargin[1];
+          css['margin-bottom'] = css['margin-bottom'] || splitMargin[2];
+          css['margin-left'] = css['margin-left'] || splitMargin[3];
+        }
+        delete css.margin;
+      }
+      return css;
+    };
+    var createImageList = function (editor, callback) {
+      var imageList = getImageList(editor);
+      if (typeof imageList === 'string') {
+        global$3.send({
+          url: imageList,
+          success: function (text) {
+            callback(JSON.parse(text));
+          }
+        });
+      } else if (typeof imageList === 'function') {
+        imageList(callback);
+      } else {
+        callback(imageList);
+      }
+    };
+    var waitLoadImage = function (editor, data, imgElm) {
+      var selectImage = function () {
+        imgElm.onload = imgElm.onerror = null;
+        if (editor.selection) {
+          editor.selection.select(imgElm);
+          editor.nodeChanged();
+        }
+      };
+      imgElm.onload = function () {
+        if (!data.width && !data.height && hasDimensions(editor)) {
+          editor.dom.setAttribs(imgElm, {
+            width: String(imgElm.clientWidth),
+            height: String(imgElm.clientHeight)
+          });
+        }
+        selectImage();
+      };
+      imgElm.onerror = selectImage;
+    };
+    var blobToDataUri = function (blob) {
+      return new global$2(function (resolve, reject) {
+        var reader = new domGlobals.FileReader();
+        reader.onload = function () {
+          resolve(reader.result);
+        };
+        reader.onerror = function () {
+          reject(reader.error.message);
+        };
+        reader.readAsDataURL(blob);
+      });
+    };
+    var isPlaceholderImage = function (imgElm) {
+      return imgElm.nodeName === 'IMG' && (imgElm.hasAttribute('data-mce-object') || imgElm.hasAttribute('data-mce-placeholder'));
+    };
+
+    var DOM = global$1.DOM;
+    var getHspace = function (image) {
+      if (image.style.marginLeft && image.style.marginRight && image.style.marginLeft === image.style.marginRight) {
+        return removePixelSuffix(image.style.marginLeft);
+      } else {
+        return '';
+      }
+    };
+    var getVspace = function (image) {
+      if (image.style.marginTop && image.style.marginBottom && image.style.marginTop === image.style.marginBottom) {
+        return removePixelSuffix(image.style.marginTop);
+      } else {
+        return '';
+      }
+    };
+    var getBorder = function (image) {
+      if (image.style.borderWidth) {
+        return removePixelSuffix(image.style.borderWidth);
+      } else {
+        return '';
+      }
+    };
+    var getAttrib = function (image, name) {
+      if (image.hasAttribute(name)) {
+        return image.getAttribute(name);
+      } else {
+        return '';
+      }
+    };
+    var getStyle = function (image, name) {
+      return image.style[name] ? image.style[name] : '';
+    };
+    var hasCaption = function (image) {
+      return image.parentNode !== null && image.parentNode.nodeName === 'FIGURE';
+    };
+    var updateAttrib = function (image, name, value) {
+      if (value === '') {
+        image.removeAttribute(name);
+      } else {
+        image.setAttribute(name, value);
+      }
+    };
+    var wrapInFigure = function (image) {
+      var figureElm = DOM.create('figure', { class: 'image' });
+      DOM.insertAfter(figureElm, image);
+      figureElm.appendChild(image);
+      figureElm.appendChild(DOM.create('figcaption', { contentEditable: 'true' }, 'Caption'));
+      figureElm.contentEditable = 'false';
+    };
+    var removeFigure = function (image) {
+      var figureElm = image.parentNode;
+      DOM.insertAfter(image, figureElm);
+      DOM.remove(figureElm);
+    };
+    var toggleCaption = function (image) {
+      if (hasCaption(image)) {
+        removeFigure(image);
+      } else {
+        wrapInFigure(image);
+      }
+    };
+    var normalizeStyle = function (image, normalizeCss) {
+      var attrValue = image.getAttribute('style');
+      var value = normalizeCss(attrValue !== null ? attrValue : '');
+      if (value.length > 0) {
+        image.setAttribute('style', value);
+        image.setAttribute('data-mce-style', value);
+      } else {
+        image.removeAttribute('style');
+      }
+    };
+    var setSize = function (name, normalizeCss) {
+      return function (image, name, value) {
+        if (image.style[name]) {
+          image.style[name] = addPixelSuffix(value);
+          normalizeStyle(image, normalizeCss);
+        } else {
+          updateAttrib(image, name, value);
+        }
+      };
+    };
+    var getSize = function (image, name) {
+      if (image.style[name]) {
+        return removePixelSuffix(image.style[name]);
+      } else {
+        return getAttrib(image, name);
+      }
+    };
+    var setHspace = function (image, value) {
+      var pxValue = addPixelSuffix(value);
+      image.style.marginLeft = pxValue;
+      image.style.marginRight = pxValue;
+    };
+    var setVspace = function (image, value) {
+      var pxValue = addPixelSuffix(value);
+      image.style.marginTop = pxValue;
+      image.style.marginBottom = pxValue;
+    };
+    var setBorder = function (image, value) {
+      var pxValue = addPixelSuffix(value);
+      image.style.borderWidth = pxValue;
+    };
+    var setBorderStyle = function (image, value) {
+      image.style.borderStyle = value;
+    };
+    var getBorderStyle = function (image) {
+      return getStyle(image, 'borderStyle');
+    };
+    var isFigure = function (elm) {
+      return elm.nodeName === 'FIGURE';
+    };
+    var isImage = function (elm) {
+      return elm.nodeName === 'IMG';
+    };
+    var getIsDecorative = function (image) {
+      return DOM.getAttrib(image, 'alt').length === 0 && DOM.getAttrib(image, 'role') === 'presentation';
+    };
+    var getAlt = function (image) {
+      if (getIsDecorative(image)) {
+        return '';
+      } else {
+        return getAttrib(image, 'alt');
+      }
+    };
+    var defaultData = function () {
+      return {
+        src: '',
+        alt: '',
+        title: '',
+        width: '',
+        height: '',
+        class: '',
+        style: '',
+        caption: false,
+        hspace: '',
+        vspace: '',
+        border: '',
+        borderStyle: '',
+        isDecorative: false
+      };
+    };
+    var getStyleValue = function (normalizeCss, data) {
+      var image = domGlobals.document.createElement('img');
+      updateAttrib(image, 'style', data.style);
+      if (getHspace(image) || data.hspace !== '') {
+        setHspace(image, data.hspace);
+      }
+      if (getVspace(image) || data.vspace !== '') {
+        setVspace(image, data.vspace);
+      }
+      if (getBorder(image) || data.border !== '') {
+        setBorder(image, data.border);
+      }
+      if (getBorderStyle(image) || data.borderStyle !== '') {
+        setBorderStyle(image, data.borderStyle);
+      }
+      return normalizeCss(image.getAttribute('style'));
+    };
+    var create = function (normalizeCss, data) {
+      var image = domGlobals.document.createElement('img');
+      write(normalizeCss, __assign(__assign({}, data), { caption: false }), image);
+      setAlt(image, data.alt, data.isDecorative);
+      if (data.caption) {
+        var figure = DOM.create('figure', { class: 'image' });
+        figure.appendChild(image);
+        figure.appendChild(DOM.create('figcaption', { contentEditable: 'true' }, 'Caption'));
+        figure.contentEditable = 'false';
+        return figure;
+      } else {
+        return image;
+      }
+    };
+    var read = function (normalizeCss, image) {
+      return {
+        src: getAttrib(image, 'src'),
+        alt: getAlt(image),
+        title: getAttrib(image, 'title'),
+        width: getSize(image, 'width'),
+        height: getSize(image, 'height'),
+        class: getAttrib(image, 'class'),
+        style: normalizeCss(getAttrib(image, 'style')),
+        caption: hasCaption(image),
+        hspace: getHspace(image),
+        vspace: getVspace(image),
+        border: getBorder(image),
+        borderStyle: getStyle(image, 'borderStyle'),
+        isDecorative: getIsDecorative(image)
+      };
+    };
+    var updateProp = function (image, oldData, newData, name, set) {
+      if (newData[name] !== oldData[name]) {
+        set(image, name, newData[name]);
+      }
+    };
+    var setAlt = function (image, alt, isDecorative) {
+      if (isDecorative) {
+        DOM.setAttrib(image, 'role', 'presentation');
+        var sugarImage = Element.fromDom(image);
+        set(sugarImage, 'alt', '');
+      } else {
+        if (isNull(alt)) {
+          var sugarImage = Element.fromDom(image);
+          remove(sugarImage, 'alt');
+        } else {
+          var sugarImage = Element.fromDom(image);
+          set(sugarImage, 'alt', alt);
+        }
+        if (DOM.getAttrib(image, 'role') === 'presentation') {
+          DOM.setAttrib(image, 'role', '');
+        }
+      }
+    };
+    var updateAlt = function (image, oldData, newData) {
+      if (newData.alt !== oldData.alt || newData.isDecorative !== oldData.isDecorative) {
+        setAlt(image, newData.alt, newData.isDecorative);
+      }
+    };
+    var normalized = function (set, normalizeCss) {
+      return function (image, name, value) {
+        set(image, value);
+        normalizeStyle(image, normalizeCss);
+      };
+    };
+    var write = function (normalizeCss, newData, image) {
+      var oldData = read(normalizeCss, image);
+      updateProp(image, oldData, newData, 'caption', function (image, _name, _value) {
+        return toggleCaption(image);
+      });
+      updateProp(image, oldData, newData, 'src', updateAttrib);
+      updateProp(image, oldData, newData, 'title', updateAttrib);
+      updateProp(image, oldData, newData, 'width', setSize('width', normalizeCss));
+      updateProp(image, oldData, newData, 'height', setSize('height', normalizeCss));
+      updateProp(image, oldData, newData, 'class', updateAttrib);
+      updateProp(image, oldData, newData, 'style', normalized(function (image, value) {
+        return updateAttrib(image, 'style', value);
+      }, normalizeCss));
+      updateProp(image, oldData, newData, 'hspace', normalized(setHspace, normalizeCss));
+      updateProp(image, oldData, newData, 'vspace', normalized(setVspace, normalizeCss));
+      updateProp(image, oldData, newData, 'border', normalized(setBorder, normalizeCss));
+      updateProp(image, oldData, newData, 'borderStyle', normalized(setBorderStyle, normalizeCss));
+      updateAlt(image, oldData, newData);
+    };
+
+    var normalizeCss = function (editor, cssText) {
+      var css = editor.dom.styles.parse(cssText);
+      var mergedCss = mergeMargins(css);
+      var compressed = editor.dom.styles.parse(editor.dom.styles.serialize(mergedCss));
+      return editor.dom.styles.serialize(compressed);
+    };
+    var getSelectedImage = function (editor) {
+      var imgElm = editor.selection.getNode();
+      var figureElm = editor.dom.getParent(imgElm, 'figure.image');
+      if (figureElm) {
+        return editor.dom.select('img', figureElm)[0];
+      }
+      if (imgElm && (imgElm.nodeName !== 'IMG' || isPlaceholderImage(imgElm))) {
+        return null;
+      }
+      return imgElm;
+    };
+    var splitTextBlock = function (editor, figure) {
+      var dom = editor.dom;
+      var textBlock = dom.getParent(figure.parentNode, function (node) {
+        return !!editor.schema.getTextBlockElements()[node.nodeName];
+      }, editor.getBody());
+      if (textBlock) {
+        return dom.split(textBlock, figure);
+      } else {
+        return figure;
+      }
+    };
+    var readImageDataFromSelection = function (editor) {
+      var image = getSelectedImage(editor);
+      return image ? read(function (css) {
+        return normalizeCss(editor, css);
+      }, image) : defaultData();
+    };
+    var insertImageAtCaret = function (editor, data) {
+      var elm = create(function (css) {
+        return normalizeCss(editor, css);
+      }, data);
+      editor.dom.setAttrib(elm, 'data-mce-id', '__mcenew');
+      editor.focus();
+      editor.selection.setContent(elm.outerHTML);
+      var insertedElm = editor.dom.select('*[data-mce-id="__mcenew"]')[0];
+      editor.dom.setAttrib(insertedElm, 'data-mce-id', null);
+      if (isFigure(insertedElm)) {
+        var figure = splitTextBlock(editor, insertedElm);
+        editor.selection.select(figure);
+      } else {
+        editor.selection.select(insertedElm);
+      }
+    };
+    var syncSrcAttr = function (editor, image) {
+      editor.dom.setAttrib(image, 'src', image.getAttribute('src'));
+    };
+    var deleteImage = function (editor, image) {
+      if (image) {
+        var elm = editor.dom.is(image.parentNode, 'figure.image') ? image.parentNode : image;
+        editor.dom.remove(elm);
+        editor.focus();
+        editor.nodeChanged();
+        if (editor.dom.isEmpty(editor.getBody())) {
+          editor.setContent('');
+          editor.selection.setCursorLocation();
+        }
+      }
+    };
+    var writeImageDataToSelection = function (editor, data) {
+      var image = getSelectedImage(editor);
+      write(function (css) {
+        return normalizeCss(editor, css);
+      }, data, image);
+      syncSrcAttr(editor, image);
+      if (isFigure(image.parentNode)) {
+        var figure = image.parentNode;
+        splitTextBlock(editor, figure);
+        editor.selection.select(image.parentNode);
+      } else {
+        editor.selection.select(image);
+        waitLoadImage(editor, data, image);
+      }
+    };
+    var insertOrUpdateImage = function (editor, partialData) {
+      var image = getSelectedImage(editor);
+      if (image) {
+        var selectedImageData = read(function (css) {
+          return normalizeCss(editor, css);
+        }, image);
+        var data = __assign(__assign({}, selectedImageData), partialData);
+        if (data.src) {
+          writeImageDataToSelection(editor, data);
+        } else {
+          deleteImage(editor, image);
+        }
+      } else if (partialData.src) {
+        insertImageAtCaret(editor, __assign(__assign({}, defaultData()), partialData));
+      }
+    };
+
+    var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var getValue = function (item) {
+      return isString(item.value) ? item.value : '';
+    };
+    var sanitizeList = function (list, extractValue) {
+      var out = [];
+      global$4.each(list, function (item) {
+        var text = isString(item.text) ? item.text : isString(item.title) ? item.title : '';
+        if (item.menu !== undefined) {
+          var items = sanitizeList(item.menu, extractValue);
+          out.push({
+            text: text,
+            items: items
+          });
+        } else {
+          var value = extractValue(item);
+          out.push({
+            text: text,
+            value: value
+          });
+        }
+      });
+      return out;
+    };
+    var sanitizer = function (extracter) {
+      if (extracter === void 0) {
+        extracter = getValue;
+      }
+      return function (list) {
+        if (list) {
+          return Option.from(list).map(function (list) {
+            return sanitizeList(list, extracter);
+          });
+        } else {
+          return Option.none();
+        }
+      };
+    };
+    var sanitize = function (list) {
+      return sanitizer(getValue)(list);
+    };
+    var isGroup = function (item) {
+      return Object.prototype.hasOwnProperty.call(item, 'items');
+    };
+    var findEntryDelegate = function (list, value) {
+      return findMap(list, function (item) {
+        if (isGroup(item)) {
+          return findEntryDelegate(item.items, value);
+        } else if (item.value === value) {
+          return Option.some(item);
+        } else {
+          return Option.none();
+        }
+      });
+    };
+    var findEntry = function (optList, value) {
+      return optList.bind(function (list) {
+        return findEntryDelegate(list, value);
+      });
+    };
+    var ListUtils = {
+      sanitizer: sanitizer,
+      sanitize: sanitize,
+      findEntry: findEntry
+    };
+
+    var pathJoin = function (path1, path2) {
+      if (path1) {
+        return path1.replace(/\/$/, '') + '/' + path2.replace(/^\//, '');
+      }
+      return path2;
+    };
+    function Uploader (settings) {
+      var defaultHandler = function (blobInfo, success, failure, progress) {
+        var xhr, formData;
+        xhr = new domGlobals.XMLHttpRequest();
+        xhr.open('POST', settings.url);
+        xhr.withCredentials = settings.credentials;
+        xhr.upload.onprogress = function (e) {
+          progress(e.loaded / e.total * 100);
+        };
+        xhr.onerror = function () {
+          failure('Image upload failed due to a XHR Transport error. Code: ' + xhr.status);
+        };
+        xhr.onload = function () {
+          var json;
+          if (xhr.status < 200 || xhr.status >= 300) {
+            failure('HTTP Error: ' + xhr.status);
+            return;
+          }
+          json = JSON.parse(xhr.responseText);
+          if (!json || typeof json.location !== 'string') {
+            failure('Invalid JSON: ' + xhr.responseText);
+            return;
+          }
+          success(pathJoin(settings.basePath, json.location));
+        };
+        formData = new domGlobals.FormData();
+        formData.append('file', blobInfo.blob(), blobInfo.filename());
+        xhr.send(formData);
+      };
+      var uploadBlob = function (blobInfo, handler) {
+        return new global$2(function (resolve, reject) {
+          try {
+            handler(blobInfo, resolve, reject, noop);
+          } catch (ex) {
+            reject(ex.message);
+          }
+        });
+      };
+      var isDefaultHandler = function (handler) {
+        return handler === defaultHandler;
+      };
+      var upload = function (blobInfo) {
+        return !settings.url && isDefaultHandler(settings.handler) ? global$2.reject('Upload url missing from the settings.') : uploadBlob(blobInfo, settings.handler);
+      };
+      settings = global$4.extend({
+        credentials: false,
+        handler: defaultHandler
+      }, settings);
+      return { upload: upload };
+    }
+
+    var makeTab = function (_info) {
+      return {
+        title: 'Advanced',
+        name: 'advanced',
+        items: [
+          {
+            type: 'input',
+            label: 'Style',
+            name: 'style'
+          },
+          {
+            type: 'grid',
+            columns: 2,
+            items: [
+              {
+                type: 'input',
+                label: 'Vertical space',
+                name: 'vspace',
+                inputMode: 'numeric'
+              },
+              {
+                type: 'input',
+                label: 'Horizontal space',
+                name: 'hspace',
+                inputMode: 'numeric'
+              },
+              {
+                type: 'input',
+                label: 'Border width',
+                name: 'border',
+                inputMode: 'numeric'
+              },
+              {
+                type: 'selectbox',
+                name: 'borderstyle',
+                label: 'Border style',
+                items: [
+                  {
+                    text: 'Select...',
+                    value: ''
+                  },
+                  {
+                    text: 'Solid',
+                    value: 'solid'
+                  },
+                  {
+                    text: 'Dotted',
+                    value: 'dotted'
+                  },
+                  {
+                    text: 'Dashed',
+                    value: 'dashed'
+                  },
+                  {
+                    text: 'Double',
+                    value: 'double'
+                  },
+                  {
+                    text: 'Groove',
+                    value: 'groove'
+                  },
+                  {
+                    text: 'Ridge',
+                    value: 'ridge'
+                  },
+                  {
+                    text: 'Inset',
+                    value: 'inset'
+                  },
+                  {
+                    text: 'Outset',
+                    value: 'outset'
+                  },
+                  {
+                    text: 'None',
+                    value: 'none'
+                  },
+                  {
+                    text: 'Hidden',
+                    value: 'hidden'
+                  }
+                ]
+              }
+            ]
+          }
+        ]
+      };
+    };
+    var AdvTab = { makeTab: makeTab };
+
+    var collect = function (editor) {
+      var urlListSanitizer = ListUtils.sanitizer(function (item) {
+        return editor.convertURL(item.value || item.url, 'src');
+      });
+      var futureImageList = new global$2(function (completer) {
+        createImageList(editor, function (imageList) {
+          completer(urlListSanitizer(imageList).map(function (items) {
+            return flatten([
+              [{
+                  text: 'None',
+                  value: ''
+                }],
+              items
+            ]);
+          }));
+        });
+      });
+      var classList = ListUtils.sanitize(getClassList(editor));
+      var hasAdvTab$1 = hasAdvTab(editor);
+      var hasUploadTab$1 = hasUploadTab(editor);
+      var hasUploadUrl$1 = hasUploadUrl(editor);
+      var hasUploadHandler$1 = hasUploadHandler(editor);
+      var image = readImageDataFromSelection(editor);
+      var hasDescription$1 = hasDescription(editor);
+      var hasImageTitle$1 = hasImageTitle(editor);
+      var hasDimensions$1 = hasDimensions(editor);
+      var hasImageCaption$1 = hasImageCaption(editor);
+      var hasAccessibilityOptions = showAccessibilityOptions(editor);
+      var url = getUploadUrl(editor);
+      var basePath = getUploadBasePath(editor);
+      var credentials = getUploadCredentials(editor);
+      var handler = getUploadHandler(editor);
+      var automaticUploads = isAutomaticUploadsEnabled(editor);
+      var prependURL = Option.some(getPrependUrl(editor)).filter(function (preUrl) {
+        return isString(preUrl) && preUrl.length > 0;
+      });
+      return futureImageList.then(function (imageList) {
+        return {
+          image: image,
+          imageList: imageList,
+          classList: classList,
+          hasAdvTab: hasAdvTab$1,
+          hasUploadTab: hasUploadTab$1,
+          hasUploadUrl: hasUploadUrl$1,
+          hasUploadHandler: hasUploadHandler$1,
+          hasDescription: hasDescription$1,
+          hasImageTitle: hasImageTitle$1,
+          hasDimensions: hasDimensions$1,
+          hasImageCaption: hasImageCaption$1,
+          url: url,
+          basePath: basePath,
+          credentials: credentials,
+          handler: handler,
+          prependURL: prependURL,
+          hasAccessibilityOptions: hasAccessibilityOptions,
+          automaticUploads: automaticUploads
+        };
+      });
+    };
+
+    var makeItems = function (info) {
+      var imageUrl = {
+        name: 'src',
+        type: 'urlinput',
+        filetype: 'image',
+        label: 'Source'
+      };
+      var imageList = info.imageList.map(function (items) {
+        return {
+          name: 'images',
+          type: 'selectbox',
+          label: 'Image list',
+          items: items
+        };
+      });
+      var imageDescription = {
+        name: 'alt',
+        type: 'input',
+        label: 'Alternative description',
+        disabled: info.hasAccessibilityOptions && info.image.isDecorative
+      };
+      var imageTitle = {
+        name: 'title',
+        type: 'input',
+        label: 'Image title'
+      };
+      var imageDimensions = {
+        name: 'dimensions',
+        type: 'sizeinput'
+      };
+      var isDecorative = {
+        type: 'label',
+        label: 'Accessibility',
+        items: [{
+            name: 'isDecorative',
+            type: 'checkbox',
+            label: 'Image is decorative'
+          }]
+      };
+      var classList = info.classList.map(function (items) {
+        return {
+          name: 'classes',
+          type: 'selectbox',
+          label: 'Class',
+          items: items
+        };
+      });
+      var caption = {
+        type: 'label',
+        label: 'Caption',
+        items: [{
+            type: 'checkbox',
+            name: 'caption',
+            label: 'Show caption'
+          }]
+      };
+      return flatten([
+        [imageUrl],
+        imageList.toArray(),
+        info.hasAccessibilityOptions && info.hasDescription ? [isDecorative] : [],
+        info.hasDescription ? [imageDescription] : [],
+        info.hasImageTitle ? [imageTitle] : [],
+        info.hasDimensions ? [imageDimensions] : [],
+        [{
+            type: 'grid',
+            columns: 2,
+            items: flatten([
+              classList.toArray(),
+              info.hasImageCaption ? [caption] : []
+            ])
+          }]
+      ]);
+    };
+    var makeTab$1 = function (info) {
+      return {
+        title: 'General',
+        name: 'general',
+        items: makeItems(info)
+      };
+    };
+    var MainTab = {
+      makeTab: makeTab$1,
+      makeItems: makeItems
+    };
+
+    var makeTab$2 = function (_info) {
+      var items = [{
+          type: 'dropzone',
+          name: 'fileinput'
+        }];
+      return {
+        title: 'Upload',
+        name: 'upload',
+        items: items
+      };
+    };
+    var UploadTab = { makeTab: makeTab$2 };
+
+    var createState = function (info) {
+      return {
+        prevImage: ListUtils.findEntry(info.imageList, info.image.src),
+        prevAlt: info.image.alt,
+        open: true
+      };
+    };
+    var fromImageData = function (image) {
+      return {
+        src: {
+          value: image.src,
+          meta: {}
+        },
+        images: image.src,
+        alt: image.alt,
+        title: image.title,
+        dimensions: {
+          width: image.width,
+          height: image.height
+        },
+        classes: image.class,
+        caption: image.caption,
+        style: image.style,
+        vspace: image.vspace,
+        border: image.border,
+        hspace: image.hspace,
+        borderstyle: image.borderStyle,
+        fileinput: [],
+        isDecorative: image.isDecorative
+      };
+    };
+    var toImageData = function (data, removeEmptyAlt) {
+      return {
+        src: data.src.value,
+        alt: data.alt.length === 0 && removeEmptyAlt ? null : data.alt,
+        title: data.title,
+        width: data.dimensions.width,
+        height: data.dimensions.height,
+        class: data.classes,
+        style: data.style,
+        caption: data.caption,
+        hspace: data.hspace,
+        vspace: data.vspace,
+        border: data.border,
+        borderStyle: data.borderstyle,
+        isDecorative: data.isDecorative
+      };
+    };
+    var addPrependUrl2 = function (info, srcURL) {
+      if (!/^(?:[a-zA-Z]+:)?\/\//.test(srcURL)) {
+        return info.prependURL.bind(function (prependUrl) {
+          if (srcURL.substring(0, prependUrl.length) !== prependUrl) {
+            return Option.some(prependUrl + srcURL);
+          }
+          return Option.none();
+        });
+      }
+      return Option.none();
+    };
+    var addPrependUrl = function (info, api) {
+      var data = api.getData();
+      addPrependUrl2(info, data.src.value).each(function (srcURL) {
+        api.setData({
+          src: {
+            value: srcURL,
+            meta: data.src.meta
+          }
+        });
+      });
+    };
+    var formFillFromMeta2 = function (info, data, meta) {
+      if (info.hasDescription && isString(meta.alt)) {
+        data.alt = meta.alt;
+      }
+      if (info.hasAccessibilityOptions) {
+        data.isDecorative = meta.isDecorative || data.isDecorative || false;
+      }
+      if (info.hasImageTitle && isString(meta.title)) {
+        data.title = meta.title;
+      }
+      if (info.hasDimensions) {
+        if (isString(meta.width)) {
+          data.dimensions.width = meta.width;
+        }
+        if (isString(meta.height)) {
+          data.dimensions.height = meta.height;
+        }
+      }
+      if (isString(meta.class)) {
+        ListUtils.findEntry(info.classList, meta.class).each(function (entry) {
+          data.classes = entry.value;
+        });
+      }
+      if (info.hasImageCaption) {
+        if (isBoolean(meta.caption)) {
+          data.caption = meta.caption;
+        }
+      }
+      if (info.hasAdvTab) {
+        if (isString(meta.style)) {
+          data.style = meta.style;
+        }
+        if (isString(meta.vspace)) {
+          data.vspace = meta.vspace;
+        }
+        if (isString(meta.border)) {
+          data.border = meta.border;
+        }
+        if (isString(meta.hspace)) {
+          data.hspace = meta.hspace;
+        }
+        if (isString(meta.borderstyle)) {
+          data.borderstyle = meta.borderstyle;
+        }
+      }
+    };
+    var formFillFromMeta = function (info, api) {
+      var data = api.getData();
+      var meta = data.src.meta;
+      if (meta !== undefined) {
+        var newData = deepMerge({}, data);
+        formFillFromMeta2(info, newData, meta);
+        api.setData(newData);
+      }
+    };
+    var calculateImageSize = function (helpers, info, state, api) {
+      var data = api.getData();
+      var url = data.src.value;
+      var meta = data.src.meta || {};
+      if (!meta.width && !meta.height && info.hasDimensions) {
+        helpers.imageSize(url).then(function (size) {
+          if (state.open) {
+            api.setData({ dimensions: size });
+          }
+        });
+      }
+    };
+    var updateImagesDropdown = function (info, state, api) {
+      var data = api.getData();
+      var image = ListUtils.findEntry(info.imageList, data.src.value);
+      state.prevImage = image;
+      api.setData({
+        images: image.map(function (entry) {
+          return entry.value;
+        }).getOr('')
+      });
+    };
+    var changeSrc = function (helpers, info, state, api) {
+      addPrependUrl(info, api);
+      formFillFromMeta(info, api);
+      calculateImageSize(helpers, info, state, api);
+      updateImagesDropdown(info, state, api);
+    };
+    var changeImages = function (helpers, info, state, api) {
+      var data = api.getData();
+      var image = ListUtils.findEntry(info.imageList, data.images);
+      image.each(function (img) {
+        var updateAlt = data.alt === '' || state.prevImage.map(function (image) {
+          return image.text === data.alt;
+        }).getOr(false);
+        if (updateAlt) {
+          if (img.value === '') {
+            api.setData({
+              src: img,
+              alt: state.prevAlt
+            });
+          } else {
+            api.setData({
+              src: img,
+              alt: img.text
+            });
+          }
+        } else {
+          api.setData({ src: img });
+        }
+      });
+      state.prevImage = image;
+      changeSrc(helpers, info, state, api);
+    };
+    var calcVSpace = function (css) {
+      var matchingTopBottom = css['margin-top'] && css['margin-bottom'] && css['margin-top'] === css['margin-bottom'];
+      return matchingTopBottom ? removePixelSuffix(String(css['margin-top'])) : '';
+    };
+    var calcHSpace = function (css) {
+      var matchingLeftRight = css['margin-right'] && css['margin-left'] && css['margin-right'] === css['margin-left'];
+      return matchingLeftRight ? removePixelSuffix(String(css['margin-right'])) : '';
+    };
+    var calcBorderWidth = function (css) {
+      return css['border-width'] ? removePixelSuffix(String(css['border-width'])) : '';
+    };
+    var calcBorderStyle = function (css) {
+      return css['border-style'] ? String(css['border-style']) : '';
+    };
+    var calcStyle = function (parseStyle, serializeStyle, css) {
+      return serializeStyle(parseStyle(serializeStyle(css)));
+    };
+    var changeStyle2 = function (parseStyle, serializeStyle, data) {
+      var css = mergeMargins(parseStyle(data.style));
+      var dataCopy = deepMerge({}, data);
+      dataCopy.vspace = calcVSpace(css);
+      dataCopy.hspace = calcHSpace(css);
+      dataCopy.border = calcBorderWidth(css);
+      dataCopy.borderstyle = calcBorderStyle(css);
+      dataCopy.style = calcStyle(parseStyle, serializeStyle, css);
+      return dataCopy;
+    };
+    var changeStyle = function (helpers, api) {
+      var data = api.getData();
+      var newData = changeStyle2(helpers.parseStyle, helpers.serializeStyle, data);
+      api.setData(newData);
+    };
+    var changeAStyle = function (helpers, info, api) {
+      var data = deepMerge(fromImageData(info.image), api.getData());
+      var style = getStyleValue(helpers.normalizeCss, toImageData(data, false));
+      api.setData({ style: style });
+    };
+    var changeFileInput = function (helpers, info, state, api) {
+      var data = api.getData();
+      api.block('Uploading image');
+      head(data.fileinput).fold(function () {
+        api.unblock();
+      }, function (file) {
+        var blobUri = domGlobals.URL.createObjectURL(file);
+        var uploader = Uploader({
+          url: info.url,
+          basePath: info.basePath,
+          credentials: info.credentials,
+          handler: info.handler
+        });
+        var finalize = function () {
+          api.unblock();
+          domGlobals.URL.revokeObjectURL(blobUri);
+        };
+        var updateSrcAndSwitchTab = function (url) {
+          api.setData({
+            src: {
+              value: url,
+              meta: {}
+            }
+          });
+          api.showTab('general');
+          changeSrc(helpers, info, state, api);
+        };
+        blobToDataUri(file).then(function (dataUrl) {
+          var blobInfo = helpers.createBlobCache(file, blobUri, dataUrl);
+          if (info.automaticUploads) {
+            uploader.upload(blobInfo).then(function (url) {
+              updateSrcAndSwitchTab(url);
+              finalize();
+            }).catch(function (err) {
+              finalize();
+              helpers.alertErr(err);
+            });
+          } else {
+            helpers.addToBlobCache(blobInfo);
+            updateSrcAndSwitchTab(blobInfo.blobUri());
+            api.unblock();
+          }
+        });
+      });
+    };
+    var changeHandler = function (helpers, info, state) {
+      return function (api, evt) {
+        if (evt.name === 'src') {
+          changeSrc(helpers, info, state, api);
+        } else if (evt.name === 'images') {
+          changeImages(helpers, info, state, api);
+        } else if (evt.name === 'alt') {
+          state.prevAlt = api.getData().alt;
+        } else if (evt.name === 'style') {
+          changeStyle(helpers, api);
+        } else if (evt.name === 'vspace' || evt.name === 'hspace' || evt.name === 'border' || evt.name === 'borderstyle') {
+          changeAStyle(helpers, info, api);
+        } else if (evt.name === 'fileinput') {
+          changeFileInput(helpers, info, state, api);
+        } else if (evt.name === 'isDecorative') {
+          if (api.getData().isDecorative) {
+            api.disable('alt');
+          } else {
+            api.enable('alt');
+          }
+        }
+      };
+    };
+    var closeHandler = function (state) {
+      return function () {
+        state.open = false;
+      };
+    };
+    var makeDialogBody = function (info) {
+      if (info.hasAdvTab || info.hasUploadUrl || info.hasUploadHandler) {
+        var tabPanel = {
+          type: 'tabpanel',
+          tabs: flatten([
+            [MainTab.makeTab(info)],
+            info.hasAdvTab ? [AdvTab.makeTab(info)] : [],
+            info.hasUploadTab && (info.hasUploadUrl || info.hasUploadHandler) ? [UploadTab.makeTab(info)] : []
+          ])
+        };
+        return tabPanel;
+      } else {
+        var panel = {
+          type: 'panel',
+          items: MainTab.makeItems(info)
+        };
+        return panel;
+      }
+    };
+    var makeDialog = function (helpers) {
+      return function (info) {
+        var state = createState(info);
+        return {
+          title: 'Insert/Edit Image',
+          size: 'normal',
+          body: makeDialogBody(info),
+          buttons: [
+            {
+              type: 'cancel',
+              name: 'cancel',
+              text: 'Cancel'
+            },
+            {
+              type: 'submit',
+              name: 'save',
+              text: 'Save',
+              primary: true
+            }
+          ],
+          initialData: fromImageData(info.image),
+          onSubmit: helpers.onSubmit(info),
+          onChange: changeHandler(helpers, info, state),
+          onClose: closeHandler(state)
+        };
+      };
+    };
+    var submitHandler = function (editor) {
+      return function (info) {
+        return function (api) {
+          var data = deepMerge(fromImageData(info.image), api.getData());
+          editor.execCommand('mceUpdateImage', false, toImageData(data, info.hasAccessibilityOptions));
+          editor.editorUpload.uploadImagesAuto();
+          api.close();
+        };
+      };
+    };
+    var imageSize = function (editor) {
+      return function (url) {
+        return getImageSize(editor.documentBaseURI.toAbsolute(url)).then(function (dimensions) {
+          return {
+            width: String(dimensions.width),
+            height: String(dimensions.height)
+          };
+        });
+      };
+    };
+    var createBlobCache = function (editor) {
+      return function (file, blobUri, dataUrl) {
+        return editor.editorUpload.blobCache.create({
+          blob: file,
+          blobUri: blobUri,
+          name: file.name ? file.name.replace(/\.[^\.]+$/, '') : null,
+          base64: dataUrl.split(',')[1]
+        });
+      };
+    };
+    var addToBlobCache = function (editor) {
+      return function (blobInfo) {
+        editor.editorUpload.blobCache.add(blobInfo);
+      };
+    };
+    var alertErr = function (editor) {
+      return function (message) {
+        editor.windowManager.alert(message);
+      };
+    };
+    var normalizeCss$1 = function (editor) {
+      return function (cssText) {
+        return normalizeCss(editor, cssText);
+      };
+    };
+    var parseStyle = function (editor) {
+      return function (cssText) {
+        return editor.dom.parseStyle(cssText);
+      };
+    };
+    var serializeStyle = function (editor) {
+      return function (stylesArg, name) {
+        return editor.dom.serializeStyle(stylesArg, name);
+      };
+    };
+    var Dialog = function (editor) {
+      var helpers = {
+        onSubmit: submitHandler(editor),
+        imageSize: imageSize(editor),
+        addToBlobCache: addToBlobCache(editor),
+        createBlobCache: createBlobCache(editor),
+        alertErr: alertErr(editor),
+        normalizeCss: normalizeCss$1(editor),
+        parseStyle: parseStyle(editor),
+        serializeStyle: serializeStyle(editor)
+      };
+      var open = function () {
+        return collect(editor).then(makeDialog(helpers)).then(function (spec) {
+          return editor.windowManager.open(spec);
+        });
+      };
+      var openLater = function () {
+        open();
+      };
+      return {
+        open: open,
+        openLater: openLater
+      };
+    };
+
+    var register = function (editor) {
+      editor.addCommand('mceImage', Dialog(editor).openLater);
+      editor.addCommand('mceUpdateImage', function (_ui, data) {
+        editor.undoManager.transact(function () {
+          return insertOrUpdateImage(editor, data);
+        });
+      });
+    };
+
+    var hasImageClass = function (node) {
+      var className = node.attr('class');
+      return className && /\bimage\b/.test(className);
+    };
+    var toggleContentEditableState = function (state) {
+      return function (nodes) {
+        var i = nodes.length;
+        var toggleContentEditable = function (node) {
+          node.attr('contenteditable', state ? 'true' : null);
+        };
+        while (i--) {
+          var node = nodes[i];
+          if (hasImageClass(node)) {
+            node.attr('contenteditable', state ? 'false' : null);
+            global$4.each(node.getAll('figcaption'), toggleContentEditable);
+          }
+        }
+      };
+    };
+    var setup = function (editor) {
+      editor.on('PreInit', function () {
+        editor.parser.addNodeFilter('figure', toggleContentEditableState(true));
+        editor.serializer.addNodeFilter('figure', toggleContentEditableState(false));
+      });
+    };
+
+    var register$1 = function (editor) {
+      editor.ui.registry.addToggleButton('image', {
+        icon: 'image',
+        tooltip: 'Insert/edit image',
+        onAction: Dialog(editor).openLater,
+        onSetup: function (buttonApi) {
+          return editor.selection.selectorChangedWithUnbind('img:not([data-mce-object],[data-mce-placeholder]),figure.image', buttonApi.setActive).unbind;
+        }
+      });
+      editor.ui.registry.addMenuItem('image', {
+        icon: 'image',
+        text: 'Image...',
+        onAction: Dialog(editor).openLater
+      });
+      editor.ui.registry.addContextMenu('image', {
+        update: function (element) {
+          return isFigure(element) || isImage(element) && !isPlaceholderImage(element) ? ['image'] : [];
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('image', function (editor) {
+        setup(editor);
+        register$1(editor);
+        register(editor);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/image/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(m){"use strict";var e,t,n,r,o,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(){},l=function(e){return function(){return e}},s=l(!1),u=l(!0),c=function(){return d},d=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:s,isSome:s,isNone:u,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:l(null),getOrUndefined:l(undefined),or:n,orThunk:t,map:c,each:i,bind:c,exists:s,forall:u,filter:c,equals:e,equals_:e,toArray:function(){return[]},toString:l("none()")}),g=function(n){var e=l(n),t=function(){return a},r=function(e){return e(n)},a={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:u,isNone:s,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return g(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?a:d},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(s,function(e){return t(n,e)})}};return a},A={some:g,none:c,from:function(e){return null===e||e===undefined?d:g(e)}},f=function(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}},p=function(t){return function(e){return typeof e===t}},S=f("string"),h=f("object"),b=f("array"),v=(r=null,function(e){return r===e}),y=p("boolean"),w=p("number"),D=Array.prototype.push,x=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!b(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);D.apply(t,e[n])}return t},T=Object.prototype.hasOwnProperty,C=(o=function(e,t){return h(e)&&h(t)?C(e,t):t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var a=e[r];for(var i in a)T.call(a,i)&&(n[i]=o(n[i],a[i]))}return n}),U=function(){return(U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},O=("undefined"!=typeof m.window?m.window:Function("return this;")(),function(e,t,n){!function(e,t,n){if(!(S(n)||y(n)||w(n)))throw m.console.error("Invalid call to Attr.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}(e.dom(),t,n)}),I=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:l(e)}},N={fromHtml:function(e,t){var n=(t||m.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw m.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return I(n.childNodes[0])},fromTag:function(e,t){var n=(t||m.document).createElement(e);return I(n)},fromText:function(e,t){var n=(t||m.document).createTextNode(e);return I(n)},fromDom:I,fromPoint:function(e,t,n){var r=e.dom();return A.from(r.elementFromPoint(t,n)).map(I)}},P=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),L=tinymce.util.Tools.resolve("tinymce.util.Promise"),_=tinymce.util.Tools.resolve("tinymce.util.XHR"),E=function(e){return e.getParam("image_dimensions",!0,"boolean")},M=function(e){return e.getParam("images_upload_url","","string")},R=function(e){return e.getParam("images_upload_handler",undefined,"function")},z=function(e,t){return Math.max(parseInt(e,10),parseInt(t,10))},H=function(e){return e=e&&e.replace(/px$/,"")},k=function(e){return 0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e},j=function(e){if(e.margin){var t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e},B=function(e){return"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder"))},F=P.DOM,G=function(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?H(e.style.marginLeft):""},W=function(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?H(e.style.marginTop):""},q=function(e){return e.style.borderWidth?H(e.style.borderWidth):""},$=function(e,t){return e.hasAttribute(t)?e.getAttribute(t):""},J=function(e,t){return e.style[t]?e.style[t]:""},X=function(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName},V=function(e,t,n){""===n?e.removeAttribute(t):e.setAttribute(t,n)},K=function(e){var t,n,r,a;X(e)?(a=(r=e).parentNode,F.insertAfter(r,a),F.remove(a)):(t=e,n=F.create("figure",{"class":"image"}),F.insertAfter(n,t),n.appendChild(t),n.appendChild(F.create("figcaption",{contentEditable:"true"},"Caption")),n.contentEditable="false")},Z=function(e,t){var n=e.getAttribute("style"),r=t(null!==n?n:"");0<r.length?(e.setAttribute("style",r),e.setAttribute("data-mce-style",r)):e.removeAttribute("style")},Q=function(e,r){return function(e,t,n){e.style[t]?(e.style[t]=k(n),Z(e,r)):V(e,t,n)}},Y=function(e,t){return e.style[t]?H(e.style[t]):$(e,t)},ee=function(e,t){var n=k(t);e.style.marginLeft=n,e.style.marginRight=n},te=function(e,t){var n=k(t);e.style.marginTop=n,e.style.marginBottom=n},ne=function(e,t){var n=k(t);e.style.borderWidth=n},re=function(e,t){e.style.borderStyle=t},ae=function(e){return"FIGURE"===e.nodeName},ie=function(e){return 0===F.getAttrib(e,"alt").length&&"presentation"===F.getAttrib(e,"role")},oe=function(){return{src:"",alt:"",title:"",width:"",height:"","class":"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}},le=function(e,t){var n=m.document.createElement("img");return V(n,"style",t.style),!G(n)&&""===t.hspace||ee(n,t.hspace),!W(n)&&""===t.vspace||te(n,t.vspace),!q(n)&&""===t.border||ne(n,t.border),!J(n,"borderStyle")&&""===t.borderStyle||re(n,t.borderStyle),e(n.getAttribute("style"))},se=function(e,t){return{src:$(t,"src"),alt:ie(n=t)?"":$(n,"alt"),title:$(t,"title"),width:Y(t,"width"),height:Y(t,"height"),"class":$(t,"class"),style:e($(t,"style")),caption:X(t),hspace:G(t),vspace:W(t),border:q(t),borderStyle:J(t,"borderStyle"),isDecorative:ie(t)};var n},ue=function(e,t,n,r,a){n[r]!==t[r]&&a(e,r,n[r])},ce=function(e,t,n){if(n){F.setAttrib(e,"role","presentation");var r=N.fromDom(e);O(r,"alt","")}else{if(v(t)){r=N.fromDom(e);a="alt",r.dom().removeAttribute(a)}else{r=N.fromDom(e);O(r,"alt",t)}"presentation"===F.getAttrib(e,"role")&&F.setAttrib(e,"role","")}var a},me=function(r,a){return function(e,t,n){r(e,n),Z(e,a)}},de=function(e,t,n){var r,a,i,o=se(e,n);ue(n,o,t,"caption",function(e,t,n){return K(e)}),ue(n,o,t,"src",V),ue(n,o,t,"title",V),ue(n,o,t,"width",Q(0,e)),ue(n,o,t,"height",Q(0,e)),ue(n,o,t,"class",V),ue(n,o,t,"style",me(function(e,t){return V(e,"style",t)},e)),ue(n,o,t,"hspace",me(ee,e)),ue(n,o,t,"vspace",me(te,e)),ue(n,o,t,"border",me(ne,e)),ue(n,o,t,"borderStyle",me(re,e)),r=n,a=o,(i=t).alt===a.alt&&i.isDecorative===a.isDecorative||ce(r,i.alt,i.isDecorative)},ge=function(e,t){var n=e.dom.styles.parse(t),r=j(n),a=e.dom.styles.parse(e.dom.styles.serialize(r));return e.dom.styles.serialize(a)},fe=function(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"figure.image");return n?e.dom.select("img",n)[0]:t&&("IMG"!==t.nodeName||B(t))?null:t},pe=function(t,e){var n=t.dom,r=n.getParent(e.parentNode,function(e){return!!t.schema.getTextBlockElements()[e.nodeName]},t.getBody());return r?n.split(r,e):e},he=function(t,e){var n=function(e,t){var n=m.document.createElement("img");if(de(e,U(U({},t),{caption:!1}),n),ce(n,t.alt,t.isDecorative),t.caption){var r=F.create("figure",{"class":"image"});return r.appendChild(n),r.appendChild(F.create("figcaption",{contentEditable:"true"},"Caption")),r.contentEditable="false",r}return n}(function(e){return ge(t,e)},e);t.dom.setAttrib(n,"data-mce-id","__mcenew"),t.focus(),t.selection.setContent(n.outerHTML);var r=t.dom.select('*[data-mce-id="__mcenew"]')[0];if(t.dom.setAttrib(r,"data-mce-id",null),ae(r)){var a=pe(t,r);t.selection.select(a)}else t.selection.select(r)},be=function(t,e){var n,r,a,i,o,l=fe(t);if(de(function(e){return ge(t,e)},e,l),n=l,t.dom.setAttrib(n,"src",n.getAttribute("src")),ae(l.parentNode)){var s=l.parentNode;pe(t,s),t.selection.select(l.parentNode)}else t.selection.select(l),r=t,a=e,o=function(){i.onload=i.onerror=null,r.selection&&(r.selection.select(i),r.nodeChanged())},(i=l).onload=function(){a.width||a.height||!E(r)||r.dom.setAttribs(i,{width:String(i.clientWidth),height:String(i.clientHeight)}),o()},i.onerror=o},ve=tinymce.util.Tools.resolve("tinymce.util.Tools"),ye=function(e){return S(e.value)?e.value:""},we=function(e,a){var i=[];return ve.each(e,function(e){var t=S(e.text)?e.text:S(e.title)?e.title:"";if(e.menu!==undefined){var n=we(e.menu,a);i.push({text:t,items:n})}else{var r=a(e);i.push({text:t,value:r})}}),i},De=function(t){return void 0===t&&(t=ye),function(e){return e?A.from(e).map(function(e){return we(e,t)}):A.none()}},Ae=function(e,n){return function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return A.none()}(e,function(e){return t=e,Object.prototype.hasOwnProperty.call(t,"items")?Ae(e.items,n):e.value===n?A.some(e):A.none();var t})},Se=De,xe=function(e){return De(ye)(e)},Te=function(e,t){return e.bind(function(e){return Ae(e,t)})};function Ce(o){var t=function(e,r,a,t){var i,n;(i=new m.XMLHttpRequest).open("POST",o.url),i.withCredentials=o.credentials,i.upload.onprogress=function(e){t(e.loaded/e.total*100)},i.onerror=function(){a("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){var e,t,n;i.status<200||300<=i.status?a("HTTP Error: "+i.status):(e=JSON.parse(i.responseText))&&"string"==typeof e.location?r((t=o.basePath,n=e.location,t?t.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):a("Invalid JSON: "+i.responseText)},(n=new m.FormData).append("file",e.blob(),e.filename()),i.send(n)};return o=ve.extend({credentials:!1,handler:t},o),{upload:function(e){return o.url||o.handler!==t?(r=e,a=o.handler,new L(function(e,t){try{a(r,e,t,i)}catch(n){t(n.message)}})):L.reject("Upload url missing from the settings.");var r,a}}}var Ue=function(e){return{title:"Advanced",name:"advanced",items:[{type:"input",label:"Style",name:"style"},{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"selectbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}},Oe=function(r){var t,e,a=Se(function(e){return r.convertURL(e.value||e.url,"src")}),n=new L(function(t){var n,e;n=function(e){t(a(e).map(function(e){return x([[{text:"None",value:""}],e])}))},"string"==typeof(e=r.getParam("image_list",!1))?_.send({url:e,success:function(e){n(JSON.parse(e))}}):"function"==typeof e?e(n):n(e)}),i=xe(r.getParam("image_class_list")),o=r.getParam("image_advtab",!1,"boolean"),l=r.getParam("image_uploadtab",!0,"boolean"),s=!!M(r),u=!!R(r),c=(e=fe(t=r))?se(function(e){return ge(t,e)},e):oe(),m=r.getParam("image_description",!0,"boolean"),d=r.getParam("image_title",!1,"boolean"),g=E(r),f=r.getParam("image_caption",!1,"boolean"),p=r.getParam("a11y_advanced_options",!1,"boolean"),h=M(r),b=r.getParam("images_upload_base_path",undefined,"string"),v=r.getParam("images_upload_credentials",!1,"boolean"),y=R(r),w=r.getParam("automatic_uploads",!0,"boolean"),D=A.some(r.getParam("image_prepend_url","","string")).filter(function(e){return S(e)&&0<e.length});return n.then(function(e){return{image:c,imageList:e,classList:i,hasAdvTab:o,hasUploadTab:l,hasUploadUrl:s,hasUploadHandler:u,hasDescription:m,hasImageTitle:d,hasDimensions:g,hasImageCaption:f,url:h,basePath:b,credentials:v,handler:y,prependURL:D,hasAccessibilityOptions:p,automaticUploads:w}})},Ie=function(e){var t=e.imageList.map(function(e){return{name:"images",type:"selectbox",label:"Image list",items:e}}),n={name:"alt",type:"input",label:"Alternative description",disabled:e.hasAccessibilityOptions&&e.image.isDecorative},r=e.classList.map(function(e){return{name:"classes",type:"selectbox",label:"Class",items:e}});return x([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[n]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{type:"grid",columns:2,items:x([r.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]])},Ne=function(e){return{title:"General",name:"general",items:Ie(e)}},Pe=Ie,Le=function(e){return{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}},_e=function(e){return{src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e["class"],caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[],isDecorative:e.isDecorative}},Ee=function(e,t){return{src:e.src.value,alt:0===e.alt.length&&t?null:e.alt,title:e.title,width:e.dimensions.width,height:e.dimensions.height,"class":e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle,isDecorative:e.isDecorative}},Me=function(e,t){var n,r,a=t.getData();n=e,r=a.src.value,(/^(?:[a-zA-Z]+:)?\/\//.test(r)?A.none():n.prependURL.bind(function(e){return r.substring(0,e.length)!==e?A.some(e+r):A.none()})).each(function(e){t.setData({src:{value:e,meta:a.src.meta}})})},Re=function(e,t){var n,r,a,i=t.getData(),o=i.src.meta;if(o!==undefined){var l=C({},i);r=l,a=o,(n=e).hasDescription&&S(a.alt)&&(r.alt=a.alt),n.hasAccessibilityOptions&&(r.isDecorative=a.isDecorative||r.isDecorative||!1),n.hasImageTitle&&S(a.title)&&(r.title=a.title),n.hasDimensions&&(S(a.width)&&(r.dimensions.width=a.width),S(a.height)&&(r.dimensions.height=a.height)),S(a["class"])&&Te(n.classList,a["class"]).each(function(e){r.classes=e.value}),n.hasImageCaption&&y(a.caption)&&(r.caption=a.caption),n.hasAdvTab&&(S(a.style)&&(r.style=a.style),S(a.vspace)&&(r.vspace=a.vspace),S(a.border)&&(r.border=a.border),S(a.hspace)&&(r.hspace=a.hspace),S(a.borderstyle)&&(r.borderstyle=a.borderstyle)),t.setData(l)}},ze=function(e,t,n,r){var a,i,o,l,s,u,c,m,d,g,f,p;Me(t,r),Re(t,r),a=e,i=t,o=n,s=(l=r).getData(),u=s.src.value,(c=s.src.meta||{}).width||c.height||!i.hasDimensions||a.imageSize(u).then(function(e){o.open&&l.setData({dimensions:e})}),m=t,d=n,f=(g=r).getData(),p=Te(m.imageList,f.src.value),d.prevImage=p,g.setData({images:p.map(function(e){return e.value}).getOr("")})},He=function(e,t,n){var r,a,i,o,l,s=j(e(n.style)),u=C({},n);return u.vspace=(r=s)["margin-top"]&&r["margin-bottom"]&&r["margin-top"]===r["margin-bottom"]?H(String(r["margin-top"])):"",u.hspace=(a=s)["margin-right"]&&a["margin-left"]&&a["margin-right"]===a["margin-left"]?H(String(a["margin-right"])):"",u.border=(i=s)["border-width"]?H(String(i["border-width"])):"",u.borderstyle=(o=s)["border-style"]?String(o["border-style"]):"",u.style=(l=t)(e(l(s))),u},ke=function(s,u,t,c){var e,n=c.getData();c.block("Uploading image"),(0===(e=n.fileinput).length?A.none():A.some(e[0])).fold(function(){c.unblock()},function(n){var r,a=m.URL.createObjectURL(n),i=Ce({url:u.url,basePath:u.basePath,credentials:u.credentials,handler:u.handler}),o=function(){c.unblock(),m.URL.revokeObjectURL(a)},l=function(e){c.setData({src:{value:e,meta:{}}}),c.showTab("general"),ze(s,u,t,c)};r=n,new L(function(e,t){var n=new m.FileReader;n.onload=function(){e(n.result)},n.onerror=function(){t(n.error.message)},n.readAsDataURL(r)}).then(function(e){var t=s.createBlobCache(n,a,e);u.automaticUploads?i.upload(t).then(function(e){l(e),o()})["catch"](function(e){o(),s.alertErr(e)}):(s.addToBlobCache(t),l(t.blobUri()),c.unblock())})})},je=function(h,b,v){return function(e,t){var n,r,a,i,o,l,s,u,c,m,d,g,f,p;"src"===t.name?ze(h,b,v,e):"images"===t.name?(c=h,m=b,d=v,f=(g=e).getData(),(p=Te(m.imageList,f.images)).each(function(e){""===f.alt||d.prevImage.map(function(e){return e.text===f.alt}).getOr(!1)?""===e.value?g.setData({src:e,alt:d.prevAlt}):g.setData({src:e,alt:e.text}):g.setData({src:e})}),d.prevImage=p,ze(c,m,d,g)):"alt"===t.name?v.prevAlt=e.getData().alt:"style"===t.name?(o=h,s=(l=e).getData(),u=He(o.parseStyle,o.serializeStyle,s),l.setData(u)):"vspace"===t.name||"hspace"===t.name||"border"===t.name||"borderstyle"===t.name?(n=h,r=e,a=C(_e(b.image),r.getData()),i=le(n.normalizeCss,Ee(a,!1)),r.setData({style:i})):"fileinput"===t.name?ke(h,b,v,e):"isDecorative"===t.name&&(e.getData().isDecorative?e.disable("alt"):e.enable("alt"))}},Be=function(i){return function(e){var t,n,r,a={prevImage:Te((t=e).imageList,t.image.src),prevAlt:t.image.alt,open:!0};return{title:"Insert/Edit Image",size:"normal",body:(r=e).hasAdvTab||r.hasUploadUrl||r.hasUploadHandler?{type:"tabpanel",tabs:x([[Ne(r)],r.hasAdvTab?[Ue(r)]:[],r.hasUploadTab&&(r.hasUploadUrl||r.hasUploadHandler)?[Le(r)]:[]])}:{type:"panel",items:Pe(r)},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:_e(e.image),onSubmit:i.onSubmit(e),onChange:je(i,e,a),onClose:(n=a,function(){n.open=!1})}}},Fe=function(t){return function(e){return a=t.documentBaseURI.toAbsolute(e),new L(function(t){var n=m.document.createElement("img"),r=function(e){n.parentNode&&n.parentNode.removeChild(n),t(e)};n.onload=function(){var e={width:z(n.width,n.clientWidth),height:z(n.height,n.clientHeight)};r(L.resolve(e))},n.onerror=function(){r(L.reject("Failed to get image dimensions for: "+a))};var e=n.style;e.visibility="hidden",e.position="fixed",e.bottom=e.left="0px",e.width=e.height="auto",m.document.body.appendChild(n),n.src=a}).then(function(e){return{width:String(e.width),height:String(e.height)}});var a}},Ge=function(t){var n,r,a,i,o,l,s,e={onSubmit:function(n){return function(e){var t=C(_e(n.image),e.getData());s.execCommand("mceUpdateImage",!1,Ee(t,n.hasAccessibilityOptions)),s.editorUpload.uploadImagesAuto(),e.close()}},imageSize:Fe(s=t),addToBlobCache:function(e){l.editorUpload.blobCache.add(e)},createBlobCache:function(e,t,n){return o.editorUpload.blobCache.create({blob:e,blobUri:t,name:e.name?e.name.replace(/\.[^\.]+$/,""):null,base64:n.split(",")[1]})},alertErr:function(e){i.windowManager.alert(e)},normalizeCss:function(e){return ge(a,e)},parseStyle:function(e){return r.dom.parseStyle(e)},serializeStyle:(n=r=a=i=o=l=t,function(e,t){return n.dom.serializeStyle(e,t)})},u=function(){return Oe(t).then(Be(e)).then(function(e){return t.windowManager.open(e)})};return{open:u,openLater:function(){u()}}},We=function(n){n.addCommand("mceImage",Ge(n).openLater),n.addCommand("mceUpdateImage",function(e,t){n.undoManager.transact(function(){return function(t,e){var n=fe(t);if(n){var r=se(function(e){return ge(t,e)},n),a=U(U({},r),e);a.src?be(t,a):function(e,t){if(t){var n=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(n),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}}(t,n)}else e.src&&he(t,U(U({},oe()),e))}(n,t)})})},qe=function(i){return function(e){for(var t,n=e.length,r=function(e){e.attr("contenteditable",i?"true":null)};n--;){var a=e[n];(t=a.attr("class"))&&/\bimage\b/.test(t)&&(a.attr("contenteditable",i?"false":null),ve.each(a.getAll("figcaption"),r))}}};!function $e(){a.add("image",function(e){var t,n;(t=e).on("PreInit",function(){t.parser.addNodeFilter("figure",qe(!0)),t.serializer.addNodeFilter("figure",qe(!1))}),(n=e).ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:Ge(n).openLater,onSetup:function(e){return n.selection.selectorChangedWithUnbind("img:not([data-mce-object],[data-mce-placeholder]),figure.image",e.setActive).unbind}}),n.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:Ge(n).openLater}),n.ui.registry.addContextMenu("image",{update:function(e){return ae(e)||"IMG"===e.nodeName&&!B(e)?["image"]:[]}}),We(e)})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/imagetools/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "imagetools" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/imagetools')
+//   ES2015:
+//     import 'tinymce/plugins/imagetools'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/imagetools/plugin.js
@@ -1,1 +1,1300 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    function create(width, height) {
+      return resize(domGlobals.document.createElement('canvas'), width, height);
+    }
+    function clone(canvas) {
+      var tCanvas = create(canvas.width, canvas.height);
+      var ctx = get2dContext(tCanvas);
+      ctx.drawImage(canvas, 0, 0);
+      return tCanvas;
+    }
+    function get2dContext(canvas) {
+      return canvas.getContext('2d');
+    }
+    function resize(canvas, width, height) {
+      canvas.width = width;
+      canvas.height = height;
+      return canvas;
+    }
+
+    function getWidth(image) {
+      return image.naturalWidth || image.width;
+    }
+    function getHeight(image) {
+      return image.naturalHeight || image.height;
+    }
+
+    var promise = function () {
+      var Promise = function (fn) {
+        if (typeof this !== 'object') {
+          throw new TypeError('Promises must be constructed via new');
+        }
+        if (typeof fn !== 'function') {
+          throw new TypeError('not a function');
+        }
+        this._state = null;
+        this._value = null;
+        this._deferreds = [];
+        doResolve(fn, bind(resolve, this), bind(reject, this));
+      };
+      var asap = Promise.immediateFn || typeof window.setImmediate === 'function' && window.setImmediate || function (fn) {
+        domGlobals.setTimeout(fn, 1);
+      };
+      function bind(fn, thisArg) {
+        return function () {
+          return fn.apply(thisArg, arguments);
+        };
+      }
+      var isArray = Array.isArray || function (value) {
+        return Object.prototype.toString.call(value) === '[object Array]';
+      };
+      function handle(deferred) {
+        var me = this;
+        if (this._state === null) {
+          this._deferreds.push(deferred);
+          return;
+        }
+        asap(function () {
+          var cb = me._state ? deferred.onFulfilled : deferred.onRejected;
+          if (cb === null) {
+            (me._state ? deferred.resolve : deferred.reject)(me._value);
+            return;
+          }
+          var ret;
+          try {
+            ret = cb(me._value);
+          } catch (e) {
+            deferred.reject(e);
+            return;
+          }
+          deferred.resolve(ret);
+        });
+      }
+      function resolve(newValue) {
+        try {
+          if (newValue === this) {
+            throw new TypeError('A promise cannot be resolved with itself.');
+          }
+          if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
+            var then = newValue.then;
+            if (typeof then === 'function') {
+              doResolve(bind(then, newValue), bind(resolve, this), bind(reject, this));
+              return;
+            }
+          }
+          this._state = true;
+          this._value = newValue;
+          finale.call(this);
+        } catch (e) {
+          reject.call(this, e);
+        }
+      }
+      function reject(newValue) {
+        this._state = false;
+        this._value = newValue;
+        finale.call(this);
+      }
+      function finale() {
+        for (var _i = 0, _a = this._deferreds; _i < _a.length; _i++) {
+          var deferred = _a[_i];
+          handle.call(this, deferred);
+        }
+        this._deferreds = [];
+      }
+      function Handler(onFulfilled, onRejected, resolve, reject) {
+        this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
+        this.onRejected = typeof onRejected === 'function' ? onRejected : null;
+        this.resolve = resolve;
+        this.reject = reject;
+      }
+      function doResolve(fn, onFulfilled, onRejected) {
+        var done = false;
+        try {
+          fn(function (value) {
+            if (done) {
+              return;
+            }
+            done = true;
+            onFulfilled(value);
+          }, function (reason) {
+            if (done) {
+              return;
+            }
+            done = true;
+            onRejected(reason);
+          });
+        } catch (ex) {
+          if (done) {
+            return;
+          }
+          done = true;
+          onRejected(ex);
+        }
+      }
+      Promise.prototype.catch = function (onRejected) {
+        return this.then(null, onRejected);
+      };
+      Promise.prototype.then = function (onFulfilled, onRejected) {
+        var me = this;
+        return new Promise(function (resolve, reject) {
+          handle.call(me, new Handler(onFulfilled, onRejected, resolve, reject));
+        });
+      };
+      Promise.all = function () {
+        var values = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          values[_i] = arguments[_i];
+        }
+        var args = Array.prototype.slice.call(values.length === 1 && isArray(values[0]) ? values[0] : values);
+        return new Promise(function (resolve, reject) {
+          if (args.length === 0) {
+            return resolve([]);
+          }
+          var remaining = args.length;
+          function res(i, val) {
+            try {
+              if (val && (typeof val === 'object' || typeof val === 'function')) {
+                var then = val.then;
+                if (typeof then === 'function') {
+                  then.call(val, function (val) {
+                    res(i, val);
+                  }, reject);
+                  return;
+                }
+              }
+              args[i] = val;
+              if (--remaining === 0) {
+                resolve(args);
+              }
+            } catch (ex) {
+              reject(ex);
+            }
+          }
+          for (var i = 0; i < args.length; i++) {
+            res(i, args[i]);
+          }
+        });
+      };
+      Promise.resolve = function (value) {
+        if (value && typeof value === 'object' && value.constructor === Promise) {
+          return value;
+        }
+        return new Promise(function (resolve) {
+          resolve(value);
+        });
+      };
+      Promise.reject = function (reason) {
+        return new Promise(function (resolve, reject) {
+          reject(reason);
+        });
+      };
+      Promise.race = function (values) {
+        return new Promise(function (resolve, reject) {
+          for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {
+            var value = values_1[_i];
+            value.then(resolve, reject);
+          }
+        });
+      };
+      return Promise;
+    };
+    var Promise = window.Promise ? window.Promise : promise();
+
+    function imageToBlob(image) {
+      var src = image.src;
+      if (src.indexOf('data:') === 0) {
+        return dataUriToBlob(src);
+      }
+      return anyUriToBlob(src);
+    }
+    function blobToImage(blob) {
+      return new Promise(function (resolve, reject) {
+        var blobUrl = domGlobals.URL.createObjectURL(blob);
+        var image = new domGlobals.Image();
+        var removeListeners = function () {
+          image.removeEventListener('load', loaded);
+          image.removeEventListener('error', error);
+        };
+        function loaded() {
+          removeListeners();
+          resolve(image);
+        }
+        function error() {
+          removeListeners();
+          reject('Unable to load data of type ' + blob.type + ': ' + blobUrl);
+        }
+        image.addEventListener('load', loaded);
+        image.addEventListener('error', error);
+        image.src = blobUrl;
+        if (image.complete) {
+          loaded();
+        }
+      });
+    }
+    function anyUriToBlob(url) {
+      return new Promise(function (resolve, reject) {
+        var xhr = new domGlobals.XMLHttpRequest();
+        xhr.open('GET', url, true);
+        xhr.responseType = 'blob';
+        xhr.onload = function () {
+          if (this.status === 200) {
+            resolve(this.response);
+          }
+        };
+        xhr.onerror = function () {
+          var _this = this;
+          var corsError = function () {
+            var obj = new Error('No access to download image');
+            obj.code = 18;
+            obj.name = 'SecurityError';
+            return obj;
+          };
+          var genericError = function () {
+            return new Error('Error ' + _this.status + ' downloading image');
+          };
+          reject(this.status === 0 ? corsError() : genericError());
+        };
+        xhr.send();
+      });
+    }
+    function dataUriToBlobSync(uri) {
+      var data = uri.split(',');
+      var matches = /data:([^;]+)/.exec(data[0]);
+      if (!matches) {
+        return Option.none();
+      }
+      var mimetype = matches[1];
+      var base64 = data[1];
+      var sliceSize = 1024;
+      var byteCharacters = domGlobals.atob(base64);
+      var bytesLength = byteCharacters.length;
+      var slicesCount = Math.ceil(bytesLength / sliceSize);
+      var byteArrays = new Array(slicesCount);
+      for (var sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {
+        var begin = sliceIndex * sliceSize;
+        var end = Math.min(begin + sliceSize, bytesLength);
+        var bytes = new Array(end - begin);
+        for (var offset = begin, i = 0; offset < end; ++i, ++offset) {
+          bytes[i] = byteCharacters[offset].charCodeAt(0);
+        }
+        byteArrays[sliceIndex] = new Uint8Array(bytes);
+      }
+      return Option.some(new domGlobals.Blob(byteArrays, { type: mimetype }));
+    }
+    function dataUriToBlob(uri) {
+      return new Promise(function (resolve, reject) {
+        dataUriToBlobSync(uri).fold(function () {
+          reject('uri is not base64: ' + uri);
+        }, resolve);
+      });
+    }
+    function canvasToBlob(canvas, type, quality) {
+      type = type || 'image/png';
+      if (domGlobals.HTMLCanvasElement.prototype.toBlob) {
+        return new Promise(function (resolve, reject) {
+          canvas.toBlob(function (blob) {
+            if (blob) {
+              resolve(blob);
+            } else {
+              reject();
+            }
+          }, type, quality);
+        });
+      } else {
+        return dataUriToBlob(canvas.toDataURL(type, quality));
+      }
+    }
+    function canvasToDataURL(canvas, type, quality) {
+      type = type || 'image/png';
+      return canvas.toDataURL(type, quality);
+    }
+    function blobToCanvas(blob) {
+      return blobToImage(blob).then(function (image) {
+        revokeImageUrl(image);
+        var canvas = create(getWidth(image), getHeight(image));
+        var context = get2dContext(canvas);
+        context.drawImage(image, 0, 0);
+        return canvas;
+      });
+    }
+    function blobToDataUri(blob) {
+      return new Promise(function (resolve) {
+        var reader = new domGlobals.FileReader();
+        reader.onloadend = function () {
+          resolve(reader.result);
+        };
+        reader.readAsDataURL(blob);
+      });
+    }
+    function revokeImageUrl(image) {
+      domGlobals.URL.revokeObjectURL(image.src);
+    }
+
+    var blobToImage$1 = function (blob) {
+      return blobToImage(blob);
+    };
+    var imageToBlob$1 = function (image) {
+      return imageToBlob(image);
+    };
+
+    function create$1(getCanvas, blob, uri) {
+      var initialType = blob.type;
+      var getType = constant(initialType);
+      function toBlob() {
+        return Promise.resolve(blob);
+      }
+      var toDataURL = constant(uri);
+      function toBase64() {
+        return uri.split(',')[1];
+      }
+      function toAdjustedBlob(type, quality) {
+        return getCanvas.then(function (canvas) {
+          return canvasToBlob(canvas, type, quality);
+        });
+      }
+      function toAdjustedDataURL(type, quality) {
+        return getCanvas.then(function (canvas) {
+          return canvasToDataURL(canvas, type, quality);
+        });
+      }
+      function toAdjustedBase64(type, quality) {
+        return toAdjustedDataURL(type, quality).then(function (dataurl) {
+          return dataurl.split(',')[1];
+        });
+      }
+      function toCanvas() {
+        return getCanvas.then(clone);
+      }
+      return {
+        getType: getType,
+        toBlob: toBlob,
+        toDataURL: toDataURL,
+        toBase64: toBase64,
+        toAdjustedBlob: toAdjustedBlob,
+        toAdjustedDataURL: toAdjustedDataURL,
+        toAdjustedBase64: toAdjustedBase64,
+        toCanvas: toCanvas
+      };
+    }
+    function fromBlob(blob) {
+      return blobToDataUri(blob).then(function (uri) {
+        return create$1(blobToCanvas(blob), blob, uri);
+      });
+    }
+    function fromCanvas(canvas, type) {
+      return canvasToBlob(canvas, type).then(function (blob) {
+        return create$1(Promise.resolve(canvas), blob, canvas.toDataURL());
+      });
+    }
+
+    function rotate(ir, angle) {
+      return ir.toCanvas().then(function (canvas) {
+        return applyRotate(canvas, ir.getType(), angle);
+      });
+    }
+    function applyRotate(image, type, angle) {
+      var canvas = create(image.width, image.height);
+      var context = get2dContext(canvas);
+      var translateX = 0;
+      var translateY = 0;
+      angle = angle < 0 ? 360 + angle : angle;
+      if (angle === 90 || angle === 270) {
+        resize(canvas, canvas.height, canvas.width);
+      }
+      if (angle === 90 || angle === 180) {
+        translateX = canvas.width;
+      }
+      if (angle === 270 || angle === 180) {
+        translateY = canvas.height;
+      }
+      context.translate(translateX, translateY);
+      context.rotate(angle * Math.PI / 180);
+      context.drawImage(image, 0, 0);
+      return fromCanvas(canvas, type);
+    }
+    function flip(ir, axis) {
+      return ir.toCanvas().then(function (canvas) {
+        return applyFlip(canvas, ir.getType(), axis);
+      });
+    }
+    function applyFlip(image, type, axis) {
+      var canvas = create(image.width, image.height);
+      var context = get2dContext(canvas);
+      if (axis === 'v') {
+        context.scale(1, -1);
+        context.drawImage(image, 0, -canvas.height);
+      } else {
+        context.scale(-1, 1);
+        context.drawImage(image, -canvas.width, 0);
+      }
+      return fromCanvas(canvas, type);
+    }
+
+    var findUntil = function (xs, pred, until) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return Option.some(x);
+        } else if (until(x, i)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var find = function (xs, pred) {
+      return findUntil(xs, pred, never);
+    };
+
+    var flip$1 = function (ir, axis) {
+      return flip(ir, axis);
+    };
+    var rotate$1 = function (ir, angle) {
+      return rotate(ir, angle);
+    };
+
+    var blobToImageResult = function (blob) {
+      return fromBlob(blob);
+    };
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Delay');
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.Promise');
+
+    var global$4 = tinymce.util.Tools.resolve('tinymce.util.URI');
+
+    var getToolbarItems = function (editor) {
+      return editor.getParam('imagetools_toolbar', 'rotateleft rotateright flipv fliph editimage imageoptions');
+    };
+    var getProxyUrl = function (editor) {
+      return editor.getParam('imagetools_proxy');
+    };
+    var getCorsHosts = function (editor) {
+      return editor.getParam('imagetools_cors_hosts', [], 'string[]');
+    };
+    var getCredentialsHosts = function (editor) {
+      return editor.getParam('imagetools_credentials_hosts', [], 'string[]');
+    };
+    var getFetchImage = function (editor) {
+      return Option.from(editor.getParam('imagetools_fetch_image', null, 'function'));
+    };
+    var getApiKey = function (editor) {
+      return editor.getParam('api_key', editor.getParam('imagetools_api_key', '', 'string'), 'string');
+    };
+    var getUploadTimeout = function (editor) {
+      return editor.getParam('images_upload_timeout', 30000, 'number');
+    };
+    var shouldReuseFilename = function (editor) {
+      return editor.getParam('images_reuse_filename', false, 'boolean');
+    };
+
+    function getImageSize(img) {
+      var width, height;
+      function isPxValue(value) {
+        return /^[0-9\.]+px$/.test(value);
+      }
+      width = img.style.width;
+      height = img.style.height;
+      if (width || height) {
+        if (isPxValue(width) && isPxValue(height)) {
+          return {
+            w: parseInt(width, 10),
+            h: parseInt(height, 10)
+          };
+        }
+        return null;
+      }
+      width = img.width;
+      height = img.height;
+      if (width && height) {
+        return {
+          w: parseInt(width, 10),
+          h: parseInt(height, 10)
+        };
+      }
+      return null;
+    }
+    function setImageSize(img, size) {
+      var width, height;
+      if (size) {
+        width = img.style.width;
+        height = img.style.height;
+        if (width || height) {
+          img.style.width = size.w + 'px';
+          img.style.height = size.h + 'px';
+          img.removeAttribute('data-mce-style');
+        }
+        width = img.width;
+        height = img.height;
+        if (width || height) {
+          img.setAttribute('width', size.w);
+          img.setAttribute('height', size.h);
+        }
+      }
+    }
+    function getNaturalImageSize(img) {
+      return {
+        w: img.naturalWidth,
+        h: img.naturalHeight
+      };
+    }
+
+    var isValue = function (obj) {
+      return obj !== null && obj !== undefined;
+    };
+    var traverse = function (json, path) {
+      var value;
+      value = path.reduce(function (result, key) {
+        return isValue(result) ? result[key] : undefined;
+      }, json);
+      return isValue(value) ? value : null;
+    };
+    var requestUrlAsBlob = function (url, headers, withCredentials) {
+      return new global$3(function (resolve) {
+        var xhr;
+        xhr = new domGlobals.XMLHttpRequest();
+        xhr.onreadystatechange = function () {
+          if (xhr.readyState === 4) {
+            resolve({
+              status: xhr.status,
+              blob: this.response
+            });
+          }
+        };
+        xhr.open('GET', url, true);
+        xhr.withCredentials = withCredentials;
+        global$1.each(headers, function (value, key) {
+          xhr.setRequestHeader(key, value);
+        });
+        xhr.responseType = 'blob';
+        xhr.send();
+      });
+    };
+    var readBlob = function (blob) {
+      return new global$3(function (resolve) {
+        var fr = new domGlobals.FileReader();
+        fr.onload = function (e) {
+          var data = e.target;
+          resolve(data.result);
+        };
+        fr.readAsText(blob);
+      });
+    };
+    var parseJson = function (text) {
+      var json;
+      try {
+        json = JSON.parse(text);
+      } catch (ex) {
+      }
+      return json;
+    };
+
+    var friendlyHttpErrors = [
+      {
+        code: 404,
+        message: 'Could not find Image Proxy'
+      },
+      {
+        code: 403,
+        message: 'Rejected request'
+      },
+      {
+        code: 0,
+        message: 'Incorrect Image Proxy URL'
+      }
+    ];
+    var friendlyServiceErrors = [
+      {
+        type: 'key_missing',
+        message: 'The request did not include an api key.'
+      },
+      {
+        type: 'key_not_found',
+        message: 'The provided api key could not be found.'
+      },
+      {
+        type: 'domain_not_trusted',
+        message: 'The api key is not valid for the request origins.'
+      }
+    ];
+    var isServiceErrorCode = function (code) {
+      return code === 400 || code === 403 || code === 500;
+    };
+    var getHttpErrorMsg = function (status) {
+      var message = find(friendlyHttpErrors, function (error) {
+        return status === error.code;
+      }).fold(constant('Unknown ImageProxy error'), function (error) {
+        return error.message;
+      });
+      return 'ImageProxy HTTP error: ' + message;
+    };
+    var handleHttpError = function (status) {
+      var message = getHttpErrorMsg(status);
+      return global$3.reject(message);
+    };
+    var getServiceErrorMsg = function (type) {
+      return find(friendlyServiceErrors, function (error) {
+        return error.type === type;
+      }).fold(constant('Unknown service error'), function (error) {
+        return error.message;
+      });
+    };
+    var getServiceError = function (text) {
+      var serviceError = parseJson(text);
+      var errorType = traverse(serviceError, [
+        'error',
+        'type'
+      ]);
+      var errorMsg = errorType ? getServiceErrorMsg(errorType) : 'Invalid JSON in service error message';
+      return 'ImageProxy Service error: ' + errorMsg;
+    };
+    var handleServiceError = function (status, blob) {
+      return readBlob(blob).then(function (text) {
+        var serviceError = getServiceError(text);
+        return global$3.reject(serviceError);
+      });
+    };
+    var handleServiceErrorResponse = function (status, blob) {
+      return isServiceErrorCode(status) ? handleServiceError(status, blob) : handleHttpError(status);
+    };
+
+    var appendApiKey = function (url, apiKey) {
+      var separator = url.indexOf('?') === -1 ? '?' : '&';
+      if (/[?&]apiKey=/.test(url) || !apiKey) {
+        return url;
+      } else {
+        return url + separator + 'apiKey=' + encodeURIComponent(apiKey);
+      }
+    };
+    var requestServiceBlob = function (url, apiKey) {
+      var headers = {
+        'Content-Type': 'application/json;charset=UTF-8',
+        'tiny-api-key': apiKey
+      };
+      return requestUrlAsBlob(appendApiKey(url, apiKey), headers, false).then(function (result) {
+        return result.status < 200 || result.status >= 300 ? handleServiceErrorResponse(result.status, result.blob) : global$3.resolve(result.blob);
+      });
+    };
+    function requestBlob(url, withCredentials) {
+      return requestUrlAsBlob(url, {}, withCredentials).then(function (result) {
+        return result.status < 200 || result.status >= 300 ? handleHttpError(result.status) : global$3.resolve(result.blob);
+      });
+    }
+    var getUrl = function (url, apiKey, withCredentials) {
+      return apiKey ? requestServiceBlob(url, apiKey) : requestBlob(url, withCredentials);
+    };
+
+    var fromHtml = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      if (!div.hasChildNodes() || div.childNodes.length > 1) {
+        domGlobals.console.error('HTML does not have a single root node', html);
+        throw new Error('HTML must have a single root node');
+      }
+      return fromDom(div.childNodes[0]);
+    };
+    var fromTag = function (tag, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createElement(tag);
+      return fromDom(node);
+    };
+    var fromText = function (text, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createTextNode(text);
+      return fromDom(node);
+    };
+    var fromDom = function (node) {
+      if (node === null || node === undefined) {
+        throw new Error('Node cannot be null or undefined');
+      }
+      return { dom: constant(node) };
+    };
+    var fromPoint = function (docElm, x, y) {
+      var doc = docElm.dom();
+      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
+    };
+    var Element = {
+      fromHtml: fromHtml,
+      fromTag: fromTag,
+      fromText: fromText,
+      fromDom: fromDom,
+      fromPoint: fromPoint
+    };
+
+    var ELEMENT = 1;
+
+    var ELEMENT$1 = ELEMENT;
+    var is = function (element, selector) {
+      var dom = element.dom();
+      if (dom.nodeType !== ELEMENT$1) {
+        return false;
+      } else {
+        var elem = dom;
+        if (elem.matches !== undefined) {
+          return elem.matches(selector);
+        } else if (elem.msMatchesSelector !== undefined) {
+          return elem.msMatchesSelector(selector);
+        } else if (elem.webkitMatchesSelector !== undefined) {
+          return elem.webkitMatchesSelector(selector);
+        } else if (elem.mozMatchesSelector !== undefined) {
+          return elem.mozMatchesSelector(selector);
+        } else {
+          throw new Error('Browser lacks native selectors');
+        }
+      }
+    };
+
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
+
+    var child = function (scope, predicate) {
+      var pred = function (node) {
+        return predicate(Element.fromDom(node));
+      };
+      var result = find(scope.dom().childNodes, pred);
+      return result.map(Element.fromDom);
+    };
+
+    var child$1 = function (scope, selector) {
+      return child(scope, function (e) {
+        return is(e, selector);
+      });
+    };
+
+    var count = 0;
+    var getFigureImg = function (elem) {
+      return child$1(Element.fromDom(elem), 'img');
+    };
+    var isFigure = function (editor, elem) {
+      return editor.dom.is(elem, 'figure');
+    };
+    var getEditableImage = function (editor, elem) {
+      var isImage = function (imgNode) {
+        return editor.dom.is(imgNode, 'img:not([data-mce-object],[data-mce-placeholder])');
+      };
+      var isEditable = function (imgNode) {
+        return isImage(imgNode) && (isLocalImage(editor, imgNode) || isCorsImage(editor, imgNode) || editor.settings.imagetools_proxy);
+      };
+      if (isFigure(editor, elem)) {
+        var imgOpt = getFigureImg(elem);
+        return imgOpt.map(function (img) {
+          return isEditable(img.dom()) ? Option.some(img.dom()) : Option.none();
+        });
+      }
+      return isEditable(elem) ? Option.some(elem) : Option.none();
+    };
+    var displayError = function (editor, error) {
+      editor.notificationManager.open({
+        text: error,
+        type: 'error'
+      });
+    };
+    var getSelectedImage = function (editor) {
+      var elem = editor.selection.getNode();
+      if (isFigure(editor, elem)) {
+        return getFigureImg(elem);
+      } else {
+        return Option.some(Element.fromDom(elem));
+      }
+    };
+    var extractFilename = function (editor, url) {
+      var m = url.match(/\/([^\/\?]+)?\.(?:jpeg|jpg|png|gif)(?:\?|$)/i);
+      if (m) {
+        return editor.dom.encode(m[1]);
+      }
+      return null;
+    };
+    var createId = function () {
+      return 'imagetools' + count++;
+    };
+    var isLocalImage = function (editor, img) {
+      var url = img.src;
+      return url.indexOf('data:') === 0 || url.indexOf('blob:') === 0 || new global$4(url).host === editor.documentBaseURI.host;
+    };
+    var isCorsImage = function (editor, img) {
+      return global$1.inArray(getCorsHosts(editor), new global$4(img.src).host) !== -1;
+    };
+    var isCorsWithCredentialsImage = function (editor, img) {
+      return global$1.inArray(getCredentialsHosts(editor), new global$4(img.src).host) !== -1;
+    };
+    var defaultFetchImage = function (editor, img) {
+      var src = img.src, apiKey;
+      if (isCorsImage(editor, img)) {
+        return getUrl(img.src, null, isCorsWithCredentialsImage(editor, img));
+      }
+      if (!isLocalImage(editor, img)) {
+        src = getProxyUrl(editor);
+        src += (src.indexOf('?') === -1 ? '?' : '&') + 'url=' + encodeURIComponent(img.src);
+        apiKey = getApiKey(editor);
+        return getUrl(src, apiKey, false);
+      }
+      return imageToBlob$1(img);
+    };
+    var imageToBlob$2 = function (editor, img) {
+      return getFetchImage(editor).fold(function () {
+        return defaultFetchImage(editor, img);
+      }, function (customFetchImage) {
+        return customFetchImage(img);
+      });
+    };
+    var findBlob = function (editor, img) {
+      var blobInfo;
+      blobInfo = editor.editorUpload.blobCache.getByUri(img.src);
+      if (blobInfo) {
+        return global$3.resolve(blobInfo.blob());
+      }
+      return imageToBlob$2(editor, img);
+    };
+    var startTimedUpload = function (editor, imageUploadTimerState) {
+      var imageUploadTimer = global$2.setEditorTimeout(editor, function () {
+        editor.editorUpload.uploadImagesAuto();
+      }, getUploadTimeout(editor));
+      imageUploadTimerState.set(imageUploadTimer);
+    };
+    var cancelTimedUpload = function (imageUploadTimerState) {
+      global$2.clearTimeout(imageUploadTimerState.get());
+    };
+    var updateSelectedImage = function (editor, ir, uploadImmediately, imageUploadTimerState, selectedImage, size) {
+      return ir.toBlob().then(function (blob) {
+        var uri, name, blobCache, blobInfo;
+        blobCache = editor.editorUpload.blobCache;
+        uri = selectedImage.src;
+        if (shouldReuseFilename(editor)) {
+          blobInfo = blobCache.getByUri(uri);
+          if (blobInfo) {
+            uri = blobInfo.uri();
+            name = blobInfo.name();
+          } else {
+            name = extractFilename(editor, uri);
+          }
+        }
+        blobInfo = blobCache.create({
+          id: createId(),
+          blob: blob,
+          base64: ir.toBase64(),
+          uri: uri,
+          name: name
+        });
+        blobCache.add(blobInfo);
+        editor.undoManager.transact(function () {
+          function imageLoadedHandler() {
+            editor.$(selectedImage).off('load', imageLoadedHandler);
+            editor.nodeChanged();
+            if (uploadImmediately) {
+              editor.editorUpload.uploadImagesAuto();
+            } else {
+              cancelTimedUpload(imageUploadTimerState);
+              startTimedUpload(editor, imageUploadTimerState);
+            }
+          }
+          editor.$(selectedImage).on('load', imageLoadedHandler);
+          if (size) {
+            editor.$(selectedImage).attr({
+              width: size.w,
+              height: size.h
+            });
+          }
+          editor.$(selectedImage).attr({ src: blobInfo.blobUri() }).removeAttr('data-mce-src');
+        });
+        return blobInfo;
+      });
+    };
+    var selectedImageOperation = function (editor, imageUploadTimerState, fn, size) {
+      return function () {
+        var imgOpt = getSelectedImage(editor);
+        return imgOpt.fold(function () {
+          displayError(editor, 'Could not find selected image');
+        }, function (img) {
+          return editor._scanForImages().then(function () {
+            return findBlob(editor, img.dom());
+          }).then(blobToImageResult).then(fn).then(function (imageResult) {
+            return updateSelectedImage(editor, imageResult, false, imageUploadTimerState, img.dom(), size);
+          }, function (error) {
+            displayError(editor, error);
+          });
+        });
+      };
+    };
+    var rotate$2 = function (editor, imageUploadTimerState, angle) {
+      return function () {
+        var imgOpt = getSelectedImage(editor);
+        var flippedSize = imgOpt.fold(function () {
+          return null;
+        }, function (img) {
+          var size = getImageSize(img.dom());
+          return size ? {
+            w: size.h,
+            h: size.w
+          } : null;
+        });
+        return selectedImageOperation(editor, imageUploadTimerState, function (imageResult) {
+          return rotate$1(imageResult, angle);
+        }, flippedSize)();
+      };
+    };
+    var flip$2 = function (editor, imageUploadTimerState, axis) {
+      return function () {
+        return selectedImageOperation(editor, imageUploadTimerState, function (imageResult) {
+          return flip$1(imageResult, axis);
+        })();
+      };
+    };
+    var handleDialogBlob = function (editor, imageUploadTimerState, img, originalSize, blob) {
+      return blobToImage$1(blob).then(function (newImage) {
+        var newSize = getNaturalImageSize(newImage);
+        if (originalSize.w !== newSize.w || originalSize.h !== newSize.h) {
+          if (getImageSize(img)) {
+            setImageSize(img, newSize);
+          }
+        }
+        domGlobals.URL.revokeObjectURL(newImage.src);
+        return blob;
+      }).then(blobToImageResult).then(function (imageResult) {
+        return updateSelectedImage(editor, imageResult, true, imageUploadTimerState, img);
+      }, function () {
+      });
+    };
+
+    var saveState = 'save-state';
+    var disable = 'disable';
+    var enable = 'enable';
+
+    var createState = function (blob) {
+      return {
+        blob: blob,
+        url: domGlobals.URL.createObjectURL(blob)
+      };
+    };
+    var makeOpen = function (editor, imageUploadTimerState) {
+      return function () {
+        var getLoadedSpec = function (currentState) {
+          return {
+            title: 'Edit Image',
+            size: 'large',
+            body: {
+              type: 'panel',
+              items: [{
+                  type: 'imagetools',
+                  name: 'imagetools',
+                  label: 'Edit Image',
+                  currentState: currentState
+                }]
+            },
+            buttons: [
+              {
+                type: 'cancel',
+                name: 'cancel',
+                text: 'Cancel'
+              },
+              {
+                type: 'submit',
+                name: 'save',
+                text: 'Save',
+                primary: true,
+                disabled: true
+              }
+            ],
+            onSubmit: function (api) {
+              var blob = api.getData().imagetools.blob;
+              originalImgOpt.each(function (originalImg) {
+                originalSizeOpt.each(function (originalSize) {
+                  handleDialogBlob(editor, imageUploadTimerState, originalImg.dom(), originalSize, blob);
+                });
+              });
+              api.close();
+            },
+            onCancel: function () {
+            },
+            onAction: function (api, details) {
+              switch (details.name) {
+              case saveState:
+                if (details.value) {
+                  api.enable('save');
+                } else {
+                  api.disable('save');
+                }
+                break;
+              case disable:
+                api.disable('save');
+                api.disable('cancel');
+                break;
+              case enable:
+                api.enable('cancel');
+                break;
+              }
+            }
+          };
+        };
+        var originalImgOpt = getSelectedImage(editor);
+        var originalSizeOpt = originalImgOpt.map(function (origImg) {
+          return getNaturalImageSize(origImg.dom());
+        });
+        var imgOpt = getSelectedImage(editor);
+        imgOpt.each(function (img) {
+          getEditableImage(editor, img.dom()).each(function (_) {
+            findBlob(editor, img.dom()).then(function (blob) {
+              var state = createState(blob);
+              editor.windowManager.open(getLoadedSpec(state));
+            });
+          });
+        });
+      };
+    };
+
+    var register = function (editor, imageUploadTimerState) {
+      global$1.each({
+        mceImageRotateLeft: rotate$2(editor, imageUploadTimerState, -90),
+        mceImageRotateRight: rotate$2(editor, imageUploadTimerState, 90),
+        mceImageFlipVertical: flip$2(editor, imageUploadTimerState, 'v'),
+        mceImageFlipHorizontal: flip$2(editor, imageUploadTimerState, 'h'),
+        mceEditImage: makeOpen(editor, imageUploadTimerState)
+      }, function (fn, cmd) {
+        editor.addCommand(cmd, fn);
+      });
+    };
+
+    var setup = function (editor, imageUploadTimerState, lastSelectedImageState) {
+      editor.on('NodeChange', function (e) {
+        var lastSelectedImage = lastSelectedImageState.get();
+        if (lastSelectedImage && lastSelectedImage.src !== e.element.src) {
+          cancelTimedUpload(imageUploadTimerState);
+          editor.editorUpload.uploadImagesAuto();
+          lastSelectedImageState.set(null);
+        }
+        getEditableImage(editor, e.element).each(lastSelectedImageState.set);
+      });
+    };
+
+    var register$1 = function (editor) {
+      var cmd = function (command) {
+        return function () {
+          return editor.execCommand(command);
+        };
+      };
+      editor.ui.registry.addButton('rotateleft', {
+        tooltip: 'Rotate counterclockwise',
+        icon: 'rotate-left',
+        onAction: cmd('mceImageRotateLeft')
+      });
+      editor.ui.registry.addButton('rotateright', {
+        tooltip: 'Rotate clockwise',
+        icon: 'rotate-right',
+        onAction: cmd('mceImageRotateRight')
+      });
+      editor.ui.registry.addButton('flipv', {
+        tooltip: 'Flip vertically',
+        icon: 'flip-vertically',
+        onAction: cmd('mceImageFlipVertical')
+      });
+      editor.ui.registry.addButton('fliph', {
+        tooltip: 'Flip horizontally',
+        icon: 'flip-horizontally',
+        onAction: cmd('mceImageFlipHorizontal')
+      });
+      editor.ui.registry.addButton('editimage', {
+        tooltip: 'Edit image',
+        icon: 'edit-image',
+        onAction: cmd('mceEditImage'),
+        onSetup: function (buttonApi) {
+          var setDisabled = function () {
+            var elementOpt = getSelectedImage(editor);
+            elementOpt.each(function (element) {
+              var disabled = getEditableImage(editor, element.dom()).isNone();
+              buttonApi.setDisabled(disabled);
+            });
+          };
+          editor.on('NodeChange', setDisabled);
+          return function () {
+            editor.off('NodeChange', setDisabled);
+          };
+        }
+      });
+      editor.ui.registry.addButton('imageoptions', {
+        tooltip: 'Image options',
+        icon: 'image-options',
+        onAction: cmd('mceImage')
+      });
+      editor.ui.registry.addContextMenu('imagetools', {
+        update: function (element) {
+          return getEditableImage(editor, element).fold(function () {
+            return [];
+          }, function (_) {
+            return [{
+                text: 'Edit image',
+                icon: 'edit-image',
+                onAction: cmd('mceEditImage')
+              }];
+          });
+        }
+      });
+    };
+
+    var register$2 = function (editor) {
+      editor.ui.registry.addContextToolbar('imagetools', {
+        items: getToolbarItems(editor),
+        predicate: function (elem) {
+          return getEditableImage(editor, elem).isSome();
+        },
+        position: 'node',
+        scope: 'node'
+      });
+    };
+
+    function Plugin () {
+      global.add('imagetools', function (editor) {
+        var imageUploadTimerState = Cell(0);
+        var lastSelectedImageState = Cell(null);
+        register(editor, imageUploadTimerState);
+        register$1(editor);
+        register$2(editor);
+        setup(editor, imageUploadTimerState, lastSelectedImageState);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/imagetools/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(p){"use strict";var t,e,n,l=function(t){var e=t;return{get:function(){return e},set:function(t){e=t}}},r=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(){},f=function(t){return function(){return t}},i=f(!1),u=f(!0),a=function(){return c},c=(t=function(t){return t.isNone()},{fold:function(t,e){return t()},is:i,isSome:i,isNone:u,getOr:n=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:f(null),getOrUndefined:f(undefined),or:n,orThunk:e,map:a,each:o,bind:a,exists:i,forall:u,filter:a,equals:t,equals_:t,toArray:function(){return[]},toString:f("none()")}),s=function(n){var t=f(n),e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:u,isNone:i,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return s(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?o:c},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(i,function(t){return e(n,t)})}};return o},v={some:s,none:a,from:function(t){return null===t||t===undefined?c:s(t)}};function m(t,e){return y(p.document.createElement("canvas"),t,e)}function h(t){var e=m(t.width,t.height);return g(e).drawImage(t,0,0),e}function g(t){return t.getContext("2d")}function y(t,e,n){return t.width=e,t.height=n,t}var w,b,I,T=window.Promise?window.Promise:(b=(w=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],L(t,_(U,this),_(A,this))}).immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(t){p.setTimeout(t,1)},I=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},w.prototype["catch"]=function(t){return this.then(null,t)},w.prototype.then=function(n,r){var o=this;return new w(function(t,e){R.call(o,new E(n,r,t,e))})},w.all=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var c=Array.prototype.slice.call(1===t.length&&I(t[0])?t[0]:t);return new w(function(o,i){if(0===c.length)return o([]);var u=c.length;function a(e,t){try{if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void n.call(t,function(t){a(e,t)},i)}c[e]=t,0==--u&&o(c)}catch(r){i(r)}}for(var t=0;t<c.length;t++)a(t,c[t])})},w.resolve=function(e){return e&&"object"==typeof e&&e.constructor===w?e:new w(function(t){t(e)})},w.reject=function(n){return new w(function(t,e){e(n)})},w.race=function(o){return new w(function(t,e){for(var n=0,r=o;n<r.length;n++)r[n].then(t,e)})},w);function _(t,e){return function(){return t.apply(e,arguments)}}function R(r){var o=this;null!==this._state?b(function(){var t=o._state?r.onFulfilled:r.onRejected;if(null!==t){var e;try{e=t(o._value)}catch(n){return void r.reject(n)}r.resolve(e)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function U(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void L(_(e,t),_(U,this),_(A,this))}this._state=!0,this._value=t,x.call(this)}catch(n){A.call(this,n)}}function A(t){this._state=!1,this._value=t,x.call(this)}function x(){for(var t=0,e=this._deferreds;t<e.length;t++){var n=e[t];R.call(this,n)}this._deferreds=[]}function E(t,e,n,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r}function L(t,e,n){var r=!1;try{t(function(t){r||(r=!0,e(t))},function(t){r||(r=!0,n(t))})}catch(o){if(r)return;r=!0,n(o)}}function j(t){var e=t.src;return(0===e.indexOf("data:")?k:function n(r){return new T(function(t,n){var e=new p.XMLHttpRequest;e.open("GET",r,!0),e.responseType="blob",e.onload=function(){200===this.status&&t(this.response)},e.onerror=function(){var t,e=this;n(0===this.status?((t=new Error("No access to download image")).code=18,t.name="SecurityError",t):new Error("Error "+e.status+" downloading image"))},e.send()})})(e)}function C(a){return new T(function(t,e){var n=p.URL.createObjectURL(a),r=new p.Image,o=function(){r.removeEventListener("load",i),r.removeEventListener("error",u)};function i(){o(),t(r)}function u(){o(),e("Unable to load data of type "+a.type+": "+n)}r.addEventListener("load",i),r.addEventListener("error",u),r.src=n,r.complete&&i()})}function k(n){return new T(function(t,e){(function g(t){var e=t.split(","),n=/data:([^;]+)/.exec(e[0]);if(!n)return v.none();for(var r=n[1],o=e[1],i=p.atob(o),u=i.length,a=Math.ceil(u/1024),c=new Array(a),s=0;s<a;++s){for(var f=1024*s,l=Math.min(1024+f,u),d=new Array(l-f),m=f,h=0;m<l;++h,++m)d[h]=i[m].charCodeAt(0);c[s]=new Uint8Array(d)}return v.some(new p.Blob(c,{type:r}))})(n).fold(function(){e("uri is not base64: "+n)},t)})}function O(t,r,o){return r=r||"image/png",p.HTMLCanvasElement.prototype.toBlob?new T(function(e,n){t.toBlob(function(t){t?e(t):n()},r,o)}):k(t.toDataURL(r,o))}function P(t){return C(t).then(function(t){!function n(t){p.URL.revokeObjectURL(t.src)}(t);var e=m(function r(t){return t.naturalWidth||t.width}(t),function o(t){return t.naturalHeight||t.height}(t));return g(e).drawImage(t,0,0),e})}function S(t,e,n){var r=e.type;function o(e,n){return t.then(function(t){return function r(t,e,n){return e=e||"image/png",t.toDataURL(e,n)}(t,e,n)})}return{getType:f(r),toBlob:function i(){return T.resolve(e)},toDataURL:f(n),toBase64:function u(){return n.split(",")[1]},toAdjustedBlob:function a(e,n){return t.then(function(t){return O(t,e,n)})},toAdjustedDataURL:o,toAdjustedBase64:function c(t,e){return o(t,e).then(function(t){return t.split(",")[1]})},toCanvas:function s(){return t.then(h)}}}function M(e){return function t(n){return new T(function(t){var e=new p.FileReader;e.onloadend=function(){t(e.result)},e.readAsDataURL(n)})}(e).then(function(t){return S(P(e),e,t)})}function B(e,t){return O(e,t).then(function(t){return S(T.resolve(e),t,e.toDataURL())})}function N(e,n){return e.toCanvas().then(function(t){return function a(t,e,n){var r=m(t.width,t.height),o=g(r),i=0,u=0;90!==(n=n<0?360+n:n)&&270!==n||y(r,r.height,r.width);90!==n&&180!==n||(i=r.width);270!==n&&180!==n||(u=r.height);return o.translate(i,u),o.rotate(n*Math.PI/180),o.drawImage(t,0,0),B(r,e)}(t,e.getType(),n)})}function D(e,n){return e.toCanvas().then(function(t){return function i(t,e,n){var r=m(t.width,t.height),o=g(r);"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0));return B(r,e)}(t,e.getType(),n)})}var F=function(t,e){return function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return v.some(i);if(n(i,r))break}return v.none()}(t,e,i)},H=function(t){return M(t)},q=tinymce.util.Tools.resolve("tinymce.util.Delay"),z=tinymce.util.Tools.resolve("tinymce.util.Promise"),$=tinymce.util.Tools.resolve("tinymce.util.URI");function G(t){var e,n;function r(t){return/^[0-9\.]+px$/.test(t)}return e=t.style.width,n=t.style.height,e||n?r(e)&&r(n)?{w:parseInt(e,10),h:parseInt(n,10)}:null:(e=t.width,n=t.height,e&&n?{w:parseInt(e,10),h:parseInt(n,10)}:null)}function J(t){return{w:t.naturalWidth,h:t.naturalHeight}}var K=function(t){return null!==t&&t!==undefined},V=function(e,r,o){return new z(function(t){var n;(n=new p.XMLHttpRequest).onreadystatechange=function(){4===n.readyState&&t({status:n.status,blob:this.response})},n.open("GET",e,!0),n.withCredentials=o,d.each(r,function(t,e){n.setRequestHeader(e,t)}),n.responseType="blob",n.send()})},W=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],X=[{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],Q=function(t){var e,n=(e=t,"ImageProxy HTTP error: "+F(W,function(t){return e===t.code}).fold(f("Unknown ImageProxy error"),function(t){return t.message}));return z.reject(n)},Y=function(t){var e,n,r=function(t){var e;try{e=JSON.parse(t)}catch(n){}return e}(t),o=(e=["error","type"].reduce(function(t,e){return K(t)?t[e]:undefined},r),K(e)?e:null);return"ImageProxy Service error: "+(o?(n=o,F(X,function(t){return t.type===n}).fold(f("Unknown service error"),function(t){return t.message})):"Invalid JSON in service error message")},Z=function(t,e){return r=e,new z(function(n){var t=new p.FileReader;t.onload=function(t){var e=t.target;n(e.result)},t.readAsText(r)}).then(function(t){var e=Y(t);return z.reject(e)});var r},tt=function(t,e){var n,r,o,i={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":e};return V((r=e,o=-1===(n=t).indexOf("?")?"?":"&",/[?&]apiKey=/.test(n)||!r?n:n+o+"apiKey="+encodeURIComponent(r)),i,!1).then(function(t){return t.status<200||300<=t.status?(e=t.status,n=t.blob,400===(r=e)||403===r||500===r?Z(0,n):Q(e)):z.resolve(t.blob);var e,n,r})};var et=function(t,e,n){return e?tt(t,e):function r(t,e){return V(t,{},e).then(function(t){return t.status<200||300<=t.status?Q(t.status):z.resolve(t.blob)})}(t,n)},nt=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:f(t)}},rt={fromHtml:function(t,e){var n=(e||p.document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw p.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return nt(n.childNodes[0])},fromTag:function(t,e){var n=(e||p.document).createElement(t);return nt(n)},fromText:function(t,e){var n=(e||p.document).createTextNode(t);return nt(n)},fromDom:nt,fromPoint:function(t,e,n){var r=t.dom();return v.from(r.elementFromPoint(e,n)).map(nt)}},ot=("undefined"!=typeof p.window?p.window:Function("return this;")(),function(t,e){return n=function(t){return function(t,e){var n=t.dom();if(1!==n.nodeType)return!1;var r=n;if(r.matches!==undefined)return r.matches(e);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(e);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(e);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}(t,e)},F(t.dom().childNodes,function(t){return n(rt.fromDom(t))}).map(rt.fromDom);var n}),it=0,ut=function(t){return ot(rt.fromDom(t),"img")},at=function(t,e){return t.dom.is(e,"figure")},ct=function(n,t){var e=function(t){return e=t,n.dom.is(e,"img:not([data-mce-object],[data-mce-placeholder])")&&(lt(n,t)||dt(n,t)||n.settings.imagetools_proxy);var e};return at(n,t)?ut(t).map(function(t){return e(t.dom())?v.some(t.dom()):v.none()}):e(t)?v.some(t):v.none()},st=function(t,e){t.notificationManager.open({text:e,type:"error"})},ft=function(t){var e=t.selection.getNode();return at(t,e)?ut(e):v.some(rt.fromDom(e))},lt=function(t,e){var n=e.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new $(n).host===t.documentBaseURI.host},dt=function(t,e){return-1!==d.inArray(t.getParam("imagetools_cors_hosts",[],"string[]"),new $(e.src).host)},mt=function(t,e){var n,r,o,i,u=e.src;return dt(t,e)?et(e.src,null,(r=t,o=e,-1!==d.inArray(r.getParam("imagetools_credentials_hosts",[],"string[]"),new $(o.src).host))):lt(t,e)?j(e):(u=t.getParam("imagetools_proxy"),u+=(-1===u.indexOf("?")?"?":"&")+"url="+encodeURIComponent(e.src),n=(i=t).getParam("api_key",i.getParam("imagetools_api_key","","string"),"string"),et(u,n,!1))},ht=function(t,e){return n=t,v.from(n.getParam("imagetools_fetch_image",null,"function")).fold(function(){return mt(t,e)},function(t){return t(e)});var n},gt=function(t,e){var n;return(n=t.editorUpload.blobCache.getByUri(e.src))?z.resolve(n.blob()):ht(t,e)},pt=function(t){q.clearTimeout(t.get())},vt=function(a,c,s,f,l,d){return c.toBlob().then(function(t){var e,n,r,o,i,u;return r=a.editorUpload.blobCache,e=l.src,a.getParam("images_reuse_filename",!1,"boolean")&&(n=(o=r.getByUri(e))?(e=o.uri(),o.name()):(i=a,(u=e.match(/\/([^\/\?]+)?\.(?:jpeg|jpg|png|gif)(?:\?|$)/i))?i.dom.encode(u[1]):null)),o=r.create({id:"imagetools"+it++,blob:t,base64:c.toBase64(),uri:e,name:n}),r.add(o),a.undoManager.transact(function(){a.$(l).on("load",function r(){var t,e,n;a.$(l).off("load",r),a.nodeChanged(),s?a.editorUpload.uploadImagesAuto():(pt(f),t=a,e=f,n=q.setEditorTimeout(t,function(){t.editorUpload.uploadImagesAuto()},t.getParam("images_upload_timeout",3e4,"number")),e.set(n))}),d&&a.$(l).attr({width:d.w,height:d.h}),a.$(l).attr({src:o.blobUri()}).removeAttr("data-mce-src")}),o})},yt=function(n,r,t,o){return function(){return ft(n).fold(function(){st(n,"Could not find selected image")},function(e){return n._scanForImages().then(function(){return gt(n,e.dom())}).then(H).then(t).then(function(t){return vt(n,t,!1,r,e.dom(),o)},function(t){st(n,t)})})}},wt=function(e,n,r){return function(){var t=ft(e).fold(function(){return null},function(t){var e=G(t.dom());return e?{w:e.h,h:e.w}:null});return yt(e,n,function(t){return N(t,r)},t)()}},bt=function(t,e,n){return function(){return yt(t,e,function(t){return D(t,n)})()}},It=function(e,n,r,i,u){return C(u).then(function(t){var e=J(t);return i.w===e.w&&i.h===e.h||G(r)&&function o(t,e){var n,r;e&&(n=t.style.width,r=t.style.height,(n||r)&&(t.style.width=e.w+"px",t.style.height=e.h+"px",t.removeAttribute("data-mce-style")),n=t.width,r=t.height,(n||r)&&(t.setAttribute("width",e.w),t.setAttribute("height",e.h)))}(r,e),p.URL.revokeObjectURL(t.src),u}).then(H).then(function(t){return vt(e,t,!0,n,r)},function(){})},Tt=function(i,u){return function(){var r=ft(i),o=r.map(function(t){return J(t.dom())});ft(i).each(function(e){ct(i,e.dom()).each(function(t){gt(i,e.dom()).then(function(t){var e,n={blob:e=t,url:p.URL.createObjectURL(e)};i.windowManager.open({title:"Edit Image",size:"large",body:{type:"panel",items:[{type:"imagetools",name:"imagetools",label:"Edit Image",currentState:n}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0,disabled:!0}],onSubmit:function(t){var n=t.getData().imagetools.blob;r.each(function(e){o.each(function(t){It(i,u,e.dom(),t,n)})}),t.close()},onCancel:function(){},onAction:function(t,e){switch(e.name){case"save-state":e.value?t.enable("save"):t.disable("save");break;case"disable":t.disable("save"),t.disable("cancel");break;case"enable":t.enable("cancel")}}})})})})}};!function _t(){r.add("imagetools",function(t){var n,e,r,o,i,u,a,c,s=l(0),f=l(null);n=t,e=s,d.each({mceImageRotateLeft:wt(n,e,-90),mceImageRotateRight:wt(n,e,90),mceImageFlipVertical:bt(n,e,"v"),mceImageFlipHorizontal:bt(n,e,"h"),mceEditImage:Tt(n,e)},function(t,e){n.addCommand(e,t)}),o=function(t){return function(){return r.execCommand(t)}},(r=t).ui.registry.addButton("rotateleft",{tooltip:"Rotate counterclockwise",icon:"rotate-left",onAction:o("mceImageRotateLeft")}),r.ui.registry.addButton("rotateright",{tooltip:"Rotate clockwise",icon:"rotate-right",onAction:o("mceImageRotateRight")}),r.ui.registry.addButton("flipv",{tooltip:"Flip vertically",icon:"flip-vertically",onAction:o("mceImageFlipVertical")}),r.ui.registry.addButton("fliph",{tooltip:"Flip horizontally",icon:"flip-horizontally",onAction:o("mceImageFlipHorizontal")}),r.ui.registry.addButton("editimage",{tooltip:"Edit image",icon:"edit-image",onAction:o("mceEditImage"),onSetup:function(n){var t=function(){ft(r).each(function(t){var e=ct(r,t.dom()).isNone();n.setDisabled(e)})};return r.on("NodeChange",t),function(){r.off("NodeChange",t)}}}),r.ui.registry.addButton("imageoptions",{tooltip:"Image options",icon:"image-options",onAction:o("mceImage")}),r.ui.registry.addContextMenu("imagetools",{update:function(t){return ct(r,t).fold(function(){return[]},function(t){return[{text:"Edit image",icon:"edit-image",onAction:o("mceEditImage")}]})}}),(i=t).ui.registry.addContextToolbar("imagetools",{items:i.getParam("imagetools_toolbar","rotateleft rotateright flipv fliph editimage imageoptions"),predicate:function(t){return ct(i,t).isSome()},position:"node",scope:"node"}),a=s,c=f,(u=t).on("NodeChange",function(t){var e=c.get();e&&e.src!==t.element.src&&(pt(a),u.editorUpload.uploadImagesAuto(),c.set(null)),ct(u,t.element).each(c.set)})})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/importcss/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "importcss" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/importcss')
+//   ES2015:
+//     import 'tinymce/plugins/importcss'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/importcss/plugin.js
@@ -1,1 +1,330 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.EditorManager');
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var shouldMergeClasses = function (editor) {
+      return editor.getParam('importcss_merge_classes');
+    };
+    var shouldImportExclusive = function (editor) {
+      return editor.getParam('importcss_exclusive');
+    };
+    var getSelectorConverter = function (editor) {
+      return editor.getParam('importcss_selector_converter');
+    };
+    var getSelectorFilter = function (editor) {
+      return editor.getParam('importcss_selector_filter');
+    };
+    var getCssGroups = function (editor) {
+      return editor.getParam('importcss_groups');
+    };
+    var shouldAppend = function (editor) {
+      return editor.getParam('importcss_append');
+    };
+    var getFileFilter = function (editor) {
+      return editor.getParam('importcss_file_filter');
+    };
+
+    var typeOf = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf(value) === type;
+      };
+    };
+    var isArray = isType('array');
+
+    var nativePush = Array.prototype.push;
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var flatten = function (xs) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        if (!isArray(xs[i])) {
+          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
+        }
+        nativePush.apply(r, xs[i]);
+      }
+      return r;
+    };
+    var bind = function (xs, f) {
+      return flatten(map(xs, f));
+    };
+
+    var generate = function () {
+      var ungroupedOrder = [];
+      var groupOrder = [];
+      var groups = {};
+      var addItemToGroup = function (groupTitle, itemInfo) {
+        if (groups[groupTitle]) {
+          groups[groupTitle].push(itemInfo);
+        } else {
+          groupOrder.push(groupTitle);
+          groups[groupTitle] = [itemInfo];
+        }
+      };
+      var addItem = function (itemInfo) {
+        ungroupedOrder.push(itemInfo);
+      };
+      var toFormats = function () {
+        var groupItems = bind(groupOrder, function (g) {
+          var items = groups[g];
+          return items.length === 0 ? [] : [{
+              title: g,
+              items: items
+            }];
+        });
+        return groupItems.concat(ungroupedOrder);
+      };
+      return {
+        addItemToGroup: addItemToGroup,
+        addItem: addItem,
+        toFormats: toFormats
+      };
+    };
+
+    var removeCacheSuffix = function (url) {
+      var cacheSuffix = global$3.cacheSuffix;
+      if (typeof url === 'string') {
+        url = url.replace('?' + cacheSuffix, '').replace('&' + cacheSuffix, '');
+      }
+      return url;
+    };
+    var isSkinContentCss = function (editor, href) {
+      var settings = editor.settings, skin = settings.skin !== false ? settings.skin || 'oxide' : false;
+      if (skin) {
+        var skinUrl = settings.skin_url ? editor.documentBaseURI.toAbsolute(settings.skin_url) : global$2.baseURL + '/skins/ui/' + skin;
+        var contentSkinUrlPart = global$2.baseURL + '/skins/content/';
+        return href === skinUrl + '/content' + (editor.inline ? '.inline' : '') + '.min.css' || href.indexOf(contentSkinUrlPart) !== -1;
+      }
+      return false;
+    };
+    var compileFilter = function (filter) {
+      if (typeof filter === 'string') {
+        return function (value) {
+          return value.indexOf(filter) !== -1;
+        };
+      } else if (filter instanceof RegExp) {
+        return function (value) {
+          return filter.test(value);
+        };
+      }
+      return filter;
+    };
+    var getSelectors = function (editor, doc, fileFilter) {
+      var selectors = [], contentCSSUrls = {};
+      function append(styleSheet, imported) {
+        var href = styleSheet.href, rules;
+        href = removeCacheSuffix(href);
+        if (!href || !fileFilter(href, imported) || isSkinContentCss(editor, href)) {
+          return;
+        }
+        global$4.each(styleSheet.imports, function (styleSheet) {
+          append(styleSheet, true);
+        });
+        try {
+          rules = styleSheet.cssRules || styleSheet.rules;
+        } catch (e) {
+        }
+        global$4.each(rules, function (cssRule) {
+          if (cssRule.styleSheet) {
+            append(cssRule.styleSheet, true);
+          } else if (cssRule.selectorText) {
+            global$4.each(cssRule.selectorText.split(','), function (selector) {
+              selectors.push(global$4.trim(selector));
+            });
+          }
+        });
+      }
+      global$4.each(editor.contentCSS, function (url) {
+        contentCSSUrls[url] = true;
+      });
+      if (!fileFilter) {
+        fileFilter = function (href, imported) {
+          return imported || contentCSSUrls[href];
+        };
+      }
+      try {
+        global$4.each(doc.styleSheets, function (styleSheet) {
+          append(styleSheet);
+        });
+      } catch (e) {
+      }
+      return selectors;
+    };
+    var defaultConvertSelectorToFormat = function (editor, selectorText) {
+      var format;
+      var selector = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText);
+      if (!selector) {
+        return;
+      }
+      var elementName = selector[1];
+      var classes = selector[2].substr(1).split('.').join(' ');
+      var inlineSelectorElements = global$4.makeMap('a,img');
+      if (selector[1]) {
+        format = { title: selectorText };
+        if (editor.schema.getTextBlockElements()[elementName]) {
+          format.block = elementName;
+        } else if (editor.schema.getBlockElements()[elementName] || inlineSelectorElements[elementName.toLowerCase()]) {
+          format.selector = elementName;
+        } else {
+          format.inline = elementName;
+        }
+      } else if (selector[2]) {
+        format = {
+          inline: 'span',
+          title: selectorText.substr(1),
+          classes: classes
+        };
+      }
+      if (shouldMergeClasses(editor) !== false) {
+        format.classes = classes;
+      } else {
+        format.attributes = { class: classes };
+      }
+      return format;
+    };
+    var getGroupsBySelector = function (groups, selector) {
+      return global$4.grep(groups, function (group) {
+        return !group.filter || group.filter(selector);
+      });
+    };
+    var compileUserDefinedGroups = function (groups) {
+      return global$4.map(groups, function (group) {
+        return global$4.extend({}, group, {
+          original: group,
+          selectors: {},
+          filter: compileFilter(group.filter),
+          item: {
+            text: group.title,
+            menu: []
+          }
+        });
+      });
+    };
+    var isExclusiveMode = function (editor, group) {
+      return group === null || shouldImportExclusive(editor) !== false;
+    };
+    var isUniqueSelector = function (editor, selector, group, globallyUniqueSelectors) {
+      return !(isExclusiveMode(editor, group) ? selector in globallyUniqueSelectors : selector in group.selectors);
+    };
+    var markUniqueSelector = function (editor, selector, group, globallyUniqueSelectors) {
+      if (isExclusiveMode(editor, group)) {
+        globallyUniqueSelectors[selector] = true;
+      } else {
+        group.selectors[selector] = true;
+      }
+    };
+    var convertSelectorToFormat = function (editor, plugin, selector, group) {
+      var selectorConverter;
+      if (group && group.selector_converter) {
+        selectorConverter = group.selector_converter;
+      } else if (getSelectorConverter(editor)) {
+        selectorConverter = getSelectorConverter(editor);
+      } else {
+        selectorConverter = function () {
+          return defaultConvertSelectorToFormat(editor, selector);
+        };
+      }
+      return selectorConverter.call(plugin, selector, group);
+    };
+    var setup = function (editor) {
+      editor.on('init', function (_e) {
+        var model = generate();
+        var globallyUniqueSelectors = {};
+        var selectorFilter = compileFilter(getSelectorFilter(editor));
+        var groups = compileUserDefinedGroups(getCssGroups(editor));
+        var processSelector = function (selector, group) {
+          if (isUniqueSelector(editor, selector, group, globallyUniqueSelectors)) {
+            markUniqueSelector(editor, selector, group, globallyUniqueSelectors);
+            var format = convertSelectorToFormat(editor, editor.plugins.importcss, selector, group);
+            if (format) {
+              var formatName = format.name || global$1.DOM.uniqueId();
+              editor.formatter.register(formatName, format);
+              return global$4.extend({}, {
+                title: format.title,
+                format: formatName
+              });
+            }
+          }
+          return null;
+        };
+        global$4.each(getSelectors(editor, editor.getDoc(), compileFilter(getFileFilter(editor))), function (selector) {
+          if (selector.indexOf('.mce-') === -1) {
+            if (!selectorFilter || selectorFilter(selector)) {
+              var selectorGroups = getGroupsBySelector(groups, selector);
+              if (selectorGroups.length > 0) {
+                global$4.each(selectorGroups, function (group) {
+                  var menuItem = processSelector(selector, group);
+                  if (menuItem) {
+                    model.addItemToGroup(group.title, menuItem);
+                  }
+                });
+              } else {
+                var menuItem = processSelector(selector, null);
+                if (menuItem) {
+                  model.addItem(menuItem);
+                }
+              }
+            }
+          }
+        });
+        var items = model.toFormats();
+        editor.fire('addStyleModifications', {
+          items: items,
+          replace: !shouldAppend(editor)
+        });
+      });
+    };
+
+    var get = function (editor) {
+      var convertSelectorToFormat = function (selectorText) {
+        return defaultConvertSelectorToFormat(editor, selectorText);
+      };
+      return { convertSelectorToFormat: convertSelectorToFormat };
+    };
+
+    function Plugin () {
+      global.add('importcss', function (editor) {
+        setup(editor);
+        return get(editor);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/importcss/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var n,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),g=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=tinymce.util.Tools.resolve("tinymce.EditorManager"),m=tinymce.util.Tools.resolve("tinymce.Env"),h=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=function(t){return t.getParam("importcss_selector_converter")},i=(n="array",function(t){return r=typeof(e=t),(null===e?"null":"object"==r&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":r)===n;var e,r}),o=Array.prototype.push,l=function(t,e){return function(t){for(var e=[],r=0,n=t.length;r<n;++r){if(!i(t[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+t);o.apply(e,t[r])}return e}(function(t,e){for(var r=t.length,n=new Array(r),i=0;i<r;i++){var o=t[i];n[i]=e(o,i)}return n}(t,e))},p=function(e){return"string"==typeof e?function(t){return-1!==t.indexOf(e)}:e instanceof RegExp?function(t){return e.test(t)}:e},_=function(c,t,a){var u=[],r={};function l(t,e){var r,n,i,o=t.href;if(n=o,i=m.cacheSuffix,"string"==typeof n&&(n=n.replace("?"+i,"").replace("&"+i,"")),(o=n)&&a(o,e)&&!function(t,e){var r=t.settings,n=!1!==r.skin&&(r.skin||"oxide");if(n){var i=r.skin_url?t.documentBaseURI.toAbsolute(r.skin_url):f.baseURL+"/skins/ui/"+n,o=f.baseURL+"/skins/content/";return e===i+"/content"+(t.inline?".inline":"")+".min.css"||-1!==e.indexOf(o)}return!1}(c,o)){h.each(t.imports,function(t){l(t,!0)});try{r=t.cssRules||t.rules}catch(s){}h.each(r,function(t){t.styleSheet?l(t.styleSheet,!0):t.selectorText&&h.each(t.selectorText.split(","),function(t){u.push(h.trim(t))})})}}h.each(c.contentCSS,function(t){r[t]=!0}),a=a||function(t,e){return e||r[t]};try{h.each(t.styleSheets,function(t){l(t)})}catch(e){}return u},x=function(t,e){var r,n=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(n){var i=n[1],o=n[2].substr(1).split(".").join(" "),s=h.makeMap("a,img");return n[1]?(r={title:e},t.schema.getTextBlockElements()[i]?r.block=i:t.schema.getBlockElements()[i]||s[i.toLowerCase()]?r.selector=i:r.inline=i):n[2]&&(r={inline:"span",title:e.substr(1),classes:o}),!1!==t.getParam("importcss_merge_classes")?r.classes=o:r.attributes={"class":o},r}},T=function(t,e){return null===e||!1!==t.getParam("importcss_exclusive")},r=function(y){y.on("init",function(t){var e,r,n,i,o=(e=[],r=[],n={},{addItemToGroup:function(t,e){n[t]?n[t].push(e):(r.push(t),n[t]=[e])},addItem:function(t){e.push(t)},toFormats:function(){return l(r,function(t){var e=n[t];return 0===e.length?[]:[{title:t,items:e}]}).concat(e)}}),v={},s=p(y.getParam("importcss_selector_filter")),c=(i=y.getParam("importcss_groups"),h.map(i,function(t){return h.extend({},t,{original:t,selectors:{},filter:p(t.filter),item:{text:t.title,menu:[]}})})),a=function(t,e){if(f=t,p=v,!(T(y,m=e)?f in p:f in m.selectors)){a=t,l=v,T(y,u=e)?l[a]=!0:u.selectors[a]=!0;var r=(o=(i=y).plugins.importcss,s=t,((c=e)&&c.selector_converter?c.selector_converter:d(i)?d(i):function(){return x(i,s)}).call(o,s,c));if(r){var n=r.name||g.DOM.uniqueId();return y.formatter.register(n,r),h.extend({},{title:r.title,format:n})}}var i,o,s,c,a,u,l,f,m,p;return null};h.each(_(y,y.getDoc(),p(y.getParam("importcss_file_filter"))),function(r){if(-1===r.indexOf(".mce-")&&(!s||s(r))){var t=(n=c,i=r,h.grep(n,function(t){return!t.filter||t.filter(i)}));if(0<t.length)h.each(t,function(t){var e=a(r,t);e&&o.addItemToGroup(t.title,e)});else{var e=a(r,null);e&&o.addItem(e)}}var n,i});var u=o.toFormats();y.fire("addStyleModifications",{items:u,replace:!y.getParam("importcss_append")})})};!function e(){t.add("importcss",function(t){return r(t),e=t,{convertSelectorToFormat:function(t){return x(e,t)}};var e})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/insertdatetime/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "insertdatetime" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/insertdatetime')
+//   ES2015:
+//     import 'tinymce/plugins/insertdatetime'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/insertdatetime/plugin.js
@@ -1,1 +1,178 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var getDateFormat = function (editor) {
+      return editor.getParam('insertdatetime_dateformat', editor.translate('%Y-%m-%d'));
+    };
+    var getTimeFormat = function (editor) {
+      return editor.getParam('insertdatetime_timeformat', editor.translate('%H:%M:%S'));
+    };
+    var getFormats = function (editor) {
+      return editor.getParam('insertdatetime_formats', [
+        '%H:%M:%S',
+        '%Y-%m-%d',
+        '%I:%M:%S %p',
+        '%D'
+      ]);
+    };
+    var getDefaultDateTime = function (editor) {
+      var formats = getFormats(editor);
+      return formats.length > 0 ? formats[0] : getTimeFormat(editor);
+    };
+    var shouldInsertTimeElement = function (editor) {
+      return editor.getParam('insertdatetime_element', false);
+    };
+
+    var daysShort = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' ');
+    var daysLong = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' ');
+    var monthsShort = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
+    var monthsLong = 'January February March April May June July August September October November December'.split(' ');
+    var addZeros = function (value, len) {
+      value = '' + value;
+      if (value.length < len) {
+        for (var i = 0; i < len - value.length; i++) {
+          value = '0' + value;
+        }
+      }
+      return value;
+    };
+    var getDateTime = function (editor, fmt, date) {
+      date = date || new Date();
+      fmt = fmt.replace('%D', '%m/%d/%Y');
+      fmt = fmt.replace('%r', '%I:%M:%S %p');
+      fmt = fmt.replace('%Y', '' + date.getFullYear());
+      fmt = fmt.replace('%y', '' + date.getYear());
+      fmt = fmt.replace('%m', addZeros(date.getMonth() + 1, 2));
+      fmt = fmt.replace('%d', addZeros(date.getDate(), 2));
+      fmt = fmt.replace('%H', '' + addZeros(date.getHours(), 2));
+      fmt = fmt.replace('%M', '' + addZeros(date.getMinutes(), 2));
+      fmt = fmt.replace('%S', '' + addZeros(date.getSeconds(), 2));
+      fmt = fmt.replace('%I', '' + ((date.getHours() + 11) % 12 + 1));
+      fmt = fmt.replace('%p', '' + (date.getHours() < 12 ? 'AM' : 'PM'));
+      fmt = fmt.replace('%B', '' + editor.translate(monthsLong[date.getMonth()]));
+      fmt = fmt.replace('%b', '' + editor.translate(monthsShort[date.getMonth()]));
+      fmt = fmt.replace('%A', '' + editor.translate(daysLong[date.getDay()]));
+      fmt = fmt.replace('%a', '' + editor.translate(daysShort[date.getDay()]));
+      fmt = fmt.replace('%%', '%');
+      return fmt;
+    };
+    var updateElement = function (editor, timeElm, computerTime, userTime) {
+      var newTimeElm = editor.dom.create('time', { datetime: computerTime }, userTime);
+      timeElm.parentNode.insertBefore(newTimeElm, timeElm);
+      editor.dom.remove(timeElm);
+      editor.selection.select(newTimeElm, true);
+      editor.selection.collapse(false);
+    };
+    var insertDateTime = function (editor, format) {
+      if (shouldInsertTimeElement(editor)) {
+        var userTime = getDateTime(editor, format);
+        var computerTime = void 0;
+        if (/%[HMSIp]/.test(format)) {
+          computerTime = getDateTime(editor, '%Y-%m-%dT%H:%M');
+        } else {
+          computerTime = getDateTime(editor, '%Y-%m-%d');
+        }
+        var timeElm = editor.dom.getParent(editor.selection.getStart(), 'time');
+        if (timeElm) {
+          updateElement(editor, timeElm, computerTime, userTime);
+        } else {
+          editor.insertContent('<time datetime="' + computerTime + '">' + userTime + '</time>');
+        }
+      } else {
+        editor.insertContent(getDateTime(editor, format));
+      }
+    };
+
+    var register = function (editor) {
+      editor.addCommand('mceInsertDate', function () {
+        insertDateTime(editor, getDateFormat(editor));
+      });
+      editor.addCommand('mceInsertTime', function () {
+        insertDateTime(editor, getTimeFormat(editor));
+      });
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var register$1 = function (editor) {
+      var formats = getFormats(editor);
+      var defaultFormat = Cell(getDefaultDateTime(editor));
+      editor.ui.registry.addSplitButton('insertdatetime', {
+        icon: 'insert-time',
+        tooltip: 'Insert date/time',
+        select: function (value) {
+          return value === defaultFormat.get();
+        },
+        fetch: function (done) {
+          done(global$1.map(formats, function (format) {
+            return {
+              type: 'choiceitem',
+              text: getDateTime(editor, format),
+              value: format
+            };
+          }));
+        },
+        onAction: function (_api) {
+          insertDateTime(editor, defaultFormat.get());
+        },
+        onItemAction: function (_api, value) {
+          defaultFormat.set(value);
+          insertDateTime(editor, value);
+        }
+      });
+      var makeMenuItemHandler = function (format) {
+        return function () {
+          defaultFormat.set(format);
+          insertDateTime(editor, format);
+        };
+      };
+      editor.ui.registry.addNestedMenuItem('insertdatetime', {
+        icon: 'insert-time',
+        text: 'Date/time',
+        getSubmenuItems: function () {
+          return global$1.map(formats, function (format) {
+            return {
+              type: 'menuitem',
+              text: getDateTime(editor, format),
+              onAction: makeMenuItemHandler(format)
+            };
+          });
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('insertdatetime', function (editor) {
+        register(editor);
+        register$1(editor);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/insertdatetime/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},c=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},r="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),i="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),o="January February March April May June July August September October November December".split(" "),m=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},s=function(e,t,n){return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",m(n.getMonth()+1,2))).replace("%d",m(n.getDate(),2))).replace("%H",""+m(n.getHours(),2))).replace("%M",""+m(n.getMinutes(),2))).replace("%S",""+m(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(o[n.getMonth()]))).replace("%b",""+e.translate(i[n.getMonth()]))).replace("%A",""+e.translate(a[n.getDay()]))).replace("%a",""+e.translate(r[n.getDay()]))).replace("%%","%")},l=function(e,t){if(e.getParam("insertdatetime_element",!1)){var n=s(e,t),r=void 0;r=/%[HMSIp]/.test(t)?s(e,"%Y-%m-%dT%H:%M"):s(e,"%Y-%m-%d");var a=e.dom.getParent(e.selection.getStart(),"time");a?(o=a,u=r,c=n,m=(i=e).dom.create("time",{datetime:u},c),o.parentNode.insertBefore(m,o),i.dom.remove(o),i.selection.select(m,!0),i.selection.collapse(!1)):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(s(e,t));var i,o,u,c,m},t=function(t){t.addCommand("mceInsertDate",function(){var e;l(t,(e=t).getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d")))}),t.addCommand("mceInsertTime",function(){l(t,u(t))})},d=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=function(n){var e,t,r,a,i=c(n),o=(a=c(r=n),e=0<a.length?a[0]:u(r),t=e,{get:function(){return t},set:function(e){t=e}});n.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===o.get()},fetch:function(e){e(d.map(i,function(e){return{type:"choiceitem",text:s(n,e),value:e}}))},onAction:function(e){l(n,o.get())},onItemAction:function(e,t){o.set(t),l(n,t)}});n.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return d.map(i,function(e){return{type:"menuitem",text:s(n,e),onAction:(t=e,function(){o.set(t),l(n,t)})};var t})}})};!function p(){e.add("insertdatetime",function(e){t(e),n(e)})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/legacyoutput/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "legacyoutput" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/legacyoutput')
+//   ES2015:
+//     import 'tinymce/plugins/legacyoutput'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/legacyoutput/plugin.js
@@ -1,1 +1,200 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var getFontSizeFormats = function (editor) {
+      return editor.getParam('fontsize_formats');
+    };
+    var setFontSizeFormats = function (editor, fontsize_formats) {
+      editor.settings.fontsize_formats = fontsize_formats;
+    };
+    var getFontFormats = function (editor) {
+      return editor.getParam('font_formats');
+    };
+    var setFontFormats = function (editor, font_formats) {
+      editor.settings.font_formats = font_formats;
+    };
+    var getFontSizeStyleValues = function (editor) {
+      return editor.getParam('font_size_style_values', 'xx-small,x-small,small,medium,large,x-large,xx-large');
+    };
+    var setInlineStyles = function (editor, inline_styles) {
+      editor.settings.inline_styles = inline_styles;
+    };
+
+    var overrideFormats = function (editor) {
+      var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table', fontSizes = global$1.explode(getFontSizeStyleValues(editor)), schema = editor.schema;
+      editor.formatter.register({
+        alignleft: {
+          selector: alignElements,
+          attributes: { align: 'left' }
+        },
+        aligncenter: {
+          selector: alignElements,
+          attributes: { align: 'center' }
+        },
+        alignright: {
+          selector: alignElements,
+          attributes: { align: 'right' }
+        },
+        alignjustify: {
+          selector: alignElements,
+          attributes: { align: 'justify' }
+        },
+        bold: [
+          {
+            inline: 'b',
+            remove: 'all',
+            preserve_attributes: [
+              'class',
+              'style'
+            ]
+          },
+          {
+            inline: 'strong',
+            remove: 'all',
+            preserve_attributes: [
+              'class',
+              'style'
+            ]
+          },
+          {
+            inline: 'span',
+            styles: { fontWeight: 'bold' }
+          }
+        ],
+        italic: [
+          {
+            inline: 'i',
+            remove: 'all',
+            preserve_attributes: [
+              'class',
+              'style'
+            ]
+          },
+          {
+            inline: 'em',
+            remove: 'all',
+            preserve_attributes: [
+              'class',
+              'style'
+            ]
+          },
+          {
+            inline: 'span',
+            styles: { fontStyle: 'italic' }
+          }
+        ],
+        underline: [
+          {
+            inline: 'u',
+            remove: 'all',
+            preserve_attributes: [
+              'class',
+              'style'
+            ]
+          },
+          {
+            inline: 'span',
+            styles: { textDecoration: 'underline' },
+            exact: true
+          }
+        ],
+        strikethrough: [
+          {
+            inline: 'strike',
+            remove: 'all',
+            preserve_attributes: [
+              'class',
+              'style'
+            ]
+          },
+          {
+            inline: 'span',
+            styles: { textDecoration: 'line-through' },
+            exact: true
+          }
+        ],
+        fontname: {
+          inline: 'font',
+          toggle: false,
+          attributes: { face: '%value' }
+        },
+        fontsize: {
+          inline: 'font',
+          toggle: false,
+          attributes: {
+            size: function (vars) {
+              return String(global$1.inArray(fontSizes, vars.value) + 1);
+            }
+          }
+        },
+        forecolor: {
+          inline: 'font',
+          attributes: { color: '%value' },
+          links: true,
+          remove_similar: true,
+          clear_child_styles: true
+        },
+        hilitecolor: {
+          inline: 'font',
+          styles: { backgroundColor: '%value' },
+          links: true,
+          remove_similar: true,
+          clear_child_styles: true
+        }
+      });
+      global$1.each('b,i,u,strike'.split(','), function (name) {
+        schema.addValidElements(name + '[*]');
+      });
+      if (!schema.getElementRule('font')) {
+        schema.addValidElements('font[face|size|color|style]');
+      }
+      global$1.each(alignElements.split(','), function (name) {
+        var rule = schema.getElementRule(name);
+        if (rule) {
+          if (!rule.attributes.align) {
+            rule.attributes.align = {};
+            rule.attributesOrder.push('align');
+          }
+        }
+      });
+    };
+    var overrideSettings = function (editor) {
+      var defaultFontsizeFormats = '8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7';
+      var defaultFontsFormats = 'Andale Mono=andale mono,monospace;' + 'Arial=arial,helvetica,sans-serif;' + 'Arial Black=arial black,sans-serif;' + 'Book Antiqua=book antiqua,palatino,serif;' + 'Comic Sans MS=comic sans ms,sans-serif;' + 'Courier New=courier new,courier,monospace;' + 'Georgia=georgia,palatino,serif;' + 'Helvetica=helvetica,arial,sans-serif;' + 'Impact=impact,sans-serif;' + 'Symbol=symbol;' + 'Tahoma=tahoma,arial,helvetica,sans-serif;' + 'Terminal=terminal,monaco,monospace;' + 'Times New Roman=times new roman,times,serif;' + 'Trebuchet MS=trebuchet ms,geneva,sans-serif;' + 'Verdana=verdana,geneva,sans-serif;' + 'Webdings=webdings;' + 'Wingdings=wingdings,zapf dingbats';
+      setInlineStyles(editor, false);
+      if (!getFontSizeFormats(editor)) {
+        setFontSizeFormats(editor, defaultFontsizeFormats);
+      }
+      if (!getFontFormats(editor)) {
+        setFontFormats(editor, defaultFontsFormats);
+      }
+    };
+    var setup = function (editor) {
+      overrideSettings(editor);
+      editor.on('PreInit', function () {
+        return overrideFormats(editor);
+      });
+    };
+
+    function Plugin () {
+      global.add('legacyoutput', function (editor) {
+        setup(editor);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/legacyoutput/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(s){var e,t,i,a;t=!1,(e=s).settings.inline_styles=t,e.getParam("fontsize_formats")||(i="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7",e.settings.fontsize_formats=i),e.getParam("font_formats")||(a="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",e.settings.font_formats=a),s.on("PreInit",function(){return e=s,t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table",i=l.explode(e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large")),a=e.schema,e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all",preserve_attributes:["class","style"]},{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all",preserve_attributes:["class","style"]},{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",toggle:!1,attributes:{face:"%value"}},fontsize:{inline:"font",toggle:!1,attributes:{size:function(e){return String(l.inArray(i,e.value)+1)}}},forecolor:{inline:"font",attributes:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0}}),l.each("b,i,u,strike".split(","),function(e){a.addValidElements(e+"[*]")}),a.getElementRule("font")||a.addValidElements("font[face|size|color|style]"),void l.each(t.split(","),function(e){var t=a.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))});var e,t,i,a})};!function i(){e.add("legacyoutput",function(e){t(e)})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/link/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "link" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/link')
+//   ES2015:
+//     import 'tinymce/plugins/link'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/link/plugin.js
@@ -1,1 +1,1227 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');
+
+    var typeOf = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf(value) === type;
+      };
+    };
+    var isSimpleType = function (type) {
+      return function (value) {
+        return typeof value === type;
+      };
+    };
+    var eq = function (t) {
+      return function (a) {
+        return t === a;
+      };
+    };
+    var isString = isType('string');
+    var isArray = isType('array');
+    var isNull = eq(null);
+    var isBoolean = isSimpleType('boolean');
+    var isFunction = isSimpleType('function');
+
+    var assumeExternalTargets = function (editor) {
+      var externalTargets = editor.getParam('link_assume_external_targets', false);
+      if (isBoolean(externalTargets) && externalTargets) {
+        return 1;
+      } else if (isString(externalTargets) && (externalTargets === 'http' || externalTargets === 'https')) {
+        return externalTargets;
+      }
+      return 0;
+    };
+    var hasContextToolbar = function (editor) {
+      return editor.getParam('link_context_toolbar', false, 'boolean');
+    };
+    var getLinkList = function (editor) {
+      return editor.getParam('link_list');
+    };
+    var getDefaultLinkTarget = function (editor) {
+      return editor.getParam('default_link_target');
+    };
+    var getTargetList = function (editor) {
+      return editor.getParam('target_list', true);
+    };
+    var getRelList = function (editor) {
+      return editor.getParam('rel_list', [], 'array');
+    };
+    var getLinkClassList = function (editor) {
+      return editor.getParam('link_class_list', [], 'array');
+    };
+    var shouldShowLinkTitle = function (editor) {
+      return editor.getParam('link_title', true, 'boolean');
+    };
+    var allowUnsafeLinkTarget = function (editor) {
+      return editor.getParam('allow_unsafe_link_target', false, 'boolean');
+    };
+    var useQuickLink = function (editor) {
+      return editor.getParam('link_quicklink', false, 'boolean');
+    };
+    var getDefaultLinkProtocol = function (editor) {
+      return editor.getParam('link_default_protocol', 'http', 'string');
+    };
+
+    var appendClickRemove = function (link, evt) {
+      domGlobals.document.body.appendChild(link);
+      link.dispatchEvent(evt);
+      domGlobals.document.body.removeChild(link);
+    };
+    var open = function (url) {
+      var link = domGlobals.document.createElement('a');
+      link.target = '_blank';
+      link.href = url;
+      link.rel = 'noreferrer noopener';
+      var evt = domGlobals.document.createEvent('MouseEvents');
+      evt.initMouseEvent('click', true, true, domGlobals.window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+      appendClickRemove(link, evt);
+    };
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var nativeIndexOf = Array.prototype.indexOf;
+    var nativePush = Array.prototype.push;
+    var rawIndexOf = function (ts, t) {
+      return nativeIndexOf.call(ts, t);
+    };
+    var contains = function (xs, x) {
+      return rawIndexOf(xs, x) > -1;
+    };
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var each = function (xs, f) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var foldl = function (xs, f, acc) {
+      each(xs, function (x) {
+        acc = f(acc, x);
+      });
+      return acc;
+    };
+    var flatten = function (xs) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        if (!isArray(xs[i])) {
+          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
+        }
+        nativePush.apply(r, xs[i]);
+      }
+      return r;
+    };
+    var bind = function (xs, f) {
+      return flatten(map(xs, f));
+    };
+    var findMap = function (arr, f) {
+      for (var i = 0; i < arr.length; i++) {
+        var r = f(arr[i], i);
+        if (r.isSome()) {
+          return r;
+        }
+      }
+      return Option.none();
+    };
+
+    var keys = Object.keys;
+    var each$1 = function (obj, f) {
+      var props = keys(obj);
+      for (var k = 0, len = props.length; k < len; k++) {
+        var i = props[k];
+        var x = obj[i];
+        f(x, i);
+      }
+    };
+    var objAcc = function (r) {
+      return function (x, i) {
+        r[i] = x;
+      };
+    };
+    var internalFilter = function (obj, pred, onTrue, onFalse) {
+      var r = {};
+      each$1(obj, function (x, i) {
+        (pred(x, i) ? onTrue : onFalse)(x, i);
+      });
+      return r;
+    };
+    var filter = function (obj, pred) {
+      var t = {};
+      internalFilter(obj, pred, objAcc(t), noop);
+      return t;
+    };
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var hasRtcPlugin = function (editor) {
+      if (/(^|[ ,])rtc([, ]|$)/.test(editor.settings.plugins) && global.get('rtc')) {
+        return true;
+      } else {
+        return false;
+      }
+    };
+
+    var hasProtocol = function (url) {
+      return /^\w+:/i.test(url);
+    };
+    var getHref = function (elm) {
+      var href = elm.getAttribute('data-mce-href');
+      return href ? href : elm.getAttribute('href');
+    };
+    var applyRelTargetRules = function (rel, isUnsafe) {
+      var rules = ['noopener'];
+      var rels = rel ? rel.split(/\s+/) : [];
+      var toString = function (rels) {
+        return global$2.trim(rels.sort().join(' '));
+      };
+      var addTargetRules = function (rels) {
+        rels = removeTargetRules(rels);
+        return rels.length > 0 ? rels.concat(rules) : rules;
+      };
+      var removeTargetRules = function (rels) {
+        return rels.filter(function (val) {
+          return global$2.inArray(rules, val) === -1;
+        });
+      };
+      var newRels = isUnsafe ? addTargetRules(rels) : removeTargetRules(rels);
+      return newRels.length > 0 ? toString(newRels) : '';
+    };
+    var trimCaretContainers = function (text) {
+      return text.replace(/\uFEFF/g, '');
+    };
+    var getAnchorElement = function (editor, selectedElm) {
+      selectedElm = selectedElm || editor.selection.getNode();
+      if (isImageFigure(selectedElm)) {
+        return editor.dom.select('a[href]', selectedElm)[0];
+      } else {
+        return editor.dom.getParent(selectedElm, 'a[href]');
+      }
+    };
+    var getAnchorText = function (selection, anchorElm) {
+      var text = anchorElm ? anchorElm.innerText || anchorElm.textContent : selection.getContent({ format: 'text' });
+      return trimCaretContainers(text);
+    };
+    var isLink = function (elm) {
+      return elm && elm.nodeName === 'A' && !!getHref(elm);
+    };
+    var hasLinks = function (elements) {
+      return global$2.grep(elements, isLink).length > 0;
+    };
+    var isOnlyTextSelected = function (html) {
+      if (/</.test(html) && (!/^<a [^>]+>[^<]+<\/a>$/.test(html) || html.indexOf('href=') === -1)) {
+        return false;
+      }
+      return true;
+    };
+    var isImageFigure = function (elm) {
+      return elm && elm.nodeName === 'FIGURE' && /\bimage\b/i.test(elm.className);
+    };
+    var getLinkAttrs = function (data) {
+      return foldl([
+        'title',
+        'rel',
+        'class',
+        'target'
+      ], function (acc, key) {
+        data[key].each(function (value) {
+          acc[key] = value.length > 0 ? value : null;
+        });
+        return acc;
+      }, { href: data.href });
+    };
+    var handleExternalTargets = function (href, assumeExternalTargets) {
+      if ((assumeExternalTargets === 'http' || assumeExternalTargets === 'https') && !hasProtocol(href)) {
+        return assumeExternalTargets + '://' + href;
+      }
+      return href;
+    };
+    var applyLinkOverrides = function (editor, linkAttrs) {
+      var newLinkAttrs = __assign({}, linkAttrs);
+      if (!(getRelList(editor).length > 0) && allowUnsafeLinkTarget(editor) === false) {
+        var newRel = applyRelTargetRules(newLinkAttrs.rel, newLinkAttrs.target === '_blank');
+        newLinkAttrs.rel = newRel ? newRel : null;
+      }
+      if (Option.from(newLinkAttrs.target).isNone() && getTargetList(editor) === false) {
+        newLinkAttrs.target = getDefaultLinkTarget(editor);
+      }
+      newLinkAttrs.href = handleExternalTargets(newLinkAttrs.href, assumeExternalTargets(editor));
+      return newLinkAttrs;
+    };
+    var updateLink = function (editor, anchorElm, text, linkAttrs) {
+      text.each(function (text) {
+        if (anchorElm.hasOwnProperty('innerText')) {
+          anchorElm.innerText = text;
+        } else {
+          anchorElm.textContent = text;
+        }
+      });
+      editor.dom.setAttribs(anchorElm, linkAttrs);
+      editor.selection.select(anchorElm);
+    };
+    var createLink = function (editor, selectedElm, text, linkAttrs) {
+      if (isImageFigure(selectedElm)) {
+        linkImageFigure(editor, selectedElm, linkAttrs);
+      } else {
+        text.fold(function () {
+          editor.execCommand('mceInsertLink', false, linkAttrs);
+        }, function (text) {
+          editor.insertContent(editor.dom.createHTML('a', linkAttrs, editor.dom.encode(text)));
+        });
+      }
+    };
+    var linkDomMutation = function (editor, attachState, data) {
+      var selectedElm = editor.selection.getNode();
+      var anchorElm = getAnchorElement(editor, selectedElm);
+      var linkAttrs = applyLinkOverrides(editor, getLinkAttrs(data));
+      editor.undoManager.transact(function () {
+        if (data.href === attachState.href) {
+          attachState.attach();
+        }
+        if (anchorElm) {
+          editor.focus();
+          updateLink(editor, anchorElm, data.text, linkAttrs);
+        } else {
+          createLink(editor, selectedElm, data.text, linkAttrs);
+        }
+      });
+    };
+    var unlinkDomMutation = function (editor) {
+      editor.undoManager.transact(function () {
+        var node = editor.selection.getNode();
+        if (isImageFigure(node)) {
+          unlinkImageFigure(editor, node);
+        } else {
+          var anchorElm = editor.dom.getParent(node, 'a[href]', editor.getBody());
+          if (anchorElm) {
+            editor.dom.remove(anchorElm, true);
+          }
+        }
+        editor.focus();
+      });
+    };
+    var unwrapOptions = function (data) {
+      var cls = data.class, href = data.href, rel = data.rel, target = data.target, text = data.text, title = data.title;
+      return filter({
+        class: cls.getOrNull(),
+        href: href,
+        rel: rel.getOrNull(),
+        target: target.getOrNull(),
+        text: text.getOrNull(),
+        title: title.getOrNull()
+      }, function (v, _k) {
+        return isNull(v) === false;
+      });
+    };
+    var link = function (editor, attachState, data) {
+      hasRtcPlugin(editor) ? editor.execCommand('createlink', false, unwrapOptions(data)) : linkDomMutation(editor, attachState, data);
+    };
+    var unlink = function (editor) {
+      hasRtcPlugin(editor) ? editor.execCommand('unlink') : unlinkDomMutation(editor);
+    };
+    var unlinkImageFigure = function (editor, fig) {
+      var img = editor.dom.select('img', fig)[0];
+      if (img) {
+        var a = editor.dom.getParents(img, 'a[href]', fig)[0];
+        if (a) {
+          a.parentNode.insertBefore(img, a);
+          editor.dom.remove(a);
+        }
+      }
+    };
+    var linkImageFigure = function (editor, fig, attrs) {
+      var img = editor.dom.select('img', fig)[0];
+      if (img) {
+        var a = editor.dom.create('a', attrs);
+        img.parentNode.insertBefore(a, img);
+        a.appendChild(img);
+      }
+    };
+
+    var cat = function (arr) {
+      var r = [];
+      var push = function (x) {
+        r.push(x);
+      };
+      for (var i = 0; i < arr.length; i++) {
+        arr[i].each(push);
+      }
+      return r;
+    };
+
+    var getValue = function (item) {
+      return isString(item.value) ? item.value : '';
+    };
+    var sanitizeList = function (list, extractValue) {
+      var out = [];
+      global$2.each(list, function (item) {
+        var text = isString(item.text) ? item.text : isString(item.title) ? item.title : '';
+        if (item.menu !== undefined) ; else {
+          var value = extractValue(item);
+          out.push({
+            text: text,
+            value: value
+          });
+        }
+      });
+      return out;
+    };
+    var sanitizeWith = function (extracter) {
+      if (extracter === void 0) {
+        extracter = getValue;
+      }
+      return function (list) {
+        return Option.from(list).map(function (list) {
+          return sanitizeList(list, extracter);
+        });
+      };
+    };
+    var sanitize = function (list) {
+      return sanitizeWith(getValue)(list);
+    };
+    var createUi = function (name, label) {
+      return function (items) {
+        return {
+          name: name,
+          type: 'selectbox',
+          label: label,
+          items: items
+        };
+      };
+    };
+    var ListOptions = {
+      sanitize: sanitize,
+      sanitizeWith: sanitizeWith,
+      createUi: createUi,
+      getValue: getValue
+    };
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var findTextByValue = function (value, catalog) {
+      return findMap(catalog, function (item) {
+        return Option.some(item).filter(function (i) {
+          return i.value === value;
+        });
+      });
+    };
+    var getDelta = function (persistentText, fieldName, catalog, data) {
+      var value = data[fieldName];
+      var hasPersistentText = persistentText.length > 0;
+      return value !== undefined ? findTextByValue(value, catalog).map(function (i) {
+        return {
+          url: {
+            value: i.value,
+            meta: {
+              text: hasPersistentText ? persistentText : i.text,
+              attach: noop
+            }
+          },
+          text: hasPersistentText ? persistentText : i.text
+        };
+      }) : Option.none();
+    };
+    var findCatalog = function (settings, fieldName) {
+      if (fieldName === 'link') {
+        return settings.catalogs.link;
+      } else if (fieldName === 'anchor') {
+        return settings.catalogs.anchor;
+      } else {
+        return Option.none();
+      }
+    };
+    var init = function (initialData, linkSettings) {
+      var persistentText = Cell(initialData.text);
+      var onUrlChange = function (data) {
+        if (persistentText.get().length <= 0) {
+          var urlText = data.url.meta.text !== undefined ? data.url.meta.text : data.url.value;
+          var urlTitle = data.url.meta.title !== undefined ? data.url.meta.title : '';
+          return Option.some({
+            text: urlText,
+            title: urlTitle
+          });
+        } else {
+          return Option.none();
+        }
+      };
+      var onCatalogChange = function (data, change) {
+        var catalog = findCatalog(linkSettings, change.name).getOr([]);
+        return getDelta(persistentText.get(), change.name, catalog, data);
+      };
+      var onChange = function (getData, change) {
+        if (change.name === 'url') {
+          return onUrlChange(getData());
+        } else if (contains([
+            'anchor',
+            'link'
+          ], change.name)) {
+          return onCatalogChange(getData(), change);
+        } else if (change.name === 'text') {
+          persistentText.set(getData().text);
+          return Option.none();
+        } else {
+          return Option.none();
+        }
+      };
+      return { onChange: onChange };
+    };
+    var DialogChanges = {
+      init: init,
+      getDelta: getDelta
+    };
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.Delay');
+
+    var global$4 = tinymce.util.Tools.resolve('tinymce.util.Promise');
+
+    var delayedConfirm = function (editor, message, callback) {
+      var rng = editor.selection.getRng();
+      global$3.setEditorTimeout(editor, function () {
+        editor.windowManager.confirm(message, function (state) {
+          editor.selection.setRng(rng);
+          callback(state);
+        });
+      });
+    };
+    var tryEmailTransform = function (data) {
+      var url = data.href;
+      var suggestMailTo = url.indexOf('@') > 0 && url.indexOf('//') === -1 && url.indexOf('mailto:') === -1;
+      return suggestMailTo ? Option.some({
+        message: 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?',
+        preprocess: function (oldData) {
+          return __assign(__assign({}, oldData), { href: 'mailto:' + url });
+        }
+      }) : Option.none();
+    };
+    var tryProtocolTransform = function (assumeExternalTargets, defaultLinkProtocol) {
+      return function (data) {
+        var url = data.href;
+        var suggestProtocol = assumeExternalTargets === 1 && !hasProtocol(url) || assumeExternalTargets === 0 && /^\s*www[\.|\d\.]/i.test(url);
+        return suggestProtocol ? Option.some({
+          message: 'The URL you entered seems to be an external link. Do you want to add the required ' + defaultLinkProtocol + ':// prefix?',
+          preprocess: function (oldData) {
+            return __assign(__assign({}, oldData), { href: defaultLinkProtocol + '://' + url });
+          }
+        }) : Option.none();
+      };
+    };
+    var preprocess = function (editor, data) {
+      return findMap([
+        tryEmailTransform,
+        tryProtocolTransform(assumeExternalTargets(editor), getDefaultLinkProtocol(editor))
+      ], function (f) {
+        return f(data);
+      }).fold(function () {
+        return global$4.resolve(data);
+      }, function (transform) {
+        return new global$4(function (callback) {
+          delayedConfirm(editor, transform.message, function (state) {
+            callback(state ? transform.preprocess(data) : data);
+          });
+        });
+      });
+    };
+    var DialogConfirms = { preprocess: preprocess };
+
+    var getAnchors = function (editor) {
+      var anchorNodes = editor.dom.select('a:not([href])');
+      var anchors = bind(anchorNodes, function (anchor) {
+        var id = anchor.name || anchor.id;
+        return id ? [{
+            text: id,
+            value: '#' + id
+          }] : [];
+      });
+      return anchors.length > 0 ? Option.some([{
+          text: 'None',
+          value: ''
+        }].concat(anchors)) : Option.none();
+    };
+    var AnchorListOptions = { getAnchors: getAnchors };
+
+    var getClasses = function (editor) {
+      var list = getLinkClassList(editor);
+      if (list.length > 0) {
+        return ListOptions.sanitize(list);
+      }
+      return Option.none();
+    };
+    var ClassListOptions = { getClasses: getClasses };
+
+    var global$5 = tinymce.util.Tools.resolve('tinymce.util.XHR');
+
+    var parseJson = function (text) {
+      try {
+        return Option.some(JSON.parse(text));
+      } catch (err) {
+        return Option.none();
+      }
+    };
+    var getLinks = function (editor) {
+      var extractor = function (item) {
+        return editor.convertURL(item.value || item.url, 'href');
+      };
+      var linkList = getLinkList(editor);
+      return new global$4(function (callback) {
+        if (isString(linkList)) {
+          global$5.send({
+            url: linkList,
+            success: function (text) {
+              return callback(parseJson(text));
+            },
+            error: function (_) {
+              return callback(Option.none());
+            }
+          });
+        } else if (isFunction(linkList)) {
+          linkList(function (output) {
+            return callback(Option.some(output));
+          });
+        } else {
+          callback(Option.from(linkList));
+        }
+      }).then(function (optItems) {
+        return optItems.bind(ListOptions.sanitizeWith(extractor)).map(function (items) {
+          if (items.length > 0) {
+            return [{
+                text: 'None',
+                value: ''
+              }].concat(items);
+          } else {
+            return items;
+          }
+        });
+      });
+    };
+    var LinkListOptions = { getLinks: getLinks };
+
+    var getRels = function (editor, initialTarget) {
+      var list = getRelList(editor);
+      if (list.length > 0) {
+        var isTargetBlank_1 = initialTarget.is('_blank');
+        var enforceSafe = allowUnsafeLinkTarget(editor) === false;
+        var safeRelExtractor = function (item) {
+          return applyRelTargetRules(ListOptions.getValue(item), isTargetBlank_1);
+        };
+        var sanitizer = enforceSafe ? ListOptions.sanitizeWith(safeRelExtractor) : ListOptions.sanitize;
+        return sanitizer(list);
+      }
+      return Option.none();
+    };
+    var RelOptions = { getRels: getRels };
+
+    var fallbacks = [
+      {
+        text: 'Current window',
+        value: ''
+      },
+      {
+        text: 'New window',
+        value: '_blank'
+      }
+    ];
+    var getTargets = function (editor) {
+      var list = getTargetList(editor);
+      if (isArray(list)) {
+        return ListOptions.sanitize(list).orThunk(function () {
+          return Option.some(fallbacks);
+        });
+      } else if (list === false) {
+        return Option.none();
+      }
+      return Option.some(fallbacks);
+    };
+    var TargetOptions = { getTargets: getTargets };
+
+    var nonEmptyAttr = function (dom, elem, name) {
+      var val = dom.getAttrib(elem, name);
+      return val !== null && val.length > 0 ? Option.some(val) : Option.none();
+    };
+    var extractFromAnchor = function (editor, anchor) {
+      var dom = editor.dom;
+      var onlyText = isOnlyTextSelected(editor.selection.getContent());
+      var text = onlyText ? Option.some(getAnchorText(editor.selection, anchor)) : Option.none();
+      var url = anchor ? Option.some(dom.getAttrib(anchor, 'href')) : Option.none();
+      var target = anchor ? Option.from(dom.getAttrib(anchor, 'target')) : Option.none();
+      var rel = nonEmptyAttr(dom, anchor, 'rel');
+      var linkClass = nonEmptyAttr(dom, anchor, 'class');
+      var title = nonEmptyAttr(dom, anchor, 'title');
+      return {
+        url: url,
+        text: text,
+        title: title,
+        target: target,
+        rel: rel,
+        linkClass: linkClass
+      };
+    };
+    var collect = function (editor, linkNode) {
+      return LinkListOptions.getLinks(editor).then(function (links) {
+        var anchor = extractFromAnchor(editor, linkNode);
+        return {
+          anchor: anchor,
+          catalogs: {
+            targets: TargetOptions.getTargets(editor),
+            rels: RelOptions.getRels(editor, anchor.target),
+            classes: ClassListOptions.getClasses(editor),
+            anchor: AnchorListOptions.getAnchors(editor),
+            link: links
+          },
+          optNode: Option.from(linkNode),
+          flags: { titleEnabled: shouldShowLinkTitle(editor) }
+        };
+      });
+    };
+    var DialogInfo = { collect: collect };
+
+    var handleSubmit = function (editor, info) {
+      return function (api) {
+        var data = api.getData();
+        if (!data.url.value) {
+          unlink(editor);
+          api.close();
+          return;
+        }
+        var getChangedValue = function (key) {
+          return Option.from(data[key]).filter(function (value) {
+            return !info.anchor[key].is(value);
+          });
+        };
+        var changedData = {
+          href: data.url.value,
+          text: getChangedValue('text'),
+          target: getChangedValue('target'),
+          rel: getChangedValue('rel'),
+          class: getChangedValue('linkClass'),
+          title: getChangedValue('title')
+        };
+        var attachState = {
+          href: data.url.value,
+          attach: data.url.meta !== undefined && data.url.meta.attach ? data.url.meta.attach : function () {
+          }
+        };
+        DialogConfirms.preprocess(editor, changedData).then(function (pData) {
+          link(editor, attachState, pData);
+        });
+        api.close();
+      };
+    };
+    var collectData = function (editor) {
+      var anchorNode = getAnchorElement(editor);
+      return DialogInfo.collect(editor, anchorNode);
+    };
+    var getInitialData = function (info, defaultTarget) {
+      return {
+        url: {
+          value: info.anchor.url.getOr(''),
+          meta: {
+            attach: function () {
+            },
+            text: info.anchor.url.fold(function () {
+              return '';
+            }, function () {
+              return info.anchor.text.getOr('');
+            }),
+            original: { value: info.anchor.url.getOr('') }
+          }
+        },
+        text: info.anchor.text.getOr(''),
+        title: info.anchor.title.getOr(''),
+        anchor: info.anchor.url.getOr(''),
+        link: info.anchor.url.getOr(''),
+        rel: info.anchor.rel.getOr(''),
+        target: info.anchor.target.or(defaultTarget).getOr(''),
+        linkClass: info.anchor.linkClass.getOr('')
+      };
+    };
+    var makeDialog = function (settings, onSubmit, editor) {
+      var urlInput = [{
+          name: 'url',
+          type: 'urlinput',
+          filetype: 'file',
+          label: 'URL'
+        }];
+      var displayText = settings.anchor.text.map(function () {
+        return {
+          name: 'text',
+          type: 'input',
+          label: 'Text to display'
+        };
+      }).toArray();
+      var titleText = settings.flags.titleEnabled ? [{
+          name: 'title',
+          type: 'input',
+          label: 'Title'
+        }] : [];
+      var defaultTarget = Option.from(getDefaultLinkTarget(editor));
+      var initialData = getInitialData(settings, defaultTarget);
+      var dialogDelta = DialogChanges.init(initialData, settings);
+      var catalogs = settings.catalogs;
+      var body = {
+        type: 'panel',
+        items: flatten([
+          urlInput,
+          displayText,
+          titleText,
+          cat([
+            catalogs.anchor.map(ListOptions.createUi('anchor', 'Anchors')),
+            catalogs.rels.map(ListOptions.createUi('rel', 'Rel')),
+            catalogs.targets.map(ListOptions.createUi('target', 'Open link in...')),
+            catalogs.link.map(ListOptions.createUi('link', 'Link list')),
+            catalogs.classes.map(ListOptions.createUi('linkClass', 'Class'))
+          ])
+        ])
+      };
+      return {
+        title: 'Insert/Edit Link',
+        size: 'normal',
+        body: body,
+        buttons: [
+          {
+            type: 'cancel',
+            name: 'cancel',
+            text: 'Cancel'
+          },
+          {
+            type: 'submit',
+            name: 'save',
+            text: 'Save',
+            primary: true
+          }
+        ],
+        initialData: initialData,
+        onChange: function (api, _a) {
+          var name = _a.name;
+          dialogDelta.onChange(api.getData, { name: name }).each(function (newData) {
+            api.setData(newData);
+          });
+        },
+        onSubmit: onSubmit
+      };
+    };
+    var open$1 = function (editor) {
+      var data = collectData(editor);
+      data.then(function (info) {
+        var onSubmit = handleSubmit(editor, info);
+        return makeDialog(info, onSubmit, editor);
+      }).then(function (spec) {
+        editor.windowManager.open(spec);
+      });
+    };
+
+    var getLink = function (editor, elm) {
+      return editor.dom.getParent(elm, 'a[href]');
+    };
+    var getSelectedLink = function (editor) {
+      return getLink(editor, editor.selection.getStart());
+    };
+    var hasOnlyAltModifier = function (e) {
+      return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false;
+    };
+    var gotoLink = function (editor, a) {
+      if (a) {
+        var href = getHref(a);
+        if (/^#/.test(href)) {
+          var targetEl = editor.$(href);
+          if (targetEl.length) {
+            editor.selection.scrollIntoView(targetEl[0], true);
+          }
+        } else {
+          open(a.href);
+        }
+      }
+    };
+    var openDialog = function (editor) {
+      return function () {
+        open$1(editor);
+      };
+    };
+    var gotoSelectedLink = function (editor) {
+      return function () {
+        gotoLink(editor, getSelectedLink(editor));
+      };
+    };
+    var setupGotoLinks = function (editor) {
+      editor.on('click', function (e) {
+        var link = getLink(editor, e.target);
+        if (link && global$1.metaKeyPressed(e)) {
+          e.preventDefault();
+          gotoLink(editor, link);
+        }
+      });
+      editor.on('keydown', function (e) {
+        var link = getSelectedLink(editor);
+        if (link && e.keyCode === 13 && hasOnlyAltModifier(e)) {
+          e.preventDefault();
+          gotoLink(editor, link);
+        }
+      });
+    };
+    var toggleActiveState = function (editor) {
+      return function (api) {
+        var nodeChangeHandler = function (e) {
+          return api.setActive(!editor.mode.isReadOnly() && !!getAnchorElement(editor, e.element));
+        };
+        editor.on('NodeChange', nodeChangeHandler);
+        return function () {
+          return editor.off('NodeChange', nodeChangeHandler);
+        };
+      };
+    };
+    var toggleEnabledState = function (editor) {
+      return function (api) {
+        var parents = editor.dom.getParents(editor.selection.getStart());
+        api.setDisabled(!hasLinks(parents));
+        var nodeChangeHandler = function (e) {
+          return api.setDisabled(!hasLinks(e.parents));
+        };
+        editor.on('NodeChange', nodeChangeHandler);
+        return function () {
+          return editor.off('NodeChange', nodeChangeHandler);
+        };
+      };
+    };
+
+    var register = function (editor) {
+      editor.addCommand('mceLink', function () {
+        if (useQuickLink(editor)) {
+          editor.fire('contexttoolbar-show', { toolbarKey: 'quicklink' });
+        } else {
+          openDialog(editor)();
+        }
+      });
+    };
+
+    var setup = function (editor) {
+      editor.addShortcut('Meta+K', '', function () {
+        editor.execCommand('mceLink');
+      });
+    };
+
+    var setupButtons = function (editor) {
+      editor.ui.registry.addToggleButton('link', {
+        icon: 'link',
+        tooltip: 'Insert/edit link',
+        onAction: openDialog(editor),
+        onSetup: toggleActiveState(editor)
+      });
+      editor.ui.registry.addButton('openlink', {
+        icon: 'new-tab',
+        tooltip: 'Open link',
+        onAction: gotoSelectedLink(editor),
+        onSetup: toggleEnabledState(editor)
+      });
+      editor.ui.registry.addButton('unlink', {
+        icon: 'unlink',
+        tooltip: 'Remove link',
+        onAction: function () {
+          return unlink(editor);
+        },
+        onSetup: toggleEnabledState(editor)
+      });
+    };
+    var setupMenuItems = function (editor) {
+      editor.ui.registry.addMenuItem('openlink', {
+        text: 'Open link',
+        icon: 'new-tab',
+        onAction: gotoSelectedLink(editor),
+        onSetup: toggleEnabledState(editor)
+      });
+      editor.ui.registry.addMenuItem('link', {
+        icon: 'link',
+        text: 'Link...',
+        shortcut: 'Meta+K',
+        onAction: openDialog(editor)
+      });
+      editor.ui.registry.addMenuItem('unlink', {
+        icon: 'unlink',
+        text: 'Remove link',
+        onAction: function () {
+          return unlink(editor);
+        },
+        onSetup: toggleEnabledState(editor)
+      });
+    };
+    var setupContextMenu = function (editor) {
+      var inLink = 'link unlink openlink';
+      var noLink = 'link';
+      editor.ui.registry.addContextMenu('link', {
+        update: function (element) {
+          return hasLinks(editor.dom.getParents(element, 'a')) ? inLink : noLink;
+        }
+      });
+    };
+    var setupContextToolbars = function (editor) {
+      var collapseSelectionToEnd = function (editor) {
+        editor.selection.collapse(false);
+      };
+      var onSetupLink = function (buttonApi) {
+        var node = editor.selection.getNode();
+        buttonApi.setDisabled(!getAnchorElement(editor, node));
+        return function () {
+        };
+      };
+      editor.ui.registry.addContextForm('quicklink', {
+        launch: {
+          type: 'contextformtogglebutton',
+          icon: 'link',
+          tooltip: 'Link',
+          onSetup: toggleActiveState(editor)
+        },
+        label: 'Link',
+        predicate: function (node) {
+          return !!getAnchorElement(editor, node) && hasContextToolbar(editor);
+        },
+        initValue: function () {
+          var elm = getAnchorElement(editor);
+          return !!elm ? getHref(elm) : '';
+        },
+        commands: [
+          {
+            type: 'contextformtogglebutton',
+            icon: 'link',
+            tooltip: 'Link',
+            primary: true,
+            onSetup: function (buttonApi) {
+              var node = editor.selection.getNode();
+              buttonApi.setActive(!!getAnchorElement(editor, node));
+              return toggleActiveState(editor)(buttonApi);
+            },
+            onAction: function (formApi) {
+              var anchor = getAnchorElement(editor);
+              var value = formApi.getValue();
+              if (!anchor) {
+                var attachState = {
+                  href: value,
+                  attach: function () {
+                  }
+                };
+                var onlyText = isOnlyTextSelected(editor.selection.getContent());
+                var text = onlyText ? Option.some(getAnchorText(editor.selection, anchor)).filter(function (t) {
+                  return t.length > 0;
+                }).or(Option.from(value)) : Option.none();
+                link(editor, attachState, {
+                  href: value,
+                  text: text,
+                  title: Option.none(),
+                  rel: Option.none(),
+                  target: Option.none(),
+                  class: Option.none()
+                });
+                formApi.hide();
+              } else {
+                editor.dom.setAttrib(anchor, 'href', value);
+                collapseSelectionToEnd(editor);
+                formApi.hide();
+              }
+            }
+          },
+          {
+            type: 'contextformbutton',
+            icon: 'unlink',
+            tooltip: 'Remove link',
+            onSetup: onSetupLink,
+            onAction: function (formApi) {
+              unlink(editor);
+              formApi.hide();
+            }
+          },
+          {
+            type: 'contextformbutton',
+            icon: 'new-tab',
+            tooltip: 'Open link',
+            onSetup: onSetupLink,
+            onAction: function (formApi) {
+              gotoSelectedLink(editor)();
+              formApi.hide();
+            }
+          }
+        ]
+      });
+    };
+
+    function Plugin () {
+      global.add('link', function (editor) {
+        setupButtons(editor);
+        setupMenuItems(editor);
+        setupContextMenu(editor);
+        setupContextToolbars(editor);
+        setupGotoLinks(editor);
+        register(editor);
+        setup(editor);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/link/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(i){"use strict";var n,t,e,r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.VK"),a=function(r){return function(t){return e=typeof(n=t),(null===n?"null":"object"==e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e)===r;var n,e}},l=function(n){return function(t){return typeof t===n}},c=a("string"),f=a("array"),s=function(t){return n===t},m=l("boolean"),g=l("function"),d=function(t){var n=t.getParam("link_assume_external_targets",!1);return m(n)&&n?1:!c(n)||"http"!==n&&"https"!==n?0:n},h=function(t){return t.getParam("default_link_target")},v=function(t){return t.getParam("target_list",!0)},p=function(t){return t.getParam("rel_list",[],"array")},y=function(t){return t.getParam("allow_unsafe_link_target",!1,"boolean")},k=function(t){var n=i.document.createElement("a");n.target="_blank",n.href=t,n.rel="noreferrer noopener";var e,r,o=i.document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,i.window,0,0,0,0,0,!1,!1,!1,!1,0,null),e=n,r=o,i.document.body.appendChild(e),e.dispatchEvent(r),i.document.body.removeChild(e)},x=function(){return(x=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},b=function(){},O=function(t){return function(){return t}},w=O(!1),C=O(!(n=null)),A=function(){return N},N=(t=function(t){return t.isNone()},{fold:function(t,n){return t()},is:w,isSome:w,isNone:C,getOr:r=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:O(null),getOrUndefined:O(undefined),or:r,orThunk:e,map:A,each:b,bind:A,exists:w,forall:C,filter:A,equals:t,equals_:t,toArray:function(){return[]},toString:O("none()")}),_=function(e){var t=O(e),n=function(){return o},r=function(t){return t(e)},o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:C,isNone:w,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return _(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?o:N},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(w,function(t){return n(e,t)})}};return o},P={some:_,none:A,from:function(t){return null===t||t===undefined?N:_(t)}},S=Array.prototype.indexOf,T=Array.prototype.push,D=function(t,n){return e=t,r=n,-1<S.call(e,r);var e,r},L=function(t){for(var n=[],e=0,r=t.length;e<r;++e){if(!f(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);T.apply(n,t[e])}return n},M=function(t,n){return L(function(t,n){for(var e=t.length,r=new Array(e),o=0;o<e;o++){var i=t[o];r[o]=n(i,o)}return r}(t,n))},E=function(t,n){for(var e=0;e<t.length;e++){var r=n(t[e],e);if(r.isSome())return r}return P.none()},R=Object.keys,U=function(t,e,r,o){return function(t,n){for(var e=R(t),r=0,o=e.length;r<o;r++){var i=e[r];n(t[i],i)}}(t,function(t,n){(e(t,n)?r:o)(t,n)}),{}},q=function(t,n){var e,r={};return U(t,n,(e=r,function(t,n){e[n]=t}),b),r},K=tinymce.util.Tools.resolve("tinymce.util.Tools"),z=function(t){return!(!/(^|[ ,])rtc([, ]|$)/.test(t.settings.plugins)||!o.get("rtc"))},I=function(t){return/^\w+:/i.test(t)},j=function(t){var n=t.getAttribute("data-mce-href");return n||t.getAttribute("href")},B=function(t,n){var e,r,o=["noopener"],i=t?t.split(/\s+/):[],u=function(t){return t.filter(function(t){return-1===K.inArray(o,t)})},a=n?0<(e=u(e=i)).length?e.concat(o):o:u(i);return 0<a.length?(r=a,K.trim(r.sort().join(" "))):""},V=function(t,n){return n=n||t.selection.getNode(),G(n)?t.dom.select("a[href]",n)[0]:t.dom.getParent(n,"a[href]")},F=function(t,n){var e=n?n.innerText||n.textContent:t.getContent({format:"text"});return e.replace(/\uFEFF/g,"")},W=function(t){return t&&"A"===t.nodeName&&!!j(t)},$=function(t){return 0<K.grep(t,W).length},H=function(t){return!(/</.test(t)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(t)||-1===t.indexOf("href=")))},G=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},J=function(t){return n=["title","rel","class","target"],e=function(n,e){return t[e].each(function(t){n[e]=0<t.length?t:null}),n},r={href:t.href},function(t,n){for(var e=0,r=t.length;e<r;e++)n(t[e],e)}(n,function(t){r=e(r,t)}),r;var n,e,r},X=function(t,n){var e,r,o=x({},n);if(!(0<p(t).length)&&!1===y(t)){var i=B(o.rel,"_blank"===o.target);o.rel=i||null}return P.from(o.target).isNone()&&!1===v(t)&&(o.target=h(t)),o.href=(e=o.href,"http"!==(r=d(t))&&"https"!==r||I(e)?e:r+"://"+e),o},Q=function(l,c,f){var s=l.selection.getNode(),m=V(l,s),g=X(l,J(f));l.undoManager.transact(function(){var n,t,e,r,o,i,u,a;f.href===c.href&&c.attach(),m?(l.focus(),o=l,i=m,u=f.text,a=g,u.each(function(t){i.hasOwnProperty("innerText")?i.innerText=t:i.textContent=t}),o.dom.setAttribs(i,a),o.selection.select(i)):(n=l,t=s,e=f.text,r=g,G(t)?nt(n,t,r):e.fold(function(){n.execCommand("mceInsertLink",!1,r)},function(t){n.insertContent(n.dom.createHTML("a",r,n.dom.encode(t)))}))})},Y=function(t,n,e){var r,o,i,u,a,l,c;z(t)?t.execCommand("createlink",!1,(o=(r=e)["class"],i=r.href,u=r.rel,a=r.target,l=r.text,c=r.title,q({"class":o.getOrNull(),href:i,rel:u.getOrNull(),target:a.getOrNull(),text:l.getOrNull(),title:c.getOrNull()},function(t,n){return!1===s(t)}))):Q(t,n,e)},Z=function(t){var e;z(t)?t.execCommand("unlink"):(e=t).undoManager.transact(function(){var t=e.selection.getNode();if(G(t))tt(e,t);else{var n=e.dom.getParent(t,"a[href]",e.getBody());n&&e.dom.remove(n,!0)}e.focus()})},tt=function(t,n){var e=t.dom.select("img",n)[0];if(e){var r=t.dom.getParents(e,"a[href]",n)[0];r&&(r.parentNode.insertBefore(e,r),t.dom.remove(r))}},nt=function(t,n,e){var r=t.dom.select("img",n)[0];if(r){var o=t.dom.create("a",e);r.parentNode.insertBefore(o,r),o.appendChild(r)}},et=function(t){return c(t.value)?t.value:""},rt=function(e){return void 0===e&&(e=et),function(t){return P.from(t).map(function(t){return n=t,r=e,o=[],K.each(n,function(t){var n=c(t.text)?t.text:c(t.title)?t.title:"";if(t.menu===undefined){var e=r(t);o.push({text:n,value:e})}}),o;var n,r,o})}},ot={sanitize:function(t){return rt(et)(t)},sanitizeWith:rt,createUi:function(n,e){return function(t){return{name:n,type:"selectbox",label:e,items:t}}},getValue:et},it=function(n,t,e,r){var o,i=r[t],u=0<n.length;return i!==undefined?(o=i,E(e,function(t){return P.some(t).filter(function(t){return t.value===o})}).map(function(t){return{url:{value:t.value,meta:{text:u?n:t.text,attach:b}},text:u?n:t.text}})):P.none()},ut=function(t,i){var n,e,u=(n=t.text,e=n,{get:function(){return e},set:function(t){e=t}}),r=function(t,n){var e,r,o=(e=i,("link"===(r=n.name)?e.catalogs.link:"anchor"===r?e.catalogs.anchor:P.none()).getOr([]));return it(u.get(),n.name,o,t)};return{onChange:function(t,n){return"url"===n.name?function(t){if(u.get().length<=0){var n=t.url.meta.text!==undefined?t.url.meta.text:t.url.value,e=t.url.meta.title!==undefined?t.url.meta.title:"";return P.some({text:n,title:e})}return P.none()}(t()):D(["anchor","link"],n.name)?r(t(),n):("text"===n.name&&u.set(t().text),P.none())}}},at=tinymce.util.Tools.resolve("tinymce.util.Delay"),lt=tinymce.util.Tools.resolve("tinymce.util.Promise"),ct=function(t){var n=t.href;return 0<n.indexOf("@")&&-1===n.indexOf("//")&&-1===n.indexOf("mailto:")?P.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:function(t){return x(x({},t),{href:"mailto:"+n})}}):P.none()},ft=function(u,a){return E([ct,(e=d(u),r=u.getParam("link_default_protocol","http","string"),function(t){var n=t.href;return 1===e&&!I(n)||0===e&&/^\s*www[\.|\d\.]/i.test(n)?P.some({message:"The URL you entered seems to be an external link. Do you want to add the required "+r+":// prefix?",preprocess:function(t){return x(x({},t),{href:r+"://"+n})}}):P.none()})],function(t){return t(a)}).fold(function(){return lt.resolve(a)},function(i){return new lt(function(n){var e,t,r,o;e=u,t=i.message,r=function(t){n(t?i.preprocess(a):a)},o=e.selection.getRng(),at.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(o),r(t)})})})});var e,r},st=function(t){var n=t.dom.select("a:not([href])"),e=M(n,function(t){var n=t.name||t.id;return n?[{text:n,value:"#"+n}]:[]});return 0<e.length?P.some([{text:"None",value:""}].concat(e)):P.none()},mt=function(t){var n=t.getParam("link_class_list",[],"array");return 0<n.length?ot.sanitize(n):P.none()},gt=tinymce.util.Tools.resolve("tinymce.util.XHR"),dt=function(n){var e=function(t){return n.convertURL(t.value||t.url,"href")},t=n.getParam("link_list");return new lt(function(n){c(t)?gt.send({url:t,success:function(t){return n(function(t){try{return P.some(JSON.parse(t))}catch(n){return P.none()}}(t))},error:function(t){return n(P.none())}}):g(t)?t(function(t){return n(P.some(t))}):n(P.from(t))}).then(function(t){return t.bind(ot.sanitizeWith(e)).map(function(t){return 0<t.length?[{text:"None",value:""}].concat(t):t})})},ht=function(t,n){var e=p(t);if(0<e.length){var r=n.is("_blank");return(!1===y(t)?ot.sanitizeWith(function(t){return B(ot.getValue(t),r)}):ot.sanitize)(e)}return P.none()},vt=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],pt=function(t){var n=v(t);return f(n)?ot.sanitize(n).orThunk(function(){return P.some(vt)}):!1===n?P.none():P.some(vt)},yt=function(t,n,e){var r=t.getAttrib(n,e);return null!==r&&0<r.length?P.some(r):P.none()},kt=function(f,s){return dt(f).then(function(t){var n,e,r,o,i,u,a,l,c=(e=s,r=(n=f).dom,o=H(n.selection.getContent())?P.some(F(n.selection,e)):P.none(),i=e?P.some(r.getAttrib(e,"href")):P.none(),u=e?P.from(r.getAttrib(e,"target")):P.none(),a=yt(r,e,"rel"),l=yt(r,e,"class"),{url:i,text:o,title:yt(r,e,"title"),target:u,rel:a,linkClass:l});return{anchor:c,catalogs:{targets:pt(f),rels:ht(f,c.target),classes:mt(f),anchor:st(f),link:t},optNode:P.from(s),flags:{titleEnabled:f.getParam("link_title",!0,"boolean")}}})},xt=function(d){var t,n;(n=V(t=d),kt(t,n)).then(function(t){var i,u,n,e,r,o,a,l,c,f,s,m,g;return e=function(t){var e=t.getData();if(!e.url.value)return Z(i),void t.close();var n=function(n){return P.from(e[n]).filter(function(t){return!u.anchor[n].is(t)})},r={href:e.url.value,text:n("text"),target:n("target"),rel:n("rel"),"class":n("linkClass"),title:n("title")},o={href:e.url.value,attach:e.url.meta!==undefined&&e.url.meta.attach?e.url.meta.attach:function(){}};ft(i,r).then(function(t){Y(i,o,t)}),t.close()},r=i=d,l=(n=u=t).anchor.text.map(function(){return{name:"text",type:"input",label:"Text to display"}}).toArray(),c=n.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],f=P.from(h(r)),a=f,s={url:{value:(o=n).anchor.url.getOr(""),meta:{attach:function(){},text:o.anchor.url.fold(function(){return""},function(){return o.anchor.text.getOr("")}),original:{value:o.anchor.url.getOr("")}}},text:o.anchor.text.getOr(""),title:o.anchor.title.getOr(""),anchor:o.anchor.url.getOr(""),link:o.anchor.url.getOr(""),rel:o.anchor.rel.getOr(""),target:o.anchor.target.or(a).getOr(""),linkClass:o.anchor.linkClass.getOr("")},m=ut(s,n),g=n.catalogs,{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:L([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],l,c,function(t){for(var n=[],e=function(t){n.push(t)},r=0;r<t.length;r++)t[r].each(e);return n}([g.anchor.map(ot.createUi("anchor","Anchors")),g.rels.map(ot.createUi("rel","Rel")),g.targets.map(ot.createUi("target","Open link in...")),g.link.map(ot.createUi("link","Link list")),g.classes.map(ot.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:s,onChange:function(n,t){var e=t.name;m.onChange(n.getData,{name:e}).each(function(t){n.setData(t)})},onSubmit:e}}).then(function(t){d.windowManager.open(t)})},bt=function(t,n){return t.dom.getParent(n,"a[href]")},Ot=function(t){return bt(t,t.selection.getStart())},wt=function(t,n){if(n){var e=j(n);if(/^#/.test(e)){var r=t.$(e);r.length&&t.selection.scrollIntoView(r[0],!0)}else k(n.href)}},Ct=function(t){return function(){xt(t)}},At=function(t){return function(){wt(t,Ot(t))}},Nt=function(r){r.on("click",function(t){var n=bt(r,t.target);n&&u.metaKeyPressed(t)&&(t.preventDefault(),wt(r,n))}),r.on("keydown",function(t){var n,e=Ot(r);e&&13===t.keyCode&&(!0===(n=t).altKey&&!1===n.shiftKey&&!1===n.ctrlKey&&!1===n.metaKey)&&(t.preventDefault(),wt(r,e))})},_t=function(e){return function(n){var t=function(t){return n.setActive(!e.mode.isReadOnly()&&!!V(e,t.element))};return e.on("NodeChange",t),function(){return e.off("NodeChange",t)}}},Pt=function(r){return function(n){var t=r.dom.getParents(r.selection.getStart());n.setDisabled(!$(t));var e=function(t){return n.setDisabled(!$(t.parents))};return r.on("NodeChange",e),function(){return r.off("NodeChange",e)}}};!function St(){o.add("link",function(t){var n,e,r,i,o,u,a;(n=t).ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Ct(n),onSetup:_t(n)}),n.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:At(n),onSetup:Pt(n)}),n.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:function(){return Z(n)},onSetup:Pt(n)}),(e=t).ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:At(e),onSetup:Pt(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Ct(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:function(){return Z(e)},onSetup:Pt(e)}),(r=t).ui.registry.addContextMenu("link",{update:function(t){return $(r.dom.getParents(t,"a"))?"link unlink openlink":"link"}}),o=function(t){var n=i.selection.getNode();return t.setDisabled(!V(i,n)),function(){}},(i=t).ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:_t(i)},label:"Link",predicate:function(t){return!!V(i,t)&&i.getParam("link_context_toolbar",!1,"boolean")},initValue:function(){var t=V(i);return t?j(t):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:function(t){var n=i.selection.getNode();return t.setActive(!!V(i,n)),_t(i)(t)},onAction:function(t){var n=V(i),e=t.getValue();if(n)i.dom.setAttrib(n,"href",e),i.selection.collapse(!1),t.hide();else{var r={href:e,attach:function(){}},o=H(i.selection.getContent())?P.some(F(i.selection,n)).filter(function(t){return 0<t.length}).or(P.from(e)):P.none();Y(i,r,{href:e,text:o,title:P.none(),rel:P.none(),target:P.none(),"class":P.none()}),t.hide()}}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:o,onAction:function(t){Z(i),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:o,onAction:function(t){At(i)(),t.hide()}}]}),Nt(t),(u=t).addCommand("mceLink",function(){u.getParam("link_quicklink",!1,"boolean")?u.fire("contexttoolbar-show",{toolbarKey:"quicklink"}):Ct(u)()}),(a=t).addShortcut("Meta+K","",function(){a.execCommand("mceLink")})})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/lists/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "lists" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/lists')
+//   ES2015:
+//     import 'tinymce/plugins/lists'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/lists/plugin.js
@@ -1,1 +1,2166 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var not = function (f) {
+      return function (t) {
+        return !f(t);
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var typeOf = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf(value) === type;
+      };
+    };
+    var isSimpleType = function (type) {
+      return function (value) {
+        return typeof value === type;
+      };
+    };
+    var isString = isType('string');
+    var isArray = isType('array');
+    var isBoolean = isSimpleType('boolean');
+    var isFunction = isSimpleType('function');
+    var isNumber = isSimpleType('number');
+
+    var nativeSlice = Array.prototype.slice;
+    var nativePush = Array.prototype.push;
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var each = function (xs, f) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var filter = function (xs, pred) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          r.push(x);
+        }
+      }
+      return r;
+    };
+    var groupBy = function (xs, f) {
+      if (xs.length === 0) {
+        return [];
+      } else {
+        var wasType = f(xs[0]);
+        var r = [];
+        var group = [];
+        for (var i = 0, len = xs.length; i < len; i++) {
+          var x = xs[i];
+          var type = f(x);
+          if (type !== wasType) {
+            r.push(group);
+            group = [];
+          }
+          wasType = type;
+          group.push(x);
+        }
+        if (group.length !== 0) {
+          r.push(group);
+        }
+        return r;
+      }
+    };
+    var foldl = function (xs, f, acc) {
+      each(xs, function (x) {
+        acc = f(acc, x);
+      });
+      return acc;
+    };
+    var findUntil = function (xs, pred, until) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return Option.some(x);
+        } else if (until(x, i)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var find = function (xs, pred) {
+      return findUntil(xs, pred, never);
+    };
+    var flatten = function (xs) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        if (!isArray(xs[i])) {
+          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
+        }
+        nativePush.apply(r, xs[i]);
+      }
+      return r;
+    };
+    var bind = function (xs, f) {
+      return flatten(map(xs, f));
+    };
+    var reverse = function (xs) {
+      var r = nativeSlice.call(xs, 0);
+      r.reverse();
+      return r;
+    };
+    var head = function (xs) {
+      return xs.length === 0 ? Option.none() : Option.some(xs[0]);
+    };
+    var last = function (xs) {
+      return xs.length === 0 ? Option.none() : Option.some(xs[xs.length - 1]);
+    };
+
+    var compareDocumentPosition = function (a, b, match) {
+      return (a.compareDocumentPosition(b) & match) !== 0;
+    };
+    var documentPositionContainedBy = function (a, b) {
+      return compareDocumentPosition(a, b, domGlobals.Node.DOCUMENT_POSITION_CONTAINED_BY);
+    };
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+
+    var cached = function (f) {
+      var called = false;
+      var r;
+      return function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (!called) {
+          called = true;
+          r = f.apply(null, args);
+        }
+        return r;
+      };
+    };
+
+    var firstMatch = function (regexes, s) {
+      for (var i = 0; i < regexes.length; i++) {
+        var x = regexes[i];
+        if (x.test(s)) {
+          return x;
+        }
+      }
+      return undefined;
+    };
+    var find$1 = function (regexes, agent) {
+      var r = firstMatch(regexes, agent);
+      if (!r) {
+        return {
+          major: 0,
+          minor: 0
+        };
+      }
+      var group = function (i) {
+        return Number(agent.replace(r, '$' + i));
+      };
+      return nu(group(1), group(2));
+    };
+    var detect = function (versionRegexes, agent) {
+      var cleanedAgent = String(agent).toLowerCase();
+      if (versionRegexes.length === 0) {
+        return unknown();
+      }
+      return find$1(versionRegexes, cleanedAgent);
+    };
+    var unknown = function () {
+      return nu(0, 0);
+    };
+    var nu = function (major, minor) {
+      return {
+        major: major,
+        minor: minor
+      };
+    };
+    var Version = {
+      nu: nu,
+      detect: detect,
+      unknown: unknown
+    };
+
+    var edge = 'Edge';
+    var chrome = 'Chrome';
+    var ie = 'IE';
+    var opera = 'Opera';
+    var firefox = 'Firefox';
+    var safari = 'Safari';
+    var unknown$1 = function () {
+      return nu$1({
+        current: undefined,
+        version: Version.unknown()
+      });
+    };
+    var nu$1 = function (info) {
+      var current = info.current;
+      var version = info.version;
+      var isBrowser = function (name) {
+        return function () {
+          return current === name;
+        };
+      };
+      return {
+        current: current,
+        version: version,
+        isEdge: isBrowser(edge),
+        isChrome: isBrowser(chrome),
+        isIE: isBrowser(ie),
+        isOpera: isBrowser(opera),
+        isFirefox: isBrowser(firefox),
+        isSafari: isBrowser(safari)
+      };
+    };
+    var Browser = {
+      unknown: unknown$1,
+      nu: nu$1,
+      edge: constant(edge),
+      chrome: constant(chrome),
+      ie: constant(ie),
+      opera: constant(opera),
+      firefox: constant(firefox),
+      safari: constant(safari)
+    };
+
+    var windows = 'Windows';
+    var ios = 'iOS';
+    var android = 'Android';
+    var linux = 'Linux';
+    var osx = 'OSX';
+    var solaris = 'Solaris';
+    var freebsd = 'FreeBSD';
+    var chromeos = 'ChromeOS';
+    var unknown$2 = function () {
+      return nu$2({
+        current: undefined,
+        version: Version.unknown()
+      });
+    };
+    var nu$2 = function (info) {
+      var current = info.current;
+      var version = info.version;
+      var isOS = function (name) {
+        return function () {
+          return current === name;
+        };
+      };
+      return {
+        current: current,
+        version: version,
+        isWindows: isOS(windows),
+        isiOS: isOS(ios),
+        isAndroid: isOS(android),
+        isOSX: isOS(osx),
+        isLinux: isOS(linux),
+        isSolaris: isOS(solaris),
+        isFreeBSD: isOS(freebsd),
+        isChromeOS: isOS(chromeos)
+      };
+    };
+    var OperatingSystem = {
+      unknown: unknown$2,
+      nu: nu$2,
+      windows: constant(windows),
+      ios: constant(ios),
+      android: constant(android),
+      linux: constant(linux),
+      osx: constant(osx),
+      solaris: constant(solaris),
+      freebsd: constant(freebsd),
+      chromeos: constant(chromeos)
+    };
+
+    var DeviceType = function (os, browser, userAgent, mediaMatch) {
+      var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
+      var isiPhone = os.isiOS() && !isiPad;
+      var isMobile = os.isiOS() || os.isAndroid();
+      var isTouch = isMobile || mediaMatch('(pointer:coarse)');
+      var isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');
+      var isPhone = isiPhone || isMobile && !isTablet;
+      var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
+      var isDesktop = !isPhone && !isTablet && !iOSwebview;
+      return {
+        isiPad: constant(isiPad),
+        isiPhone: constant(isiPhone),
+        isTablet: constant(isTablet),
+        isPhone: constant(isPhone),
+        isTouch: constant(isTouch),
+        isAndroid: os.isAndroid,
+        isiOS: os.isiOS,
+        isWebView: constant(iOSwebview),
+        isDesktop: constant(isDesktop)
+      };
+    };
+
+    var detect$1 = function (candidates, userAgent) {
+      var agent = String(userAgent).toLowerCase();
+      return find(candidates, function (candidate) {
+        return candidate.search(agent);
+      });
+    };
+    var detectBrowser = function (browsers, userAgent) {
+      return detect$1(browsers, userAgent).map(function (browser) {
+        var version = Version.detect(browser.versionRegexes, userAgent);
+        return {
+          current: browser.name,
+          version: version
+        };
+      });
+    };
+    var detectOs = function (oses, userAgent) {
+      return detect$1(oses, userAgent).map(function (os) {
+        var version = Version.detect(os.versionRegexes, userAgent);
+        return {
+          current: os.name,
+          version: version
+        };
+      });
+    };
+    var UaString = {
+      detectBrowser: detectBrowser,
+      detectOs: detectOs
+    };
+
+    var contains = function (str, substr) {
+      return str.indexOf(substr) !== -1;
+    };
+
+    var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
+    var checkContains = function (target) {
+      return function (uastring) {
+        return contains(uastring, target);
+      };
+    };
+    var browsers = [
+      {
+        name: 'Edge',
+        versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
+        search: function (uastring) {
+          return contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit');
+        }
+      },
+      {
+        name: 'Chrome',
+        versionRegexes: [
+          /.*?chrome\/([0-9]+)\.([0-9]+).*/,
+          normalVersionRegex
+        ],
+        search: function (uastring) {
+          return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe');
+        }
+      },
+      {
+        name: 'IE',
+        versionRegexes: [
+          /.*?msie\ ?([0-9]+)\.([0-9]+).*/,
+          /.*?rv:([0-9]+)\.([0-9]+).*/
+        ],
+        search: function (uastring) {
+          return contains(uastring, 'msie') || contains(uastring, 'trident');
+        }
+      },
+      {
+        name: 'Opera',
+        versionRegexes: [
+          normalVersionRegex,
+          /.*?opera\/([0-9]+)\.([0-9]+).*/
+        ],
+        search: checkContains('opera')
+      },
+      {
+        name: 'Firefox',
+        versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
+        search: checkContains('firefox')
+      },
+      {
+        name: 'Safari',
+        versionRegexes: [
+          normalVersionRegex,
+          /.*?cpu os ([0-9]+)_([0-9]+).*/
+        ],
+        search: function (uastring) {
+          return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit');
+        }
+      }
+    ];
+    var oses = [
+      {
+        name: 'Windows',
+        search: checkContains('win'),
+        versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
+      },
+      {
+        name: 'iOS',
+        search: function (uastring) {
+          return contains(uastring, 'iphone') || contains(uastring, 'ipad');
+        },
+        versionRegexes: [
+          /.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
+          /.*cpu os ([0-9]+)_([0-9]+).*/,
+          /.*cpu iphone os ([0-9]+)_([0-9]+).*/
+        ]
+      },
+      {
+        name: 'Android',
+        search: checkContains('android'),
+        versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
+      },
+      {
+        name: 'OSX',
+        search: checkContains('mac os x'),
+        versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]
+      },
+      {
+        name: 'Linux',
+        search: checkContains('linux'),
+        versionRegexes: []
+      },
+      {
+        name: 'Solaris',
+        search: checkContains('sunos'),
+        versionRegexes: []
+      },
+      {
+        name: 'FreeBSD',
+        search: checkContains('freebsd'),
+        versionRegexes: []
+      },
+      {
+        name: 'ChromeOS',
+        search: checkContains('cros'),
+        versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/]
+      }
+    ];
+    var PlatformInfo = {
+      browsers: constant(browsers),
+      oses: constant(oses)
+    };
+
+    var detect$2 = function (userAgent, mediaMatch) {
+      var browsers = PlatformInfo.browsers();
+      var oses = PlatformInfo.oses();
+      var browser = UaString.detectBrowser(browsers, userAgent).fold(Browser.unknown, Browser.nu);
+      var os = UaString.detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
+      var deviceType = DeviceType(os, browser, userAgent, mediaMatch);
+      return {
+        browser: browser,
+        os: os,
+        deviceType: deviceType
+      };
+    };
+    var PlatformDetection = { detect: detect$2 };
+
+    var mediaMatch = function (query) {
+      return domGlobals.window.matchMedia(query).matches;
+    };
+    var platform = cached(function () {
+      return PlatformDetection.detect(domGlobals.navigator.userAgent, mediaMatch);
+    });
+    var detect$3 = function () {
+      return platform();
+    };
+
+    var fromHtml = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      if (!div.hasChildNodes() || div.childNodes.length > 1) {
+        domGlobals.console.error('HTML does not have a single root node', html);
+        throw new Error('HTML must have a single root node');
+      }
+      return fromDom(div.childNodes[0]);
+    };
+    var fromTag = function (tag, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createElement(tag);
+      return fromDom(node);
+    };
+    var fromText = function (text, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createTextNode(text);
+      return fromDom(node);
+    };
+    var fromDom = function (node) {
+      if (node === null || node === undefined) {
+        throw new Error('Node cannot be null or undefined');
+      }
+      return { dom: constant(node) };
+    };
+    var fromPoint = function (docElm, x, y) {
+      var doc = docElm.dom();
+      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
+    };
+    var Element = {
+      fromHtml: fromHtml,
+      fromTag: fromTag,
+      fromText: fromText,
+      fromDom: fromDom,
+      fromPoint: fromPoint
+    };
+
+    var ELEMENT = 1;
+
+    var ELEMENT$1 = ELEMENT;
+    var is = function (element, selector) {
+      var dom = element.dom();
+      if (dom.nodeType !== ELEMENT$1) {
+        return false;
+      } else {
+        var elem = dom;
+        if (elem.matches !== undefined) {
+          return elem.matches(selector);
+        } else if (elem.msMatchesSelector !== undefined) {
+          return elem.msMatchesSelector(selector);
+        } else if (elem.webkitMatchesSelector !== undefined) {
+          return elem.webkitMatchesSelector(selector);
+        } else if (elem.mozMatchesSelector !== undefined) {
+          return elem.mozMatchesSelector(selector);
+        } else {
+          throw new Error('Browser lacks native selectors');
+        }
+      }
+    };
+
+    var eq = function (e1, e2) {
+      return e1.dom() === e2.dom();
+    };
+    var regularContains = function (e1, e2) {
+      var d1 = e1.dom();
+      var d2 = e2.dom();
+      return d1 === d2 ? false : d1.contains(d2);
+    };
+    var ieContains = function (e1, e2) {
+      return documentPositionContainedBy(e1.dom(), e2.dom());
+    };
+    var contains$1 = function (e1, e2) {
+      return detect$3().browser.isIE() ? ieContains(e1, e2) : regularContains(e1, e2);
+    };
+    var is$1 = is;
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.VK');
+
+    var lift2 = function (oa, ob, f) {
+      return oa.isSome() && ob.isSome() ? Option.some(f(oa.getOrDie(), ob.getOrDie())) : Option.none();
+    };
+
+    var fromElements = function (elements, scope) {
+      var doc = scope || domGlobals.document;
+      var fragment = doc.createDocumentFragment();
+      each(elements, function (element) {
+        fragment.appendChild(element.dom());
+      });
+      return Element.fromDom(fragment);
+    };
+
+    var parent = function (element) {
+      return Option.from(element.dom().parentNode).map(Element.fromDom);
+    };
+    var children = function (element) {
+      return map(element.dom().childNodes, Element.fromDom);
+    };
+    var child = function (element, index) {
+      var cs = element.dom().childNodes;
+      return Option.from(cs[index]).map(Element.fromDom);
+    };
+    var firstChild = function (element) {
+      return child(element, 0);
+    };
+    var lastChild = function (element) {
+      return child(element, element.dom().childNodes.length - 1);
+    };
+
+    var before = function (marker, element) {
+      var parent$1 = parent(marker);
+      parent$1.each(function (v) {
+        v.dom().insertBefore(element.dom(), marker.dom());
+      });
+    };
+    var append = function (parent, element) {
+      parent.dom().appendChild(element.dom());
+    };
+
+    var before$1 = function (marker, elements) {
+      each(elements, function (x) {
+        before(marker, x);
+      });
+    };
+    var append$1 = function (parent, elements) {
+      each(elements, function (x) {
+        append(parent, x);
+      });
+    };
+
+    var remove = function (element) {
+      var dom = element.dom();
+      if (dom.parentNode !== null) {
+        dom.parentNode.removeChild(dom);
+      }
+    };
+
+    var fireListEvent = function (editor, action, element) {
+      return editor.fire('ListMutation', {
+        action: action,
+        element: element
+      });
+    };
+
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
+
+    var global$4 = tinymce.util.Tools.resolve('tinymce.dom.DomQuery');
+
+    var global$5 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var matchNodeName = function (name) {
+      return function (node) {
+        return node && node.nodeName.toLowerCase() === name;
+      };
+    };
+    var matchNodeNames = function (regex) {
+      return function (node) {
+        return node && regex.test(node.nodeName);
+      };
+    };
+    var isTextNode = function (node) {
+      return node && node.nodeType === 3;
+    };
+    var isListNode = matchNodeNames(/^(OL|UL|DL)$/);
+    var isOlUlNode = matchNodeNames(/^(OL|UL)$/);
+    var isOlNode = matchNodeName('ol');
+    var isListItemNode = matchNodeNames(/^(LI|DT|DD)$/);
+    var isDlItemNode = matchNodeNames(/^(DT|DD)$/);
+    var isTableCellNode = matchNodeNames(/^(TH|TD)$/);
+    var isBr = matchNodeName('br');
+    var isFirstChild = function (node) {
+      return node.parentNode.firstChild === node;
+    };
+    var isTextBlock = function (editor, node) {
+      return node && !!editor.schema.getTextBlockElements()[node.nodeName];
+    };
+    var isBlock = function (node, blockElements) {
+      return node && node.nodeName in blockElements;
+    };
+    var isBogusBr = function (dom, node) {
+      if (!isBr(node)) {
+        return false;
+      }
+      if (dom.isBlock(node.nextSibling) && !isBr(node.previousSibling)) {
+        return true;
+      }
+      return false;
+    };
+    var isEmpty = function (dom, elm, keepBookmarks) {
+      var empty = dom.isEmpty(elm);
+      if (keepBookmarks && dom.select('span[data-mce-type=bookmark]', elm).length > 0) {
+        return false;
+      }
+      return empty;
+    };
+    var isChildOfBody = function (dom, elm) {
+      return dom.isChildOf(elm, dom.getRoot());
+    };
+
+    var getParentList = function (editor, node) {
+      var selectionStart = node || editor.selection.getStart(true);
+      return editor.dom.getParent(selectionStart, 'OL,UL,DL', getClosestListRootElm(editor, selectionStart));
+    };
+    var isParentListSelected = function (parentList, selectedBlocks) {
+      return parentList && selectedBlocks.length === 1 && selectedBlocks[0] === parentList;
+    };
+    var findSubLists = function (parentList) {
+      return global$5.grep(parentList.querySelectorAll('ol,ul,dl'), function (elm) {
+        return isListNode(elm);
+      });
+    };
+    var getSelectedSubLists = function (editor) {
+      var parentList = getParentList(editor);
+      var selectedBlocks = editor.selection.getSelectedBlocks();
+      if (isParentListSelected(parentList, selectedBlocks)) {
+        return findSubLists(parentList);
+      } else {
+        return global$5.grep(selectedBlocks, function (elm) {
+          return isListNode(elm) && parentList !== elm;
+        });
+      }
+    };
+    var findParentListItemsNodes = function (editor, elms) {
+      var listItemsElms = global$5.map(elms, function (elm) {
+        var parentLi = editor.dom.getParent(elm, 'li,dd,dt', getClosestListRootElm(editor, elm));
+        return parentLi ? parentLi : elm;
+      });
+      return global$4.unique(listItemsElms);
+    };
+    var getSelectedListItems = function (editor) {
+      var selectedBlocks = editor.selection.getSelectedBlocks();
+      return global$5.grep(findParentListItemsNodes(editor, selectedBlocks), function (block) {
+        return isListItemNode(block);
+      });
+    };
+    var getSelectedDlItems = function (editor) {
+      return filter(getSelectedListItems(editor), isDlItemNode);
+    };
+    var getClosestListRootElm = function (editor, elm) {
+      var parentTableCell = editor.dom.getParents(elm, 'TD,TH');
+      var root = parentTableCell.length > 0 ? parentTableCell[0] : editor.getBody();
+      return root;
+    };
+    var findLastParentListNode = function (editor, elm) {
+      var parentLists = editor.dom.getParents(elm, 'ol,ul', getClosestListRootElm(editor, elm));
+      return last(parentLists);
+    };
+    var getSelectedLists = function (editor) {
+      var firstList = findLastParentListNode(editor, editor.selection.getStart());
+      var subsequentLists = filter(editor.selection.getSelectedBlocks(), isOlUlNode);
+      return firstList.toArray().concat(subsequentLists);
+    };
+    var getSelectedListRoots = function (editor) {
+      var selectedLists = getSelectedLists(editor);
+      return getUniqueListRoots(editor, selectedLists);
+    };
+    var getUniqueListRoots = function (editor, lists) {
+      var listRoots = map(lists, function (list) {
+        return findLastParentListNode(editor, list).getOr(list);
+      });
+      return global$4.unique(listRoots);
+    };
+
+    var shouldIndentOnTab = function (editor) {
+      return editor.getParam('lists_indent_on_tab', true);
+    };
+    var getForcedRootBlock = function (editor) {
+      var block = editor.getParam('forced_root_block', 'p');
+      if (block === false) {
+        return '';
+      } else if (block === true) {
+        return 'p';
+      } else {
+        return block;
+      }
+    };
+    var getForcedRootBlockAttrs = function (editor) {
+      return editor.getParam('forced_root_block_attrs', {});
+    };
+
+    var createTextBlock = function (editor, contentNode) {
+      var dom = editor.dom;
+      var blockElements = editor.schema.getBlockElements();
+      var fragment = dom.createFragment();
+      var blockName = getForcedRootBlock(editor);
+      var node, textBlock, hasContentNode;
+      if (blockName) {
+        textBlock = dom.create(blockName);
+        if (textBlock.tagName === blockName.toUpperCase()) {
+          dom.setAttribs(textBlock, getForcedRootBlockAttrs(editor));
+        }
+        if (!isBlock(contentNode.firstChild, blockElements)) {
+          fragment.appendChild(textBlock);
+        }
+      }
+      if (contentNode) {
+        while (node = contentNode.firstChild) {
+          var nodeName = node.nodeName;
+          if (!hasContentNode && (nodeName !== 'SPAN' || node.getAttribute('data-mce-type') !== 'bookmark')) {
+            hasContentNode = true;
+          }
+          if (isBlock(node, blockElements)) {
+            fragment.appendChild(node);
+            textBlock = null;
+          } else {
+            if (blockName) {
+              if (!textBlock) {
+                textBlock = dom.create(blockName);
+                fragment.appendChild(textBlock);
+              }
+              textBlock.appendChild(node);
+            } else {
+              fragment.appendChild(node);
+            }
+          }
+        }
+      }
+      if (!blockName) {
+        fragment.appendChild(dom.create('br'));
+      } else {
+        if (!hasContentNode) {
+          textBlock.appendChild(dom.create('br', { 'data-mce-bogus': '1' }));
+        }
+      }
+      return fragment;
+    };
+
+    var keys = Object.keys;
+    var each$1 = function (obj, f) {
+      var props = keys(obj);
+      for (var k = 0, len = props.length; k < len; k++) {
+        var i = props[k];
+        var x = obj[i];
+        f(x, i);
+      }
+    };
+    var objAcc = function (r) {
+      return function (x, i) {
+        r[i] = x;
+      };
+    };
+    var internalFilter = function (obj, pred, onTrue, onFalse) {
+      var r = {};
+      each$1(obj, function (x, i) {
+        (pred(x, i) ? onTrue : onFalse)(x, i);
+      });
+      return r;
+    };
+    var filter$1 = function (obj, pred) {
+      var t = {};
+      internalFilter(obj, pred, objAcc(t), noop);
+      return t;
+    };
+
+    var name = function (element) {
+      var r = element.dom().nodeName;
+      return r.toLowerCase();
+    };
+    var type = function (element) {
+      return element.dom().nodeType;
+    };
+    var isType$1 = function (t) {
+      return function (element) {
+        return type(element) === t;
+      };
+    };
+    var isElement = isType$1(ELEMENT);
+
+    var rawSet = function (dom, key, value) {
+      if (isString(value) || isBoolean(value) || isNumber(value)) {
+        dom.setAttribute(key, value + '');
+      } else {
+        domGlobals.console.error('Invalid call to Attr.set. Key ', key, ':: Value ', value, ':: Element ', dom);
+        throw new Error('Attribute value was not simple');
+      }
+    };
+    var setAll = function (element, attrs) {
+      var dom = element.dom();
+      each$1(attrs, function (v, k) {
+        rawSet(dom, k, v);
+      });
+    };
+    var clone = function (element) {
+      return foldl(element.dom().attributes, function (acc, attr) {
+        acc[attr.name] = attr.value;
+        return acc;
+      }, {});
+    };
+
+    var isSupported = function (dom) {
+      return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
+    };
+
+    var internalSet = function (dom, property, value) {
+      if (!isString(value)) {
+        domGlobals.console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);
+        throw new Error('CSS value must be a string: ' + value);
+      }
+      if (isSupported(dom)) {
+        dom.style.setProperty(property, value);
+      }
+    };
+    var set = function (element, property, value) {
+      var dom = element.dom();
+      internalSet(dom, property, value);
+    };
+
+    var clone$1 = function (original, isDeep) {
+      return Element.fromDom(original.dom().cloneNode(isDeep));
+    };
+    var deep = function (original) {
+      return clone$1(original, true);
+    };
+    var shallowAs = function (original, tag) {
+      var nu = Element.fromTag(tag);
+      var attributes = clone(original);
+      setAll(nu, attributes);
+      return nu;
+    };
+    var mutate = function (original, tag) {
+      var nu = shallowAs(original, tag);
+      before(original, nu);
+      var children$1 = children(original);
+      append$1(nu, children$1);
+      remove(original);
+      return nu;
+    };
+
+    var joinSegment = function (parent, child) {
+      append(parent.item, child.list);
+    };
+    var joinSegments = function (segments) {
+      for (var i = 1; i < segments.length; i++) {
+        joinSegment(segments[i - 1], segments[i]);
+      }
+    };
+    var appendSegments = function (head$1, tail) {
+      lift2(last(head$1), head(tail), joinSegment);
+    };
+    var createSegment = function (scope, listType) {
+      var segment = {
+        list: Element.fromTag(listType, scope),
+        item: Element.fromTag('li', scope)
+      };
+      append(segment.list, segment.item);
+      return segment;
+    };
+    var createSegments = function (scope, entry, size) {
+      var segments = [];
+      for (var i = 0; i < size; i++) {
+        segments.push(createSegment(scope, entry.listType));
+      }
+      return segments;
+    };
+    var populateSegments = function (segments, entry) {
+      for (var i = 0; i < segments.length - 1; i++) {
+        set(segments[i].item, 'list-style-type', 'none');
+      }
+      last(segments).each(function (segment) {
+        setAll(segment.list, entry.listAttributes);
+        setAll(segment.item, entry.itemAttributes);
+        append$1(segment.item, entry.content);
+      });
+    };
+    var normalizeSegment = function (segment, entry) {
+      if (name(segment.list) !== entry.listType) {
+        segment.list = mutate(segment.list, entry.listType);
+      }
+      setAll(segment.list, entry.listAttributes);
+    };
+    var createItem = function (scope, attr, content) {
+      var item = Element.fromTag('li', scope);
+      setAll(item, attr);
+      append$1(item, content);
+      return item;
+    };
+    var appendItem = function (segment, item) {
+      append(segment.list, item);
+      segment.item = item;
+    };
+    var writeShallow = function (scope, cast, entry) {
+      var newCast = cast.slice(0, entry.depth);
+      last(newCast).each(function (segment) {
+        var item = createItem(scope, entry.itemAttributes, entry.content);
+        appendItem(segment, item);
+        normalizeSegment(segment, entry);
+      });
+      return newCast;
+    };
+    var writeDeep = function (scope, cast, entry) {
+      var segments = createSegments(scope, entry, entry.depth - cast.length);
+      joinSegments(segments);
+      populateSegments(segments, entry);
+      appendSegments(cast, segments);
+      return cast.concat(segments);
+    };
+    var composeList = function (scope, entries) {
+      var cast = foldl(entries, function (cast, entry) {
+        return entry.depth > cast.length ? writeDeep(scope, cast, entry) : writeShallow(scope, cast, entry);
+      }, []);
+      return head(cast).map(function (segment) {
+        return segment.list;
+      });
+    };
+
+    var isList = function (el) {
+      return is$1(el, 'OL,UL');
+    };
+    var hasFirstChildList = function (el) {
+      return firstChild(el).map(isList).getOr(false);
+    };
+    var hasLastChildList = function (el) {
+      return lastChild(el).map(isList).getOr(false);
+    };
+
+    var isIndented = function (entry) {
+      return entry.depth > 0;
+    };
+    var isSelected = function (entry) {
+      return entry.isSelected;
+    };
+    var cloneItemContent = function (li) {
+      var children$1 = children(li);
+      var content = hasLastChildList(li) ? children$1.slice(0, -1) : children$1;
+      return map(content, deep);
+    };
+    var createEntry = function (li, depth, isSelected) {
+      return parent(li).filter(isElement).map(function (list) {
+        return {
+          depth: depth,
+          dirty: false,
+          isSelected: isSelected,
+          content: cloneItemContent(li),
+          itemAttributes: clone(li),
+          listAttributes: clone(list),
+          listType: name(list)
+        };
+      });
+    };
+
+    var indentEntry = function (indentation, entry) {
+      switch (indentation) {
+      case 'Indent':
+        entry.depth++;
+        break;
+      case 'Outdent':
+        entry.depth--;
+        break;
+      case 'Flatten':
+        entry.depth = 0;
+      }
+      entry.dirty = true;
+    };
+
+    var cloneListProperties = function (target, source) {
+      target.listType = source.listType;
+      target.listAttributes = __assign({}, source.listAttributes);
+    };
+    var cleanListProperties = function (entry) {
+      entry.listAttributes = filter$1(entry.listAttributes, function (_value, key) {
+        return key !== 'start';
+      });
+    };
+    var closestSiblingEntry = function (entries, start) {
+      var depth = entries[start].depth;
+      var matches = function (entry) {
+        return entry.depth === depth && !entry.dirty;
+      };
+      var until = function (entry) {
+        return entry.depth < depth;
+      };
+      return findUntil(reverse(entries.slice(0, start)), matches, until).orThunk(function () {
+        return findUntil(entries.slice(start + 1), matches, until);
+      });
+    };
+    var normalizeEntries = function (entries) {
+      each(entries, function (entry, i) {
+        closestSiblingEntry(entries, i).fold(function () {
+          if (entry.dirty) {
+            cleanListProperties(entry);
+          }
+        }, function (matchingEntry) {
+          return cloneListProperties(entry, matchingEntry);
+        });
+      });
+      return entries;
+    };
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var parseItem = function (depth, itemSelection, selectionState, item) {
+      return firstChild(item).filter(isList).fold(function () {
+        itemSelection.each(function (selection) {
+          if (eq(selection.start, item)) {
+            selectionState.set(true);
+          }
+        });
+        var currentItemEntry = createEntry(item, depth, selectionState.get());
+        itemSelection.each(function (selection) {
+          if (eq(selection.end, item)) {
+            selectionState.set(false);
+          }
+        });
+        var childListEntries = lastChild(item).filter(isList).map(function (list) {
+          return parseList(depth, itemSelection, selectionState, list);
+        }).getOr([]);
+        return currentItemEntry.toArray().concat(childListEntries);
+      }, function (list) {
+        return parseList(depth, itemSelection, selectionState, list);
+      });
+    };
+    var parseList = function (depth, itemSelection, selectionState, list) {
+      return bind(children(list), function (element) {
+        var parser = isList(element) ? parseList : parseItem;
+        var newDepth = depth + 1;
+        return parser(newDepth, itemSelection, selectionState, element);
+      });
+    };
+    var parseLists = function (lists, itemSelection) {
+      var selectionState = Cell(false);
+      var initialDepth = 0;
+      return map(lists, function (list) {
+        return {
+          sourceList: list,
+          entries: parseList(initialDepth, itemSelection, selectionState, list)
+        };
+      });
+    };
+
+    var outdentedComposer = function (editor, entries) {
+      var normalizedEntries = normalizeEntries(entries);
+      return map(normalizedEntries, function (entry) {
+        var content = fromElements(entry.content);
+        return Element.fromDom(createTextBlock(editor, content.dom()));
+      });
+    };
+    var indentedComposer = function (editor, entries) {
+      var normalizedEntries = normalizeEntries(entries);
+      return composeList(editor.contentDocument, normalizedEntries).toArray();
+    };
+    var composeEntries = function (editor, entries) {
+      return bind(groupBy(entries, isIndented), function (entries) {
+        var groupIsIndented = head(entries).map(isIndented).getOr(false);
+        return groupIsIndented ? indentedComposer(editor, entries) : outdentedComposer(editor, entries);
+      });
+    };
+    var indentSelectedEntries = function (entries, indentation) {
+      each(filter(entries, isSelected), function (entry) {
+        return indentEntry(indentation, entry);
+      });
+    };
+    var getItemSelection = function (editor) {
+      var selectedListItems = map(getSelectedListItems(editor), Element.fromDom);
+      return lift2(find(selectedListItems, not(hasFirstChildList)), find(reverse(selectedListItems), not(hasFirstChildList)), function (start, end) {
+        return {
+          start: start,
+          end: end
+        };
+      });
+    };
+    var listIndentation = function (editor, lists, indentation) {
+      var entrySets = parseLists(lists, getItemSelection(editor));
+      each(entrySets, function (entrySet) {
+        indentSelectedEntries(entrySet.entries, indentation);
+        var composedLists = composeEntries(editor, entrySet.entries);
+        each(composedLists, function (composedList) {
+          fireListEvent(editor, indentation === 'Indent' ? 'IndentList' : 'OutdentList', composedList.dom());
+        });
+        before$1(entrySet.sourceList, composedLists);
+        remove(entrySet.sourceList);
+      });
+    };
+
+    var global$6 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
+
+    var DOM = global$6.DOM;
+    var splitList = function (editor, ul, li) {
+      var tmpRng, fragment, bookmarks, node, newBlock;
+      var removeAndKeepBookmarks = function (targetNode) {
+        global$5.each(bookmarks, function (node) {
+          targetNode.parentNode.insertBefore(node, li.parentNode);
+        });
+        DOM.remove(targetNode);
+      };
+      bookmarks = DOM.select('span[data-mce-type="bookmark"]', ul);
+      newBlock = createTextBlock(editor, li);
+      tmpRng = DOM.createRng();
+      tmpRng.setStartAfter(li);
+      tmpRng.setEndAfter(ul);
+      fragment = tmpRng.extractContents();
+      for (node = fragment.firstChild; node; node = node.firstChild) {
+        if (node.nodeName === 'LI' && editor.dom.isEmpty(node)) {
+          DOM.remove(node);
+          break;
+        }
+      }
+      if (!editor.dom.isEmpty(fragment)) {
+        DOM.insertAfter(fragment, ul);
+      }
+      DOM.insertAfter(newBlock, ul);
+      if (isEmpty(editor.dom, li.parentNode)) {
+        removeAndKeepBookmarks(li.parentNode);
+      }
+      DOM.remove(li);
+      if (isEmpty(editor.dom, ul)) {
+        DOM.remove(ul);
+      }
+    };
+
+    var outdentDlItem = function (editor, item) {
+      if (is$1(item, 'dd')) {
+        mutate(item, 'dt');
+      } else if (is$1(item, 'dt')) {
+        parent(item).each(function (dl) {
+          return splitList(editor, dl.dom(), item.dom());
+        });
+      }
+    };
+    var indentDlItem = function (item) {
+      if (is$1(item, 'dt')) {
+        mutate(item, 'dd');
+      }
+    };
+    var dlIndentation = function (editor, indentation, dlItems) {
+      if (indentation === 'Indent') {
+        each(dlItems, indentDlItem);
+      } else {
+        each(dlItems, function (item) {
+          return outdentDlItem(editor, item);
+        });
+      }
+    };
+
+    var getNormalizedPoint = function (container, offset) {
+      if (isTextNode(container)) {
+        return {
+          container: container,
+          offset: offset
+        };
+      }
+      var node = global$1.getNode(container, offset);
+      if (isTextNode(node)) {
+        return {
+          container: node,
+          offset: offset >= container.childNodes.length ? node.data.length : 0
+        };
+      } else if (node.previousSibling && isTextNode(node.previousSibling)) {
+        return {
+          container: node.previousSibling,
+          offset: node.previousSibling.data.length
+        };
+      } else if (node.nextSibling && isTextNode(node.nextSibling)) {
+        return {
+          container: node.nextSibling,
+          offset: 0
+        };
+      }
+      return {
+        container: container,
+        offset: offset
+      };
+    };
+    var normalizeRange = function (rng) {
+      var outRng = rng.cloneRange();
+      var rangeStart = getNormalizedPoint(rng.startContainer, rng.startOffset);
+      outRng.setStart(rangeStart.container, rangeStart.offset);
+      var rangeEnd = getNormalizedPoint(rng.endContainer, rng.endOffset);
+      outRng.setEnd(rangeEnd.container, rangeEnd.offset);
+      return outRng;
+    };
+
+    var selectionIndentation = function (editor, indentation) {
+      var lists = map(getSelectedListRoots(editor), Element.fromDom);
+      var dlItems = map(getSelectedDlItems(editor), Element.fromDom);
+      var isHandled = false;
+      if (lists.length || dlItems.length) {
+        var bookmark = editor.selection.getBookmark();
+        listIndentation(editor, lists, indentation);
+        dlIndentation(editor, indentation, dlItems);
+        editor.selection.moveToBookmark(bookmark);
+        editor.selection.setRng(normalizeRange(editor.selection.getRng()));
+        editor.nodeChanged();
+        isHandled = true;
+      }
+      return isHandled;
+    };
+    var indentListSelection = function (editor) {
+      return selectionIndentation(editor, 'Indent');
+    };
+    var outdentListSelection = function (editor) {
+      return selectionIndentation(editor, 'Outdent');
+    };
+    var flattenListSelection = function (editor) {
+      return selectionIndentation(editor, 'Flatten');
+    };
+
+    var global$7 = tinymce.util.Tools.resolve('tinymce.dom.BookmarkManager');
+
+    var DOM$1 = global$6.DOM;
+    var createBookmark = function (rng) {
+      var bookmark = {};
+      var setupEndPoint = function (start) {
+        var offsetNode, container, offset;
+        container = rng[start ? 'startContainer' : 'endContainer'];
+        offset = rng[start ? 'startOffset' : 'endOffset'];
+        if (container.nodeType === 1) {
+          offsetNode = DOM$1.create('span', { 'data-mce-type': 'bookmark' });
+          if (container.hasChildNodes()) {
+            offset = Math.min(offset, container.childNodes.length - 1);
+            if (start) {
+              container.insertBefore(offsetNode, container.childNodes[offset]);
+            } else {
+              DOM$1.insertAfter(offsetNode, container.childNodes[offset]);
+            }
+          } else {
+            container.appendChild(offsetNode);
+          }
+          container = offsetNode;
+          offset = 0;
+        }
+        bookmark[start ? 'startContainer' : 'endContainer'] = container;
+        bookmark[start ? 'startOffset' : 'endOffset'] = offset;
+      };
+      setupEndPoint(true);
+      if (!rng.collapsed) {
+        setupEndPoint();
+      }
+      return bookmark;
+    };
+    var resolveBookmark = function (bookmark) {
+      function restoreEndPoint(start) {
+        var container, offset, node;
+        var nodeIndex = function (container) {
+          var node = container.parentNode.firstChild, idx = 0;
+          while (node) {
+            if (node === container) {
+              return idx;
+            }
+            if (node.nodeType !== 1 || node.getAttribute('data-mce-type') !== 'bookmark') {
+              idx++;
+            }
+            node = node.nextSibling;
+          }
+          return -1;
+        };
+        container = node = bookmark[start ? 'startContainer' : 'endContainer'];
+        offset = bookmark[start ? 'startOffset' : 'endOffset'];
+        if (!container) {
+          return;
+        }
+        if (container.nodeType === 1) {
+          offset = nodeIndex(container);
+          container = container.parentNode;
+          DOM$1.remove(node);
+          if (!container.hasChildNodes() && DOM$1.isBlock(container)) {
+            container.appendChild(DOM$1.create('br'));
+          }
+        }
+        bookmark[start ? 'startContainer' : 'endContainer'] = container;
+        bookmark[start ? 'startOffset' : 'endOffset'] = offset;
+      }
+      restoreEndPoint(true);
+      restoreEndPoint();
+      var rng = DOM$1.createRng();
+      rng.setStart(bookmark.startContainer, bookmark.startOffset);
+      if (bookmark.endContainer) {
+        rng.setEnd(bookmark.endContainer, bookmark.endOffset);
+      }
+      return normalizeRange(rng);
+    };
+
+    var isCustomList = function (list) {
+      return /\btox\-/.test(list.className);
+    };
+    var listState = function (editor, listName, activate) {
+      return function () {
+        var nodeChangeHandler = function (e) {
+          var inList = findUntil(e.parents, isListNode, isTableCellNode).filter(function (list) {
+            return list.nodeName === listName && !isCustomList(list);
+          }).isSome();
+          activate(inList);
+        };
+        editor.on('NodeChange', nodeChangeHandler);
+        return function () {
+          return editor.off('NodeChange', nodeChangeHandler);
+        };
+      };
+    };
+
+    var listToggleActionFromListName = function (listName) {
+      switch (listName) {
+      case 'UL':
+        return 'ToggleUlList';
+      case 'OL':
+        return 'ToggleOlList';
+      case 'DL':
+        return 'ToggleDLList';
+      }
+    };
+
+    var updateListStyle = function (dom, el, detail) {
+      var type = detail['list-style-type'] ? detail['list-style-type'] : null;
+      dom.setStyle(el, 'list-style-type', type);
+    };
+    var setAttribs = function (elm, attrs) {
+      global$5.each(attrs, function (value, key) {
+        elm.setAttribute(key, value);
+      });
+    };
+    var updateListAttrs = function (dom, el, detail) {
+      setAttribs(el, detail['list-attributes']);
+      global$5.each(dom.select('li', el), function (li) {
+        setAttribs(li, detail['list-item-attributes']);
+      });
+    };
+    var updateListWithDetails = function (dom, el, detail) {
+      updateListStyle(dom, el, detail);
+      updateListAttrs(dom, el, detail);
+    };
+    var removeStyles = function (dom, element, styles) {
+      global$5.each(styles, function (style) {
+        var _a;
+        return dom.setStyle(element, (_a = {}, _a[style] = '', _a));
+      });
+    };
+    var getEndPointNode = function (editor, rng, start, root) {
+      var container, offset;
+      container = rng[start ? 'startContainer' : 'endContainer'];
+      offset = rng[start ? 'startOffset' : 'endOffset'];
+      if (container.nodeType === 1) {
+        container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
+      }
+      if (!start && isBr(container.nextSibling)) {
+        container = container.nextSibling;
+      }
+      while (container.parentNode !== root) {
+        if (isTextBlock(editor, container)) {
+          return container;
+        }
+        if (/^(TD|TH)$/.test(container.parentNode.nodeName)) {
+          return container;
+        }
+        container = container.parentNode;
+      }
+      return container;
+    };
+    var getSelectedTextBlocks = function (editor, rng, root) {
+      var textBlocks = [], dom = editor.dom;
+      var startNode = getEndPointNode(editor, rng, true, root);
+      var endNode = getEndPointNode(editor, rng, false, root);
+      var block;
+      var siblings = [];
+      for (var node = startNode; node; node = node.nextSibling) {
+        siblings.push(node);
+        if (node === endNode) {
+          break;
+        }
+      }
+      global$5.each(siblings, function (node) {
+        if (isTextBlock(editor, node)) {
+          textBlocks.push(node);
+          block = null;
+          return;
+        }
+        if (dom.isBlock(node) || isBr(node)) {
+          if (isBr(node)) {
+            dom.remove(node);
+          }
+          block = null;
+          return;
+        }
+        var nextSibling = node.nextSibling;
+        if (global$7.isBookmarkNode(node)) {
+          if (isTextBlock(editor, nextSibling) || !nextSibling && node.parentNode === root) {
+            block = null;
+            return;
+          }
+        }
+        if (!block) {
+          block = dom.create('p');
+          node.parentNode.insertBefore(block, node);
+          textBlocks.push(block);
+        }
+        block.appendChild(node);
+      });
+      return textBlocks;
+    };
+    var hasCompatibleStyle = function (dom, sib, detail) {
+      var sibStyle = dom.getStyle(sib, 'list-style-type');
+      var detailStyle = detail ? detail['list-style-type'] : '';
+      detailStyle = detailStyle === null ? '' : detailStyle;
+      return sibStyle === detailStyle;
+    };
+    var applyList = function (editor, listName, detail) {
+      if (detail === void 0) {
+        detail = {};
+      }
+      var rng = editor.selection.getRng(true);
+      var bookmark;
+      var listItemName = 'LI';
+      var root = getClosestListRootElm(editor, editor.selection.getStart(true));
+      var dom = editor.dom;
+      if (dom.getContentEditable(editor.selection.getNode()) === 'false') {
+        return;
+      }
+      listName = listName.toUpperCase();
+      if (listName === 'DL') {
+        listItemName = 'DT';
+      }
+      bookmark = createBookmark(rng);
+      global$5.each(getSelectedTextBlocks(editor, rng, root), function (block) {
+        var listBlock, sibling;
+        sibling = block.previousSibling;
+        if (sibling && isListNode(sibling) && sibling.nodeName === listName && hasCompatibleStyle(dom, sibling, detail)) {
+          listBlock = sibling;
+          block = dom.rename(block, listItemName);
+          sibling.appendChild(block);
+        } else {
+          listBlock = dom.create(listName);
+          block.parentNode.insertBefore(listBlock, block);
+          listBlock.appendChild(block);
+          block = dom.rename(block, listItemName);
+        }
+        removeStyles(dom, block, [
+          'margin',
+          'margin-right',
+          'margin-bottom',
+          'margin-left',
+          'margin-top',
+          'padding',
+          'padding-right',
+          'padding-bottom',
+          'padding-left',
+          'padding-top'
+        ]);
+        updateListWithDetails(dom, listBlock, detail);
+        mergeWithAdjacentLists(editor.dom, listBlock);
+      });
+      editor.selection.setRng(resolveBookmark(bookmark));
+    };
+    var isValidLists = function (list1, list2) {
+      return list1 && list2 && isListNode(list1) && list1.nodeName === list2.nodeName;
+    };
+    var hasSameListStyle = function (dom, list1, list2) {
+      var targetStyle = dom.getStyle(list1, 'list-style-type', true);
+      var style = dom.getStyle(list2, 'list-style-type', true);
+      return targetStyle === style;
+    };
+    var hasSameClasses = function (elm1, elm2) {
+      return elm1.className === elm2.className;
+    };
+    var shouldMerge = function (dom, list1, list2) {
+      return isValidLists(list1, list2) && hasSameListStyle(dom, list1, list2) && hasSameClasses(list1, list2);
+    };
+    var mergeWithAdjacentLists = function (dom, listBlock) {
+      var sibling, node;
+      sibling = listBlock.nextSibling;
+      if (shouldMerge(dom, listBlock, sibling)) {
+        while (node = sibling.firstChild) {
+          listBlock.appendChild(node);
+        }
+        dom.remove(sibling);
+      }
+      sibling = listBlock.previousSibling;
+      if (shouldMerge(dom, listBlock, sibling)) {
+        while (node = sibling.lastChild) {
+          listBlock.insertBefore(node, listBlock.firstChild);
+        }
+        dom.remove(sibling);
+      }
+    };
+    var updateList = function (editor, list, listName, detail) {
+      if (list.nodeName !== listName) {
+        var newList = editor.dom.rename(list, listName);
+        updateListWithDetails(editor.dom, newList, detail);
+        fireListEvent(editor, listToggleActionFromListName(listName), newList);
+      } else {
+        updateListWithDetails(editor.dom, list, detail);
+        fireListEvent(editor, listToggleActionFromListName(listName), list);
+      }
+    };
+    var toggleMultipleLists = function (editor, parentList, lists, listName, detail) {
+      if (parentList.nodeName === listName && !hasListStyleDetail(detail)) {
+        flattenListSelection(editor);
+      } else {
+        var bookmark = createBookmark(editor.selection.getRng(true));
+        global$5.each([parentList].concat(lists), function (elm) {
+          updateList(editor, elm, listName, detail);
+        });
+        editor.selection.setRng(resolveBookmark(bookmark));
+      }
+    };
+    var hasListStyleDetail = function (detail) {
+      return 'list-style-type' in detail;
+    };
+    var toggleSingleList = function (editor, parentList, listName, detail) {
+      if (parentList === editor.getBody()) {
+        return;
+      }
+      if (parentList) {
+        if (parentList.nodeName === listName && !hasListStyleDetail(detail) && !isCustomList(parentList)) {
+          flattenListSelection(editor);
+        } else {
+          var bookmark = createBookmark(editor.selection.getRng(true));
+          updateListWithDetails(editor.dom, parentList, detail);
+          var newList = editor.dom.rename(parentList, listName);
+          mergeWithAdjacentLists(editor.dom, newList);
+          editor.selection.setRng(resolveBookmark(bookmark));
+          fireListEvent(editor, listToggleActionFromListName(listName), newList);
+        }
+      } else {
+        applyList(editor, listName, detail);
+        fireListEvent(editor, listToggleActionFromListName(listName), parentList);
+      }
+    };
+    var toggleList = function (editor, listName, detail) {
+      var parentList = getParentList(editor);
+      var selectedSubLists = getSelectedSubLists(editor);
+      detail = detail ? detail : {};
+      if (parentList && selectedSubLists.length > 0) {
+        toggleMultipleLists(editor, parentList, selectedSubLists, listName, detail);
+      } else {
+        toggleSingleList(editor, parentList, listName, detail);
+      }
+    };
+
+    var DOM$2 = global$6.DOM;
+    var normalizeList = function (dom, ul) {
+      var sibling;
+      var parentNode = ul.parentNode;
+      if (parentNode.nodeName === 'LI' && parentNode.firstChild === ul) {
+        sibling = parentNode.previousSibling;
+        if (sibling && sibling.nodeName === 'LI') {
+          sibling.appendChild(ul);
+          if (isEmpty(dom, parentNode)) {
+            DOM$2.remove(parentNode);
+          }
+        } else {
+          DOM$2.setStyle(parentNode, 'listStyleType', 'none');
+        }
+      }
+      if (isListNode(parentNode)) {
+        sibling = parentNode.previousSibling;
+        if (sibling && sibling.nodeName === 'LI') {
+          sibling.appendChild(ul);
+        }
+      }
+    };
+    var normalizeLists = function (dom, element) {
+      global$5.each(global$5.grep(dom.select('ol,ul', element)), function (ul) {
+        normalizeList(dom, ul);
+      });
+    };
+
+    var findNextCaretContainer = function (editor, rng, isForward, root) {
+      var node = rng.startContainer;
+      var offset = rng.startOffset;
+      if (isTextNode(node) && (isForward ? offset < node.data.length : offset > 0)) {
+        return node;
+      }
+      var nonEmptyBlocks = editor.schema.getNonEmptyElements();
+      if (node.nodeType === 1) {
+        node = global$1.getNode(node, offset);
+      }
+      var walker = new global$2(node, root);
+      if (isForward) {
+        if (isBogusBr(editor.dom, node)) {
+          walker.next();
+        }
+      }
+      while (node = walker[isForward ? 'next' : 'prev2']()) {
+        if (node.nodeName === 'LI' && !node.hasChildNodes()) {
+          return node;
+        }
+        if (nonEmptyBlocks[node.nodeName]) {
+          return node;
+        }
+        if (isTextNode(node) && node.data.length > 0) {
+          return node;
+        }
+      }
+    };
+    var hasOnlyOneBlockChild = function (dom, elm) {
+      var childNodes = elm.childNodes;
+      return childNodes.length === 1 && !isListNode(childNodes[0]) && dom.isBlock(childNodes[0]);
+    };
+    var unwrapSingleBlockChild = function (dom, elm) {
+      if (hasOnlyOneBlockChild(dom, elm)) {
+        dom.remove(elm.firstChild, true);
+      }
+    };
+    var moveChildren = function (dom, fromElm, toElm) {
+      var node, targetElm;
+      targetElm = hasOnlyOneBlockChild(dom, toElm) ? toElm.firstChild : toElm;
+      unwrapSingleBlockChild(dom, fromElm);
+      if (!isEmpty(dom, fromElm, true)) {
+        while (node = fromElm.firstChild) {
+          targetElm.appendChild(node);
+        }
+      }
+    };
+    var mergeLiElements = function (dom, fromElm, toElm) {
+      var node, listNode;
+      var ul = fromElm.parentNode;
+      if (!isChildOfBody(dom, fromElm) || !isChildOfBody(dom, toElm)) {
+        return;
+      }
+      if (isListNode(toElm.lastChild)) {
+        listNode = toElm.lastChild;
+      }
+      if (ul === toElm.lastChild) {
+        if (isBr(ul.previousSibling)) {
+          dom.remove(ul.previousSibling);
+        }
+      }
+      node = toElm.lastChild;
+      if (node && isBr(node) && fromElm.hasChildNodes()) {
+        dom.remove(node);
+      }
+      if (isEmpty(dom, toElm, true)) {
+        dom.$(toElm).empty();
+      }
+      moveChildren(dom, fromElm, toElm);
+      if (listNode) {
+        toElm.appendChild(listNode);
+      }
+      var contains = contains$1(Element.fromDom(toElm), Element.fromDom(fromElm));
+      var nestedLists = contains ? dom.getParents(fromElm, isListNode, toElm) : [];
+      dom.remove(fromElm);
+      each(nestedLists, function (list) {
+        if (isEmpty(dom, list) && list !== dom.getRoot()) {
+          dom.remove(list);
+        }
+      });
+    };
+    var mergeIntoEmptyLi = function (editor, fromLi, toLi) {
+      editor.dom.$(toLi).empty();
+      mergeLiElements(editor.dom, fromLi, toLi);
+      editor.selection.setCursorLocation(toLi);
+    };
+    var mergeForward = function (editor, rng, fromLi, toLi) {
+      var dom = editor.dom;
+      if (dom.isEmpty(toLi)) {
+        mergeIntoEmptyLi(editor, fromLi, toLi);
+      } else {
+        var bookmark = createBookmark(rng);
+        mergeLiElements(dom, fromLi, toLi);
+        editor.selection.setRng(resolveBookmark(bookmark));
+      }
+    };
+    var mergeBackward = function (editor, rng, fromLi, toLi) {
+      var bookmark = createBookmark(rng);
+      mergeLiElements(editor.dom, fromLi, toLi);
+      var resolvedBookmark = resolveBookmark(bookmark);
+      editor.selection.setRng(resolvedBookmark);
+    };
+    var backspaceDeleteFromListToListCaret = function (editor, isForward) {
+      var dom = editor.dom, selection = editor.selection;
+      var selectionStartElm = selection.getStart();
+      var root = getClosestListRootElm(editor, selectionStartElm);
+      var li = dom.getParent(selection.getStart(), 'LI', root);
+      if (li) {
+        var ul = li.parentNode;
+        if (ul === editor.getBody() && isEmpty(dom, ul)) {
+          return true;
+        }
+        var rng_1 = normalizeRange(selection.getRng());
+        var otherLi_1 = dom.getParent(findNextCaretContainer(editor, rng_1, isForward, root), 'LI', root);
+        if (otherLi_1 && otherLi_1 !== li) {
+          editor.undoManager.transact(function () {
+            if (isForward) {
+              mergeForward(editor, rng_1, otherLi_1, li);
+            } else {
+              if (isFirstChild(li)) {
+                outdentListSelection(editor);
+              } else {
+                mergeBackward(editor, rng_1, li, otherLi_1);
+              }
+            }
+          });
+          return true;
+        } else if (!otherLi_1) {
+          if (!isForward && rng_1.startOffset === 0 && rng_1.endOffset === 0) {
+            editor.undoManager.transact(function () {
+              flattenListSelection(editor);
+            });
+            return true;
+          }
+        }
+      }
+      return false;
+    };
+    var removeBlock = function (dom, block, root) {
+      var parentBlock = dom.getParent(block.parentNode, dom.isBlock, root);
+      dom.remove(block);
+      if (parentBlock && dom.isEmpty(parentBlock)) {
+        dom.remove(parentBlock);
+      }
+    };
+    var backspaceDeleteIntoListCaret = function (editor, isForward) {
+      var dom = editor.dom;
+      var selectionStartElm = editor.selection.getStart();
+      var root = getClosestListRootElm(editor, selectionStartElm);
+      var block = dom.getParent(selectionStartElm, dom.isBlock, root);
+      if (block && dom.isEmpty(block)) {
+        var rng = normalizeRange(editor.selection.getRng());
+        var otherLi_2 = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);
+        if (otherLi_2) {
+          editor.undoManager.transact(function () {
+            removeBlock(dom, block, root);
+            mergeWithAdjacentLists(dom, otherLi_2.parentNode);
+            editor.selection.select(otherLi_2, true);
+            editor.selection.collapse(isForward);
+          });
+          return true;
+        }
+      }
+      return false;
+    };
+    var backspaceDeleteCaret = function (editor, isForward) {
+      return backspaceDeleteFromListToListCaret(editor, isForward) || backspaceDeleteIntoListCaret(editor, isForward);
+    };
+    var backspaceDeleteRange = function (editor) {
+      var selectionStartElm = editor.selection.getStart();
+      var root = getClosestListRootElm(editor, selectionStartElm);
+      var startListParent = editor.dom.getParent(selectionStartElm, 'LI,DT,DD', root);
+      if (startListParent || getSelectedListItems(editor).length > 0) {
+        editor.undoManager.transact(function () {
+          editor.execCommand('Delete');
+          normalizeLists(editor.dom, editor.getBody());
+        });
+        return true;
+      }
+      return false;
+    };
+    var backspaceDelete = function (editor, isForward) {
+      return editor.selection.isCollapsed() ? backspaceDeleteCaret(editor, isForward) : backspaceDeleteRange(editor);
+    };
+    var setup = function (editor) {
+      editor.on('keydown', function (e) {
+        if (e.keyCode === global$3.BACKSPACE) {
+          if (backspaceDelete(editor, false)) {
+            e.preventDefault();
+          }
+        } else if (e.keyCode === global$3.DELETE) {
+          if (backspaceDelete(editor, true)) {
+            e.preventDefault();
+          }
+        }
+      });
+    };
+
+    var get = function (editor) {
+      return {
+        backspaceDelete: function (isForward) {
+          backspaceDelete(editor, isForward);
+        }
+      };
+    };
+
+    var open = function (editor) {
+      var dom = editor.dom;
+      var currentList = getParentList(editor);
+      if (!isOlNode(currentList)) {
+        return;
+      }
+      editor.windowManager.open({
+        title: 'List Properties',
+        body: {
+          type: 'panel',
+          items: [{
+              type: 'input',
+              name: 'start',
+              label: 'Start list at number',
+              inputMode: 'numeric'
+            }]
+        },
+        initialData: { start: dom.getAttrib(currentList, 'start') || '1' },
+        buttons: [
+          {
+            type: 'cancel',
+            name: 'cancel',
+            text: 'Cancel'
+          },
+          {
+            type: 'submit',
+            name: 'save',
+            text: 'Save',
+            primary: true
+          }
+        ],
+        onSubmit: function (api) {
+          var data = api.getData();
+          editor.undoManager.transact(function () {
+            dom.setAttrib(getParentList(editor), 'start', data.start === '1' ? '' : data.start);
+          });
+          api.close();
+        }
+      });
+    };
+
+    var queryListCommandState = function (editor, listName) {
+      return function () {
+        var parentList = editor.dom.getParent(editor.selection.getStart(), 'UL,OL,DL');
+        return parentList && parentList.nodeName === listName;
+      };
+    };
+    var register = function (editor) {
+      editor.on('BeforeExecCommand', function (e) {
+        var cmd = e.command.toLowerCase();
+        if (cmd === 'indent') {
+          indentListSelection(editor);
+        } else if (cmd === 'outdent') {
+          outdentListSelection(editor);
+        }
+      });
+      editor.addCommand('InsertUnorderedList', function (ui, detail) {
+        toggleList(editor, 'UL', detail);
+      });
+      editor.addCommand('InsertOrderedList', function (ui, detail) {
+        toggleList(editor, 'OL', detail);
+      });
+      editor.addCommand('InsertDefinitionList', function (ui, detail) {
+        toggleList(editor, 'DL', detail);
+      });
+      editor.addCommand('RemoveList', function () {
+        flattenListSelection(editor);
+      });
+      editor.addCommand('mceListProps', function () {
+        open(editor);
+      });
+      editor.addQueryStateHandler('InsertUnorderedList', queryListCommandState(editor, 'UL'));
+      editor.addQueryStateHandler('InsertOrderedList', queryListCommandState(editor, 'OL'));
+      editor.addQueryStateHandler('InsertDefinitionList', queryListCommandState(editor, 'DL'));
+    };
+
+    var hasRtcPlugin = function (editor) {
+      if (/(^|[ ,])rtc([, ]|$)/.test(editor.settings.plugins) && global.get('rtc')) {
+        return true;
+      } else {
+        return false;
+      }
+    };
+
+    var setupTabKey = function (editor) {
+      editor.on('keydown', function (e) {
+        if (e.keyCode !== global$3.TAB || global$3.metaKeyPressed(e)) {
+          return;
+        }
+        editor.undoManager.transact(function () {
+          if (e.shiftKey ? outdentListSelection(editor) : indentListSelection(editor)) {
+            e.preventDefault();
+          }
+        });
+      });
+    };
+    var setup$1 = function (editor) {
+      if (shouldIndentOnTab(editor)) {
+        setupTabKey(editor);
+      }
+      setup(editor);
+    };
+
+    var register$1 = function (editor) {
+      var hasPlugin = function (editor, plugin) {
+        var plugins = editor.settings.plugins ? editor.settings.plugins : '';
+        return global$5.inArray(plugins.split(/[ ,]/), plugin) !== -1;
+      };
+      var exec = function (command) {
+        return function () {
+          return editor.execCommand(command);
+        };
+      };
+      if (!hasPlugin(editor, 'advlist')) {
+        editor.ui.registry.addToggleButton('numlist', {
+          icon: 'ordered-list',
+          active: false,
+          tooltip: 'Numbered list',
+          onAction: exec('InsertOrderedList'),
+          onSetup: function (api) {
+            return listState(editor, 'OL', api.setActive);
+          }
+        });
+        editor.ui.registry.addToggleButton('bullist', {
+          icon: 'unordered-list',
+          active: false,
+          tooltip: 'Bullet list',
+          onAction: exec('InsertUnorderedList'),
+          onSetup: function (api) {
+            return listState(editor, 'UL', api.setActive);
+          }
+        });
+      }
+    };
+
+    var register$2 = function (editor) {
+      var listProperties = {
+        text: 'List properties...',
+        icon: 'ordered-list',
+        onAction: function () {
+          return open(editor);
+        },
+        onSetup: function (api) {
+          return listState(editor, 'OL', function (active) {
+            return api.setDisabled(!active);
+          });
+        }
+      };
+      editor.ui.registry.addMenuItem('listprops', listProperties);
+      editor.ui.registry.addContextMenu('lists', {
+        update: function (node) {
+          var parentList = getParentList(editor, node);
+          return isOlNode(parentList) ? ['listprops'] : [];
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('lists', function (editor) {
+        if (hasRtcPlugin(editor) === false) {
+          setup$1(editor);
+          register(editor);
+        }
+        register$1(editor);
+        register$2(editor);
+        return get(editor);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/lists/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(a){"use strict";var e,n,t,r,o,i,u,f=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=function(){},y=function(e){return function(){return e}},c=function(n){return function(e){return!n(e)}},d=y(!1),l=y(!0),m=function(){return p},p=(e=function(e){return e.isNone()},{fold:function(e,n){return e()},is:d,isSome:d,isNone:l,getOr:t=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:y(null),getOrUndefined:y(undefined),or:t,orThunk:n,map:m,each:s,bind:m,exists:d,forall:l,filter:m,equals:e,equals_:e,toArray:function(){return[]},toString:y("none()")}),g=function(t){var e=y(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:l,isNone:d,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return g(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:p},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(d,function(e){return n(t,e)})}};return o},v={some:g,none:m,from:function(e){return null===e||e===undefined?p:g(e)}},h=function(r){return function(e){return t=typeof(n=e),(null===n?"null":"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t)===r;var n,t}},S=function(n){return function(e){return typeof e===n}},b=h("string"),C=h("array"),O=S("boolean"),N=S("function"),L=S("number"),T=Array.prototype.slice,w=Array.prototype.push,D=function(e,n){for(var t=e.length,r=new Array(t),o=0;o<t;o++){var i=e[o];r[o]=n(i,o)}return r},k=function(e,n){for(var t=0,r=e.length;t<r;t++){n(e[t],t)}},x=function(e,n){for(var t=[],r=0,o=e.length;r<o;r++){var i=e[r];n(i,r)&&t.push(i)}return t},A=function(e,n,t){return k(e,function(e){t=n(t,e)}),t},E=function(e,n,t){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(n(i,r))return v.some(i);if(t(i,r))break}return v.none()},B=function(e,n){return E(e,n,d)},I=function(e,n){return function(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!C(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);w.apply(n,e[t])}return n}(D(e,n))},R=function(e){var n=T.call(e,0);return n.reverse(),n},P=function(e){return 0===e.length?v.none():v.some(e[0])},M=function(e){return 0===e.length?v.none():v.some(e[e.length-1])},U=function(){return(U=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},_=function(e,n){var t=function(e,n){for(var t=0;t<e.length;t++){var r=e[t];if(r.test(n))return r}return undefined}(e,n);if(!t)return{major:0,minor:0};var r=function(e){return Number(n.replace(t,"$"+e))};return $(r(1),r(2))},F=function(){return $(0,0)},$=function(e,n){return{major:e,minor:n}},H={nu:$,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?F():_(e,t)},unknown:F},j="Edge",q="Chrome",K="Opera",V="Firefox",W="Safari",Q=function(e){var n=e.current,t=e.version,r=function(e){return function(){return n===e}};return{current:n,version:t,isEdge:r(j),isChrome:r(q),isIE:r("IE"),isOpera:r(K),isFirefox:r(V),isSafari:r(W)}},X={unknown:function(){return Q({current:undefined,version:H.unknown()})},nu:Q,edge:y(j),chrome:y(q),ie:y("IE"),opera:y(K),firefox:y(V),safari:y(W)},z="Windows",Y="Android",G="Solaris",J="FreeBSD",Z="ChromeOS",ee=function(e){var n=e.current,t=e.version,r=function(e){return function(){return n===e}};return{current:n,version:t,isWindows:r(z),isiOS:r("iOS"),isAndroid:r(Y),isOSX:r("OSX"),isLinux:r("Linux"),isSolaris:r(G),isFreeBSD:r(J),isChromeOS:r(Z)}},ne={unknown:function(){return ee({current:undefined,version:H.unknown()})},nu:ee,windows:y(z),ios:y("iOS"),android:y(Y),linux:y("Linux"),osx:y("OSX"),solaris:y(G),freebsd:y(J),chromeos:y(Z)},te=function(e,n){var t=String(n).toLowerCase();return B(e,function(e){return e.search(t)})},re=function(e,t){return te(e,t).map(function(e){var n=H.detect(e.versionRegexes,t);return{current:e.name,version:n}})},oe=function(e,t){return te(e,t).map(function(e){var n=H.detect(e.versionRegexes,t);return{current:e.name,version:n}})},ie=function(e,n){return-1!==e.indexOf(n)},ue=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ae=function(n){return function(e){return ie(e,n)}},se=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return ie(e,"edge/")&&ie(e,"chrome")&&ie(e,"safari")&&ie(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ue],search:function(e){return ie(e,"chrome")&&!ie(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return ie(e,"msie")||ie(e,"trident")}},{name:"Opera",versionRegexes:[ue,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ae("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ae("firefox")},{name:"Safari",versionRegexes:[ue,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(ie(e,"safari")||ie(e,"mobile/"))&&ie(e,"applewebkit")}}],ce=[{name:"Windows",search:ae("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return ie(e,"iphone")||ie(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ae("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ae("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ae("linux"),versionRegexes:[]},{name:"Solaris",search:ae("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ae("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ae("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],fe={browsers:y(se),oses:y(ce)},de=function(e,n){var t,r,o,i,u,a,s,c,f,d,l,m,p=fe.browsers(),g=fe.oses(),v=re(p,e).fold(X.unknown,X.nu),h=oe(g,e).fold(ne.unknown,ne.nu);return{browser:v,os:h,deviceType:(r=v,o=e,i=n,u=(t=h).isiOS()&&!0===/ipad/i.test(o),a=t.isiOS()&&!u,s=t.isiOS()||t.isAndroid(),c=s||i("(pointer:coarse)"),f=u||!a&&s&&i("(min-device-width:768px)"),d=a||s&&!f,l=r.isSafari()&&t.isiOS()&&!1===/safari/i.test(o),m=!d&&!f&&!l,{isiPad:y(u),isiPhone:y(a),isTablet:y(f),isPhone:y(d),isTouch:y(c),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:y(l),isDesktop:y(m)})}},le=function(e){return a.window.matchMedia(e).matches},me=(i=!(r=function(){return de(a.navigator.userAgent,le)}),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return i||(i=!0,o=r.apply(null,e)),o}),pe=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:y(e)}},ge={fromHtml:function(e,n){var t=(n||a.document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw a.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return pe(t.childNodes[0])},fromTag:function(e,n){var t=(n||a.document).createElement(e);return pe(t)},fromText:function(e,n){var t=(n||a.document).createTextNode(e);return pe(t)},fromDom:pe,fromPoint:function(e,n,t){var r=e.dom();return v.from(r.elementFromPoint(n,t)).map(pe)}},ve=function(e,n){return e.dom()===n.dom()},he=function(e,n){return t=e.dom(),r=n.dom(),o=t,i=r,u=a.Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(o.compareDocumentPosition(i)&u);var t,r,o,i,u},ye=function(e,n){return me().browser.isIE()?he(e,n):(t=n,r=e.dom(),o=t.dom(),r!==o&&r.contains(o));var t,r,o},Se=function(e,n){var t=e.dom();if(1!==t.nodeType)return!1;var r=t;if(r.matches!==undefined)return r.matches(n);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(n);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(n);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},be=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Ce=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),Oe=tinymce.util.Tools.resolve("tinymce.util.VK"),Ne=function(e,n,t){return e.isSome()&&n.isSome()?v.some(t(e.getOrDie(),n.getOrDie())):v.none()},Le=function(e){return v.from(e.dom().parentNode).map(ge.fromDom)},Te=function(e){return D(e.dom().childNodes,ge.fromDom)},we=function(e,n){var t=e.dom().childNodes;return v.from(t[n]).map(ge.fromDom)},De=function(e){return we(e,0)},ke=function(e){return we(e,e.dom().childNodes.length-1)},xe=function(n,t){Le(n).each(function(e){e.dom().insertBefore(t.dom(),n.dom())})},Ae=function(e,n){e.dom().appendChild(n.dom())},Ee=function(n,e){k(e,function(e){Ae(n,e)})},Be=function(e){var n=e.dom();null!==n.parentNode&&n.parentNode.removeChild(n)},Ie=function(e,n,t){return e.fire("ListMutation",{action:n,element:t})},Re=("undefined"!=typeof a.window?a.window:Function("return this;")(),tinymce.util.Tools.resolve("tinymce.dom.DomQuery")),Pe=tinymce.util.Tools.resolve("tinymce.util.Tools"),Me=function(n){return function(e){return e&&e.nodeName.toLowerCase()===n}},Ue=function(n){return function(e){return e&&n.test(e.nodeName)}},_e=function(e){return e&&3===e.nodeType},Fe=Ue(/^(OL|UL|DL)$/),$e=Ue(/^(OL|UL)$/),He=Me("ol"),je=Ue(/^(LI|DT|DD)$/),qe=Ue(/^(DT|DD)$/),Ke=Ue(/^(TH|TD)$/),Ve=Me("br"),We=function(e,n){return n&&!!e.schema.getTextBlockElements()[n.nodeName]},Qe=function(e,n){return e&&e.nodeName in n},Xe=function(e,n,t){var r=e.isEmpty(n);return!(t&&0<e.select("span[data-mce-type=bookmark]",n).length)&&r},ze=function(e,n){return e.isChildOf(n,e.getRoot())},Ye=function(e,n){var t=n||e.selection.getStart(!0);return e.dom.getParent(t,"OL,UL,DL",Ze(e,t))},Ge=function(e){var n,t,r,o=Ye(e),i=e.selection.getSelectedBlocks();return r=i,(t=o)&&1===r.length&&r[0]===t?(n=o,Pe.grep(n.querySelectorAll("ol,ul,dl"),function(e){return Fe(e)})):Pe.grep(i,function(e){return Fe(e)&&o!==e})},Je=function(e){var t,n,r,o=e.selection.getSelectedBlocks();return Pe.grep((t=e,n=o,r=Pe.map(n,function(e){var n=t.dom.getParent(e,"li,dd,dt",Ze(t,e));return n||e}),Re.unique(r)),function(e){return je(e)})},Ze=function(e,n){var t=e.dom.getParents(n,"TD,TH");return 0<t.length?t[0]:e.getBody()},en=function(e,n){var t=e.dom.getParents(n,"ol,ul",Ze(e,n));return M(t)},nn=function(e){var n,t,r,o=(t=en(n=e,n.selection.getStart()),r=x(n.selection.getSelectedBlocks(),$e),t.toArray().concat(r));return tn(e,o)},tn=function(n,e){var t=D(e,function(e){return en(n,e).getOr(e)});return Re.unique(t)},rn=function(e,n){var t,r,o,i,u=e.dom,a=e.schema.getBlockElements(),s=u.createFragment(),c=!1===(t=e.getParam("forced_root_block","p"))?"":!0===t?"p":t;if(c&&((o=u.create(c)).tagName===c.toUpperCase()&&u.setAttribs(o,e.getParam("forced_root_block_attrs",{})),Qe(n.firstChild,a)||s.appendChild(o)),n)for(;r=n.firstChild;){var f=r.nodeName;i||"SPAN"===f&&"bookmark"===r.getAttribute("data-mce-type")||(i=!0),Qe(r,a)?(s.appendChild(r),o=null):c?(o||(o=u.create(c),s.appendChild(o)),o.appendChild(r)):s.appendChild(r)}return c?i||o.appendChild(u.create("br",{"data-mce-bogus":"1"})):s.appendChild(u.create("br")),s},on=Object.keys,un=function(e,n){for(var t=on(e),r=0,o=t.length;r<o;r++){var i=t[r];n(e[i],i)}},an=function(e,n){var t,r,o,i,u={};return t=n,i=u,r=function(e,n){i[n]=e},o=s,un(e,function(e,n){(t(e,n)?r:o)(e,n)}),u},sn=function(e){return e.dom().nodeName.toLowerCase()},cn=(u=1,function(e){return e.dom().nodeType===u}),fn=function(e,n){var t=e.dom();un(n,function(e,n){!function(e,n,t){if(!(b(t)||O(t)||L(t)))throw a.console.error("Invalid call to Attr.set. Key ",n,":: Value ",t,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(n,t+"")}(t,n,e)})},dn=function(e){return A(e.dom().attributes,function(e,n){return e[n.name]=n.value,e},{})},ln=function(e,n,t){if(!b(t))throw a.console.error("Invalid call to CSS.set. Property ",n,":: Value ",t,":: Element ",e),new Error("CSS value must be a string: "+t);var r;(r=e).style!==undefined&&N(r.style.getPropertyValue)&&e.style.setProperty(n,t)},mn=function(e){return n=e,t=!0,ge.fromDom(n.dom().cloneNode(t));var n,t},pn=function(e,n){var t,r,o,i,u=(t=e,r=n,o=ge.fromTag(r),i=dn(t),fn(o,i),o);xe(e,u);var a=Te(e);return Ee(u,a),Be(e),u},gn=function(e,n){Ae(e.item,n.list)},vn=function(f,e,d){var n=e.slice(0,d.depth);return M(n).each(function(e){var n,t,r,o,i,u,a,s,c=(n=f,t=d.itemAttributes,r=d.content,o=ge.fromTag("li",n),fn(o,t),Ee(o,r),o);u=c,Ae((i=e).list,u),i.item=u,s=d,sn((a=e).list)!==s.listType&&(a.list=pn(a.list,s.listType)),fn(a.list,s.listAttributes)}),n},hn=function(e,n,t){var r,o=function(e,n,t){for(var r,o,i,u=[],a=0;a<t;a++)u.push((r=e,o=n.listType,i={list:ge.fromTag(o,r),item:ge.fromTag("li",r)},Ae(i.list,i.item),i));return u}(e,t,t.depth-n.length);return function(e){for(var n=1;n<e.length;n++)gn(e[n-1],e[n])}(o),function(e,n){for(var t=0;t<e.length-1;t++)r=e[t].item,o="list-style-type",i="none",u=r.dom(),ln(u,o,i);var r,o,i,u;M(e).each(function(e){fn(e.list,n.listAttributes),fn(e.item,n.itemAttributes),Ee(e.item,n.content)})}(o,t),r=o,Ne(M(n),P(r),gn),n.concat(o)},yn=function(e){return Se(e,"OL,UL")},Sn=function(e){return De(e).map(yn).getOr(!1)},bn=function(e){return 0<e.depth},Cn=function(e){return e.isSelected},On=function(e){var n=Te(e),t=ke(e).map(yn).getOr(!1)?n.slice(0,-1):n;return D(t,mn)},Nn=function(a){return k(a,function(r,e){var n,t,o,i,u;o=(n=a)[t=e].depth,i=function(e){return e.depth===o&&!e.dirty},u=function(e){return e.depth<o},E(R(n.slice(0,t)),i,u).orThunk(function(){return E(n.slice(t+1),i,u)}).fold(function(){var e;r.dirty&&((e=r).listAttributes=an(e.listAttributes,function(e,n){return"start"!==n}))},function(e){return t=e,(n=r).listType=t.listType,void(n.listAttributes=U({},t.listAttributes));var n,t})}),a},Ln=function(i,u,a,s){return De(s).filter(yn).fold(function(){u.each(function(e){ve(e.start,s)&&a.set(!0)});var n,t,r,e=(n=s,t=i,r=a.get(),Le(n).filter(cn).map(function(e){return{depth:t,dirty:!1,isSelected:r,content:On(n),itemAttributes:dn(n),listAttributes:dn(e),listType:sn(e)}}));u.each(function(e){ve(e.end,s)&&a.set(!1)});var o=ke(s).filter(yn).map(function(e){return Tn(i,u,a,e)}).getOr([]);return e.toArray().concat(o)},function(e){return Tn(i,u,a,e)})},Tn=function(n,t,r,e){return I(Te(e),function(e){return(yn(e)?Tn:Ln)(n+1,t,r,e)})},wn=function(e,n){var t,r=(t=!1,{get:function(){return t},set:function(e){t=e}});return D(e,function(e){return{sourceList:e,entries:Tn(0,n,r,e)}})},Dn=function(i,e){var n=Nn(e);return D(n,function(e){var n,t,r,o=(n=e.content,r=(t||a.document).createDocumentFragment(),k(n,function(e){r.appendChild(e.dom())}),ge.fromDom(r));return ge.fromDom(rn(i,o.dom()))})},kn=function(e,n){var t,r,o=Nn(n);return t=e.contentDocument,r=A(o,function(e,n){return(n.depth>e.length?hn:vn)(t,e,n)},[]),P(r).map(function(e){return e.list}).toArray()},xn=function(a,e,s){var n,t=wn(e,(n=D(Je(a),ge.fromDom),Ne(B(n,c(Sn)),B(R(n),c(Sn)),function(e,n){return{start:e,end:n}})));k(t,function(e){var n,t;n=e.entries,t=s,k(x(n,Cn),function(e){return function(e,n){switch(e){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}n.dirty=!0}(t,e)});var r,o,i,u=(r=a,o=e.entries,I(function(e,n){if(0===e.length)return[];for(var t=n(e[0]),r=[],o=[],i=0,u=e.length;i<u;i++){var a=e[i],s=n(a);s!==t&&(r.push(o),o=[]),t=s,o.push(a)}return 0!==o.length&&r.push(o),r}(o,bn),function(e){return(P(e).map(bn).getOr(!1)?kn:Dn)(r,e)}));k(u,function(e){Ie(a,"Indent"===s?"IndentList":"OutdentList",e.dom())}),i=e.sourceList,k(u,function(e){xe(i,e)}),Be(e.sourceList)})},An=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),En=An.DOM,Bn=function(n,t){Se(t,"dd")?pn(t,"dt"):Se(t,"dt")&&Le(t).each(function(e){return function(e,n,t){var r,o,i,u,a,s;for(i=En.select('span[data-mce-type="bookmark"]',n),a=rn(e,t),(r=En.createRng()).setStartAfter(t),r.setEndAfter(n),u=(o=r.extractContents()).firstChild;u;u=u.firstChild)if("LI"===u.nodeName&&e.dom.isEmpty(u)){En.remove(u);break}e.dom.isEmpty(o)||En.insertAfter(o,n),En.insertAfter(a,n),Xe(e.dom,t.parentNode)&&(s=t.parentNode,Pe.each(i,function(e){s.parentNode.insertBefore(e,t.parentNode)}),En.remove(s)),En.remove(t),Xe(e.dom,n)&&En.remove(n)}(n,e.dom(),t.dom())})},In=function(e){Se(e,"dt")&&pn(e,"dd")},Rn=function(e,n){if(_e(e))return{container:e,offset:n};var t=be.getNode(e,n);return _e(t)?{container:t,offset:n>=e.childNodes.length?t.data.length:0}:t.previousSibling&&_e(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&_e(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}},Pn=function(e){var n=e.cloneRange(),t=Rn(e.startContainer,e.startOffset);n.setStart(t.container,t.offset);var r=Rn(e.endContainer,e.endOffset);return n.setEnd(r.container,r.offset),n},Mn=function(e,n){var t,r=D(nn(e),ge.fromDom),o=D(x(Je(e),qe),ge.fromDom),i=!1;if(r.length||o.length){var u=e.selection.getBookmark();xn(e,r,n),t=e,k(o,"Indent"===n?In:function(e){return Bn(t,e)}),e.selection.moveToBookmark(u),e.selection.setRng(Pn(e.selection.getRng())),e.nodeChanged(),i=!0}return i},Un=function(e){return Mn(e,"Indent")},_n=function(e){return Mn(e,"Outdent")},Fn=function(e){return Mn(e,"Flatten")},$n=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),Hn=An.DOM,jn=function(o){var i={},e=function(e){var n,t,r;t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===t.nodeType&&(n=Hn.create("span",{"data-mce-type":"bookmark"}),t.hasChildNodes()?(r=Math.min(r,t.childNodes.length-1),e?t.insertBefore(n,t.childNodes[r]):Hn.insertAfter(n,t.childNodes[r])):t.appendChild(n),t=n,r=0),i[e?"startContainer":"endContainer"]=t,i[e?"startOffset":"endOffset"]=r};return e(!0),o.collapsed||e(),i},qn=function(o){function e(e){var n,t,r;n=r=o[e?"startContainer":"endContainer"],t=o[e?"startOffset":"endOffset"],n&&(1===n.nodeType&&(t=function(e){for(var n=e.parentNode.firstChild,t=0;n;){if(n===e)return t;1===n.nodeType&&"bookmark"===n.getAttribute("data-mce-type")||t++,n=n.nextSibling}return-1}(n),n=n.parentNode,Hn.remove(r),!n.hasChildNodes()&&Hn.isBlock(n)&&n.appendChild(Hn.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=t)}e(!0),e();var n=Hn.createRng();return n.setStart(o.startContainer,o.startOffset),o.endContainer&&n.setEnd(o.endContainer,o.endOffset),Pn(n)},Kn=function(e){return/\btox\-/.test(e.className)},Vn=function(n,t,r){return function(){var e=function(e){var n=E(e.parents,Fe,Ke).filter(function(e){return e.nodeName===t&&!Kn(e)}).isSome();r(n)};return n.on("NodeChange",e),function(){return n.off("NodeChange",e)}}},Wn=function(e){switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},Qn=function(t,e){Pe.each(e,function(e,n){t.setAttribute(n,e)})},Xn=function(e,n,t){var r,o,i,u,a,s,c;r=e,o=n,u=(i=t)["list-style-type"]?i["list-style-type"]:null,r.setStyle(o,"list-style-type",u),a=e,Qn(s=n,(c=t)["list-attributes"]),Pe.each(a.select("li",s),function(e){Qn(e,c["list-item-attributes"])})},zn=function(e,n,t,r){var o,i;for(o=n[t?"startContainer":"endContainer"],i=n[t?"startOffset":"endOffset"],1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!t&&Ve(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(We(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o},Yn=function(f,d,l){void 0===l&&(l={});var e,n=f.selection.getRng(!0),m="LI",t=Ze(f,f.selection.getStart(!0)),p=f.dom;"false"!==p.getContentEditable(f.selection.getNode())&&("DL"===(d=d.toUpperCase())&&(m="DT"),e=jn(n),Pe.each(function(t,e,r){for(var o,i=[],u=t.dom,n=zn(t,e,!0,r),a=zn(t,e,!1,r),s=[],c=n;c&&(s.push(c),c!==a);c=c.nextSibling);return Pe.each(s,function(e){if(We(t,e))return i.push(e),void(o=null);if(u.isBlock(e)||Ve(e))return Ve(e)&&u.remove(e),void(o=null);var n=e.nextSibling;$n.isBookmarkNode(e)&&(We(t,n)||!n&&e.parentNode===r)?o=null:(o||(o=u.create("p"),e.parentNode.insertBefore(o,e),i.push(o)),o.appendChild(e))}),i}(f,n,t),function(e){var n,t,r,o,i,u,a,s,c;(t=e.previousSibling)&&Fe(t)&&t.nodeName===d&&(r=t,o=l,i=p.getStyle(r,"list-style-type"),u=o?o["list-style-type"]:"",i===(u=null===u?"":u))?(n=t,e=p.rename(e,m),t.appendChild(e)):(n=p.create(d),e.parentNode.insertBefore(n,e),n.appendChild(e),e=p.rename(e,m)),a=p,s=e,c=["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],Pe.each(c,function(e){var n;return a.setStyle(s,((n={})[e]="",n))}),Xn(p,n,l),Jn(f.dom,n)}),f.selection.setRng(qn(e)))},Gn=function(e,n,t){return s=t,(a=n)&&s&&Fe(a)&&a.nodeName===s.nodeName&&(i=n,u=t,(o=e).getStyle(i,"list-style-type",!0)===o.getStyle(u,"list-style-type",!0))&&(r=t,n.className===r.className);var r,o,i,u,a,s},Jn=function(e,n){var t,r;if(t=n.nextSibling,Gn(e,n,t)){for(;r=t.firstChild;)n.appendChild(r);e.remove(t)}if(t=n.previousSibling,Gn(e,n,t)){for(;r=t.lastChild;)n.insertBefore(r,n.firstChild);e.remove(t)}},Zn=function(n,e,t,r,o){if(e.nodeName!==r||et(o)){var i=jn(n.selection.getRng(!0));Pe.each([e].concat(t),function(e){!function(e,n,t,r){if(n.nodeName!==t){var o=e.dom.rename(n,t);Xn(e.dom,o,r),Ie(e,Wn(t),o)}else Xn(e.dom,n,r),Ie(e,Wn(t),n)}(n,e,r,o)}),n.selection.setRng(qn(i))}else Fn(n)},et=function(e){return"list-style-type"in e},nt=function(e,n,t){var r=Ye(e),o=Ge(e);t=t||{},r&&0<o.length?Zn(e,r,o,n,t):function(e,n,t,r){if(n!==e.getBody())if(n)if(n.nodeName!==t||et(r)||Kn(n)){var o=jn(e.selection.getRng(!0));Xn(e.dom,n,r);var i=e.dom.rename(n,t);Jn(e.dom,i),e.selection.setRng(qn(o)),Ie(e,Wn(t),i)}else Fn(e);else Yn(e,t,r),Ie(e,Wn(t),n)}(e,r,n,t)},tt=An.DOM,rt=function(i,e){Pe.each(Pe.grep(i.select("ol,ul",e)),function(e){var n,t,r,o;n=i,"LI"===(o=(t=e).parentNode).nodeName&&o.firstChild===t&&((r=o.previousSibling)&&"LI"===r.nodeName?(r.appendChild(t),Xe(n,o)&&tt.remove(o)):tt.setStyle(o,"listStyleType","none")),Fe(o)&&(r=o.previousSibling)&&"LI"===r.nodeName&&r.appendChild(t)})},ot=function(e,n,t,r){var o=n.startContainer,i=n.startOffset;if(_e(o)&&(t?i<o.data.length:0<i))return o;var u=e.schema.getNonEmptyElements();1===o.nodeType&&(o=be.getNode(o,i));var a,s,c=new Ce(o,r);for(t&&(a=e.dom,Ve(s=o)&&a.isBlock(s.nextSibling)&&!Ve(s.previousSibling)&&c.next());o=c[t?"next":"prev2"]();){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(u[o.nodeName])return o;if(_e(o)&&0<o.data.length)return o}},it=function(e,n){var t=n.childNodes;return 1===t.length&&!Fe(t[0])&&e.isBlock(t[0])},ut=function(e,n,t){var r,o,i,u;if(o=it(e,t)?t.firstChild:t,it(i=e,u=n)&&i.remove(u.firstChild,!0),!Xe(e,n,!0))for(;r=n.firstChild;)o.appendChild(r)},at=function(n,e,t){var r,o,i=e.parentNode;if(ze(n,e)&&ze(n,t)){Fe(t.lastChild)&&(o=t.lastChild),i===t.lastChild&&Ve(i.previousSibling)&&n.remove(i.previousSibling),(r=t.lastChild)&&Ve(r)&&e.hasChildNodes()&&n.remove(r),Xe(n,t,!0)&&n.$(t).empty(),ut(n,e,t),o&&t.appendChild(o);var u=ye(ge.fromDom(t),ge.fromDom(e))?n.getParents(e,Fe,t):[];n.remove(e),k(u,function(e){Xe(n,e)&&e!==n.getRoot()&&n.remove(e)})}},st=function(e,n,t,r){var o,i,u,a=e.dom;if(a.isEmpty(r))i=t,u=r,(o=e).dom.$(u).empty(),at(o.dom,i,u),o.selection.setCursorLocation(u);else{var s=jn(n);at(a,t,r),e.selection.setRng(qn(s))}},ct=function(n,t){var e=n.dom,r=n.selection,o=r.getStart(),i=Ze(n,o),u=e.getParent(r.getStart(),"LI",i);if(u){var a=u.parentNode;if(a===n.getBody()&&Xe(e,a))return!0;var s=Pn(r.getRng()),c=e.getParent(ot(n,s,t,i),"LI",i);if(c&&c!==u)return n.undoManager.transact(function(){var e;t?st(n,s,c,u):(e=u).parentNode.firstChild===e?_n(n):function(e,n,t,r){var o=jn(n);at(e.dom,t,r);var i=qn(o);e.selection.setRng(i)}(n,s,u,c)}),!0;if(!c&&!t&&0===s.startOffset&&0===s.endOffset)return n.undoManager.transact(function(){Fn(n)}),!0}return!1},ft=function(o,i){var u=o.dom,e=o.selection.getStart(),a=Ze(o,e),s=u.getParent(e,u.isBlock,a);if(s&&u.isEmpty(s)){var n=Pn(o.selection.getRng()),c=u.getParent(ot(o,n,i,a),"LI",a);if(c)return o.undoManager.transact(function(){var e,n,t,r;n=s,t=a,r=(e=u).getParent(n.parentNode,e.isBlock,t),e.remove(n),r&&e.isEmpty(r)&&e.remove(r),Jn(u,c.parentNode),o.selection.select(c,!0),o.selection.collapse(i)}),!0}return!1},dt=function(e,n){return e.selection.isCollapsed()?ct(i=e,u=n)||ft(i,u):(r=(t=e).selection.getStart(),o=Ze(t,r),!!(t.dom.getParent(r,"LI,DT,DD",o)||0<Je(t).length)&&(t.undoManager.transact(function(){t.execCommand("Delete"),rt(t.dom,t.getBody())}),!0));var t,r,o,i,u},lt=function(t){var r=t.dom,e=Ye(t);He(e)&&t.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:r.getAttrib(e,"start")||"1"},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var n=e.getData();t.undoManager.transact(function(){r.setAttrib(Ye(t),"start","1"===n.start?"":n.start)}),e.close()}})},mt=function(n,t){return function(){var e=n.dom.getParent(n.selection.getStart(),"UL,OL,DL");return e&&e.nodeName===t}},pt=function(e){var n,t;e.getParam("lists_indent_on_tab",!0)&&(n=e).on("keydown",function(e){e.keyCode!==Oe.TAB||Oe.metaKeyPressed(e)||n.undoManager.transact(function(){(e.shiftKey?_n:Un)(n)&&e.preventDefault()})}),(t=e).on("keydown",function(e){e.keyCode===Oe.BACKSPACE?dt(t,!1)&&e.preventDefault():e.keyCode===Oe.DELETE&&dt(t,!0)&&e.preventDefault()})};!function gt(){f.add("lists",function(e){var t,n,r,o,i,u,a,s,c;return!1==!(!/(^|[ ,])rtc([, ]|$)/.test(e.settings.plugins)||!f.get("rtc"))&&(pt(e),(t=e).on("BeforeExecCommand",function(e){var n=e.command.toLowerCase();"indent"===n?Un(t):"outdent"===n&&_n(t)}),t.addCommand("InsertUnorderedList",function(e,n){nt(t,"UL",n)}),t.addCommand("InsertOrderedList",function(e,n){nt(t,"OL",n)}),t.addCommand("InsertDefinitionList",function(e,n){nt(t,"DL",n)}),t.addCommand("RemoveList",function(){Fn(t)}),t.addCommand("mceListProps",function(){lt(t)}),t.addQueryStateHandler("InsertUnorderedList",mt(t,"UL")),t.addQueryStateHandler("InsertOrderedList",mt(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",mt(t,"DL"))),u=function(e){return function(){return n.execCommand(e)}},o="advlist",i=(r=n=e).settings.plugins?r.settings.plugins:"",-1===Pe.inArray(i.split(/[ ,]/),o)&&(n.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:u("InsertOrderedList"),onSetup:function(e){return Vn(n,"OL",e.setActive)}}),n.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:u("InsertUnorderedList"),onSetup:function(e){return Vn(n,"UL",e.setActive)}})),s={text:"List properties...",icon:"ordered-list",onAction:function(){return lt(a)},onSetup:function(n){return Vn(a,"OL",function(e){return n.setDisabled(!e)})}},(a=e).ui.registry.addMenuItem("listprops",s),a.ui.registry.addContextMenu("lists",{update:function(e){var n=Ye(a,e);return He(n)?["listprops"]:[]}}),c=e,{backspaceDelete:function(e){dt(c,e)}}})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/media/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "media" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/media')
+//   ES2015:
+//     import 'tinymce/plugins/media'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/media/plugin.js
@@ -1,1 +1,1322 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var typeOf = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf(value) === type;
+      };
+    };
+    var isString = isType('string');
+    var isObject = isType('object');
+    var isArray = isType('array');
+
+    var nativePush = Array.prototype.push;
+    var each = function (xs, f) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var flatten = function (xs) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        if (!isArray(xs[i])) {
+          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
+        }
+        nativePush.apply(r, xs[i]);
+      }
+      return r;
+    };
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var keys = Object.keys;
+    var hasOwnProperty = Object.hasOwnProperty;
+    var each$1 = function (obj, f) {
+      var props = keys(obj);
+      for (var k = 0, len = props.length; k < len; k++) {
+        var i = props[k];
+        var x = obj[i];
+        f(x, i);
+      }
+    };
+    var get = function (obj, key) {
+      return has(obj, key) ? Option.from(obj[key]) : Option.none();
+    };
+    var has = function (obj, key) {
+      return hasOwnProperty.call(obj, key);
+    };
+
+    var getScripts = function (editor) {
+      return editor.getParam('media_scripts');
+    };
+    var getAudioTemplateCallback = function (editor) {
+      return editor.getParam('audio_template_callback');
+    };
+    var getVideoTemplateCallback = function (editor) {
+      return editor.getParam('video_template_callback');
+    };
+    var hasLiveEmbeds = function (editor) {
+      return editor.getParam('media_live_embeds', true);
+    };
+    var shouldFilterHtml = function (editor) {
+      return editor.getParam('media_filter_html', true);
+    };
+    var getUrlResolver = function (editor) {
+      return editor.getParam('media_url_resolver');
+    };
+    var hasAltSource = function (editor) {
+      return editor.getParam('media_alt_source', true);
+    };
+    var hasPoster = function (editor) {
+      return editor.getParam('media_poster', true);
+    };
+    var hasDimensions = function (editor) {
+      return editor.getParam('media_dimensions', true);
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.html.SaxParser');
+
+    var getVideoScriptMatch = function (prefixes, src) {
+      if (prefixes) {
+        for (var i = 0; i < prefixes.length; i++) {
+          if (src.indexOf(prefixes[i].filter) !== -1) {
+            return prefixes[i];
+          }
+        }
+      }
+    };
+
+    var DOM = global$2.DOM;
+    var trimPx = function (value) {
+      return value.replace(/px$/, '');
+    };
+    var getEphoxEmbedData = function (attrs) {
+      var style = attrs.map.style;
+      var styles = style ? DOM.parseStyle(style) : {};
+      return {
+        type: 'ephox-embed-iri',
+        source: attrs.map['data-ephox-embed-iri'],
+        altsource: '',
+        poster: '',
+        width: get(styles, 'max-width').map(trimPx).getOr(''),
+        height: get(styles, 'max-height').map(trimPx).getOr('')
+      };
+    };
+    var htmlToData = function (prefixes, html) {
+      var isEphoxEmbed = Cell(false);
+      var data = {};
+      global$3({
+        validate: false,
+        allow_conditional_comments: true,
+        start: function (name, attrs) {
+          if (isEphoxEmbed.get()) ; else if (has(attrs.map, 'data-ephox-embed-iri')) {
+            isEphoxEmbed.set(true);
+            data = getEphoxEmbedData(attrs);
+          } else {
+            if (!data.source && name === 'param') {
+              data.source = attrs.map.movie;
+            }
+            if (name === 'iframe' || name === 'object' || name === 'embed' || name === 'video' || name === 'audio') {
+              if (!data.type) {
+                data.type = name;
+              }
+              data = global$1.extend(attrs.map, data);
+            }
+            if (name === 'script') {
+              var videoScript = getVideoScriptMatch(prefixes, attrs.map.src);
+              if (!videoScript) {
+                return;
+              }
+              data = {
+                type: 'script',
+                source: attrs.map.src,
+                width: String(videoScript.width),
+                height: String(videoScript.height)
+              };
+            }
+            if (name === 'source') {
+              if (!data.source) {
+                data.source = attrs.map.src;
+              } else if (!data.altsource) {
+                data.altsource = attrs.map.src;
+              }
+            }
+            if (name === 'img' && !data.poster) {
+              data.poster = attrs.map.src;
+            }
+          }
+        }
+      }).parse(html);
+      data.source = data.source || data.src || data.data;
+      data.altsource = data.altsource || '';
+      data.poster = data.poster || '';
+      return data;
+    };
+
+    var guess = function (url) {
+      var mimes = {
+        mp3: 'audio/mpeg',
+        m4a: 'audio/x-m4a',
+        wav: 'audio/wav',
+        mp4: 'video/mp4',
+        webm: 'video/webm',
+        ogg: 'video/ogg',
+        swf: 'application/x-shockwave-flash'
+      };
+      var fileEnd = url.toLowerCase().split('.').pop();
+      var mime = mimes[fileEnd];
+      return mime ? mime : '';
+    };
+
+    var global$4 = tinymce.util.Tools.resolve('tinymce.html.Schema');
+
+    var global$5 = tinymce.util.Tools.resolve('tinymce.html.Writer');
+
+    var DOM$1 = global$2.DOM;
+    var addPx = function (value) {
+      return /^[0-9.]+$/.test(value) ? value + 'px' : value;
+    };
+    var setAttributes = function (attrs, updatedAttrs) {
+      each$1(updatedAttrs, function (val, name) {
+        var value = '' + val;
+        if (attrs.map[name]) {
+          var i = attrs.length;
+          while (i--) {
+            var attr = attrs[i];
+            if (attr.name === name) {
+              if (value) {
+                attrs.map[name] = value;
+                attr.value = value;
+              } else {
+                delete attrs.map[name];
+                attrs.splice(i, 1);
+              }
+            }
+          }
+        } else if (value) {
+          attrs.push({
+            name: name,
+            value: value
+          });
+          attrs.map[name] = value;
+        }
+      });
+    };
+    var updateEphoxEmbed = function (data, attrs) {
+      var style = attrs.map.style;
+      var styleMap = style ? DOM$1.parseStyle(style) : {};
+      styleMap['max-width'] = addPx(data.width);
+      styleMap['max-height'] = addPx(data.height);
+      setAttributes(attrs, { style: DOM$1.serializeStyle(styleMap) });
+    };
+    var sources = [
+      'source',
+      'altsource'
+    ];
+    var updateHtml = function (html, data, updateAll) {
+      var writer = global$5();
+      var isEphoxEmbed = Cell(false);
+      var sourceCount = 0;
+      var hasImage;
+      global$3({
+        validate: false,
+        allow_conditional_comments: true,
+        comment: function (text) {
+          writer.comment(text);
+        },
+        cdata: function (text) {
+          writer.cdata(text);
+        },
+        text: function (text, raw) {
+          writer.text(text, raw);
+        },
+        start: function (name, attrs, empty) {
+          if (isEphoxEmbed.get()) ; else if (has(attrs.map, 'data-ephox-embed-iri')) {
+            isEphoxEmbed.set(true);
+            updateEphoxEmbed(data, attrs);
+          } else {
+            switch (name) {
+            case 'video':
+            case 'object':
+            case 'embed':
+            case 'img':
+            case 'iframe':
+              if (data.height !== undefined && data.width !== undefined) {
+                setAttributes(attrs, {
+                  width: data.width,
+                  height: data.height
+                });
+              }
+              break;
+            }
+            if (updateAll) {
+              switch (name) {
+              case 'video':
+                setAttributes(attrs, {
+                  poster: data.poster,
+                  src: ''
+                });
+                if (data.altsource) {
+                  setAttributes(attrs, { src: '' });
+                }
+                break;
+              case 'iframe':
+                setAttributes(attrs, { src: data.source });
+                break;
+              case 'source':
+                if (sourceCount < 2) {
+                  setAttributes(attrs, {
+                    src: data[sources[sourceCount]],
+                    type: data[sources[sourceCount] + 'mime']
+                  });
+                  if (!data[sources[sourceCount]]) {
+                    return;
+                  }
+                }
+                sourceCount++;
+                break;
+              case 'img':
+                if (!data.poster) {
+                  return;
+                }
+                hasImage = true;
+                break;
+              }
+            }
+          }
+          writer.start(name, attrs, empty);
+        },
+        end: function (name) {
+          if (!isEphoxEmbed.get()) {
+            if (name === 'video' && updateAll) {
+              for (var index = 0; index < 2; index++) {
+                if (data[sources[index]]) {
+                  var attrs = [];
+                  attrs.map = {};
+                  if (sourceCount < index) {
+                    setAttributes(attrs, {
+                      src: data[sources[index]],
+                      type: data[sources[index] + 'mime']
+                    });
+                    writer.start('source', attrs, true);
+                  }
+                }
+              }
+            }
+            if (data.poster && name === 'object' && updateAll && !hasImage) {
+              var imgAttrs = [];
+              imgAttrs.map = {};
+              setAttributes(imgAttrs, {
+                src: data.poster,
+                width: data.width,
+                height: data.height
+              });
+              writer.start('img', imgAttrs, true);
+            }
+          }
+          writer.end(name);
+        }
+      }, global$4({})).parse(html);
+      return writer.getContent();
+    };
+
+    var urlPatterns = [
+      {
+        regex: /youtu\.be\/([\w\-_\?&=.]+)/i,
+        type: 'iframe',
+        w: 560,
+        h: 314,
+        url: 'www.youtube.com/embed/$1',
+        allowFullscreen: true
+      },
+      {
+        regex: /youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,
+        type: 'iframe',
+        w: 560,
+        h: 314,
+        url: 'www.youtube.com/embed/$2?$4',
+        allowFullscreen: true
+      },
+      {
+        regex: /youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,
+        type: 'iframe',
+        w: 560,
+        h: 314,
+        url: 'www.youtube.com/embed/$1',
+        allowFullscreen: true
+      },
+      {
+        regex: /vimeo\.com\/([0-9]+)/,
+        type: 'iframe',
+        w: 425,
+        h: 350,
+        url: 'player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc',
+        allowFullscreen: true
+      },
+      {
+        regex: /vimeo\.com\/(.*)\/([0-9]+)/,
+        type: 'iframe',
+        w: 425,
+        h: 350,
+        url: 'player.vimeo.com/video/$2?title=0&amp;byline=0',
+        allowFullscreen: true
+      },
+      {
+        regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,
+        type: 'iframe',
+        w: 425,
+        h: 350,
+        url: 'maps.google.com/maps/ms?msid=$2&output=embed"',
+        allowFullscreen: false
+      },
+      {
+        regex: /dailymotion\.com\/video\/([^_]+)/,
+        type: 'iframe',
+        w: 480,
+        h: 270,
+        url: 'www.dailymotion.com/embed/video/$1',
+        allowFullscreen: true
+      },
+      {
+        regex: /dai\.ly\/([^_]+)/,
+        type: 'iframe',
+        w: 480,
+        h: 270,
+        url: 'www.dailymotion.com/embed/video/$1',
+        allowFullscreen: true
+      }
+    ];
+    var getProtocol = function (url) {
+      var protocolMatches = url.match(/^(https?:\/\/|www\.)(.+)$/i);
+      if (protocolMatches && protocolMatches.length > 1) {
+        return protocolMatches[1] === 'www.' ? 'https://' : protocolMatches[1];
+      } else {
+        return 'https://';
+      }
+    };
+    var getUrl = function (pattern, url) {
+      var protocol = getProtocol(url);
+      var match = pattern.regex.exec(url);
+      var newUrl = protocol + pattern.url;
+      var _loop_1 = function (i) {
+        newUrl = newUrl.replace('$' + i, function () {
+          return match[i] ? match[i] : '';
+        });
+      };
+      for (var i = 0; i < match.length; i++) {
+        _loop_1(i);
+      }
+      return newUrl.replace(/\?$/, '');
+    };
+    var matchPattern = function (url) {
+      var patterns = urlPatterns.filter(function (pattern) {
+        return pattern.regex.test(url);
+      });
+      if (patterns.length > 0) {
+        return global$1.extend({}, patterns[0], { url: getUrl(patterns[0], url) });
+      } else {
+        return null;
+      }
+    };
+
+    var getIframeHtml = function (data) {
+      var allowFullscreen = data.allowFullscreen ? ' allowFullscreen="1"' : '';
+      return '<iframe src="' + data.source + '" width="' + data.width + '" height="' + data.height + '"' + allowFullscreen + '></iframe>';
+    };
+    var getFlashHtml = function (data) {
+      var html = '<object data="' + data.source + '" width="' + data.width + '" height="' + data.height + '" type="application/x-shockwave-flash">';
+      if (data.poster) {
+        html += '<img src="' + data.poster + '" width="' + data.width + '" height="' + data.height + '" />';
+      }
+      html += '</object>';
+      return html;
+    };
+    var getAudioHtml = function (data, audioTemplateCallback) {
+      if (audioTemplateCallback) {
+        return audioTemplateCallback(data);
+      } else {
+        return '<audio controls="controls" src="' + data.source + '">' + (data.altsource ? '\n<source src="' + data.altsource + '"' + (data.altsourcemime ? ' type="' + data.altsourcemime + '"' : '') + ' />\n' : '') + '</audio>';
+      }
+    };
+    var getVideoHtml = function (data, videoTemplateCallback) {
+      if (videoTemplateCallback) {
+        return videoTemplateCallback(data);
+      } else {
+        return '<video width="' + data.width + '" height="' + data.height + '"' + (data.poster ? ' poster="' + data.poster + '"' : '') + ' controls="controls">\n' + '<source src="' + data.source + '"' + (data.sourcemime ? ' type="' + data.sourcemime + '"' : '') + ' />\n' + (data.altsource ? '<source src="' + data.altsource + '"' + (data.altsourcemime ? ' type="' + data.altsourcemime + '"' : '') + ' />\n' : '') + '</video>';
+      }
+    };
+    var getScriptHtml = function (data) {
+      return '<script src="' + data.source + '"></script>';
+    };
+    var dataToHtml = function (editor, dataIn) {
+      var data = global$1.extend({}, dataIn);
+      if (!data.source) {
+        global$1.extend(data, htmlToData(getScripts(editor), data.embed));
+        if (!data.source) {
+          return '';
+        }
+      }
+      if (!data.altsource) {
+        data.altsource = '';
+      }
+      if (!data.poster) {
+        data.poster = '';
+      }
+      data.source = editor.convertURL(data.source, 'source');
+      data.altsource = editor.convertURL(data.altsource, 'source');
+      data.sourcemime = guess(data.source);
+      data.altsourcemime = guess(data.altsource);
+      data.poster = editor.convertURL(data.poster, 'poster');
+      var pattern = matchPattern(data.source);
+      if (pattern) {
+        data.source = pattern.url;
+        data.type = pattern.type;
+        data.allowFullscreen = pattern.allowFullscreen;
+        data.width = data.width || String(pattern.w);
+        data.height = data.height || String(pattern.h);
+      }
+      if (data.embed) {
+        return updateHtml(data.embed, data, true);
+      } else {
+        var videoScript = getVideoScriptMatch(getScripts(editor), data.source);
+        if (videoScript) {
+          data.type = 'script';
+          data.width = String(videoScript.width);
+          data.height = String(videoScript.height);
+        }
+        var audioTemplateCallback = getAudioTemplateCallback(editor);
+        var videoTemplateCallback = getVideoTemplateCallback(editor);
+        data.width = data.width || '300';
+        data.height = data.height || '150';
+        global$1.each(data, function (value, key) {
+          data[key] = editor.dom.encode('' + value);
+        });
+        if (data.type === 'iframe') {
+          return getIframeHtml(data);
+        } else if (data.sourcemime === 'application/x-shockwave-flash') {
+          return getFlashHtml(data);
+        } else if (data.sourcemime.indexOf('audio') !== -1) {
+          return getAudioHtml(data, audioTemplateCallback);
+        } else if (data.type === 'script') {
+          return getScriptHtml(data);
+        } else {
+          return getVideoHtml(data, videoTemplateCallback);
+        }
+      }
+    };
+
+    var global$6 = tinymce.util.Tools.resolve('tinymce.util.Promise');
+
+    var cache = {};
+    var embedPromise = function (data, dataToHtml, handler) {
+      return new global$6(function (res, rej) {
+        var wrappedResolve = function (response) {
+          if (response.html) {
+            cache[data.source] = response;
+          }
+          return res({
+            url: data.source,
+            html: response.html ? response.html : dataToHtml(data)
+          });
+        };
+        if (cache[data.source]) {
+          wrappedResolve(cache[data.source]);
+        } else {
+          handler({ url: data.source }, wrappedResolve, rej);
+        }
+      });
+    };
+    var defaultPromise = function (data, dataToHtml) {
+      return new global$6(function (res) {
+        res({
+          html: dataToHtml(data),
+          url: data.source
+        });
+      });
+    };
+    var loadedData = function (editor) {
+      return function (data) {
+        return dataToHtml(editor, data);
+      };
+    };
+    var getEmbedHtml = function (editor, data) {
+      var embedHandler = getUrlResolver(editor);
+      return embedHandler ? embedPromise(data, loadedData(editor), embedHandler) : defaultPromise(data, loadedData(editor));
+    };
+    var isCached = function (url) {
+      return cache.hasOwnProperty(url);
+    };
+
+    var extractMeta = function (sourceInput, data) {
+      return get(data, sourceInput).bind(function (mainData) {
+        return get(mainData, 'meta');
+      });
+    };
+    var getValue = function (data, metaData, sourceInput) {
+      return function (prop) {
+        var _a;
+        var getFromData = function () {
+          return get(data, prop);
+        };
+        var getFromMetaData = function () {
+          return get(metaData, prop);
+        };
+        var getNonEmptyValue = function (c) {
+          return get(c, 'value').bind(function (v) {
+            return v.length > 0 ? Option.some(v) : Option.none();
+          });
+        };
+        var getFromValueFirst = function () {
+          return getFromData().bind(function (child) {
+            return isObject(child) ? getNonEmptyValue(child).orThunk(getFromMetaData) : getFromMetaData().orThunk(function () {
+              return Option.from(child);
+            });
+          });
+        };
+        var getFromMetaFirst = function () {
+          return getFromMetaData().orThunk(function () {
+            return getFromData().bind(function (child) {
+              return isObject(child) ? getNonEmptyValue(child) : Option.from(child);
+            });
+          });
+        };
+        return _a = {}, _a[prop] = (prop === sourceInput ? getFromValueFirst() : getFromMetaFirst()).getOr(''), _a;
+      };
+    };
+    var getDimensions = function (data, metaData) {
+      var dimensions = {};
+      get(data, 'dimensions').each(function (dims) {
+        each([
+          'width',
+          'height'
+        ], function (prop) {
+          get(metaData, prop).orThunk(function () {
+            return get(dims, prop);
+          }).each(function (value) {
+            return dimensions[prop] = value;
+          });
+        });
+      });
+      return dimensions;
+    };
+    var unwrap = function (data, sourceInput) {
+      var metaData = sourceInput ? extractMeta(sourceInput, data).getOr({}) : {};
+      var get = getValue(data, metaData, sourceInput);
+      return __assign(__assign(__assign(__assign(__assign({}, get('source')), get('altsource')), get('poster')), get('embed')), getDimensions(data, metaData));
+    };
+    var wrap = function (data) {
+      var wrapped = __assign(__assign({}, data), {
+        source: { value: get(data, 'source').getOr('') },
+        altsource: { value: get(data, 'altsource').getOr('') },
+        poster: { value: get(data, 'poster').getOr('') }
+      });
+      each([
+        'width',
+        'height'
+      ], function (prop) {
+        get(data, prop).each(function (value) {
+          var dimensions = wrapped.dimensions || {};
+          dimensions[prop] = value;
+          wrapped.dimensions = dimensions;
+        });
+      });
+      return wrapped;
+    };
+    var handleError = function (editor) {
+      return function (error) {
+        var errorMessage = error && error.msg ? 'Media embed handler error: ' + error.msg : 'Media embed handler threw unknown error.';
+        editor.notificationManager.open({
+          type: 'error',
+          text: errorMessage
+        });
+      };
+    };
+    var snippetToData = function (editor, embedSnippet) {
+      return htmlToData(getScripts(editor), embedSnippet);
+    };
+    var isMediaElement = function (element) {
+      return element.getAttribute('data-mce-object') || element.getAttribute('data-ephox-embed-iri');
+    };
+    var getEditorData = function (editor) {
+      var element = editor.selection.getNode();
+      var snippet = isMediaElement(element) ? editor.serializer.serialize(element, { selection: true }) : '';
+      return __assign({ embed: snippet }, htmlToData(getScripts(editor), snippet));
+    };
+    var addEmbedHtml = function (api, editor) {
+      return function (response) {
+        if (isString(response.url) && response.url.trim().length > 0) {
+          var html = response.html;
+          var snippetData = snippetToData(editor, html);
+          var nuData = __assign(__assign({}, snippetData), {
+            source: response.url,
+            embed: html
+          });
+          api.setData(wrap(nuData));
+        }
+      };
+    };
+    var selectPlaceholder = function (editor, beforeObjects) {
+      var afterObjects = editor.dom.select('img[data-mce-object]');
+      for (var i = 0; i < beforeObjects.length; i++) {
+        for (var y = afterObjects.length - 1; y >= 0; y--) {
+          if (beforeObjects[i] === afterObjects[y]) {
+            afterObjects.splice(y, 1);
+          }
+        }
+      }
+      editor.selection.select(afterObjects[0]);
+    };
+    var handleInsert = function (editor, html) {
+      var beforeObjects = editor.dom.select('img[data-mce-object]');
+      editor.insertContent(html);
+      selectPlaceholder(editor, beforeObjects);
+      editor.nodeChanged();
+    };
+    var submitForm = function (prevData, newData, editor) {
+      newData.embed = updateHtml(newData.embed, newData);
+      if (newData.embed && (prevData.source === newData.source || isCached(newData.source))) {
+        handleInsert(editor, newData.embed);
+      } else {
+        getEmbedHtml(editor, newData).then(function (response) {
+          handleInsert(editor, response.html);
+        }).catch(handleError(editor));
+      }
+    };
+    var showDialog = function (editor) {
+      var editorData = getEditorData(editor);
+      var currentData = Cell(editorData);
+      var initialData = wrap(editorData);
+      var handleSource = function (prevData, api) {
+        var serviceData = unwrap(api.getData(), 'source');
+        if (prevData.source !== serviceData.source) {
+          addEmbedHtml(win, editor)({
+            url: serviceData.source,
+            html: ''
+          });
+          getEmbedHtml(editor, serviceData).then(addEmbedHtml(win, editor)).catch(handleError(editor));
+        }
+      };
+      var handleEmbed = function (api) {
+        var data = unwrap(api.getData());
+        var dataFromEmbed = snippetToData(editor, data.embed);
+        api.setData(wrap(dataFromEmbed));
+      };
+      var handleUpdate = function (api, sourceInput) {
+        var data = unwrap(api.getData(), sourceInput);
+        var embed = dataToHtml(editor, data);
+        api.setData(wrap(__assign(__assign({}, data), { embed: embed })));
+      };
+      var mediaInput = [{
+          name: 'source',
+          type: 'urlinput',
+          filetype: 'media',
+          label: 'Source'
+        }];
+      var sizeInput = !hasDimensions(editor) ? [] : [{
+          type: 'sizeinput',
+          name: 'dimensions',
+          label: 'Constrain proportions',
+          constrain: true
+        }];
+      var generalTab = {
+        title: 'General',
+        name: 'general',
+        items: flatten([
+          mediaInput,
+          sizeInput
+        ])
+      };
+      var embedTextarea = {
+        type: 'textarea',
+        name: 'embed',
+        label: 'Paste your embed code below:'
+      };
+      var embedTab = {
+        title: 'Embed',
+        items: [embedTextarea]
+      };
+      var advancedFormItems = [];
+      if (hasAltSource(editor)) {
+        advancedFormItems.push({
+          name: 'altsource',
+          type: 'urlinput',
+          filetype: 'media',
+          label: 'Alternative source URL'
+        });
+      }
+      if (hasPoster(editor)) {
+        advancedFormItems.push({
+          name: 'poster',
+          type: 'urlinput',
+          filetype: 'image',
+          label: 'Media poster (Image URL)'
+        });
+      }
+      var advancedTab = {
+        title: 'Advanced',
+        name: 'advanced',
+        items: advancedFormItems
+      };
+      var tabs = [
+        generalTab,
+        embedTab
+      ];
+      if (advancedFormItems.length > 0) {
+        tabs.push(advancedTab);
+      }
+      var body = {
+        type: 'tabpanel',
+        tabs: tabs
+      };
+      var win = editor.windowManager.open({
+        title: 'Insert/Edit Media',
+        size: 'normal',
+        body: body,
+        buttons: [
+          {
+            type: 'cancel',
+            name: 'cancel',
+            text: 'Cancel'
+          },
+          {
+            type: 'submit',
+            name: 'save',
+            text: 'Save',
+            primary: true
+          }
+        ],
+        onSubmit: function (api) {
+          var serviceData = unwrap(api.getData());
+          submitForm(currentData.get(), serviceData, editor);
+          api.close();
+        },
+        onChange: function (api, detail) {
+          switch (detail.name) {
+          case 'source':
+            handleSource(currentData.get(), api);
+            break;
+          case 'embed':
+            handleEmbed(api);
+            break;
+          case 'dimensions':
+          case 'altsource':
+          case 'poster':
+            handleUpdate(api, detail.name);
+            break;
+          }
+          currentData.set(unwrap(api.getData()));
+        },
+        initialData: initialData
+      });
+    };
+
+    var get$1 = function (editor) {
+      var showDialog$1 = function () {
+        showDialog(editor);
+      };
+      return { showDialog: showDialog$1 };
+    };
+
+    var register = function (editor) {
+      var showDialog$1 = function () {
+        showDialog(editor);
+      };
+      editor.addCommand('mceMedia', showDialog$1);
+    };
+
+    var global$7 = tinymce.util.Tools.resolve('tinymce.html.Node');
+
+    var global$8 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var sanitize = function (editor, html) {
+      if (shouldFilterHtml(editor) === false) {
+        return html;
+      }
+      var writer = global$5();
+      var blocked;
+      global$3({
+        validate: false,
+        allow_conditional_comments: false,
+        comment: function (text) {
+          writer.comment(text);
+        },
+        cdata: function (text) {
+          writer.cdata(text);
+        },
+        text: function (text, raw) {
+          writer.text(text, raw);
+        },
+        start: function (name, attrs, empty) {
+          blocked = true;
+          if (name === 'script' || name === 'noscript' || name === 'svg') {
+            return;
+          }
+          for (var i = attrs.length - 1; i >= 0; i--) {
+            var attrName = attrs[i].name;
+            if (attrName.indexOf('on') === 0) {
+              delete attrs.map[attrName];
+              attrs.splice(i, 1);
+            }
+            if (attrName === 'style') {
+              attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name);
+            }
+          }
+          writer.start(name, attrs, empty);
+          blocked = false;
+        },
+        end: function (name) {
+          if (blocked) {
+            return;
+          }
+          writer.end(name);
+        }
+      }, global$4({})).parse(html);
+      return writer.getContent();
+    };
+
+    var createPlaceholderNode = function (editor, node) {
+      var placeHolder;
+      var name = node.name;
+      placeHolder = new global$7('img', 1);
+      placeHolder.shortEnded = true;
+      retainAttributesAndInnerHtml(editor, node, placeHolder);
+      placeHolder.attr({
+        'width': node.attr('width') || '300',
+        'height': node.attr('height') || (name === 'audio' ? '30' : '150'),
+        'style': node.attr('style'),
+        'src': global$8.transparentSrc,
+        'data-mce-object': name,
+        'class': 'mce-object mce-object-' + name
+      });
+      return placeHolder;
+    };
+    var createPreviewIframeNode = function (editor, node) {
+      var previewWrapper;
+      var previewNode;
+      var shimNode;
+      var name = node.name;
+      previewWrapper = new global$7('span', 1);
+      previewWrapper.attr({
+        'contentEditable': 'false',
+        'style': node.attr('style'),
+        'data-mce-object': name,
+        'class': 'mce-preview-object mce-object-' + name
+      });
+      retainAttributesAndInnerHtml(editor, node, previewWrapper);
+      previewNode = new global$7(name, 1);
+      previewNode.attr({
+        src: node.attr('src'),
+        allowfullscreen: node.attr('allowfullscreen'),
+        style: node.attr('style'),
+        class: node.attr('class'),
+        width: node.attr('width'),
+        height: node.attr('height'),
+        frameborder: '0'
+      });
+      shimNode = new global$7('span', 1);
+      shimNode.attr('class', 'mce-shim');
+      previewWrapper.append(previewNode);
+      previewWrapper.append(shimNode);
+      return previewWrapper;
+    };
+    var retainAttributesAndInnerHtml = function (editor, sourceNode, targetNode) {
+      var attrName;
+      var attrValue;
+      var attribs;
+      var ai;
+      var innerHtml;
+      attribs = sourceNode.attributes;
+      ai = attribs.length;
+      while (ai--) {
+        attrName = attribs[ai].name;
+        attrValue = attribs[ai].value;
+        if (attrName !== 'width' && attrName !== 'height' && attrName !== 'style') {
+          if (attrName === 'data' || attrName === 'src') {
+            attrValue = editor.convertURL(attrValue, attrName);
+          }
+          targetNode.attr('data-mce-p-' + attrName, attrValue);
+        }
+      }
+      innerHtml = sourceNode.firstChild && sourceNode.firstChild.value;
+      if (innerHtml) {
+        targetNode.attr('data-mce-html', escape(sanitize(editor, innerHtml)));
+        targetNode.firstChild = null;
+      }
+    };
+    var isPageEmbedWrapper = function (node) {
+      var nodeClass = node.attr('class');
+      return nodeClass && /\btiny-pageembed\b/.test(nodeClass);
+    };
+    var isWithinEmbedWrapper = function (node) {
+      while (node = node.parent) {
+        if (node.attr('data-ephox-embed-iri') || isPageEmbedWrapper(node)) {
+          return true;
+        }
+      }
+      return false;
+    };
+    var placeHolderConverter = function (editor) {
+      return function (nodes) {
+        var i = nodes.length;
+        var node;
+        var videoScript;
+        while (i--) {
+          node = nodes[i];
+          if (!node.parent) {
+            continue;
+          }
+          if (node.parent.attr('data-mce-object')) {
+            continue;
+          }
+          if (node.name === 'script') {
+            videoScript = getVideoScriptMatch(getScripts(editor), node.attr('src'));
+            if (!videoScript) {
+              continue;
+            }
+          }
+          if (videoScript) {
+            if (videoScript.width) {
+              node.attr('width', videoScript.width.toString());
+            }
+            if (videoScript.height) {
+              node.attr('height', videoScript.height.toString());
+            }
+          }
+          if (node.name === 'iframe' && hasLiveEmbeds(editor) && global$8.ceFalse) {
+            if (!isWithinEmbedWrapper(node)) {
+              node.replace(createPreviewIframeNode(editor, node));
+            }
+          } else {
+            if (!isWithinEmbedWrapper(node)) {
+              node.replace(createPlaceholderNode(editor, node));
+            }
+          }
+        }
+      };
+    };
+
+    var setup = function (editor) {
+      editor.on('preInit', function () {
+        var specialElements = editor.schema.getSpecialElements();
+        global$1.each('video audio iframe object'.split(' '), function (name) {
+          specialElements[name] = new RegExp('</' + name + '[^>]*>', 'gi');
+        });
+        var boolAttrs = editor.schema.getBoolAttrs();
+        global$1.each('webkitallowfullscreen mozallowfullscreen allowfullscreen'.split(' '), function (name) {
+          boolAttrs[name] = {};
+        });
+        editor.parser.addNodeFilter('iframe,video,audio,object,embed,script', placeHolderConverter(editor));
+        editor.serializer.addAttributeFilter('data-mce-object', function (nodes, name) {
+          var i = nodes.length;
+          var node;
+          var realElm;
+          var ai;
+          var attribs;
+          var innerHtml;
+          var innerNode;
+          var realElmName;
+          var className;
+          while (i--) {
+            node = nodes[i];
+            if (!node.parent) {
+              continue;
+            }
+            realElmName = node.attr(name);
+            realElm = new global$7(realElmName, 1);
+            if (realElmName !== 'audio' && realElmName !== 'script') {
+              className = node.attr('class');
+              if (className && className.indexOf('mce-preview-object') !== -1) {
+                realElm.attr({
+                  width: node.firstChild.attr('width'),
+                  height: node.firstChild.attr('height')
+                });
+              } else {
+                realElm.attr({
+                  width: node.attr('width'),
+                  height: node.attr('height')
+                });
+              }
+            }
+            realElm.attr({ style: node.attr('style') });
+            attribs = node.attributes;
+            ai = attribs.length;
+            while (ai--) {
+              var attrName = attribs[ai].name;
+              if (attrName.indexOf('data-mce-p-') === 0) {
+                realElm.attr(attrName.substr(11), attribs[ai].value);
+              }
+            }
+            if (realElmName === 'script') {
+              realElm.attr('type', 'text/javascript');
+            }
+            innerHtml = node.attr('data-mce-html');
+            if (innerHtml) {
+              innerNode = new global$7('#text', 3);
+              innerNode.raw = true;
+              innerNode.value = sanitize(editor, unescape(innerHtml));
+              realElm.append(innerNode);
+            }
+            node.replace(realElm);
+          }
+        });
+      });
+      editor.on('SetContent', function () {
+        editor.$('span.mce-preview-object').each(function (index, elm) {
+          var $elm = editor.$(elm);
+          if ($elm.find('span.mce-shim').length === 0) {
+            $elm.append('<span class="mce-shim"></span>');
+          }
+        });
+      });
+    };
+
+    var setup$1 = function (editor) {
+      editor.on('ResolveName', function (e) {
+        var name;
+        if (e.target.nodeType === 1 && (name = e.target.getAttribute('data-mce-object'))) {
+          e.name = name;
+        }
+      });
+    };
+
+    var setup$2 = function (editor) {
+      editor.on('click keyup touchend', function () {
+        var selectedNode = editor.selection.getNode();
+        if (selectedNode && editor.dom.hasClass(selectedNode, 'mce-preview-object')) {
+          if (editor.dom.getAttrib(selectedNode, 'data-mce-selected')) {
+            selectedNode.setAttribute('data-mce-selected', '2');
+          }
+        }
+      });
+      editor.on('ObjectSelected', function (e) {
+        var objectType = e.target.getAttribute('data-mce-object');
+        if (objectType === 'audio' || objectType === 'script') {
+          e.preventDefault();
+        }
+      });
+      editor.on('ObjectResized', function (e) {
+        var target = e.target;
+        var html;
+        if (target.getAttribute('data-mce-object')) {
+          html = target.getAttribute('data-mce-html');
+          if (html) {
+            html = unescape(html);
+            target.setAttribute('data-mce-html', escape(updateHtml(html, {
+              width: String(e.width),
+              height: String(e.height)
+            })));
+          }
+        }
+      });
+    };
+
+    var stateSelectorAdapter = function (editor, selector) {
+      return function (buttonApi) {
+        return editor.selection.selectorChangedWithUnbind(selector.join(','), buttonApi.setActive).unbind;
+      };
+    };
+    var register$1 = function (editor) {
+      editor.ui.registry.addToggleButton('media', {
+        tooltip: 'Insert/edit media',
+        icon: 'embed',
+        onAction: function () {
+          editor.execCommand('mceMedia');
+        },
+        onSetup: stateSelectorAdapter(editor, [
+          'img[data-mce-object]',
+          'span[data-mce-object]',
+          'div[data-ephox-embed-iri]'
+        ])
+      });
+      editor.ui.registry.addMenuItem('media', {
+        icon: 'embed',
+        text: 'Media...',
+        onAction: function () {
+          editor.execCommand('mceMedia');
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('media', function (editor) {
+        register(editor);
+        register$1(editor);
+        setup$1(editor);
+        setup(editor);
+        setup$2(editor);
+        return get$1(editor);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/media/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var e,t,r,n=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=function(){return(p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=function(e){return function(){return e}},o=a(!1),c=a(!0),i=function(){return u},u=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:o,isSome:o,isNone:c,getOr:r=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(undefined),or:r,orThunk:t,map:i,each:function(){},bind:i,exists:o,forall:c,filter:i,equals:e,equals_:e,toArray:function(){return[]},toString:a("none()")}),s=function(r){var e=a(r),t=function(){return i},n=function(e){return e(r)},i={fold:function(e,t){return t(r)},is:function(e){return r===e},isSome:c,isNone:o,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return s(e(r))},each:function(e){e(r)},bind:n,exists:n,forall:n,filter:function(e){return e(r)?i:u},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(e){return e.is(r)},equals_:function(e,t){return e.fold(o,function(e){return t(r,e)})}};return i},l={some:s,none:i,from:function(e){return null===e||e===undefined?u:s(e)}},m=function(n){return function(e){return r=typeof(t=e),(null===t?"null":"object"==r&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":r)===n;var t,r}},d=m("string"),h=m("object"),g=m("array"),v=Array.prototype.push,f=function(e,t){for(var r=0,n=e.length;r<n;r++){t(e[r],r)}},w=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},b=Object.keys,y=Object.hasOwnProperty,x=function(e,t){return j(e,t)?l.from(e[t]):l.none()},j=function(e,t){return y.call(e,t)},O=function(e){return e.getParam("media_scripts")},S=tinymce.util.Tools.resolve("tinymce.util.Tools"),_=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),k=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),A=function(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]},T=_.DOM,C=function(e){return e.replace(/px$/,"")},P=function(o,e){var c=w(!1),u={};return k({validate:!1,allow_conditional_comments:!0,start:function(e,t){if(!c.get())if(j(t.map,"data-ephox-embed-iri"))c.set(!0),i=(n=t).map.style,a=i?T.parseStyle(i):{},u={type:"ephox-embed-iri",source:n.map["data-ephox-embed-iri"],altsource:"",poster:"",width:x(a,"max-width").map(C).getOr(""),height:x(a,"max-height").map(C).getOr("")};else{if(u.source||"param"!==e||(u.source=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(u.type||(u.type=e),u=S.extend(t.map,u)),"script"===e){var r=A(o,t.map.src);if(!r)return;u={type:"script",source:t.map.src,width:String(r.width),height:String(r.height)}}"source"===e&&(u.source?u.altsource||(u.altsource=t.map.src):u.source=t.map.src),"img"!==e||u.poster||(u.poster=t.map.src)}var n,i,a}}).parse(e),u.source=u.source||u.src||u.data,u.altsource=u.altsource||"",u.poster=u.poster||"",u},D=function(e){var t={mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()];return t||""},$=tinymce.util.Tools.resolve("tinymce.html.Schema"),F=tinymce.util.Tools.resolve("tinymce.html.Writer"),M=_.DOM,z=function(e){return/^[0-9.]+$/.test(e)?e+"px":e},N=function(a,e){!function(e,t){for(var r=b(e),n=0,i=r.length;n<i;n++){var a=r[n];t(e[a],a)}}(e,function(e,t){var r=""+e;if(a.map[t])for(var n=a.length;n--;){var i=a[n];i.name===t&&(r?(a.map[t]=r,i.value=r):(delete a.map[t],a.splice(n,1)))}else r&&(a.push({name:t,value:r}),a.map[t]=r)})},U=["source","altsource"],E=function(e,c,u){var s,l=F(),m=w(!1),d=0;return k({validate:!1,allow_conditional_comments:!0,comment:function(e){l.comment(e)},cdata:function(e){l.cdata(e)},text:function(e,t){l.text(e,t)},start:function(e,t,r){if(!m.get())if(j(t.map,"data-ephox-embed-iri"))m.set(!0),n=c,a=(i=t).map.style,(o=a?M.parseStyle(a):{})["max-width"]=z(n.width),o["max-height"]=z(n.height),N(i,{style:M.serializeStyle(o)});else{switch(e){case"video":case"object":case"embed":case"img":case"iframe":c.height!==undefined&&c.width!==undefined&&N(t,{width:c.width,height:c.height})}if(u)switch(e){case"video":N(t,{poster:c.poster,src:""}),c.altsource&&N(t,{src:""});break;case"iframe":N(t,{src:c.source});break;case"source":if(d<2&&(N(t,{src:c[U[d]],type:c[U[d]+"mime"]}),!c[U[d]]))return;d++;break;case"img":if(!c.poster)return;s=!0}}var n,i,a,o;l.start(e,t,r)},end:function(e){if(!m.get()){if("video"===e&&u)for(var t=0;t<2;t++)if(c[U[t]]){var r=[];r.map={},d<t&&(N(r,{src:c[U[t]],type:c[U[t]+"mime"]}),l.start("source",r,!0))}if(c.poster&&"object"===e&&u&&!s){var n=[];n.map={},N(n,{src:c.poster,width:c.width,height:c.height}),l.start("img",n,!0)}}l.end(e)}},$({})).parse(e),l.getContent()},R=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?title=0&amp;byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],L=function(t){var e=R.filter(function(e){return e.regex.test(t)});return 0<e.length?S.extend({},e[0],{url:function(e,t){for(var r,n=(r=t.match(/^(https?:\/\/|www\.)(.+)$/i))&&1<r.length&&"www."!==r[1]?r[1]:"https://",i=e.regex.exec(t),a=n+e.url,o=function(e){a=a.replace("$"+e,function(){return i[e]?i[e]:""})},c=0;c<i.length;c++)o(c);return a.replace(/\?$/,"")}(e[0],t)}):null},I=function(r,e){var n=S.extend({},e);if(!n.source&&(S.extend(n,P(O(r),n.embed)),!n.source))return"";n.altsource||(n.altsource=""),n.poster||(n.poster=""),n.source=r.convertURL(n.source,"source"),n.altsource=r.convertURL(n.altsource,"source"),n.sourcemime=D(n.source),n.altsourcemime=D(n.altsource),n.poster=r.convertURL(n.poster,"poster");var t=L(n.source);if(t&&(n.source=t.url,n.type=t.type,n.allowFullscreen=t.allowFullscreen,n.width=n.width||String(t.w),n.height=n.height||String(t.h)),n.embed)return E(n.embed,n,!0);var i=A(O(r),n.source);i&&(n.type="script",n.width=String(i.width),n.height=String(i.height));var a,o,c,u,s,l,m,d,h=r.getParam("audio_template_callback"),f=r.getParam("video_template_callback");return n.width=n.width||"300",n.height=n.height||"150",S.each(n,function(e,t){n[t]=r.dom.encode(""+e)}),"iframe"===n.type?(d=(m=n).allowFullscreen?' allowFullscreen="1"':"",'<iframe src="'+m.source+'" width="'+m.width+'" height="'+m.height+'"'+d+"></iframe>"):"application/x-shockwave-flash"===n.sourcemime?(l='<object data="'+(s=n).source+'" width="'+s.width+'" height="'+s.height+'" type="application/x-shockwave-flash">',s.poster&&(l+='<img src="'+s.poster+'" width="'+s.width+'" height="'+s.height+'" />'),l+="</object>"):-1!==n.sourcemime.indexOf("audio")?(c=n,(u=h)?u(c):'<audio controls="controls" src="'+c.source+'">'+(c.altsource?'\n<source src="'+c.altsource+'"'+(c.altsourcemime?' type="'+c.altsourcemime+'"':"")+" />\n":"")+"</audio>"):"script"===n.type?'<script src="'+n.source+'"><\/script>':(a=n,(o=f)?o(a):'<video width="'+a.width+'" height="'+a.height+'"'+(a.poster?' poster="'+a.poster+'"':"")+' controls="controls">\n<source src="'+a.source+'"'+(a.sourcemime?' type="'+a.sourcemime+'"':"")+" />\n"+(a.altsource?'<source src="'+a.altsource+'"'+(a.altsourcemime?' type="'+a.altsourcemime+'"':"")+" />\n":"")+"</video>")},q=tinymce.util.Tools.resolve("tinymce.util.Promise"),B={},W=function(t){return function(e){return I(t,e)}},G=function(e,t){var r,n,i,a,o,c=e.getParam("media_url_resolver");return c?(i=t,a=W(e),o=c,new q(function(t,e){var r=function(e){return e.html&&(B[i.source]=e),t({url:i.source,html:e.html?e.html:a(i)})};B[i.source]?r(B[i.source]):o({url:i.source},r,e)})):(r=t,n=W(e),new q(function(e){e({html:n(r),url:r.source})}))},H=function(a,o,c){return function(e){var t,r=function(){return x(a,e)},n=function(){return x(o,e)},i=function(e){return x(e,"value").bind(function(e){return 0<e.length?l.some(e):l.none()})};return(t={})[e]=(e===c?r().bind(function(e){return h(e)?i(e).orThunk(n):n().orThunk(function(){return l.from(e)})}):n().orThunk(function(){return r().bind(function(e){return h(e)?i(e):l.from(e)})})).getOr(""),t}},J=function(e,t){var r,n,i=t?x(e,t).bind(function(e){return x(e,"meta")}).getOr({}):{},a=H(e,i,t);return p(p(p(p(p({},a("source")),a("altsource")),a("poster")),a("embed")),(r=i,n={},x(e,"dimensions").each(function(e){f(["width","height"],function(t){x(r,t).orThunk(function(){return x(e,t)}).each(function(e){return n[t]=e})})}),n))},K=function(e){var n=p(p({},e),{source:{value:x(e,"source").getOr("")},altsource:{value:x(e,"altsource").getOr("")},poster:{value:x(e,"poster").getOr("")}});return f(["width","height"],function(r){x(e,r).each(function(e){var t=n.dimensions||{};t[r]=e,n.dimensions=t})}),n},Q=function(r){return function(e){var t=e&&e.msg?"Media embed handler error: "+e.msg:"Media embed handler threw unknown error.";r.notificationManager.open({type:"error",text:t})}},V=function(e,t){return P(O(e),t)},X=function(i,a){return function(e){if(d(e.url)&&0<e.url.trim().length){var t=e.html,r=V(a,t),n=p(p({},r),{source:e.url,embed:t});i.setData(K(n))}}},Y=function(e,t){var r=e.dom.select("img[data-mce-object]");e.insertContent(t),function(e,t){for(var r=e.dom.select("img[data-mce-object]"),n=0;n<t.length;n++)for(var i=r.length-1;0<=i;i--)t[n]===r[i]&&r.splice(i,1);e.selection.select(r[0])}(e,r),e.nodeChanged()},Z=function(e,t,r){var n;t.embed=E(t.embed,t),t.embed&&(e.source===t.source||(n=t.source,B.hasOwnProperty(n)))?Y(r,t.embed):G(r,t).then(function(e){Y(r,e.html)})["catch"](Q(r))},ee=function(m){var e,t,r,n,i=(r=(e=m).selection.getNode(),n=(t=r).getAttribute("data-mce-object")||t.getAttribute("data-ephox-embed-iri")?e.serializer.serialize(r,{selection:!0}):"",p({embed:n},P(O(e),n))),d=w(i),a=K(i),o={title:"General",name:"general",items:function(e){for(var t=[],r=0,n=e.length;r<n;++r){if(!g(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);v.apply(t,e[r])}return t}([[{name:"source",type:"urlinput",filetype:"media",label:"Source"}],m.getParam("media_dimensions",!0)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[]])},c={title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]},u=[];m.getParam("media_alt_source",!0)&&u.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),m.getParam("media_poster",!0)&&u.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});var s={title:"Advanced",name:"advanced",items:u},l=[o,c];0<u.length&&l.push(s);var h={type:"tabpanel",tabs:l},f=m.windowManager.open({title:"Insert/Edit Media",size:"normal",body:h,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var t=J(e.getData());Z(d.get(),t,m),e.close()},onChange:function(e,t){switch(t.name){case"source":s=d.get(),l=J(e.getData(),"source"),s.source!==l.source&&(X(f,m)({url:l.source,html:""}),G(m,l).then(X(f,m))["catch"](Q(m)));break;case"embed":c=J((o=e).getData()),u=V(m,c.embed),o.setData(K(u));break;case"dimensions":case"altsource":case"poster":r=e,n=t.name,i=J(r.getData(),n),a=I(m,i),r.setData(K(p(p({},i),{embed:a})))}var r,n,i,a,o,c,u,s,l;d.set(J(e.getData()))},initialData:a})},te=tinymce.util.Tools.resolve("tinymce.html.Node"),re=tinymce.util.Tools.resolve("tinymce.Env"),ne=function(a,e){if(!1===a.getParam("media_filter_html",!0))return e;var o,c=F();return k({validate:!1,allow_conditional_comments:!1,comment:function(e){c.comment(e)},cdata:function(e){c.cdata(e)},text:function(e,t){c.text(e,t)},start:function(e,t,r){if(o=!0,"script"!==e&&"noscript"!==e&&"svg"!==e){for(var n=t.length-1;0<=n;n--){var i=t[n].name;0===i.indexOf("on")&&(delete t.map[i],t.splice(n,1)),"style"===i&&(t[n].value=a.dom.serializeStyle(a.dom.parseStyle(t[n].value),e))}c.start(e,t,r),o=!1}},end:function(e){o||c.end(e)}},$({})).parse(e),c.getContent()},ie=function(e,t,r){var n,i,a,o,c;for(o=(a=t.attributes).length;o--;)n=a[o].name,i=a[o].value,"width"!==n&&"height"!==n&&"style"!==n&&("data"!==n&&"src"!==n||(i=e.convertURL(i,n)),r.attr("data-mce-p-"+n,i));(c=t.firstChild&&t.firstChild.value)&&(r.attr("data-mce-html",escape(ne(e,c))),r.firstChild=null)},ae=function(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri")||(t=e.attr("class"))&&/\btiny-pageembed\b/.test(t))return!0;var t;return!1},oe=function(f){return function(e){for(var t,r,n,i,a,o,c,u,s,l,m,d,h=e.length;h--;)(t=e[h]).parent&&(t.parent.attr("data-mce-object")||"script"===t.name&&!(r=A(O(f),t.attr("src")))||(r&&(r.width&&t.attr("width",r.width.toString()),r.height&&t.attr("height",r.height.toString())),"iframe"===t.name&&f.getParam("media_live_embeds",!0)&&re.ceFalse?ae(t)||t.replace((c=f,m=l=s=void 0,d=(u=t).name,(s=new te("span",1)).attr({contentEditable:"false",style:u.attr("style"),"data-mce-object":d,"class":"mce-preview-object mce-object-"+d}),ie(c,u,s),(l=new te(d,1)).attr({src:u.attr("src"),allowfullscreen:u.attr("allowfullscreen"),style:u.attr("style"),"class":u.attr("class"),width:u.attr("width"),height:u.attr("height"),frameborder:"0"}),(m=new te("span",1)).attr("class","mce-shim"),s.append(l),s.append(m),s)):ae(t)||t.replace((n=f,a=void 0,o=(i=t).name,(a=new te("img",1)).shortEnded=!0,ie(n,i,a),a.attr({width:i.attr("width")||"300",height:i.attr("height")||("audio"===o?"30":"150"),style:i.attr("style"),src:re.transparentSrc,"data-mce-object":o,"class":"mce-object mce-object-"+o}),a))))}},ce=function(e){var t,r;e.ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:function(){e.execCommand("mceMedia")},onSetup:(t=e,r=["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"],function(e){return t.selection.selectorChangedWithUnbind(r.join(","),e.setActive).unbind})}),e.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:function(){e.execCommand("mceMedia")}})};!function ue(){n.add("media",function(e){var t,d,r,n;return(t=e).addCommand("mceMedia",function(){ee(t)}),ce(e),e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}),(d=e).on("preInit",function(){var t=d.schema.getSpecialElements();S.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var r=d.schema.getBoolAttrs();S.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),d.parser.addNodeFilter("iframe,video,audio,object,embed,script",oe(d)),d.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var r,n,i,a,o,c,u,s,l=e.length;l--;)if((r=e[l]).parent){for(u=r.attr(t),n=new te(u,1),"audio"!==u&&"script"!==u&&((s=r.attr("class"))&&-1!==s.indexOf("mce-preview-object")?n.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):n.attr({width:r.attr("width"),height:r.attr("height")})),n.attr({style:r.attr("style")}),i=(a=r.attributes).length;i--;){var m=a[i].name;0===m.indexOf("data-mce-p-")&&n.attr(m.substr(11),a[i].value)}"script"===u&&n.attr("type","text/javascript"),(o=r.attr("data-mce-html"))&&((c=new te("#text",3)).raw=!0,c.value=ne(d,unescape(o)),n.append(c)),r.replace(n)}})}),d.on("SetContent",function(){d.$("span.mce-preview-object").each(function(e,t){var r=d.$(t);0===r.find("span.mce-shim").length&&r.append('<span class="mce-shim"></span>')})}),(r=e).on("click keyup touchend",function(){var e=r.selection.getNode();e&&r.dom.hasClass(e,"mce-preview-object")&&r.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),r.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");"audio"!==t&&"script"!==t||e.preventDefault()}),r.on("ObjectResized",function(e){var t,r=e.target;r.getAttribute("data-mce-object")&&(t=r.getAttribute("data-mce-html"))&&(t=unescape(t),r.setAttribute("data-mce-html",escape(E(t,{width:String(e.width),height:String(e.height)}))))}),n=e,{showDialog:function(){ee(n)}}})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/nonbreaking/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "nonbreaking" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/nonbreaking')
+//   ES2015:
+//     import 'tinymce/plugins/nonbreaking'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/nonbreaking/plugin.js
@@ -1,1 +1,102 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var getKeyboardSpaces = function (editor) {
+      var spaces = editor.getParam('nonbreaking_force_tab', 0);
+      if (typeof spaces === 'boolean') {
+        return spaces === true ? 3 : 0;
+      } else {
+        return spaces;
+      }
+    };
+    var wrapNbsps = function (editor) {
+      return editor.getParam('nonbreaking_wrap', true, 'boolean');
+    };
+
+    var stringRepeat = function (string, repeats) {
+      var str = '';
+      for (var index = 0; index < repeats; index++) {
+        str += string;
+      }
+      return str;
+    };
+    var isVisualCharsEnabled = function (editor) {
+      return editor.plugins.visualchars ? editor.plugins.visualchars.isEnabled() : false;
+    };
+    var insertNbsp = function (editor, times) {
+      var classes = function () {
+        return isVisualCharsEnabled(editor) ? 'mce-nbsp-wrap mce-nbsp' : 'mce-nbsp-wrap';
+      };
+      var nbspSpan = function () {
+        return '<span class="' + classes() + '" contenteditable="false">' + stringRepeat('&nbsp;', times) + '</span>';
+      };
+      var shouldWrap = wrapNbsps(editor);
+      var html = shouldWrap || editor.plugins.visualchars ? nbspSpan() : stringRepeat('&nbsp;', times);
+      editor.undoManager.transact(function () {
+        return editor.insertContent(html);
+      });
+    };
+
+    var register = function (editor) {
+      editor.addCommand('mceNonBreaking', function () {
+        insertNbsp(editor, 1);
+      });
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');
+
+    var setup = function (editor) {
+      var spaces = getKeyboardSpaces(editor);
+      if (spaces > 0) {
+        editor.on('keydown', function (e) {
+          if (e.keyCode === global$1.TAB && !e.isDefaultPrevented()) {
+            if (e.shiftKey) {
+              return;
+            }
+            e.preventDefault();
+            e.stopImmediatePropagation();
+            insertNbsp(editor, spaces);
+          }
+        });
+      }
+    };
+
+    var register$1 = function (editor) {
+      editor.ui.registry.addButton('nonbreaking', {
+        icon: 'non-breaking',
+        tooltip: 'Nonbreaking space',
+        onAction: function () {
+          return editor.execCommand('mceNonBreaking');
+        }
+      });
+      editor.ui.registry.addMenuItem('nonbreaking', {
+        icon: 'non-breaking',
+        text: 'Nonbreaking space',
+        onAction: function () {
+          return editor.execCommand('mceNonBreaking');
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('nonbreaking', function (editor) {
+        register(editor);
+        register$1(editor);
+        setup(editor);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/nonbreaking/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n,e){for(var a="",o=0;o<e;o++)a+=n;return a},r=function(n,e){var a,o=n.getParam("nonbreaking_wrap",!0,"boolean")||n.plugins.visualchars?'<span class="'+((a=n).plugins.visualchars&&a.plugins.visualchars.isEnabled()?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap")+'" contenteditable="false">'+i("&nbsp;",e)+"</span>":i("&nbsp;",e);n.undoManager.transact(function(){return n.insertContent(o)})},c=tinymce.util.Tools.resolve("tinymce.util.VK");!function e(){n.add("nonbreaking",function(n){var e,a,o,i,t;(e=n).addCommand("mceNonBreaking",function(){r(e,1)}),(a=n).ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:function(){return a.execCommand("mceNonBreaking")}}),a.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:function(){return a.execCommand("mceNonBreaking")}}),0<(t="boolean"==typeof(i=(o=n).getParam("nonbreaking_force_tab",0))?!0===i?3:0:i)&&o.on("keydown",function(n){if(n.keyCode===c.TAB&&!n.isDefaultPrevented()){if(n.shiftKey)return;n.preventDefault(),n.stopImmediatePropagation(),r(o,t)}})})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/noneditable/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "noneditable" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/noneditable')
+//   ES2015:
+//     import 'tinymce/plugins/noneditable'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/noneditable/plugin.js
@@ -1,1 +1,119 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var getNonEditableClass = function (editor) {
+      return editor.getParam('noneditable_noneditable_class', 'mceNonEditable');
+    };
+    var getEditableClass = function (editor) {
+      return editor.getParam('noneditable_editable_class', 'mceEditable');
+    };
+    var getNonEditableRegExps = function (editor) {
+      var nonEditableRegExps = editor.getParam('noneditable_regexp', []);
+      if (nonEditableRegExps && nonEditableRegExps.constructor === RegExp) {
+        return [nonEditableRegExps];
+      } else {
+        return nonEditableRegExps;
+      }
+    };
+
+    var hasClass = function (checkClassName) {
+      return function (node) {
+        return (' ' + node.attr('class') + ' ').indexOf(checkClassName) !== -1;
+      };
+    };
+    var replaceMatchWithSpan = function (editor, content, cls) {
+      return function (match) {
+        var args = arguments, index = args[args.length - 2];
+        var prevChar = index > 0 ? content.charAt(index - 1) : '';
+        if (prevChar === '"') {
+          return match;
+        }
+        if (prevChar === '>') {
+          var findStartTagIndex = content.lastIndexOf('<', index);
+          if (findStartTagIndex !== -1) {
+            var tagHtml = content.substring(findStartTagIndex, index);
+            if (tagHtml.indexOf('contenteditable="false"') !== -1) {
+              return match;
+            }
+          }
+        }
+        return '<span class="' + cls + '" data-mce-content="' + editor.dom.encode(args[0]) + '">' + editor.dom.encode(typeof args[1] === 'string' ? args[1] : args[0]) + '</span>';
+      };
+    };
+    var convertRegExpsToNonEditable = function (editor, nonEditableRegExps, e) {
+      var i = nonEditableRegExps.length, content = e.content;
+      if (e.format === 'raw') {
+        return;
+      }
+      while (i--) {
+        content = content.replace(nonEditableRegExps[i], replaceMatchWithSpan(editor, content, getNonEditableClass(editor)));
+      }
+      e.content = content;
+    };
+    var setup = function (editor) {
+      var editClass, nonEditClass;
+      var contentEditableAttrName = 'contenteditable';
+      editClass = ' ' + global$1.trim(getEditableClass(editor)) + ' ';
+      nonEditClass = ' ' + global$1.trim(getNonEditableClass(editor)) + ' ';
+      var hasEditClass = hasClass(editClass);
+      var hasNonEditClass = hasClass(nonEditClass);
+      var nonEditableRegExps = getNonEditableRegExps(editor);
+      editor.on('PreInit', function () {
+        if (nonEditableRegExps.length > 0) {
+          editor.on('BeforeSetContent', function (e) {
+            convertRegExpsToNonEditable(editor, nonEditableRegExps, e);
+          });
+        }
+        editor.parser.addAttributeFilter('class', function (nodes) {
+          var i = nodes.length, node;
+          while (i--) {
+            node = nodes[i];
+            if (hasEditClass(node)) {
+              node.attr(contentEditableAttrName, 'true');
+            } else if (hasNonEditClass(node)) {
+              node.attr(contentEditableAttrName, 'false');
+            }
+          }
+        });
+        editor.serializer.addAttributeFilter(contentEditableAttrName, function (nodes) {
+          var i = nodes.length, node;
+          while (i--) {
+            node = nodes[i];
+            if (!hasEditClass(node) && !hasNonEditClass(node)) {
+              continue;
+            }
+            if (nonEditableRegExps.length > 0 && node.attr('data-mce-content')) {
+              node.name = '#text';
+              node.type = 3;
+              node.raw = true;
+              node.value = node.attr('data-mce-content');
+            } else {
+              node.attr(contentEditableAttrName, null);
+            }
+          }
+        });
+      });
+    };
+
+    function Plugin () {
+      global.add('noneditable', function (editor) {
+        setup(editor);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/noneditable/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=function(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")},f=function(n){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(n)}},s=function(i,o,c){return function(t){var n=arguments,e=n[n.length-2],r=0<e?o.charAt(e-1):"";if('"'===r)return t;if(">"===r){var a=o.lastIndexOf("<",e);if(-1!==a)if(-1!==o.substring(a,e).indexOf('contenteditable="false"'))return t}return'<span class="'+c+'" data-mce-content="'+i.dom.encode(n[0])+'">'+i.dom.encode("string"==typeof n[1]?n[1]:n[0])+"</span>"}},n=function(n){var t,e,r="contenteditable";t=" "+l.trim(n.getParam("noneditable_editable_class","mceEditable"))+" ",e=" "+l.trim(u(n))+" ";var a,i=f(t),o=f(e),c=(a=n.getParam("noneditable_regexp",[]))&&a.constructor===RegExp?[a]:a;n.on("PreInit",function(){0<c.length&&n.on("BeforeSetContent",function(t){!function(t,n,e){var r=n.length,a=e.content;if("raw"!==e.format){for(;r--;)a=a.replace(n[r],s(t,a,u(t)));e.content=a}}(n,c,t)}),n.parser.addAttributeFilter("class",function(t){for(var n,e=t.length;e--;)n=t[e],i(n)?n.attr(r,"true"):o(n)&&n.attr(r,"false")}),n.serializer.addAttributeFilter(r,function(t){for(var n,e=t.length;e--;)n=t[e],(i(n)||o(n))&&(0<c.length&&n.attr("data-mce-content")?(n.name="#text",n.type=3,n.raw=!0,n.value=n.attr("data-mce-content")):n.attr(r,null))})})};!function e(){t.add("noneditable",function(t){n(t)})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/pagebreak/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "pagebreak" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/pagebreak')
+//   ES2015:
+//     import 'tinymce/plugins/pagebreak'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/pagebreak/plugin.js
@@ -1,1 +1,108 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var getSeparatorHtml = function (editor) {
+      return editor.getParam('pagebreak_separator', '<!-- pagebreak -->');
+    };
+    var shouldSplitBlock = function (editor) {
+      return editor.getParam('pagebreak_split_block', false);
+    };
+
+    var getPageBreakClass = function () {
+      return 'mce-pagebreak';
+    };
+    var getPlaceholderHtml = function () {
+      return '<img src="' + global$1.transparentSrc + '" class="' + getPageBreakClass() + '" data-mce-resize="false" data-mce-placeholder />';
+    };
+    var setup = function (editor) {
+      var separatorHtml = getSeparatorHtml(editor);
+      var pageBreakSeparatorRegExp = new RegExp(separatorHtml.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function (a) {
+        return '\\' + a;
+      }), 'gi');
+      editor.on('BeforeSetContent', function (e) {
+        e.content = e.content.replace(pageBreakSeparatorRegExp, getPlaceholderHtml());
+      });
+      editor.on('PreInit', function () {
+        editor.serializer.addNodeFilter('img', function (nodes) {
+          var i = nodes.length, node, className;
+          while (i--) {
+            node = nodes[i];
+            className = node.attr('class');
+            if (className && className.indexOf('mce-pagebreak') !== -1) {
+              var parentNode = node.parent;
+              if (editor.schema.getBlockElements()[parentNode.name] && shouldSplitBlock(editor)) {
+                parentNode.type = 3;
+                parentNode.value = separatorHtml;
+                parentNode.raw = true;
+                node.remove();
+                continue;
+              }
+              node.type = 3;
+              node.value = separatorHtml;
+              node.raw = true;
+            }
+          }
+        });
+      });
+    };
+
+    var register = function (editor) {
+      editor.addCommand('mcePageBreak', function () {
+        if (editor.settings.pagebreak_split_block) {
+          editor.insertContent('<p>' + getPlaceholderHtml() + '</p>');
+        } else {
+          editor.insertContent(getPlaceholderHtml());
+        }
+      });
+    };
+
+    var setup$1 = function (editor) {
+      editor.on('ResolveName', function (e) {
+        if (e.target.nodeName === 'IMG' && editor.dom.hasClass(e.target, getPageBreakClass())) {
+          e.name = 'pagebreak';
+        }
+      });
+    };
+
+    var register$1 = function (editor) {
+      editor.ui.registry.addButton('pagebreak', {
+        icon: 'page-break',
+        tooltip: 'Page break',
+        onAction: function () {
+          return editor.execCommand('mcePageBreak');
+        }
+      });
+      editor.ui.registry.addMenuItem('pagebreak', {
+        text: 'Page break',
+        icon: 'page-break',
+        onAction: function () {
+          return editor.execCommand('mcePageBreak');
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('pagebreak', function (editor) {
+        register(editor);
+        register$1(editor);
+        setup(editor);
+        setup$1(editor);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/pagebreak/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),c=function(){return"mce-pagebreak"},g=function(){return'<img src="'+a.transparentSrc+'" class="'+c()+'" data-mce-resize="false" data-mce-placeholder />'};!function n(){e.add("pagebreak",function(e){var a,n,o,i,t,r;(a=e).addCommand("mcePageBreak",function(){a.settings.pagebreak_split_block?a.insertContent("<p>"+g()+"</p>"):a.insertContent(g())}),(n=e).ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:function(){return n.execCommand("mcePageBreak")}}),n.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:function(){return n.execCommand("mcePageBreak")}}),i=(o=e).getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e"),t=new RegExp(i.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),o.on("BeforeSetContent",function(e){e.content=e.content.replace(t,g())}),o.on("PreInit",function(){o.serializer.addNodeFilter("img",function(e){for(var a,n,t=e.length;t--;)if((n=(a=e[t]).attr("class"))&&-1!==n.indexOf("mce-pagebreak")){var r=a.parent;if(o.schema.getBlockElements()[r.name]&&o.getParam("pagebreak_split_block",!1)){r.type=3,r.value=i,r.raw=!0,a.remove();continue}a.type=3,a.value=i,a.raw=!0}})}),(r=e).on("ResolveName",function(e){"IMG"===e.target.nodeName&&r.dom.hasClass(e.target,c())&&(e.name="pagebreak")})})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/paste/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "paste" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/paste')
+//   ES2015:
+//     import 'tinymce/plugins/paste'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/paste/plugin.js
@@ -1,1 +1,1684 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var hasProPlugin = function (editor) {
+      if (/(^|[ ,])powerpaste([, ]|$)/.test(editor.settings.plugins) && global.get('powerpaste')) {
+        if (typeof domGlobals.window.console !== 'undefined' && domGlobals.window.console.log) {
+          domGlobals.window.console.log('PowerPaste is incompatible with Paste plugin! Remove \'paste\' from the \'plugins\' option.');
+        }
+        return true;
+      } else {
+        return false;
+      }
+    };
+
+    var get = function (clipboard, quirks) {
+      return {
+        clipboard: clipboard,
+        quirks: quirks
+      };
+    };
+
+    var firePastePreProcess = function (editor, html, internal, isWordHtml) {
+      return editor.fire('PastePreProcess', {
+        content: html,
+        internal: internal,
+        wordContent: isWordHtml
+      });
+    };
+    var firePastePostProcess = function (editor, node, internal, isWordHtml) {
+      return editor.fire('PastePostProcess', {
+        node: node,
+        internal: internal,
+        wordContent: isWordHtml
+      });
+    };
+    var firePastePlainTextToggle = function (editor, state) {
+      return editor.fire('PastePlainTextToggle', { state: state });
+    };
+    var firePaste = function (editor, ieFake) {
+      return editor.fire('paste', { ieFake: ieFake });
+    };
+
+    var togglePlainTextPaste = function (editor, clipboard) {
+      if (clipboard.pasteFormat.get() === 'text') {
+        clipboard.pasteFormat.set('html');
+        firePastePlainTextToggle(editor, false);
+      } else {
+        clipboard.pasteFormat.set('text');
+        firePastePlainTextToggle(editor, true);
+      }
+      editor.focus();
+    };
+
+    var register = function (editor, clipboard) {
+      editor.addCommand('mceTogglePlainTextPaste', function () {
+        togglePlainTextPaste(editor, clipboard);
+      });
+      editor.addCommand('mceInsertClipboardContent', function (ui, value) {
+        if (value.content) {
+          clipboard.pasteHtml(value.content, value.internal);
+        }
+        if (value.text) {
+          clipboard.pasteText(value.text);
+        }
+      });
+    };
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var isSimpleType = function (type) {
+      return function (value) {
+        return typeof value === type;
+      };
+    };
+    var isFunction = isSimpleType('function');
+
+    var nativeSlice = Array.prototype.slice;
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var each = function (xs, f) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var filter = function (xs, pred) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          r.push(x);
+        }
+      }
+      return r;
+    };
+    var foldl = function (xs, f, acc) {
+      each(xs, function (x) {
+        acc = f(acc, x);
+      });
+      return acc;
+    };
+    var from$1 = isFunction(Array.from) ? Array.from : function (x) {
+      return nativeSlice.call(x);
+    };
+
+    var value = function () {
+      var subject = Cell(Option.none());
+      var clear = function () {
+        subject.set(Option.none());
+      };
+      var set = function (s) {
+        subject.set(Option.some(s));
+      };
+      var on = function (f) {
+        subject.get().each(f);
+      };
+      var isSet = function () {
+        return subject.get().isSome();
+      };
+      return {
+        clear: clear,
+        set: set,
+        isSet: isSet,
+        on: on
+      };
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Delay');
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.Promise');
+
+    var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var global$5 = tinymce.util.Tools.resolve('tinymce.util.VK');
+
+    var internalMimeType = 'x-tinymce/html';
+    var internalMark = '<!-- ' + internalMimeType + ' -->';
+    var mark = function (html) {
+      return internalMark + html;
+    };
+    var unmark = function (html) {
+      return html.replace(internalMark, '');
+    };
+    var isMarked = function (html) {
+      return html.indexOf(internalMark) !== -1;
+    };
+    var internalHtmlMime = function () {
+      return internalMimeType;
+    };
+
+    var global$6 = tinymce.util.Tools.resolve('tinymce.html.Entities');
+
+    var isPlainText = function (text) {
+      return !/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(text);
+    };
+    var toBRs = function (text) {
+      return text.replace(/\r?\n/g, '<br>');
+    };
+    var openContainer = function (rootTag, rootAttrs) {
+      var key;
+      var attrs = [];
+      var tag = '<' + rootTag;
+      if (typeof rootAttrs === 'object') {
+        for (key in rootAttrs) {
+          if (rootAttrs.hasOwnProperty(key)) {
+            attrs.push(key + '="' + global$6.encodeAllRaw(rootAttrs[key]) + '"');
+          }
+        }
+        if (attrs.length) {
+          tag += ' ' + attrs.join(' ');
+        }
+      }
+      return tag + '>';
+    };
+    var toBlockElements = function (text, rootTag, rootAttrs) {
+      var blocks = text.split(/\n\n/);
+      var tagOpen = openContainer(rootTag, rootAttrs);
+      var tagClose = '</' + rootTag + '>';
+      var paragraphs = global$4.map(blocks, function (p) {
+        return p.split(/\n/).join('<br />');
+      });
+      var stitch = function (p) {
+        return tagOpen + p + tagClose;
+      };
+      return paragraphs.length === 1 ? paragraphs[0] : global$4.map(paragraphs, stitch).join('');
+    };
+    var convert = function (text, rootTag, rootAttrs) {
+      return rootTag ? toBlockElements(text, rootTag === true ? 'p' : rootTag, rootAttrs) : toBRs(text);
+    };
+
+    var global$7 = tinymce.util.Tools.resolve('tinymce.html.DomParser');
+
+    var global$8 = tinymce.util.Tools.resolve('tinymce.html.Serializer');
+
+    var global$9 = tinymce.util.Tools.resolve('tinymce.html.Node');
+
+    var global$a = tinymce.util.Tools.resolve('tinymce.html.Schema');
+
+    var shouldBlockDrop = function (editor) {
+      return editor.getParam('paste_block_drop', false);
+    };
+    var shouldPasteDataImages = function (editor) {
+      return editor.getParam('paste_data_images', false);
+    };
+    var shouldFilterDrop = function (editor) {
+      return editor.getParam('paste_filter_drop', true);
+    };
+    var getPreProcess = function (editor) {
+      return editor.getParam('paste_preprocess');
+    };
+    var getPostProcess = function (editor) {
+      return editor.getParam('paste_postprocess');
+    };
+    var getWebkitStyles = function (editor) {
+      return editor.getParam('paste_webkit_styles');
+    };
+    var shouldRemoveWebKitStyles = function (editor) {
+      return editor.getParam('paste_remove_styles_if_webkit', true);
+    };
+    var shouldMergeFormats = function (editor) {
+      return editor.getParam('paste_merge_formats', true);
+    };
+    var isSmartPasteEnabled = function (editor) {
+      return editor.getParam('smart_paste', true);
+    };
+    var isPasteAsTextEnabled = function (editor) {
+      return editor.getParam('paste_as_text', false);
+    };
+    var getRetainStyleProps = function (editor) {
+      return editor.getParam('paste_retain_style_properties');
+    };
+    var getWordValidElements = function (editor) {
+      var defaultValidElements = '-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,' + '-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,' + 'td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody';
+      return editor.getParam('paste_word_valid_elements', defaultValidElements);
+    };
+    var shouldConvertWordFakeLists = function (editor) {
+      return editor.getParam('paste_convert_word_fake_lists', true);
+    };
+    var shouldUseDefaultFilters = function (editor) {
+      return editor.getParam('paste_enable_default_filters', true);
+    };
+
+    var nbsp = '\xA0';
+
+    function filter$1(content, items) {
+      global$4.each(items, function (v) {
+        if (v.constructor === RegExp) {
+          content = content.replace(v, '');
+        } else {
+          content = content.replace(v[0], v[1]);
+        }
+      });
+      return content;
+    }
+    function innerText(html) {
+      var schema = global$a();
+      var domParser = global$7({}, schema);
+      var text = '';
+      var shortEndedElements = schema.getShortEndedElements();
+      var ignoreElements = global$4.makeMap('script noscript style textarea video audio iframe object', ' ');
+      var blockElements = schema.getBlockElements();
+      function walk(node) {
+        var name = node.name, currentNode = node;
+        if (name === 'br') {
+          text += '\n';
+          return;
+        }
+        if (name === 'wbr') {
+          return;
+        }
+        if (shortEndedElements[name]) {
+          text += ' ';
+        }
+        if (ignoreElements[name]) {
+          text += ' ';
+          return;
+        }
+        if (node.type === 3) {
+          text += node.value;
+        }
+        if (!node.shortEnded) {
+          if (node = node.firstChild) {
+            do {
+              walk(node);
+            } while (node = node.next);
+          }
+        }
+        if (blockElements[name] && currentNode.next) {
+          text += '\n';
+          if (name === 'p') {
+            text += '\n';
+          }
+        }
+      }
+      html = filter$1(html, [/<!\[[^\]]+\]>/g]);
+      walk(domParser.parse(html));
+      return text;
+    }
+    function trimHtml(html) {
+      function trimSpaces(all, s1, s2) {
+        if (!s1 && !s2) {
+          return ' ';
+        }
+        return nbsp;
+      }
+      html = filter$1(html, [
+        /^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/ig,
+        /<!--StartFragment-->|<!--EndFragment-->/g,
+        [
+          /( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,
+          trimSpaces
+        ],
+        /<br class="Apple-interchange-newline">/g,
+        /<br>$/i
+      ]);
+      return html;
+    }
+    function createIdGenerator(prefix) {
+      var count = 0;
+      return function () {
+        return prefix + count++;
+      };
+    }
+    var isMsEdge = function () {
+      return domGlobals.navigator.userAgent.indexOf(' Edge/') !== -1;
+    };
+
+    function isWordContent(content) {
+      return /<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(content) || /class="OutlineElement/.test(content) || /id="?docs\-internal\-guid\-/.test(content);
+    }
+    function isNumericList(text) {
+      var found, patterns;
+      patterns = [
+        /^[IVXLMCD]{1,2}\.[ \u00a0]/,
+        /^[ivxlmcd]{1,2}\.[ \u00a0]/,
+        /^[a-z]{1,2}[\.\)][ \u00a0]/,
+        /^[A-Z]{1,2}[\.\)][ \u00a0]/,
+        /^[0-9]+\.[ \u00a0]/,
+        /^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,
+        /^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/
+      ];
+      text = text.replace(/^[\u00a0 ]+/, '');
+      global$4.each(patterns, function (pattern) {
+        if (pattern.test(text)) {
+          found = true;
+          return false;
+        }
+      });
+      return found;
+    }
+    function isBulletList(text) {
+      return /^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(text);
+    }
+    function convertFakeListsToProperLists(node) {
+      var currentListNode, prevListNode, lastLevel = 1;
+      function getText(node) {
+        var txt = '';
+        if (node.type === 3) {
+          return node.value;
+        }
+        if (node = node.firstChild) {
+          do {
+            txt += getText(node);
+          } while (node = node.next);
+        }
+        return txt;
+      }
+      function trimListStart(node, regExp) {
+        if (node.type === 3) {
+          if (regExp.test(node.value)) {
+            node.value = node.value.replace(regExp, '');
+            return false;
+          }
+        }
+        if (node = node.firstChild) {
+          do {
+            if (!trimListStart(node, regExp)) {
+              return false;
+            }
+          } while (node = node.next);
+        }
+        return true;
+      }
+      function removeIgnoredNodes(node) {
+        if (node._listIgnore) {
+          node.remove();
+          return;
+        }
+        if (node = node.firstChild) {
+          do {
+            removeIgnoredNodes(node);
+          } while (node = node.next);
+        }
+      }
+      function convertParagraphToLi(paragraphNode, listName, start) {
+        var level = paragraphNode._listLevel || lastLevel;
+        if (level !== lastLevel) {
+          if (level < lastLevel) {
+            if (currentListNode) {
+              currentListNode = currentListNode.parent.parent;
+            }
+          } else {
+            prevListNode = currentListNode;
+            currentListNode = null;
+          }
+        }
+        if (!currentListNode || currentListNode.name !== listName) {
+          prevListNode = prevListNode || currentListNode;
+          currentListNode = new global$9(listName, 1);
+          if (start > 1) {
+            currentListNode.attr('start', '' + start);
+          }
+          paragraphNode.wrap(currentListNode);
+        } else {
+          currentListNode.append(paragraphNode);
+        }
+        paragraphNode.name = 'li';
+        if (level > lastLevel && prevListNode) {
+          prevListNode.lastChild.append(currentListNode);
+        }
+        lastLevel = level;
+        removeIgnoredNodes(paragraphNode);
+        trimListStart(paragraphNode, /^\u00a0+/);
+        trimListStart(paragraphNode, /^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/);
+        trimListStart(paragraphNode, /^\u00a0+/);
+      }
+      var elements = [];
+      var child = node.firstChild;
+      while (typeof child !== 'undefined' && child !== null) {
+        elements.push(child);
+        child = child.walk();
+        if (child !== null) {
+          while (typeof child !== 'undefined' && child.parent !== node) {
+            child = child.walk();
+          }
+        }
+      }
+      for (var i = 0; i < elements.length; i++) {
+        node = elements[i];
+        if (node.name === 'p' && node.firstChild) {
+          var nodeText = getText(node);
+          if (isBulletList(nodeText)) {
+            convertParagraphToLi(node, 'ul');
+            continue;
+          }
+          if (isNumericList(nodeText)) {
+            var matches = /([0-9]+)\./.exec(nodeText);
+            var start = 1;
+            if (matches) {
+              start = parseInt(matches[1], 10);
+            }
+            convertParagraphToLi(node, 'ol', start);
+            continue;
+          }
+          if (node._listLevel) {
+            convertParagraphToLi(node, 'ul', 1);
+            continue;
+          }
+          currentListNode = null;
+        } else {
+          prevListNode = currentListNode;
+          currentListNode = null;
+        }
+      }
+    }
+    function filterStyles(editor, validStyles, node, styleValue) {
+      var outputStyles = {}, matches;
+      var styles = editor.dom.parseStyle(styleValue);
+      global$4.each(styles, function (value, name) {
+        switch (name) {
+        case 'mso-list':
+          matches = /\w+ \w+([0-9]+)/i.exec(styleValue);
+          if (matches) {
+            node._listLevel = parseInt(matches[1], 10);
+          }
+          if (/Ignore/i.test(value) && node.firstChild) {
+            node._listIgnore = true;
+            node.firstChild._listIgnore = true;
+          }
+          break;
+        case 'horiz-align':
+          name = 'text-align';
+          break;
+        case 'vert-align':
+          name = 'vertical-align';
+          break;
+        case 'font-color':
+        case 'mso-foreground':
+          name = 'color';
+          break;
+        case 'mso-background':
+        case 'mso-highlight':
+          name = 'background';
+          break;
+        case 'font-weight':
+        case 'font-style':
+          if (value !== 'normal') {
+            outputStyles[name] = value;
+          }
+          return;
+        case 'mso-element':
+          if (/^(comment|comment-list)$/i.test(value)) {
+            node.remove();
+            return;
+          }
+          break;
+        }
+        if (name.indexOf('mso-comment') === 0) {
+          node.remove();
+          return;
+        }
+        if (name.indexOf('mso-') === 0) {
+          return;
+        }
+        if (getRetainStyleProps(editor) === 'all' || validStyles && validStyles[name]) {
+          outputStyles[name] = value;
+        }
+      });
+      if (/(bold)/i.test(outputStyles['font-weight'])) {
+        delete outputStyles['font-weight'];
+        node.wrap(new global$9('b', 1));
+      }
+      if (/(italic)/i.test(outputStyles['font-style'])) {
+        delete outputStyles['font-style'];
+        node.wrap(new global$9('i', 1));
+      }
+      outputStyles = editor.dom.serializeStyle(outputStyles, node.name);
+      if (outputStyles) {
+        return outputStyles;
+      }
+      return null;
+    }
+    var filterWordContent = function (editor, content) {
+      var retainStyleProperties, validStyles;
+      retainStyleProperties = getRetainStyleProps(editor);
+      if (retainStyleProperties) {
+        validStyles = global$4.makeMap(retainStyleProperties.split(/[, ]/));
+      }
+      content = filter$1(content, [
+        /<br class="?Apple-interchange-newline"?>/gi,
+        /<b[^>]+id="?docs-internal-[^>]*>/gi,
+        /<!--[\s\S]+?-->/gi,
+        /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,
+        [
+          /<(\/?)s>/gi,
+          '<$1strike>'
+        ],
+        [
+          /&nbsp;/gi,
+          nbsp
+        ],
+        [
+          /<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,
+          function (str, spaces) {
+            return spaces.length > 0 ? spaces.replace(/./, ' ').slice(Math.floor(spaces.length / 2)).split('').join(nbsp) : '';
+          }
+        ]
+      ]);
+      var validElements = getWordValidElements(editor);
+      var schema = global$a({
+        valid_elements: validElements,
+        valid_children: '-li[p]'
+      });
+      global$4.each(schema.elements, function (rule) {
+        if (!rule.attributes.class) {
+          rule.attributes.class = {};
+          rule.attributesOrder.push('class');
+        }
+        if (!rule.attributes.style) {
+          rule.attributes.style = {};
+          rule.attributesOrder.push('style');
+        }
+      });
+      var domParser = global$7({}, schema);
+      domParser.addAttributeFilter('style', function (nodes) {
+        var i = nodes.length, node;
+        while (i--) {
+          node = nodes[i];
+          node.attr('style', filterStyles(editor, validStyles, node, node.attr('style')));
+          if (node.name === 'span' && node.parent && !node.attributes.length) {
+            node.unwrap();
+          }
+        }
+      });
+      domParser.addAttributeFilter('class', function (nodes) {
+        var i = nodes.length, node, className;
+        while (i--) {
+          node = nodes[i];
+          className = node.attr('class');
+          if (/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(className)) {
+            node.remove();
+          }
+          node.attr('class', null);
+        }
+      });
+      domParser.addNodeFilter('del', function (nodes) {
+        var i = nodes.length;
+        while (i--) {
+          nodes[i].remove();
+        }
+      });
+      domParser.addNodeFilter('a', function (nodes) {
+        var i = nodes.length, node, href, name;
+        while (i--) {
+          node = nodes[i];
+          href = node.attr('href');
+          name = node.attr('name');
+          if (href && href.indexOf('#_msocom_') !== -1) {
+            node.remove();
+            continue;
+          }
+          if (href && href.indexOf('file://') === 0) {
+            href = href.split('#')[1];
+            if (href) {
+              href = '#' + href;
+            }
+          }
+          if (!href && !name) {
+            node.unwrap();
+          } else {
+            if (name && !/^_?(?:toc|edn|ftn)/i.test(name)) {
+              node.unwrap();
+              continue;
+            }
+            node.attr({
+              href: href,
+              name: name
+            });
+          }
+        }
+      });
+      var rootNode = domParser.parse(content);
+      if (shouldConvertWordFakeLists(editor)) {
+        convertFakeListsToProperLists(rootNode);
+      }
+      content = global$8({ validate: editor.settings.validate }, schema).serialize(rootNode);
+      return content;
+    };
+    var preProcess = function (editor, content) {
+      return shouldUseDefaultFilters(editor) ? filterWordContent(editor, content) : content;
+    };
+
+    var preProcess$1 = function (editor, html) {
+      var parser = global$7({}, editor.schema);
+      parser.addNodeFilter('meta', function (nodes) {
+        global$4.each(nodes, function (node) {
+          return node.remove();
+        });
+      });
+      var fragment = parser.parse(html, {
+        forced_root_block: false,
+        isRootContent: true
+      });
+      return global$8({ validate: editor.settings.validate }, editor.schema).serialize(fragment);
+    };
+    var processResult = function (content, cancelled) {
+      return {
+        content: content,
+        cancelled: cancelled
+      };
+    };
+    var postProcessFilter = function (editor, html, internal, isWordHtml) {
+      var tempBody = editor.dom.create('div', { style: 'display:none' }, html);
+      var postProcessArgs = firePastePostProcess(editor, tempBody, internal, isWordHtml);
+      return processResult(postProcessArgs.node.innerHTML, postProcessArgs.isDefaultPrevented());
+    };
+    var filterContent = function (editor, content, internal, isWordHtml) {
+      var preProcessArgs = firePastePreProcess(editor, content, internal, isWordHtml);
+      var filteredContent = preProcess$1(editor, preProcessArgs.content);
+      if (editor.hasEventListeners('PastePostProcess') && !preProcessArgs.isDefaultPrevented()) {
+        return postProcessFilter(editor, filteredContent, internal, isWordHtml);
+      } else {
+        return processResult(filteredContent, preProcessArgs.isDefaultPrevented());
+      }
+    };
+    var process = function (editor, html, internal) {
+      var isWordHtml = isWordContent(html);
+      var content = isWordHtml ? preProcess(editor, html) : html;
+      return filterContent(editor, content, internal, isWordHtml);
+    };
+
+    var pasteHtml = function (editor, html) {
+      editor.insertContent(html, {
+        merge: shouldMergeFormats(editor),
+        paste: true
+      });
+      return true;
+    };
+    var isAbsoluteUrl = function (url) {
+      return /^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(url);
+    };
+    var isImageUrl = function (url) {
+      return isAbsoluteUrl(url) && /.(gif|jpe?g|png)$/.test(url);
+    };
+    var createImage = function (editor, url, pasteHtmlFn) {
+      editor.undoManager.extra(function () {
+        pasteHtmlFn(editor, url);
+      }, function () {
+        editor.insertContent('<img src="' + url + '">');
+      });
+      return true;
+    };
+    var createLink = function (editor, url, pasteHtmlFn) {
+      editor.undoManager.extra(function () {
+        pasteHtmlFn(editor, url);
+      }, function () {
+        editor.execCommand('mceInsertLink', false, url);
+      });
+      return true;
+    };
+    var linkSelection = function (editor, html, pasteHtmlFn) {
+      return editor.selection.isCollapsed() === false && isAbsoluteUrl(html) ? createLink(editor, html, pasteHtmlFn) : false;
+    };
+    var insertImage = function (editor, html, pasteHtmlFn) {
+      return isImageUrl(html) ? createImage(editor, html, pasteHtmlFn) : false;
+    };
+    var smartInsertContent = function (editor, html) {
+      global$4.each([
+        linkSelection,
+        insertImage,
+        pasteHtml
+      ], function (action) {
+        return action(editor, html, pasteHtml) !== true;
+      });
+    };
+    var insertContent = function (editor, html, pasteAsText) {
+      if (pasteAsText || isSmartPasteEnabled(editor) === false) {
+        pasteHtml(editor, html);
+      } else {
+        smartInsertContent(editor, html);
+      }
+    };
+
+    var isCollapsibleWhitespace = function (c) {
+      return ' \f\t\x0B'.indexOf(c) !== -1;
+    };
+    var isNewLineChar = function (c) {
+      return c === '\n' || c === '\r';
+    };
+    var isNewline = function (text, idx) {
+      return idx < text.length && idx >= 0 ? isNewLineChar(text[idx]) : false;
+    };
+    var normalizeWhitespace = function (text) {
+      var result = foldl(text, function (acc, c) {
+        if (isCollapsibleWhitespace(c) || c === nbsp) {
+          if (acc.pcIsSpace || acc.str === '' || acc.str.length === text.length - 1 || isNewline(text, acc.str.length + 1)) {
+            return {
+              pcIsSpace: false,
+              str: acc.str + nbsp
+            };
+          } else {
+            return {
+              pcIsSpace: true,
+              str: acc.str + ' '
+            };
+          }
+        } else {
+          return {
+            pcIsSpace: isNewLineChar(c),
+            str: acc.str + c
+          };
+        }
+      }, {
+        pcIsSpace: false,
+        str: ''
+      });
+      return result.str;
+    };
+
+    var doPaste = function (editor, content, internal, pasteAsText) {
+      var args = process(editor, content, internal);
+      if (args.cancelled === false) {
+        insertContent(editor, args.content, pasteAsText);
+      }
+    };
+    var pasteHtml$1 = function (editor, html, internalFlag) {
+      var internal = internalFlag ? internalFlag : isMarked(html);
+      doPaste(editor, unmark(html), internal, false);
+    };
+    var pasteText = function (editor, text) {
+      var encodedText = editor.dom.encode(text).replace(/\r\n/g, '\n');
+      var normalizedText = normalizeWhitespace(encodedText);
+      var html = convert(normalizedText, editor.settings.forced_root_block, editor.settings.forced_root_block_attrs);
+      doPaste(editor, html, false, true);
+    };
+    var getDataTransferItems = function (dataTransfer) {
+      var items = {};
+      var mceInternalUrlPrefix = 'data:text/mce-internal,';
+      if (dataTransfer) {
+        if (dataTransfer.getData) {
+          var legacyText = dataTransfer.getData('Text');
+          if (legacyText && legacyText.length > 0) {
+            if (legacyText.indexOf(mceInternalUrlPrefix) === -1) {
+              items['text/plain'] = legacyText;
+            }
+          }
+        }
+        if (dataTransfer.types) {
+          for (var i = 0; i < dataTransfer.types.length; i++) {
+            var contentType = dataTransfer.types[i];
+            try {
+              items[contentType] = dataTransfer.getData(contentType);
+            } catch (ex) {
+              items[contentType] = '';
+            }
+          }
+        }
+      }
+      return items;
+    };
+    var getClipboardContent = function (editor, clipboardEvent) {
+      var content = getDataTransferItems(clipboardEvent.clipboardData || editor.getDoc().dataTransfer);
+      return isMsEdge() ? global$4.extend(content, { 'text/html': '' }) : content;
+    };
+    var hasContentType = function (clipboardContent, mimeType) {
+      return mimeType in clipboardContent && clipboardContent[mimeType].length > 0;
+    };
+    var hasHtmlOrText = function (content) {
+      return hasContentType(content, 'text/html') || hasContentType(content, 'text/plain');
+    };
+    var parseDataUri = function (uri) {
+      var matches = /data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(uri);
+      if (matches) {
+        return {
+          type: matches[1],
+          data: decodeURIComponent(matches[2])
+        };
+      } else {
+        return {
+          type: null,
+          data: null
+        };
+      }
+    };
+    var isValidDataUriImage = function (settings, imgElm) {
+      return settings.images_dataimg_filter ? settings.images_dataimg_filter(imgElm) : true;
+    };
+    var extractFilename = function (editor, str) {
+      var m = str.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i);
+      return m ? editor.dom.encode(m[1]) : null;
+    };
+    var uniqueId = createIdGenerator('mceclip');
+    var pasteImage = function (editor, imageItem) {
+      var _a = parseDataUri(imageItem.uri), base64 = _a.data, type = _a.type;
+      var id = uniqueId();
+      var name = editor.settings.images_reuse_filename && imageItem.blob.name ? extractFilename(editor, imageItem.blob.name) : id;
+      var img = new domGlobals.Image();
+      img.src = imageItem.uri;
+      if (isValidDataUriImage(editor.settings, img)) {
+        var blobCache = editor.editorUpload.blobCache;
+        var blobInfo = void 0;
+        var existingBlobInfo = blobCache.getByData(base64, type);
+        if (!existingBlobInfo) {
+          blobInfo = blobCache.create(id, imageItem.blob, base64, name);
+          blobCache.add(blobInfo);
+        } else {
+          blobInfo = existingBlobInfo;
+        }
+        pasteHtml$1(editor, '<img src="' + blobInfo.blobUri() + '">', false);
+      } else {
+        pasteHtml$1(editor, '<img src="' + imageItem.uri + '">', false);
+      }
+    };
+    var isClipboardEvent = function (event) {
+      return event.type === 'paste';
+    };
+    var readBlobsAsDataUris = function (items) {
+      return global$3.all(map(items, function (item) {
+        return new global$3(function (resolve) {
+          var blob = item.getAsFile ? item.getAsFile() : item;
+          var reader = new window.FileReader();
+          reader.onload = function () {
+            resolve({
+              blob: blob,
+              uri: reader.result
+            });
+          };
+          reader.readAsDataURL(blob);
+        });
+      }));
+    };
+    var getImagesFromDataTransfer = function (dataTransfer) {
+      var items = dataTransfer.items ? map(from$1(dataTransfer.items), function (item) {
+        return item.getAsFile();
+      }) : [];
+      var files = dataTransfer.files ? from$1(dataTransfer.files) : [];
+      var images = filter(items.length > 0 ? items : files, function (file) {
+        return /^image\/(jpeg|png|gif|bmp)$/.test(file.type);
+      });
+      return images;
+    };
+    var pasteImageData = function (editor, e, rng) {
+      var dataTransfer = isClipboardEvent(e) ? e.clipboardData : e.dataTransfer;
+      if (editor.settings.paste_data_images && dataTransfer) {
+        var images = getImagesFromDataTransfer(dataTransfer);
+        if (images.length > 0) {
+          e.preventDefault();
+          readBlobsAsDataUris(images).then(function (blobResults) {
+            if (rng) {
+              editor.selection.setRng(rng);
+            }
+            each(blobResults, function (result) {
+              pasteImage(editor, result);
+            });
+          });
+          return true;
+        }
+      }
+      return false;
+    };
+    var isBrokenAndroidClipboardEvent = function (e) {
+      var clipboardData = e.clipboardData;
+      return domGlobals.navigator.userAgent.indexOf('Android') !== -1 && clipboardData && clipboardData.items && clipboardData.items.length === 0;
+    };
+    var isKeyboardPasteEvent = function (e) {
+      return global$5.metaKeyPressed(e) && e.keyCode === 86 || e.shiftKey && e.keyCode === 45;
+    };
+    var registerEventHandlers = function (editor, pasteBin, pasteFormat) {
+      var keyboardPasteEvent = value();
+      var keyboardPastePlainTextState;
+      editor.on('keydown', function (e) {
+        function removePasteBinOnKeyUp(e) {
+          if (isKeyboardPasteEvent(e) && !e.isDefaultPrevented()) {
+            pasteBin.remove();
+          }
+        }
+        if (isKeyboardPasteEvent(e) && !e.isDefaultPrevented()) {
+          keyboardPastePlainTextState = e.shiftKey && e.keyCode === 86;
+          if (keyboardPastePlainTextState && global$1.webkit && domGlobals.navigator.userAgent.indexOf('Version/') !== -1) {
+            return;
+          }
+          e.stopImmediatePropagation();
+          keyboardPasteEvent.set(e);
+          window.setTimeout(function () {
+            keyboardPasteEvent.clear();
+          }, 100);
+          if (global$1.ie && keyboardPastePlainTextState) {
+            e.preventDefault();
+            firePaste(editor, true);
+            return;
+          }
+          pasteBin.remove();
+          pasteBin.create();
+          editor.once('keyup', removePasteBinOnKeyUp);
+          editor.once('paste', function () {
+            editor.off('keyup', removePasteBinOnKeyUp);
+          });
+        }
+      });
+      function insertClipboardContent(clipboardContent, isKeyBoardPaste, plainTextMode, internal) {
+        var content, isPlainTextHtml, isImage;
+        if (hasContentType(clipboardContent, 'text/html')) {
+          content = clipboardContent['text/html'];
+        } else {
+          content = pasteBin.getHtml();
+          internal = internal ? internal : isMarked(content);
+          if (pasteBin.isDefaultContent(content)) {
+            plainTextMode = true;
+          }
+        }
+        content = trimHtml(content);
+        pasteBin.remove();
+        isPlainTextHtml = internal === false && isPlainText(content);
+        isImage = isImageUrl(content);
+        if (!content.length || isPlainTextHtml && !isImage) {
+          plainTextMode = true;
+        }
+        if (plainTextMode || isImage) {
+          if (hasContentType(clipboardContent, 'text/plain') && isPlainTextHtml) {
+            content = clipboardContent['text/plain'];
+          } else {
+            content = innerText(content);
+          }
+        }
+        if (pasteBin.isDefaultContent(content)) {
+          if (!isKeyBoardPaste) {
+            editor.windowManager.alert('Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.');
+          }
+          return;
+        }
+        if (plainTextMode) {
+          pasteText(editor, content);
+        } else {
+          pasteHtml$1(editor, content, internal);
+        }
+      }
+      var getLastRng = function () {
+        return pasteBin.getLastRng() || editor.selection.getRng();
+      };
+      editor.on('paste', function (e) {
+        var isKeyBoardPaste = keyboardPasteEvent.isSet();
+        var clipboardContent = getClipboardContent(editor, e);
+        var plainTextMode = pasteFormat.get() === 'text' || keyboardPastePlainTextState;
+        var internal = hasContentType(clipboardContent, internalHtmlMime());
+        keyboardPastePlainTextState = false;
+        if (e.isDefaultPrevented() || isBrokenAndroidClipboardEvent(e)) {
+          pasteBin.remove();
+          return;
+        }
+        if (!hasHtmlOrText(clipboardContent) && pasteImageData(editor, e, getLastRng())) {
+          pasteBin.remove();
+          return;
+        }
+        if (!isKeyBoardPaste) {
+          e.preventDefault();
+        }
+        if (global$1.ie && (!isKeyBoardPaste || e.ieFake) && !hasContentType(clipboardContent, 'text/html')) {
+          pasteBin.create();
+          editor.dom.bind(pasteBin.getEl(), 'paste', function (e) {
+            e.stopPropagation();
+          });
+          editor.getDoc().execCommand('Paste', false, null);
+          clipboardContent['text/html'] = pasteBin.getHtml();
+        }
+        if (hasContentType(clipboardContent, 'text/html')) {
+          e.preventDefault();
+          if (!internal) {
+            internal = isMarked(clipboardContent['text/html']);
+          }
+          insertClipboardContent(clipboardContent, isKeyBoardPaste, plainTextMode, internal);
+        } else {
+          global$2.setEditorTimeout(editor, function () {
+            insertClipboardContent(clipboardContent, isKeyBoardPaste, plainTextMode, internal);
+          }, 0);
+        }
+      });
+    };
+    var registerEventsAndFilters = function (editor, pasteBin, pasteFormat) {
+      registerEventHandlers(editor, pasteBin, pasteFormat);
+      var src;
+      editor.parser.addNodeFilter('img', function (nodes, name, args) {
+        var isPasteInsert = function (args) {
+          return args.data && args.data.paste === true;
+        };
+        var remove = function (node) {
+          if (!node.attr('data-mce-object') && src !== global$1.transparentSrc) {
+            node.remove();
+          }
+        };
+        var isWebKitFakeUrl = function (src) {
+          return src.indexOf('webkit-fake-url') === 0;
+        };
+        var isDataUri = function (src) {
+          return src.indexOf('data:') === 0;
+        };
+        if (!editor.settings.paste_data_images && isPasteInsert(args)) {
+          var i = nodes.length;
+          while (i--) {
+            src = nodes[i].attr('src');
+            if (!src) {
+              continue;
+            }
+            if (isWebKitFakeUrl(src)) {
+              remove(nodes[i]);
+            } else if (!editor.settings.allow_html_data_urls && isDataUri(src)) {
+              remove(nodes[i]);
+            }
+          }
+        }
+      });
+    };
+
+    var getPasteBinParent = function (editor) {
+      return global$1.ie && editor.inline ? domGlobals.document.body : editor.getBody();
+    };
+    var isExternalPasteBin = function (editor) {
+      return getPasteBinParent(editor) !== editor.getBody();
+    };
+    var delegatePasteEvents = function (editor, pasteBinElm, pasteBinDefaultContent) {
+      if (isExternalPasteBin(editor)) {
+        editor.dom.bind(pasteBinElm, 'paste keyup', function (_e) {
+          if (!isDefault(editor, pasteBinDefaultContent)) {
+            editor.fire('paste');
+          }
+        });
+      }
+    };
+    var create = function (editor, lastRngCell, pasteBinDefaultContent) {
+      var dom = editor.dom, body = editor.getBody();
+      var pasteBinElm;
+      lastRngCell.set(editor.selection.getRng());
+      pasteBinElm = editor.dom.add(getPasteBinParent(editor), 'div', {
+        'id': 'mcepastebin',
+        'class': 'mce-pastebin',
+        'contentEditable': true,
+        'data-mce-bogus': 'all',
+        'style': 'position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0'
+      }, pasteBinDefaultContent);
+      if (global$1.ie || global$1.gecko) {
+        dom.setStyle(pasteBinElm, 'left', dom.getStyle(body, 'direction', true) === 'rtl' ? 65535 : -65535);
+      }
+      dom.bind(pasteBinElm, 'beforedeactivate focusin focusout', function (e) {
+        e.stopPropagation();
+      });
+      delegatePasteEvents(editor, pasteBinElm, pasteBinDefaultContent);
+      pasteBinElm.focus();
+      editor.selection.select(pasteBinElm, true);
+    };
+    var remove = function (editor, lastRngCell) {
+      if (getEl(editor)) {
+        var pasteBinClone = void 0;
+        var lastRng = lastRngCell.get();
+        while (pasteBinClone = editor.dom.get('mcepastebin')) {
+          editor.dom.remove(pasteBinClone);
+          editor.dom.unbind(pasteBinClone);
+        }
+        if (lastRng) {
+          editor.selection.setRng(lastRng);
+        }
+      }
+      lastRngCell.set(null);
+    };
+    var getEl = function (editor) {
+      return editor.dom.get('mcepastebin');
+    };
+    var getHtml = function (editor) {
+      var pasteBinElm, pasteBinClones, i, dirtyWrappers, cleanWrapper;
+      var copyAndRemove = function (toElm, fromElm) {
+        toElm.appendChild(fromElm);
+        editor.dom.remove(fromElm, true);
+      };
+      pasteBinClones = global$4.grep(getPasteBinParent(editor).childNodes, function (elm) {
+        return elm.id === 'mcepastebin';
+      });
+      pasteBinElm = pasteBinClones.shift();
+      global$4.each(pasteBinClones, function (pasteBinClone) {
+        copyAndRemove(pasteBinElm, pasteBinClone);
+      });
+      dirtyWrappers = editor.dom.select('div[id=mcepastebin]', pasteBinElm);
+      for (i = dirtyWrappers.length - 1; i >= 0; i--) {
+        cleanWrapper = editor.dom.create('div');
+        pasteBinElm.insertBefore(cleanWrapper, dirtyWrappers[i]);
+        copyAndRemove(cleanWrapper, dirtyWrappers[i]);
+      }
+      return pasteBinElm ? pasteBinElm.innerHTML : '';
+    };
+    var getLastRng = function (lastRng) {
+      return lastRng.get();
+    };
+    var isDefaultContent = function (pasteBinDefaultContent, content) {
+      return content === pasteBinDefaultContent;
+    };
+    var isPasteBin = function (elm) {
+      return elm && elm.id === 'mcepastebin';
+    };
+    var isDefault = function (editor, pasteBinDefaultContent) {
+      var pasteBinElm = getEl(editor);
+      return isPasteBin(pasteBinElm) && isDefaultContent(pasteBinDefaultContent, pasteBinElm.innerHTML);
+    };
+    var PasteBin = function (editor) {
+      var lastRng = Cell(null);
+      var pasteBinDefaultContent = '%MCEPASTEBIN%';
+      return {
+        create: function () {
+          return create(editor, lastRng, pasteBinDefaultContent);
+        },
+        remove: function () {
+          return remove(editor, lastRng);
+        },
+        getEl: function () {
+          return getEl(editor);
+        },
+        getHtml: function () {
+          return getHtml(editor);
+        },
+        getLastRng: function () {
+          return getLastRng(lastRng);
+        },
+        isDefault: function () {
+          return isDefault(editor, pasteBinDefaultContent);
+        },
+        isDefaultContent: function (content) {
+          return isDefaultContent(pasteBinDefaultContent, content);
+        }
+      };
+    };
+
+    var Clipboard = function (editor, pasteFormat) {
+      var pasteBin = PasteBin(editor);
+      editor.on('PreInit', function () {
+        return registerEventsAndFilters(editor, pasteBin, pasteFormat);
+      });
+      return {
+        pasteFormat: pasteFormat,
+        pasteHtml: function (html, internalFlag) {
+          return pasteHtml$1(editor, html, internalFlag);
+        },
+        pasteText: function (text) {
+          return pasteText(editor, text);
+        },
+        pasteImageData: function (e, rng) {
+          return pasteImageData(editor, e, rng);
+        },
+        getDataTransferItems: getDataTransferItems,
+        hasHtmlOrText: hasHtmlOrText,
+        hasContentType: hasContentType
+      };
+    };
+
+    var hasWorkingClipboardApi = function (clipboardData) {
+      return global$1.iOS === false && clipboardData !== undefined && typeof clipboardData.setData === 'function' && isMsEdge() !== true;
+    };
+    var setHtml5Clipboard = function (clipboardData, html, text) {
+      if (hasWorkingClipboardApi(clipboardData)) {
+        try {
+          clipboardData.clearData();
+          clipboardData.setData('text/html', html);
+          clipboardData.setData('text/plain', text);
+          clipboardData.setData(internalHtmlMime(), html);
+          return true;
+        } catch (e) {
+          return false;
+        }
+      } else {
+        return false;
+      }
+    };
+    var setClipboardData = function (evt, data, fallback, done) {
+      if (setHtml5Clipboard(evt.clipboardData, data.html, data.text)) {
+        evt.preventDefault();
+        done();
+      } else {
+        fallback(data.html, done);
+      }
+    };
+    var fallback = function (editor) {
+      return function (html, done) {
+        var markedHtml = mark(html);
+        var outer = editor.dom.create('div', {
+          'contenteditable': 'false',
+          'data-mce-bogus': 'all'
+        });
+        var inner = editor.dom.create('div', { contenteditable: 'true' }, markedHtml);
+        editor.dom.setStyles(outer, {
+          position: 'fixed',
+          top: '0',
+          left: '-3000px',
+          width: '1000px',
+          overflow: 'hidden'
+        });
+        outer.appendChild(inner);
+        editor.dom.add(editor.getBody(), outer);
+        var range = editor.selection.getRng();
+        inner.focus();
+        var offscreenRange = editor.dom.createRng();
+        offscreenRange.selectNodeContents(inner);
+        editor.selection.setRng(offscreenRange);
+        global$2.setTimeout(function () {
+          editor.selection.setRng(range);
+          outer.parentNode.removeChild(outer);
+          done();
+        }, 0);
+      };
+    };
+    var getData = function (editor) {
+      return {
+        html: editor.selection.getContent({ contextual: true }),
+        text: editor.selection.getContent({ format: 'text' })
+      };
+    };
+    var isTableSelection = function (editor) {
+      return !!editor.dom.getParent(editor.selection.getStart(), 'td[data-mce-selected],th[data-mce-selected]', editor.getBody());
+    };
+    var hasSelectedContent = function (editor) {
+      return !editor.selection.isCollapsed() || isTableSelection(editor);
+    };
+    var cut = function (editor) {
+      return function (evt) {
+        if (hasSelectedContent(editor)) {
+          setClipboardData(evt, getData(editor), fallback(editor), function () {
+            if (global$1.browser.isChrome()) {
+              var rng_1 = editor.selection.getRng();
+              global$2.setEditorTimeout(editor, function () {
+                editor.selection.setRng(rng_1);
+                editor.execCommand('Delete');
+              }, 0);
+            } else {
+              editor.execCommand('Delete');
+            }
+          });
+        }
+      };
+    };
+    var copy = function (editor) {
+      return function (evt) {
+        if (hasSelectedContent(editor)) {
+          setClipboardData(evt, getData(editor), fallback(editor), function () {
+          });
+        }
+      };
+    };
+    var register$1 = function (editor) {
+      editor.on('cut', cut(editor));
+      editor.on('copy', copy(editor));
+    };
+
+    var global$b = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');
+
+    var getCaretRangeFromEvent = function (editor, e) {
+      return global$b.getCaretRangeFromPoint(e.clientX, e.clientY, editor.getDoc());
+    };
+    var isPlainTextFileUrl = function (content) {
+      var plainTextContent = content['text/plain'];
+      return plainTextContent ? plainTextContent.indexOf('file://') === 0 : false;
+    };
+    var setFocusedRange = function (editor, rng) {
+      editor.focus();
+      editor.selection.setRng(rng);
+    };
+    var setup = function (editor, clipboard, draggingInternallyState) {
+      if (shouldBlockDrop(editor)) {
+        editor.on('dragend dragover draggesture dragdrop drop drag', function (e) {
+          e.preventDefault();
+          e.stopPropagation();
+        });
+      }
+      if (!shouldPasteDataImages(editor)) {
+        editor.on('drop', function (e) {
+          var dataTransfer = e.dataTransfer;
+          if (dataTransfer && dataTransfer.files && dataTransfer.files.length > 0) {
+            e.preventDefault();
+          }
+        });
+      }
+      editor.on('drop', function (e) {
+        var dropContent, rng;
+        rng = getCaretRangeFromEvent(editor, e);
+        if (e.isDefaultPrevented() || draggingInternallyState.get()) {
+          return;
+        }
+        dropContent = clipboard.getDataTransferItems(e.dataTransfer);
+        var internal = clipboard.hasContentType(dropContent, internalHtmlMime());
+        if ((!clipboard.hasHtmlOrText(dropContent) || isPlainTextFileUrl(dropContent)) && clipboard.pasteImageData(e, rng)) {
+          return;
+        }
+        if (rng && shouldFilterDrop(editor)) {
+          var content_1 = dropContent['mce-internal'] || dropContent['text/html'] || dropContent['text/plain'];
+          if (content_1) {
+            e.preventDefault();
+            global$2.setEditorTimeout(editor, function () {
+              editor.undoManager.transact(function () {
+                if (dropContent['mce-internal']) {
+                  editor.execCommand('Delete');
+                }
+                setFocusedRange(editor, rng);
+                content_1 = trimHtml(content_1);
+                if (!dropContent['text/html']) {
+                  clipboard.pasteText(content_1);
+                } else {
+                  clipboard.pasteHtml(content_1, internal);
+                }
+              });
+            });
+          }
+        }
+      });
+      editor.on('dragstart', function (_e) {
+        draggingInternallyState.set(true);
+      });
+      editor.on('dragover dragend', function (e) {
+        if (shouldPasteDataImages(editor) && draggingInternallyState.get() === false) {
+          e.preventDefault();
+          setFocusedRange(editor, getCaretRangeFromEvent(editor, e));
+        }
+        if (e.type === 'dragend') {
+          draggingInternallyState.set(false);
+        }
+      });
+    };
+
+    var setup$1 = function (editor) {
+      var plugin = editor.plugins.paste;
+      var preProcess = getPreProcess(editor);
+      if (preProcess) {
+        editor.on('PastePreProcess', function (e) {
+          preProcess.call(plugin, plugin, e);
+        });
+      }
+      var postProcess = getPostProcess(editor);
+      if (postProcess) {
+        editor.on('PastePostProcess', function (e) {
+          postProcess.call(plugin, plugin, e);
+        });
+      }
+    };
+
+    function addPreProcessFilter(editor, filterFunc) {
+      editor.on('PastePreProcess', function (e) {
+        e.content = filterFunc(editor, e.content, e.internal, e.wordContent);
+      });
+    }
+    function addPostProcessFilter(editor, filterFunc) {
+      editor.on('PastePostProcess', function (e) {
+        filterFunc(editor, e.node);
+      });
+    }
+    function removeExplorerBrElementsAfterBlocks(editor, html) {
+      if (!isWordContent(html)) {
+        return html;
+      }
+      var blockElements = [];
+      global$4.each(editor.schema.getBlockElements(), function (block, blockName) {
+        blockElements.push(blockName);
+      });
+      var explorerBlocksRegExp = new RegExp('(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?(' + blockElements.join('|') + ')[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*', 'g');
+      html = filter$1(html, [[
+          explorerBlocksRegExp,
+          '$1'
+        ]]);
+      html = filter$1(html, [
+        [
+          /<br><br>/g,
+          '<BR><BR>'
+        ],
+        [
+          /<br>/g,
+          ' '
+        ],
+        [
+          /<BR><BR>/g,
+          '<br>'
+        ]
+      ]);
+      return html;
+    }
+    function removeWebKitStyles(editor, content, internal, isWordHtml) {
+      if (isWordHtml || internal) {
+        return content;
+      }
+      var webKitStylesSetting = getWebkitStyles(editor);
+      var webKitStyles;
+      if (shouldRemoveWebKitStyles(editor) === false || webKitStylesSetting === 'all') {
+        return content;
+      }
+      if (webKitStylesSetting) {
+        webKitStyles = webKitStylesSetting.split(/[, ]/);
+      }
+      if (webKitStyles) {
+        var dom_1 = editor.dom, node_1 = editor.selection.getNode();
+        content = content.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi, function (all, before, value, after) {
+          var inputStyles = dom_1.parseStyle(dom_1.decode(value));
+          var outputStyles = {};
+          if (webKitStyles === 'none') {
+            return before + after;
+          }
+          for (var i = 0; i < webKitStyles.length; i++) {
+            var inputValue = inputStyles[webKitStyles[i]], currentValue = dom_1.getStyle(node_1, webKitStyles[i], true);
+            if (/color/.test(webKitStyles[i])) {
+              inputValue = dom_1.toHex(inputValue);
+              currentValue = dom_1.toHex(currentValue);
+            }
+            if (currentValue !== inputValue) {
+              outputStyles[webKitStyles[i]] = inputValue;
+            }
+          }
+          outputStyles = dom_1.serializeStyle(outputStyles, 'span');
+          if (outputStyles) {
+            return before + ' style="' + outputStyles + '"' + after;
+          }
+          return before + after;
+        });
+      } else {
+        content = content.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi, '$1$3');
+      }
+      content = content.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi, function (all, before, value, after) {
+        return before + ' style="' + value + '"' + after;
+      });
+      return content;
+    }
+    function removeUnderlineAndFontInAnchor(editor, root) {
+      editor.$('a', root).find('font,u').each(function (i, node) {
+        editor.dom.remove(node, true);
+      });
+    }
+    var setup$2 = function (editor) {
+      if (global$1.webkit) {
+        addPreProcessFilter(editor, removeWebKitStyles);
+      }
+      if (global$1.ie) {
+        addPreProcessFilter(editor, removeExplorerBrElementsAfterBlocks);
+        addPostProcessFilter(editor, removeUnderlineAndFontInAnchor);
+      }
+    };
+
+    var makeSetupHandler = function (editor, clipboard) {
+      return function (api) {
+        api.setActive(clipboard.pasteFormat.get() === 'text');
+        var pastePlainTextToggleHandler = function (e) {
+          return api.setActive(e.state);
+        };
+        editor.on('PastePlainTextToggle', pastePlainTextToggleHandler);
+        return function () {
+          return editor.off('PastePlainTextToggle', pastePlainTextToggleHandler);
+        };
+      };
+    };
+    var register$2 = function (editor, clipboard) {
+      editor.ui.registry.addToggleButton('pastetext', {
+        active: false,
+        icon: 'paste-text',
+        tooltip: 'Paste as text',
+        onAction: function () {
+          return editor.execCommand('mceTogglePlainTextPaste');
+        },
+        onSetup: makeSetupHandler(editor, clipboard)
+      });
+      editor.ui.registry.addToggleMenuItem('pastetext', {
+        text: 'Paste as text',
+        icon: 'paste-text',
+        onAction: function () {
+          return editor.execCommand('mceTogglePlainTextPaste');
+        },
+        onSetup: makeSetupHandler(editor, clipboard)
+      });
+    };
+
+    function Plugin () {
+      global.add('paste', function (editor) {
+        if (hasProPlugin(editor) === false) {
+          var draggingInternallyState = Cell(false);
+          var pasteFormat = Cell(isPasteAsTextEnabled(editor) ? 'text' : 'html');
+          var clipboard = Clipboard(editor, pasteFormat);
+          var quirks = setup$2(editor);
+          register$2(editor, clipboard);
+          register(editor, clipboard);
+          setup$1(editor);
+          register$1(editor);
+          setup(editor, clipboard, draggingInternallyState);
+          return get(clipboard, quirks);
+        }
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/paste/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(y){"use strict";var e,t,n,r,p=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},c=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e,t){return e.fire("PastePlainTextToggle",{state:t})},f=function(n,r){n.addCommand("mceTogglePlainTextPaste",function(){var e,t;e=n,"text"===(t=r).pasteFormat.get()?(t.pasteFormat.set("html"),i(e,!1)):(t.pasteFormat.set("text"),i(e,!0)),e.focus()}),n.addCommand("mceInsertClipboardContent",function(e,t){t.content&&r.pasteHtml(t.content,t.internal),t.text&&r.pasteText(t.text)})},o=function(e){return function(){return e}},a=o(!1),s=o(!0),u=function(){return l},l=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:a,isSome:a,isNone:s,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:n,orThunk:t,map:u,each:function(){},bind:u,exists:a,forall:s,filter:u,equals:e,equals_:e,toArray:function(){return[]},toString:o("none()")}),d=function(n){var e=o(n),t=function(){return i},r=function(e){return e(n)},i={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:s,isNone:a,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return d(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?i:l},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(a,function(e){return t(n,e)})}};return i},g={some:d,none:u,from:function(e){return null===e||e===undefined?l:d(e)}},m=(r="function",function(e){return typeof e===r}),v=Array.prototype.slice,h=function(e,t){for(var n=e.length,r=new Array(n),i=0;i<n;i++){var o=e[i];r[i]=t(o,i)}return r},b=function(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n)}},x=m(Array.from)?Array.from:function(e){return v.call(e)},w=tinymce.util.Tools.resolve("tinymce.Env"),P=tinymce.util.Tools.resolve("tinymce.util.Delay"),_=tinymce.util.Tools.resolve("tinymce.util.Promise"),T=tinymce.util.Tools.resolve("tinymce.util.Tools"),C=tinymce.util.Tools.resolve("tinymce.util.VK"),D="x-tinymce/html",k="\x3c!-- "+D+" --\x3e",S=function(e){return-1!==e.indexOf(k)},O=tinymce.util.Tools.resolve("tinymce.html.Entities"),R=function(e,t,n){var r=e.split(/\n\n/),i=function(e,t){var n,r=[],i="<"+e;if("object"==typeof t){for(n in t)t.hasOwnProperty(n)&&r.push(n+'="'+O.encodeAllRaw(t[n])+'"');r.length&&(i+=" "+r.join(" "))}return i+">"}(t,n),o="</"+t+">",a=T.map(r,function(e){return e.split(/\n/).join("<br />")});return 1===a.length?a[0]:T.map(a,function(e){return i+e+o}).join("")},A=tinymce.util.Tools.resolve("tinymce.html.DomParser"),I=tinymce.util.Tools.resolve("tinymce.html.Serializer"),E=tinymce.util.Tools.resolve("tinymce.html.Node"),F=tinymce.util.Tools.resolve("tinymce.html.Schema"),M=function(e){return e.getParam("paste_data_images",!1)},N=function(e){return e.getParam("paste_retain_style_properties")},B="\xa0";function $(t,e){return T.each(e,function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function H(e){var t=F(),n=A({},t),r="",i=t.getShortEndedElements(),o=T.makeMap("script noscript style textarea video audio iframe object"," "),a=t.getBlockElements();return e=$(e,[/<!\[[^\]]+\]>/g]),function s(e){var t=e.name,n=e;if("br"!==t){if("wbr"!==t)if(i[t]&&(r+=" "),o[t])r+=" ";else{if(3===e.type&&(r+=e.value),!e.shortEnded&&(e=e.firstChild))for(;s(e),e=e.next;);a[t]&&n.next&&(r+="\n","p"===t&&(r+="\n"))}}else r+="\n"}(n.parse(e)),r}function j(e){return e=$(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function r(e,t,n){return t||n?B:" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])}var L=function(){return-1!==y.navigator.userAgent.indexOf(" Edge/")};function z(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}function U(t){var n,e;return e=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],t=t.replace(/^[\u00a0 ]+/,""),T.each(e,function(e){if(e.test(t))return!(n=!0)}),n}function q(e){var o,a,s=1;function n(e){var t="";if(3===e.type)return e.value;if(e=e.firstChild)for(;t+=n(e),e=e.next;);return t}function u(e,t){if(3!==e.type||!t.test(e.value)){if(e=e.firstChild)do{if(!u(e,t))return}while(e=e.next);return 1}e.value=e.value.replace(t,"")}function t(e,t,n){var r=e._listLevel||s;r!==s&&(o=r<s?o&&o.parent.parent:(a=o,null)),o&&o.name===t?o.append(e):(a=a||o,o=new E(t,1),1<n&&o.attr("start",""+n),e.wrap(o)),e.name="li",s<r&&a&&a.lastChild.append(o),s=r,function i(e){if(e._listIgnore)e.remove();else if(e=e.firstChild)for(;i(e),e=e.next;);}(e),u(e,/^\u00a0+/),u(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),u(e,/^\u00a0+/)}for(var r=[],i=e.firstChild;null!=i;)if(r.push(i),null!==(i=i.walk()))for(;void 0!==i&&i.parent!==e;)i=i.walk();for(var l=0;l<r.length;l++)if("p"===(e=r[l]).name&&e.firstChild){var c=n(e);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(c)){t(e,"ul");continue}if(U(c)){var f=/([0-9]+)\./.exec(c),d=1;f&&(d=parseInt(f[1],10)),t(e,"ol",d);continue}if(e._listLevel){t(e,"ul",1);continue}o=null}else a=o,o=null}function V(n,r,i,o){var a,s={},e=n.dom.parseStyle(o);return T.each(e,function(e,t){switch(t){case"mso-list":(a=/\w+ \w+([0-9]+)/i.exec(o))&&(i._listLevel=parseInt(a[1],10)),/Ignore/i.test(e)&&i.firstChild&&(i._listIgnore=!0,i.firstChild._listIgnore=!0);break;case"horiz-align":t="text-align";break;case"vert-align":t="vertical-align";break;case"font-color":case"mso-foreground":t="color";break;case"mso-background":case"mso-highlight":t="background";break;case"font-weight":case"font-style":return void("normal"!==e&&(s[t]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void i.remove()}0!==t.indexOf("mso-comment")?0!==t.indexOf("mso-")&&("all"===N(n)||r&&r[t])&&(s[t]=e):i.remove()}),/(bold)/i.test(s["font-weight"])&&(delete s["font-weight"],i.wrap(new E("b",1))),/(italic)/i.test(s["font-style"])&&(delete s["font-style"],i.wrap(new E("i",1))),(s=n.dom.serializeStyle(s,i.name))||null}var K=function(e,t){return e.getParam("paste_enable_default_filters",!0)?function(r,e){var t,i;(t=N(r))&&(i=T.makeMap(t.split(/[, ]/))),e=$(e,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,B],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return 0<t.length?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join(B):""}]]);var n=r.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody"),o=F({valid_elements:n,valid_children:"-li[p]"});T.each(o.elements,function(e){e.attributes["class"]||(e.attributes["class"]={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var a=A({},o);a.addAttributeFilter("style",function(e){for(var t,n=e.length;n--;)(t=e[n]).attr("style",V(r,i,t,t.attr("style"))),"span"===t.name&&t.parent&&!t.attributes.length&&t.unwrap()}),a.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)n=(t=e[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),a.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),a.addNodeFilter("a",function(e){for(var t,n,r,i=e.length;i--;)if(n=(t=e[i]).attr("href"),r=t.attr("name"),n&&-1!==n.indexOf("#_msocom_"))t.remove();else if(n&&0===n.indexOf("file://")&&(n=(n=n.split("#")[1])&&"#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){t.unwrap();continue}t.attr({href:n,name:r})}else t.unwrap()});var s=a.parse(e);return r.getParam("paste_convert_word_fake_lists",!0)&&q(s),e=I({validate:r.settings.validate},o).serialize(s)}(e,t):t},X=function(e,t){return{content:e,cancelled:t}},W=function(e,t,n,r){var i,o,a,s,u,l,c,f,d,m,p,g,v=(i=t,o=n,a=r,e.fire("PastePreProcess",{content:i,internal:o,wordContent:a})),h=function(e,t){var n=A({},e.schema);n.addNodeFilter("meta",function(e){T.each(e,function(e){return e.remove()})});var r=n.parse(t,{forced_root_block:!1,isRootContent:!0});return I({validate:e.settings.validate},e.schema).serialize(r)}(e,v.content);return e.hasEventListeners("PastePostProcess")&&!v.isDefaultPrevented()?(u=h,l=n,c=r,p=(s=e).dom.create("div",{style:"display:none"},u),f=p,d=l,m=c,g=s.fire("PastePostProcess",{node:f,internal:d,wordContent:m}),X(g.node.innerHTML,g.isDefaultPrevented())):X(h,v.isDefaultPrevented())},Y=function(e,t){return e.insertContent(t,{merge:e.getParam("paste_merge_formats",!0),paste:!0}),!0},Z=function(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)},G=function(e){return Z(e)&&/.(gif|jpe?g|png)$/.test(e)},J=function(e,t,n){return!(!1!==e.selection.isCollapsed()||!Z(t))&&(i=t,o=n,(r=e).undoManager.extra(function(){o(r,i)},function(){r.execCommand("mceInsertLink",!1,i)}),!0);var r,i,o},Q=function(e,t,n){return!!G(t)&&(i=t,o=n,(r=e).undoManager.extra(function(){o(r,i)},function(){r.insertContent('<img src="'+i+'">')}),!0);var r,i,o},ee=function(e,t,n){var r,i;n||!1===e.getParam("smart_paste",!0)?Y(e,t):(r=e,i=t,T.each([J,Q,Y],function(e){return!0!==e(r,i,Y)}))},te=function(e){return"\n"===e||"\r"===e},ne=function(i){var t,n;return(n={pcIsSpace:!(t=function(e,t){return-1!==" \f\t\x0B".indexOf(t)||t===B?e.pcIsSpace||""===e.str||e.str.length===i.length-1||(n=i,(r=e.str.length+1)<n.length&&0<=r&&te(n[r]))?{pcIsSpace:!1,str:e.str+B}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:te(t),str:e.str+t};var n,r}),str:""},b(i,function(e){n=t(n,e)}),n).str},re=function(e,t,n,r){var i,o,a,s,u,l=(i=e,a=n,s=z(o=t),u=s?K(i,o):o,W(i,u,a,s));!1===l.cancelled&&ee(e,l.content,r)},ie=function(e,t,n){var r=n||S(t);re(e,t.replace(k,""),r,!1)},oe=function(e,t){var n,r,i,o=e.dom.encode(t).replace(/\r\n/g,"\n"),a=ne(o),s=(n=a,r=e.settings.forced_root_block,i=e.settings.forced_root_block_attrs,r?R(n,!0===r?"p":r,i):n.replace(/\r?\n/g,"<br>"));re(e,s,!1,!0)},ae=function(e){var t={};if(e){if(e.getData){var n=e.getData("Text");n&&0<n.length&&-1===n.indexOf("data:text/mce-internal,")&&(t["text/plain"]=n)}if(e.types)for(var r=0;r<e.types.length;r++){var i=e.types[r];try{t[i]=e.getData(i)}catch(o){t[i]=""}}}return t},se=function(e,t){return t in e&&0<e[t].length},ue=function(e){return se(e,"text/html")||se(e,"text/plain")},le=function Be(e){var t=0;return function(){return e+t++}}("mceclip"),ce=function(e,t){var n,r,i,o,a,s,u,l=(n=t.uri,(r=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(n))?{type:r[1],data:decodeURIComponent(r[2])}:{type:null,data:null}),c=l.data,f=l.type,d=le(),m=e.settings.images_reuse_filename&&t.blob.name?(i=e,o=t.blob.name,(a=o.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i))?i.dom.encode(a[1]):null):d,p=new y.Image;if(p.src=t.uri,s=e.settings,u=p,!s.images_dataimg_filter||s.images_dataimg_filter(u)){var g=e.editorUpload.blobCache,v=void 0,h=g.getByData(c,f);h?v=h:(v=g.create(d,t.blob,c,m),g.add(v)),ie(e,'<img src="'+v.blobUri()+'">',!1)}else ie(e,'<img src="'+t.uri+'">',!1)},fe=function(t,e,n){var r,i,o,a,s="paste"===e.type?e.clipboardData:e.dataTransfer;if(t.settings.paste_data_images&&s){var u=(o=(i=s).items?h(x(i.items),function(e){return e.getAsFile()}):[],a=i.files?x(i.files):[],function(e,t){for(var n=[],r=0,i=e.length;r<i;r++){var o=e[r];t(o,r)&&n.push(o)}return n}(0<o.length?o:a,function(e){return/^image\/(jpeg|png|gif|bmp)$/.test(e.type)}));if(0<u.length)return e.preventDefault(),r=u,_.all(h(r,function(r){return new _(function(e){var t=r.getAsFile?r.getAsFile():r,n=new window.FileReader;n.onload=function(){e({blob:t,uri:n.result})},n.readAsDataURL(t)})})).then(function(e){n&&t.selection.setRng(n),b(e,function(e){ce(t,e)})}),!0}return!1},de=function(e){return C.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode},me=function(u,l,c){var t,f,d=(t=p(g.none()),{clear:function(){t.set(g.none())},set:function(e){t.set(g.some(e))},isSet:function(){return t.get().isSome()},on:function(e){t.get().each(e)}});function m(e,t,n,r){var i,o,a;se(e,"text/html")?i=e["text/html"]:(i=l.getHtml(),r=r||S(i),l.isDefaultContent(i)&&(n=!0)),i=j(i),l.remove(),o=!1===r&&!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(i),a=G(i),i.length&&(!o||a)||(n=!0),(n||a)&&(i=se(e,"text/plain")&&o?e["text/plain"]:H(i)),l.isDefaultContent(i)?t||u.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):n?oe(u,i):ie(u,i,r)}u.on("keydown",function(e){function t(e){de(e)&&!e.isDefaultPrevented()&&l.remove()}if(de(e)&&!e.isDefaultPrevented()){if((f=e.shiftKey&&86===e.keyCode)&&w.webkit&&-1!==y.navigator.userAgent.indexOf("Version/"))return;if(e.stopImmediatePropagation(),d.set(e),window.setTimeout(function(){d.clear()},100),w.ie&&f)return e.preventDefault(),n=!0,void u.fire("paste",{ieFake:n});l.remove(),l.create(),u.once("keyup",t),u.once("paste",function(){u.off("keyup",t)})}var n});u.on("paste",function(e){var t,n,r,i=d.isSet(),o=(t=u,n=ae(e.clipboardData||t.getDoc().dataTransfer),L()?T.extend(n,{"text/html":""}):n),a="text"===c.get()||f,s=se(o,D);(f=!1,e.isDefaultPrevented()||(r=e.clipboardData,-1!==y.navigator.userAgent.indexOf("Android")&&r&&r.items&&0===r.items.length))?l.remove():ue(o)||!fe(u,e,l.getLastRng()||u.selection.getRng())?(i||e.preventDefault(),!w.ie||i&&!e.ieFake||se(o,"text/html")||(l.create(),u.dom.bind(l.getEl(),"paste",function(e){e.stopPropagation()}),u.getDoc().execCommand("Paste",!1,null),o["text/html"]=l.getHtml()),se(o,"text/html")?(e.preventDefault(),s=s||S(o["text/html"]),m(o,i,a,s)):P.setEditorTimeout(u,function(){m(o,i,a,s)},0)):l.remove()})},pe=function(a,e,t){var s;me(a,e,t),a.parser.addNodeFilter("img",function(e,t,n){var r,i=function(e){e.attr("data-mce-object")||s===w.transparentSrc||e.remove()};if(!a.settings.paste_data_images&&((r=n).data&&!0===r.data.paste))for(var o=e.length;o--;)(s=e[o].attr("src"))&&(0!==s.indexOf("webkit-fake-url")&&(a.settings.allow_html_data_urls||0!==s.indexOf("data:"))||i(e[o]))})},ge=function(e){return w.ie&&e.inline?y.document.body:e.getBody()},ve=function(t,e,n){var r;ge(r=t)!==r.getBody()&&t.dom.bind(e,"paste keyup",function(e){be(t,n)||t.fire("paste")})},he=function(e){return e.dom.get("mcepastebin")},ye=function(e,t){return t===e},be=function(e,t){var n,r=he(e);return(n=r)&&"mcepastebin"===n.id&&ye(t,r.innerHTML)},xe=function(a){var s=p(null),u="%MCEPASTEBIN%";return{create:function(){return t=s,n=u,i=(e=a).dom,o=e.getBody(),t.set(e.selection.getRng()),r=e.dom.add(ge(e),"div",{id:"mcepastebin","class":"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n),(w.ie||w.gecko)&&i.setStyle(r,"left","rtl"===i.getStyle(o,"direction",!0)?65535:-65535),i.bind(r,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),ve(e,r,n),r.focus(),void e.selection.select(r,!0);var e,t,n,r,i,o},remove:function(){return function(e,t){if(he(e)){for(var n=void 0,r=t.get();n=e.dom.get("mcepastebin");)e.dom.remove(n),e.dom.unbind(n);r&&e.selection.setRng(r)}t.set(null)}(a,s)},getEl:function(){return he(a)},getHtml:function(){return function(n){var t,e,r,i,o,a=function(e,t){e.appendChild(t),n.dom.remove(t,!0)};for(e=T.grep(ge(n).childNodes,function(e){return"mcepastebin"===e.id}),t=e.shift(),T.each(e,function(e){a(t,e)}),r=(i=n.dom.select("div[id=mcepastebin]",t)).length-1;0<=r;r--)o=n.dom.create("div"),t.insertBefore(o,i[r]),a(o,i[r]);return t?t.innerHTML:""}(a)},getLastRng:function(){return s.get()},isDefault:function(){return be(a,u)},isDefaultContent:function(e){return e===u}}},we=function(e,t,n){if(r=e,!1!==w.iOS||r===undefined||"function"!=typeof r.setData||!0===L())return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(D,t),!0}catch(i){return!1}var r},Pe=function(e,t,n,r){we(e.clipboardData,t.html,t.text)?(e.preventDefault(),r()):n(t.html,r)},_e=function(s){return function(e,t){var n=k+e,r=s.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),i=s.dom.create("div",{contenteditable:"true"},n);s.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(i),s.dom.add(s.getBody(),r);var o=s.selection.getRng();i.focus();var a=s.dom.createRng();a.selectNodeContents(i),s.selection.setRng(a),P.setTimeout(function(){s.selection.setRng(o),r.parentNode.removeChild(r),t()},0)}},Te=function(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}},Ce=function(e){return!e.selection.isCollapsed()||!!(t=e).dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody());var t},De=function(e){var t,n;e.on("cut",(t=e,function(e){Ce(t)&&Pe(e,Te(t),_e(t),function(){if(w.browser.isChrome()){var e=t.selection.getRng();P.setEditorTimeout(t,function(){t.selection.setRng(e),t.execCommand("Delete")},0)}else t.execCommand("Delete")})})),e.on("copy",(n=e,function(e){Ce(n)&&Pe(e,Te(n),_e(n),function(){})}))},ke=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Se=function(e,t){return ke.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())},Oe=function(e,t){e.focus(),e.selection.setRng(t)},Re=function(a,s,u){a.getParam("paste_block_drop",!1)&&a.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),M(a)||a.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&0<t.files.length&&e.preventDefault()}),a.on("drop",function(e){var t,n;if(n=Se(a,e),!e.isDefaultPrevented()&&!u.get()){t=s.getDataTransferItems(e.dataTransfer);var r,i=s.hasContentType(t,D);if(s.hasHtmlOrText(t)&&(!(r=t["text/plain"])||0!==r.indexOf("file://"))||!s.pasteImageData(e,n))if(n&&a.getParam("paste_filter_drop",!0)){var o=t["mce-internal"]||t["text/html"]||t["text/plain"];o&&(e.preventDefault(),P.setEditorTimeout(a,function(){a.undoManager.transact(function(){t["mce-internal"]&&a.execCommand("Delete"),Oe(a,n),o=j(o),t["text/html"]?s.pasteHtml(o,i):s.pasteText(o)})}))}}}),a.on("dragstart",function(e){u.set(!0)}),a.on("dragover dragend",function(e){M(a)&&!1===u.get()&&(e.preventDefault(),Oe(a,Se(a,e))),"dragend"===e.type&&u.set(!1)})};function Ae(t,n){t.on("PastePreProcess",function(e){e.content=n(t,e.content,e.internal,e.wordContent)})}function Ie(e,t){if(!z(t))return t;var n=[];return T.each(e.schema.getBlockElements(),function(e,t){n.push(t)}),t=$(t,[[new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g"),"$1"]]),t=$(t,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function Ee(e,t,n,r){if(r||n)return t;var l,i=e.getParam("paste_webkit_styles");if(!1===e.getParam("paste_remove_styles_if_webkit",!0)||"all"===i)return t;if(i&&(l=i.split(/[, ]/)),l){var c=e.dom,f=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,t,n,r){var i=c.parseStyle(c.decode(n)),o={};if("none"===l)return t+r;for(var a=0;a<l.length;a++){var s=i[l[a]],u=c.getStyle(f,l[a],!0);/color/.test(l[a])&&(s=c.toHex(s),u=c.toHex(u)),u!==s&&(o[l[a]]=s)}return(o=c.serializeStyle(o,"span"))?t+' style="'+o+'"'+r:t+r})}else t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,r){return t+' style="'+n+'"'+r})}function Fe(n,e){n.$("a",e).find("font,u").each(function(e,t){n.dom.remove(t,!0)})}var Me=function(e){w.webkit&&Ae(e,Ee),w.ie&&(Ae(e,Ie),function r(t,n){t.on("PastePostProcess",function(e){n(t,e.node)})}(e,Fe))},Ne=function(n,r){return function(t){t.setActive("text"===r.pasteFormat.get());var e=function(e){return t.setActive(e.state)};return n.on("PastePlainTextToggle",e),function(){return n.off("PastePlainTextToggle",e)}}};!function $e(){c.add("paste",function(e){if(!1==!(!/(^|[ ,])powerpaste([, ]|$)/.test(e.settings.plugins)||!c.get("powerpaste")||("undefined"!=typeof y.window.console&&y.window.console.log&&y.window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),0))){var t=p(!1),n=p(e.getParam("paste_as_text",!1)?"text":"html"),r=(u=n,l=xe(s=e),s.on("PreInit",function(){return pe(s,l,u)}),{pasteFormat:u,pasteHtml:function(e,t){return ie(s,e,t)},pasteText:function(e){return oe(s,e)},pasteImageData:function(e,t){return fe(s,e,t)},getDataTransferItems:ae,hasHtmlOrText:ue,hasContentType:se}),i=Me(e);return a=r,(o=e).ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:function(){return o.execCommand("mceTogglePlainTextPaste")},onSetup:Ne(o,a)}),o.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:function(){return o.execCommand("mceTogglePlainTextPaste")},onSetup:Ne(o,a)}),f(e,r),function(e){var t=e.plugins.paste,n=e.getParam("paste_preprocess");n&&e.on("PastePreProcess",function(e){n.call(t,t,e)});var r=e.getParam("paste_postprocess");r&&e.on("PastePostProcess",function(e){r.call(t,t,e)})}(e),De(e),Re(e,r,t),{clipboard:r,quirks:i}}var o,a,s,u,l})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/preview/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "preview" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/preview')
+//   ES2015:
+//     import 'tinymce/plugins/preview'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/preview/plugin.js
@@ -1,1 +1,112 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var getContentStyle = function (editor) {
+      return editor.getParam('content_style', '');
+    };
+    var shouldUseContentCssCors = function (editor) {
+      return editor.getParam('content_css_cors', false, 'boolean');
+    };
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var getPreviewHtml = function (editor) {
+      var headHtml = '';
+      var encode = editor.dom.encode;
+      var contentStyle = getContentStyle(editor);
+      headHtml += '<base href="' + encode(editor.documentBaseURI.getURI()) + '">';
+      if (contentStyle) {
+        headHtml += '<style type="text/css">' + contentStyle + '</style>';
+      }
+      var cors = shouldUseContentCssCors(editor) ? ' crossorigin="anonymous"' : '';
+      global$1.each(editor.contentCSS, function (url) {
+        headHtml += '<link type="text/css" rel="stylesheet" href="' + encode(editor.documentBaseURI.toAbsolute(url)) + '"' + cors + '>';
+      });
+      var bodyId = editor.settings.body_id || 'tinymce';
+      if (bodyId.indexOf('=') !== -1) {
+        bodyId = editor.getParam('body_id', '', 'hash');
+        bodyId = bodyId[editor.id] || bodyId;
+      }
+      var bodyClass = editor.settings.body_class || '';
+      if (bodyClass.indexOf('=') !== -1) {
+        bodyClass = editor.getParam('body_class', '', 'hash');
+        bodyClass = bodyClass[editor.id] || '';
+      }
+      var isMetaKeyPressed = global$2.mac ? 'e.metaKey' : 'e.ctrlKey && !e.altKey';
+      var preventClicksOnLinksScript = '<script>' + 'document.addEventListener && document.addEventListener("click", function(e) {' + 'for (var elm = e.target; elm; elm = elm.parentNode) {' + 'if (elm.nodeName === "A" && !(' + isMetaKeyPressed + ')) {' + 'e.preventDefault();' + '}' + '}' + '}, false);' + '</script> ';
+      var directionality = editor.getBody().dir;
+      var dirAttr = directionality ? ' dir="' + encode(directionality) + '"' : '';
+      var previewHtml = '<!DOCTYPE html>' + '<html>' + '<head>' + headHtml + '</head>' + '<body id="' + encode(bodyId) + '" class="mce-content-body ' + encode(bodyClass) + '"' + dirAttr + '>' + editor.getContent() + preventClicksOnLinksScript + '</body>' + '</html>';
+      return previewHtml;
+    };
+
+    var open = function (editor) {
+      var content = getPreviewHtml(editor);
+      var dataApi = editor.windowManager.open({
+        title: 'Preview',
+        size: 'large',
+        body: {
+          type: 'panel',
+          items: [{
+              name: 'preview',
+              type: 'iframe',
+              sandboxed: true
+            }]
+        },
+        buttons: [{
+            type: 'cancel',
+            name: 'close',
+            text: 'Close',
+            primary: true
+          }],
+        initialData: { preview: content }
+      });
+      dataApi.focus('close');
+    };
+
+    var register = function (editor) {
+      editor.addCommand('mcePreview', function () {
+        open(editor);
+      });
+    };
+
+    var register$1 = function (editor) {
+      editor.ui.registry.addButton('preview', {
+        icon: 'preview',
+        tooltip: 'Preview',
+        onAction: function () {
+          return editor.execCommand('mcePreview');
+        }
+      });
+      editor.ui.registry.addMenuItem('preview', {
+        icon: 'preview',
+        text: 'Preview',
+        onAction: function () {
+          return editor.execCommand('mcePreview');
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('preview', function (editor) {
+        register(editor);
+        register$1(editor);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/preview/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=tinymce.util.Tools.resolve("tinymce.Env"),i=function(e){var t=function(t){var n="",i=t.dom.encode,e=t.getParam("content_style","");n+='<base href="'+i(t.documentBaseURI.getURI())+'">',e&&(n+='<style type="text/css">'+e+"</style>");var o=t.getParam("content_css_cors",!1,"boolean")?' crossorigin="anonymous"':"";l.each(t.contentCSS,function(e){n+='<link type="text/css" rel="stylesheet" href="'+i(t.documentBaseURI.toAbsolute(e))+'"'+o+">"});var r=t.settings.body_id||"tinymce";-1!==r.indexOf("=")&&(r=(r=t.getParam("body_id","","hash"))[t.id]||r);var a=t.settings.body_class||"";-1!==a.indexOf("=")&&(a=(a=t.getParam("body_class","","hash"))[t.id]||"");var c='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(m.mac?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",s=t.getBody().dir,d=s?' dir="'+i(s)+'"':"";return"<!DOCTYPE html><html><head>"+n+'</head><body id="'+i(r)+'" class="mce-content-body '+i(a)+'"'+d+">"+t.getContent()+c+"</body></html>"}(e);e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:t}}).focus("close")};!function t(){e.add("preview",function(e){var t,n;(t=e).addCommand("mcePreview",function(){i(t)}),(n=e).ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:function(){return n.execCommand("mcePreview")}}),n.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:function(){return n.execCommand("mcePreview")}})})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/print/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "print" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/print')
+//   ES2015:
+//     import 'tinymce/plugins/print'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/print/plugin.js
@@ -1,1 +1,54 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var register = function (editor) {
+      editor.addCommand('mcePrint', function () {
+        if (global$1.browser.isIE()) {
+          editor.getDoc().execCommand('print', false, null);
+        } else {
+          editor.getWin().print();
+        }
+      });
+    };
+
+    var register$1 = function (editor) {
+      editor.ui.registry.addButton('print', {
+        icon: 'print',
+        tooltip: 'Print',
+        onAction: function () {
+          return editor.execCommand('mcePrint');
+        }
+      });
+      editor.ui.registry.addMenuItem('print', {
+        text: 'Print...',
+        icon: 'print',
+        onAction: function () {
+          return editor.execCommand('mcePrint');
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('print', function (editor) {
+        register(editor);
+        register$1(editor);
+        editor.addShortcut('Meta+P', '', 'mcePrint');
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/print/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.Env");!function t(){n.add("print",function(n){var t,i;(t=n).addCommand("mcePrint",function(){e.browser.isIE()?t.getDoc().execCommand("print",!1,null):t.getWin().print()}),(i=n).ui.registry.addButton("print",{icon:"print",tooltip:"Print",onAction:function(){return i.execCommand("mcePrint")}}),i.ui.registry.addMenuItem("print",{text:"Print...",icon:"print",onAction:function(){return i.execCommand("mcePrint")}}),n.addShortcut("Meta+P","","mcePrint")})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/quickbars/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "quickbars" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/quickbars')
+//   ES2015:
+//     import 'tinymce/plugins/quickbars'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/quickbars/plugin.js
@@ -1,1 +1,490 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var unique = 0;
+    var generate = function (prefix) {
+      var date = new Date();
+      var time = date.getTime();
+      var random = Math.floor(Math.random() * 1000000000);
+      unique++;
+      return prefix + '_' + random + unique + String(time);
+    };
+
+    var createTableHtml = function (cols, rows) {
+      var x, y, html;
+      html = '<table data-mce-id="mce" style="width: 100%">';
+      html += '<tbody>';
+      for (y = 0; y < rows; y++) {
+        html += '<tr>';
+        for (x = 0; x < cols; x++) {
+          html += '<td><br></td>';
+        }
+        html += '</tr>';
+      }
+      html += '</tbody>';
+      html += '</table>';
+      return html;
+    };
+    var getInsertedElement = function (editor) {
+      var elms = editor.dom.select('*[data-mce-id]');
+      return elms[0];
+    };
+    var insertTableHtml = function (editor, cols, rows) {
+      editor.undoManager.transact(function () {
+        var tableElm, cellElm;
+        editor.insertContent(createTableHtml(cols, rows));
+        tableElm = getInsertedElement(editor);
+        tableElm.removeAttribute('data-mce-id');
+        cellElm = editor.dom.select('td,th', tableElm);
+        editor.selection.setCursorLocation(cellElm[0], 0);
+      });
+    };
+    var insertTable = function (editor, cols, rows) {
+      editor.plugins.table ? editor.plugins.table.insertTable(cols, rows) : insertTableHtml(editor, cols, rows);
+    };
+    var insertBlob = function (editor, base64, blob) {
+      var blobCache, blobInfo;
+      blobCache = editor.editorUpload.blobCache;
+      blobInfo = blobCache.create(generate('mceu'), blob, base64);
+      blobCache.add(blobInfo);
+      editor.insertContent(editor.dom.createHTML('img', { src: blobInfo.blobUri() }));
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Promise');
+
+    var blobToBase64 = function (blob) {
+      return new global$1(function (resolve) {
+        var reader = new domGlobals.FileReader();
+        reader.onloadend = function () {
+          resolve(reader.result.split(',')[1]);
+        };
+        reader.readAsDataURL(blob);
+      });
+    };
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.Delay');
+
+    var pickFile = function (editor) {
+      return new global$1(function (resolve) {
+        var fileInput = domGlobals.document.createElement('input');
+        fileInput.type = 'file';
+        fileInput.accept = 'image/*';
+        fileInput.style.position = 'fixed';
+        fileInput.style.left = '0';
+        fileInput.style.top = '0';
+        fileInput.style.opacity = '0.001';
+        domGlobals.document.body.appendChild(fileInput);
+        var changeHandler = function (e) {
+          resolve(Array.prototype.slice.call(e.target.files));
+        };
+        fileInput.addEventListener('change', changeHandler);
+        var cancelHandler = function (e) {
+          var cleanup = function () {
+            resolve([]);
+            fileInput.parentNode.removeChild(fileInput);
+          };
+          if (global$2.os.isAndroid() && e.type !== 'remove') {
+            global$3.setEditorTimeout(editor, cleanup, 0);
+          } else {
+            cleanup();
+          }
+          editor.off('focusin remove', cancelHandler);
+        };
+        editor.on('focusin remove', cancelHandler);
+        fileInput.click();
+      });
+    };
+
+    var setupButtons = function (editor) {
+      editor.ui.registry.addButton('quickimage', {
+        icon: 'image',
+        tooltip: 'Insert image',
+        onAction: function () {
+          pickFile(editor).then(function (files) {
+            if (files.length > 0) {
+              var blob_1 = files[0];
+              blobToBase64(blob_1).then(function (base64) {
+                insertBlob(editor, base64, blob_1);
+              });
+            }
+          });
+        }
+      });
+      editor.ui.registry.addButton('quicktable', {
+        icon: 'table',
+        tooltip: 'Insert table',
+        onAction: function () {
+          insertTable(editor, 2, 2);
+        }
+      });
+    };
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var fromHtml = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      if (!div.hasChildNodes() || div.childNodes.length > 1) {
+        domGlobals.console.error('HTML does not have a single root node', html);
+        throw new Error('HTML must have a single root node');
+      }
+      return fromDom(div.childNodes[0]);
+    };
+    var fromTag = function (tag, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createElement(tag);
+      return fromDom(node);
+    };
+    var fromText = function (text, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createTextNode(text);
+      return fromDom(node);
+    };
+    var fromDom = function (node) {
+      if (node === null || node === undefined) {
+        throw new Error('Node cannot be null or undefined');
+      }
+      return { dom: constant(node) };
+    };
+    var fromPoint = function (docElm, x, y) {
+      var doc = docElm.dom();
+      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
+    };
+    var Element = {
+      fromHtml: fromHtml,
+      fromTag: fromTag,
+      fromText: fromText,
+      fromDom: fromDom,
+      fromPoint: fromPoint
+    };
+
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
+
+    var ELEMENT = 1;
+
+    var name = function (element) {
+      var r = element.dom().nodeName;
+      return r.toLowerCase();
+    };
+
+    var typeOf = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf(value) === type;
+      };
+    };
+    var isSimpleType = function (type) {
+      return function (value) {
+        return typeof value === type;
+      };
+    };
+    var eq = function (t) {
+      return function (a) {
+        return t === a;
+      };
+    };
+    var isString = isType('string');
+    var isObject = isType('object');
+    var isArray = isType('array');
+    var isBoolean = isSimpleType('boolean');
+    var isUndefined = eq(undefined);
+    var isFunction = isSimpleType('function');
+
+    function ClosestOrAncestor (is, ancestor, scope, a, isRoot) {
+      return is(scope, a) ? Option.some(scope) : isFunction(isRoot) && isRoot(scope) ? Option.none() : ancestor(scope, a, isRoot);
+    }
+
+    var ELEMENT$1 = ELEMENT;
+    var is = function (element, selector) {
+      var dom = element.dom();
+      if (dom.nodeType !== ELEMENT$1) {
+        return false;
+      } else {
+        var elem = dom;
+        if (elem.matches !== undefined) {
+          return elem.matches(selector);
+        } else if (elem.msMatchesSelector !== undefined) {
+          return elem.msMatchesSelector(selector);
+        } else if (elem.webkitMatchesSelector !== undefined) {
+          return elem.webkitMatchesSelector(selector);
+        } else if (elem.mozMatchesSelector !== undefined) {
+          return elem.mozMatchesSelector(selector);
+        } else {
+          throw new Error('Browser lacks native selectors');
+        }
+      }
+    };
+
+    var ancestor = function (scope, predicate, isRoot) {
+      var element = scope.dom();
+      var stop = isFunction(isRoot) ? isRoot : constant(false);
+      while (element.parentNode) {
+        element = element.parentNode;
+        var el = Element.fromDom(element);
+        if (predicate(el)) {
+          return Option.some(el);
+        } else if (stop(el)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var closest = function (scope, predicate, isRoot) {
+      var is = function (s, test) {
+        return test(s);
+      };
+      return ClosestOrAncestor(is, ancestor, scope, predicate, isRoot);
+    };
+
+    var ancestor$1 = function (scope, selector, isRoot) {
+      return ancestor(scope, function (e) {
+        return is(e, selector);
+      }, isRoot);
+    };
+    var closest$1 = function (scope, selector, isRoot) {
+      var is$1 = function (element, selector) {
+        return is(element, selector);
+      };
+      return ClosestOrAncestor(is$1, ancestor$1, scope, selector, isRoot);
+    };
+
+    var validDefaultOrDie = function (value, predicate) {
+      if (predicate(value)) {
+        return true;
+      }
+      throw new Error('Default value doesn\'t match requested type.');
+    };
+    var items = function (value, defaultValue) {
+      if (isArray(value) || isObject(value)) {
+        throw new Error('expected a string but found: ' + value);
+      }
+      if (isUndefined(value)) {
+        return defaultValue;
+      }
+      if (isBoolean(value)) {
+        return value === false ? '' : defaultValue;
+      }
+      return value;
+    };
+    var getToolbarItemsOr_ = function (predicate) {
+      return function (editor, name, defaultValue) {
+        validDefaultOrDie(defaultValue, predicate);
+        var value = editor.getParam(name, defaultValue);
+        return items(value, defaultValue);
+      };
+    };
+    var getToolbarItemsOr = getToolbarItemsOr_(isString);
+
+    var getTextSelectionToolbarItems = function (editor) {
+      return getToolbarItemsOr(editor, 'quickbars_selection_toolbar', 'bold italic | quicklink h2 h3 blockquote');
+    };
+    var getInsertToolbarItems = function (editor) {
+      return getToolbarItemsOr(editor, 'quickbars_insert_toolbar', 'quickimage quicktable');
+    };
+    var getImageToolbarItems = function (editor) {
+      return getToolbarItemsOr(editor, 'quickbars_image_toolbar', 'alignleft aligncenter alignright');
+    };
+
+    var addToEditor = function (editor) {
+      var insertToolbarItems = getInsertToolbarItems(editor);
+      if (insertToolbarItems.trim().length > 0) {
+        editor.ui.registry.addContextToolbar('quickblock', {
+          predicate: function (node) {
+            var sugarNode = Element.fromDom(node);
+            var textBlockElementsMap = editor.schema.getTextBlockElements();
+            var isRoot = function (elem) {
+              return elem.dom() === editor.getBody();
+            };
+            return closest$1(sugarNode, 'table', isRoot).fold(function () {
+              return closest(sugarNode, function (elem) {
+                return name(elem) in textBlockElementsMap && editor.dom.isEmpty(elem.dom());
+              }, isRoot).isSome();
+            }, function () {
+              return false;
+            });
+          },
+          items: insertToolbarItems,
+          position: 'line',
+          scope: 'editor'
+        });
+      }
+    };
+
+    var addToEditor$1 = function (editor) {
+      var isEditable = function (node) {
+        return editor.dom.getContentEditableParent(node) !== 'false';
+      };
+      var isImage = function (node) {
+        return node.nodeName === 'IMG' || node.nodeName === 'FIGURE' && /image/i.test(node.className);
+      };
+      var imageToolbarItems = getImageToolbarItems(editor);
+      if (imageToolbarItems.trim().length > 0) {
+        editor.ui.registry.addContextToolbar('imageselection', {
+          predicate: isImage,
+          items: imageToolbarItems,
+          position: 'node'
+        });
+      }
+      var textToolbarItems = getTextSelectionToolbarItems(editor);
+      if (textToolbarItems.trim().length > 0) {
+        editor.ui.registry.addContextToolbar('textselection', {
+          predicate: function (node) {
+            return !isImage(node) && !editor.selection.isCollapsed() && isEditable(node);
+          },
+          items: textToolbarItems,
+          position: 'selection',
+          scope: 'editor'
+        });
+      }
+    };
+
+    function Plugin () {
+      global.add('quickbars', function (editor) {
+        setupButtons(editor);
+        addToEditor(editor);
+        addToEditor$1(editor);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/quickbars/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(c){"use strict";var e,t,n,r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=0,l=function(e,t,n){var r,o,i,u;o=(r=e.editorUpload.blobCache).create((i="mceu",u=(new Date).getTime(),i+"_"+Math.floor(1e9*Math.random())+ ++a+String(u)),n,t),r.add(o),e.insertContent(e.dom.createHTML("img",{src:o.blobUri()}))},f=tinymce.util.Tools.resolve("tinymce.util.Promise"),s=tinymce.util.Tools.resolve("tinymce.Env"),d=tinymce.util.Tools.resolve("tinymce.util.Delay"),i=function(u){u.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:function(){var i;i=u,new f(function(n){var r=c.document.createElement("input");r.type="file",r.accept="image/*",r.style.position="fixed",r.style.left="0",r.style.top="0",r.style.opacity="0.001",c.document.body.appendChild(r),r.addEventListener("change",function(e){n(Array.prototype.slice.call(e.target.files))});var o=function(e){var t=function(){n([]),r.parentNode.removeChild(r)};s.os.isAndroid()&&"remove"!==e.type?d.setEditorTimeout(i,t,0):t(),i.off("focusin remove",o)};i.on("focusin remove",o),r.click()}).then(function(e){if(0<e.length){var t=e[0];n=t,new f(function(e){var t=new c.FileReader;t.onloadend=function(){e(t.result.split(",")[1])},t.readAsDataURL(n)}).then(function(e){l(u,e,t)})}var n})}}),u.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:function(){var e,t,n,r,o,i;n=t=2,(e=u).plugins.table?e.plugins.table.insertTable(t,n):(o=t,i=n,(r=e).undoManager.transact(function(){var e,t;r.insertContent(function(e,t){var n,r,o;for(o='<table data-mce-id="mce" style="width: 100%">',o+="<tbody>",r=0;r<t;r++){for(o+="<tr>",n=0;n<e;n++)o+="<td><br></td>";o+="</tr>"}return o+="</tbody>",o+="</table>"}(o,i)),(e=r.dom.select("*[data-mce-id]")[0]).removeAttribute("data-mce-id"),t=r.dom.select("td,th",e),r.selection.setCursorLocation(t[0],0)}))}})},u=function(e){return function(){return e}},m=u(!1),g=u(!0),h=function(){return p},p=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:m,isSome:m,isNone:g,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(undefined),or:n,orThunk:t,map:h,each:function(){},bind:h,exists:m,forall:g,filter:h,equals:e,equals_:e,toArray:function(){return[]},toString:u("none()")}),b=function(n){var e=u(n),t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:g,isNone:m,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return b(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?o:p},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(m,function(e){return t(n,e)})}};return o},v={some:b,none:h,from:function(e){return null===e||e===undefined?p:b(e)}},y=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:u(e)}},w={fromHtml:function(e,t){var n=(t||c.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw c.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return y(n.childNodes[0])},fromTag:function(e,t){var n=(t||c.document).createElement(e);return y(n)},fromText:function(e,t){var n=(t||c.document).createTextNode(e);return y(n)},fromDom:y,fromPoint:function(e,t,n){var r=e.dom();return v.from(r.elementFromPoint(t,n)).map(y)}},k=("undefined"!=typeof c.window?c.window:Function("return this;")(),function(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}}),T=function(t){return function(e){return typeof e===t}},N=k("string"),q=k("object"),E=k("array"),M=T("boolean"),S=(r=undefined,function(e){return r===e}),C=T("function");function O(e,t,n,r,o){return e(n,r)?v.some(n):C(o)&&o(n)?v.none():t(n,r,o)}var x,A=function(e,t){var n=e.dom();if(1!==n.nodeType)return!1;var r=n;if(r.matches!==undefined)return r.matches(t);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},D=function(e,t,n){for(var r=e.dom(),o=C(n)?n:u(!1);r.parentNode;){r=r.parentNode;var i=w.fromDom(r);if(t(i))return v.some(i);if(o(i))break}return v.none()},_=function(e,t,n){return D(e,function(e){return A(e,t)},n)},L=(x=N,function(e,t,n){return function(e,t){if(!t(e))throw new Error("Default value doesn't match requested type.")}(n,x),function(e,t){if(E(e)||q(e))throw new Error("expected a string but found: "+e);return S(e)?t:M(e)?!1===e?"":t:e}(e.getParam(t,n),n)}),P=function(o){var e=L(o,"quickbars_insert_toolbar","quickimage quicktable");0<e.trim().length&&o.ui.registry.addContextToolbar("quickblock",{predicate:function(e){var t=w.fromDom(e),n=o.schema.getTextBlockElements(),r=function(e){return e.dom()===o.getBody()};return O(function(e,t){return A(e,t)},_,t,"table",r).fold(function(){return O(function(e,t){return t(e)},D,t,function(e){return e.dom().nodeName.toLowerCase()in n&&o.dom.isEmpty(e.dom())},r).isSome()},function(){return!1})},items:e,position:"line",scope:"editor"})},U=function(n){var r=function(e){return"IMG"===e.nodeName||"FIGURE"===e.nodeName&&/image/i.test(e.className)},e=L(n,"quickbars_image_toolbar","alignleft aligncenter alignright");0<e.trim().length&&n.ui.registry.addContextToolbar("imageselection",{predicate:r,items:e,position:"node"});var t=L(n,"quickbars_selection_toolbar","bold italic | quicklink h2 h3 blockquote");0<t.trim().length&&n.ui.registry.addContextToolbar("textselection",{predicate:function(e){return!r(e)&&!n.selection.isCollapsed()&&(t=e,"false"!==n.dom.getContentEditableParent(t));var t},items:t,position:"selection",scope:"editor"})};!function B(){o.add("quickbars",function(e){i(e),P(e),U(e)})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/save/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "save" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/save')
+//   ES2015:
+//     import 'tinymce/plugins/save'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/save/plugin.js
@@ -1,1 +1,121 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var enableWhenDirty = function (editor) {
+      return editor.getParam('save_enablewhendirty', true);
+    };
+    var hasOnSaveCallback = function (editor) {
+      return !!editor.getParam('save_onsavecallback');
+    };
+    var hasOnCancelCallback = function (editor) {
+      return !!editor.getParam('save_oncancelcallback');
+    };
+
+    var displayErrorMessage = function (editor, message) {
+      editor.notificationManager.open({
+        text: message,
+        type: 'error'
+      });
+    };
+    var save = function (editor) {
+      var formObj;
+      formObj = global$1.DOM.getParent(editor.id, 'form');
+      if (enableWhenDirty(editor) && !editor.isDirty()) {
+        return;
+      }
+      editor.save();
+      if (hasOnSaveCallback(editor)) {
+        editor.execCallback('save_onsavecallback', editor);
+        editor.nodeChanged();
+        return;
+      }
+      if (formObj) {
+        editor.setDirty(false);
+        if (!formObj.onsubmit || formObj.onsubmit()) {
+          if (typeof formObj.submit === 'function') {
+            formObj.submit();
+          } else {
+            displayErrorMessage(editor, 'Error: Form submit field collision.');
+          }
+        }
+        editor.nodeChanged();
+      } else {
+        displayErrorMessage(editor, 'Error: No form element found.');
+      }
+    };
+    var cancel = function (editor) {
+      var h = global$2.trim(editor.startContent);
+      if (hasOnCancelCallback(editor)) {
+        editor.execCallback('save_oncancelcallback', editor);
+        return;
+      }
+      editor.resetContent(h);
+    };
+
+    var register = function (editor) {
+      editor.addCommand('mceSave', function () {
+        save(editor);
+      });
+      editor.addCommand('mceCancel', function () {
+        cancel(editor);
+      });
+    };
+
+    var stateToggle = function (editor) {
+      return function (api) {
+        var handler = function () {
+          api.setDisabled(enableWhenDirty(editor) && !editor.isDirty());
+        };
+        editor.on('NodeChange dirty', handler);
+        return function () {
+          return editor.off('NodeChange dirty', handler);
+        };
+      };
+    };
+    var register$1 = function (editor) {
+      editor.ui.registry.addButton('save', {
+        icon: 'save',
+        tooltip: 'Save',
+        disabled: true,
+        onAction: function () {
+          return editor.execCommand('mceSave');
+        },
+        onSetup: stateToggle(editor)
+      });
+      editor.ui.registry.addButton('cancel', {
+        icon: 'cancel',
+        tooltip: 'Cancel',
+        disabled: true,
+        onAction: function () {
+          return editor.execCommand('mceCancel');
+        },
+        onSetup: stateToggle(editor)
+      });
+      editor.addShortcut('Meta+S', '', 'mceSave');
+    };
+
+    function Plugin () {
+      global.add('save', function (editor) {
+        register$1(editor);
+        register(editor);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/save/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(e){return e.getParam("save_enablewhendirty",!0)},c=function(e,n){e.notificationManager.open({text:n,type:"error"})},t=function(t){t.addCommand("mceSave",function(){!function(e){var n;if(n=o.DOM.getParent(e.id,"form"),!i(e)||e.isDirty()){if(e.save(),e.getParam("save_onsavecallback"))return e.execCallback("save_onsavecallback",e),e.nodeChanged();n?(e.setDirty(!1),n.onsubmit&&!n.onsubmit()||("function"==typeof n.submit?n.submit():c(e,"Error: Form submit field collision.")),e.nodeChanged()):c(e,"Error: No form element found.")}}(t)}),t.addCommand("mceCancel",function(){var e,n;e=t,n=a.trim(e.startContent),e.getParam("save_oncancelcallback")?e.execCallback("save_oncancelcallback",e):e.resetContent(n)})},r=function(t){return function(e){var n=function(){e.setDisabled(i(t)&&!t.isDirty())};return t.on("NodeChange dirty",n),function(){return t.off("NodeChange dirty",n)}}};!function n(){e.add("save",function(e){var n;(n=e).ui.registry.addButton("save",{icon:"save",tooltip:"Save",disabled:!0,onAction:function(){return n.execCommand("mceSave")},onSetup:r(n)}),n.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",disabled:!0,onAction:function(){return n.execCommand("mceCancel")},onSetup:r(n)}),n.addShortcut("Meta+S","","mceSave"),t(e)})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/searchreplace/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "searchreplace" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/searchreplace')
+//   ES2015:
+//     import 'tinymce/plugins/searchreplace'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/searchreplace/plugin.js
@@ -1,1 +1,1168 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var punctuationStr = '[!-#%-*,-\\/:;?@\\[-\\]_{}\xA1\xAB\xB7\xBB\xBF;\xB7\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1361-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u3008\u3009\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30\u2E31\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uff3f\uFF5B\uFF5D\uFF5F-\uFF65]';
+
+    var punctuation = constant(punctuationStr);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var punctuation$1 = punctuation;
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var typeOf = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf(value) === type;
+      };
+    };
+    var isSimpleType = function (type) {
+      return function (value) {
+        return typeof value === type;
+      };
+    };
+    var isString = isType('string');
+    var isArray = isType('array');
+    var isBoolean = isSimpleType('boolean');
+    var isNumber = isSimpleType('number');
+
+    var nativeSlice = Array.prototype.slice;
+    var nativePush = Array.prototype.push;
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var each = function (xs, f) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var eachr = function (xs, f) {
+      for (var i = xs.length - 1; i >= 0; i--) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var groupBy = function (xs, f) {
+      if (xs.length === 0) {
+        return [];
+      } else {
+        var wasType = f(xs[0]);
+        var r = [];
+        var group = [];
+        for (var i = 0, len = xs.length; i < len; i++) {
+          var x = xs[i];
+          var type = f(x);
+          if (type !== wasType) {
+            r.push(group);
+            group = [];
+          }
+          wasType = type;
+          group.push(x);
+        }
+        if (group.length !== 0) {
+          r.push(group);
+        }
+        return r;
+      }
+    };
+    var foldl = function (xs, f, acc) {
+      each(xs, function (x) {
+        acc = f(acc, x);
+      });
+      return acc;
+    };
+    var flatten = function (xs) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        if (!isArray(xs[i])) {
+          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
+        }
+        nativePush.apply(r, xs[i]);
+      }
+      return r;
+    };
+    var bind = function (xs, f) {
+      return flatten(map(xs, f));
+    };
+    var sort = function (xs, comparator) {
+      var copy = nativeSlice.call(xs, 0);
+      copy.sort(comparator);
+      return copy;
+    };
+
+    var hasOwnProperty = Object.hasOwnProperty;
+    var has = function (obj, key) {
+      return hasOwnProperty.call(obj, key);
+    };
+
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
+
+    var DOCUMENT = 9;
+    var ELEMENT = 1;
+    var TEXT = 3;
+
+    var type = function (element) {
+      return element.dom().nodeType;
+    };
+    var isType$1 = function (t) {
+      return function (element) {
+        return type(element) === t;
+      };
+    };
+    var isText = isType$1(TEXT);
+
+    var rawSet = function (dom, key, value) {
+      if (isString(value) || isBoolean(value) || isNumber(value)) {
+        dom.setAttribute(key, value + '');
+      } else {
+        domGlobals.console.error('Invalid call to Attr.set. Key ', key, ':: Value ', value, ':: Element ', dom);
+        throw new Error('Attribute value was not simple');
+      }
+    };
+    var set = function (element, key, value) {
+      rawSet(element.dom(), key, value);
+    };
+
+    var fromHtml = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      if (!div.hasChildNodes() || div.childNodes.length > 1) {
+        domGlobals.console.error('HTML does not have a single root node', html);
+        throw new Error('HTML must have a single root node');
+      }
+      return fromDom(div.childNodes[0]);
+    };
+    var fromTag = function (tag, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createElement(tag);
+      return fromDom(node);
+    };
+    var fromText = function (text, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createTextNode(text);
+      return fromDom(node);
+    };
+    var fromDom = function (node) {
+      if (node === null || node === undefined) {
+        throw new Error('Node cannot be null or undefined');
+      }
+      return { dom: constant(node) };
+    };
+    var fromPoint = function (docElm, x, y) {
+      var doc = docElm.dom();
+      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
+    };
+    var Element = {
+      fromHtml: fromHtml,
+      fromTag: fromTag,
+      fromText: fromText,
+      fromDom: fromDom,
+      fromPoint: fromPoint
+    };
+
+    var compareDocumentPosition = function (a, b, match) {
+      return (a.compareDocumentPosition(b) & match) !== 0;
+    };
+    var documentPositionPreceding = function (a, b) {
+      return compareDocumentPosition(a, b, domGlobals.Node.DOCUMENT_POSITION_PRECEDING);
+    };
+
+    var ELEMENT$1 = ELEMENT;
+    var DOCUMENT$1 = DOCUMENT;
+    var bypassSelector = function (dom) {
+      return dom.nodeType !== ELEMENT$1 && dom.nodeType !== DOCUMENT$1 || dom.childElementCount === 0;
+    };
+    var all = function (selector, scope) {
+      var base = scope === undefined ? domGlobals.document : scope.dom();
+      return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), Element.fromDom);
+    };
+
+    var parent = function (element) {
+      return Option.from(element.dom().parentNode).map(Element.fromDom);
+    };
+    var children = function (element) {
+      return map(element.dom().childNodes, Element.fromDom);
+    };
+    var spot = function (element, offset) {
+      return {
+        element: constant(element),
+        offset: constant(offset)
+      };
+    };
+    var leaf = function (element, offset) {
+      var cs = children(element);
+      return cs.length > 0 && offset < cs.length ? spot(cs[offset], 0) : spot(element, offset);
+    };
+
+    var before = function (marker, element) {
+      var parent$1 = parent(marker);
+      parent$1.each(function (v) {
+        v.dom().insertBefore(element.dom(), marker.dom());
+      });
+    };
+    var append = function (parent, element) {
+      parent.dom().appendChild(element.dom());
+    };
+    var wrap = function (element, wrapper) {
+      before(element, wrapper);
+      append(wrapper, element);
+    };
+
+    function NodeValue (is, name) {
+      var get = function (element) {
+        if (!is(element)) {
+          throw new Error('Can only get ' + name + ' value of a ' + name + ' node');
+        }
+        return getOption(element).getOr('');
+      };
+      var getOption = function (element) {
+        return is(element) ? Option.from(element.dom().nodeValue) : Option.none();
+      };
+      var set = function (element, value) {
+        if (!is(element)) {
+          throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');
+        }
+        element.dom().nodeValue = value;
+      };
+      return {
+        get: get,
+        getOption: getOption,
+        set: set
+      };
+    }
+
+    var api = NodeValue(isText, 'text');
+    var get = function (element) {
+      return api.get(element);
+    };
+
+    var descendants = function (scope, selector) {
+      return all(selector, scope);
+    };
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');
+
+    var isSimpleBoundary = function (dom, node) {
+      return dom.isBlock(node) || has(dom.schema.getShortEndedElements(), node.nodeName);
+    };
+    var isContentEditableFalse = function (dom, node) {
+      return dom.getContentEditable(node) === 'false';
+    };
+    var isContentEditableTrueInCef = function (dom, node) {
+      return dom.getContentEditable(node) === 'true' && dom.getContentEditableParent(node.parentNode) === 'false';
+    };
+    var isHidden = function (dom, node) {
+      return !dom.isBlock(node) && has(dom.schema.getWhiteSpaceElements(), node.nodeName);
+    };
+    var isBoundary = function (dom, node) {
+      return isSimpleBoundary(dom, node) || isContentEditableFalse(dom, node) || isHidden(dom, node) || isContentEditableTrueInCef(dom, node);
+    };
+    var isText$1 = function (node) {
+      return node.nodeType === 3;
+    };
+    var nuSection = function () {
+      return {
+        sOffset: 0,
+        fOffset: 0,
+        elements: []
+      };
+    };
+    var toLeaf = function (node, offset) {
+      return leaf(Element.fromDom(node), offset);
+    };
+    var walk = function (dom, walkerFn, startNode, callbacks, endNode, skipStart) {
+      if (skipStart === void 0) {
+        skipStart = true;
+      }
+      var next = skipStart ? walkerFn(false) : startNode;
+      while (next) {
+        var isCefNode = isContentEditableFalse(dom, next);
+        if (isCefNode || isHidden(dom, next)) {
+          var stopWalking = isCefNode ? callbacks.cef(next) : callbacks.boundary(next);
+          if (stopWalking) {
+            break;
+          } else {
+            next = walkerFn(true);
+            continue;
+          }
+        } else if (isSimpleBoundary(dom, next)) {
+          if (callbacks.boundary(next)) {
+            break;
+          }
+        } else if (isText$1(next)) {
+          callbacks.text(next);
+        }
+        if (next === endNode) {
+          break;
+        } else {
+          next = walkerFn(false);
+        }
+      }
+    };
+    var collectTextToBoundary = function (dom, section, node, rootNode, forwards) {
+      if (isBoundary(dom, node)) {
+        return;
+      }
+      var rootBlock = dom.getParent(rootNode, dom.isBlock);
+      var walker = new global$2(node, rootBlock);
+      var walkerFn = forwards ? walker.next : walker.prev;
+      walk(dom, walkerFn, node, {
+        boundary: always,
+        cef: always,
+        text: function (next) {
+          if (forwards) {
+            section.fOffset += next.length;
+          } else {
+            section.sOffset += next.length;
+          }
+          section.elements.push(Element.fromDom(next));
+        }
+      });
+    };
+    var collect = function (dom, rootNode, startNode, endNode, callbacks, skipStart) {
+      if (skipStart === void 0) {
+        skipStart = true;
+      }
+      var walker = new global$2(startNode, rootNode);
+      var sections = [];
+      var current = nuSection();
+      collectTextToBoundary(dom, current, startNode, rootNode, false);
+      var finishSection = function () {
+        if (current.elements.length > 0) {
+          sections.push(current);
+          current = nuSection();
+        }
+        return false;
+      };
+      walk(dom, walker.next, startNode, {
+        boundary: finishSection,
+        cef: function (node) {
+          finishSection();
+          if (callbacks) {
+            sections.push.apply(sections, callbacks.cef(node));
+          }
+          return false;
+        },
+        text: function (next) {
+          current.elements.push(Element.fromDom(next));
+          if (callbacks) {
+            callbacks.text(next, current);
+          }
+        }
+      }, endNode, skipStart);
+      if (endNode) {
+        collectTextToBoundary(dom, current, endNode, rootNode, true);
+      }
+      finishSection();
+      return sections;
+    };
+    var collectRangeSections = function (dom, rng) {
+      var start = toLeaf(rng.startContainer, rng.startOffset);
+      var startNode = start.element().dom();
+      var end = toLeaf(rng.endContainer, rng.endOffset);
+      var endNode = end.element().dom();
+      return collect(dom, rng.commonAncestorContainer, startNode, endNode, {
+        text: function (node, section) {
+          if (node === endNode) {
+            section.fOffset += node.length - end.offset();
+          } else if (node === startNode) {
+            section.sOffset += start.offset();
+          }
+        },
+        cef: function (node) {
+          var sections = bind(descendants(Element.fromDom(node), '*[contenteditable=true]'), function (e) {
+            var ceTrueNode = e.dom();
+            return collect(dom, ceTrueNode, ceTrueNode);
+          });
+          return sort(sections, function (a, b) {
+            return documentPositionPreceding(a.elements[0].dom(), b.elements[0].dom()) ? 1 : -1;
+          });
+        }
+      }, false);
+    };
+    var fromRng = function (dom, rng) {
+      return rng.collapsed ? [] : collectRangeSections(dom, rng);
+    };
+    var fromNode = function (dom, node) {
+      var rng = dom.createRng();
+      rng.selectNode(node);
+      return fromRng(dom, rng);
+    };
+    var fromNodes = function (dom, nodes) {
+      return bind(nodes, function (node) {
+        return fromNode(dom, node);
+      });
+    };
+
+    var find = function (text, pattern, start, finish) {
+      if (start === void 0) {
+        start = 0;
+      }
+      if (finish === void 0) {
+        finish = text.length;
+      }
+      var regex = pattern.regex;
+      regex.lastIndex = start;
+      var results = [];
+      var match;
+      while (match = regex.exec(text)) {
+        var matchedText = match[pattern.matchIndex];
+        var matchStart = match.index + match[0].indexOf(matchedText);
+        var matchFinish = matchStart + matchedText.length;
+        if (matchFinish > finish) {
+          break;
+        }
+        results.push({
+          start: matchStart,
+          finish: matchFinish
+        });
+        regex.lastIndex = matchFinish;
+      }
+      return results;
+    };
+    var extract = function (elements, matches) {
+      var nodePositions = foldl(elements, function (acc, element) {
+        var content = get(element);
+        var start = acc.last;
+        var finish = start + content.length;
+        var positions = bind(matches, function (match, matchIdx) {
+          if (match.start < finish && match.finish > start) {
+            return [{
+                element: element,
+                start: Math.max(start, match.start) - start,
+                finish: Math.min(finish, match.finish) - start,
+                matchId: matchIdx
+              }];
+          } else {
+            return [];
+          }
+        });
+        return {
+          results: acc.results.concat(positions),
+          last: finish
+        };
+      }, {
+        results: [],
+        last: 0
+      }).results;
+      return groupBy(nodePositions, function (position) {
+        return position.matchId;
+      });
+    };
+
+    var find$1 = function (pattern, sections) {
+      return bind(sections, function (section) {
+        var elements = section.elements;
+        var content = map(elements, get).join('');
+        var positions = find(content, pattern, section.sOffset, content.length - section.fOffset);
+        return extract(elements, positions);
+      });
+    };
+    var mark = function (matches, replacementNode) {
+      eachr(matches, function (match, idx) {
+        eachr(match, function (pos) {
+          var wrapper = Element.fromDom(replacementNode.cloneNode(false));
+          set(wrapper, 'data-mce-index', idx);
+          var textNode = pos.element.dom();
+          if (textNode.length === pos.finish && pos.start === 0) {
+            wrap(pos.element, wrapper);
+          } else {
+            if (textNode.length !== pos.finish) {
+              textNode.splitText(pos.finish);
+            }
+            var matchNode = textNode.splitText(pos.start);
+            wrap(Element.fromDom(matchNode), wrapper);
+          }
+        });
+      });
+    };
+    var findAndMark = function (dom, pattern, node, replacementNode) {
+      var textSections = fromNode(dom, node);
+      var matches = find$1(pattern, textSections);
+      mark(matches, replacementNode);
+      return matches.length;
+    };
+    var findAndMarkInSelection = function (dom, pattern, selection, replacementNode) {
+      var bookmark = selection.getBookmark();
+      var nodes = dom.select('td[data-mce-selected],th[data-mce-selected]');
+      var textSections = nodes.length > 0 ? fromNodes(dom, nodes) : fromRng(dom, selection.getRng());
+      var matches = find$1(pattern, textSections);
+      mark(matches, replacementNode);
+      selection.moveToBookmark(bookmark);
+      return matches.length;
+    };
+
+    var getElmIndex = function (elm) {
+      var value = elm.getAttribute('data-mce-index');
+      if (typeof value === 'number') {
+        return '' + value;
+      }
+      return value;
+    };
+    var markAllMatches = function (editor, currentSearchState, pattern, inSelection) {
+      var node, marker;
+      marker = editor.dom.create('span', { 'data-mce-bogus': 1 });
+      marker.className = 'mce-match-marker';
+      node = editor.getBody();
+      done(editor, currentSearchState, false);
+      if (inSelection) {
+        return findAndMarkInSelection(editor.dom, pattern, editor.selection, marker);
+      } else {
+        return findAndMark(editor.dom, pattern, node, marker);
+      }
+    };
+    var unwrap = function (node) {
+      var parentNode = node.parentNode;
+      if (node.firstChild) {
+        parentNode.insertBefore(node.firstChild, node);
+      }
+      node.parentNode.removeChild(node);
+    };
+    var findSpansByIndex = function (editor, index) {
+      var nodes;
+      var spans = [];
+      nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
+      if (nodes.length) {
+        for (var i = 0; i < nodes.length; i++) {
+          var nodeIndex = getElmIndex(nodes[i]);
+          if (nodeIndex === null || !nodeIndex.length) {
+            continue;
+          }
+          if (nodeIndex === index.toString()) {
+            spans.push(nodes[i]);
+          }
+        }
+      }
+      return spans;
+    };
+    var moveSelection = function (editor, currentSearchState, forward) {
+      var searchState = currentSearchState.get();
+      var testIndex = searchState.index;
+      var dom = editor.dom;
+      forward = forward !== false;
+      if (forward) {
+        if (testIndex + 1 === searchState.count) {
+          testIndex = 0;
+        } else {
+          testIndex++;
+        }
+      } else {
+        if (testIndex - 1 === -1) {
+          testIndex = searchState.count - 1;
+        } else {
+          testIndex--;
+        }
+      }
+      dom.removeClass(findSpansByIndex(editor, searchState.index), 'mce-match-marker-selected');
+      var spans = findSpansByIndex(editor, testIndex);
+      if (spans.length) {
+        dom.addClass(findSpansByIndex(editor, testIndex), 'mce-match-marker-selected');
+        editor.selection.scrollIntoView(spans[0]);
+        return testIndex;
+      }
+      return -1;
+    };
+    var removeNode = function (dom, node) {
+      var parent = node.parentNode;
+      dom.remove(node);
+      if (dom.isEmpty(parent)) {
+        dom.remove(parent);
+      }
+    };
+    var escapeSearchText = function (text, wholeWord) {
+      var escapedText = text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&').replace(/\s/g, '[^\\S\\r\\n]');
+      var wordRegex = '(' + escapedText + ')';
+      return wholeWord ? '(?:^|\\s|' + punctuation$1() + ')' + wordRegex + ('(?=$|\\s|' + punctuation$1() + ')') : wordRegex;
+    };
+    var find$2 = function (editor, currentSearchState, text, matchCase, wholeWord, inSelection) {
+      var escapedText = escapeSearchText(text, wholeWord);
+      var pattern = {
+        regex: new RegExp(escapedText, matchCase ? 'g' : 'gi'),
+        matchIndex: 1
+      };
+      var count = markAllMatches(editor, currentSearchState, pattern, inSelection);
+      if (count) {
+        var newIndex = moveSelection(editor, currentSearchState, true);
+        currentSearchState.set({
+          index: newIndex,
+          count: count,
+          text: text,
+          matchCase: matchCase,
+          wholeWord: wholeWord,
+          inSelection: inSelection
+        });
+      }
+      return count;
+    };
+    var next = function (editor, currentSearchState) {
+      var index = moveSelection(editor, currentSearchState, true);
+      currentSearchState.set(__assign(__assign({}, currentSearchState.get()), { index: index }));
+    };
+    var prev = function (editor, currentSearchState) {
+      var index = moveSelection(editor, currentSearchState, false);
+      currentSearchState.set(__assign(__assign({}, currentSearchState.get()), { index: index }));
+    };
+    var isMatchSpan = function (node) {
+      var matchIndex = getElmIndex(node);
+      return matchIndex !== null && matchIndex.length > 0;
+    };
+    var replace = function (editor, currentSearchState, text, forward, all) {
+      var searchState = currentSearchState.get();
+      var currentIndex = searchState.index;
+      var i, nodes, node, matchIndex, currentMatchIndex, nextIndex = currentIndex;
+      forward = forward !== false;
+      node = editor.getBody();
+      nodes = global$1.grep(global$1.toArray(node.getElementsByTagName('span')), isMatchSpan);
+      for (i = 0; i < nodes.length; i++) {
+        var nodeIndex = getElmIndex(nodes[i]);
+        matchIndex = currentMatchIndex = parseInt(nodeIndex, 10);
+        if (all || matchIndex === searchState.index) {
+          if (text.length) {
+            nodes[i].firstChild.nodeValue = text;
+            unwrap(nodes[i]);
+          } else {
+            removeNode(editor.dom, nodes[i]);
+          }
+          while (nodes[++i]) {
+            matchIndex = parseInt(getElmIndex(nodes[i]), 10);
+            if (matchIndex === currentMatchIndex) {
+              removeNode(editor.dom, nodes[i]);
+            } else {
+              i--;
+              break;
+            }
+          }
+          if (forward) {
+            nextIndex--;
+          }
+        } else if (currentMatchIndex > currentIndex) {
+          nodes[i].setAttribute('data-mce-index', String(currentMatchIndex - 1));
+        }
+      }
+      currentSearchState.set(__assign(__assign({}, searchState), {
+        count: all ? 0 : searchState.count - 1,
+        index: nextIndex
+      }));
+      if (forward) {
+        next(editor, currentSearchState);
+      } else {
+        prev(editor, currentSearchState);
+      }
+      return !all && currentSearchState.get().count > 0;
+    };
+    var done = function (editor, currentSearchState, keepEditorSelection) {
+      var i, nodes, startContainer, endContainer;
+      var searchState = currentSearchState.get();
+      nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
+      for (i = 0; i < nodes.length; i++) {
+        var nodeIndex = getElmIndex(nodes[i]);
+        if (nodeIndex !== null && nodeIndex.length) {
+          if (nodeIndex === searchState.index.toString()) {
+            if (!startContainer) {
+              startContainer = nodes[i].firstChild;
+            }
+            endContainer = nodes[i].firstChild;
+          }
+          unwrap(nodes[i]);
+        }
+      }
+      currentSearchState.set(__assign(__assign({}, searchState), {
+        index: -1,
+        count: 0,
+        text: ''
+      }));
+      if (startContainer && endContainer) {
+        var rng = editor.dom.createRng();
+        rng.setStart(startContainer, 0);
+        rng.setEnd(endContainer, endContainer.data.length);
+        if (keepEditorSelection !== false) {
+          editor.selection.setRng(rng);
+        }
+        return rng;
+      }
+    };
+    var hasNext = function (editor, currentSearchState) {
+      return currentSearchState.get().count > 1;
+    };
+    var hasPrev = function (editor, currentSearchState) {
+      return currentSearchState.get().count > 1;
+    };
+
+    var get$1 = function (editor, currentState) {
+      var done$1 = function (keepEditorSelection) {
+        return done(editor, currentState, keepEditorSelection);
+      };
+      var find = function (text, matchCase, wholeWord, inSelection) {
+        if (inSelection === void 0) {
+          inSelection = false;
+        }
+        return find$2(editor, currentState, text, matchCase, wholeWord, inSelection);
+      };
+      var next$1 = function () {
+        return next(editor, currentState);
+      };
+      var prev$1 = function () {
+        return prev(editor, currentState);
+      };
+      var replace$1 = function (text, forward, all) {
+        return replace(editor, currentState, text, forward, all);
+      };
+      return {
+        done: done$1,
+        find: find,
+        next: next$1,
+        prev: prev$1,
+        replace: replace$1
+      };
+    };
+
+    var value = function () {
+      var subject = Cell(Option.none());
+      var clear = function () {
+        subject.set(Option.none());
+      };
+      var set = function (s) {
+        subject.set(Option.some(s));
+      };
+      var on = function (f) {
+        subject.get().each(f);
+      };
+      var isSet = function () {
+        return subject.get().isSome();
+      };
+      return {
+        clear: clear,
+        set: set,
+        isSet: isSet,
+        on: on
+      };
+    };
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var open = function (editor, currentSearchState) {
+      var dialogApi = value();
+      editor.undoManager.add();
+      var selectedText = global$1.trim(editor.selection.getContent({ format: 'text' }));
+      function updateButtonStates(api) {
+        var updateNext = hasNext(editor, currentSearchState) ? api.enable : api.disable;
+        updateNext('next');
+        var updatePrev = hasPrev(editor, currentSearchState) ? api.enable : api.disable;
+        updatePrev('prev');
+      }
+      var updateSearchState = function (api) {
+        var data = api.getData();
+        var current = currentSearchState.get();
+        currentSearchState.set(__assign(__assign({}, current), {
+          matchCase: data.matchcase,
+          wholeWord: data.wholewords,
+          inSelection: data.inselection
+        }));
+      };
+      var disableAll = function (api, disable) {
+        var buttons = [
+          'replace',
+          'replaceall',
+          'prev',
+          'next'
+        ];
+        var toggle = disable ? api.disable : api.enable;
+        each(buttons, toggle);
+      };
+      function notFoundAlert(api) {
+        editor.windowManager.alert('Could not find the specified string.', function () {
+          api.focus('findtext');
+        });
+      }
+      var focusButtonIfRequired = function (api, name) {
+        if (global$3.browser.isSafari() && global$3.deviceType.isTouch() && (name === 'find' || name === 'replace' || name === 'replaceall')) {
+          api.focus(name);
+        }
+      };
+      var reset = function (api) {
+        done(editor, currentSearchState, false);
+        disableAll(api, true);
+        updateButtonStates(api);
+      };
+      var doFind = function (api) {
+        var data = api.getData();
+        var last = currentSearchState.get();
+        if (!data.findtext.length) {
+          reset(api);
+          return;
+        }
+        if (last.text === data.findtext && last.matchCase === data.matchcase && last.wholeWord === data.wholewords) {
+          next(editor, currentSearchState);
+        } else {
+          var count = find$2(editor, currentSearchState, data.findtext, data.matchcase, data.wholewords, data.inselection);
+          if (count <= 0) {
+            notFoundAlert(api);
+          }
+          disableAll(api, count === 0);
+        }
+        updateButtonStates(api);
+      };
+      var initialState = currentSearchState.get();
+      var initialData = {
+        findtext: selectedText,
+        replacetext: '',
+        wholewords: initialState.wholeWord,
+        matchcase: initialState.matchCase,
+        inselection: initialState.inSelection
+      };
+      var spec = {
+        title: 'Find and Replace',
+        size: 'normal',
+        body: {
+          type: 'panel',
+          items: [
+            {
+              type: 'bar',
+              items: [
+                {
+                  type: 'input',
+                  name: 'findtext',
+                  placeholder: 'Find',
+                  maximized: true,
+                  inputMode: 'search'
+                },
+                {
+                  type: 'button',
+                  name: 'prev',
+                  text: 'Previous',
+                  icon: 'action-prev',
+                  disabled: true,
+                  borderless: true
+                },
+                {
+                  type: 'button',
+                  name: 'next',
+                  text: 'Next',
+                  icon: 'action-next',
+                  disabled: true,
+                  borderless: true
+                }
+              ]
+            },
+            {
+              type: 'input',
+              name: 'replacetext',
+              placeholder: 'Replace with',
+              inputMode: 'search'
+            }
+          ]
+        },
+        buttons: [
+          {
+            type: 'menu',
+            name: 'options',
+            icon: 'preferences',
+            tooltip: 'Preferences',
+            align: 'start',
+            items: [
+              {
+                type: 'togglemenuitem',
+                name: 'matchcase',
+                text: 'Match case'
+              },
+              {
+                type: 'togglemenuitem',
+                name: 'wholewords',
+                text: 'Find whole words only'
+              },
+              {
+                type: 'togglemenuitem',
+                name: 'inselection',
+                text: 'Find in selection'
+              }
+            ]
+          },
+          {
+            type: 'custom',
+            name: 'find',
+            text: 'Find',
+            primary: true
+          },
+          {
+            type: 'custom',
+            name: 'replace',
+            text: 'Replace',
+            disabled: true
+          },
+          {
+            type: 'custom',
+            name: 'replaceall',
+            text: 'Replace All',
+            disabled: true
+          }
+        ],
+        initialData: initialData,
+        onChange: function (api, details) {
+          if (details.name === 'findtext' && currentSearchState.get().count > 0) {
+            reset(api);
+          }
+        },
+        onAction: function (api, details) {
+          var data = api.getData();
+          switch (details.name) {
+          case 'find':
+            doFind(api);
+            break;
+          case 'replace':
+            if (!replace(editor, currentSearchState, data.replacetext)) {
+              reset(api);
+            } else {
+              updateButtonStates(api);
+            }
+            break;
+          case 'replaceall':
+            replace(editor, currentSearchState, data.replacetext, true, true);
+            reset(api);
+            break;
+          case 'prev':
+            prev(editor, currentSearchState);
+            updateButtonStates(api);
+            break;
+          case 'next':
+            next(editor, currentSearchState);
+            updateButtonStates(api);
+            break;
+          case 'matchcase':
+          case 'wholewords':
+          case 'inselection':
+            updateSearchState(api);
+            reset(api);
+            break;
+          }
+          focusButtonIfRequired(api, details.name);
+        },
+        onSubmit: function (api) {
+          doFind(api);
+          focusButtonIfRequired(api, 'find');
+        },
+        onClose: function () {
+          editor.focus();
+          done(editor, currentSearchState);
+          editor.undoManager.add();
+        }
+      };
+      dialogApi.set(editor.windowManager.open(spec, { inline: 'toolbar' }));
+    };
+
+    var register = function (editor, currentSearchState) {
+      editor.addCommand('SearchReplace', function () {
+        open(editor, currentSearchState);
+      });
+    };
+
+    var showDialog = function (editor, currentSearchState) {
+      return function () {
+        open(editor, currentSearchState);
+      };
+    };
+    var register$1 = function (editor, currentSearchState) {
+      editor.ui.registry.addMenuItem('searchreplace', {
+        text: 'Find and replace...',
+        shortcut: 'Meta+F',
+        onAction: showDialog(editor, currentSearchState),
+        icon: 'search'
+      });
+      editor.ui.registry.addButton('searchreplace', {
+        tooltip: 'Find and replace',
+        onAction: showDialog(editor, currentSearchState),
+        icon: 'search'
+      });
+      editor.shortcuts.add('Meta+F', '', showDialog(editor, currentSearchState));
+    };
+
+    function Plugin () {
+      global.add('searchreplace', function (editor) {
+        var currentSearchState = Cell({
+          index: -1,
+          count: 0,
+          text: '',
+          matchCase: false,
+          wholeWord: false,
+          inSelection: false
+        });
+        register(editor, currentSearchState);
+        register$1(editor, currentSearchState);
+        return get$1(editor, currentSearchState);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/searchreplace/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(c){"use strict";var e,t,n,r,d=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i=function(e){return function(){return e}},a=i(!1),m=i(!0),u=i("[!-#%-*,-\\/:;?@\\[-\\]_{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]"),l=function(){return f},f=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:a,isSome:a,isNone:m,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:n,orThunk:t,map:l,each:function(){},bind:l,exists:a,forall:m,filter:l,equals:e,equals_:e,toArray:function(){return[]},toString:i("none()")}),s=function(n){var e=i(n),t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:m,isNone:a,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return s(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?o:f},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(a,function(e){return t(n,e)})}};return o},g={some:s,none:l,from:function(e){return null===e||e===undefined?f:s(e)}},p=u,v=tinymce.util.Tools.resolve("tinymce.util.Tools"),y=function(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}},x=function(t){return function(e){return typeof e===t}},w=y("string"),b=y("array"),O=x("boolean"),C=x("number"),T=Array.prototype.slice,N=Array.prototype.push,E=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},k=function(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n)}},S=function(e,t){for(var n=e.length-1;0<=n;n--){t(e[n],n)}},A=function(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!b(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);N.apply(t,e[n])}return t}(E(e,t))},D=Object.hasOwnProperty,M=function(e,t){return D.call(e,t)},B=("undefined"!=typeof c.window?c.window:Function("return this;")(),r=3,function(e){return e.dom().nodeType===r}),I=function(e,t,n){!function(e,t,n){if(!(w(n)||O(n)||C(n)))throw c.console.error("Invalid call to Attr.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}(e.dom(),t,n)},P=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:i(e)}},F={fromHtml:function(e,t){var n=(t||c.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw c.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return P(n.childNodes[0])},fromTag:function(e,t){var n=(t||c.document).createElement(e);return P(n)},fromText:function(e,t){var n=(t||c.document).createTextNode(e);return P(n)},fromDom:P,fromPoint:function(e,t,n){var r=e.dom();return g.from(r.elementFromPoint(t,n)).map(P)}},R=function(e,t){return{element:i(e),offset:i(t)}},W=function(e,t){var n=E(e.dom().childNodes,F.fromDom);return 0<n.length&&t<n.length?R(n[t],0):R(e,t)},j=function(t,n){var e;(e=t,g.from(e.dom().parentNode).map(F.fromDom)).each(function(e){e.dom().insertBefore(n.dom(),t.dom())})},q=function(e,t){var n;j(e,t),n=e,t.dom().appendChild(n.dom())};var V=function we(n,r){var t=function(e){return n(e)?g.from(e.dom().nodeValue):g.none()};return{get:function(e){if(!n(e))throw new Error("Can only get "+r+" value of a "+r+" node");return t(e).getOr("")},getOption:t,set:function(e,t){if(!n(e))throw new Error("Can only set raw "+r+" value of a "+r+" node");e.dom().nodeValue=t}}}(B,"text"),_=function(e){return V.get(e)},H=function(e,t){return n=t,i=(r=e)===undefined?c.document:r.dom(),1!==(o=i).nodeType&&9!==o.nodeType||0===o.childElementCount?[]:E(i.querySelectorAll(n),F.fromDom);var n,r,o,i},L=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),U=function(e,t){return e.isBlock(t)||M(e.schema.getShortEndedElements(),t.nodeName)},$=function(e,t){return"false"===e.getContentEditable(t)},z=function(e,t){return!e.isBlock(t)&&M(e.schema.getWhiteSpaceElements(),t.nodeName)},G=function(){return{sOffset:0,fOffset:0,elements:[]}},K=function(e,t){return W(F.fromDom(e),t)},J=function(e,t,n,r,o,i){void 0===i&&(i=!0);for(var a=i?t(!1):n;a;){var c=$(e,a);if(c||z(e,a)){if(c?r.cef(a):r.boundary(a))break;a=t(!0)}else{if(U(e,a)){if(r.boundary(a))break}else 3===a.nodeType&&r.text(a);if(a===o)break;a=t(!1)}}},Q=function(e,t,n,r,o){if(!(U(i=e,a=n)||$(i,a)||z(i,a)||(u=a,"true"===(c=i).getContentEditable(u)&&"false"===c.getContentEditableParent(u.parentNode)))){var i,a,c,u,l=e.getParent(r,e.isBlock),f=new L(n,l),s=o?f.next:f.prev;J(e,s,n,{boundary:m,cef:m,text:function(e){o?t.fOffset+=e.length:t.sOffset+=e.length,t.elements.push(F.fromDom(e))}})}},X=function(e,t,n,r,o,i){void 0===i&&(i=!0);var a=new L(n,t),c=[],u=G();Q(e,u,n,t,!1);var l=function(){return 0<u.elements.length&&(c.push(u),u=G()),!1};return J(e,a.next,n,{boundary:l,cef:function(e){return l(),o&&c.push.apply(c,o.cef(e)),!1},text:function(e){u.elements.push(F.fromDom(e)),o&&o.text(e,u)}},r,i),r&&Q(e,u,r,t,!0),l(),c},Y=function(i,e){var n=K(e.startContainer,e.startOffset),r=n.element().dom(),o=K(e.endContainer,e.endOffset),a=o.element().dom();return X(i,e.commonAncestorContainer,r,a,{text:function(e,t){e===a?t.fOffset+=e.length-o.offset():e===r&&(t.sOffset+=n.offset())},cef:function(e){var t,n,r,o=A(H(F.fromDom(e),"*[contenteditable=true]"),function(e){var t=e.dom();return X(i,t,t)});return t=o,n=function(e,t){return n=e.elements[0].dom(),r=t.elements[0].dom(),o=n,i=r,a=c.Node.DOCUMENT_POSITION_PRECEDING,0!=(o.compareDocumentPosition(i)&a)?1:-1;var n,r,o,i,a},(r=T.call(t,0)).sort(n),r}},!1)},Z=function(e,t){return t.collapsed?[]:Y(e,t)},ee=function(e,t){var n=e.createRng();return n.selectNode(t),Z(e,n)},te=function(e,a){var t,n;return function(e,t){if(0===e.length)return[];for(var n=t(e[0]),r=[],o=[],i=0,a=e.length;i<a;i++){var c=e[i],u=t(c);u!==n&&(r.push(o),o=[]),n=u,o.push(c)}return 0!==o.length&&r.push(o),r}((t=function(e,n){var t=_(n),r=e.last,o=r+t.length,i=A(a,function(e,t){return e.start<o&&e.finish>r?[{element:n,start:Math.max(r,e.start)-r,finish:Math.min(o,e.finish)-r,matchId:t}]:[]});return{results:e.results.concat(i),last:o}},n={results:[],last:0},k(e,function(e){n=t(n,e)}),n.results),function(e){return e.matchId})},ne=function(o,e){return A(e,function(e){var t=e.elements,n=E(t,_).join(""),r=function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=e.length);var o=t.regex;o.lastIndex=n;for(var i,a=[];i=o.exec(e);){var c=i[t.matchIndex],u=i.index+i[0].indexOf(c),l=u+c.length;if(r<l)break;a.push({start:u,finish:l}),o.lastIndex=l}return a}(n,o,e.sOffset,n.length-e.fOffset);return te(t,r)})},re=function(e,i){S(e,function(e,o){S(e,function(e){var t=F.fromDom(i.cloneNode(!1));I(t,"data-mce-index",o);var n=e.element.dom();if(n.length===e.finish&&0===e.start)q(e.element,t);else{n.length!==e.finish&&n.splitText(e.finish);var r=n.splitText(e.start);q(F.fromDom(r),t)}})})},oe=function(e,t,n,r){var o,i=n.getBookmark(),a=e.select("td[data-mce-selected],th[data-mce-selected]"),c=0<a.length?(o=e,A(a,function(e){return ee(o,e)})):Z(e,n.getRng()),u=ne(t,c);return re(u,r),n.moveToBookmark(i),u.length},ie=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},ae=function(e,t,n,r){var o,i,a,c,u,l,f;return(i=e.dom.create("span",{"data-mce-bogus":1})).className="mce-match-marker",o=e.getBody(),pe(e,t,!1),r?oe(e.dom,n,e.selection,i):(a=e.dom,c=n,u=i,l=ee(a,o),f=ne(c,l),re(f,u),f.length)},ce=function(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)},ue=function(e,t){var n,r=[];if((n=v.toArray(e.getBody().getElementsByTagName("span"))).length)for(var o=0;o<n.length;o++){var i=ie(n[o]);null!==i&&i.length&&i===t.toString()&&r.push(n[o])}return r},le=function(e,t,n){var r=t.get(),o=r.index,i=e.dom;(n=!1!==n)?o+1===r.count?o=0:o++:o-1==-1?o=r.count-1:o--,i.removeClass(ue(e,r.index),"mce-match-marker-selected");var a=ue(e,o);return a.length?(i.addClass(ue(e,o),"mce-match-marker-selected"),e.selection.scrollIntoView(a[0]),o):-1},fe=function(e,t){var n=t.parentNode;e.remove(t),e.isEmpty(n)&&e.remove(n)},se=function(e,t,n,r,o,i){var a,c,u=(a=o,c="("+n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/\s/g,"[^\\S\\r\\n]")+")",a?"(?:^|\\s|"+p()+")"+c+"(?=$|\\s|"+p()+")":c),l={regex:new RegExp(u,r?"g":"gi"),matchIndex:1},f=ae(e,t,l,i);if(f){var s=le(e,t,!0);t.set({index:s,count:f,text:n,matchCase:r,wholeWord:o,inSelection:i})}return f},de=function(e,t){var n=le(e,t,!0);t.set(h(h({},t.get()),{index:n}))},me=function(e,t){var n=le(e,t,!1);t.set(h(h({},t.get()),{index:n}))},he=function(e){var t=ie(e);return null!==t&&0<t.length},ge=function(e,t,n,r,o){var i,a,c,u,l,f=t.get(),s=f.index,d=s;for(r=!1!==r,c=e.getBody(),a=v.grep(v.toArray(c.getElementsByTagName("span")),he),i=0;i<a.length;i++){var m=ie(a[i]);if(u=l=parseInt(m,10),o||u===f.index){for(n.length?(a[i].firstChild.nodeValue=n,ce(a[i])):fe(e.dom,a[i]);a[++i];){if((u=parseInt(ie(a[i]),10))!==l){i--;break}fe(e.dom,a[i])}r&&d--}else s<l&&a[i].setAttribute("data-mce-index",String(l-1))}return t.set(h(h({},f),{count:o?0:f.count-1,index:d})),(r?de:me)(e,t),!o&&0<t.get().count},pe=function(e,t,n){var r,o,i,a,c=t.get();for(o=v.toArray(e.getBody().getElementsByTagName("span")),r=0;r<o.length;r++){var u=ie(o[r]);null!==u&&u.length&&(u===c.index.toString()&&(i=i||o[r].firstChild,a=o[r].firstChild),ce(o[r]))}if(t.set(h(h({},c),{index:-1,count:0,text:""})),i&&a){var l=e.dom.createRng();return l.setStart(i,0),l.setEnd(a,a.data.length),!1!==n&&e.selection.setRng(l),l}},ve=tinymce.util.Tools.resolve("tinymce.Env"),ye=function(i,a){var t,e=(t=d(g.none()),{clear:function(){t.set(g.none())},set:function(e){t.set(g.some(e))},isSet:function(){return t.get().isSome()},on:function(e){t.get().each(e)}});i.undoManager.add();var n=v.trim(i.selection.getContent({format:"text"}));function c(e){(1<a.get().count?e.enable:e.disable)("next"),(1<a.get().count?e.enable:e.disable)("prev")}var u=function(e,t){var n=t?e.disable:e.enable;k(["replace","replaceall","prev","next"],n)};var l=function(e,t){ve.browser.isSafari()&&ve.deviceType.isTouch()&&("find"===t||"replace"===t||"replaceall"===t)&&e.focus(t)},f=function(e){pe(i,a,!1),u(e,!0),c(e)},s=function(e){var t=e.getData(),n=a.get();if(t.findtext.length){if(n.text===t.findtext&&n.matchCase===t.matchcase&&n.wholeWord===t.wholewords)de(i,a);else{var r=se(i,a,t.findtext,t.matchcase,t.wholewords,t.inselection);r<=0&&!function o(e){i.windowManager.alert("Could not find the specified string.",function(){e.focus("findtext")})}(e),u(e,0===r)}c(e)}else f(e)},r=a.get(),o={title:"Find and Replace",size:"normal",body:{type:"panel",items:[{type:"bar",items:[{type:"input",name:"findtext",placeholder:"Find",maximized:!0,inputMode:"search"},{type:"button",name:"prev",text:"Previous",icon:"action-prev",disabled:!0,borderless:!0},{type:"button",name:"next",text:"Next",icon:"action-next",disabled:!0,borderless:!0}]},{type:"input",name:"replacetext",placeholder:"Replace with",inputMode:"search"}]},buttons:[{type:"menu",name:"options",icon:"preferences",tooltip:"Preferences",align:"start",items:[{type:"togglemenuitem",name:"matchcase",text:"Match case"},{type:"togglemenuitem",name:"wholewords",text:"Find whole words only"},{type:"togglemenuitem",name:"inselection",text:"Find in selection"}]},{type:"custom",name:"find",text:"Find",primary:!0},{type:"custom",name:"replace",text:"Replace",disabled:!0},{type:"custom",name:"replaceall",text:"Replace All",disabled:!0}],initialData:{findtext:n,replacetext:"",wholewords:r.wholeWord,matchcase:r.matchCase,inselection:r.inSelection},onChange:function(e,t){"findtext"===t.name&&0<a.get().count&&f(e)},onAction:function(e,t){var n,r,o=e.getData();switch(t.name){case"find":s(e);break;case"replace":(ge(i,a,o.replacetext)?c:f)(e);break;case"replaceall":ge(i,a,o.replacetext,!0,!0),f(e);break;case"prev":me(i,a),c(e);break;case"next":de(i,a),c(e);break;case"matchcase":case"wholewords":case"inselection":n=e.getData(),r=a.get(),a.set(h(h({},r),{matchCase:n.matchcase,wholeWord:n.wholewords,inSelection:n.inselection})),f(e)}l(e,t.name)},onSubmit:function(e){s(e),l(e,"find")},onClose:function(){i.focus(),pe(i,a),i.undoManager.add()}};e.set(i.windowManager.open(o,{inline:"toolbar"}))},xe=function(e,t){return function(){ye(e,t)}};!function be(){o.add("searchreplace",function(e){var t,n,r,o,i,a,c=d({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1,inSelection:!1});return n=c,(t=e).addCommand("SearchReplace",function(){ye(t,n)}),o=c,(r=e).ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:xe(r,o),icon:"search"}),r.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:xe(r,o),icon:"search"}),r.shortcuts.add("Meta+F","",xe(r,o)),i=e,a=c,{done:function(e){return pe(i,a,e)},find:function(e,t,n,r){return void 0===r&&(r=!1),se(i,a,e,t,n,r)},next:function(){return de(i,a)},prev:function(){return me(i,a)},replace:function(e,t,n){return ge(i,a,e,t,n)}}})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/spellchecker/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "spellchecker" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/spellchecker')
+//   ES2015:
+//     import 'tinymce/plugins/spellchecker'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/spellchecker/plugin.js
@@ -1,1 +1,740 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var hasProPlugin = function (editor) {
+      if (/(^|[ ,])tinymcespellchecker([, ]|$)/.test(editor.settings.plugins) && global.get('tinymcespellchecker')) {
+        if (typeof domGlobals.window.console !== 'undefined' && domGlobals.window.console.log) {
+          domGlobals.window.console.log('Spell Checker Pro is incompatible with Spell Checker plugin! ' + 'Remove \'spellchecker\' from the \'plugins\' option.');
+        }
+        return true;
+      } else {
+        return false;
+      }
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.URI');
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.XHR');
+
+    var fireSpellcheckStart = function (editor) {
+      return editor.fire('SpellcheckStart');
+    };
+    var fireSpellcheckEnd = function (editor) {
+      return editor.fire('SpellcheckEnd');
+    };
+
+    var getLanguages = function (editor) {
+      var defaultLanguages = 'English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv';
+      return editor.getParam('spellchecker_languages', defaultLanguages);
+    };
+    var getLanguage = function (editor) {
+      var defaultLanguage = editor.getParam('language', 'en');
+      return editor.getParam('spellchecker_language', defaultLanguage);
+    };
+    var getRpcUrl = function (editor) {
+      return editor.getParam('spellchecker_rpc_url');
+    };
+    var getSpellcheckerCallback = function (editor) {
+      return editor.getParam('spellchecker_callback');
+    };
+    var getSpellcheckerWordcharPattern = function (editor) {
+      var defaultPattern = new RegExp('[^' + '\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`' + '\xA7\xA9\xAB\xAE\xB1\xB6\xB7\xB8\xBB' + '\xBC\xBD\xBE\xBF\xD7\xF7\xA4\u201D\u201C\u201E\xA0\u2002\u2003\u2009' + ']+', 'g');
+      return editor.getParam('spellchecker_wordchar_pattern', defaultPattern);
+    };
+
+    function isContentEditableFalse(node) {
+      return node && node.nodeType === 1 && node.contentEditable === 'false';
+    }
+    var DomTextMatcher = function (node, editor) {
+      var m, matches = [], text;
+      var dom = editor.dom;
+      var blockElementsMap, hiddenTextElementsMap, shortEndedElementsMap;
+      blockElementsMap = editor.schema.getBlockElements();
+      hiddenTextElementsMap = editor.schema.getWhiteSpaceElements();
+      shortEndedElementsMap = editor.schema.getShortEndedElements();
+      function createMatch(m, data) {
+        if (!m[0]) {
+          throw new Error('findAndReplaceDOMText cannot handle zero-length matches');
+        }
+        return {
+          start: m.index,
+          end: m.index + m[0].length,
+          text: m[0],
+          data: data
+        };
+      }
+      function getText(node) {
+        var txt;
+        if (node.nodeType === 3) {
+          return node.data;
+        }
+        if (hiddenTextElementsMap[node.nodeName] && !blockElementsMap[node.nodeName]) {
+          return '';
+        }
+        if (isContentEditableFalse(node)) {
+          return '\n';
+        }
+        txt = '';
+        if (blockElementsMap[node.nodeName] || shortEndedElementsMap[node.nodeName]) {
+          txt += '\n';
+        }
+        if (node = node.firstChild) {
+          do {
+            txt += getText(node);
+          } while (node = node.nextSibling);
+        }
+        return txt;
+      }
+      function stepThroughMatches(node, matches, replaceFn) {
+        var startNode, endNode, startNodeIndex, endNodeIndex, innerNodes = [], atIndex = 0, curNode = node, matchLocation, matchIndex = 0;
+        matches = matches.slice(0);
+        matches.sort(function (a, b) {
+          return a.start - b.start;
+        });
+        matchLocation = matches.shift();
+        out:
+          while (true) {
+            if (blockElementsMap[curNode.nodeName] || shortEndedElementsMap[curNode.nodeName] || isContentEditableFalse(curNode)) {
+              atIndex++;
+            }
+            if (curNode.nodeType === 3) {
+              if (!endNode && curNode.length + atIndex >= matchLocation.end) {
+                endNode = curNode;
+                endNodeIndex = matchLocation.end - atIndex;
+              } else if (startNode) {
+                innerNodes.push(curNode);
+              }
+              if (!startNode && curNode.length + atIndex > matchLocation.start) {
+                startNode = curNode;
+                startNodeIndex = matchLocation.start - atIndex;
+              }
+              atIndex += curNode.length;
+            }
+            if (startNode && endNode) {
+              curNode = replaceFn({
+                startNode: startNode,
+                startNodeIndex: startNodeIndex,
+                endNode: endNode,
+                endNodeIndex: endNodeIndex,
+                innerNodes: innerNodes,
+                match: matchLocation.text,
+                matchIndex: matchIndex
+              });
+              atIndex -= endNode.length - endNodeIndex;
+              startNode = null;
+              endNode = null;
+              innerNodes = [];
+              matchLocation = matches.shift();
+              matchIndex++;
+              if (!matchLocation) {
+                break;
+              }
+            } else if ((!hiddenTextElementsMap[curNode.nodeName] || blockElementsMap[curNode.nodeName]) && curNode.firstChild) {
+              if (!isContentEditableFalse(curNode)) {
+                curNode = curNode.firstChild;
+                continue;
+              }
+            } else if (curNode.nextSibling) {
+              curNode = curNode.nextSibling;
+              continue;
+            }
+            while (true) {
+              if (curNode.nextSibling) {
+                curNode = curNode.nextSibling;
+                break;
+              } else if (curNode.parentNode !== node) {
+                curNode = curNode.parentNode;
+              } else {
+                break out;
+              }
+            }
+          }
+      }
+      function genReplacer(callback) {
+        function makeReplacementNode(fill, matchIndex) {
+          var match = matches[matchIndex];
+          if (!match.stencil) {
+            match.stencil = callback(match);
+          }
+          var clone = match.stencil.cloneNode(false);
+          clone.setAttribute('data-mce-index', matchIndex);
+          if (fill) {
+            clone.appendChild(dom.doc.createTextNode(fill));
+          }
+          return clone;
+        }
+        return function (range) {
+          var before;
+          var after;
+          var parentNode;
+          var startNode = range.startNode;
+          var endNode = range.endNode;
+          var matchIndex = range.matchIndex;
+          var doc = dom.doc;
+          if (startNode === endNode) {
+            var node_1 = startNode;
+            parentNode = node_1.parentNode;
+            if (range.startNodeIndex > 0) {
+              before = doc.createTextNode(node_1.data.substring(0, range.startNodeIndex));
+              parentNode.insertBefore(before, node_1);
+            }
+            var el = makeReplacementNode(range.match, matchIndex);
+            parentNode.insertBefore(el, node_1);
+            if (range.endNodeIndex < node_1.length) {
+              after = doc.createTextNode(node_1.data.substring(range.endNodeIndex));
+              parentNode.insertBefore(after, node_1);
+            }
+            node_1.parentNode.removeChild(node_1);
+            return el;
+          }
+          before = doc.createTextNode(startNode.data.substring(0, range.startNodeIndex));
+          after = doc.createTextNode(endNode.data.substring(range.endNodeIndex));
+          var elA = makeReplacementNode(startNode.data.substring(range.startNodeIndex), matchIndex);
+          for (var i = 0, l = range.innerNodes.length; i < l; ++i) {
+            var innerNode = range.innerNodes[i];
+            var innerEl = makeReplacementNode(innerNode.data, matchIndex);
+            innerNode.parentNode.replaceChild(innerEl, innerNode);
+          }
+          var elB = makeReplacementNode(endNode.data.substring(0, range.endNodeIndex), matchIndex);
+          parentNode = startNode.parentNode;
+          parentNode.insertBefore(before, startNode);
+          parentNode.insertBefore(elA, startNode);
+          parentNode.removeChild(startNode);
+          parentNode = endNode.parentNode;
+          parentNode.insertBefore(elB, endNode);
+          parentNode.insertBefore(after, endNode);
+          parentNode.removeChild(endNode);
+          return elB;
+        };
+      }
+      function unwrapElement(element) {
+        var parentNode = element.parentNode;
+        while (element.childNodes.length > 0) {
+          parentNode.insertBefore(element.childNodes[0], element);
+        }
+        parentNode.removeChild(element);
+      }
+      function hasClass(elm) {
+        return elm.className.indexOf('mce-spellchecker-word') !== -1;
+      }
+      function getWrappersByIndex(index) {
+        var elements = node.getElementsByTagName('*'), wrappers = [];
+        index = typeof index === 'number' ? '' + index : null;
+        for (var i = 0; i < elements.length; i++) {
+          var element = elements[i], dataIndex = element.getAttribute('data-mce-index');
+          if (dataIndex !== null && dataIndex.length && hasClass(element)) {
+            if (dataIndex === index || index === null) {
+              wrappers.push(element);
+            }
+          }
+        }
+        return wrappers;
+      }
+      function indexOf(match) {
+        var i = matches.length;
+        while (i--) {
+          if (matches[i] === match) {
+            return i;
+          }
+        }
+        return -1;
+      }
+      function filter(callback) {
+        var filteredMatches = [];
+        each(function (match, i) {
+          if (callback(match, i)) {
+            filteredMatches.push(match);
+          }
+        });
+        matches = filteredMatches;
+        return this;
+      }
+      function each(callback) {
+        for (var i = 0, l = matches.length; i < l; i++) {
+          if (callback(matches[i], i) === false) {
+            break;
+          }
+        }
+        return this;
+      }
+      function wrap(callback) {
+        if (matches.length) {
+          stepThroughMatches(node, matches, genReplacer(callback));
+        }
+        return this;
+      }
+      function find(regex, data) {
+        if (text && regex.global) {
+          while (m = regex.exec(text)) {
+            matches.push(createMatch(m, data));
+          }
+        }
+        return this;
+      }
+      function unwrap(match) {
+        var i;
+        var elements = getWrappersByIndex(match ? indexOf(match) : null);
+        i = elements.length;
+        while (i--) {
+          unwrapElement(elements[i]);
+        }
+        return this;
+      }
+      function matchFromElement(element) {
+        return matches[element.getAttribute('data-mce-index')];
+      }
+      function elementFromMatch(match) {
+        return getWrappersByIndex(indexOf(match))[0];
+      }
+      function add(start, length, data) {
+        matches.push({
+          start: start,
+          end: start + length,
+          text: text.substr(start, length),
+          data: data
+        });
+        return this;
+      }
+      function rangeFromMatch(match) {
+        var wrappers = getWrappersByIndex(indexOf(match));
+        var rng = editor.dom.createRng();
+        rng.setStartBefore(wrappers[0]);
+        rng.setEndAfter(wrappers[wrappers.length - 1]);
+        return rng;
+      }
+      function replace(match, text) {
+        var rng = rangeFromMatch(match);
+        rng.deleteContents();
+        if (text.length > 0) {
+          rng.insertNode(editor.dom.doc.createTextNode(text));
+        }
+        return rng;
+      }
+      function reset() {
+        matches.splice(0, matches.length);
+        unwrap();
+        return this;
+      }
+      text = getText(node);
+      return {
+        text: text,
+        matches: matches,
+        each: each,
+        filter: filter,
+        reset: reset,
+        matchFromElement: matchFromElement,
+        elementFromMatch: elementFromMatch,
+        find: find,
+        add: add,
+        wrap: wrap,
+        unwrap: unwrap,
+        replace: replace,
+        rangeFromMatch: rangeFromMatch,
+        indexOf: indexOf
+      };
+    };
+
+    var hasOwnProperty = Object.hasOwnProperty;
+    var isEmpty = function (r) {
+      for (var x in r) {
+        if (hasOwnProperty.call(r, x)) {
+          return false;
+        }
+      }
+      return true;
+    };
+
+    var getTextMatcher = function (editor, textMatcherState) {
+      if (!textMatcherState.get()) {
+        var textMatcher = DomTextMatcher(editor.getBody(), editor);
+        textMatcherState.set(textMatcher);
+      }
+      return textMatcherState.get();
+    };
+    var defaultSpellcheckCallback = function (editor, pluginUrl, currentLanguageState) {
+      return function (method, text, doneCallback, errorCallback) {
+        var data = {
+          method: method,
+          lang: currentLanguageState.get()
+        };
+        var postData = '';
+        data[method === 'addToDictionary' ? 'word' : 'text'] = text;
+        global$1.each(data, function (value, key) {
+          if (postData) {
+            postData += '&';
+          }
+          postData += key + '=' + encodeURIComponent(value);
+        });
+        global$3.send({
+          url: new global$2(pluginUrl).toAbsolute(getRpcUrl(editor)),
+          type: 'post',
+          content_type: 'application/x-www-form-urlencoded',
+          data: postData,
+          success: function (result) {
+            var parseResult = JSON.parse(result);
+            if (!parseResult) {
+              var message = editor.translate('Server response wasn\'t proper JSON.');
+              errorCallback(message);
+            } else if (parseResult.error) {
+              errorCallback(parseResult.error);
+            } else {
+              doneCallback(parseResult);
+            }
+          },
+          error: function () {
+            var message = editor.translate('The spelling service was not found: (') + getRpcUrl(editor) + editor.translate(')');
+            errorCallback(message);
+          }
+        });
+      };
+    };
+    var sendRpcCall = function (editor, pluginUrl, currentLanguageState, name, data, successCallback, errorCallback) {
+      var userSpellcheckCallback = getSpellcheckerCallback(editor);
+      var spellCheckCallback = userSpellcheckCallback ? userSpellcheckCallback : defaultSpellcheckCallback(editor, pluginUrl, currentLanguageState);
+      spellCheckCallback.call(editor.plugins.spellchecker, name, data, successCallback, errorCallback);
+    };
+    var spellcheck = function (editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState) {
+      if (finish(editor, startedState, textMatcherState)) {
+        return;
+      }
+      var errorCallback = function (message) {
+        editor.notificationManager.open({
+          text: message,
+          type: 'error'
+        });
+        editor.setProgressState(false);
+        finish(editor, startedState, textMatcherState);
+      };
+      var successCallback = function (data) {
+        markErrors(editor, startedState, textMatcherState, lastSuggestionsState, data);
+      };
+      editor.setProgressState(true);
+      sendRpcCall(editor, pluginUrl, currentLanguageState, 'spellcheck', getTextMatcher(editor, textMatcherState).text, successCallback, errorCallback);
+      editor.focus();
+    };
+    var checkIfFinished = function (editor, startedState, textMatcherState) {
+      if (!editor.dom.select('span.mce-spellchecker-word').length) {
+        finish(editor, startedState, textMatcherState);
+      }
+    };
+    var addToDictionary = function (editor, pluginUrl, startedState, textMatcherState, currentLanguageState, word, spans) {
+      editor.setProgressState(true);
+      sendRpcCall(editor, pluginUrl, currentLanguageState, 'addToDictionary', word, function () {
+        editor.setProgressState(false);
+        editor.dom.remove(spans, true);
+        checkIfFinished(editor, startedState, textMatcherState);
+      }, function (message) {
+        editor.notificationManager.open({
+          text: message,
+          type: 'error'
+        });
+        editor.setProgressState(false);
+      });
+    };
+    var ignoreWord = function (editor, startedState, textMatcherState, word, spans, all) {
+      editor.selection.collapse();
+      if (all) {
+        global$1.each(editor.dom.select('span.mce-spellchecker-word'), function (span) {
+          if (span.getAttribute('data-mce-word') === word) {
+            editor.dom.remove(span, true);
+          }
+        });
+      } else {
+        editor.dom.remove(spans, true);
+      }
+      checkIfFinished(editor, startedState, textMatcherState);
+    };
+    var finish = function (editor, startedState, textMatcherState) {
+      var bookmark = editor.selection.getBookmark();
+      getTextMatcher(editor, textMatcherState).reset();
+      editor.selection.moveToBookmark(bookmark);
+      textMatcherState.set(null);
+      if (startedState.get()) {
+        startedState.set(false);
+        fireSpellcheckEnd(editor);
+        return true;
+      }
+    };
+    var getElmIndex = function (elm) {
+      var value = elm.getAttribute('data-mce-index');
+      if (typeof value === 'number') {
+        return '' + value;
+      }
+      return value;
+    };
+    var findSpansByIndex = function (editor, index) {
+      var nodes;
+      var spans = [];
+      nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
+      if (nodes.length) {
+        for (var i = 0; i < nodes.length; i++) {
+          var nodeIndex = getElmIndex(nodes[i]);
+          if (nodeIndex === null || !nodeIndex.length) {
+            continue;
+          }
+          if (nodeIndex === index.toString()) {
+            spans.push(nodes[i]);
+          }
+        }
+      }
+      return spans;
+    };
+    var markErrors = function (editor, startedState, textMatcherState, lastSuggestionsState, data) {
+      var hasDictionarySupport = !!data.dictionary;
+      var suggestions = data.words;
+      editor.setProgressState(false);
+      if (isEmpty(suggestions)) {
+        var message = editor.translate('No misspellings found.');
+        editor.notificationManager.open({
+          text: message,
+          type: 'info'
+        });
+        startedState.set(false);
+        return;
+      }
+      lastSuggestionsState.set({
+        suggestions: suggestions,
+        hasDictionarySupport: hasDictionarySupport
+      });
+      var bookmark = editor.selection.getBookmark();
+      getTextMatcher(editor, textMatcherState).find(getSpellcheckerWordcharPattern(editor)).filter(function (match) {
+        return !!suggestions[match.text];
+      }).wrap(function (match) {
+        return editor.dom.create('span', {
+          'class': 'mce-spellchecker-word',
+          'aria-invalid': 'spelling',
+          'data-mce-bogus': 1,
+          'data-mce-word': match.text
+        });
+      });
+      editor.selection.moveToBookmark(bookmark);
+      startedState.set(true);
+      fireSpellcheckStart(editor);
+    };
+
+    var get = function (editor, startedState, lastSuggestionsState, textMatcherState, currentLanguageState, _url) {
+      var getLanguage = function () {
+        return currentLanguageState.get();
+      };
+      var getWordCharPattern = function () {
+        return getSpellcheckerWordcharPattern(editor);
+      };
+      var markErrors$1 = function (data) {
+        markErrors(editor, startedState, textMatcherState, lastSuggestionsState, data);
+      };
+      var getTextMatcher = function () {
+        return textMatcherState.get();
+      };
+      return {
+        getTextMatcher: getTextMatcher,
+        getWordCharPattern: getWordCharPattern,
+        markErrors: markErrors$1,
+        getLanguage: getLanguage
+      };
+    };
+
+    var register = function (editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState) {
+      editor.addCommand('mceSpellCheck', function () {
+        spellcheck(editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState);
+      });
+    };
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+
+    var spellcheckerEvents = 'SpellcheckStart SpellcheckEnd';
+    var buildMenuItems = function (listName, languageValues) {
+      var items = [];
+      global$1.each(languageValues, function (languageValue) {
+        items.push({
+          selectable: true,
+          text: languageValue.name,
+          data: languageValue.value
+        });
+      });
+      return items;
+    };
+    var getItems = function (editor) {
+      return global$1.map(getLanguages(editor).split(','), function (langPair) {
+        langPair = langPair.split('=');
+        return {
+          name: langPair[0],
+          value: langPair[1]
+        };
+      });
+    };
+    var register$1 = function (editor, pluginUrl, startedState, textMatcherState, currentLanguageState, lastSuggestionsState) {
+      var languageMenuItems = buildMenuItems('Language', getItems(editor));
+      var startSpellchecking = function () {
+        spellcheck(editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState);
+      };
+      var buttonArgs = {
+        tooltip: 'Spellcheck',
+        onAction: startSpellchecking,
+        icon: 'spell-check',
+        onSetup: function (buttonApi) {
+          var setButtonState = function () {
+            buttonApi.setActive(startedState.get());
+          };
+          editor.on(spellcheckerEvents, setButtonState);
+          return function () {
+            editor.off(spellcheckerEvents, setButtonState);
+          };
+        }
+      };
+      var splitButtonArgs = __assign(__assign({}, buttonArgs), {
+        type: 'splitbutton',
+        select: function (value) {
+          return value === currentLanguageState.get();
+        },
+        fetch: function (callback) {
+          var items = global$1.map(languageMenuItems, function (languageItem) {
+            return {
+              type: 'choiceitem',
+              value: languageItem.data,
+              text: languageItem.text
+            };
+          });
+          callback(items);
+        },
+        onItemAction: function (splitButtonApi, value) {
+          currentLanguageState.set(value);
+        }
+      });
+      if (languageMenuItems.length > 1) {
+        editor.ui.registry.addSplitButton('spellchecker', splitButtonArgs);
+      } else {
+        editor.ui.registry.addToggleButton('spellchecker', buttonArgs);
+      }
+      editor.ui.registry.addToggleMenuItem('spellchecker', {
+        text: 'Spellcheck',
+        icon: 'spell-check',
+        onSetup: function (menuApi) {
+          menuApi.setActive(startedState.get());
+          var setMenuItemCheck = function () {
+            menuApi.setActive(startedState.get());
+          };
+          editor.on(spellcheckerEvents, setMenuItemCheck);
+          return function () {
+            editor.off(spellcheckerEvents, setMenuItemCheck);
+          };
+        },
+        onAction: startSpellchecking
+      });
+    };
+
+    var ignoreAll = true;
+    var getSuggestions = function (editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState, word, spans) {
+      var items = [];
+      var suggestions = lastSuggestionsState.get().suggestions[word];
+      global$1.each(suggestions, function (suggestion) {
+        items.push({
+          text: suggestion,
+          onAction: function () {
+            editor.insertContent(editor.dom.encode(suggestion));
+            editor.dom.remove(spans);
+            checkIfFinished(editor, startedState, textMatcherState);
+          }
+        });
+      });
+      var hasDictionarySupport = lastSuggestionsState.get().hasDictionarySupport;
+      if (hasDictionarySupport) {
+        items.push({ type: 'separator' });
+        items.push({
+          text: 'Add to dictionary',
+          onAction: function () {
+            addToDictionary(editor, pluginUrl, startedState, textMatcherState, currentLanguageState, word, spans);
+          }
+        });
+      }
+      items.push.apply(items, [
+        { type: 'separator' },
+        {
+          text: 'Ignore',
+          onAction: function () {
+            ignoreWord(editor, startedState, textMatcherState, word, spans);
+          }
+        },
+        {
+          text: 'Ignore all',
+          onAction: function () {
+            ignoreWord(editor, startedState, textMatcherState, word, spans, ignoreAll);
+          }
+        }
+      ]);
+      return items;
+    };
+    var setup = function (editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState) {
+      var update = function (element) {
+        var target = element;
+        if (target.className === 'mce-spellchecker-word') {
+          var spans = findSpansByIndex(editor, getElmIndex(target));
+          if (spans.length > 0) {
+            var rng = editor.dom.createRng();
+            rng.setStartBefore(spans[0]);
+            rng.setEndAfter(spans[spans.length - 1]);
+            editor.selection.setRng(rng);
+            return getSuggestions(editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState, target.getAttribute('data-mce-word'), spans);
+          }
+        } else {
+          return [];
+        }
+      };
+      editor.ui.registry.addContextMenu('spellchecker', { update: update });
+    };
+
+    function Plugin () {
+      global.add('spellchecker', function (editor, pluginUrl) {
+        if (hasProPlugin(editor) === false) {
+          var startedState = Cell(false);
+          var currentLanguageState = Cell(getLanguage(editor));
+          var textMatcherState = Cell(null);
+          var lastSuggestionsState = Cell(null);
+          register$1(editor, pluginUrl, startedState, textMatcherState, currentLanguageState, lastSuggestionsState);
+          setup(editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState);
+          register(editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState);
+          return get(editor, startedState, lastSuggestionsState, textMatcherState, currentLanguageState);
+        }
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/spellchecker/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(N){"use strict";var k=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},y=tinymce.util.Tools.resolve("tinymce.PluginManager"),h=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=tinymce.util.Tools.resolve("tinymce.util.URI"),f=tinymce.util.Tools.resolve("tinymce.util.XHR"),g=function(e){return e.getParam("spellchecker_rpc_url")},S=function(e){var t=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g");return e.getParam("spellchecker_wordchar_pattern",t)};function T(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var r=function(a,r){var n,o,g,h,p,i=[],v=r.dom;function c(e,t){if(!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return{start:e.index,end:e.index+e[0].length,text:e[0],data:t}}function s(e){for(var t=e.parentNode;0<e.childNodes.length;)t.insertBefore(e.childNodes[0],e);t.removeChild(e)}function l(e){var t=a.getElementsByTagName("*"),n=[];e="number"==typeof e?""+e:null;for(var r=0;r<t.length;r++){var o=t[r],i=o.getAttribute("data-mce-index");null!==i&&i.length&&-1!==o.className.indexOf("mce-spellchecker-word")&&(i!==e&&null!==e||n.push(o))}return n}function u(e){for(var t=i.length;t--;)if(i[t]===e)return t;return-1}function e(e){for(var t=0,n=i.length;t<n&&!1!==e(i[t],t);t++);return this}function t(e){var t,n=l(e?u(e):null);for(t=n.length;t--;)s(n[t]);return this}function d(e){var t=l(u(e)),n=r.dom.createRng();return n.setStartBefore(t[0]),n.setEndAfter(t[t.length-1]),n}return g=r.schema.getBlockElements(),h=r.schema.getWhiteSpaceElements(),p=r.schema.getShortEndedElements(),{text:o=function f(e){var t;if(3===e.nodeType)return e.data;if(h[e.nodeName]&&!g[e.nodeName])return"";if(T(e))return"\n";if(t="",(g[e.nodeName]||p[e.nodeName])&&(t+="\n"),e=e.firstChild)for(;t+=f(e),e=e.nextSibling;);return t}(a),matches:i,each:e,filter:function m(n){var r=[];return e(function(e,t){n(e,t)&&r.push(e)}),i=r,this},reset:function x(){return i.splice(0,i.length),t(),this},matchFromElement:function N(e){return i[e.getAttribute("data-mce-index")]},elementFromMatch:function k(e){return l(u(e))[0]},find:function y(e,t){if(o&&e.global)for(;n=e.exec(o);)i.push(c(n,t));return this},add:function S(e,t,n){return i.push({start:e,end:e+t,text:o.substr(e,t),data:n}),this},wrap:function w(e){return i.length&&function f(e,t,n){var r,o,i,a,c,s=[],l=0,u=e,d=0;(t=t.slice(0)).sort(function(e,t){return e.start-t.start}),c=t.shift();e:for(;;){if((g[u.nodeName]||p[u.nodeName]||T(u))&&l++,3===u.nodeType&&(!o&&u.length+l>=c.end?(o=u,a=c.end-l):r&&s.push(u),!r&&u.length+l>c.start&&(r=u,i=c.start-l),l+=u.length),r&&o){if(u=n({startNode:r,startNodeIndex:i,endNode:o,endNodeIndex:a,innerNodes:s,match:c.text,matchIndex:d}),l-=o.length-a,o=r=null,s=[],d++,!(c=t.shift()))break}else if(h[u.nodeName]&&!g[u.nodeName]||!u.firstChild){if(u.nextSibling){u=u.nextSibling;continue}}else if(!T(u)){u=u.firstChild;continue}for(;;){if(u.nextSibling){u=u.nextSibling;break}if(u.parentNode===e)break e;u=u.parentNode}}}(a,i,function t(o){function m(e,t){var n=i[t];n.stencil||(n.stencil=o(n));var r=n.stencil.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(v.doc.createTextNode(e)),r}return function(e){var t,n,r,o=e.startNode,i=e.endNode,a=e.matchIndex,c=v.doc;if(o===i){var s=o;r=s.parentNode,0<e.startNodeIndex&&(t=c.createTextNode(s.data.substring(0,e.startNodeIndex)),r.insertBefore(t,s));var l=m(e.match,a);return r.insertBefore(l,s),e.endNodeIndex<s.length&&(n=c.createTextNode(s.data.substring(e.endNodeIndex)),r.insertBefore(n,s)),s.parentNode.removeChild(s),l}t=c.createTextNode(o.data.substring(0,e.startNodeIndex)),n=c.createTextNode(i.data.substring(e.endNodeIndex));for(var u=m(o.data.substring(e.startNodeIndex),a),d=0,f=e.innerNodes.length;d<f;++d){var g=e.innerNodes[d],h=m(g.data,a);g.parentNode.replaceChild(h,g)}var p=m(i.data.substring(0,e.endNodeIndex),a);return(r=o.parentNode).insertBefore(t,o),r.insertBefore(u,o),r.removeChild(o),(r=i.parentNode).insertBefore(p,i),r.insertBefore(n,i),r.removeChild(i),p}}(e)),this},unwrap:t,replace:function b(e,t){var n=d(e);return n.deleteContents(),0<t.length&&n.insertNode(r.dom.doc.createTextNode(t)),n},rangeFromMatch:d,indexOf:u}},l=Object.hasOwnProperty,u=function(e,t){if(!t.get()){var n=r(e.getBody(),e);t.set(n)}return t.get()},p=function(e,t,n,r,o,i,a){var c,s,l,u=e.getParam("spellchecker_callback");(u||(c=e,s=t,l=n,function(e,t,r,o){var n={method:e,lang:l.get()},i="";n["addToDictionary"===e?"word":"text"]=t,h.each(n,function(e,t){i&&(i+="&"),i+=t+"="+encodeURIComponent(e)}),f.send({url:new d(s).toAbsolute(g(c)),type:"post",content_type:"application/x-www-form-urlencoded",data:i,success:function(e){var t=JSON.parse(e);if(t)t.error?o(t.error):r(t);else{var n=c.translate("Server response wasn't proper JSON.");o(n)}},error:function(){var e=c.translate("The spelling service was not found: (")+g(c)+c.translate(")");o(e)}})})).call(e.plugins.spellchecker,r,o,i,a)},w=function(t,e,n,r,o,i){if(!a(t,n,r)){t.setProgressState(!0),p(t,e,i,"spellcheck",u(t,r).text,function(e){b(t,n,r,o,e)},function(e){t.notificationManager.open({text:e,type:"error"}),t.setProgressState(!1),a(t,n,r)}),t.focus()}},m=function(e,t,n){e.dom.select("span.mce-spellchecker-word").length||a(e,t,n)},o=function(t,e,n,r,o,i){t.selection.collapse(),i?h.each(t.dom.select("span.mce-spellchecker-word"),function(e){e.getAttribute("data-mce-word")===r&&t.dom.remove(e,!0)}):t.dom.remove(o,!0),m(t,e,n)},a=function(e,t,n){var r=e.selection.getBookmark();if(u(e,n).reset(),e.selection.moveToBookmark(r),n.set(null),t.get())return t.set(!1),e.fire("SpellcheckEnd"),!0},v=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},b=function(t,e,n,r,o){var i=!!o.dictionary,a=o.words;if(t.setProgressState(!1),function(e){for(var t in e)if(l.call(e,t))return!1;return!0}(a)){var c=t.translate("No misspellings found.");return t.notificationManager.open({text:c,type:"info"}),void e.set(!1)}r.set({suggestions:a,hasDictionarySupport:i});var s=t.selection.getBookmark();u(t,n).find(S(t)).filter(function(e){return!!a[e.text]}).wrap(function(e){return t.dom.create("span",{"class":"mce-spellchecker-word","aria-invalid":"spelling","data-mce-bogus":1,"data-mce-word":e.text})}),t.selection.moveToBookmark(s),e.set(!0),t.fire("SpellcheckStart")},x=function(){return(x=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},A="SpellcheckStart SpellcheckEnd",B=function(n,e,r,t,o,i){var a,c,s,l=(s=n,a=h.map(s.getParam("spellchecker_languages","English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv").split(","),function(e){return{name:(e=e.split("="))[0],value:e[1]}}),c=[],h.each(a,function(e){c.push({selectable:!0,text:e.name,data:e.value})}),c),u=function(){w(n,e,r,t,i,o)},d={tooltip:"Spellcheck",onAction:u,icon:"spell-check",onSetup:function(e){var t=function(){e.setActive(r.get())};return n.on(A,t),function(){n.off(A,t)}}},f=x(x({},d),{type:"splitbutton",select:function(e){return e===o.get()},fetch:function(e){e(h.map(l,function(e){return{type:"choiceitem",value:e.data,text:e.text}}))},onItemAction:function(e,t){o.set(t)}});1<l.length?n.ui.registry.addSplitButton("spellchecker",f):n.ui.registry.addToggleButton("spellchecker",d),n.ui.registry.addToggleMenuItem("spellchecker",{text:"Spellcheck",icon:"spell-check",onSetup:function(e){e.setActive(r.get());var t=function(){e.setActive(r.get())};return n.on(A,t),function(){n.off(A,t)}},onAction:u})},I=function(c,s,e,l,u,d,f,g){var t=[],n=e.get().suggestions[f];return h.each(n,function(e){t.push({text:e,onAction:function(){c.insertContent(c.dom.encode(e)),c.dom.remove(g),m(c,l,u)}})}),e.get().hasDictionarySupport&&(t.push({type:"separator"}),t.push({text:"Add to dictionary",onAction:function(){var t,e,n,r,o,i,a;e=s,n=l,r=u,o=d,i=f,a=g,(t=c).setProgressState(!0),p(t,e,o,"addToDictionary",i,function(){t.setProgressState(!1),t.dom.remove(a,!0),m(t,n,r)},function(e){t.notificationManager.open({text:e,type:"error"}),t.setProgressState(!1)})}})),t.push.apply(t,[{type:"separator"},{text:"Ignore",onAction:function(){o(c,l,u,f,g)}},{text:"Ignore all",onAction:function(){o(c,l,u,f,g,!0)}}]),t},P=function(o,i,a,c,s,l){o.ui.registry.addContextMenu("spellchecker",{update:function(e){var t=e;if("mce-spellchecker-word"!==t.className)return[];var n=function(e,t){var n,r=[];if((n=h.toArray(e.getBody().getElementsByTagName("span"))).length)for(var o=0;o<n.length;o++){var i=v(n[o]);null!==i&&i.length&&i===t.toString()&&r.push(n[o])}return r}(o,v(t));if(0<n.length){var r=o.dom.createRng();return r.setStartBefore(n[0]),r.setEndAfter(n[n.length-1]),o.selection.setRng(r),I(o,i,a,c,s,l,t.getAttribute("data-mce-word"),n)}}})};!function e(){y.add("spellchecker",function(e,t){if(!1==!(!/(^|[ ,])tinymcespellchecker([, ]|$)/.test(e.settings.plugins)||!y.get("tinymcespellchecker")||("undefined"!=typeof N.window.console&&N.window.console.log&&N.window.console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."),0))){var n=k(!1),r=k((x=(v=e).getParam("language","en"),v.getParam("spellchecker_language",x))),o=k(null),i=k(null);return B(e,t,n,o,r,i),P(e,t,i,n,o,r),f=t,g=n,h=o,p=i,m=r,(d=e).addCommand("mceSpellCheck",function(){w(d,f,g,h,p,m)}),a=e,c=n,s=i,l=o,u=r,{getTextMatcher:function(){return l.get()},getWordCharPattern:function(){return S(a)},markErrors:function(e){b(a,c,l,s,e)},getLanguage:function(){return u.get()}}}var a,c,s,l,u,d,f,g,h,p,m,v,x})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/tabfocus/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "tabfocus" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/tabfocus')
+//   ES2015:
+//     import 'tinymce/plugins/tabfocus'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/tabfocus/plugin.js
@@ -1,1 +1,129 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.EditorManager');
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var global$4 = tinymce.util.Tools.resolve('tinymce.util.Delay');
+
+    var global$5 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var global$6 = tinymce.util.Tools.resolve('tinymce.util.VK');
+
+    var getTabFocusElements = function (editor) {
+      return editor.getParam('tabfocus_elements', ':prev,:next');
+    };
+    var getTabFocus = function (editor) {
+      return editor.getParam('tab_focus', getTabFocusElements(editor));
+    };
+
+    var DOM = global$1.DOM;
+    var tabCancel = function (e) {
+      if (e.keyCode === global$6.TAB && !e.ctrlKey && !e.altKey && !e.metaKey) {
+        e.preventDefault();
+      }
+    };
+    var setup = function (editor) {
+      function tabHandler(e) {
+        var x, el, v, i;
+        if (e.keyCode !== global$6.TAB || e.ctrlKey || e.altKey || e.metaKey || e.isDefaultPrevented()) {
+          return;
+        }
+        function find(direction) {
+          el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
+          function canSelectRecursive(e) {
+            return e.nodeName === 'BODY' || e.type !== 'hidden' && e.style.display !== 'none' && e.style.visibility !== 'hidden' && canSelectRecursive(e.parentNode);
+          }
+          function canSelect(el) {
+            return /INPUT|TEXTAREA|BUTTON/.test(el.tagName) && global$2.get(e.id) && el.tabIndex !== -1 && canSelectRecursive(el);
+          }
+          global$5.each(el, function (e, i) {
+            if (e.id === editor.id) {
+              x = i;
+              return false;
+            }
+          });
+          if (direction > 0) {
+            for (i = x + 1; i < el.length; i++) {
+              if (canSelect(el[i])) {
+                return el[i];
+              }
+            }
+          } else {
+            for (i = x - 1; i >= 0; i--) {
+              if (canSelect(el[i])) {
+                return el[i];
+              }
+            }
+          }
+          return null;
+        }
+        v = global$5.explode(getTabFocus(editor));
+        if (v.length === 1) {
+          v[1] = v[0];
+          v[0] = ':prev';
+        }
+        if (e.shiftKey) {
+          if (v[0] === ':prev') {
+            el = find(-1);
+          } else {
+            el = DOM.get(v[0]);
+          }
+        } else {
+          if (v[1] === ':next') {
+            el = find(1);
+          } else {
+            el = DOM.get(v[1]);
+          }
+        }
+        if (el) {
+          var focusEditor = global$2.get(el.id || el.name);
+          if (el.id && focusEditor) {
+            focusEditor.focus();
+          } else {
+            global$4.setTimeout(function () {
+              if (!global$3.webkit) {
+                domGlobals.window.focus();
+              }
+              el.focus();
+            }, 10);
+          }
+          e.preventDefault();
+        }
+      }
+      editor.on('init', function () {
+        if (editor.inline) {
+          DOM.setAttrib(editor.getBody(), 'tabIndex', null);
+        }
+        editor.on('keyup', tabCancel);
+        if (global$3.gecko) {
+          editor.on('keypress keydown', tabHandler);
+        } else {
+          editor.on('keydown', tabHandler);
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('tabfocus', function (editor) {
+        setup(editor);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/tabfocus/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(s){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),a=tinymce.util.Tools.resolve("tinymce.EditorManager"),y=tinymce.util.Tools.resolve("tinymce.Env"),f=tinymce.util.Tools.resolve("tinymce.util.Delay"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=tinymce.util.Tools.resolve("tinymce.util.VK"),v=t.DOM,n=function(e){e.keyCode!==m.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(c){function e(n){var i,o,e,l,t;if(!(n.keyCode!==m.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())&&(1===(e=d.explode((t=c).getParam("tab_focus",t.getParam("tabfocus_elements",":prev,:next")))).length&&(e[1]=e[0],e[0]=":prev"),o=n.shiftKey?":prev"===e[0]?r(-1):v.get(e[0]):":next"===e[1]?r(1):v.get(e[1]))){var u=a.get(o.id||o.name);o.id&&u?u.focus():f.setTimeout(function(){y.webkit||s.window.focus(),o.focus()},10),n.preventDefault()}function r(e){function t(e){return/INPUT|TEXTAREA|BUTTON/.test(e.tagName)&&a.get(n.id)&&-1!==e.tabIndex&&function t(e){return"BODY"===e.nodeName||"hidden"!==e.type&&"none"!==e.style.display&&"hidden"!==e.style.visibility&&t(e.parentNode)}(e)}if(o=v.select(":input:enabled,*[tabindex]:not(iframe)"),d.each(o,function(e,t){if(e.id===c.id)return i=t,!1}),0<e){for(l=i+1;l<o.length;l++)if(t(o[l]))return o[l]}else for(l=i-1;0<=l;l--)if(t(o[l]))return o[l];return null}}c.on("init",function(){c.inline&&v.setAttrib(c.getBody(),"tabIndex",null),c.on("keyup",n),y.gecko?c.on("keypress keydown",e):c.on("keydown",e)})};!function o(){e.add("tabfocus",function(e){i(e)})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/table/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "table" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/table')
+//   ES2015:
+//     import 'tinymce/plugins/table'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/table/plugin.js
@@ -1,1 +1,8944 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var noop = function () {
+    };
+    var compose = function (fa, fb) {
+      return function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        return fa(fb.apply(null, args));
+      };
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var identity = function (x) {
+      return x;
+    };
+    function curry(fn) {
+      var initialArgs = [];
+      for (var _i = 1; _i < arguments.length; _i++) {
+        initialArgs[_i - 1] = arguments[_i];
+      }
+      return function () {
+        var restArgs = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          restArgs[_i] = arguments[_i];
+        }
+        var all = initialArgs.concat(restArgs);
+        return fn.apply(null, all);
+      };
+    }
+    var not = function (f) {
+      return function (t) {
+        return !f(t);
+      };
+    };
+    var die = function (msg) {
+      return function () {
+        throw new Error(msg);
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var typeOf = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf(value) === type;
+      };
+    };
+    var isSimpleType = function (type) {
+      return function (value) {
+        return typeof value === type;
+      };
+    };
+    var isString = isType('string');
+    var isArray = isType('array');
+    var isBoolean = isSimpleType('boolean');
+    var isFunction = isSimpleType('function');
+    var isNumber = isSimpleType('number');
+
+    var nativeSlice = Array.prototype.slice;
+    var nativeIndexOf = Array.prototype.indexOf;
+    var nativePush = Array.prototype.push;
+    var rawIndexOf = function (ts, t) {
+      return nativeIndexOf.call(ts, t);
+    };
+    var contains = function (xs, x) {
+      return rawIndexOf(xs, x) > -1;
+    };
+    var exists = function (xs, pred) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return true;
+        }
+      }
+      return false;
+    };
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var each = function (xs, f) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var eachr = function (xs, f) {
+      for (var i = xs.length - 1; i >= 0; i--) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var filter = function (xs, pred) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          r.push(x);
+        }
+      }
+      return r;
+    };
+    var foldr = function (xs, f, acc) {
+      eachr(xs, function (x) {
+        acc = f(acc, x);
+      });
+      return acc;
+    };
+    var foldl = function (xs, f, acc) {
+      each(xs, function (x) {
+        acc = f(acc, x);
+      });
+      return acc;
+    };
+    var findUntil = function (xs, pred, until) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return Option.some(x);
+        } else if (until(x, i)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var find = function (xs, pred) {
+      return findUntil(xs, pred, never);
+    };
+    var findIndex = function (xs, pred) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return Option.some(i);
+        }
+      }
+      return Option.none();
+    };
+    var flatten = function (xs) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        if (!isArray(xs[i])) {
+          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
+        }
+        nativePush.apply(r, xs[i]);
+      }
+      return r;
+    };
+    var bind = function (xs, f) {
+      return flatten(map(xs, f));
+    };
+    var forall = function (xs, pred) {
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        var x = xs[i];
+        if (pred(x, i) !== true) {
+          return false;
+        }
+      }
+      return true;
+    };
+    var reverse = function (xs) {
+      var r = nativeSlice.call(xs, 0);
+      r.reverse();
+      return r;
+    };
+    var last = function (xs) {
+      return xs.length === 0 ? Option.none() : Option.some(xs[xs.length - 1]);
+    };
+    var findMap = function (arr, f) {
+      for (var i = 0; i < arr.length; i++) {
+        var r = f(arr[i], i);
+        if (r.isSome()) {
+          return r;
+        }
+      }
+      return Option.none();
+    };
+
+    var keys = Object.keys;
+    var hasOwnProperty = Object.hasOwnProperty;
+    var each$1 = function (obj, f) {
+      var props = keys(obj);
+      for (var k = 0, len = props.length; k < len; k++) {
+        var i = props[k];
+        var x = obj[i];
+        f(x, i);
+      }
+    };
+    var map$1 = function (obj, f) {
+      return tupleMap(obj, function (x, i) {
+        return {
+          k: i,
+          v: f(x, i)
+        };
+      });
+    };
+    var tupleMap = function (obj, f) {
+      var r = {};
+      each$1(obj, function (x, i) {
+        var tuple = f(x, i);
+        r[tuple.k] = tuple.v;
+      });
+      return r;
+    };
+    var get = function (obj, key) {
+      return has(obj, key) ? Option.from(obj[key]) : Option.none();
+    };
+    var has = function (obj, key) {
+      return hasOwnProperty.call(obj, key);
+    };
+
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
+
+    var COMMENT = 8;
+    var DOCUMENT = 9;
+    var ELEMENT = 1;
+    var TEXT = 3;
+
+    var name = function (element) {
+      var r = element.dom().nodeName;
+      return r.toLowerCase();
+    };
+    var type = function (element) {
+      return element.dom().nodeType;
+    };
+    var isType$1 = function (t) {
+      return function (element) {
+        return type(element) === t;
+      };
+    };
+    var isComment = function (element) {
+      return type(element) === COMMENT || name(element) === '#comment';
+    };
+    var isElement = isType$1(ELEMENT);
+    var isText = isType$1(TEXT);
+
+    var rawSet = function (dom, key, value) {
+      if (isString(value) || isBoolean(value) || isNumber(value)) {
+        dom.setAttribute(key, value + '');
+      } else {
+        domGlobals.console.error('Invalid call to Attr.set. Key ', key, ':: Value ', value, ':: Element ', dom);
+        throw new Error('Attribute value was not simple');
+      }
+    };
+    var set = function (element, key, value) {
+      rawSet(element.dom(), key, value);
+    };
+    var setAll = function (element, attrs) {
+      var dom = element.dom();
+      each$1(attrs, function (v, k) {
+        rawSet(dom, k, v);
+      });
+    };
+    var get$1 = function (element, key) {
+      var v = element.dom().getAttribute(key);
+      return v === null ? undefined : v;
+    };
+    var getOpt = function (element, key) {
+      return Option.from(get$1(element, key));
+    };
+    var has$1 = function (element, key) {
+      var dom = element.dom();
+      return dom && dom.hasAttribute ? dom.hasAttribute(key) : false;
+    };
+    var remove = function (element, key) {
+      element.dom().removeAttribute(key);
+    };
+    var clone = function (element) {
+      return foldl(element.dom().attributes, function (acc, attr) {
+        acc[attr.name] = attr.value;
+        return acc;
+      }, {});
+    };
+
+    var checkRange = function (str, substr, start) {
+      return substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
+    };
+    var contains$1 = function (str, substr) {
+      return str.indexOf(substr) !== -1;
+    };
+    var startsWith = function (str, prefix) {
+      return checkRange(str, prefix, 0);
+    };
+    var endsWith = function (str, suffix) {
+      return checkRange(str, suffix, str.length - suffix.length);
+    };
+    var blank = function (r) {
+      return function (s) {
+        return s.replace(r, '');
+      };
+    };
+    var trim = blank(/^\s+|\s+$/g);
+
+    var isSupported = function (dom) {
+      return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
+    };
+
+    var fromHtml = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      if (!div.hasChildNodes() || div.childNodes.length > 1) {
+        domGlobals.console.error('HTML does not have a single root node', html);
+        throw new Error('HTML must have a single root node');
+      }
+      return fromDom(div.childNodes[0]);
+    };
+    var fromTag = function (tag, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createElement(tag);
+      return fromDom(node);
+    };
+    var fromText = function (text, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createTextNode(text);
+      return fromDom(node);
+    };
+    var fromDom = function (node) {
+      if (node === null || node === undefined) {
+        throw new Error('Node cannot be null or undefined');
+      }
+      return { dom: constant(node) };
+    };
+    var fromPoint = function (docElm, x, y) {
+      var doc = docElm.dom();
+      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
+    };
+    var Element = {
+      fromHtml: fromHtml,
+      fromTag: fromTag,
+      fromText: fromText,
+      fromDom: fromDom,
+      fromPoint: fromPoint
+    };
+
+    var inBody = function (element) {
+      var dom = isText(element) ? element.dom().parentNode : element.dom();
+      return dom !== undefined && dom !== null && dom.ownerDocument.body.contains(dom);
+    };
+    var body = function () {
+      return getBody(Element.fromDom(domGlobals.document));
+    };
+    var getBody = function (doc) {
+      var b = doc.dom().body;
+      if (b === null || b === undefined) {
+        throw new Error('Body is not available yet');
+      }
+      return Element.fromDom(b);
+    };
+
+    var internalSet = function (dom, property, value) {
+      if (!isString(value)) {
+        domGlobals.console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);
+        throw new Error('CSS value must be a string: ' + value);
+      }
+      if (isSupported(dom)) {
+        dom.style.setProperty(property, value);
+      }
+    };
+    var internalRemove = function (dom, property) {
+      if (isSupported(dom)) {
+        dom.style.removeProperty(property);
+      }
+    };
+    var set$1 = function (element, property, value) {
+      var dom = element.dom();
+      internalSet(dom, property, value);
+    };
+    var setAll$1 = function (element, css) {
+      var dom = element.dom();
+      each$1(css, function (v, k) {
+        internalSet(dom, k, v);
+      });
+    };
+    var get$2 = function (element, property) {
+      var dom = element.dom();
+      var styles = domGlobals.window.getComputedStyle(dom);
+      var r = styles.getPropertyValue(property);
+      return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
+    };
+    var getUnsafeProperty = function (dom, property) {
+      return isSupported(dom) ? dom.style.getPropertyValue(property) : '';
+    };
+    var getRaw = function (element, property) {
+      var dom = element.dom();
+      var raw = getUnsafeProperty(dom, property);
+      return Option.from(raw).filter(function (r) {
+        return r.length > 0;
+      });
+    };
+    var remove$1 = function (element, property) {
+      var dom = element.dom();
+      internalRemove(dom, property);
+      if (getOpt(element, 'style').map(trim).is('')) {
+        remove(element, 'style');
+      }
+    };
+    var copy = function (source, target) {
+      var sourceDom = source.dom();
+      var targetDom = target.dom();
+      if (isSupported(sourceDom) && isSupported(targetDom)) {
+        targetDom.style.cssText = sourceDom.style.cssText;
+      }
+    };
+
+    var compareDocumentPosition = function (a, b, match) {
+      return (a.compareDocumentPosition(b) & match) !== 0;
+    };
+    var documentPositionContainedBy = function (a, b) {
+      return compareDocumentPosition(a, b, domGlobals.Node.DOCUMENT_POSITION_CONTAINED_BY);
+    };
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+
+    var cached = function (f) {
+      var called = false;
+      var r;
+      return function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (!called) {
+          called = true;
+          r = f.apply(null, args);
+        }
+        return r;
+      };
+    };
+
+    var firstMatch = function (regexes, s) {
+      for (var i = 0; i < regexes.length; i++) {
+        var x = regexes[i];
+        if (x.test(s)) {
+          return x;
+        }
+      }
+      return undefined;
+    };
+    var find$1 = function (regexes, agent) {
+      var r = firstMatch(regexes, agent);
+      if (!r) {
+        return {
+          major: 0,
+          minor: 0
+        };
+      }
+      var group = function (i) {
+        return Number(agent.replace(r, '$' + i));
+      };
+      return nu(group(1), group(2));
+    };
+    var detect = function (versionRegexes, agent) {
+      var cleanedAgent = String(agent).toLowerCase();
+      if (versionRegexes.length === 0) {
+        return unknown();
+      }
+      return find$1(versionRegexes, cleanedAgent);
+    };
+    var unknown = function () {
+      return nu(0, 0);
+    };
+    var nu = function (major, minor) {
+      return {
+        major: major,
+        minor: minor
+      };
+    };
+    var Version = {
+      nu: nu,
+      detect: detect,
+      unknown: unknown
+    };
+
+    var edge = 'Edge';
+    var chrome = 'Chrome';
+    var ie = 'IE';
+    var opera = 'Opera';
+    var firefox = 'Firefox';
+    var safari = 'Safari';
+    var unknown$1 = function () {
+      return nu$1({
+        current: undefined,
+        version: Version.unknown()
+      });
+    };
+    var nu$1 = function (info) {
+      var current = info.current;
+      var version = info.version;
+      var isBrowser = function (name) {
+        return function () {
+          return current === name;
+        };
+      };
+      return {
+        current: current,
+        version: version,
+        isEdge: isBrowser(edge),
+        isChrome: isBrowser(chrome),
+        isIE: isBrowser(ie),
+        isOpera: isBrowser(opera),
+        isFirefox: isBrowser(firefox),
+        isSafari: isBrowser(safari)
+      };
+    };
+    var Browser = {
+      unknown: unknown$1,
+      nu: nu$1,
+      edge: constant(edge),
+      chrome: constant(chrome),
+      ie: constant(ie),
+      opera: constant(opera),
+      firefox: constant(firefox),
+      safari: constant(safari)
+    };
+
+    var windows = 'Windows';
+    var ios = 'iOS';
+    var android = 'Android';
+    var linux = 'Linux';
+    var osx = 'OSX';
+    var solaris = 'Solaris';
+    var freebsd = 'FreeBSD';
+    var chromeos = 'ChromeOS';
+    var unknown$2 = function () {
+      return nu$2({
+        current: undefined,
+        version: Version.unknown()
+      });
+    };
+    var nu$2 = function (info) {
+      var current = info.current;
+      var version = info.version;
+      var isOS = function (name) {
+        return function () {
+          return current === name;
+        };
+      };
+      return {
+        current: current,
+        version: version,
+        isWindows: isOS(windows),
+        isiOS: isOS(ios),
+        isAndroid: isOS(android),
+        isOSX: isOS(osx),
+        isLinux: isOS(linux),
+        isSolaris: isOS(solaris),
+        isFreeBSD: isOS(freebsd),
+        isChromeOS: isOS(chromeos)
+      };
+    };
+    var OperatingSystem = {
+      unknown: unknown$2,
+      nu: nu$2,
+      windows: constant(windows),
+      ios: constant(ios),
+      android: constant(android),
+      linux: constant(linux),
+      osx: constant(osx),
+      solaris: constant(solaris),
+      freebsd: constant(freebsd),
+      chromeos: constant(chromeos)
+    };
+
+    var DeviceType = function (os, browser, userAgent, mediaMatch) {
+      var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
+      var isiPhone = os.isiOS() && !isiPad;
+      var isMobile = os.isiOS() || os.isAndroid();
+      var isTouch = isMobile || mediaMatch('(pointer:coarse)');
+      var isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');
+      var isPhone = isiPhone || isMobile && !isTablet;
+      var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
+      var isDesktop = !isPhone && !isTablet && !iOSwebview;
+      return {
+        isiPad: constant(isiPad),
+        isiPhone: constant(isiPhone),
+        isTablet: constant(isTablet),
+        isPhone: constant(isPhone),
+        isTouch: constant(isTouch),
+        isAndroid: os.isAndroid,
+        isiOS: os.isiOS,
+        isWebView: constant(iOSwebview),
+        isDesktop: constant(isDesktop)
+      };
+    };
+
+    var detect$1 = function (candidates, userAgent) {
+      var agent = String(userAgent).toLowerCase();
+      return find(candidates, function (candidate) {
+        return candidate.search(agent);
+      });
+    };
+    var detectBrowser = function (browsers, userAgent) {
+      return detect$1(browsers, userAgent).map(function (browser) {
+        var version = Version.detect(browser.versionRegexes, userAgent);
+        return {
+          current: browser.name,
+          version: version
+        };
+      });
+    };
+    var detectOs = function (oses, userAgent) {
+      return detect$1(oses, userAgent).map(function (os) {
+        var version = Version.detect(os.versionRegexes, userAgent);
+        return {
+          current: os.name,
+          version: version
+        };
+      });
+    };
+    var UaString = {
+      detectBrowser: detectBrowser,
+      detectOs: detectOs
+    };
+
+    var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
+    var checkContains = function (target) {
+      return function (uastring) {
+        return contains$1(uastring, target);
+      };
+    };
+    var browsers = [
+      {
+        name: 'Edge',
+        versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
+        search: function (uastring) {
+          return contains$1(uastring, 'edge/') && contains$1(uastring, 'chrome') && contains$1(uastring, 'safari') && contains$1(uastring, 'applewebkit');
+        }
+      },
+      {
+        name: 'Chrome',
+        versionRegexes: [
+          /.*?chrome\/([0-9]+)\.([0-9]+).*/,
+          normalVersionRegex
+        ],
+        search: function (uastring) {
+          return contains$1(uastring, 'chrome') && !contains$1(uastring, 'chromeframe');
+        }
+      },
+      {
+        name: 'IE',
+        versionRegexes: [
+          /.*?msie\ ?([0-9]+)\.([0-9]+).*/,
+          /.*?rv:([0-9]+)\.([0-9]+).*/
+        ],
+        search: function (uastring) {
+          return contains$1(uastring, 'msie') || contains$1(uastring, 'trident');
+        }
+      },
+      {
+        name: 'Opera',
+        versionRegexes: [
+          normalVersionRegex,
+          /.*?opera\/([0-9]+)\.([0-9]+).*/
+        ],
+        search: checkContains('opera')
+      },
+      {
+        name: 'Firefox',
+        versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
+        search: checkContains('firefox')
+      },
+      {
+        name: 'Safari',
+        versionRegexes: [
+          normalVersionRegex,
+          /.*?cpu os ([0-9]+)_([0-9]+).*/
+        ],
+        search: function (uastring) {
+          return (contains$1(uastring, 'safari') || contains$1(uastring, 'mobile/')) && contains$1(uastring, 'applewebkit');
+        }
+      }
+    ];
+    var oses = [
+      {
+        name: 'Windows',
+        search: checkContains('win'),
+        versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
+      },
+      {
+        name: 'iOS',
+        search: function (uastring) {
+          return contains$1(uastring, 'iphone') || contains$1(uastring, 'ipad');
+        },
+        versionRegexes: [
+          /.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
+          /.*cpu os ([0-9]+)_([0-9]+).*/,
+          /.*cpu iphone os ([0-9]+)_([0-9]+).*/
+        ]
+      },
+      {
+        name: 'Android',
+        search: checkContains('android'),
+        versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
+      },
+      {
+        name: 'OSX',
+        search: checkContains('mac os x'),
+        versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]
+      },
+      {
+        name: 'Linux',
+        search: checkContains('linux'),
+        versionRegexes: []
+      },
+      {
+        name: 'Solaris',
+        search: checkContains('sunos'),
+        versionRegexes: []
+      },
+      {
+        name: 'FreeBSD',
+        search: checkContains('freebsd'),
+        versionRegexes: []
+      },
+      {
+        name: 'ChromeOS',
+        search: checkContains('cros'),
+        versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/]
+      }
+    ];
+    var PlatformInfo = {
+      browsers: constant(browsers),
+      oses: constant(oses)
+    };
+
+    var detect$2 = function (userAgent, mediaMatch) {
+      var browsers = PlatformInfo.browsers();
+      var oses = PlatformInfo.oses();
+      var browser = UaString.detectBrowser(browsers, userAgent).fold(Browser.unknown, Browser.nu);
+      var os = UaString.detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
+      var deviceType = DeviceType(os, browser, userAgent, mediaMatch);
+      return {
+        browser: browser,
+        os: os,
+        deviceType: deviceType
+      };
+    };
+    var PlatformDetection = { detect: detect$2 };
+
+    var mediaMatch = function (query) {
+      return domGlobals.window.matchMedia(query).matches;
+    };
+    var platform = cached(function () {
+      return PlatformDetection.detect(domGlobals.navigator.userAgent, mediaMatch);
+    });
+    var detect$3 = function () {
+      return platform();
+    };
+
+    var ELEMENT$1 = ELEMENT;
+    var DOCUMENT$1 = DOCUMENT;
+    var is = function (element, selector) {
+      var dom = element.dom();
+      if (dom.nodeType !== ELEMENT$1) {
+        return false;
+      } else {
+        var elem = dom;
+        if (elem.matches !== undefined) {
+          return elem.matches(selector);
+        } else if (elem.msMatchesSelector !== undefined) {
+          return elem.msMatchesSelector(selector);
+        } else if (elem.webkitMatchesSelector !== undefined) {
+          return elem.webkitMatchesSelector(selector);
+        } else if (elem.mozMatchesSelector !== undefined) {
+          return elem.mozMatchesSelector(selector);
+        } else {
+          throw new Error('Browser lacks native selectors');
+        }
+      }
+    };
+    var bypassSelector = function (dom) {
+      return dom.nodeType !== ELEMENT$1 && dom.nodeType !== DOCUMENT$1 || dom.childElementCount === 0;
+    };
+    var all = function (selector, scope) {
+      var base = scope === undefined ? domGlobals.document : scope.dom();
+      return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), Element.fromDom);
+    };
+    var one = function (selector, scope) {
+      var base = scope === undefined ? domGlobals.document : scope.dom();
+      return bypassSelector(base) ? Option.none() : Option.from(base.querySelector(selector)).map(Element.fromDom);
+    };
+
+    var eq = function (e1, e2) {
+      return e1.dom() === e2.dom();
+    };
+    var regularContains = function (e1, e2) {
+      var d1 = e1.dom();
+      var d2 = e2.dom();
+      return d1 === d2 ? false : d1.contains(d2);
+    };
+    var ieContains = function (e1, e2) {
+      return documentPositionContainedBy(e1.dom(), e2.dom());
+    };
+    var contains$2 = function (e1, e2) {
+      return detect$3().browser.isIE() ? ieContains(e1, e2) : regularContains(e1, e2);
+    };
+    var is$1 = is;
+
+    var owner = function (element) {
+      return Element.fromDom(element.dom().ownerDocument);
+    };
+    var defaultView = function (element) {
+      return Element.fromDom(element.dom().ownerDocument.defaultView);
+    };
+    var parent = function (element) {
+      return Option.from(element.dom().parentNode).map(Element.fromDom);
+    };
+    var parents = function (element, isRoot) {
+      var stop = isFunction(isRoot) ? isRoot : never;
+      var dom = element.dom();
+      var ret = [];
+      while (dom.parentNode !== null && dom.parentNode !== undefined) {
+        var rawParent = dom.parentNode;
+        var p = Element.fromDom(rawParent);
+        ret.push(p);
+        if (stop(p) === true) {
+          break;
+        } else {
+          dom = rawParent;
+        }
+      }
+      return ret;
+    };
+    var prevSibling = function (element) {
+      return Option.from(element.dom().previousSibling).map(Element.fromDom);
+    };
+    var nextSibling = function (element) {
+      return Option.from(element.dom().nextSibling).map(Element.fromDom);
+    };
+    var children = function (element) {
+      return map(element.dom().childNodes, Element.fromDom);
+    };
+    var child = function (element, index) {
+      var cs = element.dom().childNodes;
+      return Option.from(cs[index]).map(Element.fromDom);
+    };
+    var firstChild = function (element) {
+      return child(element, 0);
+    };
+
+    var before = function (marker, element) {
+      var parent$1 = parent(marker);
+      parent$1.each(function (v) {
+        v.dom().insertBefore(element.dom(), marker.dom());
+      });
+    };
+    var after = function (marker, element) {
+      var sibling = nextSibling(marker);
+      sibling.fold(function () {
+        var parent$1 = parent(marker);
+        parent$1.each(function (v) {
+          append(v, element);
+        });
+      }, function (v) {
+        before(v, element);
+      });
+    };
+    var prepend = function (parent, element) {
+      var firstChild$1 = firstChild(parent);
+      firstChild$1.fold(function () {
+        append(parent, element);
+      }, function (v) {
+        parent.dom().insertBefore(element.dom(), v.dom());
+      });
+    };
+    var append = function (parent, element) {
+      parent.dom().appendChild(element.dom());
+    };
+    var wrap = function (element, wrapper) {
+      before(element, wrapper);
+      append(wrapper, element);
+    };
+
+    var before$1 = function (marker, elements) {
+      each(elements, function (x) {
+        before(marker, x);
+      });
+    };
+    var after$1 = function (marker, elements) {
+      each(elements, function (x, i) {
+        var e = i === 0 ? marker : elements[i - 1];
+        after(e, x);
+      });
+    };
+    var append$1 = function (parent, elements) {
+      each(elements, function (x) {
+        append(parent, x);
+      });
+    };
+
+    var empty = function (element) {
+      element.dom().textContent = '';
+      each(children(element), function (rogue) {
+        remove$2(rogue);
+      });
+    };
+    var remove$2 = function (element) {
+      var dom = element.dom();
+      if (dom.parentNode !== null) {
+        dom.parentNode.removeChild(dom);
+      }
+    };
+    var unwrap = function (wrapper) {
+      var children$1 = children(wrapper);
+      if (children$1.length > 0) {
+        before$1(wrapper, children$1);
+      }
+      remove$2(wrapper);
+    };
+
+    var grid = function (rows, columns) {
+      return {
+        rows: constant(rows),
+        columns: constant(columns)
+      };
+    };
+    var address = function (row, column) {
+      return {
+        row: constant(row),
+        column: constant(column)
+      };
+    };
+    var detail = function (element, rowspan, colspan) {
+      return {
+        element: constant(element),
+        rowspan: constant(rowspan),
+        colspan: constant(colspan)
+      };
+    };
+    var detailnew = function (element, rowspan, colspan, isNew) {
+      return {
+        element: constant(element),
+        rowspan: constant(rowspan),
+        colspan: constant(colspan),
+        isNew: constant(isNew)
+      };
+    };
+    var extended = function (element, rowspan, colspan, row, column) {
+      return {
+        element: constant(element),
+        rowspan: constant(rowspan),
+        colspan: constant(colspan),
+        row: constant(row),
+        column: constant(column)
+      };
+    };
+    var rowdata = function (element, cells, section) {
+      return {
+        element: constant(element),
+        cells: constant(cells),
+        section: constant(section)
+      };
+    };
+    var elementnew = function (element, isNew) {
+      return {
+        element: constant(element),
+        isNew: constant(isNew)
+      };
+    };
+    var rowdatanew = function (element, cells, section, isNew) {
+      return {
+        element: constant(element),
+        cells: constant(cells),
+        section: constant(section),
+        isNew: constant(isNew)
+      };
+    };
+    var rowcells = function (cells, section) {
+      return {
+        cells: constant(cells),
+        section: constant(section)
+      };
+    };
+    var rowdetails = function (details, section) {
+      return {
+        details: constant(details),
+        section: constant(section)
+      };
+    };
+    var bounds = function (startRow, startCol, finishRow, finishCol) {
+      return {
+        startRow: constant(startRow),
+        startCol: constant(startCol),
+        finishRow: constant(finishRow),
+        finishCol: constant(finishCol)
+      };
+    };
+
+    var ancestors = function (scope, predicate, isRoot) {
+      return filter(parents(scope, isRoot), predicate);
+    };
+    var children$1 = function (scope, predicate) {
+      return filter(children(scope), predicate);
+    };
+    var descendants = function (scope, predicate) {
+      var result = [];
+      each(children(scope), function (x) {
+        if (predicate(x)) {
+          result = result.concat([x]);
+        }
+        result = result.concat(descendants(x, predicate));
+      });
+      return result;
+    };
+
+    var ancestors$1 = function (scope, selector, isRoot) {
+      return ancestors(scope, function (e) {
+        return is(e, selector);
+      }, isRoot);
+    };
+    var children$2 = function (scope, selector) {
+      return children$1(scope, function (e) {
+        return is(e, selector);
+      });
+    };
+    var descendants$1 = function (scope, selector) {
+      return all(selector, scope);
+    };
+
+    function ClosestOrAncestor (is, ancestor, scope, a, isRoot) {
+      return is(scope, a) ? Option.some(scope) : isFunction(isRoot) && isRoot(scope) ? Option.none() : ancestor(scope, a, isRoot);
+    }
+
+    var ancestor = function (scope, predicate, isRoot) {
+      var element = scope.dom();
+      var stop = isFunction(isRoot) ? isRoot : constant(false);
+      while (element.parentNode) {
+        element = element.parentNode;
+        var el = Element.fromDom(element);
+        if (predicate(el)) {
+          return Option.some(el);
+        } else if (stop(el)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var closest = function (scope, predicate, isRoot) {
+      var is = function (s, test) {
+        return test(s);
+      };
+      return ClosestOrAncestor(is, ancestor, scope, predicate, isRoot);
+    };
+    var child$1 = function (scope, predicate) {
+      var pred = function (node) {
+        return predicate(Element.fromDom(node));
+      };
+      var result = find(scope.dom().childNodes, pred);
+      return result.map(Element.fromDom);
+    };
+    var descendant = function (scope, predicate) {
+      var descend = function (node) {
+        for (var i = 0; i < node.childNodes.length; i++) {
+          var child_1 = Element.fromDom(node.childNodes[i]);
+          if (predicate(child_1)) {
+            return Option.some(child_1);
+          }
+          var res = descend(node.childNodes[i]);
+          if (res.isSome()) {
+            return res;
+          }
+        }
+        return Option.none();
+      };
+      return descend(scope.dom());
+    };
+
+    var ancestor$1 = function (scope, selector, isRoot) {
+      return ancestor(scope, function (e) {
+        return is(e, selector);
+      }, isRoot);
+    };
+    var child$2 = function (scope, selector) {
+      return child$1(scope, function (e) {
+        return is(e, selector);
+      });
+    };
+    var descendant$1 = function (scope, selector) {
+      return one(selector, scope);
+    };
+    var closest$1 = function (scope, selector, isRoot) {
+      var is$1 = function (element, selector) {
+        return is(element, selector);
+      };
+      return ClosestOrAncestor(is$1, ancestor$1, scope, selector, isRoot);
+    };
+
+    var getAttrValue = function (cell, name, fallback) {
+      if (fallback === void 0) {
+        fallback = 0;
+      }
+      return getOpt(cell, name).map(function (value) {
+        return parseInt(value, 10);
+      }).getOr(fallback);
+    };
+    var getSpan = function (cell, type) {
+      return getAttrValue(cell, type, 1);
+    };
+    var hasColspan = function (cell) {
+      return getSpan(cell, 'colspan') > 1;
+    };
+    var hasRowspan = function (cell) {
+      return getSpan(cell, 'rowspan') > 1;
+    };
+    var getCssValue = function (element, property) {
+      return parseInt(get$2(element, property), 10);
+    };
+    var minWidth = constant(10);
+    var minHeight = constant(10);
+
+    var firstLayer = function (scope, selector) {
+      return filterFirstLayer(scope, selector, constant(true));
+    };
+    var filterFirstLayer = function (scope, selector, predicate) {
+      return bind(children(scope), function (x) {
+        return is(x, selector) ? predicate(x) ? [x] : [] : filterFirstLayer(x, selector, predicate);
+      });
+    };
+
+    var lookup = function (tags, element, isRoot) {
+      if (isRoot === void 0) {
+        isRoot = never;
+      }
+      if (isRoot(element)) {
+        return Option.none();
+      }
+      if (contains(tags, name(element))) {
+        return Option.some(element);
+      }
+      var isRootOrUpperTable = function (elm) {
+        return is(elm, 'table') || isRoot(elm);
+      };
+      return ancestor$1(element, tags.join(','), isRootOrUpperTable);
+    };
+    var cell = function (element, isRoot) {
+      return lookup([
+        'td',
+        'th'
+      ], element, isRoot);
+    };
+    var cells = function (ancestor) {
+      return firstLayer(ancestor, 'th,td');
+    };
+    var neighbours = function (selector, element) {
+      return parent(element).map(function (parent) {
+        return children$2(parent, selector);
+      });
+    };
+    var neighbourCells = curry(neighbours, 'th,td');
+    var neighbourRows = curry(neighbours, 'tr');
+    var table = function (element, isRoot) {
+      return closest$1(element, 'table', isRoot);
+    };
+    var rows = function (ancestor) {
+      return firstLayer(ancestor, 'tr');
+    };
+
+    var fromTable = function (table) {
+      var rows$1 = rows(table);
+      return map(rows$1, function (row) {
+        var element = row;
+        var parent$1 = parent(element);
+        var parentSection = parent$1.map(function (p) {
+          var parentName = name(p);
+          return parentName === 'tfoot' || parentName === 'thead' || parentName === 'tbody' ? parentName : 'tbody';
+        }).getOr('tbody');
+        var cells$1 = map(cells(row), function (cell) {
+          var rowspan = getAttrValue(cell, 'rowspan', 1);
+          var colspan = getAttrValue(cell, 'colspan', 1);
+          return detail(cell, rowspan, colspan);
+        });
+        return rowdata(element, cells$1, parentSection);
+      });
+    };
+    var fromPastedRows = function (rows, example) {
+      return map(rows, function (row) {
+        var cells$1 = map(cells(row), function (cell) {
+          var rowspan = getAttrValue(cell, 'rowspan', 1);
+          var colspan = getAttrValue(cell, 'colspan', 1);
+          return detail(cell, rowspan, colspan);
+        });
+        return rowdata(row, cells$1, example.section());
+      });
+    };
+
+    var key = function (row, column) {
+      return row + ',' + column;
+    };
+    var getAt = function (warehouse, row, column) {
+      var raw = warehouse.access[key(row, column)];
+      return raw !== undefined ? Option.some(raw) : Option.none();
+    };
+    var findItem = function (warehouse, item, comparator) {
+      var filtered = filterItems(warehouse, function (detail) {
+        return comparator(item, detail.element());
+      });
+      return filtered.length > 0 ? Option.some(filtered[0]) : Option.none();
+    };
+    var filterItems = function (warehouse, predicate) {
+      var all = bind(warehouse.all, function (r) {
+        return r.cells();
+      });
+      return filter(all, predicate);
+    };
+    var generate = function (list) {
+      var access = {};
+      var cells = [];
+      var maxRows = list.length;
+      var maxColumns = 0;
+      each(list, function (details, r) {
+        var currentRow = [];
+        each(details.cells(), function (detail) {
+          var start = 0;
+          while (access[key(r, start)] !== undefined) {
+            start++;
+          }
+          var current = extended(detail.element(), detail.rowspan(), detail.colspan(), r, start);
+          for (var i = 0; i < detail.colspan(); i++) {
+            for (var j = 0; j < detail.rowspan(); j++) {
+              var cr = r + j;
+              var cc = start + i;
+              var newpos = key(cr, cc);
+              access[newpos] = current;
+              maxColumns = Math.max(maxColumns, cc + 1);
+            }
+          }
+          currentRow.push(current);
+        });
+        cells.push(rowdata(details.element(), currentRow, details.section()));
+      });
+      var grid$1 = grid(maxRows, maxColumns);
+      return {
+        grid: grid$1,
+        access: access,
+        all: cells
+      };
+    };
+    var justCells = function (warehouse) {
+      var rows = map(warehouse.all, function (w) {
+        return w.cells();
+      });
+      return flatten(rows);
+    };
+    var Warehouse = {
+      generate: generate,
+      getAt: getAt,
+      findItem: findItem,
+      filterItems: filterItems,
+      justCells: justCells
+    };
+
+    var statsStruct = function (minRow, minCol, maxRow, maxCol) {
+      return {
+        minRow: minRow,
+        minCol: minCol,
+        maxRow: maxRow,
+        maxCol: maxCol
+      };
+    };
+    var findSelectedStats = function (house, isSelected) {
+      var totalColumns = house.grid.columns();
+      var totalRows = house.grid.rows();
+      var minRow = totalRows;
+      var minCol = totalColumns;
+      var maxRow = 0;
+      var maxCol = 0;
+      each$1(house.access, function (detail) {
+        if (isSelected(detail)) {
+          var startRow = detail.row();
+          var endRow = startRow + detail.rowspan() - 1;
+          var startCol = detail.column();
+          var endCol = startCol + detail.colspan() - 1;
+          if (startRow < minRow) {
+            minRow = startRow;
+          } else if (endRow > maxRow) {
+            maxRow = endRow;
+          }
+          if (startCol < minCol) {
+            minCol = startCol;
+          } else if (endCol > maxCol) {
+            maxCol = endCol;
+          }
+        }
+      });
+      return statsStruct(minRow, minCol, maxRow, maxCol);
+    };
+    var makeCell = function (list, seenSelected, rowIndex) {
+      var row = list[rowIndex].element();
+      var td = Element.fromTag('td');
+      append(td, Element.fromTag('br'));
+      var f = seenSelected ? append : prepend;
+      f(row, td);
+    };
+    var fillInGaps = function (list, house, stats, isSelected) {
+      var totalColumns = house.grid.columns();
+      var totalRows = house.grid.rows();
+      for (var i = 0; i < totalRows; i++) {
+        var seenSelected = false;
+        for (var j = 0; j < totalColumns; j++) {
+          if (!(i < stats.minRow || i > stats.maxRow || j < stats.minCol || j > stats.maxCol)) {
+            var needCell = Warehouse.getAt(house, i, j).filter(isSelected).isNone();
+            if (needCell) {
+              makeCell(list, seenSelected, i);
+            } else {
+              seenSelected = true;
+            }
+          }
+        }
+      }
+    };
+    var clean = function (table, stats) {
+      var emptyRows = filter(firstLayer(table, 'tr'), function (row) {
+        return row.dom().childElementCount === 0;
+      });
+      each(emptyRows, remove$2);
+      if (stats.minCol === stats.maxCol || stats.minRow === stats.maxRow) {
+        each(firstLayer(table, 'th,td'), function (cell) {
+          remove(cell, 'rowspan');
+          remove(cell, 'colspan');
+        });
+      }
+      remove(table, 'width');
+      remove(table, 'height');
+      remove$1(table, 'width');
+      remove$1(table, 'height');
+    };
+    var extract = function (table, selectedSelector) {
+      var isSelected = function (detail) {
+        return is(detail.element(), selectedSelector);
+      };
+      var list = fromTable(table);
+      var house = Warehouse.generate(list);
+      var stats = findSelectedStats(house, isSelected);
+      var selector = 'th:not(' + selectedSelector + ')' + ',td:not(' + selectedSelector + ')';
+      var unselectedCells = filterFirstLayer(table, 'th,td', function (cell) {
+        return is(cell, selector);
+      });
+      each(unselectedCells, remove$2);
+      fillInGaps(list, house, stats, isSelected);
+      clean(table, stats);
+      return table;
+    };
+
+    var nbsp = '\xA0';
+
+    function NodeValue (is, name) {
+      var get = function (element) {
+        if (!is(element)) {
+          throw new Error('Can only get ' + name + ' value of a ' + name + ' node');
+        }
+        return getOption(element).getOr('');
+      };
+      var getOption = function (element) {
+        return is(element) ? Option.from(element.dom().nodeValue) : Option.none();
+      };
+      var set = function (element, value) {
+        if (!is(element)) {
+          throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');
+        }
+        element.dom().nodeValue = value;
+      };
+      return {
+        get: get,
+        getOption: getOption,
+        set: set
+      };
+    }
+
+    var api = NodeValue(isText, 'text');
+    var get$3 = function (element) {
+      return api.get(element);
+    };
+    var getOption = function (element) {
+      return api.getOption(element);
+    };
+    var set$2 = function (element, value) {
+      return api.set(element, value);
+    };
+
+    var getEnd = function (element) {
+      return name(element) === 'img' ? 1 : getOption(element).fold(function () {
+        return children(element).length;
+      }, function (v) {
+        return v.length;
+      });
+    };
+    var isTextNodeWithCursorPosition = function (el) {
+      return getOption(el).filter(function (text) {
+        return text.trim().length !== 0 || text.indexOf(nbsp) > -1;
+      }).isSome();
+    };
+    var elementsWithCursorPosition = [
+      'img',
+      'br'
+    ];
+    var isCursorPosition = function (elem) {
+      var hasCursorPosition = isTextNodeWithCursorPosition(elem);
+      return hasCursorPosition || contains(elementsWithCursorPosition, name(elem));
+    };
+
+    var first = function (element) {
+      return descendant(element, isCursorPosition);
+    };
+    var last$1 = function (element) {
+      return descendantRtl(element, isCursorPosition);
+    };
+    var descendantRtl = function (scope, predicate) {
+      var descend = function (element) {
+        var children$1 = children(element);
+        for (var i = children$1.length - 1; i >= 0; i--) {
+          var child = children$1[i];
+          if (predicate(child)) {
+            return Option.some(child);
+          }
+          var res = descend(child);
+          if (res.isSome()) {
+            return res;
+          }
+        }
+        return Option.none();
+      };
+      return descend(scope);
+    };
+
+    var clone$1 = function (original, isDeep) {
+      return Element.fromDom(original.dom().cloneNode(isDeep));
+    };
+    var shallow = function (original) {
+      return clone$1(original, false);
+    };
+    var deep = function (original) {
+      return clone$1(original, true);
+    };
+    var shallowAs = function (original, tag) {
+      var nu = Element.fromTag(tag);
+      var attributes = clone(original);
+      setAll(nu, attributes);
+      return nu;
+    };
+    var copy$1 = function (original, tag) {
+      var nu = shallowAs(original, tag);
+      var cloneChildren = children(deep(original));
+      append$1(nu, cloneChildren);
+      return nu;
+    };
+
+    var createCell = function () {
+      var td = Element.fromTag('td');
+      append(td, Element.fromTag('br'));
+      return td;
+    };
+    var replace = function (cell, tag, attrs) {
+      var replica = copy$1(cell, tag);
+      each$1(attrs, function (v, k) {
+        if (v === null) {
+          remove(replica, k);
+        } else {
+          set(replica, k, v);
+        }
+      });
+      return replica;
+    };
+    var pasteReplace = function (cell) {
+      return cell;
+    };
+    var newRow = function (doc) {
+      return function () {
+        return Element.fromTag('tr', doc.dom());
+      };
+    };
+    var cloneFormats = function (oldCell, newCell, formats) {
+      var first$1 = first(oldCell);
+      return first$1.map(function (firstText) {
+        var formatSelector = formats.join(',');
+        var parents = ancestors$1(firstText, formatSelector, function (element) {
+          return eq(element, oldCell);
+        });
+        return foldr(parents, function (last, parent) {
+          var clonedFormat = shallow(parent);
+          remove(clonedFormat, 'contenteditable');
+          append(last, clonedFormat);
+          return clonedFormat;
+        }, newCell);
+      }).getOr(newCell);
+    };
+    var cellOperations = function (mutate, doc, formatsToClone) {
+      var newCell = function (prev) {
+        var docu = owner(prev.element());
+        var td = Element.fromTag(name(prev.element()), docu.dom());
+        var formats = formatsToClone.getOr([
+          'strong',
+          'em',
+          'b',
+          'i',
+          'span',
+          'font',
+          'h1',
+          'h2',
+          'h3',
+          'h4',
+          'h5',
+          'h6',
+          'p',
+          'div'
+        ]);
+        var lastNode = formats.length > 0 ? cloneFormats(prev.element(), td, formats) : td;
+        append(lastNode, Element.fromTag('br'));
+        copy(prev.element(), td);
+        remove$1(td, 'height');
+        if (prev.colspan() !== 1) {
+          remove$1(prev.element(), 'width');
+        }
+        mutate(prev.element(), td);
+        return td;
+      };
+      return {
+        row: newRow(doc),
+        cell: newCell,
+        replace: replace,
+        gap: createCell
+      };
+    };
+    var paste = function (doc) {
+      return {
+        row: newRow(doc),
+        cell: createCell,
+        replace: pasteReplace,
+        gap: createCell
+      };
+    };
+
+    var fromHtml$1 = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      return children(Element.fromDom(div));
+    };
+
+    var inSelection = function (bounds, detail) {
+      var leftEdge = detail.column();
+      var rightEdge = detail.column() + detail.colspan() - 1;
+      var topEdge = detail.row();
+      var bottomEdge = detail.row() + detail.rowspan() - 1;
+      return leftEdge <= bounds.finishCol() && rightEdge >= bounds.startCol() && (topEdge <= bounds.finishRow() && bottomEdge >= bounds.startRow());
+    };
+    var isWithin = function (bounds, detail) {
+      return detail.column() >= bounds.startCol() && detail.column() + detail.colspan() - 1 <= bounds.finishCol() && detail.row() >= bounds.startRow() && detail.row() + detail.rowspan() - 1 <= bounds.finishRow();
+    };
+    var isRectangular = function (warehouse, bounds) {
+      var isRect = true;
+      var detailIsWithin = curry(isWithin, bounds);
+      for (var i = bounds.startRow(); i <= bounds.finishRow(); i++) {
+        for (var j = bounds.startCol(); j <= bounds.finishCol(); j++) {
+          isRect = isRect && Warehouse.getAt(warehouse, i, j).exists(detailIsWithin);
+        }
+      }
+      return isRect ? Option.some(bounds) : Option.none();
+    };
+
+    var getBounds = function (detailA, detailB) {
+      return bounds(Math.min(detailA.row(), detailB.row()), Math.min(detailA.column(), detailB.column()), Math.max(detailA.row() + detailA.rowspan() - 1, detailB.row() + detailB.rowspan() - 1), Math.max(detailA.column() + detailA.colspan() - 1, detailB.column() + detailB.colspan() - 1));
+    };
+    var getAnyBox = function (warehouse, startCell, finishCell) {
+      var startCoords = Warehouse.findItem(warehouse, startCell, eq);
+      var finishCoords = Warehouse.findItem(warehouse, finishCell, eq);
+      return startCoords.bind(function (sc) {
+        return finishCoords.map(function (fc) {
+          return getBounds(sc, fc);
+        });
+      });
+    };
+    var getBox = function (warehouse, startCell, finishCell) {
+      return getAnyBox(warehouse, startCell, finishCell).bind(function (bounds) {
+        return isRectangular(warehouse, bounds);
+      });
+    };
+
+    var moveBy = function (warehouse, cell, row, column) {
+      return Warehouse.findItem(warehouse, cell, eq).bind(function (detail) {
+        var startRow = row > 0 ? detail.row() + detail.rowspan() - 1 : detail.row();
+        var startCol = column > 0 ? detail.column() + detail.colspan() - 1 : detail.column();
+        var dest = Warehouse.getAt(warehouse, startRow + row, startCol + column);
+        return dest.map(function (d) {
+          return d.element();
+        });
+      });
+    };
+    var intercepts = function (warehouse, start, finish) {
+      return getAnyBox(warehouse, start, finish).map(function (bounds) {
+        var inside = Warehouse.filterItems(warehouse, curry(inSelection, bounds));
+        return map(inside, function (detail) {
+          return detail.element();
+        });
+      });
+    };
+    var parentCell = function (warehouse, innerCell) {
+      var isContainedBy = function (c1, c2) {
+        return contains$2(c2, c1);
+      };
+      return Warehouse.findItem(warehouse, innerCell, isContainedBy).map(function (detail) {
+        return detail.element();
+      });
+    };
+
+    var moveBy$1 = function (cell, deltaRow, deltaColumn) {
+      return table(cell).bind(function (table) {
+        var warehouse = getWarehouse(table);
+        return moveBy(warehouse, cell, deltaRow, deltaColumn);
+      });
+    };
+    var intercepts$1 = function (table, first, last) {
+      var warehouse = getWarehouse(table);
+      return intercepts(warehouse, first, last);
+    };
+    var nestedIntercepts = function (table, first, firstTable, last, lastTable) {
+      var warehouse = getWarehouse(table);
+      var optStartCell = eq(table, firstTable) ? Option.some(first) : parentCell(warehouse, first);
+      var optLastCell = eq(table, lastTable) ? Option.some(last) : parentCell(warehouse, last);
+      return optStartCell.bind(function (startCell) {
+        return optLastCell.bind(function (lastCell) {
+          return intercepts(warehouse, startCell, lastCell);
+        });
+      });
+    };
+    var getBox$1 = function (table, first, last) {
+      var warehouse = getWarehouse(table);
+      return getBox(warehouse, first, last);
+    };
+    var getWarehouse = function (table) {
+      var list = fromTable(table);
+      return Warehouse.generate(list);
+    };
+
+    var TagBoundaries = [
+      'body',
+      'p',
+      'div',
+      'article',
+      'aside',
+      'figcaption',
+      'figure',
+      'footer',
+      'header',
+      'nav',
+      'section',
+      'ol',
+      'ul',
+      'li',
+      'table',
+      'thead',
+      'tbody',
+      'tfoot',
+      'caption',
+      'tr',
+      'td',
+      'th',
+      'h1',
+      'h2',
+      'h3',
+      'h4',
+      'h5',
+      'h6',
+      'blockquote',
+      'pre',
+      'address'
+    ];
+
+    function DomUniverse () {
+      var clone$1 = function (element) {
+        return Element.fromDom(element.dom().cloneNode(false));
+      };
+      var document = function (element) {
+        return element.dom().ownerDocument;
+      };
+      var isBoundary = function (element) {
+        if (!isElement(element)) {
+          return false;
+        }
+        if (name(element) === 'body') {
+          return true;
+        }
+        return contains(TagBoundaries, name(element));
+      };
+      var isEmptyTag = function (element) {
+        if (!isElement(element)) {
+          return false;
+        }
+        return contains([
+          'br',
+          'img',
+          'hr',
+          'input'
+        ], name(element));
+      };
+      var isNonEditable = function (element) {
+        return isElement(element) && get$1(element, 'contenteditable') === 'false';
+      };
+      var comparePosition = function (element, other) {
+        return element.dom().compareDocumentPosition(other.dom());
+      };
+      var copyAttributesTo = function (source, destination) {
+        var as = clone(source);
+        setAll(destination, as);
+      };
+      return {
+        up: constant({
+          selector: ancestor$1,
+          closest: closest$1,
+          predicate: ancestor,
+          all: parents
+        }),
+        down: constant({
+          selector: descendants$1,
+          predicate: descendants
+        }),
+        styles: constant({
+          get: get$2,
+          getRaw: getRaw,
+          set: set$1,
+          remove: remove$1
+        }),
+        attrs: constant({
+          get: get$1,
+          set: set,
+          remove: remove,
+          copyTo: copyAttributesTo
+        }),
+        insert: constant({
+          before: before,
+          after: after,
+          afterAll: after$1,
+          append: append,
+          appendAll: append$1,
+          prepend: prepend,
+          wrap: wrap
+        }),
+        remove: constant({
+          unwrap: unwrap,
+          remove: remove$2
+        }),
+        create: constant({
+          nu: Element.fromTag,
+          clone: clone$1,
+          text: Element.fromText
+        }),
+        query: constant({
+          comparePosition: comparePosition,
+          prevSibling: prevSibling,
+          nextSibling: nextSibling
+        }),
+        property: constant({
+          children: children,
+          name: name,
+          parent: parent,
+          document: document,
+          isText: isText,
+          isComment: isComment,
+          isElement: isElement,
+          getText: get$3,
+          setText: set$2,
+          isBoundary: isBoundary,
+          isEmptyTag: isEmptyTag,
+          isNonEditable: isNonEditable
+        }),
+        eq: eq,
+        is: is$1
+      };
+    }
+
+    var all$1 = function (universe, look, elements, f) {
+      var head = elements[0];
+      var tail = elements.slice(1);
+      return f(universe, look, head, tail);
+    };
+    var oneAll = function (universe, look, elements) {
+      return elements.length > 0 ? all$1(universe, look, elements, unsafeOne) : Option.none();
+    };
+    var unsafeOne = function (universe, look, head, tail) {
+      var start = look(universe, head);
+      return foldr(tail, function (b, a) {
+        var current = look(universe, a);
+        return commonElement(universe, b, current);
+      }, start);
+    };
+    var commonElement = function (universe, start, end) {
+      return start.bind(function (s) {
+        return end.filter(curry(universe.eq, s));
+      });
+    };
+
+    var eq$1 = function (universe, item) {
+      return curry(universe.eq, item);
+    };
+    var ancestors$2 = function (universe, start, end, isRoot) {
+      if (isRoot === void 0) {
+        isRoot = never;
+      }
+      var ps1 = [start].concat(universe.up().all(start));
+      var ps2 = [end].concat(universe.up().all(end));
+      var prune = function (path) {
+        var index = findIndex(path, isRoot);
+        return index.fold(function () {
+          return path;
+        }, function (ind) {
+          return path.slice(0, ind + 1);
+        });
+      };
+      var pruned1 = prune(ps1);
+      var pruned2 = prune(ps2);
+      var shared = find(pruned1, function (x) {
+        return exists(pruned2, eq$1(universe, x));
+      });
+      return {
+        firstpath: constant(pruned1),
+        secondpath: constant(pruned2),
+        shared: constant(shared)
+      };
+    };
+
+    var sharedOne = oneAll;
+    var ancestors$3 = ancestors$2;
+
+    var universe = DomUniverse();
+    var sharedOne$1 = function (look, elements) {
+      return sharedOne(universe, function (_universe, element) {
+        return look(element);
+      }, elements);
+    };
+    var ancestors$4 = function (start, finish, isRoot) {
+      return ancestors$3(universe, start, finish, isRoot);
+    };
+
+    var lookupTable = function (container) {
+      return ancestor$1(container, 'table');
+    };
+    var identify = function (start, finish, isRoot) {
+      var getIsRoot = function (rootTable) {
+        return function (element) {
+          return isRoot !== undefined && isRoot(element) || eq(element, rootTable);
+        };
+      };
+      if (eq(start, finish)) {
+        return Option.some({
+          boxes: Option.some([start]),
+          start: start,
+          finish: finish
+        });
+      } else {
+        return lookupTable(start).bind(function (startTable) {
+          return lookupTable(finish).bind(function (finishTable) {
+            if (eq(startTable, finishTable)) {
+              return Option.some({
+                boxes: intercepts$1(startTable, start, finish),
+                start: start,
+                finish: finish
+              });
+            } else if (contains$2(startTable, finishTable)) {
+              var ancestorCells = ancestors$1(finish, 'td,th', getIsRoot(startTable));
+              var finishCell = ancestorCells.length > 0 ? ancestorCells[ancestorCells.length - 1] : finish;
+              return Option.some({
+                boxes: nestedIntercepts(startTable, start, startTable, finish, finishTable),
+                start: start,
+                finish: finishCell
+              });
+            } else if (contains$2(finishTable, startTable)) {
+              var ancestorCells = ancestors$1(start, 'td,th', getIsRoot(finishTable));
+              var startCell = ancestorCells.length > 0 ? ancestorCells[ancestorCells.length - 1] : start;
+              return Option.some({
+                boxes: nestedIntercepts(finishTable, start, startTable, finish, finishTable),
+                start: start,
+                finish: startCell
+              });
+            } else {
+              return ancestors$4(start, finish).shared().bind(function (lca) {
+                return closest$1(lca, 'table', isRoot).bind(function (lcaTable) {
+                  var finishAncestorCells = ancestors$1(finish, 'td,th', getIsRoot(lcaTable));
+                  var finishCell = finishAncestorCells.length > 0 ? finishAncestorCells[finishAncestorCells.length - 1] : finish;
+                  var startAncestorCells = ancestors$1(start, 'td,th', getIsRoot(lcaTable));
+                  var startCell = startAncestorCells.length > 0 ? startAncestorCells[startAncestorCells.length - 1] : start;
+                  return Option.some({
+                    boxes: nestedIntercepts(lcaTable, start, startTable, finish, finishTable),
+                    start: startCell,
+                    finish: finishCell
+                  });
+                });
+              });
+            }
+          });
+        });
+      }
+    };
+    var retrieve = function (container, selector) {
+      var sels = descendants$1(container, selector);
+      return sels.length > 0 ? Option.some(sels) : Option.none();
+    };
+    var getLast = function (boxes, lastSelectedSelector) {
+      return find(boxes, function (box) {
+        return is(box, lastSelectedSelector);
+      });
+    };
+    var getEdges = function (container, firstSelectedSelector, lastSelectedSelector) {
+      return descendant$1(container, firstSelectedSelector).bind(function (first) {
+        return descendant$1(container, lastSelectedSelector).bind(function (last) {
+          return sharedOne$1(lookupTable, [
+            first,
+            last
+          ]).map(function (tbl) {
+            return {
+              first: constant(first),
+              last: constant(last),
+              table: constant(tbl)
+            };
+          });
+        });
+      });
+    };
+    var expandTo = function (finish, firstSelectedSelector) {
+      return ancestor$1(finish, 'table').bind(function (table) {
+        return descendant$1(table, firstSelectedSelector).bind(function (start) {
+          return identify(start, finish).bind(function (identified) {
+            return identified.boxes.map(function (boxes) {
+              return {
+                boxes: boxes,
+                start: identified.start,
+                finish: identified.finish
+              };
+            });
+          });
+        });
+      });
+    };
+    var shiftSelection = function (boxes, deltaRow, deltaColumn, firstSelectedSelector, lastSelectedSelector) {
+      return getLast(boxes, lastSelectedSelector).bind(function (last) {
+        return moveBy$1(last, deltaRow, deltaColumn).bind(function (finish) {
+          return expandTo(finish, firstSelectedSelector);
+        });
+      });
+    };
+
+    var retrieve$1 = function (container, selector) {
+      return retrieve(container, selector);
+    };
+    var retrieveBox = function (container, firstSelectedSelector, lastSelectedSelector) {
+      return getEdges(container, firstSelectedSelector, lastSelectedSelector).bind(function (edges) {
+        var isRoot = function (ancestor) {
+          return eq(container, ancestor);
+        };
+        var firstAncestor = ancestor$1(edges.first(), 'thead,tfoot,tbody,table', isRoot);
+        var lastAncestor = ancestor$1(edges.last(), 'thead,tfoot,tbody,table', isRoot);
+        return firstAncestor.bind(function (fA) {
+          return lastAncestor.bind(function (lA) {
+            return eq(fA, lA) ? getBox$1(edges.table(), edges.first(), edges.last()) : Option.none();
+          });
+        });
+      });
+    };
+
+    var strSelected = 'data-mce-selected';
+    var strSelectedSelector = 'td[' + strSelected + '],th[' + strSelected + ']';
+    var strAttributeSelector = '[' + strSelected + ']';
+    var strFirstSelected = 'data-mce-first-selected';
+    var strFirstSelectedSelector = 'td[' + strFirstSelected + '],th[' + strFirstSelected + ']';
+    var strLastSelected = 'data-mce-last-selected';
+    var strLastSelectedSelector = 'td[' + strLastSelected + '],th[' + strLastSelected + ']';
+    var selected = strSelected;
+    var selectedSelector = strSelectedSelector;
+    var attributeSelector = strAttributeSelector;
+    var firstSelected = strFirstSelected;
+    var firstSelectedSelector = strFirstSelectedSelector;
+    var lastSelected = strLastSelected;
+    var lastSelectedSelector = strLastSelectedSelector;
+
+    var Ephemera = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        selected: selected,
+        selectedSelector: selectedSelector,
+        attributeSelector: attributeSelector,
+        firstSelected: firstSelected,
+        firstSelectedSelector: firstSelectedSelector,
+        lastSelected: lastSelected,
+        lastSelectedSelector: lastSelectedSelector
+    });
+
+    var generate$1 = function (cases) {
+      if (!isArray(cases)) {
+        throw new Error('cases must be an array');
+      }
+      if (cases.length === 0) {
+        throw new Error('there must be at least one case');
+      }
+      var constructors = [];
+      var adt = {};
+      each(cases, function (acase, count) {
+        var keys$1 = keys(acase);
+        if (keys$1.length !== 1) {
+          throw new Error('one and only one name per case');
+        }
+        var key = keys$1[0];
+        var value = acase[key];
+        if (adt[key] !== undefined) {
+          throw new Error('duplicate key detected:' + key);
+        } else if (key === 'cata') {
+          throw new Error('cannot have a case named cata (sorry)');
+        } else if (!isArray(value)) {
+          throw new Error('case arguments must be an array');
+        }
+        constructors.push(key);
+        adt[key] = function () {
+          var argLength = arguments.length;
+          if (argLength !== value.length) {
+            throw new Error('Wrong number of arguments to case ' + key + '. Expected ' + value.length + ' (' + value + '), got ' + argLength);
+          }
+          var args = new Array(argLength);
+          for (var i = 0; i < args.length; i++) {
+            args[i] = arguments[i];
+          }
+          var match = function (branches) {
+            var branchKeys = keys(branches);
+            if (constructors.length !== branchKeys.length) {
+              throw new Error('Wrong number of arguments to match. Expected: ' + constructors.join(',') + '\nActual: ' + branchKeys.join(','));
+            }
+            var allReqd = forall(constructors, function (reqKey) {
+              return contains(branchKeys, reqKey);
+            });
+            if (!allReqd) {
+              throw new Error('Not all branches were specified when using match. Specified: ' + branchKeys.join(', ') + '\nRequired: ' + constructors.join(', '));
+            }
+            return branches[key].apply(null, args);
+          };
+          return {
+            fold: function () {
+              if (arguments.length !== cases.length) {
+                throw new Error('Wrong number of arguments to fold. Expected ' + cases.length + ', got ' + arguments.length);
+              }
+              var target = arguments[count];
+              return target.apply(null, args);
+            },
+            match: match,
+            log: function (label) {
+              domGlobals.console.log(label, {
+                constructors: constructors,
+                constructor: key,
+                params: args
+              });
+            }
+          };
+        };
+      });
+      return adt;
+    };
+    var Adt = { generate: generate$1 };
+
+    var type$1 = Adt.generate([
+      { none: [] },
+      { multiple: ['elements'] },
+      { single: ['selection'] }
+    ]);
+    var cata = function (subject, onNone, onMultiple, onSingle) {
+      return subject.fold(onNone, onMultiple, onSingle);
+    };
+    var none$1 = type$1.none;
+    var multiple = type$1.multiple;
+    var single = type$1.single;
+
+    var selection = function (cell, selections) {
+      return cata(selections.get(), constant([]), identity, constant([cell]));
+    };
+    var unmergable = function (cell, selections) {
+      var hasSpan = function (elem) {
+        return has$1(elem, 'rowspan') && parseInt(get$1(elem, 'rowspan'), 10) > 1 || has$1(elem, 'colspan') && parseInt(get$1(elem, 'colspan'), 10) > 1;
+      };
+      var candidates = selection(cell, selections);
+      return candidates.length > 0 && forall(candidates, hasSpan) ? Option.some(candidates) : Option.none();
+    };
+    var mergable = function (table, selections) {
+      return cata(selections.get(), Option.none, function (cells, _env) {
+        if (cells.length === 0) {
+          return Option.none();
+        }
+        return retrieveBox(table, firstSelectedSelector, lastSelectedSelector).bind(function (bounds) {
+          return cells.length > 1 ? Option.some({
+            bounds: constant(bounds),
+            cells: constant(cells)
+          }) : Option.none();
+        });
+      }, Option.none);
+    };
+
+    var noMenu = function (cell) {
+      return {
+        element: constant(cell),
+        mergable: Option.none,
+        unmergable: Option.none,
+        selection: constant([cell])
+      };
+    };
+    var forMenu = function (selections, table, cell) {
+      return {
+        element: constant(cell),
+        mergable: constant(mergable(table, selections)),
+        unmergable: constant(unmergable(cell, selections)),
+        selection: constant(selection(cell, selections))
+      };
+    };
+    var notCell = function (element) {
+      return noMenu(element);
+    };
+    var paste$1 = function (element, clipboard, generators) {
+      return {
+        element: constant(element),
+        clipboard: constant(clipboard),
+        generators: constant(generators)
+      };
+    };
+    var pasteRows = function (selections, table, cell, clipboard, generators) {
+      return {
+        element: constant(cell),
+        mergable: Option.none,
+        unmergable: Option.none,
+        selection: constant(selection(cell, selections)),
+        clipboard: constant(clipboard),
+        generators: constant(generators)
+      };
+    };
+
+    var extractSelected = function (cells) {
+      return table(cells[0]).map(deep).map(function (replica) {
+        return [extract(replica, attributeSelector)];
+      });
+    };
+    var serializeElements = function (editor, elements) {
+      return map(elements, function (elm) {
+        return editor.selection.serializer.serialize(elm.dom(), {});
+      }).join('');
+    };
+    var getTextContent = function (elements) {
+      return map(elements, function (element) {
+        return element.dom().innerText;
+      }).join('');
+    };
+    var registerEvents = function (editor, selections, actions, cellSelection) {
+      editor.on('BeforeGetContent', function (e) {
+        var multiCellContext = function (cells) {
+          e.preventDefault();
+          extractSelected(cells).each(function (elements) {
+            e.content = e.format === 'text' ? getTextContent(elements) : serializeElements(editor, elements);
+          });
+        };
+        if (e.selection === true) {
+          cata(selections.get(), noop, multiCellContext, noop);
+        }
+      });
+      editor.on('BeforeSetContent', function (e) {
+        if (e.selection === true && e.paste === true) {
+          var cellOpt = Option.from(editor.dom.getParent(editor.selection.getStart(), 'th,td'));
+          cellOpt.each(function (domCell) {
+            var cell = Element.fromDom(domCell);
+            table(cell).each(function (table) {
+              var elements = filter(fromHtml$1(e.content), function (content) {
+                return name(content) !== 'meta';
+              });
+              if (elements.length === 1 && name(elements[0]) === 'table') {
+                e.preventDefault();
+                var doc = Element.fromDom(editor.getDoc());
+                var generators = paste(doc);
+                var targets = paste$1(cell, elements[0], generators);
+                actions.pasteCells(table, targets).each(function (rng) {
+                  editor.selection.setRng(rng);
+                  editor.focus();
+                  cellSelection.clear(table);
+                });
+              }
+            });
+          });
+        }
+      });
+    };
+
+    function Dimension (name, getOffset) {
+      var set = function (element, h) {
+        if (!isNumber(h) && !h.match(/^[0-9]+$/)) {
+          throw new Error(name + '.set accepts only positive integer values. Value was ' + h);
+        }
+        var dom = element.dom();
+        if (isSupported(dom)) {
+          dom.style[name] = h + 'px';
+        }
+      };
+      var get = function (element) {
+        var r = getOffset(element);
+        if (r <= 0 || r === null) {
+          var css = get$2(element, name);
+          return parseFloat(css) || 0;
+        }
+        return r;
+      };
+      var getOuter = get;
+      var aggregate = function (element, properties) {
+        return foldl(properties, function (acc, property) {
+          var val = get$2(element, property);
+          var value = val === undefined ? 0 : parseInt(val, 10);
+          return isNaN(value) ? acc : acc + value;
+        }, 0);
+      };
+      var max = function (element, value, properties) {
+        var cumulativeInclusions = aggregate(element, properties);
+        var absoluteMax = value > cumulativeInclusions ? value - cumulativeInclusions : 0;
+        return absoluteMax;
+      };
+      return {
+        set: set,
+        get: get,
+        getOuter: getOuter,
+        aggregate: aggregate,
+        max: max
+      };
+    }
+
+    var api$1 = Dimension('height', function (element) {
+      var dom = element.dom();
+      return inBody(element) ? dom.getBoundingClientRect().height : dom.offsetHeight;
+    });
+    var get$4 = function (element) {
+      return api$1.get(element);
+    };
+    var getOuter = function (element) {
+      return api$1.getOuter(element);
+    };
+
+    var api$2 = Dimension('width', function (element) {
+      return element.dom().offsetWidth;
+    });
+    var get$5 = function (element) {
+      return api$2.get(element);
+    };
+    var getOuter$1 = function (element) {
+      return api$2.getOuter(element);
+    };
+
+    var needManualCalc = function () {
+      var platform = detect$3();
+      return platform.browser.isIE() || platform.browser.isEdge();
+    };
+    var toNumber = function (px, fallback) {
+      var num = parseFloat(px);
+      return isNaN(num) ? fallback : num;
+    };
+    var getProp = function (elm, name, fallback) {
+      return toNumber(get$2(elm, name), fallback);
+    };
+    var getCalculatedHeight = function (cell) {
+      var paddingTop = getProp(cell, 'padding-top', 0);
+      var paddingBottom = getProp(cell, 'padding-bottom', 0);
+      var borderTop = getProp(cell, 'border-top-width', 0);
+      var borderBottom = getProp(cell, 'border-bottom-width', 0);
+      var height = cell.dom().getBoundingClientRect().height;
+      var boxSizing = get$2(cell, 'box-sizing');
+      var borders = borderTop + borderBottom;
+      return boxSizing === 'border-box' ? height : height - paddingTop - paddingBottom - borders;
+    };
+    var getHeight = function (cell) {
+      return needManualCalc() ? getCalculatedHeight(cell) : getProp(cell, 'height', get$4(cell));
+    };
+
+    var rGenericSizeRegex = /(\d+(\.\d+)?)(\w|%)*/;
+    var rPercentageBasedSizeRegex = /(\d+(\.\d+)?)%/;
+    var rPixelBasedSizeRegex = /(\d+(\.\d+)?)px|em/;
+    var setPixelWidth = function (cell, amount) {
+      set$1(cell, 'width', amount + 'px');
+    };
+    var setPercentageWidth = function (cell, amount) {
+      set$1(cell, 'width', amount + '%');
+    };
+    var setHeight = function (cell, amount) {
+      set$1(cell, 'height', amount + 'px');
+    };
+    var getHeightValue = function (cell) {
+      return getRaw(cell, 'height').getOrThunk(function () {
+        return getHeight(cell) + 'px';
+      });
+    };
+    var convert = function (cell, number, getter, setter) {
+      var newSize = table(cell).map(function (table) {
+        var total = getter(table);
+        return Math.floor(number / 100 * total);
+      }).getOr(number);
+      setter(cell, newSize);
+      return newSize;
+    };
+    var normalizePixelSize = function (value, cell, getter, setter) {
+      var number = parseInt(value, 10);
+      return endsWith(value, '%') && name(cell) !== 'table' ? convert(cell, number, getter, setter) : number;
+    };
+    var getTotalHeight = function (cell) {
+      var value = getHeightValue(cell);
+      if (!value) {
+        return get$4(cell);
+      }
+      return normalizePixelSize(value, cell, get$4, setHeight);
+    };
+    var get$6 = function (cell, type, f) {
+      var v = f(cell);
+      var span = getSpan(cell, type);
+      return v / span;
+    };
+    var getRawWidth = function (element) {
+      var cssWidth = getRaw(element, 'width');
+      return cssWidth.fold(function () {
+        return Option.from(get$1(element, 'width'));
+      }, function (width) {
+        return Option.some(width);
+      });
+    };
+    var normalizePercentageWidth = function (cellWidth, tableSize) {
+      return cellWidth / tableSize.pixelWidth() * 100;
+    };
+    var choosePercentageSize = function (element, width, tableSize) {
+      var percentMatch = rPercentageBasedSizeRegex.exec(width);
+      if (percentMatch !== null) {
+        return parseFloat(percentMatch[1]);
+      } else {
+        var intWidth = get$5(element);
+        return normalizePercentageWidth(intWidth, tableSize);
+      }
+    };
+    var getPercentageWidth = function (cell, tableSize) {
+      var width = getRawWidth(cell);
+      return width.fold(function () {
+        var intWidth = get$5(cell);
+        return normalizePercentageWidth(intWidth, tableSize);
+      }, function (w) {
+        return choosePercentageSize(cell, w, tableSize);
+      });
+    };
+    var normalizePixelWidth = function (cellWidth, tableSize) {
+      return cellWidth / 100 * tableSize.pixelWidth();
+    };
+    var choosePixelSize = function (element, width, tableSize) {
+      var pixelMatch = rPixelBasedSizeRegex.exec(width);
+      if (pixelMatch !== null) {
+        return parseInt(pixelMatch[1], 10);
+      }
+      var percentMatch = rPercentageBasedSizeRegex.exec(width);
+      if (percentMatch !== null) {
+        var floatWidth = parseFloat(percentMatch[1]);
+        return normalizePixelWidth(floatWidth, tableSize);
+      }
+      return get$5(element);
+    };
+    var getPixelWidth = function (cell, tableSize) {
+      var width = getRawWidth(cell);
+      return width.fold(function () {
+        return get$5(cell);
+      }, function (w) {
+        return choosePixelSize(cell, w, tableSize);
+      });
+    };
+    var getHeight$1 = function (cell) {
+      return get$6(cell, 'rowspan', getTotalHeight);
+    };
+    var getGenericWidth = function (cell) {
+      var width = getRawWidth(cell);
+      return width.bind(function (w) {
+        var match = rGenericSizeRegex.exec(w);
+        if (match !== null) {
+          return Option.some({
+            width: constant(parseFloat(match[1])),
+            unit: constant(match[3])
+          });
+        } else {
+          return Option.none();
+        }
+      });
+    };
+    var setGenericWidth = function (cell, amount, unit) {
+      set$1(cell, 'width', amount + unit);
+    };
+    var percentageBasedSizeRegex = constant(rPercentageBasedSizeRegex);
+    var pixelBasedSizeRegex = constant(rPixelBasedSizeRegex);
+
+    var halve = function (main, other) {
+      var width = getGenericWidth(main);
+      width.each(function (w) {
+        var newWidth = w.width() / 2;
+        setGenericWidth(main, newWidth, w.unit());
+        setGenericWidth(other, newWidth, w.unit());
+      });
+    };
+
+    var r = function (left, top) {
+      var translate = function (x, y) {
+        return r(left + x, top + y);
+      };
+      return {
+        left: constant(left),
+        top: constant(top),
+        translate: translate
+      };
+    };
+    var Position = r;
+
+    var boxPosition = function (dom) {
+      var box = dom.getBoundingClientRect();
+      return Position(box.left, box.top);
+    };
+    var firstDefinedOrZero = function (a, b) {
+      if (a !== undefined) {
+        return a;
+      } else {
+        return b !== undefined ? b : 0;
+      }
+    };
+    var absolute = function (element) {
+      var doc = element.dom().ownerDocument;
+      var body = doc.body;
+      var win = doc.defaultView;
+      var html = doc.documentElement;
+      if (body === element.dom()) {
+        return Position(body.offsetLeft, body.offsetTop);
+      }
+      var scrollTop = firstDefinedOrZero(win.pageYOffset, html.scrollTop);
+      var scrollLeft = firstDefinedOrZero(win.pageXOffset, html.scrollLeft);
+      var clientTop = firstDefinedOrZero(html.clientTop, body.clientTop);
+      var clientLeft = firstDefinedOrZero(html.clientLeft, body.clientLeft);
+      return viewport(element).translate(scrollLeft - clientLeft, scrollTop - clientTop);
+    };
+    var viewport = function (element) {
+      var dom = element.dom();
+      var doc = dom.ownerDocument;
+      var body = doc.body;
+      if (body === dom) {
+        return Position(body.offsetLeft, body.offsetTop);
+      }
+      if (!inBody(element)) {
+        return Position(0, 0);
+      }
+      return boxPosition(dom);
+    };
+
+    var rowInfo = function (row, y) {
+      return {
+        row: row,
+        y: y
+      };
+    };
+    var colInfo = function (col, x) {
+      return {
+        col: col,
+        x: x
+      };
+    };
+    var rtlEdge = function (cell) {
+      var pos = absolute(cell);
+      return pos.left() + getOuter$1(cell);
+    };
+    var ltrEdge = function (cell) {
+      return absolute(cell).left();
+    };
+    var getLeftEdge = function (index, cell) {
+      return colInfo(index, ltrEdge(cell));
+    };
+    var getRightEdge = function (index, cell) {
+      return colInfo(index, rtlEdge(cell));
+    };
+    var getTop = function (cell) {
+      return absolute(cell).top();
+    };
+    var getTopEdge = function (index, cell) {
+      return rowInfo(index, getTop(cell));
+    };
+    var getBottomEdge = function (index, cell) {
+      return rowInfo(index, getTop(cell) + getOuter(cell));
+    };
+    var findPositions = function (getInnerEdge, getOuterEdge, array) {
+      if (array.length === 0) {
+        return [];
+      }
+      var lines = map(array.slice(1), function (cellOption, index) {
+        return cellOption.map(function (cell) {
+          return getInnerEdge(index, cell);
+        });
+      });
+      var lastLine = array[array.length - 1].map(function (cell) {
+        return getOuterEdge(array.length - 1, cell);
+      });
+      return lines.concat([lastLine]);
+    };
+    var negate = function (step) {
+      return -step;
+    };
+    var height = {
+      delta: identity,
+      positions: function (optElements) {
+        return findPositions(getTopEdge, getBottomEdge, optElements);
+      },
+      edge: getTop
+    };
+    var ltr = {
+      delta: identity,
+      edge: ltrEdge,
+      positions: function (optElements) {
+        return findPositions(getLeftEdge, getRightEdge, optElements);
+      }
+    };
+    var rtl = {
+      delta: negate,
+      edge: rtlEdge,
+      positions: function (optElements) {
+        return findPositions(getRightEdge, getLeftEdge, optElements);
+      }
+    };
+
+    var ResizeDirection = {
+      ltr: ltr,
+      rtl: rtl
+    };
+
+    function TableDirection (directionAt) {
+      var auto = function (table) {
+        return directionAt(table).isRtl() ? ResizeDirection.rtl : ResizeDirection.ltr;
+      };
+      var delta = function (amount, table) {
+        return auto(table).delta(amount, table);
+      };
+      var positions = function (cols, table) {
+        return auto(table).positions(cols, table);
+      };
+      var edge = function (cell) {
+        return auto(cell).edge(cell);
+      };
+      return {
+        delta: delta,
+        edge: edge,
+        positions: positions
+      };
+    }
+
+    var getGridSize = function (table) {
+      var input = fromTable(table);
+      var warehouse = Warehouse.generate(input);
+      return warehouse.grid;
+    };
+
+    var cat = function (arr) {
+      var r = [];
+      var push = function (x) {
+        r.push(x);
+      };
+      for (var i = 0; i < arr.length; i++) {
+        arr[i].each(push);
+      }
+      return r;
+    };
+
+    var setIfNot = function (element, property, value, ignore) {
+      if (value === ignore) {
+        remove(element, property);
+      } else {
+        set(element, property, value);
+      }
+    };
+    var render = function (table, grid) {
+      var newRows = [];
+      var newCells = [];
+      var renderSection = function (gridSection, sectionName) {
+        var section = child$2(table, sectionName).getOrThunk(function () {
+          var tb = Element.fromTag(sectionName, owner(table).dom());
+          append(table, tb);
+          return tb;
+        });
+        empty(section);
+        var rows = map(gridSection, function (row) {
+          if (row.isNew()) {
+            newRows.push(row.element());
+          }
+          var tr = row.element();
+          empty(tr);
+          each(row.cells(), function (cell) {
+            if (cell.isNew()) {
+              newCells.push(cell.element());
+            }
+            setIfNot(cell.element(), 'colspan', cell.colspan(), 1);
+            setIfNot(cell.element(), 'rowspan', cell.rowspan(), 1);
+            append(tr, cell.element());
+          });
+          return tr;
+        });
+        append$1(section, rows);
+      };
+      var removeSection = function (sectionName) {
+        child$2(table, sectionName).each(remove$2);
+      };
+      var renderOrRemoveSection = function (gridSection, sectionName) {
+        if (gridSection.length > 0) {
+          renderSection(gridSection, sectionName);
+        } else {
+          removeSection(sectionName);
+        }
+      };
+      var headSection = [];
+      var bodySection = [];
+      var footSection = [];
+      each(grid, function (row) {
+        switch (row.section()) {
+        case 'thead':
+          headSection.push(row);
+          break;
+        case 'tbody':
+          bodySection.push(row);
+          break;
+        case 'tfoot':
+          footSection.push(row);
+          break;
+        }
+      });
+      renderOrRemoveSection(headSection, 'thead');
+      renderOrRemoveSection(bodySection, 'tbody');
+      renderOrRemoveSection(footSection, 'tfoot');
+      return {
+        newRows: newRows,
+        newCells: newCells
+      };
+    };
+    var copy$2 = function (grid) {
+      return map(grid, function (row) {
+        var tr = shallow(row.element());
+        each(row.cells(), function (cell) {
+          var clonedCell = deep(cell.element());
+          setIfNot(clonedCell, 'colspan', cell.colspan(), 1);
+          setIfNot(clonedCell, 'rowspan', cell.rowspan(), 1);
+          append(tr, clonedCell);
+        });
+        return tr;
+      });
+    };
+
+    var read = function (element, attr) {
+      var value = get$1(element, attr);
+      return value === undefined || value === '' ? [] : value.split(' ');
+    };
+    var add = function (element, attr, id) {
+      var old = read(element, attr);
+      var nu = old.concat([id]);
+      set(element, attr, nu.join(' '));
+      return true;
+    };
+    var remove$3 = function (element, attr, id) {
+      var nu = filter(read(element, attr), function (v) {
+        return v !== id;
+      });
+      if (nu.length > 0) {
+        set(element, attr, nu.join(' '));
+      } else {
+        remove(element, attr);
+      }
+      return false;
+    };
+
+    var supports = function (element) {
+      return element.dom().classList !== undefined;
+    };
+    var get$7 = function (element) {
+      return read(element, 'class');
+    };
+    var add$1 = function (element, clazz) {
+      return add(element, 'class', clazz);
+    };
+    var remove$4 = function (element, clazz) {
+      return remove$3(element, 'class', clazz);
+    };
+
+    var add$2 = function (element, clazz) {
+      if (supports(element)) {
+        element.dom().classList.add(clazz);
+      } else {
+        add$1(element, clazz);
+      }
+    };
+    var cleanClass = function (element) {
+      var classList = supports(element) ? element.dom().classList : get$7(element);
+      if (classList.length === 0) {
+        remove(element, 'class');
+      }
+    };
+    var remove$5 = function (element, clazz) {
+      if (supports(element)) {
+        var classList = element.dom().classList;
+        classList.remove(clazz);
+      } else {
+        remove$4(element, clazz);
+      }
+      cleanClass(element);
+    };
+    var has$2 = function (element, clazz) {
+      return supports(element) && element.dom().classList.contains(clazz);
+    };
+
+    var repeat = function (repititions, f) {
+      var r = [];
+      for (var i = 0; i < repititions; i++) {
+        r.push(f(i));
+      }
+      return r;
+    };
+    var range = function (start, end) {
+      var r = [];
+      for (var i = start; i < end; i++) {
+        r.push(i);
+      }
+      return r;
+    };
+    var deduce = function (xs, index) {
+      if (index < 0 || index >= xs.length - 1) {
+        return Option.none();
+      }
+      var current = xs[index].fold(function () {
+        var rest = reverse(xs.slice(0, index));
+        return findMap(rest, function (a, i) {
+          return a.map(function (aa) {
+            return {
+              value: aa,
+              delta: i + 1
+            };
+          });
+        });
+      }, function (c) {
+        return Option.some({
+          value: c,
+          delta: 0
+        });
+      });
+      var next = xs[index + 1].fold(function () {
+        var rest = xs.slice(index + 1);
+        return findMap(rest, function (a, i) {
+          return a.map(function (aa) {
+            return {
+              value: aa,
+              delta: i + 1
+            };
+          });
+        });
+      }, function (n) {
+        return Option.some({
+          value: n,
+          delta: 1
+        });
+      });
+      return current.bind(function (c) {
+        return next.map(function (n) {
+          var extras = n.delta + c.delta;
+          return Math.abs(n.value - c.value) / extras;
+        });
+      });
+    };
+
+    var columns = function (warehouse) {
+      var grid = warehouse.grid;
+      var cols = range(0, grid.columns());
+      var rowsArr = range(0, grid.rows());
+      return map(cols, function (col) {
+        var getBlock = function () {
+          return bind(rowsArr, function (r) {
+            return Warehouse.getAt(warehouse, r, col).filter(function (detail) {
+              return detail.column() === col;
+            }).fold(constant([]), function (detail) {
+              return [detail];
+            });
+          });
+        };
+        var isSingle = function (detail) {
+          return detail.colspan() === 1;
+        };
+        var getFallback = function () {
+          return Warehouse.getAt(warehouse, 0, col);
+        };
+        return decide(getBlock, isSingle, getFallback);
+      });
+    };
+    var decide = function (getBlock, isSingle, getFallback) {
+      var inBlock = getBlock();
+      var singleInBlock = find(inBlock, isSingle);
+      var detailOption = singleInBlock.orThunk(function () {
+        return Option.from(inBlock[0]).orThunk(getFallback);
+      });
+      return detailOption.map(function (detail) {
+        return detail.element();
+      });
+    };
+    var rows$1 = function (warehouse) {
+      var grid = warehouse.grid;
+      var rowsArr = range(0, grid.rows());
+      var cols = range(0, grid.columns());
+      return map(rowsArr, function (row) {
+        var getBlock = function () {
+          return bind(cols, function (c) {
+            return Warehouse.getAt(warehouse, row, c).filter(function (detail) {
+              return detail.row() === row;
+            }).fold(constant([]), function (detail) {
+              return [detail];
+            });
+          });
+        };
+        var isSingle = function (detail) {
+          return detail.rowspan() === 1;
+        };
+        var getFallback = function () {
+          return Warehouse.getAt(warehouse, row, 0);
+        };
+        return decide(getBlock, isSingle, getFallback);
+      });
+    };
+
+    var css = function (namespace) {
+      var dashNamespace = namespace.replace(/\./g, '-');
+      var resolve = function (str) {
+        return dashNamespace + '-' + str;
+      };
+      return { resolve: resolve };
+    };
+
+    var styles = css('ephox-snooker');
+    var resolve = styles.resolve;
+
+    var col = function (column, x, y, w, h) {
+      var bar = Element.fromTag('div');
+      setAll$1(bar, {
+        position: 'absolute',
+        left: x - w / 2 + 'px',
+        top: y + 'px',
+        height: h + 'px',
+        width: w + 'px'
+      });
+      setAll(bar, {
+        'data-column': column,
+        'role': 'presentation'
+      });
+      return bar;
+    };
+    var row = function (r, x, y, w, h) {
+      var bar = Element.fromTag('div');
+      setAll$1(bar, {
+        position: 'absolute',
+        left: x + 'px',
+        top: y - h / 2 + 'px',
+        height: h + 'px',
+        width: w + 'px'
+      });
+      setAll(bar, {
+        'data-row': r,
+        'role': 'presentation'
+      });
+      return bar;
+    };
+
+    var resizeBar = resolve('resizer-bar');
+    var resizeRowBar = resolve('resizer-rows');
+    var resizeColBar = resolve('resizer-cols');
+    var BAR_THICKNESS = 7;
+    var destroy = function (wire) {
+      var previous = descendants$1(wire.parent(), '.' + resizeBar);
+      each(previous, remove$2);
+    };
+    var drawBar = function (wire, positions, create) {
+      var origin = wire.origin();
+      each(positions, function (cpOption) {
+        cpOption.each(function (cp) {
+          var bar = create(origin, cp);
+          add$2(bar, resizeBar);
+          append(wire.parent(), bar);
+        });
+      });
+    };
+    var refreshCol = function (wire, colPositions, position, tableHeight) {
+      drawBar(wire, colPositions, function (origin, cp) {
+        var colBar = col(cp.col, cp.x - origin.left(), position.top() - origin.top(), BAR_THICKNESS, tableHeight);
+        add$2(colBar, resizeColBar);
+        return colBar;
+      });
+    };
+    var refreshRow = function (wire, rowPositions, position, tableWidth) {
+      drawBar(wire, rowPositions, function (origin, cp) {
+        var rowBar = row(cp.row, position.left() - origin.left(), cp.y - origin.top(), tableWidth, BAR_THICKNESS);
+        add$2(rowBar, resizeRowBar);
+        return rowBar;
+      });
+    };
+    var refreshGrid = function (wire, table, rows, cols, hdirection, vdirection) {
+      var position = absolute(table);
+      var rowPositions = rows.length > 0 ? hdirection.positions(rows, table) : [];
+      refreshRow(wire, rowPositions, position, getOuter$1(table));
+      var colPositions = cols.length > 0 ? vdirection.positions(cols, table) : [];
+      refreshCol(wire, colPositions, position, getOuter(table));
+    };
+    var refresh = function (wire, table, hdirection, vdirection) {
+      destroy(wire);
+      var list = fromTable(table);
+      var warehouse = Warehouse.generate(list);
+      var rows = rows$1(warehouse);
+      var cols = columns(warehouse);
+      refreshGrid(wire, table, rows, cols, hdirection, vdirection);
+    };
+    var each$2 = function (wire, f) {
+      var bars = descendants$1(wire.parent(), '.' + resizeBar);
+      each(bars, f);
+    };
+    var hide = function (wire) {
+      each$2(wire, function (bar) {
+        set$1(bar, 'display', 'none');
+      });
+    };
+    var show = function (wire) {
+      each$2(wire, function (bar) {
+        set$1(bar, 'display', 'block');
+      });
+    };
+    var isRowBar = function (element) {
+      return has$2(element, resizeRowBar);
+    };
+    var isColBar = function (element) {
+      return has$2(element, resizeColBar);
+    };
+
+    var addCell = function (gridRow, index, cell) {
+      var cells = gridRow.cells();
+      var before = cells.slice(0, index);
+      var after = cells.slice(index);
+      var newCells = before.concat([cell]).concat(after);
+      return setCells(gridRow, newCells);
+    };
+    var mutateCell = function (gridRow, index, cell) {
+      var cells = gridRow.cells();
+      cells[index] = cell;
+    };
+    var setCells = function (gridRow, cells) {
+      return rowcells(cells, gridRow.section());
+    };
+    var mapCells = function (gridRow, f) {
+      var cells = gridRow.cells();
+      var r = map(cells, f);
+      return rowcells(r, gridRow.section());
+    };
+    var getCell = function (gridRow, index) {
+      return gridRow.cells()[index];
+    };
+    var getCellElement = function (gridRow, index) {
+      return getCell(gridRow, index).element();
+    };
+    var cellLength = function (gridRow) {
+      return gridRow.cells().length;
+    };
+
+    var getColumn = function (grid, index) {
+      return map(grid, function (row) {
+        return getCell(row, index);
+      });
+    };
+    var getRow = function (grid, index) {
+      return grid[index];
+    };
+    var findDiff = function (xs, comp) {
+      if (xs.length === 0) {
+        return 0;
+      }
+      var first = xs[0];
+      var index = findIndex(xs, function (x) {
+        return !comp(first.element(), x.element());
+      });
+      return index.fold(function () {
+        return xs.length;
+      }, function (ind) {
+        return ind;
+      });
+    };
+    var subgrid = function (grid, row, column, comparator) {
+      var restOfRow = getRow(grid, row).cells().slice(column);
+      var endColIndex = findDiff(restOfRow, comparator);
+      var restOfColumn = getColumn(grid, column).slice(row);
+      var endRowIndex = findDiff(restOfColumn, comparator);
+      return {
+        colspan: endColIndex,
+        rowspan: endRowIndex
+      };
+    };
+
+    var toDetails = function (grid, comparator) {
+      var seen = map(grid, function (row) {
+        return map(row.cells(), function () {
+          return false;
+        });
+      });
+      var updateSeen = function (ri, ci, rowspan, colspan) {
+        for (var r = ri; r < ri + rowspan; r++) {
+          for (var c = ci; c < ci + colspan; c++) {
+            seen[r][c] = true;
+          }
+        }
+      };
+      return map(grid, function (row, ri) {
+        var details = bind(row.cells(), function (cell, ci) {
+          if (seen[ri][ci] === false) {
+            var result = subgrid(grid, ri, ci, comparator);
+            updateSeen(ri, ci, result.rowspan, result.colspan);
+            return [detailnew(cell.element(), result.rowspan, result.colspan, cell.isNew())];
+          } else {
+            return [];
+          }
+        });
+        return rowdetails(details, row.section());
+      });
+    };
+    var toGrid = function (warehouse, generators, isNew) {
+      var grid = [];
+      for (var i = 0; i < warehouse.grid.rows(); i++) {
+        var rowCells = [];
+        for (var j = 0; j < warehouse.grid.columns(); j++) {
+          var element = Warehouse.getAt(warehouse, i, j).map(function (item) {
+            return elementnew(item.element(), isNew);
+          }).getOrThunk(function () {
+            return elementnew(generators.gap(), true);
+          });
+          rowCells.push(element);
+        }
+        var row = rowcells(rowCells, warehouse.all[i].section());
+        grid.push(row);
+      }
+      return grid;
+    };
+
+    var fromWarehouse = function (warehouse, generators) {
+      return toGrid(warehouse, generators, false);
+    };
+    var deriveRows = function (rendered, generators) {
+      var findRow = function (details) {
+        var rowOfCells = findMap(details, function (detail) {
+          return parent(detail.element()).map(function (row) {
+            var isNew = parent(row).isNone();
+            return elementnew(row, isNew);
+          });
+        });
+        return rowOfCells.getOrThunk(function () {
+          return elementnew(generators.row(), true);
+        });
+      };
+      return map(rendered, function (details) {
+        var row = findRow(details.details());
+        return rowdatanew(row.element(), details.details(), details.section(), row.isNew());
+      });
+    };
+    var toDetailList = function (grid, generators) {
+      var rendered = toDetails(grid, eq);
+      return deriveRows(rendered, generators);
+    };
+    var findInWarehouse = function (warehouse, element) {
+      return findMap(warehouse.all, function (r) {
+        return find(r.cells(), function (e) {
+          return eq(element, e.element());
+        });
+      });
+    };
+    var run = function (operation, extract, adjustment, postAction, genWrappers) {
+      return function (wire, table, target, generators, direction) {
+        var input = fromTable(table);
+        var warehouse = Warehouse.generate(input);
+        var output = extract(warehouse, target).map(function (info) {
+          var model = fromWarehouse(warehouse, generators);
+          var result = operation(model, info, eq, genWrappers(generators));
+          var grid = toDetailList(result.grid(), generators);
+          return {
+            grid: constant(grid),
+            cursor: result.cursor
+          };
+        });
+        return output.fold(function () {
+          return Option.none();
+        }, function (out) {
+          var newElements = render(table, out.grid());
+          adjustment(table, out.grid(), direction);
+          postAction(table);
+          refresh(wire, table, height, direction);
+          return Option.some({
+            cursor: out.cursor,
+            newRows: constant(newElements.newRows),
+            newCells: constant(newElements.newCells)
+          });
+        });
+      };
+    };
+    var onCell = function (warehouse, target) {
+      return cell(target.element()).bind(function (cell) {
+        return findInWarehouse(warehouse, cell);
+      });
+    };
+    var onPaste = function (warehouse, target) {
+      return cell(target.element()).bind(function (cell) {
+        return findInWarehouse(warehouse, cell).map(function (details) {
+          var value = __assign(__assign({}, details), {
+            generators: target.generators,
+            clipboard: target.clipboard
+          });
+          return value;
+        });
+      });
+    };
+    var onPasteRows = function (warehouse, target) {
+      var details = map(target.selection(), function (cell$1) {
+        return cell(cell$1).bind(function (lc) {
+          return findInWarehouse(warehouse, lc);
+        });
+      });
+      var cells = cat(details);
+      return cells.length > 0 ? Option.some({
+        cells: cells,
+        generators: target.generators,
+        clipboard: target.clipboard
+      }) : Option.none();
+    };
+    var onMergable = function (_warehouse, target) {
+      return target.mergable();
+    };
+    var onUnmergable = function (_warehouse, target) {
+      return target.unmergable();
+    };
+    var onCells = function (warehouse, target) {
+      var details = map(target.selection(), function (cell$1) {
+        return cell(cell$1).bind(function (lc) {
+          return findInWarehouse(warehouse, lc);
+        });
+      });
+      var cells = cat(details);
+      return cells.length > 0 ? Option.some(cells) : Option.none();
+    };
+
+    var value = function (o) {
+      var is = function (v) {
+        return o === v;
+      };
+      var or = function (_opt) {
+        return value(o);
+      };
+      var orThunk = function (_f) {
+        return value(o);
+      };
+      var map = function (f) {
+        return value(f(o));
+      };
+      var mapError = function (_f) {
+        return value(o);
+      };
+      var each = function (f) {
+        f(o);
+      };
+      var bind = function (f) {
+        return f(o);
+      };
+      var fold = function (_, onValue) {
+        return onValue(o);
+      };
+      var exists = function (f) {
+        return f(o);
+      };
+      var forall = function (f) {
+        return f(o);
+      };
+      var toOption = function () {
+        return Option.some(o);
+      };
+      return {
+        is: is,
+        isValue: always,
+        isError: never,
+        getOr: constant(o),
+        getOrThunk: constant(o),
+        getOrDie: constant(o),
+        or: or,
+        orThunk: orThunk,
+        fold: fold,
+        map: map,
+        mapError: mapError,
+        each: each,
+        bind: bind,
+        exists: exists,
+        forall: forall,
+        toOption: toOption
+      };
+    };
+    var error = function (message) {
+      var getOrThunk = function (f) {
+        return f();
+      };
+      var getOrDie = function () {
+        return die(String(message))();
+      };
+      var or = function (opt) {
+        return opt;
+      };
+      var orThunk = function (f) {
+        return f();
+      };
+      var map = function (_f) {
+        return error(message);
+      };
+      var mapError = function (f) {
+        return error(f(message));
+      };
+      var bind = function (_f) {
+        return error(message);
+      };
+      var fold = function (onError, _) {
+        return onError(message);
+      };
+      return {
+        is: never,
+        isValue: never,
+        isError: always,
+        getOr: identity,
+        getOrThunk: getOrThunk,
+        getOrDie: getOrDie,
+        or: or,
+        orThunk: orThunk,
+        fold: fold,
+        map: map,
+        mapError: mapError,
+        each: noop,
+        bind: bind,
+        exists: never,
+        forall: always,
+        toOption: Option.none
+      };
+    };
+    var fromOption = function (opt, err) {
+      return opt.fold(function () {
+        return error(err);
+      }, value);
+    };
+    var Result = {
+      value: value,
+      error: error,
+      fromOption: fromOption
+    };
+
+    var measure = function (startAddress, gridA, gridB) {
+      if (startAddress.row() >= gridA.length || startAddress.column() > cellLength(gridA[0])) {
+        return Result.error('invalid start address out of table bounds, row: ' + startAddress.row() + ', column: ' + startAddress.column());
+      }
+      var rowRemainder = gridA.slice(startAddress.row());
+      var colRemainder = rowRemainder[0].cells().slice(startAddress.column());
+      var colRequired = cellLength(gridB[0]);
+      var rowRequired = gridB.length;
+      return Result.value({
+        rowDelta: rowRemainder.length - rowRequired,
+        colDelta: colRemainder.length - colRequired
+      });
+    };
+    var measureWidth = function (gridA, gridB) {
+      var colLengthA = cellLength(gridA[0]);
+      var colLengthB = cellLength(gridB[0]);
+      return {
+        rowDelta: 0,
+        colDelta: colLengthA - colLengthB
+      };
+    };
+    var fill = function (cells, generator) {
+      return map(cells, function () {
+        return elementnew(generator.cell(), true);
+      });
+    };
+    var rowFill = function (grid, amount, generator) {
+      return grid.concat(repeat(amount, function (_row) {
+        return setCells(grid[grid.length - 1], fill(grid[grid.length - 1].cells(), generator));
+      }));
+    };
+    var colFill = function (grid, amount, generator) {
+      return map(grid, function (row) {
+        return setCells(row, row.cells().concat(fill(range(0, amount), generator)));
+      });
+    };
+    var tailor = function (gridA, delta, generator) {
+      var fillCols = delta.colDelta < 0 ? colFill : identity;
+      var fillRows = delta.rowDelta < 0 ? rowFill : identity;
+      var modifiedCols = fillCols(gridA, Math.abs(delta.colDelta), generator);
+      return fillRows(modifiedCols, Math.abs(delta.rowDelta), generator);
+    };
+
+    var merge = function (grid, bounds, comparator, substitution) {
+      if (grid.length === 0) {
+        return grid;
+      }
+      for (var i = bounds.startRow(); i <= bounds.finishRow(); i++) {
+        for (var j = bounds.startCol(); j <= bounds.finishCol(); j++) {
+          mutateCell(grid[i], j, elementnew(substitution(), false));
+        }
+      }
+      return grid;
+    };
+    var unmerge = function (grid, target, comparator, substitution) {
+      var first = true;
+      for (var i = 0; i < grid.length; i++) {
+        for (var j = 0; j < cellLength(grid[0]); j++) {
+          var current = getCellElement(grid[i], j);
+          var isToReplace = comparator(current, target);
+          if (isToReplace === true && first === false) {
+            mutateCell(grid[i], j, elementnew(substitution(), true));
+          } else if (isToReplace === true) {
+            first = false;
+          }
+        }
+      }
+      return grid;
+    };
+    var uniqueCells = function (row, comparator) {
+      return foldl(row, function (rest, cell) {
+        return exists(rest, function (currentCell) {
+          return comparator(currentCell.element(), cell.element());
+        }) ? rest : rest.concat([cell]);
+      }, []);
+    };
+    var splitRows = function (grid, index, comparator, substitution) {
+      if (index > 0 && index < grid.length) {
+        var rowPrevCells = grid[index - 1].cells();
+        var cells = uniqueCells(rowPrevCells, comparator);
+        each(cells, function (cell) {
+          var replacement = Option.none();
+          var _loop_1 = function (i) {
+            var _loop_2 = function (j) {
+              var current = grid[i].cells()[j];
+              var isToReplace = comparator(current.element(), cell.element());
+              if (isToReplace) {
+                if (replacement.isNone()) {
+                  replacement = Option.some(substitution());
+                }
+                replacement.each(function (sub) {
+                  mutateCell(grid[i], j, elementnew(sub, true));
+                });
+              }
+            };
+            for (var j = 0; j < cellLength(grid[0]); j++) {
+              _loop_2(j);
+            }
+          };
+          for (var i = index; i < grid.length; i++) {
+            _loop_1(i);
+          }
+        });
+      }
+      return grid;
+    };
+
+    var isSpanning = function (grid, row, col, comparator) {
+      var candidate = getCell(grid[row], col);
+      var matching = curry(comparator, candidate.element());
+      var currentRow = grid[row];
+      return grid.length > 1 && cellLength(currentRow) > 1 && (col > 0 && matching(getCellElement(currentRow, col - 1)) || col < currentRow.cells().length - 1 && matching(getCellElement(currentRow, col + 1)) || row > 0 && matching(getCellElement(grid[row - 1], col)) || row < grid.length - 1 && matching(getCellElement(grid[row + 1], col)));
+    };
+    var mergeTables = function (startAddress, gridA, gridB, generator, comparator) {
+      var startRow = startAddress.row();
+      var startCol = startAddress.column();
+      var mergeHeight = gridB.length;
+      var mergeWidth = cellLength(gridB[0]);
+      var endRow = startRow + mergeHeight;
+      var endCol = startCol + mergeWidth;
+      for (var r = startRow; r < endRow; r++) {
+        for (var c = startCol; c < endCol; c++) {
+          if (isSpanning(gridA, r, c, comparator)) {
+            unmerge(gridA, getCellElement(gridA[r], c), comparator, generator.cell);
+          }
+          var newCell = getCellElement(gridB[r - startRow], c - startCol);
+          var replacement = generator.replace(newCell);
+          mutateCell(gridA[r], c, elementnew(replacement, true));
+        }
+      }
+      return gridA;
+    };
+    var merge$1 = function (startAddress, gridA, gridB, generator, comparator) {
+      var result = measure(startAddress, gridA, gridB);
+      return result.map(function (delta) {
+        var fittedGrid = tailor(gridA, delta, generator);
+        return mergeTables(startAddress, fittedGrid, gridB, generator, comparator);
+      });
+    };
+    var insert = function (index, gridA, gridB, generator, comparator) {
+      splitRows(gridA, index, comparator, generator.cell);
+      var delta = measureWidth(gridB, gridA);
+      var fittedNewGrid = tailor(gridB, delta, generator);
+      var secondDelta = measureWidth(gridA, fittedNewGrid);
+      var fittedOldGrid = tailor(gridA, secondDelta, generator);
+      return fittedOldGrid.slice(0, index).concat(fittedNewGrid).concat(fittedOldGrid.slice(index, fittedOldGrid.length));
+    };
+
+    var insertRowAt = function (grid, index, example, comparator, substitution) {
+      var before = grid.slice(0, index);
+      var after = grid.slice(index);
+      var between = mapCells(grid[example], function (ex, c) {
+        var withinSpan = index > 0 && index < grid.length && comparator(getCellElement(grid[index - 1], c), getCellElement(grid[index], c));
+        var ret = withinSpan ? getCell(grid[index], c) : elementnew(substitution(ex.element(), comparator), true);
+        return ret;
+      });
+      return before.concat([between]).concat(after);
+    };
+    var insertColumnAt = function (grid, index, example, comparator, substitution) {
+      return map(grid, function (row) {
+        var withinSpan = index > 0 && index < cellLength(row) && comparator(getCellElement(row, index - 1), getCellElement(row, index));
+        var sub = withinSpan ? getCell(row, index) : elementnew(substitution(getCellElement(row, example), comparator), true);
+        return addCell(row, index, sub);
+      });
+    };
+    var deleteColumnsAt = function (grid, start, finish) {
+      var rows = map(grid, function (row) {
+        var cells = row.cells().slice(0, start).concat(row.cells().slice(finish + 1));
+        return rowcells(cells, row.section());
+      });
+      return filter(rows, function (row) {
+        return row.cells().length > 0;
+      });
+    };
+    var deleteRowsAt = function (grid, start, finish) {
+      return grid.slice(0, start).concat(grid.slice(finish + 1));
+    };
+
+    var replaceIn = function (grid, targets, comparator, substitution) {
+      var isTarget = function (cell) {
+        return exists(targets, function (target) {
+          return comparator(cell.element(), target.element());
+        });
+      };
+      return map(grid, function (row) {
+        return mapCells(row, function (cell) {
+          return isTarget(cell) ? elementnew(substitution(cell.element(), comparator), true) : cell;
+        });
+      });
+    };
+    var notStartRow = function (grid, rowIndex, colIndex, comparator) {
+      return getCellElement(grid[rowIndex], colIndex) !== undefined && (rowIndex > 0 && comparator(getCellElement(grid[rowIndex - 1], colIndex), getCellElement(grid[rowIndex], colIndex)));
+    };
+    var notStartColumn = function (row, index, comparator) {
+      return index > 0 && comparator(getCellElement(row, index - 1), getCellElement(row, index));
+    };
+    var replaceColumn = function (grid, index, comparator, substitution) {
+      var targets = bind(grid, function (row, i) {
+        var alreadyAdded = notStartRow(grid, i, index, comparator) || notStartColumn(row, index, comparator);
+        return alreadyAdded ? [] : [getCell(row, index)];
+      });
+      return replaceIn(grid, targets, comparator, substitution);
+    };
+    var replaceRow = function (grid, index, comparator, substitution) {
+      var targetRow = grid[index];
+      var targets = bind(targetRow.cells(), function (item, i) {
+        var alreadyAdded = notStartRow(grid, index, i, comparator) || notStartColumn(targetRow, i, comparator);
+        return alreadyAdded ? [] : [item];
+      });
+      return replaceIn(grid, targets, comparator, substitution);
+    };
+
+    var adt = Adt.generate([
+      { none: [] },
+      { only: ['index'] },
+      {
+        left: [
+          'index',
+          'next'
+        ]
+      },
+      {
+        middle: [
+          'prev',
+          'index',
+          'next'
+        ]
+      },
+      {
+        right: [
+          'prev',
+          'index'
+        ]
+      }
+    ]);
+    var ColumnContext = __assign({}, adt);
+
+    var neighbours$1 = function (input, index) {
+      if (input.length === 0) {
+        return ColumnContext.none();
+      }
+      if (input.length === 1) {
+        return ColumnContext.only(0);
+      }
+      if (index === 0) {
+        return ColumnContext.left(0, 1);
+      }
+      if (index === input.length - 1) {
+        return ColumnContext.right(index - 1, index);
+      }
+      if (index > 0 && index < input.length - 1) {
+        return ColumnContext.middle(index - 1, index, index + 1);
+      }
+      return ColumnContext.none();
+    };
+    var determine = function (input, column, step, tableSize) {
+      var result = input.slice(0);
+      var context = neighbours$1(input, column);
+      var zero = function (array) {
+        return map(array, constant(0));
+      };
+      var onNone = constant(zero(result));
+      var onOnly = function (index) {
+        return tableSize.singleColumnWidth(result[index], step);
+      };
+      var onChange = function (index, next) {
+        if (step >= 0) {
+          var newNext = Math.max(tableSize.minCellWidth(), result[next] - step);
+          return zero(result.slice(0, index)).concat([
+            step,
+            newNext - result[next]
+          ]).concat(zero(result.slice(next + 1)));
+        } else {
+          var newThis = Math.max(tableSize.minCellWidth(), result[index] + step);
+          var diffx = result[index] - newThis;
+          return zero(result.slice(0, index)).concat([
+            newThis - result[index],
+            diffx
+          ]).concat(zero(result.slice(next + 1)));
+        }
+      };
+      var onLeft = onChange;
+      var onMiddle = function (_prev, index, next) {
+        return onChange(index, next);
+      };
+      var onRight = function (_prev, index) {
+        if (step >= 0) {
+          return zero(result.slice(0, index)).concat([step]);
+        } else {
+          var size = Math.max(tableSize.minCellWidth(), result[index] + step);
+          return zero(result.slice(0, index)).concat([size - result[index]]);
+        }
+      };
+      return context.fold(onNone, onOnly, onLeft, onMiddle, onRight);
+    };
+
+    var getWidthFrom = function (warehouse, direction, getWidth, fallback, tableSize) {
+      var columns$1 = columns(warehouse);
+      var backups = map(columns$1, function (cellOption) {
+        return cellOption.map(direction.edge);
+      });
+      return map(columns$1, function (cellOption, c) {
+        var columnCell = cellOption.filter(not(hasColspan));
+        return columnCell.fold(function () {
+          var deduced = deduce(backups, c);
+          return fallback(deduced);
+        }, function (cell) {
+          return getWidth(cell, tableSize);
+        });
+      });
+    };
+    var getPercentageWidths = function (warehouse, direction, tableSize) {
+      return getWidthFrom(warehouse, direction, getPercentageWidth, function (deduced) {
+        return deduced.fold(function () {
+          return tableSize.minCellWidth();
+        }, function (cellWidth) {
+          return cellWidth / tableSize.pixelWidth() * 100;
+        });
+      }, tableSize);
+    };
+    var getPixelWidths = function (warehouse, direction, tableSize) {
+      return getWidthFrom(warehouse, direction, getPixelWidth, function (deduced) {
+        return deduced.getOrThunk(tableSize.minCellWidth);
+      }, tableSize);
+    };
+    var getHeightFrom = function (warehouse, direction, getHeight, fallback) {
+      var rows = rows$1(warehouse);
+      var backups = map(rows, function (cellOption) {
+        return cellOption.map(direction.edge);
+      });
+      return map(rows, function (cellOption, c) {
+        var rowCell = cellOption.filter(not(hasRowspan));
+        return rowCell.fold(function () {
+          var deduced = deduce(backups, c);
+          return fallback(deduced);
+        }, function (cell) {
+          return getHeight(cell);
+        });
+      });
+    };
+    var getPixelHeights = function (warehouse, direction) {
+      return getHeightFrom(warehouse, direction, getHeight$1, function (deduced) {
+        return deduced.getOrThunk(minHeight);
+      });
+    };
+
+    var total = function (start, end, measures) {
+      var r = 0;
+      for (var i = start; i < end; i++) {
+        r += measures[i] !== undefined ? measures[i] : 0;
+      }
+      return r;
+    };
+    var recalculateWidth = function (warehouse, widths) {
+      var all = Warehouse.justCells(warehouse);
+      return map(all, function (cell) {
+        var width = total(cell.column(), cell.column() + cell.colspan(), widths);
+        return {
+          element: cell.element(),
+          width: width,
+          colspan: cell.colspan()
+        };
+      });
+    };
+    var recalculateHeight = function (warehouse, heights) {
+      var all = Warehouse.justCells(warehouse);
+      return map(all, function (cell) {
+        var height = total(cell.row(), cell.row() + cell.rowspan(), heights);
+        return {
+          element: cell.element,
+          height: constant(height),
+          rowspan: cell.rowspan
+        };
+      });
+    };
+    var matchRowHeight = function (warehouse, heights) {
+      return map(warehouse.all, function (row, i) {
+        return {
+          element: row.element,
+          height: constant(heights[i])
+        };
+      });
+    };
+
+    var percentageSize = function (width, element) {
+      var floatWidth = parseFloat(width);
+      var pixelWidth = get$5(element);
+      var getCellDelta = function (delta) {
+        return delta / pixelWidth * 100;
+      };
+      var singleColumnWidth = function (w, _delta) {
+        return [100 - w];
+      };
+      var minCellWidth = function () {
+        return minWidth() / pixelWidth * 100;
+      };
+      var setTableWidth = function (table, _newWidths, delta) {
+        var ratio = delta / 100;
+        var change = ratio * floatWidth;
+        setPercentageWidth(table, floatWidth + change);
+      };
+      return {
+        width: constant(floatWidth),
+        pixelWidth: constant(pixelWidth),
+        getWidths: getPercentageWidths,
+        getCellDelta: getCellDelta,
+        singleColumnWidth: singleColumnWidth,
+        minCellWidth: minCellWidth,
+        setElementWidth: setPercentageWidth,
+        setTableWidth: setTableWidth
+      };
+    };
+    var pixelSize = function (width) {
+      var getCellDelta = identity;
+      var singleColumnWidth = function (w, delta) {
+        var newNext = Math.max(minWidth(), w + delta);
+        return [newNext - w];
+      };
+      var setTableWidth = function (table, newWidths, _delta) {
+        var total = foldr(newWidths, function (b, a) {
+          return b + a;
+        }, 0);
+        setPixelWidth(table, total);
+      };
+      return {
+        width: constant(width),
+        pixelWidth: constant(width),
+        getWidths: getPixelWidths,
+        getCellDelta: getCellDelta,
+        singleColumnWidth: singleColumnWidth,
+        minCellWidth: minWidth,
+        setElementWidth: setPixelWidth,
+        setTableWidth: setTableWidth
+      };
+    };
+    var chooseSize = function (element, width) {
+      var percentMatch = percentageBasedSizeRegex().exec(width);
+      if (percentMatch !== null) {
+        return percentageSize(percentMatch[1], element);
+      }
+      var pixelMatch = pixelBasedSizeRegex().exec(width);
+      if (pixelMatch !== null) {
+        var intWidth = parseInt(pixelMatch[1], 10);
+        return pixelSize(intWidth);
+      }
+      var fallbackWidth = get$5(element);
+      return pixelSize(fallbackWidth);
+    };
+    var getTableSize = function (element) {
+      var width = getRawWidth(element);
+      return width.fold(function () {
+        var fallbackWidth = get$5(element);
+        return pixelSize(fallbackWidth);
+      }, function (w) {
+        return chooseSize(element, w);
+      });
+    };
+
+    var getWarehouse$1 = function (list) {
+      return Warehouse.generate(list);
+    };
+    var sumUp = function (newSize) {
+      return foldr(newSize, function (b, a) {
+        return b + a;
+      }, 0);
+    };
+    var getTableWarehouse = function (table) {
+      var list = fromTable(table);
+      return getWarehouse$1(list);
+    };
+    var adjustWidth = function (table, delta, index, direction) {
+      var tableSize = getTableSize(table);
+      var step = tableSize.getCellDelta(delta);
+      var warehouse = getTableWarehouse(table);
+      var widths = tableSize.getWidths(warehouse, direction, tableSize);
+      var deltas = determine(widths, index, step, tableSize);
+      var newWidths = map(deltas, function (dx, i) {
+        return dx + widths[i];
+      });
+      var newSizes = recalculateWidth(warehouse, newWidths);
+      each(newSizes, function (cell) {
+        tableSize.setElementWidth(cell.element, cell.width);
+      });
+      if (index === warehouse.grid.columns() - 1) {
+        tableSize.setTableWidth(table, newWidths, step);
+      }
+    };
+    var adjustHeight = function (table, delta, index, direction) {
+      var warehouse = getTableWarehouse(table);
+      var heights = getPixelHeights(warehouse, direction);
+      var newHeights = map(heights, function (dy, i) {
+        return index === i ? Math.max(delta + dy, minHeight()) : dy;
+      });
+      var newCellSizes = recalculateHeight(warehouse, newHeights);
+      var newRowSizes = matchRowHeight(warehouse, newHeights);
+      each(newRowSizes, function (row) {
+        setHeight(row.element(), row.height());
+      });
+      each(newCellSizes, function (cell) {
+        setHeight(cell.element(), cell.height());
+      });
+      var total = sumUp(newHeights);
+      setHeight(table, total);
+    };
+    var adjustWidthTo = function (table, list, direction) {
+      var tableSize = getTableSize(table);
+      var warehouse = getWarehouse$1(list);
+      var widths = tableSize.getWidths(warehouse, direction, tableSize);
+      var newSizes = recalculateWidth(warehouse, widths);
+      each(newSizes, function (cell) {
+        tableSize.setElementWidth(cell.element, cell.width);
+      });
+      if (newSizes.length > 0) {
+        tableSize.setTableWidth(table, widths, tableSize.getCellDelta(0));
+      }
+    };
+
+    var sort = function (arr) {
+      return arr.slice(0).sort();
+    };
+    var reqMessage = function (required, keys) {
+      throw new Error('All required keys (' + sort(required).join(', ') + ') were not specified. Specified keys were: ' + sort(keys).join(', ') + '.');
+    };
+    var unsuppMessage = function (unsupported) {
+      throw new Error('Unsupported keys for object: ' + sort(unsupported).join(', '));
+    };
+    var validateStrArr = function (label, array) {
+      if (!isArray(array)) {
+        throw new Error('The ' + label + ' fields must be an array. Was: ' + array + '.');
+      }
+      each(array, function (a) {
+        if (!isString(a)) {
+          throw new Error('The value ' + a + ' in the ' + label + ' fields was not a string.');
+        }
+      });
+    };
+    var invalidTypeMessage = function (incorrect, type) {
+      throw new Error('All values need to be of type: ' + type + '. Keys (' + sort(incorrect).join(', ') + ') were not.');
+    };
+    var checkDupes = function (everything) {
+      var sorted = sort(everything);
+      var dupe = find(sorted, function (s, i) {
+        return i < sorted.length - 1 && s === sorted[i + 1];
+      });
+      dupe.each(function (d) {
+        throw new Error('The field: ' + d + ' occurs more than once in the combined fields: [' + sorted.join(', ') + '].');
+      });
+    };
+
+    var base = function (handleUnsupported, required) {
+      return baseWith(handleUnsupported, required, {
+        validate: isFunction,
+        label: 'function'
+      });
+    };
+    var baseWith = function (handleUnsupported, required, pred) {
+      if (required.length === 0) {
+        throw new Error('You must specify at least one required field.');
+      }
+      validateStrArr('required', required);
+      checkDupes(required);
+      return function (obj) {
+        var keys$1 = keys(obj);
+        var allReqd = forall(required, function (req) {
+          return contains(keys$1, req);
+        });
+        if (!allReqd) {
+          reqMessage(required, keys$1);
+        }
+        handleUnsupported(required, keys$1);
+        var invalidKeys = filter(required, function (key) {
+          return !pred.validate(obj[key], key);
+        });
+        if (invalidKeys.length > 0) {
+          invalidTypeMessage(invalidKeys, pred.label);
+        }
+        return obj;
+      };
+    };
+    var handleExact = function (required, keys) {
+      var unsupported = filter(keys, function (key) {
+        return !contains(required, key);
+      });
+      if (unsupported.length > 0) {
+        unsuppMessage(unsupported);
+      }
+    };
+    var exactly = function (required) {
+      return base(handleExact, required);
+    };
+
+    var verifyGenerators = exactly([
+      'cell',
+      'row',
+      'replace',
+      'gap'
+    ]);
+    var elementToData = function (element) {
+      var colspan = getAttrValue(element, 'colspan', 1);
+      var rowspan = getAttrValue(element, 'rowspan', 1);
+      return {
+        element: constant(element),
+        colspan: constant(colspan),
+        rowspan: constant(rowspan)
+      };
+    };
+    var modification = function (generators, toData) {
+      if (toData === void 0) {
+        toData = elementToData;
+      }
+      verifyGenerators(generators);
+      var position = Cell(Option.none());
+      var nu = function (data) {
+        return generators.cell(data);
+      };
+      var nuFrom = function (element) {
+        var data = toData(element);
+        return nu(data);
+      };
+      var add = function (element) {
+        var replacement = nuFrom(element);
+        if (position.get().isNone()) {
+          position.set(Option.some(replacement));
+        }
+        recent = Option.some({
+          item: element,
+          replacement: replacement
+        });
+        return replacement;
+      };
+      var recent = Option.none();
+      var getOrInit = function (element, comparator) {
+        return recent.fold(function () {
+          return add(element);
+        }, function (p) {
+          return comparator(element, p.item) ? p.replacement : add(element);
+        });
+      };
+      return {
+        getOrInit: getOrInit,
+        cursor: position.get
+      };
+    };
+    var transform = function (scope, tag) {
+      return function (generators) {
+        var position = Cell(Option.none());
+        verifyGenerators(generators);
+        var list = [];
+        var find$1 = function (element, comparator) {
+          return find(list, function (x) {
+            return comparator(x.item, element);
+          });
+        };
+        var makeNew = function (element) {
+          var attrs = { scope: scope };
+          var cell = generators.replace(element, tag, attrs);
+          list.push({
+            item: element,
+            sub: cell
+          });
+          if (position.get().isNone()) {
+            position.set(Option.some(cell));
+          }
+          return cell;
+        };
+        var replaceOrInit = function (element, comparator) {
+          return find$1(element, comparator).fold(function () {
+            return makeNew(element);
+          }, function (p) {
+            return comparator(element, p.item) ? p.sub : makeNew(element);
+          });
+        };
+        return {
+          replaceOrInit: replaceOrInit,
+          cursor: position.get
+        };
+      };
+    };
+    var merging = function (generators) {
+      verifyGenerators(generators);
+      var position = Cell(Option.none());
+      var combine = function (cell) {
+        if (position.get().isNone()) {
+          position.set(Option.some(cell));
+        }
+        return function () {
+          var raw = generators.cell({
+            element: constant(cell),
+            colspan: constant(1),
+            rowspan: constant(1)
+          });
+          remove$1(raw, 'width');
+          remove$1(cell, 'width');
+          return raw;
+        };
+      };
+      return {
+        combine: combine,
+        cursor: position.get
+      };
+    };
+    var Generators = {
+      modification: modification,
+      transform: transform,
+      merging: merging
+    };
+
+    var blockList = [
+      'body',
+      'p',
+      'div',
+      'article',
+      'aside',
+      'figcaption',
+      'figure',
+      'footer',
+      'header',
+      'nav',
+      'section',
+      'ol',
+      'ul',
+      'table',
+      'thead',
+      'tfoot',
+      'tbody',
+      'caption',
+      'tr',
+      'td',
+      'th',
+      'h1',
+      'h2',
+      'h3',
+      'h4',
+      'h5',
+      'h6',
+      'blockquote',
+      'pre',
+      'address'
+    ];
+    var isList = function (universe, item) {
+      var tagName = universe.property().name(item);
+      return contains([
+        'ol',
+        'ul'
+      ], tagName);
+    };
+    var isBlock = function (universe, item) {
+      var tagName = universe.property().name(item);
+      return contains(blockList, tagName);
+    };
+    var isEmptyTag = function (universe, item) {
+      return contains([
+        'br',
+        'img',
+        'hr',
+        'input'
+      ], universe.property().name(item));
+    };
+
+    var universe$1 = DomUniverse();
+    var isBlock$1 = function (element) {
+      return isBlock(universe$1, element);
+    };
+    var isList$1 = function (element) {
+      return isList(universe$1, element);
+    };
+    var isEmptyTag$1 = function (element) {
+      return isEmptyTag(universe$1, element);
+    };
+
+    var merge$2 = function (cells) {
+      var isBr = function (el) {
+        return name(el) === 'br';
+      };
+      var advancedBr = function (children) {
+        return forall(children, function (c) {
+          return isBr(c) || isText(c) && get$3(c).trim().length === 0;
+        });
+      };
+      var isListItem = function (el) {
+        return name(el) === 'li' || ancestor(el, isList$1).isSome();
+      };
+      var siblingIsBlock = function (el) {
+        return nextSibling(el).map(function (rightSibling) {
+          if (isBlock$1(rightSibling)) {
+            return true;
+          }
+          if (isEmptyTag$1(rightSibling)) {
+            return name(rightSibling) === 'img' ? false : true;
+          }
+          return false;
+        }).getOr(false);
+      };
+      var markCell = function (cell) {
+        return last$1(cell).bind(function (rightEdge) {
+          var rightSiblingIsBlock = siblingIsBlock(rightEdge);
+          return parent(rightEdge).map(function (parent) {
+            return rightSiblingIsBlock === true || isListItem(parent) || isBr(rightEdge) || isBlock$1(parent) && !eq(cell, parent) ? [] : [Element.fromTag('br')];
+          });
+        }).getOr([]);
+      };
+      var markContent = function () {
+        var content = bind(cells, function (cell) {
+          var children$1 = children(cell);
+          return advancedBr(children$1) ? [] : children$1.concat(markCell(cell));
+        });
+        return content.length === 0 ? [Element.fromTag('br')] : content;
+      };
+      var contents = markContent();
+      empty(cells[0]);
+      append$1(cells[0], contents);
+    };
+
+    var prune = function (table) {
+      var cells$1 = cells(table);
+      if (cells$1.length === 0) {
+        remove$2(table);
+      }
+    };
+    var outcome = function (grid, cursor) {
+      return {
+        grid: constant(grid),
+        cursor: constant(cursor)
+      };
+    };
+    var elementFromGrid = function (grid, row, column) {
+      return findIn(grid, row, column).orThunk(function () {
+        return findIn(grid, 0, 0);
+      });
+    };
+    var findIn = function (grid, row, column) {
+      return Option.from(grid[row]).bind(function (r) {
+        return Option.from(r.cells()[column]).bind(function (c) {
+          return Option.from(c.element());
+        });
+      });
+    };
+    var bundle = function (grid, row, column) {
+      return outcome(grid, findIn(grid, row, column));
+    };
+    var uniqueRows = function (details) {
+      return foldl(details, function (rest, detail) {
+        return exists(rest, function (currentDetail) {
+          return currentDetail.row() === detail.row();
+        }) ? rest : rest.concat([detail]);
+      }, []).sort(function (detailA, detailB) {
+        return detailA.row() - detailB.row();
+      });
+    };
+    var uniqueColumns = function (details) {
+      return foldl(details, function (rest, detail) {
+        return exists(rest, function (currentDetail) {
+          return currentDetail.column() === detail.column();
+        }) ? rest : rest.concat([detail]);
+      }, []).sort(function (detailA, detailB) {
+        return detailA.column() - detailB.column();
+      });
+    };
+    var opInsertRowsBefore = function (grid, details, comparator, genWrappers) {
+      var example = details[0].row();
+      var targetIndex = details[0].row();
+      var rows = uniqueRows(details);
+      var newGrid = foldl(rows, function (newG, _row) {
+        return insertRowAt(newG, targetIndex, example, comparator, genWrappers.getOrInit);
+      }, grid);
+      return bundle(newGrid, targetIndex, details[0].column());
+    };
+    var opInsertRowsAfter = function (grid, details, comparator, genWrappers) {
+      var rows = uniqueRows(details);
+      var example = rows[rows.length - 1].row();
+      var targetIndex = rows[rows.length - 1].row() + rows[rows.length - 1].rowspan();
+      var newGrid = foldl(rows, function (newG, _row) {
+        return insertRowAt(newG, targetIndex, example, comparator, genWrappers.getOrInit);
+      }, grid);
+      return bundle(newGrid, targetIndex, details[0].column());
+    };
+    var opInsertColumnsBefore = function (grid, details, comparator, genWrappers) {
+      var columns = uniqueColumns(details);
+      var example = columns[0].column();
+      var targetIndex = columns[0].column();
+      var newGrid = foldl(columns, function (newG, _row) {
+        return insertColumnAt(newG, targetIndex, example, comparator, genWrappers.getOrInit);
+      }, grid);
+      return bundle(newGrid, details[0].row(), targetIndex);
+    };
+    var opInsertColumnsAfter = function (grid, details, comparator, genWrappers) {
+      var example = details[details.length - 1].column();
+      var targetIndex = details[details.length - 1].column() + details[details.length - 1].colspan();
+      var columns = uniqueColumns(details);
+      var newGrid = foldl(columns, function (newG, _row) {
+        return insertColumnAt(newG, targetIndex, example, comparator, genWrappers.getOrInit);
+      }, grid);
+      return bundle(newGrid, details[0].row(), targetIndex);
+    };
+    var opMakeRowHeader = function (grid, detail, comparator, genWrappers) {
+      var newGrid = replaceRow(grid, detail.row(), comparator, genWrappers.replaceOrInit);
+      return bundle(newGrid, detail.row(), detail.column());
+    };
+    var opMakeColumnHeader = function (grid, detail, comparator, genWrappers) {
+      var newGrid = replaceColumn(grid, detail.column(), comparator, genWrappers.replaceOrInit);
+      return bundle(newGrid, detail.row(), detail.column());
+    };
+    var opUnmakeRowHeader = function (grid, detail, comparator, genWrappers) {
+      var newGrid = replaceRow(grid, detail.row(), comparator, genWrappers.replaceOrInit);
+      return bundle(newGrid, detail.row(), detail.column());
+    };
+    var opUnmakeColumnHeader = function (grid, detail, comparator, genWrappers) {
+      var newGrid = replaceColumn(grid, detail.column(), comparator, genWrappers.replaceOrInit);
+      return bundle(newGrid, detail.row(), detail.column());
+    };
+    var opEraseColumns = function (grid, details, _comparator, _genWrappers) {
+      var columns = uniqueColumns(details);
+      var newGrid = deleteColumnsAt(grid, columns[0].column(), columns[columns.length - 1].column());
+      var cursor = elementFromGrid(newGrid, details[0].row(), details[0].column());
+      return outcome(newGrid, cursor);
+    };
+    var opEraseRows = function (grid, details, _comparator, _genWrappers) {
+      var rows = uniqueRows(details);
+      var newGrid = deleteRowsAt(grid, rows[0].row(), rows[rows.length - 1].row());
+      var cursor = elementFromGrid(newGrid, details[0].row(), details[0].column());
+      return outcome(newGrid, cursor);
+    };
+    var opMergeCells = function (grid, mergable, comparator, _genWrappers) {
+      var cells = mergable.cells();
+      merge$2(cells);
+      var newGrid = merge(grid, mergable.bounds(), comparator, constant(cells[0]));
+      return outcome(newGrid, Option.from(cells[0]));
+    };
+    var opUnmergeCells = function (grid, unmergable, comparator, genWrappers) {
+      var newGrid = foldr(unmergable, function (b, cell) {
+        return unmerge(b, cell, comparator, genWrappers.combine(cell));
+      }, grid);
+      return outcome(newGrid, Option.from(unmergable[0]));
+    };
+    var opPasteCells = function (grid, pasteDetails, comparator, _genWrappers) {
+      var gridify = function (table, generators) {
+        var list = fromTable(table);
+        var wh = Warehouse.generate(list);
+        return toGrid(wh, generators, true);
+      };
+      var gridB = gridify(pasteDetails.clipboard(), pasteDetails.generators());
+      var startAddress = address(pasteDetails.row(), pasteDetails.column());
+      var mergedGrid = merge$1(startAddress, grid, gridB, pasteDetails.generators(), comparator);
+      return mergedGrid.fold(function () {
+        return outcome(grid, Option.some(pasteDetails.element()));
+      }, function (nuGrid) {
+        var cursor = elementFromGrid(nuGrid, pasteDetails.row(), pasteDetails.column());
+        return outcome(nuGrid, cursor);
+      });
+    };
+    var gridifyRows = function (rows, generators, example) {
+      var pasteDetails = fromPastedRows(rows, example);
+      var wh = Warehouse.generate(pasteDetails);
+      return toGrid(wh, generators, true);
+    };
+    var opPasteRowsBefore = function (grid, pasteDetails, comparator, _genWrappers) {
+      var example = grid[pasteDetails.cells[0].row()];
+      var index = pasteDetails.cells[0].row();
+      var gridB = gridifyRows(pasteDetails.clipboard(), pasteDetails.generators(), example);
+      var mergedGrid = insert(index, grid, gridB, pasteDetails.generators(), comparator);
+      var cursor = elementFromGrid(mergedGrid, pasteDetails.cells[0].row(), pasteDetails.cells[0].column());
+      return outcome(mergedGrid, cursor);
+    };
+    var opPasteRowsAfter = function (grid, pasteDetails, comparator, _genWrappers) {
+      var example = grid[pasteDetails.cells[0].row()];
+      var index = pasteDetails.cells[pasteDetails.cells.length - 1].row() + pasteDetails.cells[pasteDetails.cells.length - 1].rowspan();
+      var gridB = gridifyRows(pasteDetails.clipboard(), pasteDetails.generators(), example);
+      var mergedGrid = insert(index, grid, gridB, pasteDetails.generators(), comparator);
+      var cursor = elementFromGrid(mergedGrid, pasteDetails.cells[0].row(), pasteDetails.cells[0].column());
+      return outcome(mergedGrid, cursor);
+    };
+    var resize = adjustWidthTo;
+    var insertRowsBefore = run(opInsertRowsBefore, onCells, noop, noop, Generators.modification);
+    var insertRowsAfter = run(opInsertRowsAfter, onCells, noop, noop, Generators.modification);
+    var insertColumnsBefore = run(opInsertColumnsBefore, onCells, resize, noop, Generators.modification);
+    var insertColumnsAfter = run(opInsertColumnsAfter, onCells, resize, noop, Generators.modification);
+    var eraseColumns = run(opEraseColumns, onCells, resize, prune, Generators.modification);
+    var eraseRows = run(opEraseRows, onCells, noop, prune, Generators.modification);
+    var makeColumnHeader = run(opMakeColumnHeader, onCell, noop, noop, Generators.transform('row', 'th'));
+    var unmakeColumnHeader = run(opUnmakeColumnHeader, onCell, noop, noop, Generators.transform(null, 'td'));
+    var makeRowHeader = run(opMakeRowHeader, onCell, noop, noop, Generators.transform('col', 'th'));
+    var unmakeRowHeader = run(opUnmakeRowHeader, onCell, noop, noop, Generators.transform(null, 'td'));
+    var mergeCells = run(opMergeCells, onMergable, noop, noop, Generators.merging);
+    var unmergeCells = run(opUnmergeCells, onUnmergable, resize, noop, Generators.merging);
+    var pasteCells = run(opPasteCells, onPaste, resize, noop, Generators.modification);
+    var pasteRowsBefore = run(opPasteRowsBefore, onPasteRows, noop, noop, Generators.modification);
+    var pasteRowsAfter = run(opPasteRowsAfter, onPasteRows, noop, noop, Generators.modification);
+
+    var getBody$1 = function (editor) {
+      return Element.fromDom(editor.getBody());
+    };
+    var getPixelWidth$1 = function (elm) {
+      return elm.getBoundingClientRect().width;
+    };
+    var getPixelHeight = function (elm) {
+      return elm.getBoundingClientRect().height;
+    };
+    var getIsRoot = function (editor) {
+      return function (element) {
+        return eq(element, getBody$1(editor));
+      };
+    };
+    var removePxSuffix = function (size) {
+      return size ? size.replace(/px$/, '') : '';
+    };
+    var addSizeSuffix = function (size) {
+      if (/^[0-9]+$/.test(size)) {
+        size += 'px';
+      }
+      return size;
+    };
+    var removeDataStyle = function (table) {
+      var dataStyleCells = descendants$1(table, 'td[data-mce-style],th[data-mce-style]');
+      remove(table, 'data-mce-style');
+      each(dataStyleCells, function (cell) {
+        remove(cell, 'data-mce-style');
+      });
+    };
+
+    var getDirection = function (element) {
+      return get$2(element, 'direction') === 'rtl' ? 'rtl' : 'ltr';
+    };
+
+    var ltr$1 = { isRtl: constant(false) };
+    var rtl$1 = { isRtl: constant(true) };
+    var directionAt = function (element) {
+      var dir = getDirection(element);
+      return dir === 'rtl' ? rtl$1 : ltr$1;
+    };
+
+    var defaultTableToolbar = 'tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol';
+    var defaultStyles = {
+      'border-collapse': 'collapse',
+      'width': '100%'
+    };
+    var defaultAttributes = { border: '1' };
+    var getDefaultAttributes = function (editor) {
+      return editor.getParam('table_default_attributes', defaultAttributes, 'object');
+    };
+    var getDefaultStyles = function (editor) {
+      return editor.getParam('table_default_styles', defaultStyles, 'object');
+    };
+    var hasTableResizeBars = function (editor) {
+      return editor.getParam('table_resize_bars', true, 'boolean');
+    };
+    var hasTabNavigation = function (editor) {
+      return editor.getParam('table_tab_navigation', true, 'boolean');
+    };
+    var hasAdvancedCellTab = function (editor) {
+      return editor.getParam('table_cell_advtab', true, 'boolean');
+    };
+    var hasAdvancedRowTab = function (editor) {
+      return editor.getParam('table_row_advtab', true, 'boolean');
+    };
+    var hasAdvancedTableTab = function (editor) {
+      return editor.getParam('table_advtab', true, 'boolean');
+    };
+    var hasAppearanceOptions = function (editor) {
+      return editor.getParam('table_appearance_options', true, 'boolean');
+    };
+    var hasTableGrid = function (editor) {
+      return editor.getParam('table_grid', true, 'boolean');
+    };
+    var shouldStyleWithCss = function (editor) {
+      return editor.getParam('table_style_by_css', false, 'boolean');
+    };
+    var getCellClassList = function (editor) {
+      return editor.getParam('table_cell_class_list', [], 'array');
+    };
+    var getRowClassList = function (editor) {
+      return editor.getParam('table_row_class_list', [], 'array');
+    };
+    var getTableClassList = function (editor) {
+      return editor.getParam('table_class_list', [], 'array');
+    };
+    var isPercentagesForced = function (editor) {
+      return editor.getParam('table_responsive_width') === true;
+    };
+    var isPixelsForced = function (editor) {
+      return editor.getParam('table_responsive_width') === false;
+    };
+    var getToolbar = function (editor) {
+      return editor.getParam('table_toolbar', defaultTableToolbar);
+    };
+    var getCloneElements = function (editor) {
+      var cloneElements = editor.getParam('table_clone_elements');
+      if (isString(cloneElements)) {
+        return Option.some(cloneElements.split(/[ ,]/));
+      } else if (Array.isArray(cloneElements)) {
+        return Option.some(cloneElements);
+      } else {
+        return Option.none();
+      }
+    };
+    var hasObjectResizing = function (editor) {
+      var objectResizing = editor.getParam('object_resizing', true);
+      return isString(objectResizing) ? objectResizing === 'table' : objectResizing;
+    };
+
+    var fireNewRow = function (editor, row) {
+      return editor.fire('newrow', { node: row });
+    };
+    var fireNewCell = function (editor, cell) {
+      return editor.fire('newcell', { node: cell });
+    };
+    var fireObjectResizeStart = function (editor, target, width, height) {
+      editor.fire('ObjectResizeStart', {
+        target: target,
+        width: width,
+        height: height
+      });
+    };
+    var fireObjectResized = function (editor, target, width, height) {
+      editor.fire('ObjectResized', {
+        target: target,
+        width: width,
+        height: height
+      });
+    };
+    var fireTableSelectionChange = function (editor, cells, start, finish, otherCells) {
+      editor.fire('TableSelectionChange', {
+        cells: cells,
+        start: start,
+        finish: finish,
+        otherCells: otherCells
+      });
+    };
+    var fireTableSelectionClear = function (editor) {
+      editor.fire('TableSelectionClear');
+    };
+
+    var point = function (element, offset) {
+      return {
+        element: constant(element),
+        offset: constant(offset)
+      };
+    };
+
+    var scan = function (universe, element, direction) {
+      if (universe.property().isText(element) && universe.property().getText(element).trim().length === 0 || universe.property().isComment(element)) {
+        return direction(element).bind(function (elem) {
+          return scan(universe, elem, direction).orThunk(function () {
+            return Option.some(elem);
+          });
+        });
+      } else {
+        return Option.none();
+      }
+    };
+    var toEnd = function (universe, element) {
+      if (universe.property().isText(element)) {
+        return universe.property().getText(element).length;
+      }
+      var children = universe.property().children(element);
+      return children.length;
+    };
+    var freefallRtl = function (universe, element) {
+      var candidate = scan(universe, element, universe.query().prevSibling).getOr(element);
+      if (universe.property().isText(candidate)) {
+        return point(candidate, toEnd(universe, candidate));
+      }
+      var children = universe.property().children(candidate);
+      return children.length > 0 ? freefallRtl(universe, children[children.length - 1]) : point(candidate, toEnd(universe, candidate));
+    };
+
+    var freefallRtl$1 = freefallRtl;
+
+    var universe$2 = DomUniverse();
+    var freefallRtl$2 = function (element) {
+      return freefallRtl$1(universe$2, element);
+    };
+
+    var TableActions = function (editor, lazyWire) {
+      var isTableBody = function (editor) {
+        return name(getBody$1(editor)) === 'table';
+      };
+      var lastRowGuard = function (table) {
+        var size = getGridSize(table);
+        return isTableBody(editor) === false || size.rows() > 1;
+      };
+      var lastColumnGuard = function (table) {
+        var size = getGridSize(table);
+        return isTableBody(editor) === false || size.columns() > 1;
+      };
+      var cloneFormats = getCloneElements(editor);
+      var execute = function (operation, guard, mutate, lazyWire) {
+        return function (table, target) {
+          removeDataStyle(table);
+          var wire = lazyWire();
+          var doc = Element.fromDom(editor.getDoc());
+          var direction = TableDirection(directionAt);
+          var generators = cellOperations(mutate, doc, cloneFormats);
+          return guard(table) ? operation(wire, table, target, generators, direction).bind(function (result) {
+            each(result.newRows(), function (row) {
+              fireNewRow(editor, row.dom());
+            });
+            each(result.newCells(), function (cell) {
+              fireNewCell(editor, cell.dom());
+            });
+            return result.cursor().map(function (cell) {
+              var des = freefallRtl$2(cell);
+              var rng = editor.dom.createRng();
+              rng.setStart(des.element().dom(), des.offset());
+              rng.setEnd(des.element().dom(), des.offset());
+              return rng;
+            });
+          }) : Option.none();
+        };
+      };
+      var deleteRow = execute(eraseRows, lastRowGuard, noop, lazyWire);
+      var deleteColumn = execute(eraseColumns, lastColumnGuard, noop, lazyWire);
+      var insertRowsBefore$1 = execute(insertRowsBefore, always, noop, lazyWire);
+      var insertRowsAfter$1 = execute(insertRowsAfter, always, noop, lazyWire);
+      var insertColumnsBefore$1 = execute(insertColumnsBefore, always, halve, lazyWire);
+      var insertColumnsAfter$1 = execute(insertColumnsAfter, always, halve, lazyWire);
+      var mergeCells$1 = execute(mergeCells, always, noop, lazyWire);
+      var unmergeCells$1 = execute(unmergeCells, always, noop, lazyWire);
+      var pasteRowsBefore$1 = execute(pasteRowsBefore, always, noop, lazyWire);
+      var pasteRowsAfter$1 = execute(pasteRowsAfter, always, noop, lazyWire);
+      var pasteCells$1 = execute(pasteCells, always, noop, lazyWire);
+      return {
+        deleteRow: deleteRow,
+        deleteColumn: deleteColumn,
+        insertRowsBefore: insertRowsBefore$1,
+        insertRowsAfter: insertRowsAfter$1,
+        insertColumnsBefore: insertColumnsBefore$1,
+        insertColumnsAfter: insertColumnsAfter$1,
+        mergeCells: mergeCells$1,
+        unmergeCells: unmergeCells$1,
+        pasteRowsBefore: pasteRowsBefore$1,
+        pasteRowsAfter: pasteRowsAfter$1,
+        pasteCells: pasteCells$1
+      };
+    };
+
+    var copyRows = function (table, target, generators) {
+      var list = fromTable(table);
+      var house = Warehouse.generate(list);
+      var details = onCells(house, target);
+      return details.map(function (selectedCells) {
+        var grid = toGrid(house, generators, false);
+        var slicedGrid = grid.slice(selectedCells[0].row(), selectedCells[selectedCells.length - 1].row() + selectedCells[selectedCells.length - 1].rowspan());
+        var slicedDetails = toDetailList(slicedGrid, generators);
+        return copy$2(slicedDetails);
+      });
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var getSelectionStartFromSelector = function (selector) {
+      return function (editor) {
+        return Option.from(editor.dom.getParent(editor.selection.getStart(), selector)).map(Element.fromDom);
+      };
+    };
+    var getSelectionStartCell = getSelectionStartFromSelector('th,td');
+    var getSelectionStartCellOrCaption = getSelectionStartFromSelector('th,td,caption');
+
+    var getTDTHOverallStyle = function (dom, elm, name) {
+      var cells = dom.select('td,th', elm);
+      var firstChildStyle;
+      var checkChildren = function (firstChildStyle, elms) {
+        for (var i = 0; i < elms.length; i++) {
+          var currentStyle = dom.getStyle(elms[i], name);
+          if (typeof firstChildStyle === 'undefined') {
+            firstChildStyle = currentStyle;
+          }
+          if (firstChildStyle !== currentStyle) {
+            return '';
+          }
+        }
+        return firstChildStyle;
+      };
+      firstChildStyle = checkChildren(firstChildStyle, cells);
+      return firstChildStyle;
+    };
+    var applyAlign = function (editor, elm, name) {
+      if (name) {
+        editor.formatter.apply('align' + name, {}, elm);
+      }
+    };
+    var applyVAlign = function (editor, elm, name) {
+      if (name) {
+        editor.formatter.apply('valign' + name, {}, elm);
+      }
+    };
+    var unApplyAlign = function (editor, elm) {
+      global$1.each('left center right'.split(' '), function (name) {
+        editor.formatter.remove('align' + name, {}, elm);
+      });
+    };
+    var unApplyVAlign = function (editor, elm) {
+      global$1.each('top middle bottom'.split(' '), function (name) {
+        editor.formatter.remove('valign' + name, {}, elm);
+      });
+    };
+
+    var buildListItems = function (inputList, itemCallback, startItems) {
+      var appendItems = function (values, output) {
+        output = output || [];
+        global$1.each(values, function (item) {
+          var menuItem = { text: item.text || item.title };
+          if (item.menu) {
+            menuItem.menu = appendItems(item.menu);
+          } else {
+            menuItem.value = item.value;
+            if (itemCallback) {
+              itemCallback(menuItem);
+            }
+          }
+          output.push(menuItem);
+        });
+        return output;
+      };
+      return appendItems(inputList, startItems || []);
+    };
+    var extractAdvancedStyles = function (dom, elm) {
+      var rgbToHex = function (value) {
+        return startsWith(value, 'rgb') ? dom.toHex(value) : value;
+      };
+      var borderWidth = getRaw(Element.fromDom(elm), 'border-width').getOr('');
+      var borderStyle = getRaw(Element.fromDom(elm), 'border-style').getOr('');
+      var borderColor = getRaw(Element.fromDom(elm), 'border-color').map(rgbToHex).getOr('');
+      var bgColor = getRaw(Element.fromDom(elm), 'background-color').map(rgbToHex).getOr('');
+      return {
+        borderwidth: borderWidth,
+        borderstyle: borderStyle,
+        bordercolor: borderColor,
+        backgroundcolor: bgColor
+      };
+    };
+    var getSharedValues = function (data) {
+      var baseData = data[0];
+      var comparisonData = data.slice(1);
+      var keys$1 = keys(baseData);
+      each(comparisonData, function (items) {
+        each(keys$1, function (key) {
+          each$1(items, function (itemValue, itemKey) {
+            var comparisonValue = baseData[key];
+            if (comparisonValue !== '' && key === itemKey) {
+              if (comparisonValue !== itemValue) {
+                baseData[key] = '';
+              }
+            }
+          });
+        });
+      });
+      return baseData;
+    };
+    var getAdvancedTab = function (dialogName) {
+      var advTabItems = [
+        {
+          name: 'borderstyle',
+          type: 'selectbox',
+          label: 'Border style',
+          items: [
+            {
+              text: 'Select...',
+              value: ''
+            },
+            {
+              text: 'Solid',
+              value: 'solid'
+            },
+            {
+              text: 'Dotted',
+              value: 'dotted'
+            },
+            {
+              text: 'Dashed',
+              value: 'dashed'
+            },
+            {
+              text: 'Double',
+              value: 'double'
+            },
+            {
+              text: 'Groove',
+              value: 'groove'
+            },
+            {
+              text: 'Ridge',
+              value: 'ridge'
+            },
+            {
+              text: 'Inset',
+              value: 'inset'
+            },
+            {
+              text: 'Outset',
+              value: 'outset'
+            },
+            {
+              text: 'None',
+              value: 'none'
+            },
+            {
+              text: 'Hidden',
+              value: 'hidden'
+            }
+          ]
+        },
+        {
+          name: 'bordercolor',
+          type: 'colorinput',
+          label: 'Border color'
+        },
+        {
+          name: 'backgroundcolor',
+          type: 'colorinput',
+          label: 'Background color'
+        }
+      ];
+      var borderWidth = {
+        name: 'borderwidth',
+        type: 'input',
+        label: 'Border width'
+      };
+      var items = dialogName === 'cell' ? [borderWidth].concat(advTabItems) : advTabItems;
+      return {
+        title: 'Advanced',
+        name: 'advanced',
+        items: items
+      };
+    };
+    var getAlignment = function (alignments, formatName, dataName, editor, elm) {
+      var alignmentData = {};
+      global$1.each(alignments.split(' '), function (name) {
+        if (editor.formatter.matchNode(elm, formatName + name)) {
+          alignmentData[dataName] = name;
+        }
+      });
+      if (!alignmentData[dataName]) {
+        alignmentData[dataName] = '';
+      }
+      return alignmentData;
+    };
+    var getHAlignment = curry(getAlignment, 'left center right');
+    var getVAlignment = curry(getAlignment, 'top middle bottom');
+    var extractDataFromSettings = function (editor, hasAdvTableTab) {
+      var style = getDefaultStyles(editor);
+      var attrs = getDefaultAttributes(editor);
+      var extractAdvancedStyleData = function (dom) {
+        var rgbToHex = function (value) {
+          return startsWith(value, 'rgb') ? dom.toHex(value) : value;
+        };
+        var borderStyle = get(style, 'border-style').getOr('');
+        var borderColor = get(style, 'border-color').getOr('');
+        var bgColor = get(style, 'background-color').getOr('');
+        return {
+          borderstyle: borderStyle,
+          bordercolor: rgbToHex(borderColor),
+          backgroundcolor: rgbToHex(bgColor)
+        };
+      };
+      var defaultData = {
+        height: '',
+        width: '100%',
+        cellspacing: '',
+        cellpadding: '',
+        caption: false,
+        class: '',
+        align: '',
+        border: ''
+      };
+      var getBorder = function () {
+        var borderWidth = style['border-width'];
+        if (shouldStyleWithCss(editor) && borderWidth) {
+          return { border: borderWidth };
+        }
+        return get(attrs, 'border').fold(function () {
+          return {};
+        }, function (border) {
+          return { border: border };
+        });
+      };
+      var dom = editor.dom;
+      var advStyle = hasAdvTableTab ? extractAdvancedStyleData(dom) : {};
+      var getCellPaddingCellSpacing = function () {
+        var spacing = get(style, 'border-spacing').or(get(attrs, 'cellspacing')).fold(function () {
+          return {};
+        }, function (cellspacing) {
+          return { cellspacing: cellspacing };
+        });
+        var padding = get(style, 'border-padding').or(get(attrs, 'cellpadding')).fold(function () {
+          return {};
+        }, function (cellpadding) {
+          return { cellpadding: cellpadding };
+        });
+        return __assign(__assign({}, spacing), padding);
+      };
+      var data = __assign(__assign(__assign(__assign(__assign(__assign({}, defaultData), style), attrs), advStyle), getBorder()), getCellPaddingCellSpacing());
+      return data;
+    };
+    var extractDataFromTableElement = function (editor, elm, hasAdvTableTab) {
+      var getBorder = function (dom, elm) {
+        var optBorderWidth = getRaw(Element.fromDom(elm), 'border-width');
+        if (shouldStyleWithCss(editor) && optBorderWidth.isSome()) {
+          return optBorderWidth.getOr('');
+        }
+        return dom.getAttrib(elm, 'border') || getTDTHOverallStyle(editor.dom, elm, 'border-width') || getTDTHOverallStyle(editor.dom, elm, 'border');
+      };
+      var dom = editor.dom;
+      var data = __assign(__assign({
+        width: dom.getStyle(elm, 'width') || dom.getAttrib(elm, 'width'),
+        height: dom.getStyle(elm, 'height') || dom.getAttrib(elm, 'height'),
+        cellspacing: dom.getStyle(elm, 'border-spacing') || dom.getAttrib(elm, 'cellspacing'),
+        cellpadding: dom.getAttrib(elm, 'cellpadding') || getTDTHOverallStyle(editor.dom, elm, 'padding'),
+        border: getBorder(dom, elm),
+        caption: !!dom.select('caption', elm)[0],
+        class: dom.getAttrib(elm, 'class', '')
+      }, getHAlignment('align', 'align', editor, elm)), hasAdvTableTab ? extractAdvancedStyles(dom, elm) : {});
+      return data;
+    };
+    var extractDataFromRowElement = function (editor, elm, hasAdvancedRowTab) {
+      var dom = editor.dom;
+      var data = __assign(__assign({
+        height: dom.getStyle(elm, 'height') || dom.getAttrib(elm, 'height'),
+        scope: dom.getAttrib(elm, 'scope'),
+        class: dom.getAttrib(elm, 'class', ''),
+        align: '',
+        type: elm.parentNode.nodeName.toLowerCase()
+      }, getHAlignment('align', 'align', editor, elm)), hasAdvancedRowTab ? extractAdvancedStyles(dom, elm) : {});
+      return data;
+    };
+    var extractDataFromCellElement = function (editor, elm, hasAdvancedCellTab) {
+      var dom = editor.dom;
+      var data = __assign(__assign(__assign({
+        width: dom.getStyle(elm, 'width') || dom.getAttrib(elm, 'width'),
+        height: dom.getStyle(elm, 'height') || dom.getAttrib(elm, 'height'),
+        scope: dom.getAttrib(elm, 'scope'),
+        celltype: elm.nodeName.toLowerCase(),
+        class: dom.getAttrib(elm, 'class', '')
+      }, getHAlignment('align', 'halign', editor, elm)), getVAlignment('valign', 'valign', editor, elm)), hasAdvancedCellTab ? extractAdvancedStyles(dom, elm) : {});
+      return data;
+    };
+
+    var getClassList = function (editor) {
+      var rowClassList = getCellClassList(editor);
+      var classes = buildListItems(rowClassList, function (item) {
+        if (item.value) {
+          item.textStyle = function () {
+            return editor.formatter.getCssText({
+              block: 'tr',
+              classes: [item.value]
+            });
+          };
+        }
+      });
+      if (rowClassList.length > 0) {
+        return Option.some({
+          name: 'class',
+          type: 'selectbox',
+          label: 'Class',
+          items: classes
+        });
+      }
+      return Option.none();
+    };
+    var children$3 = [
+      {
+        name: 'width',
+        type: 'input',
+        label: 'Width'
+      },
+      {
+        name: 'height',
+        type: 'input',
+        label: 'Height'
+      },
+      {
+        name: 'celltype',
+        type: 'selectbox',
+        label: 'Cell type',
+        items: [
+          {
+            text: 'Cell',
+            value: 'td'
+          },
+          {
+            text: 'Header cell',
+            value: 'th'
+          }
+        ]
+      },
+      {
+        name: 'scope',
+        type: 'selectbox',
+        label: 'Scope',
+        items: [
+          {
+            text: 'None',
+            value: ''
+          },
+          {
+            text: 'Row',
+            value: 'row'
+          },
+          {
+            text: 'Column',
+            value: 'col'
+          },
+          {
+            text: 'Row group',
+            value: 'rowgroup'
+          },
+          {
+            text: 'Column group',
+            value: 'colgroup'
+          }
+        ]
+      },
+      {
+        name: 'halign',
+        type: 'selectbox',
+        label: 'H Align',
+        items: [
+          {
+            text: 'None',
+            value: ''
+          },
+          {
+            text: 'Left',
+            value: 'left'
+          },
+          {
+            text: 'Center',
+            value: 'center'
+          },
+          {
+            text: 'Right',
+            value: 'right'
+          }
+        ]
+      },
+      {
+        name: 'valign',
+        type: 'selectbox',
+        label: 'V Align',
+        items: [
+          {
+            text: 'None',
+            value: ''
+          },
+          {
+            text: 'Top',
+            value: 'top'
+          },
+          {
+            text: 'Middle',
+            value: 'middle'
+          },
+          {
+            text: 'Bottom',
+            value: 'bottom'
+          }
+        ]
+      }
+    ];
+    var getItems = function (editor) {
+      return getClassList(editor).fold(function () {
+        return children$3;
+      }, function (classlist) {
+        return children$3.concat(classlist);
+      });
+    };
+
+    var normal = function (dom, node) {
+      var setAttrib = function (attr, value) {
+        dom.setAttrib(node, attr, value);
+      };
+      var setStyle = function (prop, value) {
+        dom.setStyle(node, prop, value);
+      };
+      return {
+        setAttrib: setAttrib,
+        setStyle: setStyle
+      };
+    };
+    var ifTruthy = function (dom, node) {
+      var setAttrib = function (attr, value) {
+        if (value) {
+          dom.setAttrib(node, attr, value);
+        }
+      };
+      var setStyle = function (prop, value) {
+        if (value) {
+          dom.setStyle(node, prop, value);
+        }
+      };
+      return {
+        setAttrib: setAttrib,
+        setStyle: setStyle
+      };
+    };
+    var DomModifier = {
+      normal: normal,
+      ifTruthy: ifTruthy
+    };
+
+    var updateSimpleProps = function (modifiers, data) {
+      modifiers.setAttrib('scope', data.scope);
+      modifiers.setAttrib('class', data.class);
+      modifiers.setStyle('width', addSizeSuffix(data.width));
+      modifiers.setStyle('height', addSizeSuffix(data.height));
+    };
+    var updateAdvancedProps = function (modifiers, data) {
+      modifiers.setStyle('background-color', data.backgroundcolor);
+      modifiers.setStyle('border-color', data.bordercolor);
+      modifiers.setStyle('border-style', data.borderstyle);
+      modifiers.setStyle('border-width', addSizeSuffix(data.borderwidth));
+    };
+    var applyToSingle = function (editor, cells, data) {
+      var dom = editor.dom;
+      var cellElm = data.celltype && cells[0].nodeName.toLowerCase() !== data.celltype ? dom.rename(cells[0], data.celltype) : cells[0];
+      var modifiers = DomModifier.normal(dom, cellElm);
+      updateSimpleProps(modifiers, data);
+      if (hasAdvancedCellTab(editor)) {
+        updateAdvancedProps(modifiers, data);
+      }
+      unApplyAlign(editor, cellElm);
+      unApplyVAlign(editor, cellElm);
+      if (data.halign) {
+        applyAlign(editor, cellElm, data.halign);
+      }
+      if (data.valign) {
+        applyVAlign(editor, cellElm, data.valign);
+      }
+    };
+    var applyToMultiple = function (editor, cells, data) {
+      var dom = editor.dom;
+      global$1.each(cells, function (cellElm) {
+        if (data.celltype && cellElm.nodeName.toLowerCase() !== data.celltype) {
+          cellElm = dom.rename(cellElm, data.celltype);
+        }
+        var modifiers = DomModifier.ifTruthy(dom, cellElm);
+        updateSimpleProps(modifiers, data);
+        if (hasAdvancedCellTab(editor)) {
+          updateAdvancedProps(modifiers, data);
+        }
+        if (data.halign) {
+          applyAlign(editor, cellElm, data.halign);
+        }
+        if (data.valign) {
+          applyVAlign(editor, cellElm, data.valign);
+        }
+      });
+    };
+    var onSubmitCellForm = function (editor, cells, api) {
+      var data = api.getData();
+      api.close();
+      editor.undoManager.transact(function () {
+        var applicator = cells.length === 1 ? applyToSingle : applyToMultiple;
+        applicator(editor, cells, data);
+        editor.focus();
+      });
+    };
+    var open = function (editor) {
+      var cellElm, cells = [];
+      cells = editor.dom.select('td[data-mce-selected],th[data-mce-selected]');
+      cellElm = editor.dom.getParent(editor.selection.getStart(), 'td,th');
+      if (!cells.length && cellElm) {
+        cells.push(cellElm);
+      }
+      cellElm = cellElm || cells[0];
+      if (!cellElm) {
+        return;
+      }
+      var cellsData = global$1.map(cells, function (cellElm) {
+        return extractDataFromCellElement(editor, cellElm, hasAdvancedCellTab(editor));
+      });
+      var data = getSharedValues(cellsData);
+      var dialogTabPanel = {
+        type: 'tabpanel',
+        tabs: [
+          {
+            title: 'General',
+            name: 'general',
+            items: getItems(editor)
+          },
+          getAdvancedTab('cell')
+        ]
+      };
+      var dialogPanel = {
+        type: 'panel',
+        items: [{
+            type: 'grid',
+            columns: 2,
+            items: getItems(editor)
+          }]
+      };
+      editor.windowManager.open({
+        title: 'Cell Properties',
+        size: 'normal',
+        body: hasAdvancedCellTab(editor) ? dialogTabPanel : dialogPanel,
+        buttons: [
+          {
+            type: 'cancel',
+            name: 'cancel',
+            text: 'Cancel'
+          },
+          {
+            type: 'submit',
+            name: 'save',
+            text: 'Save',
+            primary: true
+          }
+        ],
+        initialData: data,
+        onSubmit: curry(onSubmitCellForm, editor, cells)
+      });
+    };
+
+    var getClassList$1 = function (editor) {
+      var rowClassList = getRowClassList(editor);
+      var classes = buildListItems(rowClassList, function (item) {
+        if (item.value) {
+          item.textStyle = function () {
+            return editor.formatter.getCssText({
+              block: 'tr',
+              classes: [item.value]
+            });
+          };
+        }
+      });
+      if (rowClassList.length > 0) {
+        return Option.some({
+          name: 'class',
+          type: 'selectbox',
+          label: 'Class',
+          items: classes
+        });
+      }
+      return Option.none();
+    };
+    var formChildren = [
+      {
+        type: 'selectbox',
+        name: 'type',
+        label: 'Row type',
+        items: [
+          {
+            text: 'Header',
+            value: 'thead'
+          },
+          {
+            text: 'Body',
+            value: 'tbody'
+          },
+          {
+            text: 'Footer',
+            value: 'tfoot'
+          }
+        ]
+      },
+      {
+        type: 'selectbox',
+        name: 'align',
+        label: 'Alignment',
+        items: [
+          {
+            text: 'None',
+            value: ''
+          },
+          {
+            text: 'Left',
+            value: 'left'
+          },
+          {
+            text: 'Center',
+            value: 'center'
+          },
+          {
+            text: 'Right',
+            value: 'right'
+          }
+        ]
+      },
+      {
+        label: 'Height',
+        name: 'height',
+        type: 'input'
+      }
+    ];
+    var getItems$1 = function (editor) {
+      return getClassList$1(editor).fold(function () {
+        return formChildren;
+      }, function (classes) {
+        return formChildren.concat(classes);
+      });
+    };
+
+    var switchRowType = function (dom, rowElm, toType) {
+      var tableElm = dom.getParent(rowElm, 'table');
+      var oldParentElm = rowElm.parentNode;
+      var parentElm = dom.select(toType, tableElm)[0];
+      if (!parentElm) {
+        parentElm = dom.create(toType);
+        if (tableElm.firstChild) {
+          if (tableElm.firstChild.nodeName === 'CAPTION') {
+            dom.insertAfter(parentElm, tableElm.firstChild);
+          } else {
+            tableElm.insertBefore(parentElm, tableElm.firstChild);
+          }
+        } else {
+          tableElm.appendChild(parentElm);
+        }
+      }
+      if (toType === 'tbody' && oldParentElm.nodeName === 'THEAD' && parentElm.firstChild) {
+        parentElm.insertBefore(rowElm, parentElm.firstChild);
+      } else {
+        parentElm.appendChild(rowElm);
+      }
+      if (!oldParentElm.hasChildNodes()) {
+        dom.remove(oldParentElm);
+      }
+    };
+    var updateAdvancedProps$1 = function (modifier, data) {
+      modifier.setStyle('background-color', data.backgroundcolor);
+      modifier.setStyle('border-color', data.bordercolor);
+      modifier.setStyle('border-style', data.borderstyle);
+    };
+    var onSubmitRowForm = function (editor, rows, oldData, api) {
+      var dom = editor.dom;
+      var data = api.getData();
+      api.close();
+      var createModifier = rows.length === 1 ? DomModifier.normal : DomModifier.ifTruthy;
+      editor.undoManager.transact(function () {
+        global$1.each(rows, function (rowElm) {
+          if (data.type !== rowElm.parentNode.nodeName.toLowerCase()) {
+            switchRowType(editor.dom, rowElm, data.type);
+          }
+          var modifier = createModifier(dom, rowElm);
+          modifier.setAttrib('scope', data.scope);
+          modifier.setAttrib('class', data.class);
+          modifier.setStyle('height', addSizeSuffix(data.height));
+          if (hasAdvancedRowTab(editor)) {
+            updateAdvancedProps$1(modifier, data);
+          }
+          if (data.align !== oldData.align) {
+            unApplyAlign(editor, rowElm);
+            applyAlign(editor, rowElm, data.align);
+          }
+        });
+        editor.focus();
+      });
+    };
+    var open$1 = function (editor) {
+      var dom = editor.dom;
+      var tableElm, cellElm, rowElm;
+      var rows = [];
+      tableElm = dom.getParent(editor.selection.getStart(), 'table');
+      if (!tableElm) {
+        return;
+      }
+      cellElm = dom.getParent(editor.selection.getStart(), 'td,th');
+      global$1.each(tableElm.rows, function (row) {
+        global$1.each(row.cells, function (cell) {
+          if ((dom.getAttrib(cell, 'data-mce-selected') || cell === cellElm) && rows.indexOf(row) < 0) {
+            rows.push(row);
+            return false;
+          }
+        });
+      });
+      rowElm = rows[0];
+      if (!rowElm) {
+        return;
+      }
+      var rowsData = global$1.map(rows, function (rowElm) {
+        return extractDataFromRowElement(editor, rowElm, hasAdvancedRowTab(editor));
+      });
+      var data = getSharedValues(rowsData);
+      var dialogTabPanel = {
+        type: 'tabpanel',
+        tabs: [
+          {
+            title: 'General',
+            name: 'general',
+            items: getItems$1(editor)
+          },
+          getAdvancedTab('row')
+        ]
+      };
+      var dialogPanel = {
+        type: 'panel',
+        items: [{
+            type: 'grid',
+            columns: 2,
+            items: getItems$1(editor)
+          }]
+      };
+      editor.windowManager.open({
+        title: 'Row Properties',
+        size: 'normal',
+        body: hasAdvancedRowTab(editor) ? dialogTabPanel : dialogPanel,
+        buttons: [
+          {
+            type: 'cancel',
+            name: 'cancel',
+            text: 'Cancel'
+          },
+          {
+            type: 'submit',
+            name: 'save',
+            text: 'Save',
+            primary: true
+          }
+        ],
+        initialData: data,
+        onSubmit: curry(onSubmitRowForm, editor, rows, data)
+      });
+    };
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var DefaultRenderOptions = {
+      styles: {
+        'border-collapse': 'collapse',
+        'width': '100%'
+      },
+      attributes: { border: '1' },
+      percentages: true
+    };
+    var makeTable = function () {
+      return Element.fromTag('table');
+    };
+    var tableBody = function () {
+      return Element.fromTag('tbody');
+    };
+    var tableRow = function () {
+      return Element.fromTag('tr');
+    };
+    var tableHeaderCell = function () {
+      return Element.fromTag('th');
+    };
+    var tableCell = function () {
+      return Element.fromTag('td');
+    };
+    var render$1 = function (rows, columns, rowHeaders, columnHeaders, renderOpts) {
+      if (renderOpts === void 0) {
+        renderOpts = DefaultRenderOptions;
+      }
+      var table = makeTable();
+      setAll$1(table, renderOpts.styles);
+      setAll(table, renderOpts.attributes);
+      var tbody = tableBody();
+      append(table, tbody);
+      var trs = [];
+      for (var i = 0; i < rows; i++) {
+        var tr = tableRow();
+        for (var j = 0; j < columns; j++) {
+          var td = i < rowHeaders || j < columnHeaders ? tableHeaderCell() : tableCell();
+          if (j < columnHeaders) {
+            set(td, 'scope', 'row');
+          }
+          if (i < rowHeaders) {
+            set(td, 'scope', 'col');
+          }
+          append(td, Element.fromTag('br'));
+          if (renderOpts.percentages) {
+            set$1(td, 'width', 100 / columns + '%');
+          }
+          append(tr, td);
+        }
+        trs.push(tr);
+      }
+      append$1(tbody, trs);
+      return table;
+    };
+
+    var get$8 = function (element) {
+      return element.dom().innerHTML;
+    };
+    var getOuter$2 = function (element) {
+      var container = Element.fromTag('div');
+      var clone = Element.fromDom(element.dom().cloneNode(true));
+      append(container, clone);
+      return get$8(container);
+    };
+
+    var placeCaretInCell = function (editor, cell) {
+      editor.selection.select(cell.dom(), true);
+      editor.selection.collapse(true);
+    };
+    var selectFirstCellInTable = function (editor, tableElm) {
+      descendant$1(tableElm, 'td,th').each(curry(placeCaretInCell, editor));
+    };
+    var fireEvents = function (editor, table) {
+      each(descendants$1(table, 'tr'), function (row) {
+        fireNewRow(editor, row.dom());
+        each(descendants$1(row, 'th,td'), function (cell) {
+          fireNewCell(editor, cell.dom());
+        });
+      });
+    };
+    var isPercentage = function (width) {
+      return isString(width) && width.indexOf('%') !== -1;
+    };
+    var insert$1 = function (editor, columns, rows) {
+      var defaultStyles = getDefaultStyles(editor);
+      var options = {
+        styles: defaultStyles,
+        attributes: getDefaultAttributes(editor),
+        percentages: isPercentage(defaultStyles.width) && !isPixelsForced(editor)
+      };
+      var table = render$1(rows, columns, 0, 0, options);
+      set(table, 'data-mce-id', '__mce');
+      var html = getOuter$2(table);
+      editor.insertContent(html);
+      return descendant$1(getBody$1(editor), 'table[data-mce-id="__mce"]').map(function (table) {
+        if (isPixelsForced(editor)) {
+          set$1(table, 'width', get$2(table, 'width'));
+        }
+        remove(table, 'data-mce-id');
+        fireEvents(editor, table);
+        selectFirstCellInTable(editor, table);
+        return table.dom();
+      }).getOr(null);
+    };
+
+    var getItems$2 = function (editor, hasClasses, insertNewTable) {
+      var rowColCountItems = !insertNewTable ? [] : [
+        {
+          type: 'input',
+          name: 'cols',
+          label: 'Cols',
+          inputMode: 'numeric'
+        },
+        {
+          type: 'input',
+          name: 'rows',
+          label: 'Rows',
+          inputMode: 'numeric'
+        }
+      ];
+      var alwaysItems = [
+        {
+          type: 'input',
+          name: 'width',
+          label: 'Width'
+        },
+        {
+          type: 'input',
+          name: 'height',
+          label: 'Height'
+        }
+      ];
+      var appearanceItems = hasAppearanceOptions(editor) ? [
+        {
+          type: 'input',
+          name: 'cellspacing',
+          label: 'Cell spacing',
+          inputMode: 'numeric'
+        },
+        {
+          type: 'input',
+          name: 'cellpadding',
+          label: 'Cell padding',
+          inputMode: 'numeric'
+        },
+        {
+          type: 'input',
+          name: 'border',
+          label: 'Border width'
+        },
+        {
+          type: 'label',
+          label: 'Caption',
+          items: [{
+              type: 'checkbox',
+              name: 'caption',
+              label: 'Show caption'
+            }]
+        }
+      ] : [];
+      var alignmentItem = [{
+          type: 'selectbox',
+          name: 'align',
+          label: 'Alignment',
+          items: [
+            {
+              text: 'None',
+              value: ''
+            },
+            {
+              text: 'Left',
+              value: 'left'
+            },
+            {
+              text: 'Center',
+              value: 'center'
+            },
+            {
+              text: 'Right',
+              value: 'right'
+            }
+          ]
+        }];
+      var classListItem = hasClasses ? [{
+          type: 'selectbox',
+          name: 'class',
+          label: 'Class',
+          items: buildListItems(getTableClassList(editor), function (item) {
+            if (item.value) {
+              item.textStyle = function () {
+                return editor.formatter.getCssText({
+                  block: 'table',
+                  classes: [item.value]
+                });
+              };
+            }
+          })
+        }] : [];
+      return rowColCountItems.concat(alwaysItems).concat(appearanceItems).concat(alignmentItem).concat(classListItem);
+    };
+
+    var styleTDTH = function (dom, elm, name, value) {
+      if (elm.tagName === 'TD' || elm.tagName === 'TH') {
+        if (isString(name)) {
+          dom.setStyle(elm, name, value);
+        } else {
+          dom.setStyle(elm, name);
+        }
+      } else {
+        if (elm.children) {
+          for (var i = 0; i < elm.children.length; i++) {
+            styleTDTH(dom, elm.children[i], name, value);
+          }
+        }
+      }
+    };
+    var applyDataToElement = function (editor, tableElm, data) {
+      var dom = editor.dom;
+      var attrs = {};
+      var styles = {};
+      attrs.class = data.class;
+      styles.height = addSizeSuffix(data.height);
+      if (dom.getAttrib(tableElm, 'width') && !shouldStyleWithCss(editor)) {
+        attrs.width = removePxSuffix(data.width);
+      } else {
+        styles.width = addSizeSuffix(data.width);
+      }
+      if (shouldStyleWithCss(editor)) {
+        styles['border-width'] = addSizeSuffix(data.border);
+        styles['border-spacing'] = addSizeSuffix(data.cellspacing);
+      } else {
+        attrs.border = data.border;
+        attrs.cellpadding = data.cellpadding;
+        attrs.cellspacing = data.cellspacing;
+      }
+      if (shouldStyleWithCss(editor) && tableElm.children) {
+        for (var i = 0; i < tableElm.children.length; i++) {
+          styleTDTH(dom, tableElm.children[i], {
+            'border-width': addSizeSuffix(data.border),
+            'padding': addSizeSuffix(data.cellpadding)
+          });
+          if (hasAdvancedTableTab(editor)) {
+            styleTDTH(dom, tableElm.children[i], { 'border-color': data.bordercolor });
+          }
+        }
+      }
+      if (hasAdvancedTableTab(editor)) {
+        styles['background-color'] = data.backgroundcolor;
+        styles['border-color'] = data.bordercolor;
+        styles['border-style'] = data.borderstyle;
+      }
+      attrs.style = dom.serializeStyle(__assign(__assign({}, getDefaultStyles(editor)), styles));
+      dom.setAttribs(tableElm, __assign(__assign({}, getDefaultAttributes(editor)), attrs));
+    };
+    var onSubmitTableForm = function (editor, tableElm, api) {
+      var dom = editor.dom;
+      var captionElm;
+      var data = api.getData();
+      api.close();
+      if (data.class === '') {
+        delete data.class;
+      }
+      editor.undoManager.transact(function () {
+        if (!tableElm) {
+          var cols = parseInt(data.cols, 10) || 1;
+          var rows = parseInt(data.rows, 10) || 1;
+          tableElm = insert$1(editor, cols, rows);
+        }
+        applyDataToElement(editor, tableElm, data);
+        captionElm = dom.select('caption', tableElm)[0];
+        if (captionElm && !data.caption) {
+          dom.remove(captionElm);
+        }
+        if (!captionElm && data.caption) {
+          captionElm = dom.create('caption');
+          captionElm.innerHTML = !global$2.ie ? '<br data-mce-bogus="1"/>' : nbsp;
+          tableElm.insertBefore(captionElm, tableElm.firstChild);
+        }
+        if (data.align === '') {
+          unApplyAlign(editor, tableElm);
+        } else {
+          applyAlign(editor, tableElm, data.align);
+        }
+        editor.focus();
+        editor.addVisual();
+      });
+    };
+    var open$2 = function (editor, insertNewTable) {
+      var dom = editor.dom;
+      var tableElm;
+      var data = extractDataFromSettings(editor, hasAdvancedTableTab(editor));
+      if (insertNewTable === false) {
+        tableElm = dom.getParent(editor.selection.getStart(), 'table');
+        if (tableElm) {
+          data = extractDataFromTableElement(editor, tableElm, hasAdvancedTableTab(editor));
+        } else {
+          if (hasAdvancedTableTab(editor)) {
+            data.borderstyle = '';
+            data.bordercolor = '';
+            data.backgroundcolor = '';
+          }
+        }
+      } else {
+        data.cols = '1';
+        data.rows = '1';
+        if (hasAdvancedTableTab(editor)) {
+          data.borderstyle = '';
+          data.bordercolor = '';
+          data.backgroundcolor = '';
+        }
+      }
+      var hasClasses = getTableClassList(editor).length > 0;
+      if (hasClasses) {
+        if (data.class) {
+          data.class = data.class.replace(/\s*mce\-item\-table\s*/g, '');
+        }
+      }
+      var generalPanel = {
+        type: 'grid',
+        columns: 2,
+        items: getItems$2(editor, hasClasses, insertNewTable)
+      };
+      var nonAdvancedForm = function () {
+        return {
+          type: 'panel',
+          items: [generalPanel]
+        };
+      };
+      var advancedForm = function () {
+        return {
+          type: 'tabpanel',
+          tabs: [
+            {
+              title: 'General',
+              name: 'general',
+              items: [generalPanel]
+            },
+            getAdvancedTab('table')
+          ]
+        };
+      };
+      var dialogBody = hasAdvancedTableTab(editor) ? advancedForm() : nonAdvancedForm();
+      editor.windowManager.open({
+        title: 'Table Properties',
+        size: 'normal',
+        body: dialogBody,
+        onSubmit: curry(onSubmitTableForm, editor, tableElm),
+        buttons: [
+          {
+            type: 'cancel',
+            name: 'cancel',
+            text: 'Cancel'
+          },
+          {
+            type: 'submit',
+            name: 'save',
+            text: 'Save',
+            primary: true
+          }
+        ],
+        initialData: data
+      });
+    };
+
+    var each$3 = global$1.each;
+    var registerCommands = function (editor, actions, cellSelection, selections, clipboardRows) {
+      var isRoot = getIsRoot(editor);
+      var eraseTable = function () {
+        getSelectionStartCellOrCaption(editor).each(function (cellOrCaption) {
+          var tableOpt = table(cellOrCaption, isRoot);
+          tableOpt.filter(not(isRoot)).each(function (table) {
+            var cursor = Element.fromText('');
+            after(table, cursor);
+            remove$2(table);
+            if (editor.dom.isEmpty(editor.getBody())) {
+              editor.setContent('');
+              editor.selection.setCursorLocation();
+            } else {
+              var rng = editor.dom.createRng();
+              rng.setStart(cursor.dom(), 0);
+              rng.setEnd(cursor.dom(), 0);
+              editor.selection.setRng(rng);
+              editor.nodeChanged();
+            }
+          });
+        });
+      };
+      var getTableFromCell = function (cell) {
+        return table(cell, isRoot);
+      };
+      var actOnSelection = function (execute) {
+        getSelectionStartCell(editor).each(function (cell) {
+          getTableFromCell(cell).each(function (table) {
+            var targets = forMenu(selections, table, cell);
+            execute(table, targets).each(function (rng) {
+              editor.selection.setRng(rng);
+              editor.focus();
+              cellSelection.clear(table);
+              removeDataStyle(table);
+            });
+          });
+        });
+      };
+      var copyRowSelection = function (_execute) {
+        return getSelectionStartCell(editor).map(function (cell) {
+          return getTableFromCell(cell).bind(function (table) {
+            var doc = Element.fromDom(editor.getDoc());
+            var targets = forMenu(selections, table, cell);
+            var generators = cellOperations(noop, doc, Option.none());
+            return copyRows(table, targets, generators);
+          });
+        });
+      };
+      var pasteOnSelection = function (execute) {
+        clipboardRows.get().each(function (rows) {
+          var clonedRows = map(rows, function (row) {
+            return deep(row);
+          });
+          getSelectionStartCell(editor).each(function (cell) {
+            getTableFromCell(cell).each(function (table) {
+              var doc = Element.fromDom(editor.getDoc());
+              var generators = paste(doc);
+              var targets = pasteRows(selections, table, cell, clonedRows, generators);
+              execute(table, targets).each(function (rng) {
+                editor.selection.setRng(rng);
+                editor.focus();
+                cellSelection.clear(table);
+              });
+            });
+          });
+        });
+      };
+      each$3({
+        mceTableSplitCells: function () {
+          actOnSelection(actions.unmergeCells);
+        },
+        mceTableMergeCells: function () {
+          actOnSelection(actions.mergeCells);
+        },
+        mceTableInsertRowBefore: function () {
+          actOnSelection(actions.insertRowsBefore);
+        },
+        mceTableInsertRowAfter: function () {
+          actOnSelection(actions.insertRowsAfter);
+        },
+        mceTableInsertColBefore: function () {
+          actOnSelection(actions.insertColumnsBefore);
+        },
+        mceTableInsertColAfter: function () {
+          actOnSelection(actions.insertColumnsAfter);
+        },
+        mceTableDeleteCol: function () {
+          actOnSelection(actions.deleteColumn);
+        },
+        mceTableDeleteRow: function () {
+          actOnSelection(actions.deleteRow);
+        },
+        mceTableCutRow: function (_grid) {
+          copyRowSelection().each(function (selection) {
+            clipboardRows.set(selection);
+            actOnSelection(actions.deleteRow);
+          });
+        },
+        mceTableCopyRow: function (_grid) {
+          copyRowSelection().each(function (selection) {
+            clipboardRows.set(selection);
+          });
+        },
+        mceTablePasteRowBefore: function (_grid) {
+          pasteOnSelection(actions.pasteRowsBefore);
+        },
+        mceTablePasteRowAfter: function (_grid) {
+          pasteOnSelection(actions.pasteRowsAfter);
+        },
+        mceTableDelete: eraseTable
+      }, function (func, name) {
+        editor.addCommand(name, func);
+      });
+      each$3({
+        mceInsertTable: curry(open$2, editor, true),
+        mceTableProps: curry(open$2, editor, false),
+        mceTableRowProps: curry(open$1, editor),
+        mceTableCellProps: curry(open, editor)
+      }, function (func, name) {
+        editor.addCommand(name, function () {
+          func();
+        });
+      });
+    };
+
+    var only = function (element) {
+      var parent = Option.from(element.dom().documentElement).map(Element.fromDom).getOr(element);
+      return {
+        parent: constant(parent),
+        view: constant(element),
+        origin: constant(Position(0, 0))
+      };
+    };
+    var detached = function (editable, chrome) {
+      var origin = function () {
+        return absolute(chrome);
+      };
+      return {
+        parent: constant(chrome),
+        view: constant(editable),
+        origin: origin
+      };
+    };
+    var body$1 = function (editable, chrome) {
+      return {
+        parent: constant(chrome),
+        view: constant(editable),
+        origin: constant(Position(0, 0))
+      };
+    };
+    var ResizeWire = {
+      only: only,
+      detached: detached,
+      body: body$1
+    };
+
+    var Immutable = function () {
+      var fields = [];
+      for (var _i = 0; _i < arguments.length; _i++) {
+        fields[_i] = arguments[_i];
+      }
+      return function () {
+        var values = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          values[_i] = arguments[_i];
+        }
+        if (fields.length !== values.length) {
+          throw new Error('Wrong number of arguments to struct. Expected "[' + fields.length + ']", got ' + values.length + ' arguments');
+        }
+        var struct = {};
+        each(fields, function (name, i) {
+          struct[name] = constant(values[i]);
+        });
+        return struct;
+      };
+    };
+
+    var Event = function (fields) {
+      var struct = Immutable.apply(null, fields);
+      var handlers = [];
+      var bind = function (handler) {
+        if (handler === undefined) {
+          throw new Error('Event bind error: undefined handler');
+        }
+        handlers.push(handler);
+      };
+      var unbind = function (handler) {
+        handlers = filter(handlers, function (h) {
+          return h !== handler;
+        });
+      };
+      var trigger = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        var event = struct.apply(null, args);
+        each(handlers, function (handler) {
+          handler(event);
+        });
+      };
+      return {
+        bind: bind,
+        unbind: unbind,
+        trigger: trigger
+      };
+    };
+
+    var create = function (typeDefs) {
+      var registry = map$1(typeDefs, function (event) {
+        return {
+          bind: event.bind,
+          unbind: event.unbind
+        };
+      });
+      var trigger = map$1(typeDefs, function (event) {
+        return event.trigger;
+      });
+      return {
+        registry: registry,
+        trigger: trigger
+      };
+    };
+
+    var mkEvent = function (target, x, y, stop, prevent, kill, raw) {
+      return {
+        target: constant(target),
+        x: constant(x),
+        y: constant(y),
+        stop: stop,
+        prevent: prevent,
+        kill: kill,
+        raw: constant(raw)
+      };
+    };
+    var fromRawEvent = function (rawEvent) {
+      var target = Element.fromDom(rawEvent.target);
+      var stop = function () {
+        return rawEvent.stopPropagation();
+      };
+      var prevent = function () {
+        return rawEvent.preventDefault();
+      };
+      var kill = compose(prevent, stop);
+      return mkEvent(target, rawEvent.clientX, rawEvent.clientY, stop, prevent, kill, rawEvent);
+    };
+    var handle = function (filter, handler) {
+      return function (rawEvent) {
+        if (filter(rawEvent)) {
+          handler(fromRawEvent(rawEvent));
+        }
+      };
+    };
+    var binder = function (element, event, filter, handler, useCapture) {
+      var wrapped = handle(filter, handler);
+      element.dom().addEventListener(event, wrapped, useCapture);
+      return { unbind: curry(unbind, element, event, wrapped, useCapture) };
+    };
+    var bind$1 = function (element, event, filter, handler) {
+      return binder(element, event, filter, handler, false);
+    };
+    var unbind = function (element, event, handler, useCapture) {
+      element.dom().removeEventListener(event, handler, useCapture);
+    };
+
+    var filter$1 = constant(true);
+    var bind$2 = function (element, event, handler) {
+      return bind$1(element, event, filter$1, handler);
+    };
+    var fromRawEvent$1 = fromRawEvent;
+
+    var styles$1 = css('ephox-dragster');
+    var resolve$1 = styles$1.resolve;
+
+    var Blocker = function (options) {
+      var settings = __assign({ layerClass: resolve$1('blocker') }, options);
+      var div = Element.fromTag('div');
+      set(div, 'role', 'presentation');
+      setAll$1(div, {
+        position: 'fixed',
+        left: '0px',
+        top: '0px',
+        width: '100%',
+        height: '100%'
+      });
+      add$2(div, resolve$1('blocker'));
+      add$2(div, settings.layerClass);
+      var element = function () {
+        return div;
+      };
+      var destroy = function () {
+        remove$2(div);
+      };
+      return {
+        element: element,
+        destroy: destroy
+      };
+    };
+
+    var DragMode = exactly([
+      'compare',
+      'extract',
+      'mutate',
+      'sink'
+    ]);
+    var DragSink = exactly([
+      'element',
+      'start',
+      'stop',
+      'destroy'
+    ]);
+    var DragApi = exactly([
+      'forceDrop',
+      'drop',
+      'move',
+      'delayDrop'
+    ]);
+
+    var compare = function (old, nu) {
+      return Position(nu.left() - old.left(), nu.top() - old.top());
+    };
+    var extract$1 = function (event) {
+      return Option.some(Position(event.x(), event.y()));
+    };
+    var mutate = function (mutation, info) {
+      mutation.mutate(info.left(), info.top());
+    };
+    var sink = function (dragApi, settings) {
+      var blocker = Blocker(settings);
+      var mdown = bind$2(blocker.element(), 'mousedown', dragApi.forceDrop);
+      var mup = bind$2(blocker.element(), 'mouseup', dragApi.drop);
+      var mmove = bind$2(blocker.element(), 'mousemove', dragApi.move);
+      var mout = bind$2(blocker.element(), 'mouseout', dragApi.delayDrop);
+      var destroy = function () {
+        blocker.destroy();
+        mup.unbind();
+        mmove.unbind();
+        mout.unbind();
+        mdown.unbind();
+      };
+      var start = function (parent) {
+        append(parent, blocker.element());
+      };
+      var stop = function () {
+        remove$2(blocker.element());
+      };
+      return DragSink({
+        element: blocker.element,
+        start: start,
+        stop: stop,
+        destroy: destroy
+      });
+    };
+    var MouseDrag = DragMode({
+      compare: compare,
+      extract: extract$1,
+      sink: sink,
+      mutate: mutate
+    });
+
+    var last$2 = function (fn, rate) {
+      var timer = null;
+      var cancel = function () {
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+          timer = null;
+        }
+      };
+      var throttle = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+        }
+        timer = domGlobals.setTimeout(function () {
+          fn.apply(null, args);
+          timer = null;
+        }, rate);
+      };
+      return {
+        cancel: cancel,
+        throttle: throttle
+      };
+    };
+
+    function InDrag () {
+      var previous = Option.none();
+      var reset = function () {
+        previous = Option.none();
+      };
+      var update = function (mode, nu) {
+        var result = previous.map(function (old) {
+          return mode.compare(old, nu);
+        });
+        previous = Option.some(nu);
+        return result;
+      };
+      var onEvent = function (event, mode) {
+        var dataOption = mode.extract(event);
+        dataOption.each(function (data) {
+          var offset = update(mode, data);
+          offset.each(function (d) {
+            events.trigger.move(d);
+          });
+        });
+      };
+      var events = create({ move: Event(['info']) });
+      return {
+        onEvent: onEvent,
+        reset: reset,
+        events: events.registry
+      };
+    }
+
+    function NoDrag () {
+      return {
+        onEvent: noop,
+        reset: noop
+      };
+    }
+
+    function Movement () {
+      var noDragState = NoDrag();
+      var inDragState = InDrag();
+      var dragState = noDragState;
+      var on = function () {
+        dragState.reset();
+        dragState = inDragState;
+      };
+      var off = function () {
+        dragState.reset();
+        dragState = noDragState;
+      };
+      var onEvent = function (event, mode) {
+        dragState.onEvent(event, mode);
+      };
+      var isOn = function () {
+        return dragState === inDragState;
+      };
+      return {
+        on: on,
+        off: off,
+        isOn: isOn,
+        onEvent: onEvent,
+        events: inDragState.events
+      };
+    }
+
+    var setup = function (mutation, mode, settings) {
+      var active = false;
+      var events = create({
+        start: Event([]),
+        stop: Event([])
+      });
+      var movement = Movement();
+      var drop = function () {
+        sink.stop();
+        if (movement.isOn()) {
+          movement.off();
+          events.trigger.stop();
+        }
+      };
+      var throttledDrop = last$2(drop, 200);
+      var go = function (parent) {
+        sink.start(parent);
+        movement.on();
+        events.trigger.start();
+      };
+      var mousemove = function (event) {
+        throttledDrop.cancel();
+        movement.onEvent(event, mode);
+      };
+      movement.events.move.bind(function (event) {
+        mode.mutate(mutation, event.info());
+      });
+      var on = function () {
+        active = true;
+      };
+      var off = function () {
+        active = false;
+      };
+      var runIfActive = function (f) {
+        return function () {
+          var args = [];
+          for (var _i = 0; _i < arguments.length; _i++) {
+            args[_i] = arguments[_i];
+          }
+          if (active) {
+            f.apply(null, args);
+          }
+        };
+      };
+      var sink = mode.sink(DragApi({
+        forceDrop: drop,
+        drop: runIfActive(drop),
+        move: runIfActive(mousemove),
+        delayDrop: runIfActive(throttledDrop.throttle)
+      }), settings);
+      var destroy = function () {
+        sink.destroy();
+      };
+      return {
+        element: sink.element,
+        go: go,
+        on: on,
+        off: off,
+        destroy: destroy,
+        events: events.registry
+      };
+    };
+
+    var transform$1 = function (mutation, settings) {
+      if (settings === void 0) {
+        settings = {};
+      }
+      var mode = settings.mode !== undefined ? settings.mode : MouseDrag;
+      return setup(mutation, mode, settings);
+    };
+
+    var isContentEditableTrue = function (elm) {
+      return get$1(elm, 'contenteditable') === 'true';
+    };
+    var findClosestContentEditable = function (target, isRoot) {
+      return closest$1(target, '[contenteditable]', isRoot);
+    };
+
+    var Mutation = function () {
+      var events = create({
+        drag: Event([
+          'xDelta',
+          'yDelta'
+        ])
+      });
+      var mutate = function (x, y) {
+        events.trigger.drag(x, y);
+      };
+      return {
+        mutate: mutate,
+        events: events.registry
+      };
+    };
+
+    var BarMutation = function () {
+      var events = create({
+        drag: Event([
+          'xDelta',
+          'yDelta',
+          'target'
+        ])
+      });
+      var target = Option.none();
+      var delegate = Mutation();
+      delegate.events.drag.bind(function (event) {
+        target.each(function (t) {
+          events.trigger.drag(event.xDelta(), event.yDelta(), t);
+        });
+      });
+      var assign = function (t) {
+        target = Option.some(t);
+      };
+      var get = function () {
+        return target;
+      };
+      return {
+        assign: assign,
+        get: get,
+        mutate: delegate.mutate,
+        events: events.registry
+      };
+    };
+
+    var resizeBarDragging = resolve('resizer-bar-dragging');
+    var BarManager = function (wire, direction, hdirection) {
+      var mutation = BarMutation();
+      var resizing = transform$1(mutation, {});
+      var hoverTable = Option.none();
+      var getResizer = function (element, type) {
+        return Option.from(get$1(element, type));
+      };
+      mutation.events.drag.bind(function (event) {
+        getResizer(event.target(), 'data-row').each(function (_dataRow) {
+          var currentRow = getCssValue(event.target(), 'top');
+          set$1(event.target(), 'top', currentRow + event.yDelta() + 'px');
+        });
+        getResizer(event.target(), 'data-column').each(function (_dataCol) {
+          var currentCol = getCssValue(event.target(), 'left');
+          set$1(event.target(), 'left', currentCol + event.xDelta() + 'px');
+        });
+      });
+      var getDelta = function (target, dir) {
+        var newX = getCssValue(target, dir);
+        var oldX = getAttrValue(target, 'data-initial-' + dir, 0);
+        return newX - oldX;
+      };
+      resizing.events.stop.bind(function () {
+        mutation.get().each(function (target) {
+          hoverTable.each(function (table) {
+            getResizer(target, 'data-row').each(function (row) {
+              var delta = getDelta(target, 'top');
+              remove(target, 'data-initial-top');
+              events.trigger.adjustHeight(table, delta, parseInt(row, 10));
+            });
+            getResizer(target, 'data-column').each(function (column) {
+              var delta = getDelta(target, 'left');
+              remove(target, 'data-initial-left');
+              events.trigger.adjustWidth(table, delta, parseInt(column, 10));
+            });
+            refresh(wire, table, hdirection, direction);
+          });
+        });
+      });
+      var handler = function (target, dir) {
+        events.trigger.startAdjust();
+        mutation.assign(target);
+        set(target, 'data-initial-' + dir, getCssValue(target, dir));
+        add$2(target, resizeBarDragging);
+        set$1(target, 'opacity', '0.2');
+        resizing.go(wire.parent());
+      };
+      var mousedown = bind$2(wire.parent(), 'mousedown', function (event) {
+        if (isRowBar(event.target())) {
+          handler(event.target(), 'top');
+        }
+        if (isColBar(event.target())) {
+          handler(event.target(), 'left');
+        }
+      });
+      var isRoot = function (e) {
+        return eq(e, wire.view());
+      };
+      var findClosestEditableTable = function (target) {
+        return closest$1(target, 'table', isRoot).filter(function (table) {
+          return findClosestContentEditable(table, isRoot).exists(isContentEditableTrue);
+        });
+      };
+      var mouseover = bind$2(wire.view(), 'mouseover', function (event) {
+        findClosestEditableTable(event.target()).fold(function () {
+          if (inBody(event.target())) {
+            destroy(wire);
+          }
+        }, function (table) {
+          hoverTable = Option.some(table);
+          refresh(wire, table, hdirection, direction);
+        });
+      });
+      var destroy$1 = function () {
+        mousedown.unbind();
+        mouseover.unbind();
+        resizing.destroy();
+        destroy(wire);
+      };
+      var refresh$1 = function (tbl) {
+        refresh(wire, tbl, hdirection, direction);
+      };
+      var events = create({
+        adjustHeight: Event([
+          'table',
+          'delta',
+          'row'
+        ]),
+        adjustWidth: Event([
+          'table',
+          'delta',
+          'column'
+        ]),
+        startAdjust: Event([])
+      });
+      return {
+        destroy: destroy$1,
+        refresh: refresh$1,
+        on: resizing.on,
+        off: resizing.off,
+        hideBars: curry(hide, wire),
+        showBars: curry(show, wire),
+        events: events.registry
+      };
+    };
+
+    var create$1 = function (wire, vdirection) {
+      var hdirection = height;
+      var manager = BarManager(wire, vdirection, hdirection);
+      var events = create({
+        beforeResize: Event(['table']),
+        afterResize: Event(['table']),
+        startDrag: Event([])
+      });
+      manager.events.adjustHeight.bind(function (event) {
+        events.trigger.beforeResize(event.table());
+        var delta = hdirection.delta(event.delta(), event.table());
+        adjustHeight(event.table(), delta, event.row(), hdirection);
+        events.trigger.afterResize(event.table());
+      });
+      manager.events.startAdjust.bind(function (_event) {
+        events.trigger.startDrag();
+      });
+      manager.events.adjustWidth.bind(function (event) {
+        events.trigger.beforeResize(event.table());
+        var delta = vdirection.delta(event.delta(), event.table());
+        adjustWidth(event.table(), delta, event.column(), vdirection);
+        events.trigger.afterResize(event.table());
+      });
+      return {
+        on: manager.on,
+        off: manager.off,
+        hideBars: manager.hideBars,
+        showBars: manager.showBars,
+        destroy: manager.destroy,
+        events: events.registry
+      };
+    };
+    var TableResize = { create: create$1 };
+
+    var createContainer = function () {
+      var container = Element.fromTag('div');
+      setAll$1(container, {
+        position: 'static',
+        height: '0',
+        width: '0',
+        padding: '0',
+        margin: '0',
+        border: '0'
+      });
+      append(body(), container);
+      return container;
+    };
+    var get$9 = function (editor, _container) {
+      return editor.inline ? ResizeWire.body(getBody$1(editor), createContainer()) : ResizeWire.only(Element.fromDom(editor.getDoc()));
+    };
+    var remove$6 = function (editor, wire) {
+      if (editor.inline) {
+        remove$2(wire.parent());
+      }
+    };
+
+    var calculatePercentageWidth = function (element, parent) {
+      return getPixelWidth$1(element.dom()) / getPixelWidth$1(parent.dom()) * 100 + '%';
+    };
+    var enforcePercentage = function (rawTable) {
+      var table = Element.fromDom(rawTable);
+      parent(table).map(function (parent) {
+        return calculatePercentageWidth(table, parent);
+      }).each(function (tablePercentage) {
+        set$1(table, 'width', tablePercentage);
+        each(descendants$1(table, 'tr'), function (tr) {
+          each(children(tr), function (td) {
+            set$1(td, 'width', calculatePercentageWidth(td, tr));
+          });
+        });
+      });
+    };
+    var enforcePixels = function (table) {
+      set$1(Element.fromDom(table), 'width', getPixelWidth$1(table).toString() + 'px');
+    };
+
+    var getResizeHandler = function (editor) {
+      var selectionRng = Option.none();
+      var resize = Option.none();
+      var wire = Option.none();
+      var percentageBasedSizeRegex = /(\d+(\.\d+)?)%/;
+      var startW;
+      var startRawW;
+      var isTable = function (elm) {
+        return elm.nodeName === 'TABLE';
+      };
+      var getRawWidth = function (elm) {
+        var raw = editor.dom.getStyle(elm, 'width') || editor.dom.getAttrib(elm, 'width');
+        return Option.from(raw).filter(function (s) {
+          return s.length > 0;
+        });
+      };
+      var lazyResize = function () {
+        return resize;
+      };
+      var lazyWire = function () {
+        return wire.getOr(ResizeWire.only(Element.fromDom(editor.getBody())));
+      };
+      var destroy = function () {
+        resize.each(function (sz) {
+          sz.destroy();
+        });
+        wire.each(function (w) {
+          remove$6(editor, w);
+        });
+      };
+      editor.on('init', function () {
+        var direction = TableDirection(directionAt);
+        var rawWire = get$9(editor);
+        wire = Option.some(rawWire);
+        if (hasObjectResizing(editor) && hasTableResizeBars(editor)) {
+          var sz = TableResize.create(rawWire, direction);
+          sz.on();
+          sz.events.startDrag.bind(function (_event) {
+            selectionRng = Option.some(editor.selection.getRng());
+          });
+          sz.events.beforeResize.bind(function (event) {
+            var rawTable = event.table().dom();
+            fireObjectResizeStart(editor, rawTable, getPixelWidth$1(rawTable), getPixelHeight(rawTable));
+          });
+          sz.events.afterResize.bind(function (event) {
+            var table = event.table();
+            var rawTable = table.dom();
+            removeDataStyle(table);
+            selectionRng.each(function (rng) {
+              editor.selection.setRng(rng);
+              editor.focus();
+            });
+            fireObjectResized(editor, rawTable, getPixelWidth$1(rawTable), getPixelHeight(rawTable));
+            editor.undoManager.add();
+          });
+          resize = Option.some(sz);
+        }
+      });
+      editor.on('ObjectResizeStart', function (e) {
+        var targetElm = e.target;
+        if (isTable(targetElm)) {
+          var tableHasPercentage = getRawWidth(targetElm).map(function (w) {
+            return percentageBasedSizeRegex.test(w);
+          }).getOr(false);
+          if (tableHasPercentage && isPixelsForced(editor)) {
+            enforcePixels(targetElm);
+          } else if (!tableHasPercentage && isPercentagesForced(editor)) {
+            enforcePercentage(targetElm);
+          }
+          startW = e.width;
+          startRawW = getRawWidth(targetElm).getOr('');
+        }
+      });
+      editor.on('ObjectResized', function (e) {
+        var targetElm = e.target;
+        if (isTable(targetElm)) {
+          var table = targetElm;
+          if (percentageBasedSizeRegex.test(startRawW)) {
+            var percentW = parseFloat(percentageBasedSizeRegex.exec(startRawW)[1]);
+            var targetPercentW = e.width * percentW / startW;
+            editor.dom.setStyle(table, 'width', targetPercentW + '%');
+          } else {
+            var newCellSizes_1 = [];
+            global$1.each(table.rows, function (row) {
+              global$1.each(row.cells, function (cell) {
+                var width = editor.dom.getStyle(cell, 'width', true);
+                newCellSizes_1.push({
+                  cell: cell,
+                  width: width
+                });
+              });
+            });
+            global$1.each(newCellSizes_1, function (newCellSize) {
+              editor.dom.setStyle(newCellSize.cell, 'width', newCellSize.width);
+              editor.dom.setAttrib(newCellSize.cell, 'width', null);
+            });
+          }
+        }
+      });
+      editor.on('SwitchMode', function () {
+        lazyResize().each(function (resize) {
+          if (editor.mode.isReadOnly()) {
+            resize.hideBars();
+          } else {
+            resize.showBars();
+          }
+        });
+      });
+      return {
+        lazyResize: lazyResize,
+        lazyWire: lazyWire,
+        destroy: destroy
+      };
+    };
+
+    var adt$1 = Adt.generate([
+      { none: ['current'] },
+      { first: ['current'] },
+      {
+        middle: [
+          'current',
+          'target'
+        ]
+      },
+      { last: ['current'] }
+    ]);
+    var none$2 = function (current) {
+      if (current === void 0) {
+        current = undefined;
+      }
+      return adt$1.none(current);
+    };
+    var CellLocation = __assign(__assign({}, adt$1), { none: none$2 });
+
+    var detect$4 = function (current, isRoot) {
+      return table(current, isRoot).bind(function (table) {
+        var all = cells(table);
+        var index = findIndex(all, function (x) {
+          return eq(current, x);
+        });
+        return index.map(function (index) {
+          return {
+            index: index,
+            all: all
+          };
+        });
+      });
+    };
+    var next = function (current, isRoot) {
+      var detection = detect$4(current, isRoot);
+      return detection.fold(function () {
+        return CellLocation.none(current);
+      }, function (info) {
+        return info.index + 1 < info.all.length ? CellLocation.middle(current, info.all[info.index + 1]) : CellLocation.last(current);
+      });
+    };
+    var prev = function (current, isRoot) {
+      var detection = detect$4(current, isRoot);
+      return detection.fold(function () {
+        return CellLocation.none();
+      }, function (info) {
+        return info.index - 1 >= 0 ? CellLocation.middle(current, info.all[info.index - 1]) : CellLocation.first(current);
+      });
+    };
+
+    var create$2 = function (start, soffset, finish, foffset) {
+      return {
+        start: constant(start),
+        soffset: constant(soffset),
+        finish: constant(finish),
+        foffset: constant(foffset)
+      };
+    };
+    var SimRange = { create: create$2 };
+
+    var adt$2 = Adt.generate([
+      { before: ['element'] },
+      {
+        on: [
+          'element',
+          'offset'
+        ]
+      },
+      { after: ['element'] }
+    ]);
+    var cata$1 = function (subject, onBefore, onOn, onAfter) {
+      return subject.fold(onBefore, onOn, onAfter);
+    };
+    var getStart = function (situ) {
+      return situ.fold(identity, identity, identity);
+    };
+    var before$2 = adt$2.before;
+    var on = adt$2.on;
+    var after$2 = adt$2.after;
+    var Situ = {
+      before: before$2,
+      on: on,
+      after: after$2,
+      cata: cata$1,
+      getStart: getStart
+    };
+
+    var adt$3 = Adt.generate([
+      { domRange: ['rng'] },
+      {
+        relative: [
+          'startSitu',
+          'finishSitu'
+        ]
+      },
+      {
+        exact: [
+          'start',
+          'soffset',
+          'finish',
+          'foffset'
+        ]
+      }
+    ]);
+    var exactFromRange = function (simRange) {
+      return adt$3.exact(simRange.start(), simRange.soffset(), simRange.finish(), simRange.foffset());
+    };
+    var getStart$1 = function (selection) {
+      return selection.match({
+        domRange: function (rng) {
+          return Element.fromDom(rng.startContainer);
+        },
+        relative: function (startSitu, _finishSitu) {
+          return Situ.getStart(startSitu);
+        },
+        exact: function (start, _soffset, _finish, _foffset) {
+          return start;
+        }
+      });
+    };
+    var domRange = adt$3.domRange;
+    var relative = adt$3.relative;
+    var exact = adt$3.exact;
+    var getWin = function (selection) {
+      var start = getStart$1(selection);
+      return defaultView(start);
+    };
+    var range$1 = SimRange.create;
+    var Selection = {
+      domRange: domRange,
+      relative: relative,
+      exact: exact,
+      exactFromRange: exactFromRange,
+      getWin: getWin,
+      range: range$1
+    };
+
+    var selectNodeContents = function (win, element) {
+      var rng = win.document.createRange();
+      selectNodeContentsUsing(rng, element);
+      return rng;
+    };
+    var selectNodeContentsUsing = function (rng, element) {
+      return rng.selectNodeContents(element.dom());
+    };
+    var setStart = function (rng, situ) {
+      situ.fold(function (e) {
+        rng.setStartBefore(e.dom());
+      }, function (e, o) {
+        rng.setStart(e.dom(), o);
+      }, function (e) {
+        rng.setStartAfter(e.dom());
+      });
+    };
+    var setFinish = function (rng, situ) {
+      situ.fold(function (e) {
+        rng.setEndBefore(e.dom());
+      }, function (e, o) {
+        rng.setEnd(e.dom(), o);
+      }, function (e) {
+        rng.setEndAfter(e.dom());
+      });
+    };
+    var relativeToNative = function (win, startSitu, finishSitu) {
+      var range = win.document.createRange();
+      setStart(range, startSitu);
+      setFinish(range, finishSitu);
+      return range;
+    };
+    var exactToNative = function (win, start, soffset, finish, foffset) {
+      var rng = win.document.createRange();
+      rng.setStart(start.dom(), soffset);
+      rng.setEnd(finish.dom(), foffset);
+      return rng;
+    };
+    var toRect = function (rect) {
+      return {
+        left: constant(rect.left),
+        top: constant(rect.top),
+        right: constant(rect.right),
+        bottom: constant(rect.bottom),
+        width: constant(rect.width),
+        height: constant(rect.height)
+      };
+    };
+    var getFirstRect = function (rng) {
+      var rects = rng.getClientRects();
+      var rect = rects.length > 0 ? rects[0] : rng.getBoundingClientRect();
+      return rect.width > 0 || rect.height > 0 ? Option.some(rect).map(toRect) : Option.none();
+    };
+
+    var adt$4 = Adt.generate([
+      {
+        ltr: [
+          'start',
+          'soffset',
+          'finish',
+          'foffset'
+        ]
+      },
+      {
+        rtl: [
+          'start',
+          'soffset',
+          'finish',
+          'foffset'
+        ]
+      }
+    ]);
+    var fromRange = function (win, type, range) {
+      return type(Element.fromDom(range.startContainer), range.startOffset, Element.fromDom(range.endContainer), range.endOffset);
+    };
+    var getRanges = function (win, selection) {
+      return selection.match({
+        domRange: function (rng) {
+          return {
+            ltr: constant(rng),
+            rtl: Option.none
+          };
+        },
+        relative: function (startSitu, finishSitu) {
+          return {
+            ltr: cached(function () {
+              return relativeToNative(win, startSitu, finishSitu);
+            }),
+            rtl: cached(function () {
+              return Option.some(relativeToNative(win, finishSitu, startSitu));
+            })
+          };
+        },
+        exact: function (start, soffset, finish, foffset) {
+          return {
+            ltr: cached(function () {
+              return exactToNative(win, start, soffset, finish, foffset);
+            }),
+            rtl: cached(function () {
+              return Option.some(exactToNative(win, finish, foffset, start, soffset));
+            })
+          };
+        }
+      });
+    };
+    var doDiagnose = function (win, ranges) {
+      var rng = ranges.ltr();
+      if (rng.collapsed) {
+        var reversed = ranges.rtl().filter(function (rev) {
+          return rev.collapsed === false;
+        });
+        return reversed.map(function (rev) {
+          return adt$4.rtl(Element.fromDom(rev.endContainer), rev.endOffset, Element.fromDom(rev.startContainer), rev.startOffset);
+        }).getOrThunk(function () {
+          return fromRange(win, adt$4.ltr, rng);
+        });
+      } else {
+        return fromRange(win, adt$4.ltr, rng);
+      }
+    };
+    var diagnose = function (win, selection) {
+      var ranges = getRanges(win, selection);
+      return doDiagnose(win, ranges);
+    };
+    var asLtrRange = function (win, selection) {
+      var diagnosis = diagnose(win, selection);
+      return diagnosis.match({
+        ltr: function (start, soffset, finish, foffset) {
+          var rng = win.document.createRange();
+          rng.setStart(start.dom(), soffset);
+          rng.setEnd(finish.dom(), foffset);
+          return rng;
+        },
+        rtl: function (start, soffset, finish, foffset) {
+          var rng = win.document.createRange();
+          rng.setStart(finish.dom(), foffset);
+          rng.setEnd(start.dom(), soffset);
+          return rng;
+        }
+      });
+    };
+    var ltr$2 = adt$4.ltr;
+    var rtl$2 = adt$4.rtl;
+
+    var searchForPoint = function (rectForOffset, x, y, maxX, length) {
+      if (length === 0) {
+        return 0;
+      } else if (x === maxX) {
+        return length - 1;
+      }
+      var xDelta = maxX;
+      for (var i = 1; i < length; i++) {
+        var rect = rectForOffset(i);
+        var curDeltaX = Math.abs(x - rect.left);
+        if (y <= rect.bottom) {
+          if (y < rect.top || curDeltaX > xDelta) {
+            return i - 1;
+          } else {
+            xDelta = curDeltaX;
+          }
+        }
+      }
+      return 0;
+    };
+    var inRect = function (rect, x, y) {
+      return x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;
+    };
+
+    var locateOffset = function (doc, textnode, x, y, rect) {
+      var rangeForOffset = function (o) {
+        var r = doc.dom().createRange();
+        r.setStart(textnode.dom(), o);
+        r.collapse(true);
+        return r;
+      };
+      var rectForOffset = function (o) {
+        var r = rangeForOffset(o);
+        return r.getBoundingClientRect();
+      };
+      var length = get$3(textnode).length;
+      var offset = searchForPoint(rectForOffset, x, y, rect.right, length);
+      return rangeForOffset(offset);
+    };
+    var locate = function (doc, node, x, y) {
+      var r = doc.dom().createRange();
+      r.selectNode(node.dom());
+      var rects = r.getClientRects();
+      var foundRect = findMap(rects, function (rect) {
+        return inRect(rect, x, y) ? Option.some(rect) : Option.none();
+      });
+      return foundRect.map(function (rect) {
+        return locateOffset(doc, node, x, y, rect);
+      });
+    };
+
+    var searchInChildren = function (doc, node, x, y) {
+      var r = doc.dom().createRange();
+      var nodes = children(node);
+      return findMap(nodes, function (n) {
+        r.selectNode(n.dom());
+        return inRect(r.getBoundingClientRect(), x, y) ? locateNode(doc, n, x, y) : Option.none();
+      });
+    };
+    var locateNode = function (doc, node, x, y) {
+      return isText(node) ? locate(doc, node, x, y) : searchInChildren(doc, node, x, y);
+    };
+    var locate$1 = function (doc, node, x, y) {
+      var r = doc.dom().createRange();
+      r.selectNode(node.dom());
+      var rect = r.getBoundingClientRect();
+      var boundedX = Math.max(rect.left, Math.min(rect.right, x));
+      var boundedY = Math.max(rect.top, Math.min(rect.bottom, y));
+      return locateNode(doc, node, boundedX, boundedY);
+    };
+
+    var COLLAPSE_TO_LEFT = true;
+    var COLLAPSE_TO_RIGHT = false;
+    var getCollapseDirection = function (rect, x) {
+      return x - rect.left < rect.right - x ? COLLAPSE_TO_LEFT : COLLAPSE_TO_RIGHT;
+    };
+    var createCollapsedNode = function (doc, target, collapseDirection) {
+      var r = doc.dom().createRange();
+      r.selectNode(target.dom());
+      r.collapse(collapseDirection);
+      return r;
+    };
+    var locateInElement = function (doc, node, x) {
+      var cursorRange = doc.dom().createRange();
+      cursorRange.selectNode(node.dom());
+      var rect = cursorRange.getBoundingClientRect();
+      var collapseDirection = getCollapseDirection(rect, x);
+      var f = collapseDirection === COLLAPSE_TO_LEFT ? first : last$1;
+      return f(node).map(function (target) {
+        return createCollapsedNode(doc, target, collapseDirection);
+      });
+    };
+    var locateInEmpty = function (doc, node, x) {
+      var rect = node.dom().getBoundingClientRect();
+      var collapseDirection = getCollapseDirection(rect, x);
+      return Option.some(createCollapsedNode(doc, node, collapseDirection));
+    };
+    var search = function (doc, node, x) {
+      var f = children(node).length === 0 ? locateInEmpty : locateInElement;
+      return f(doc, node, x);
+    };
+
+    var caretPositionFromPoint = function (doc, x, y) {
+      return Option.from(doc.dom().caretPositionFromPoint(x, y)).bind(function (pos) {
+        if (pos.offsetNode === null) {
+          return Option.none();
+        }
+        var r = doc.dom().createRange();
+        r.setStart(pos.offsetNode, pos.offset);
+        r.collapse();
+        return Option.some(r);
+      });
+    };
+    var caretRangeFromPoint = function (doc, x, y) {
+      return Option.from(doc.dom().caretRangeFromPoint(x, y));
+    };
+    var searchTextNodes = function (doc, node, x, y) {
+      var r = doc.dom().createRange();
+      r.selectNode(node.dom());
+      var rect = r.getBoundingClientRect();
+      var boundedX = Math.max(rect.left, Math.min(rect.right, x));
+      var boundedY = Math.max(rect.top, Math.min(rect.bottom, y));
+      return locate$1(doc, node, boundedX, boundedY);
+    };
+    var searchFromPoint = function (doc, x, y) {
+      return Element.fromPoint(doc, x, y).bind(function (elem) {
+        var fallback = function () {
+          return search(doc, elem, x);
+        };
+        return children(elem).length === 0 ? fallback() : searchTextNodes(doc, elem, x, y).orThunk(fallback);
+      });
+    };
+    var availableSearch = document.caretPositionFromPoint ? caretPositionFromPoint : document.caretRangeFromPoint ? caretRangeFromPoint : searchFromPoint;
+    var fromPoint$1 = function (win, x, y) {
+      var doc = Element.fromDom(win.document);
+      return availableSearch(doc, x, y).map(function (rng) {
+        return SimRange.create(Element.fromDom(rng.startContainer), rng.startOffset, Element.fromDom(rng.endContainer), rng.endOffset);
+      });
+    };
+
+    var beforeSpecial = function (element, offset) {
+      var name$1 = name(element);
+      if ('input' === name$1) {
+        return Situ.after(element);
+      } else if (!contains([
+          'br',
+          'img'
+        ], name$1)) {
+        return Situ.on(element, offset);
+      } else {
+        return offset === 0 ? Situ.before(element) : Situ.after(element);
+      }
+    };
+    var preprocessRelative = function (startSitu, finishSitu) {
+      var start = startSitu.fold(Situ.before, beforeSpecial, Situ.after);
+      var finish = finishSitu.fold(Situ.before, beforeSpecial, Situ.after);
+      return Selection.relative(start, finish);
+    };
+    var preprocessExact = function (start, soffset, finish, foffset) {
+      var startSitu = beforeSpecial(start, soffset);
+      var finishSitu = beforeSpecial(finish, foffset);
+      return Selection.relative(startSitu, finishSitu);
+    };
+    var preprocess = function (selection) {
+      return selection.match({
+        domRange: function (rng) {
+          var start = Element.fromDom(rng.startContainer);
+          var finish = Element.fromDom(rng.endContainer);
+          return preprocessExact(start, rng.startOffset, finish, rng.endOffset);
+        },
+        relative: preprocessRelative,
+        exact: preprocessExact
+      });
+    };
+
+    var makeRange = function (start, soffset, finish, foffset) {
+      var doc = owner(start);
+      var rng = doc.dom().createRange();
+      rng.setStart(start.dom(), soffset);
+      rng.setEnd(finish.dom(), foffset);
+      return rng;
+    };
+    var after$3 = function (start, soffset, finish, foffset) {
+      var r = makeRange(start, soffset, finish, foffset);
+      var same = eq(start, finish) && soffset === foffset;
+      return r.collapsed && !same;
+    };
+
+    var doSetNativeRange = function (win, rng) {
+      Option.from(win.getSelection()).each(function (selection) {
+        selection.removeAllRanges();
+        selection.addRange(rng);
+      });
+    };
+    var doSetRange = function (win, start, soffset, finish, foffset) {
+      var rng = exactToNative(win, start, soffset, finish, foffset);
+      doSetNativeRange(win, rng);
+    };
+    var setLegacyRtlRange = function (win, selection, start, soffset, finish, foffset) {
+      selection.collapse(start.dom(), soffset);
+      selection.extend(finish.dom(), foffset);
+    };
+    var setRangeFromRelative = function (win, relative) {
+      return diagnose(win, relative).match({
+        ltr: function (start, soffset, finish, foffset) {
+          doSetRange(win, start, soffset, finish, foffset);
+        },
+        rtl: function (start, soffset, finish, foffset) {
+          var selection = win.getSelection();
+          if (selection.setBaseAndExtent) {
+            selection.setBaseAndExtent(start.dom(), soffset, finish.dom(), foffset);
+          } else if (selection.extend) {
+            try {
+              setLegacyRtlRange(win, selection, start, soffset, finish, foffset);
+            } catch (e) {
+              doSetRange(win, finish, foffset, start, soffset);
+            }
+          } else {
+            doSetRange(win, finish, foffset, start, soffset);
+          }
+        }
+      });
+    };
+    var setExact = function (win, start, soffset, finish, foffset) {
+      var relative = preprocessExact(start, soffset, finish, foffset);
+      setRangeFromRelative(win, relative);
+    };
+    var setRelative = function (win, startSitu, finishSitu) {
+      var relative = preprocessRelative(startSitu, finishSitu);
+      setRangeFromRelative(win, relative);
+    };
+    var toNative = function (selection) {
+      var win = Selection.getWin(selection).dom();
+      var getDomRange = function (start, soffset, finish, foffset) {
+        return exactToNative(win, start, soffset, finish, foffset);
+      };
+      var filtered = preprocess(selection);
+      return diagnose(win, filtered).match({
+        ltr: getDomRange,
+        rtl: getDomRange
+      });
+    };
+    var readRange = function (selection) {
+      if (selection.rangeCount > 0) {
+        var firstRng = selection.getRangeAt(0);
+        var lastRng = selection.getRangeAt(selection.rangeCount - 1);
+        return Option.some(SimRange.create(Element.fromDom(firstRng.startContainer), firstRng.startOffset, Element.fromDom(lastRng.endContainer), lastRng.endOffset));
+      } else {
+        return Option.none();
+      }
+    };
+    var doGetExact = function (selection) {
+      var anchor = Element.fromDom(selection.anchorNode);
+      var focus = Element.fromDom(selection.focusNode);
+      return after$3(anchor, selection.anchorOffset, focus, selection.focusOffset) ? Option.some(SimRange.create(anchor, selection.anchorOffset, focus, selection.focusOffset)) : readRange(selection);
+    };
+    var setToElement = function (win, element) {
+      var rng = selectNodeContents(win, element);
+      doSetNativeRange(win, rng);
+    };
+    var getExact = function (win) {
+      return Option.from(win.getSelection()).filter(function (sel) {
+        return sel.rangeCount > 0;
+      }).bind(doGetExact);
+    };
+    var get$a = function (win) {
+      return getExact(win).map(function (range) {
+        return Selection.exact(range.start(), range.soffset(), range.finish(), range.foffset());
+      });
+    };
+    var getFirstRect$1 = function (win, selection) {
+      var rng = asLtrRange(win, selection);
+      return getFirstRect(rng);
+    };
+    var getAtPoint = function (win, x, y) {
+      return fromPoint$1(win, x, y);
+    };
+    var clear = function (win) {
+      var selection = win.getSelection();
+      selection.removeAllRanges();
+    };
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.VK');
+
+    var forward = function (editor, isRoot, cell, lazyWire) {
+      return go(editor, isRoot, next(cell), lazyWire);
+    };
+    var backward = function (editor, isRoot, cell, lazyWire) {
+      return go(editor, isRoot, prev(cell), lazyWire);
+    };
+    var getCellFirstCursorPosition = function (editor, cell) {
+      var selection = Selection.exact(cell, 0, cell, 0);
+      return toNative(selection);
+    };
+    var getNewRowCursorPosition = function (editor, table) {
+      var rows = descendants$1(table, 'tr');
+      return last(rows).bind(function (last) {
+        return descendant$1(last, 'td,th').map(function (first) {
+          return getCellFirstCursorPosition(editor, first);
+        });
+      });
+    };
+    var go = function (editor, isRoot, cell, actions, _lazyWire) {
+      return cell.fold(Option.none, Option.none, function (current, next) {
+        return first(next).map(function (cell) {
+          return getCellFirstCursorPosition(editor, cell);
+        });
+      }, function (current) {
+        return table(current, isRoot).bind(function (table) {
+          var targets = noMenu(current);
+          editor.undoManager.transact(function () {
+            actions.insertRowsAfter(table, targets);
+          });
+          return getNewRowCursorPosition(editor, table);
+        });
+      });
+    };
+    var rootElements = [
+      'table',
+      'li',
+      'dl'
+    ];
+    var handle$1 = function (event, editor, actions, lazyWire) {
+      if (event.keyCode === global$3.TAB) {
+        var body_1 = getBody$1(editor);
+        var isRoot_1 = function (element) {
+          var name$1 = name(element);
+          return eq(element, body_1) || contains(rootElements, name$1);
+        };
+        var rng = editor.selection.getRng();
+        if (rng.collapsed) {
+          var start = Element.fromDom(rng.startContainer);
+          cell(start, isRoot_1).each(function (cell) {
+            event.preventDefault();
+            var navigation = event.shiftKey ? backward : forward;
+            var rng = navigation(editor, isRoot_1, cell, actions, lazyWire);
+            rng.each(function (range) {
+              editor.selection.setRng(range);
+            });
+          });
+        }
+      }
+    };
+
+    var create$3 = function (selection, kill) {
+      return {
+        selection: constant(selection),
+        kill: constant(kill)
+      };
+    };
+    var Response = { create: create$3 };
+
+    var create$4 = function (start, soffset, finish, foffset) {
+      return {
+        start: constant(Situ.on(start, soffset)),
+        finish: constant(Situ.on(finish, foffset))
+      };
+    };
+    var Situs = { create: create$4 };
+
+    var convertToRange = function (win, selection) {
+      var rng = asLtrRange(win, selection);
+      return SimRange.create(Element.fromDom(rng.startContainer), rng.startOffset, Element.fromDom(rng.endContainer), rng.endOffset);
+    };
+    var makeSitus = Situs.create;
+
+    var sync = function (container, isRoot, start, soffset, finish, foffset, selectRange) {
+      if (!(eq(start, finish) && soffset === foffset)) {
+        return closest$1(start, 'td,th', isRoot).bind(function (s) {
+          return closest$1(finish, 'td,th', isRoot).bind(function (f) {
+            return detect$5(container, isRoot, s, f, selectRange);
+          });
+        });
+      } else {
+        return Option.none();
+      }
+    };
+    var detect$5 = function (container, isRoot, start, finish, selectRange) {
+      if (!eq(start, finish)) {
+        return identify(start, finish, isRoot).bind(function (cellSel) {
+          var boxes = cellSel.boxes.getOr([]);
+          if (boxes.length > 0) {
+            selectRange(container, boxes, cellSel.start, cellSel.finish);
+            return Option.some(Response.create(Option.some(makeSitus(start, 0, start, getEnd(start))), true));
+          } else {
+            return Option.none();
+          }
+        });
+      } else {
+        return Option.none();
+      }
+    };
+    var update = function (rows, columns, container, selected, annotations) {
+      var updateSelection = function (newSels) {
+        annotations.clearBeforeUpdate(container);
+        annotations.selectRange(container, newSels.boxes, newSels.start, newSels.finish);
+        return newSels.boxes;
+      };
+      return shiftSelection(selected, rows, columns, annotations.firstSelectedSelector, annotations.lastSelectedSelector).map(updateSelection);
+    };
+
+    var traverse = function (item, mode) {
+      return {
+        item: constant(item),
+        mode: constant(mode)
+      };
+    };
+    var backtrack = function (universe, item, _direction, transition) {
+      if (transition === void 0) {
+        transition = sidestep;
+      }
+      return universe.property().parent(item).map(function (p) {
+        return traverse(p, transition);
+      });
+    };
+    var sidestep = function (universe, item, direction, transition) {
+      if (transition === void 0) {
+        transition = advance;
+      }
+      return direction.sibling(universe, item).map(function (p) {
+        return traverse(p, transition);
+      });
+    };
+    var advance = function (universe, item, direction, transition) {
+      if (transition === void 0) {
+        transition = advance;
+      }
+      var children = universe.property().children(item);
+      var result = direction.first(children);
+      return result.map(function (r) {
+        return traverse(r, transition);
+      });
+    };
+    var successors = [
+      {
+        current: backtrack,
+        next: sidestep,
+        fallback: Option.none()
+      },
+      {
+        current: sidestep,
+        next: advance,
+        fallback: Option.some(backtrack)
+      },
+      {
+        current: advance,
+        next: advance,
+        fallback: Option.some(sidestep)
+      }
+    ];
+    var go$1 = function (universe, item, mode, direction, rules) {
+      if (rules === void 0) {
+        rules = successors;
+      }
+      var ruleOpt = find(rules, function (succ) {
+        return succ.current === mode;
+      });
+      return ruleOpt.bind(function (rule) {
+        return rule.current(universe, item, direction, rule.next).orThunk(function () {
+          return rule.fallback.bind(function (fb) {
+            return go$1(universe, item, fb, direction);
+          });
+        });
+      });
+    };
+
+    var left = function () {
+      var sibling = function (universe, item) {
+        return universe.query().prevSibling(item);
+      };
+      var first = function (children) {
+        return children.length > 0 ? Option.some(children[children.length - 1]) : Option.none();
+      };
+      return {
+        sibling: sibling,
+        first: first
+      };
+    };
+    var right = function () {
+      var sibling = function (universe, item) {
+        return universe.query().nextSibling(item);
+      };
+      var first = function (children) {
+        return children.length > 0 ? Option.some(children[0]) : Option.none();
+      };
+      return {
+        sibling: sibling,
+        first: first
+      };
+    };
+    var Walkers = {
+      left: left,
+      right: right
+    };
+
+    var hone = function (universe, item, predicate, mode, direction, isRoot) {
+      var next = go$1(universe, item, mode, direction);
+      return next.bind(function (n) {
+        if (isRoot(n.item())) {
+          return Option.none();
+        } else {
+          return predicate(n.item()) ? Option.some(n.item()) : hone(universe, n.item(), predicate, n.mode(), direction, isRoot);
+        }
+      });
+    };
+    var left$1 = function (universe, item, predicate, isRoot) {
+      return hone(universe, item, predicate, sidestep, Walkers.left(), isRoot);
+    };
+    var right$1 = function (universe, item, predicate, isRoot) {
+      return hone(universe, item, predicate, sidestep, Walkers.right(), isRoot);
+    };
+
+    var isLeaf = function (universe) {
+      return function (element) {
+        return universe.property().children(element).length === 0;
+      };
+    };
+    var before$3 = function (universe, item, isRoot) {
+      return seekLeft(universe, item, isLeaf(universe), isRoot);
+    };
+    var after$4 = function (universe, item, isRoot) {
+      return seekRight(universe, item, isLeaf(universe), isRoot);
+    };
+    var seekLeft = left$1;
+    var seekRight = right$1;
+
+    var universe$3 = DomUniverse();
+    var before$4 = function (element, isRoot) {
+      return before$3(universe$3, element, isRoot);
+    };
+    var after$5 = function (element, isRoot) {
+      return after$4(universe$3, element, isRoot);
+    };
+    var seekLeft$1 = function (element, predicate, isRoot) {
+      return seekLeft(universe$3, element, predicate, isRoot);
+    };
+    var seekRight$1 = function (element, predicate, isRoot) {
+      return seekRight(universe$3, element, predicate, isRoot);
+    };
+
+    var ancestor$2 = function (scope, predicate, isRoot) {
+      return ancestor(scope, predicate, isRoot).isSome();
+    };
+
+    var adt$5 = Adt.generate([
+      { none: ['message'] },
+      { success: [] },
+      { failedUp: ['cell'] },
+      { failedDown: ['cell'] }
+    ]);
+    var isOverlapping = function (bridge, before, after) {
+      var beforeBounds = bridge.getRect(before);
+      var afterBounds = bridge.getRect(after);
+      return afterBounds.right > beforeBounds.left && afterBounds.left < beforeBounds.right;
+    };
+    var isRow = function (elem) {
+      return closest$1(elem, 'tr');
+    };
+    var verify = function (bridge, before, beforeOffset, after, afterOffset, failure, isRoot) {
+      return closest$1(after, 'td,th', isRoot).bind(function (afterCell) {
+        return closest$1(before, 'td,th', isRoot).map(function (beforeCell) {
+          if (!eq(afterCell, beforeCell)) {
+            return sharedOne$1(isRow, [
+              afterCell,
+              beforeCell
+            ]).fold(function () {
+              return isOverlapping(bridge, beforeCell, afterCell) ? adt$5.success() : failure(beforeCell);
+            }, function (_sharedRow) {
+              return failure(beforeCell);
+            });
+          } else {
+            return eq(after, afterCell) && getEnd(afterCell) === afterOffset ? failure(beforeCell) : adt$5.none('in same cell');
+          }
+        });
+      }).getOr(adt$5.none('default'));
+    };
+    var cata$2 = function (subject, onNone, onSuccess, onFailedUp, onFailedDown) {
+      return subject.fold(onNone, onSuccess, onFailedUp, onFailedDown);
+    };
+    var BeforeAfter = __assign(__assign({}, adt$5), {
+      verify: verify,
+      cata: cata$2
+    });
+
+    var inParent = function (parent, children, element, index) {
+      return {
+        parent: constant(parent),
+        children: constant(children),
+        element: constant(element),
+        index: constant(index)
+      };
+    };
+    var indexInParent = function (element) {
+      return parent(element).bind(function (parent) {
+        var children$1 = children(parent);
+        return indexOf(children$1, element).map(function (index) {
+          return inParent(parent, children$1, element, index);
+        });
+      });
+    };
+    var indexOf = function (elements, element) {
+      return findIndex(elements, curry(eq, element));
+    };
+
+    var isBr = function (elem) {
+      return name(elem) === 'br';
+    };
+    var gatherer = function (cand, gather, isRoot) {
+      return gather(cand, isRoot).bind(function (target) {
+        return isText(target) && get$3(target).trim().length === 0 ? gatherer(target, gather, isRoot) : Option.some(target);
+      });
+    };
+    var handleBr = function (isRoot, element, direction) {
+      return direction.traverse(element).orThunk(function () {
+        return gatherer(element, direction.gather, isRoot);
+      }).map(direction.relative);
+    };
+    var findBr = function (element, offset) {
+      return child(element, offset).filter(isBr).orThunk(function () {
+        return child(element, offset - 1).filter(isBr);
+      });
+    };
+    var handleParent = function (isRoot, element, offset, direction) {
+      return findBr(element, offset).bind(function (br) {
+        return direction.traverse(br).fold(function () {
+          return gatherer(br, direction.gather, isRoot).map(direction.relative);
+        }, function (adjacent) {
+          return indexInParent(adjacent).map(function (info) {
+            return Situ.on(info.parent(), info.index());
+          });
+        });
+      });
+    };
+    var tryBr = function (isRoot, element, offset, direction) {
+      var target = isBr(element) ? handleBr(isRoot, element, direction) : handleParent(isRoot, element, offset, direction);
+      return target.map(function (tgt) {
+        return {
+          start: constant(tgt),
+          finish: constant(tgt)
+        };
+      });
+    };
+    var process = function (analysis) {
+      return BeforeAfter.cata(analysis, function (_message) {
+        return Option.none();
+      }, function () {
+        return Option.none();
+      }, function (cell) {
+        return Option.some(point(cell, 0));
+      }, function (cell) {
+        return Option.some(point(cell, getEnd(cell)));
+      });
+    };
+
+    var moveDown = function (caret, amount) {
+      return {
+        left: caret.left,
+        top: caret.top + amount,
+        right: caret.right,
+        bottom: caret.bottom + amount
+      };
+    };
+    var moveUp = function (caret, amount) {
+      return {
+        left: caret.left,
+        top: caret.top - amount,
+        right: caret.right,
+        bottom: caret.bottom - amount
+      };
+    };
+    var translate = function (caret, xDelta, yDelta) {
+      return {
+        left: caret.left + xDelta,
+        top: caret.top + yDelta,
+        right: caret.right + xDelta,
+        bottom: caret.bottom + yDelta
+      };
+    };
+    var getTop$1 = function (caret) {
+      return caret.top;
+    };
+    var getBottom = function (caret) {
+      return caret.bottom;
+    };
+
+    var getPartialBox = function (bridge, element, offset) {
+      if (offset >= 0 && offset < getEnd(element)) {
+        return bridge.getRangedRect(element, offset, element, offset + 1);
+      } else if (offset > 0) {
+        return bridge.getRangedRect(element, offset - 1, element, offset);
+      }
+      return Option.none();
+    };
+    var toCaret = function (rect) {
+      return {
+        left: rect.left,
+        top: rect.top,
+        right: rect.right,
+        bottom: rect.bottom
+      };
+    };
+    var getElemBox = function (bridge, element) {
+      return Option.some(bridge.getRect(element));
+    };
+    var getBoxAt = function (bridge, element, offset) {
+      if (isElement(element)) {
+        return getElemBox(bridge, element).map(toCaret);
+      } else if (isText(element)) {
+        return getPartialBox(bridge, element, offset).map(toCaret);
+      } else {
+        return Option.none();
+      }
+    };
+    var getEntireBox = function (bridge, element) {
+      if (isElement(element)) {
+        return getElemBox(bridge, element).map(toCaret);
+      } else if (isText(element)) {
+        return bridge.getRangedRect(element, 0, element, getEnd(element)).map(toCaret);
+      } else {
+        return Option.none();
+      }
+    };
+
+    var JUMP_SIZE = 5;
+    var NUM_RETRIES = 100;
+    var adt$6 = Adt.generate([
+      { none: [] },
+      { retry: ['caret'] }
+    ]);
+    var isOutside = function (caret, box) {
+      return caret.left < box.left || Math.abs(box.right - caret.left) < 1 || caret.left > box.right;
+    };
+    var inOutsideBlock = function (bridge, element, caret) {
+      return closest(element, isBlock$1).fold(constant(false), function (cell) {
+        return getEntireBox(bridge, cell).exists(function (box) {
+          return isOutside(caret, box);
+        });
+      });
+    };
+    var adjustDown = function (bridge, element, guessBox, original, caret) {
+      var lowerCaret = moveDown(caret, JUMP_SIZE);
+      if (Math.abs(guessBox.bottom - original.bottom) < 1) {
+        return adt$6.retry(lowerCaret);
+      } else if (guessBox.top > caret.bottom) {
+        return adt$6.retry(lowerCaret);
+      } else if (guessBox.top === caret.bottom) {
+        return adt$6.retry(moveDown(caret, 1));
+      } else {
+        return inOutsideBlock(bridge, element, caret) ? adt$6.retry(translate(lowerCaret, JUMP_SIZE, 0)) : adt$6.none();
+      }
+    };
+    var adjustUp = function (bridge, element, guessBox, original, caret) {
+      var higherCaret = moveUp(caret, JUMP_SIZE);
+      if (Math.abs(guessBox.top - original.top) < 1) {
+        return adt$6.retry(higherCaret);
+      } else if (guessBox.bottom < caret.top) {
+        return adt$6.retry(higherCaret);
+      } else if (guessBox.bottom === caret.top) {
+        return adt$6.retry(moveUp(caret, 1));
+      } else {
+        return inOutsideBlock(bridge, element, caret) ? adt$6.retry(translate(higherCaret, JUMP_SIZE, 0)) : adt$6.none();
+      }
+    };
+    var upMovement = {
+      point: getTop$1,
+      adjuster: adjustUp,
+      move: moveUp,
+      gather: before$4
+    };
+    var downMovement = {
+      point: getBottom,
+      adjuster: adjustDown,
+      move: moveDown,
+      gather: after$5
+    };
+    var isAtTable = function (bridge, x, y) {
+      return bridge.elementFromPoint(x, y).filter(function (elm) {
+        return name(elm) === 'table';
+      }).isSome();
+    };
+    var adjustForTable = function (bridge, movement, original, caret, numRetries) {
+      return adjustTil(bridge, movement, original, movement.move(caret, JUMP_SIZE), numRetries);
+    };
+    var adjustTil = function (bridge, movement, original, caret, numRetries) {
+      if (numRetries === 0) {
+        return Option.some(caret);
+      }
+      if (isAtTable(bridge, caret.left, movement.point(caret))) {
+        return adjustForTable(bridge, movement, original, caret, numRetries - 1);
+      }
+      return bridge.situsFromPoint(caret.left, movement.point(caret)).bind(function (guess) {
+        return guess.start().fold(Option.none, function (element) {
+          return getEntireBox(bridge, element).bind(function (guessBox) {
+            return movement.adjuster(bridge, element, guessBox, original, caret).fold(Option.none, function (newCaret) {
+              return adjustTil(bridge, movement, original, newCaret, numRetries - 1);
+            });
+          }).orThunk(function () {
+            return Option.some(caret);
+          });
+        }, Option.none);
+      });
+    };
+    var ieTryDown = function (bridge, caret) {
+      return bridge.situsFromPoint(caret.left, caret.bottom + JUMP_SIZE);
+    };
+    var ieTryUp = function (bridge, caret) {
+      return bridge.situsFromPoint(caret.left, caret.top - JUMP_SIZE);
+    };
+    var checkScroll = function (movement, adjusted, bridge) {
+      if (movement.point(adjusted) > bridge.getInnerHeight()) {
+        return Option.some(movement.point(adjusted) - bridge.getInnerHeight());
+      } else if (movement.point(adjusted) < 0) {
+        return Option.some(-movement.point(adjusted));
+      } else {
+        return Option.none();
+      }
+    };
+    var retry = function (movement, bridge, caret) {
+      var moved = movement.move(caret, JUMP_SIZE);
+      var adjusted = adjustTil(bridge, movement, caret, moved, NUM_RETRIES).getOr(moved);
+      return checkScroll(movement, adjusted, bridge).fold(function () {
+        return bridge.situsFromPoint(adjusted.left, movement.point(adjusted));
+      }, function (delta) {
+        bridge.scrollBy(0, delta);
+        return bridge.situsFromPoint(adjusted.left, movement.point(adjusted) - delta);
+      });
+    };
+    var Retries = {
+      tryUp: curry(retry, upMovement),
+      tryDown: curry(retry, downMovement),
+      ieTryUp: ieTryUp,
+      ieTryDown: ieTryDown,
+      getJumpSize: constant(JUMP_SIZE)
+    };
+
+    var MAX_RETRIES = 20;
+    var findSpot = function (bridge, isRoot, direction) {
+      return bridge.getSelection().bind(function (sel) {
+        return tryBr(isRoot, sel.finish(), sel.foffset(), direction).fold(function () {
+          return Option.some(point(sel.finish(), sel.foffset()));
+        }, function (brNeighbour) {
+          var range = bridge.fromSitus(brNeighbour);
+          var analysis = BeforeAfter.verify(bridge, sel.finish(), sel.foffset(), range.finish(), range.foffset(), direction.failure, isRoot);
+          return process(analysis);
+        });
+      });
+    };
+    var scan$1 = function (bridge, isRoot, element, offset, direction, numRetries) {
+      if (numRetries === 0) {
+        return Option.none();
+      }
+      return tryCursor(bridge, isRoot, element, offset, direction).bind(function (situs) {
+        var range = bridge.fromSitus(situs);
+        var analysis = BeforeAfter.verify(bridge, element, offset, range.finish(), range.foffset(), direction.failure, isRoot);
+        return BeforeAfter.cata(analysis, function () {
+          return Option.none();
+        }, function () {
+          return Option.some(situs);
+        }, function (cell) {
+          if (eq(element, cell) && offset === 0) {
+            return tryAgain(bridge, element, offset, moveUp, direction);
+          } else {
+            return scan$1(bridge, isRoot, cell, 0, direction, numRetries - 1);
+          }
+        }, function (cell) {
+          if (eq(element, cell) && offset === getEnd(cell)) {
+            return tryAgain(bridge, element, offset, moveDown, direction);
+          } else {
+            return scan$1(bridge, isRoot, cell, getEnd(cell), direction, numRetries - 1);
+          }
+        });
+      });
+    };
+    var tryAgain = function (bridge, element, offset, move, direction) {
+      return getBoxAt(bridge, element, offset).bind(function (box) {
+        return tryAt(bridge, direction, move(box, Retries.getJumpSize()));
+      });
+    };
+    var tryAt = function (bridge, direction, box) {
+      var browser = detect$3().browser;
+      if (browser.isChrome() || browser.isSafari() || browser.isFirefox() || browser.isEdge()) {
+        return direction.otherRetry(bridge, box);
+      } else if (browser.isIE()) {
+        return direction.ieRetry(bridge, box);
+      } else {
+        return Option.none();
+      }
+    };
+    var tryCursor = function (bridge, isRoot, element, offset, direction) {
+      return getBoxAt(bridge, element, offset).bind(function (box) {
+        return tryAt(bridge, direction, box);
+      });
+    };
+    var handle$2 = function (bridge, isRoot, direction) {
+      return findSpot(bridge, isRoot, direction).bind(function (spot) {
+        return scan$1(bridge, isRoot, spot.element(), spot.offset(), direction, MAX_RETRIES).map(bridge.fromSitus);
+      });
+    };
+
+    var inSameTable = function (elem, table) {
+      return ancestor$2(elem, function (e) {
+        return parent(e).exists(function (p) {
+          return eq(p, table);
+        });
+      });
+    };
+    var simulate = function (bridge, isRoot, direction, initial, anchor) {
+      return closest$1(initial, 'td,th', isRoot).bind(function (start) {
+        return closest$1(start, 'table', isRoot).bind(function (table) {
+          if (!inSameTable(anchor, table)) {
+            return Option.none();
+          }
+          return handle$2(bridge, isRoot, direction).bind(function (range) {
+            return closest$1(range.finish(), 'td,th', isRoot).map(function (finish) {
+              return {
+                start: constant(start),
+                finish: constant(finish),
+                range: constant(range)
+              };
+            });
+          });
+        });
+      });
+    };
+    var navigate = function (bridge, isRoot, direction, initial, anchor, precheck) {
+      if (detect$3().browser.isIE()) {
+        return Option.none();
+      } else {
+        return precheck(initial, isRoot).orThunk(function () {
+          return simulate(bridge, isRoot, direction, initial, anchor).map(function (info) {
+            var range = info.range();
+            return Response.create(Option.some(makeSitus(range.start(), range.soffset(), range.finish(), range.foffset())), true);
+          });
+        });
+      }
+    };
+    var firstUpCheck = function (initial, isRoot) {
+      return closest$1(initial, 'tr', isRoot).bind(function (startRow) {
+        return closest$1(startRow, 'table', isRoot).bind(function (table) {
+          var rows = descendants$1(table, 'tr');
+          if (eq(startRow, rows[0])) {
+            return seekLeft$1(table, function (element) {
+              return last$1(element).isSome();
+            }, isRoot).map(function (last) {
+              var lastOffset = getEnd(last);
+              return Response.create(Option.some(makeSitus(last, lastOffset, last, lastOffset)), true);
+            });
+          } else {
+            return Option.none();
+          }
+        });
+      });
+    };
+    var lastDownCheck = function (initial, isRoot) {
+      return closest$1(initial, 'tr', isRoot).bind(function (startRow) {
+        return closest$1(startRow, 'table', isRoot).bind(function (table) {
+          var rows = descendants$1(table, 'tr');
+          if (eq(startRow, rows[rows.length - 1])) {
+            return seekRight$1(table, function (element) {
+              return first(element).isSome();
+            }, isRoot).map(function (first) {
+              return Response.create(Option.some(makeSitus(first, 0, first, 0)), true);
+            });
+          } else {
+            return Option.none();
+          }
+        });
+      });
+    };
+    var select = function (bridge, container, isRoot, direction, initial, anchor, selectRange) {
+      return simulate(bridge, isRoot, direction, initial, anchor).bind(function (info) {
+        return detect$5(container, isRoot, info.start(), info.finish(), selectRange);
+      });
+    };
+
+    var findCell = function (target, isRoot) {
+      return closest$1(target, 'td,th', isRoot);
+    };
+    function MouseSelection (bridge, container, isRoot, annotations) {
+      var cursor = Option.none();
+      var clearState = function () {
+        cursor = Option.none();
+      };
+      var mousedown = function (event) {
+        annotations.clear(container);
+        cursor = findCell(event.target(), isRoot);
+      };
+      var mouseover = function (event) {
+        cursor.each(function (start) {
+          annotations.clearBeforeUpdate(container);
+          findCell(event.target(), isRoot).each(function (finish) {
+            identify(start, finish, isRoot).each(function (cellSel) {
+              var boxes = cellSel.boxes.getOr([]);
+              if (boxes.length > 1 || boxes.length === 1 && !eq(start, finish)) {
+                annotations.selectRange(container, boxes, cellSel.start, cellSel.finish);
+                bridge.selectContents(finish);
+              }
+            });
+          });
+        });
+      };
+      var mouseup = function (_event) {
+        cursor.each(clearState);
+      };
+      return {
+        mousedown: mousedown,
+        mouseover: mouseover,
+        mouseup: mouseup
+      };
+    }
+
+    var down = {
+      traverse: nextSibling,
+      gather: after$5,
+      relative: Situ.before,
+      otherRetry: Retries.tryDown,
+      ieRetry: Retries.ieTryDown,
+      failure: BeforeAfter.failedDown
+    };
+    var up = {
+      traverse: prevSibling,
+      gather: before$4,
+      relative: Situ.before,
+      otherRetry: Retries.tryUp,
+      ieRetry: Retries.ieTryUp,
+      failure: BeforeAfter.failedUp
+    };
+
+    var isKey = function (key) {
+      return function (keycode) {
+        return keycode === key;
+      };
+    };
+    var isUp = isKey(38);
+    var isDown = isKey(40);
+    var isNavigation = function (keycode) {
+      return keycode >= 37 && keycode <= 40;
+    };
+    var ltr$3 = {
+      isBackward: isKey(37),
+      isForward: isKey(39)
+    };
+    var rtl$3 = {
+      isBackward: isKey(39),
+      isForward: isKey(37)
+    };
+
+    var toRaw = function (sr) {
+      return {
+        left: sr.left(),
+        top: sr.top(),
+        right: sr.right(),
+        bottom: sr.bottom(),
+        width: sr.width(),
+        height: sr.height()
+      };
+    };
+    var Rect = { toRaw: toRaw };
+
+    var get$b = function (_DOC) {
+      var doc = _DOC !== undefined ? _DOC.dom() : domGlobals.document;
+      var x = doc.body.scrollLeft || doc.documentElement.scrollLeft;
+      var y = doc.body.scrollTop || doc.documentElement.scrollTop;
+      return Position(x, y);
+    };
+    var by = function (x, y, _DOC) {
+      var doc = _DOC !== undefined ? _DOC.dom() : domGlobals.document;
+      var win = doc.defaultView;
+      win.scrollBy(x, y);
+    };
+
+    var WindowBridge = function (win) {
+      var elementFromPoint = function (x, y) {
+        return Element.fromPoint(Element.fromDom(win.document), x, y);
+      };
+      var getRect = function (element) {
+        return element.dom().getBoundingClientRect();
+      };
+      var getRangedRect = function (start, soffset, finish, foffset) {
+        var sel = Selection.exact(start, soffset, finish, foffset);
+        return getFirstRect$1(win, sel).map(Rect.toRaw);
+      };
+      var getSelection = function () {
+        return get$a(win).map(function (exactAdt) {
+          return convertToRange(win, exactAdt);
+        });
+      };
+      var fromSitus = function (situs) {
+        var relative = Selection.relative(situs.start(), situs.finish());
+        return convertToRange(win, relative);
+      };
+      var situsFromPoint = function (x, y) {
+        return getAtPoint(win, x, y).map(function (exact) {
+          return Situs.create(exact.start(), exact.soffset(), exact.finish(), exact.foffset());
+        });
+      };
+      var clearSelection = function () {
+        clear(win);
+      };
+      var collapseSelection = function (toStart) {
+        if (toStart === void 0) {
+          toStart = false;
+        }
+        get$a(win).each(function (sel) {
+          return sel.fold(function (rng) {
+            return rng.collapse(toStart);
+          }, function (startSitu, finishSitu) {
+            var situ = toStart ? startSitu : finishSitu;
+            setRelative(win, situ, situ);
+          }, function (start, soffset, finish, foffset) {
+            var node = toStart ? start : finish;
+            var offset = toStart ? soffset : foffset;
+            setExact(win, node, offset, node, offset);
+          });
+        });
+      };
+      var selectContents = function (element) {
+        setToElement(win, element);
+      };
+      var setSelection = function (sel) {
+        setExact(win, sel.start(), sel.soffset(), sel.finish(), sel.foffset());
+      };
+      var setRelativeSelection = function (start, finish) {
+        setRelative(win, start, finish);
+      };
+      var getInnerHeight = function () {
+        return win.innerHeight;
+      };
+      var getScrollY = function () {
+        var pos = get$b(Element.fromDom(win.document));
+        return pos.top();
+      };
+      var scrollBy = function (x, y) {
+        by(x, y, Element.fromDom(win.document));
+      };
+      return {
+        elementFromPoint: elementFromPoint,
+        getRect: getRect,
+        getRangedRect: getRangedRect,
+        getSelection: getSelection,
+        fromSitus: fromSitus,
+        situsFromPoint: situsFromPoint,
+        clearSelection: clearSelection,
+        collapseSelection: collapseSelection,
+        setSelection: setSelection,
+        setRelativeSelection: setRelativeSelection,
+        selectContents: selectContents,
+        getInnerHeight: getInnerHeight,
+        getScrollY: getScrollY,
+        scrollBy: scrollBy
+      };
+    };
+
+    var rc = function (rows, cols) {
+      return {
+        rows: rows,
+        cols: cols
+      };
+    };
+    var mouse = function (win, container, isRoot, annotations) {
+      var bridge = WindowBridge(win);
+      var handlers = MouseSelection(bridge, container, isRoot, annotations);
+      return {
+        mousedown: handlers.mousedown,
+        mouseover: handlers.mouseover,
+        mouseup: handlers.mouseup
+      };
+    };
+    var keyboard = function (win, container, isRoot, annotations) {
+      var bridge = WindowBridge(win);
+      var clearToNavigate = function () {
+        annotations.clear(container);
+        return Option.none();
+      };
+      var keydown = function (event, start, soffset, finish, foffset, direction) {
+        var realEvent = event.raw();
+        var keycode = realEvent.which;
+        var shiftKey = realEvent.shiftKey === true;
+        var handler = retrieve(container, annotations.selectedSelector).fold(function () {
+          if (isDown(keycode) && shiftKey) {
+            return curry(select, bridge, container, isRoot, down, finish, start, annotations.selectRange);
+          } else if (isUp(keycode) && shiftKey) {
+            return curry(select, bridge, container, isRoot, up, finish, start, annotations.selectRange);
+          } else if (isDown(keycode)) {
+            return curry(navigate, bridge, isRoot, down, finish, start, lastDownCheck);
+          } else if (isUp(keycode)) {
+            return curry(navigate, bridge, isRoot, up, finish, start, firstUpCheck);
+          } else {
+            return Option.none;
+          }
+        }, function (selected) {
+          var update$1 = function (attempts) {
+            return function () {
+              var navigation = findMap(attempts, function (delta) {
+                return update(delta.rows, delta.cols, container, selected, annotations);
+              });
+              return navigation.fold(function () {
+                return getEdges(container, annotations.firstSelectedSelector, annotations.lastSelectedSelector).map(function (edges) {
+                  var relative = isDown(keycode) || direction.isForward(keycode) ? Situ.after : Situ.before;
+                  bridge.setRelativeSelection(Situ.on(edges.first(), 0), relative(edges.table()));
+                  annotations.clear(container);
+                  return Response.create(Option.none(), true);
+                });
+              }, function (_) {
+                return Option.some(Response.create(Option.none(), true));
+              });
+            };
+          };
+          if (isDown(keycode) && shiftKey) {
+            return update$1([rc(+1, 0)]);
+          } else if (isUp(keycode) && shiftKey) {
+            return update$1([rc(-1, 0)]);
+          } else if (direction.isBackward(keycode) && shiftKey) {
+            return update$1([
+              rc(0, -1),
+              rc(-1, 0)
+            ]);
+          } else if (direction.isForward(keycode) && shiftKey) {
+            return update$1([
+              rc(0, +1),
+              rc(+1, 0)
+            ]);
+          } else if (isNavigation(keycode) && shiftKey === false) {
+            return clearToNavigate;
+          } else {
+            return Option.none;
+          }
+        });
+        return handler();
+      };
+      var keyup = function (event, start, soffset, finish, foffset) {
+        return retrieve(container, annotations.selectedSelector).fold(function () {
+          var realEvent = event.raw();
+          var keycode = realEvent.which;
+          var shiftKey = realEvent.shiftKey === true;
+          if (shiftKey === false) {
+            return Option.none();
+          }
+          if (isNavigation(keycode)) {
+            return sync(container, isRoot, start, soffset, finish, foffset, annotations.selectRange);
+          } else {
+            return Option.none();
+          }
+        }, Option.none);
+      };
+      return {
+        keydown: keydown,
+        keyup: keyup
+      };
+    };
+    var external = function (win, container, isRoot, annotations) {
+      var bridge = WindowBridge(win);
+      return function (start, finish) {
+        annotations.clearBeforeUpdate(container);
+        identify(start, finish, isRoot).each(function (cellSel) {
+          var boxes = cellSel.boxes.getOr([]);
+          annotations.selectRange(container, boxes, cellSel.start, cellSel.finish);
+          bridge.selectContents(finish);
+          bridge.collapseSelection();
+        });
+      };
+    };
+
+    var remove$7 = function (element, classes) {
+      each(classes, function (x) {
+        remove$5(element, x);
+      });
+    };
+
+    var addClass = function (clazz) {
+      return function (element) {
+        add$2(element, clazz);
+      };
+    };
+    var removeClasses = function (classes) {
+      return function (element) {
+        remove$7(element, classes);
+      };
+    };
+
+    var byClass = function (ephemera) {
+      var addSelectionClass = addClass(ephemera.selected);
+      var removeSelectionClasses = removeClasses([
+        ephemera.selected,
+        ephemera.lastSelected,
+        ephemera.firstSelected
+      ]);
+      var clear = function (container) {
+        var sels = descendants$1(container, ephemera.selectedSelector);
+        each(sels, removeSelectionClasses);
+      };
+      var selectRange = function (container, cells, start, finish) {
+        clear(container);
+        each(cells, addSelectionClass);
+        add$2(start, ephemera.firstSelected);
+        add$2(finish, ephemera.lastSelected);
+      };
+      return {
+        clearBeforeUpdate: clear,
+        clear: clear,
+        selectRange: selectRange,
+        selectedSelector: ephemera.selectedSelector,
+        firstSelectedSelector: ephemera.firstSelectedSelector,
+        lastSelectedSelector: ephemera.lastSelectedSelector
+      };
+    };
+    var byAttr = function (ephemera, onSelection, onClear) {
+      var removeSelectionAttributes = function (element) {
+        remove(element, ephemera.selected);
+        remove(element, ephemera.firstSelected);
+        remove(element, ephemera.lastSelected);
+      };
+      var addSelectionAttribute = function (element) {
+        set(element, ephemera.selected, '1');
+      };
+      var clear = function (container) {
+        clearBeforeUpdate(container);
+        onClear();
+      };
+      var clearBeforeUpdate = function (container) {
+        var sels = descendants$1(container, ephemera.selectedSelector);
+        each(sels, removeSelectionAttributes);
+      };
+      var selectRange = function (container, cells, start, finish) {
+        clear(container);
+        each(cells, addSelectionAttribute);
+        set(start, ephemera.firstSelected, '1');
+        set(finish, ephemera.lastSelected, '1');
+        onSelection(cells, start, finish);
+      };
+      return {
+        clearBeforeUpdate: clearBeforeUpdate,
+        clear: clear,
+        selectRange: selectRange,
+        selectedSelector: ephemera.selectedSelector,
+        firstSelectedSelector: ephemera.firstSelectedSelector,
+        lastSelectedSelector: ephemera.lastSelectedSelector
+      };
+    };
+    var SelectionAnnotation = {
+      byClass: byClass,
+      byAttr: byAttr
+    };
+
+    var getUpOrLeftCells = function (grid, selectedCells, generators) {
+      var upGrid = grid.slice(0, selectedCells[selectedCells.length - 1].row() + 1);
+      var upDetails = toDetailList(upGrid, generators);
+      return bind(upDetails, function (detail) {
+        var slicedCells = detail.cells().slice(0, selectedCells[selectedCells.length - 1].column() + 1);
+        return map(slicedCells, function (cell) {
+          return cell.element();
+        });
+      });
+    };
+    var getDownOrRightCells = function (grid, selectedCells, generators) {
+      var downGrid = grid.slice(selectedCells[0].row() + selectedCells[0].rowspan() - 1, grid.length);
+      var downDetails = toDetailList(downGrid, generators);
+      return bind(downDetails, function (detail) {
+        var slicedCells = detail.cells().slice(selectedCells[0].column() + selectedCells[0].colspan() - 1, +detail.cells().length);
+        return map(slicedCells, function (cell) {
+          return cell.element();
+        });
+      });
+    };
+    var getOtherCells = function (table, target, generators) {
+      var list = fromTable(table);
+      var house = Warehouse.generate(list);
+      var details = onCells(house, target);
+      return details.map(function (selectedCells) {
+        var grid = toGrid(house, generators, false);
+        var upOrLeftCells = getUpOrLeftCells(grid, selectedCells, generators);
+        var downOrRightCells = getDownOrRightCells(grid, selectedCells, generators);
+        return {
+          upOrLeftCells: upOrLeftCells,
+          downOrRightCells: downOrRightCells
+        };
+      });
+    };
+
+    var hasInternalTarget = function (e) {
+      return has$2(Element.fromDom(e.target), 'ephox-snooker-resizer-bar') === false;
+    };
+    function CellSelection (editor, lazyResize, selectionTargets) {
+      var handlers = Option.none();
+      var cloneFormats = getCloneElements(editor);
+      var onSelection = function (cells, start, finish) {
+        selectionTargets.targets().each(function (targets) {
+          var tableOpt = table(start);
+          tableOpt.each(function (table) {
+            var doc = Element.fromDom(editor.getDoc());
+            var generators = cellOperations(noop, doc, cloneFormats);
+            var otherCells = getOtherCells(table, targets, generators);
+            fireTableSelectionChange(editor, cells, start, finish, otherCells);
+          });
+        });
+      };
+      var onClear = function () {
+        fireTableSelectionClear(editor);
+      };
+      var annotations = SelectionAnnotation.byAttr(Ephemera, onSelection, onClear);
+      editor.on('init', function (_e) {
+        var win = editor.getWin();
+        var body = getBody$1(editor);
+        var isRoot = getIsRoot(editor);
+        var syncSelection = function () {
+          var sel = editor.selection;
+          var start = Element.fromDom(sel.getStart());
+          var end = Element.fromDom(sel.getEnd());
+          var shared = sharedOne$1(table, [
+            start,
+            end
+          ]);
+          shared.fold(function () {
+            annotations.clear(body);
+          }, noop);
+        };
+        var mouseHandlers = mouse(win, body, isRoot, annotations);
+        var keyHandlers = keyboard(win, body, isRoot, annotations);
+        var external$1 = external(win, body, isRoot, annotations);
+        var hasShiftKey = function (event) {
+          return event.raw().shiftKey === true;
+        };
+        editor.on('TableSelectorChange', function (e) {
+          external$1(e.start, e.finish);
+        });
+        var handleResponse = function (event, response) {
+          if (!hasShiftKey(event)) {
+            return;
+          }
+          if (response.kill()) {
+            event.kill();
+          }
+          response.selection().each(function (ns) {
+            var relative = Selection.relative(ns.start(), ns.finish());
+            var rng = asLtrRange(win, relative);
+            editor.selection.setRng(rng);
+          });
+        };
+        var keyup = function (event) {
+          var wrappedEvent = fromRawEvent$1(event);
+          if (wrappedEvent.raw().shiftKey && isNavigation(wrappedEvent.raw().which)) {
+            var rng = editor.selection.getRng();
+            var start = Element.fromDom(rng.startContainer);
+            var end = Element.fromDom(rng.endContainer);
+            keyHandlers.keyup(wrappedEvent, start, rng.startOffset, end, rng.endOffset).each(function (response) {
+              handleResponse(wrappedEvent, response);
+            });
+          }
+        };
+        var keydown = function (event) {
+          var wrappedEvent = fromRawEvent$1(event);
+          lazyResize().each(function (resize) {
+            resize.hideBars();
+          });
+          var rng = editor.selection.getRng();
+          var startContainer = Element.fromDom(editor.selection.getStart());
+          var start = Element.fromDom(rng.startContainer);
+          var end = Element.fromDom(rng.endContainer);
+          var direction = directionAt(startContainer).isRtl() ? rtl$3 : ltr$3;
+          keyHandlers.keydown(wrappedEvent, start, rng.startOffset, end, rng.endOffset, direction).each(function (response) {
+            handleResponse(wrappedEvent, response);
+          });
+          lazyResize().each(function (resize) {
+            resize.showBars();
+          });
+        };
+        var isLeftMouse = function (raw) {
+          return raw.button === 0;
+        };
+        var isLeftButtonPressed = function (raw) {
+          if (raw.buttons === undefined) {
+            return true;
+          }
+          if (global$2.browser.isEdge() && raw.buttons === 0) {
+            return true;
+          }
+          return (raw.buttons & 1) !== 0;
+        };
+        var mouseDown = function (e) {
+          if (isLeftMouse(e) && hasInternalTarget(e)) {
+            mouseHandlers.mousedown(fromRawEvent$1(e));
+          }
+        };
+        var mouseOver = function (e) {
+          if (isLeftButtonPressed(e) && hasInternalTarget(e)) {
+            mouseHandlers.mouseover(fromRawEvent$1(e));
+          }
+        };
+        var mouseUp = function (e) {
+          if (isLeftMouse(e) && hasInternalTarget(e)) {
+            mouseHandlers.mouseup(fromRawEvent$1(e));
+          }
+        };
+        var getDoubleTap = function () {
+          var lastTarget = Cell(Element.fromDom(body));
+          var lastTimeStamp = Cell(0);
+          var touchEnd = function (t) {
+            var target = Element.fromDom(t.target);
+            if (name(target) === 'td' || name(target) === 'th') {
+              var lT = lastTarget.get();
+              var lTS = lastTimeStamp.get();
+              if (eq(lT, target) && t.timeStamp - lTS < 300) {
+                t.preventDefault();
+                external$1(target, target);
+              }
+            }
+            lastTarget.set(target);
+            lastTimeStamp.set(t.timeStamp);
+          };
+          return { touchEnd: touchEnd };
+        };
+        var doubleTap = getDoubleTap();
+        editor.on('mousedown', mouseDown);
+        editor.on('mouseover', mouseOver);
+        editor.on('mouseup', mouseUp);
+        editor.on('touchend', doubleTap.touchEnd);
+        editor.on('keyup', keyup);
+        editor.on('keydown', keydown);
+        editor.on('NodeChange', syncSelection);
+        handlers = Option.some({
+          mousedown: mouseDown,
+          mouseover: mouseOver,
+          mouseup: mouseUp,
+          keyup: keyup,
+          keydown: keydown
+        });
+      });
+      var destroy = function () {
+        handlers.each(function (_handlers) {
+        });
+      };
+      return {
+        clear: annotations.clear,
+        destroy: destroy
+      };
+    }
+
+    var Selections = function (editor) {
+      var get = function () {
+        var body = getBody$1(editor);
+        return retrieve$1(body, selectedSelector).fold(function () {
+          if (editor.selection.getStart() === undefined) {
+            return none$1();
+          } else {
+            return single(editor.selection);
+          }
+        }, function (cells) {
+          return multiple(cells);
+        });
+      };
+      return { get: get };
+    };
+
+    var getSelectionTargets = function (editor, selections) {
+      var targets = Cell(Option.none());
+      var changeHandlers = Cell([]);
+      var findTargets = function () {
+        return getSelectionStartCellOrCaption(editor).bind(function (cellOrCaption) {
+          var table$1 = table(cellOrCaption);
+          return table$1.map(function (table) {
+            if (name(cellOrCaption) === 'caption') {
+              return notCell(cellOrCaption);
+            } else {
+              return forMenu(selections, table, cellOrCaption);
+            }
+          });
+        });
+      };
+      var resetTargets = function () {
+        targets.set(cached(findTargets)());
+        each(changeHandlers.get(), function (handler) {
+          return handler();
+        });
+      };
+      var onSetup = function (api, isDisabled) {
+        var handler = function () {
+          return targets.get().fold(function () {
+            api.setDisabled(true);
+          }, function (targets) {
+            api.setDisabled(isDisabled(targets));
+          });
+        };
+        handler();
+        changeHandlers.set(changeHandlers.get().concat([handler]));
+        return function () {
+          changeHandlers.set(filter(changeHandlers.get(), function (h) {
+            return h !== handler;
+          }));
+        };
+      };
+      var onSetupTable = function (api) {
+        return onSetup(api, function (_) {
+          return false;
+        });
+      };
+      var onSetupCellOrRow = function (api) {
+        return onSetup(api, function (targets) {
+          return name(targets.element()) === 'caption';
+        });
+      };
+      var onSetupMergeable = function (api) {
+        return onSetup(api, function (targets) {
+          return targets.mergable().isNone();
+        });
+      };
+      var onSetupUnmergeable = function (api) {
+        return onSetup(api, function (targets) {
+          return targets.unmergable().isNone();
+        });
+      };
+      editor.on('NodeChange TableSelectorChange', resetTargets);
+      return {
+        onSetupTable: onSetupTable,
+        onSetupCellOrRow: onSetupCellOrRow,
+        onSetupMergeable: onSetupMergeable,
+        onSetupUnmergeable: onSetupUnmergeable,
+        resetTargets: resetTargets,
+        targets: function () {
+          return targets.get();
+        }
+      };
+    };
+
+    var addButtons = function (editor, selectionTargets) {
+      editor.ui.registry.addMenuButton('table', {
+        tooltip: 'Table',
+        icon: 'table',
+        fetch: function (callback) {
+          return callback('inserttable | cell row column | advtablesort | tableprops deletetable');
+        }
+      });
+      var cmd = function (command) {
+        return function () {
+          return editor.execCommand(command);
+        };
+      };
+      editor.ui.registry.addButton('tableprops', {
+        tooltip: 'Table properties',
+        onAction: cmd('mceTableProps'),
+        icon: 'table',
+        onSetup: selectionTargets.onSetupTable
+      });
+      editor.ui.registry.addButton('tabledelete', {
+        tooltip: 'Delete table',
+        onAction: cmd('mceTableDelete'),
+        icon: 'table-delete-table',
+        onSetup: selectionTargets.onSetupTable
+      });
+      editor.ui.registry.addButton('tablecellprops', {
+        tooltip: 'Cell properties',
+        onAction: cmd('mceTableCellProps'),
+        icon: 'table-cell-properties',
+        onSetup: selectionTargets.onSetupCellOrRow
+      });
+      editor.ui.registry.addButton('tablemergecells', {
+        tooltip: 'Merge cells',
+        onAction: cmd('mceTableMergeCells'),
+        icon: 'table-merge-cells',
+        onSetup: selectionTargets.onSetupMergeable
+      });
+      editor.ui.registry.addButton('tablesplitcells', {
+        tooltip: 'Split cell',
+        onAction: cmd('mceTableSplitCells'),
+        icon: 'table-split-cells',
+        onSetup: selectionTargets.onSetupUnmergeable
+      });
+      editor.ui.registry.addButton('tableinsertrowbefore', {
+        tooltip: 'Insert row before',
+        onAction: cmd('mceTableInsertRowBefore'),
+        icon: 'table-insert-row-above',
+        onSetup: selectionTargets.onSetupCellOrRow
+      });
+      editor.ui.registry.addButton('tableinsertrowafter', {
+        tooltip: 'Insert row after',
+        onAction: cmd('mceTableInsertRowAfter'),
+        icon: 'table-insert-row-after',
+        onSetup: selectionTargets.onSetupCellOrRow
+      });
+      editor.ui.registry.addButton('tabledeleterow', {
+        tooltip: 'Delete row',
+        onAction: cmd('mceTableDeleteRow'),
+        icon: 'table-delete-row',
+        onSetup: selectionTargets.onSetupCellOrRow
+      });
+      editor.ui.registry.addButton('tablerowprops', {
+        tooltip: 'Row properties',
+        onAction: cmd('mceTableRowProps'),
+        icon: 'table-row-properties',
+        onSetup: selectionTargets.onSetupCellOrRow
+      });
+      editor.ui.registry.addButton('tableinsertcolbefore', {
+        tooltip: 'Insert column before',
+        onAction: cmd('mceTableInsertColBefore'),
+        icon: 'table-insert-column-before',
+        onSetup: selectionTargets.onSetupCellOrRow
+      });
+      editor.ui.registry.addButton('tableinsertcolafter', {
+        tooltip: 'Insert column after',
+        onAction: cmd('mceTableInsertColAfter'),
+        icon: 'table-insert-column-after',
+        onSetup: selectionTargets.onSetupCellOrRow
+      });
+      editor.ui.registry.addButton('tabledeletecol', {
+        tooltip: 'Delete column',
+        onAction: cmd('mceTableDeleteCol'),
+        icon: 'table-delete-column',
+        onSetup: selectionTargets.onSetupCellOrRow
+      });
+      editor.ui.registry.addButton('tablecutrow', {
+        tooltip: 'Cut row',
+        onAction: cmd('mceTableCutRow'),
+        icon: 'temporary-placeholder',
+        onSetup: selectionTargets.onSetupCellOrRow
+      });
+      editor.ui.registry.addButton('tablecopyrow', {
+        tooltip: 'Copy row',
+        onAction: cmd('mceTableCopyRow'),
+        icon: 'temporary-placeholder',
+        onSetup: selectionTargets.onSetupCellOrRow
+      });
+      editor.ui.registry.addButton('tablepasterowbefore', {
+        tooltip: 'Paste row before',
+        onAction: cmd('mceTablePasteRowBefore'),
+        icon: 'temporary-placeholder',
+        onSetup: selectionTargets.onSetupCellOrRow
+      });
+      editor.ui.registry.addButton('tablepasterowafter', {
+        tooltip: 'Paste row after',
+        onAction: cmd('mceTablePasteRowAfter'),
+        icon: 'temporary-placeholder',
+        onSetup: selectionTargets.onSetupCellOrRow
+      });
+      editor.ui.registry.addButton('tableinsertdialog', {
+        tooltip: 'Insert table',
+        onAction: cmd('mceInsertTable'),
+        icon: 'table'
+      });
+    };
+    var addToolbars = function (editor) {
+      var isTable = function (table) {
+        return editor.dom.is(table, 'table') && editor.getBody().contains(table);
+      };
+      var toolbar = getToolbar(editor);
+      if (toolbar.length > 0) {
+        editor.ui.registry.addContextToolbar('table', {
+          predicate: isTable,
+          items: toolbar,
+          scope: 'node',
+          position: 'node'
+        });
+      }
+    };
+
+    var addMenuItems = function (editor, selectionTargets) {
+      var cmd = function (command) {
+        return function () {
+          return editor.execCommand(command);
+        };
+      };
+      var insertTableAction = function (_a) {
+        var numRows = _a.numRows, numColumns = _a.numColumns;
+        editor.undoManager.transact(function () {
+          insert$1(editor, numColumns, numRows);
+        });
+        editor.addVisual();
+      };
+      var tableProperties = {
+        text: 'Table properties',
+        onSetup: selectionTargets.onSetupTable,
+        onAction: cmd('mceTableProps')
+      };
+      var deleteTable = {
+        text: 'Delete table',
+        icon: 'table-delete-table',
+        onSetup: selectionTargets.onSetupTable,
+        onAction: cmd('mceTableDelete')
+      };
+      var rowItems = [
+        {
+          type: 'menuitem',
+          text: 'Insert row before',
+          icon: 'table-insert-row-above',
+          onAction: cmd('mceTableInsertRowBefore'),
+          onSetup: selectionTargets.onSetupCellOrRow
+        },
+        {
+          type: 'menuitem',
+          text: 'Insert row after',
+          icon: 'table-insert-row-after',
+          onAction: cmd('mceTableInsertRowAfter'),
+          onSetup: selectionTargets.onSetupCellOrRow
+        },
+        {
+          type: 'menuitem',
+          text: 'Delete row',
+          icon: 'table-delete-row',
+          onAction: cmd('mceTableDeleteRow'),
+          onSetup: selectionTargets.onSetupCellOrRow
+        },
+        {
+          type: 'menuitem',
+          text: 'Row properties',
+          icon: 'table-row-properties',
+          onAction: cmd('mceTableRowProps'),
+          onSetup: selectionTargets.onSetupCellOrRow
+        },
+        { type: 'separator' },
+        {
+          type: 'menuitem',
+          text: 'Cut row',
+          onAction: cmd('mceTableCutRow'),
+          onSetup: selectionTargets.onSetupCellOrRow
+        },
+        {
+          type: 'menuitem',
+          text: 'Copy row',
+          onAction: cmd('mceTableCopyRow'),
+          onSetup: selectionTargets.onSetupCellOrRow
+        },
+        {
+          type: 'menuitem',
+          text: 'Paste row before',
+          onAction: cmd('mceTablePasteRowBefore'),
+          onSetup: selectionTargets.onSetupCellOrRow
+        },
+        {
+          type: 'menuitem',
+          text: 'Paste row after',
+          onAction: cmd('mceTablePasteRowAfter'),
+          onSetup: selectionTargets.onSetupCellOrRow
+        }
+      ];
+      var row = {
+        type: 'nestedmenuitem',
+        text: 'Row',
+        getSubmenuItems: function () {
+          return rowItems;
+        }
+      };
+      var columnItems = [
+        {
+          type: 'menuitem',
+          text: 'Insert column before',
+          icon: 'table-insert-column-before',
+          onAction: cmd('mceTableInsertColBefore'),
+          onSetup: selectionTargets.onSetupCellOrRow
+        },
+        {
+          type: 'menuitem',
+          text: 'Insert column after',
+          icon: 'table-insert-column-after',
+          onAction: cmd('mceTableInsertColAfter'),
+          onSetup: selectionTargets.onSetupCellOrRow
+        },
+        {
+          type: 'menuitem',
+          text: 'Delete column',
+          icon: 'table-delete-column',
+          onAction: cmd('mceTableDeleteCol'),
+          onSetup: selectionTargets.onSetupCellOrRow
+        }
+      ];
+      var column = {
+        type: 'nestedmenuitem',
+        text: 'Column',
+        getSubmenuItems: function () {
+          return columnItems;
+        }
+      };
+      var cellItems = [
+        {
+          type: 'menuitem',
+          text: 'Cell properties',
+          icon: 'table-cell-properties',
+          onAction: cmd('mceTableCellProps'),
+          onSetup: selectionTargets.onSetupCellOrRow
+        },
+        {
+          type: 'menuitem',
+          text: 'Merge cells',
+          icon: 'table-merge-cells',
+          onAction: cmd('mceTableMergeCells'),
+          onSetup: selectionTargets.onSetupMergeable
+        },
+        {
+          type: 'menuitem',
+          text: 'Split cell',
+          icon: 'table-split-cells',
+          onAction: cmd('mceTableSplitCells'),
+          onSetup: selectionTargets.onSetupUnmergeable
+        }
+      ];
+      var cell = {
+        type: 'nestedmenuitem',
+        text: 'Cell',
+        getSubmenuItems: function () {
+          return cellItems;
+        }
+      };
+      if (hasTableGrid(editor) === false) {
+        editor.ui.registry.addMenuItem('inserttable', {
+          text: 'Table',
+          icon: 'table',
+          onAction: cmd('mceInsertTable')
+        });
+      } else {
+        editor.ui.registry.addNestedMenuItem('inserttable', {
+          text: 'Table',
+          icon: 'table',
+          getSubmenuItems: function () {
+            return [{
+                type: 'fancymenuitem',
+                fancytype: 'inserttable',
+                onAction: insertTableAction
+              }];
+          }
+        });
+      }
+      editor.ui.registry.addMenuItem('inserttabledialog', {
+        text: 'Insert table',
+        icon: 'table',
+        onAction: cmd('mceInsertTable')
+      });
+      editor.ui.registry.addMenuItem('tableprops', tableProperties);
+      editor.ui.registry.addMenuItem('deletetable', deleteTable);
+      editor.ui.registry.addNestedMenuItem('row', row);
+      editor.ui.registry.addNestedMenuItem('column', column);
+      editor.ui.registry.addNestedMenuItem('cell', cell);
+      editor.ui.registry.addContextMenu('table', {
+        update: function () {
+          selectionTargets.resetTargets();
+          return selectionTargets.targets().fold(function () {
+            return '';
+          }, function (targets) {
+            if (name(targets.element()) === 'caption') {
+              return 'tableprops deletetable';
+            } else {
+              return 'cell row column | advtablesort | tableprops deletetable';
+            }
+          });
+        }
+      });
+    };
+
+    var getClipboardRows = function (clipboardRows) {
+      return clipboardRows.get().fold(function () {
+        return;
+      }, function (rows) {
+        return map(rows, function (row) {
+          return row.dom();
+        });
+      });
+    };
+    var setClipboardRows = function (rows, clipboardRows) {
+      var sugarRows = map(rows, Element.fromDom);
+      clipboardRows.set(Option.from(sugarRows));
+    };
+    var getApi = function (editor, clipboardRows, resizeHandler, selectionTargets) {
+      return {
+        insertTable: function (columns, rows) {
+          return insert$1(editor, columns, rows);
+        },
+        setClipboardRows: function (rows) {
+          return setClipboardRows(rows, clipboardRows);
+        },
+        getClipboardRows: function () {
+          return getClipboardRows(clipboardRows);
+        },
+        resizeHandler: resizeHandler,
+        selectionTargets: selectionTargets
+      };
+    };
+
+    function Plugin(editor) {
+      var selections = Selections(editor);
+      var selectionTargets = getSelectionTargets(editor, selections);
+      var resizeHandler = getResizeHandler(editor);
+      var cellSelection = CellSelection(editor, resizeHandler.lazyResize, selectionTargets);
+      var actions = TableActions(editor, resizeHandler.lazyWire);
+      var clipboardRows = Cell(Option.none());
+      registerCommands(editor, actions, cellSelection, selections, clipboardRows);
+      registerEvents(editor, selections, actions, cellSelection);
+      addMenuItems(editor, selectionTargets);
+      addButtons(editor, selectionTargets);
+      addToolbars(editor);
+      editor.on('PreInit', function () {
+        editor.serializer.addTempAttr(firstSelected);
+        editor.serializer.addTempAttr(lastSelected);
+      });
+      if (hasTabNavigation(editor)) {
+        editor.on('keydown', function (e) {
+          handle$1(e, editor, actions, resizeHandler.lazyWire);
+        });
+      }
+      editor.on('remove', function () {
+        resizeHandler.destroy();
+        cellSelection.destroy();
+      });
+      return getApi(editor, clipboardRows, resizeHandler, selectionTargets);
+    }
+    function Plugin$1 () {
+      global.add('table', Plugin);
+    }
+
+    Plugin$1();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/table/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(p){"use strict";var S=function(e){var n=e;return{get:function(){return n},set:function(e){n=e}}},x=function(){},b=function(e){return function(){return e}},o=function(e){return e};function y(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=o.concat(e);return r.apply(null,t)}}var e,n,t,r,a=function(n){return function(e){return!n(e)}},f=b(!1),i=b(!0),u=function(){return c},c=(e=function(e){return e.isNone()},{fold:function(e,n){return e()},is:f,isSome:f,isNone:i,getOr:t=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:b(null),getOrUndefined:b(undefined),or:t,orThunk:n,map:u,each:x,bind:u,exists:f,forall:i,filter:u,equals:e,equals_:e,toArray:function(){return[]},toString:b("none()")}),l=function(t){var e=b(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:i,isNone:f,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return l(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:c},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(f,function(e){return n(t,e)})}};return o},C={some:l,none:u,from:function(e){return null===e||e===undefined?c:l(e)}},s=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=function(r){return function(e){return t=typeof(n=e),(null===n?"null":"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t)===r;var n,t}},m=function(n){return function(e){return typeof e===n}},g=d("string"),h=d("array"),v=m("boolean"),w=m("function"),R=m("number"),T=Array.prototype.slice,O=Array.prototype.indexOf,D=Array.prototype.push,A=function(e,n){return t=e,r=n,-1<O.call(t,r);var t,r},E=function(e,n){for(var t=0,r=e.length;t<r;t++){if(n(e[t],t))return!0}return!1},k=function(e,n){for(var t=e.length,r=new Array(t),o=0;o<t;o++){var i=e[o];r[o]=n(i,o)}return r},B=function(e,n){for(var t=0,r=e.length;t<r;t++){n(e[t],t)}},N=function(e,n){for(var t=[],r=0,o=e.length;r<o;r++){var i=e[r];n(i,r)&&t.push(i)}return t},I=function(e,n,t){return function(e,n){for(var t=e.length-1;0<=t;t--){n(e[t],t)}}(e,function(e){t=n(t,e)}),t},P=function(e,n,t){return B(e,function(e){t=n(t,e)}),t},M=function(e,n){return function(e,n,t){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(n(i,r))return C.some(i);if(t(i,r))break}return C.none()}(e,n,f)},_=function(e,n){for(var t=0,r=e.length;t<r;t++){if(n(e[t],t))return C.some(t)}return C.none()},W=function(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!h(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);D.apply(n,e[t])}return n},j=function(e,n){return W(k(e,n))},z=function(e,n){for(var t=0,r=e.length;t<r;++t){if(!0!==n(e[t],t))return!1}return!0},L=function(e,n){for(var t=0;t<e.length;t++){var r=n(e[t],t);if(r.isSome())return r}return C.none()},F=Object.keys,H=Object.hasOwnProperty,q=function(e,n){for(var t=F(e),r=0,o=t.length;r<o;r++){var i=t[r];n(e[i],i)}},U=function(e,t){return V(e,function(e,n){return{k:n,v:t(e,n)}})},V=function(e,r){var o={};return q(e,function(e,n){var t=r(e,n);o[t.k]=t.v}),o},K=function(e,n){return X(e,n)?C.from(e[n]):C.none()},X=function(e,n){return H.call(e,n)},$=("undefined"!=typeof p.window?p.window:Function("return this;")(),function(e){return e.dom().nodeName.toLowerCase()}),G=function(e){return e.dom().nodeType},Y=function(n){return function(e){return G(e)===n}},J=function(e){return 8===G(e)||"#comment"===$(e)},Q=Y(1),Z=Y(3),ee=function(e,n,t){if(!(g(t)||v(t)||R(t)))throw p.console.error("Invalid call to Attr.set. Key ",n,":: Value ",t,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(n,t+"")},ne=function(e,n,t){ee(e.dom(),n,t)},te=function(e,n){var t=e.dom();q(n,function(e,n){ee(t,n,e)})},re=function(e,n){var t=e.dom().getAttribute(n);return null===t?undefined:t},oe=function(e,n){return C.from(re(e,n))},ie=function(e,n){var t=e.dom();return!(!t||!t.hasAttribute)&&t.hasAttribute(n)},ue=function(e,n){e.dom().removeAttribute(n)},ce=function(e){return P(e.dom().attributes,function(e,n){return e[n.name]=n.value,e},{})},ae=function(e,n,t){return""===n||e.length>=n.length&&e.substr(t,t+n.length)===n},le=function(e,n){return-1!==e.indexOf(n)},fe=function(e,n){return ae(e,n,0)},se=(r=/^\s+|\s+$/g,function(e){return e.replace(r,"")}),de=function(e){return e.style!==undefined&&w(e.style.getPropertyValue)},me=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:b(e)}},ge={fromHtml:function(e,n){var t=(n||p.document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw p.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return me(t.childNodes[0])},fromTag:function(e,n){var t=(n||p.document).createElement(e);return me(t)},fromText:function(e,n){var t=(n||p.document).createTextNode(e);return me(t)},fromDom:me,fromPoint:function(e,n,t){var r=e.dom();return C.from(r.elementFromPoint(n,t)).map(me)}},pe=function(e){var n=Z(e)?e.dom().parentNode:e.dom();return n!==undefined&&null!==n&&n.ownerDocument.body.contains(n)},he=function(e){var n=e.dom().body;if(null===n||n===undefined)throw new Error("Body is not available yet");return ge.fromDom(n)},ve=function(e,n,t){if(!g(t))throw p.console.error("Invalid call to CSS.set. Property ",n,":: Value ",t,":: Element ",e),new Error("CSS value must be a string: "+t);de(e)&&e.style.setProperty(n,t)},be=function(e,n,t){var r=e.dom();ve(r,n,t)},we=function(e,n){var t=e.dom();q(n,function(e,n){ve(t,n,e)})},ye=function(e,n){var t=e.dom(),r=p.window.getComputedStyle(t).getPropertyValue(n);return""!==r||pe(e)?r:Se(t,n)},Se=function(e,n){return de(e)?e.style.getPropertyValue(n):""},xe=function(e,n){var t=e.dom(),r=Se(t,n);return C.from(r).filter(function(e){return 0<e.length})},Ce=function(e,n){var t,r,o=e.dom();r=n,de(t=o)&&t.style.removeProperty(r),oe(e,"style").map(se).is("")&&ue(e,"style")},Re=function(){return(Re=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},Te=function(t){var r,o=!1;return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o||(o=!0,r=t.apply(null,e)),r}},Oe=function(e,n){var t=function(e,n){for(var t=0;t<e.length;t++){var r=e[t];if(r.test(n))return r}return undefined}(e,n);if(!t)return{major:0,minor:0};var r=function(e){return Number(n.replace(t,"$"+e))};return Ae(r(1),r(2))},De=function(){return Ae(0,0)},Ae=function(e,n){return{major:e,minor:n}},Ee={nu:Ae,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?De():Oe(e,t)},unknown:De},ke="Firefox",Be=function(e){var n=e.current,t=e.version,r=function(e){return function(){return n===e}};return{current:n,version:t,isEdge:r("Edge"),isChrome:r("Chrome"),isIE:r("IE"),isOpera:r("Opera"),isFirefox:r(ke),isSafari:r("Safari")}},Ne={unknown:function(){return Be({current:undefined,version:Ee.unknown()})},nu:Be,edge:b("Edge"),chrome:b("Chrome"),ie:b("IE"),opera:b("Opera"),firefox:b(ke),safari:b("Safari")},Ie="Windows",Pe="Android",Me="Solaris",_e="FreeBSD",We="ChromeOS",je=function(e){var n=e.current,t=e.version,r=function(e){return function(){return n===e}};return{current:n,version:t,isWindows:r(Ie),isiOS:r("iOS"),isAndroid:r(Pe),isOSX:r("OSX"),isLinux:r("Linux"),isSolaris:r(Me),isFreeBSD:r(_e),isChromeOS:r(We)}},ze={unknown:function(){return je({current:undefined,version:Ee.unknown()})},nu:je,windows:b(Ie),ios:b("iOS"),android:b(Pe),linux:b("Linux"),osx:b("OSX"),solaris:b(Me),freebsd:b(_e),chromeos:b(We)},Le=function(e,n){var t=String(n).toLowerCase();return M(e,function(e){return e.search(t)})},Fe=function(e,t){return Le(e,t).map(function(e){var n=Ee.detect(e.versionRegexes,t);return{current:e.name,version:n}})},He=function(e,t){return Le(e,t).map(function(e){var n=Ee.detect(e.versionRegexes,t);return{current:e.name,version:n}})},qe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ue=function(n){return function(e){return le(e,n)}},Ve=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return le(e,"edge/")&&le(e,"chrome")&&le(e,"safari")&&le(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,qe],search:function(e){return le(e,"chrome")&&!le(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return le(e,"msie")||le(e,"trident")}},{name:"Opera",versionRegexes:[qe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ue("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ue("firefox")},{name:"Safari",versionRegexes:[qe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(le(e,"safari")||le(e,"mobile/"))&&le(e,"applewebkit")}}],Ke=[{name:"Windows",search:Ue("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return le(e,"iphone")||le(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ue("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ue("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ue("linux"),versionRegexes:[]},{name:"Solaris",search:Ue("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ue("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Ue("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Xe={browsers:b(Ve),oses:b(Ke)},$e=function(e,n){var t,r,o,i,u,c,a,l,f,s,d,m,g=Xe.browsers(),p=Xe.oses(),h=Fe(g,e).fold(Ne.unknown,Ne.nu),v=He(p,e).fold(ze.unknown,ze.nu);return{browser:h,os:v,deviceType:(r=h,o=e,i=n,u=(t=v).isiOS()&&!0===/ipad/i.test(o),c=t.isiOS()&&!u,a=t.isiOS()||t.isAndroid(),l=a||i("(pointer:coarse)"),f=u||!c&&a&&i("(min-device-width:768px)"),s=c||a&&!f,d=r.isSafari()&&t.isiOS()&&!1===/safari/i.test(o),m=!s&&!f&&!d,{isiPad:b(u),isiPhone:b(c),isTablet:b(f),isPhone:b(s),isTouch:b(l),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:b(d),isDesktop:b(m)})}},Ge=function(e){return p.window.matchMedia(e).matches},Ye=Te(function(){return $e(p.navigator.userAgent,Ge)}),Je=function(){return Ye()},Qe=function(e,n){var t=e.dom();if(1!==t.nodeType)return!1;var r=t;if(r.matches!==undefined)return r.matches(n);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(n);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(n);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},Ze=function(e){return 1!==e.nodeType&&9!==e.nodeType||0===e.childElementCount},en=function(e,n){return e.dom()===n.dom()},nn=function(e,n){return t=e.dom(),r=n.dom(),o=t,i=r,u=p.Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(o.compareDocumentPosition(i)&u);var t,r,o,i,u},tn=function(e,n){return Je().browser.isIE()?nn(e,n):(t=n,r=e.dom(),o=t.dom(),r!==o&&r.contains(o));var t,r,o},rn=Qe,on=function(e){return ge.fromDom(e.dom().ownerDocument)},un=function(e){return C.from(e.dom().parentNode).map(ge.fromDom)},cn=function(e,n){for(var t=w(n)?n:f,r=e.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,u=ge.fromDom(i);if(o.push(u),!0===t(u))break;r=i}return o},an=function(e){return C.from(e.dom().previousSibling).map(ge.fromDom)},ln=function(e){return C.from(e.dom().nextSibling).map(ge.fromDom)},fn=function(e){return k(e.dom().childNodes,ge.fromDom)},sn=function(e,n){var t=e.dom().childNodes;return C.from(t[n]).map(ge.fromDom)},dn=function(n,t){un(n).each(function(e){e.dom().insertBefore(t.dom(),n.dom())})},mn=function(e,n){ln(e).fold(function(){un(e).each(function(e){pn(e,n)})},function(e){dn(e,n)})},gn=function(n,t){sn(n,0).fold(function(){pn(n,t)},function(e){n.dom().insertBefore(t.dom(),e.dom())})},pn=function(e,n){e.dom().appendChild(n.dom())},hn=function(e,n){dn(e,n),pn(n,e)},vn=function(r,o){B(o,function(e,n){var t=0===n?r:o[n-1];mn(t,e)})},bn=function(n,e){B(e,function(e){pn(n,e)})},wn=function(e){e.dom().textContent="",B(fn(e),function(e){yn(e)})},yn=function(e){var n=e.dom();null!==n.parentNode&&n.parentNode.removeChild(n)},Sn=function(e){var n,t=fn(e);0<t.length&&(n=e,B(t,function(e){dn(n,e)})),yn(e)},xn=function(e,n,t){return{element:b(e),rowspan:b(n),colspan:b(t)}},Cn=function(e,n,t){return{element:b(e),cells:b(n),section:b(t)}},Rn=function(e,n){return{element:b(e),isNew:b(n)}},Tn=function(e,n){return{cells:b(e),section:b(n)}},On=function(e,n){var t=[];return B(fn(e),function(e){n(e)&&(t=t.concat([e])),t=t.concat(On(e,n))}),t},Dn=function(e,n,t){return r=function(e){return Qe(e,n)},N(cn(e,t),r);var r},An=function(e,n){return t=function(e){return Qe(e,n)},N(fn(e),t);var t},En=function(e,n){return t=n,o=(r=e)===undefined?p.document:r.dom(),Ze(o)?[]:k(o.querySelectorAll(t),ge.fromDom);var t,r,o};function kn(e,n,t,r,o){return e(t,r)?C.some(t):w(o)&&o(t)?C.none():n(t,r,o)}var Bn=function(e,n,t){for(var r=e.dom(),o=w(t)?t:b(!1);r.parentNode;){r=r.parentNode;var i=ge.fromDom(r);if(n(i))return C.some(i);if(o(i))break}return C.none()},Nn=function(e,n,t){return Bn(e,function(e){return Qe(e,n)},t)},In=function(e,n){return t=function(e){return Qe(e,n)},M(e.dom().childNodes,function(e){return t(ge.fromDom(e))}).map(ge.fromDom);var t},Pn=function(e,n){return t=n,o=(r=e)===undefined?p.document:r.dom(),Ze(o)?C.none():C.from(o.querySelector(t)).map(ge.fromDom);var t,r,o},Mn=function(e,n,t){return kn(function(e,n){return Qe(e,n)},Nn,e,n,t)},_n=function(e,n,t){return void 0===t&&(t=0),oe(e,n).map(function(e){return parseInt(e,10)}).getOr(t)},Wn=function(e,n){return _n(e,n,1)},jn=function(e){return 1<Wn(e,"colspan")},zn=function(e){return 1<Wn(e,"rowspan")},Ln=function(e,n){return parseInt(ye(e,n),10)},Fn=b(10),Hn=b(10),qn=function(e,n){return Un(e,n,b(!0))},Un=function(e,n,t){return j(fn(e),function(e){return Qe(e,n)?t(e)?[e]:[]:Un(e,n,t)})},Vn=function(e,n){return function(e,n,t){if(void 0===t&&(t=f),t(n))return C.none();if(A(e,$(n)))return C.some(n);return Nn(n,e.join(","),function(e){return Qe(e,"table")||t(e)})}(["td","th"],e,n)},Kn=function(e){return qn(e,"th,td")},Xn=function(n,e){return un(e).map(function(e){return An(e,n)})},$n=(y(Xn,"th,td"),y(Xn,"tr"),function(e,n){return Mn(e,"table",n)}),Gn=function(e){var n=qn(e,"tr");return k(n,function(e){var n=e,t=un(n).map(function(e){var n=$(e);return"tfoot"===n||"thead"===n||"tbody"===n?n:"tbody"}).getOr("tbody"),r=k(Kn(e),function(e){var n=_n(e,"rowspan",1),t=_n(e,"colspan",1);return xn(e,n,t)});return Cn(n,r,t)})},Yn=function(e,n){return e+","+n},Jn=function(e,n){var t=j(e.all,function(e){return e.cells()});return N(t,n)},Qn={generate:function(e){var d={},n=[],t=e.length,m=0;return B(e,function(e,f){var s=[];B(e.cells(),function(e){for(var n=0;d[Yn(f,n)]!==undefined;)n++;for(var t,r,o,i=(t=e.element(),r=e.rowspan(),o=e.colspan(),{element:b(t),rowspan:b(r),colspan:b(o),row:b(f),column:b(n)}),u=0;u<e.colspan();u++)for(var c=0;c<e.rowspan();c++){var a=n+u,l=Yn(f+c,a);d[l]=i,m=Math.max(m,a+1)}s.push(i)}),n.push(Cn(e.element(),s,e.section()))}),{grid:{rows:b(t),columns:b(m)},access:d,all:n}},getAt:function(e,n,t){var r=e.access[Yn(n,t)];return r!==undefined?C.some(r):C.none()},findItem:function(e,n,t){var r=Jn(e,function(e){return t(n,e.element())});return 0<r.length?C.some(r[0]):C.none()},filterItems:Jn,justCells:function(e){var n=k(e.all,function(e){return e.cells()});return W(n)}},Zn=function(e,n){var t,i,r,u,c,a,l,o,f,s,d=function(e){return Qe(e.element(),n)},m=Gn(e),g=Qn.generate(m),p=(i=d,r=(t=g).grid.columns(),u=t.grid.rows(),c=r,l=a=0,q(t.access,function(e){if(i(e)){var n=e.row(),t=n+e.rowspan()-1,r=e.column(),o=r+e.colspan()-1;n<u?u=n:a<t&&(a=t),r<c?c=r:l<o&&(l=o)}}),{minRow:u,minCol:c,maxRow:a,maxCol:l}),h="th:not("+n+"),td:not("+n+")",v=Un(e,"th,td",function(e){return Qe(e,h)});return B(v,yn),function(e,n,t,r){for(var o,i,u,c=n.grid.columns(),a=n.grid.rows(),l=0;l<a;l++)for(var f=!1,s=0;s<c;s++){if(!(l<t.minRow||l>t.maxRow||s<t.minCol||s>t.maxCol))Qn.getAt(n,l,s).filter(r).isNone()?(o=f,0,i=e[l].element(),u=ge.fromTag("td"),pn(u,ge.fromTag("br")),(o?pn:gn)(i,u)):f=!0}}(m,g,p,d),f=p,s=N(qn(o=e,"tr"),function(e){return 0===e.dom().childElementCount}),B(s,yn),f.minCol!==f.maxCol&&f.minRow!==f.maxRow||B(qn(o,"th,td"),function(e){ue(e,"rowspan"),ue(e,"colspan")}),ue(o,"width"),ue(o,"height"),Ce(o,"width"),Ce(o,"height"),e};var et=function bf(t,r){var n=function(e){return t(e)?C.from(e.dom().nodeValue):C.none()};return{get:function(e){if(!t(e))throw new Error("Can only get "+r+" value of a "+r+" node");return n(e).getOr("")},getOption:n,set:function(e,n){if(!t(e))throw new Error("Can only set raw "+r+" value of a "+r+" node");e.dom().nodeValue=n}}}(Z,"text"),nt=function(e){return et.get(e)},tt=function(e){return et.getOption(e)},rt=function(e,n){return et.set(e,n)},ot=function(e){return"img"===$(e)?1:tt(e).fold(function(){return fn(e).length},function(e){return e.length})},it=["img","br"],ut=function(e){return tt(e).filter(function(e){return 0!==e.trim().length||-1<e.indexOf("\xa0")}).isSome()||A(it,$(e))},ct=function(e){return o=ut,(i=function(e){for(var n=0;n<e.childNodes.length;n++){var t=ge.fromDom(e.childNodes[n]);if(o(t))return C.some(t);var r=i(e.childNodes[n]);if(r.isSome())return r}return C.none()})(e.dom());var o,i},at=function(e){return lt(e,ut)},lt=function(e,i){var u=function(e){for(var n=fn(e),t=n.length-1;0<=t;t--){var r=n[t];if(i(r))return C.some(r);var o=u(r);if(o.isSome())return o}return C.none()};return u(e)},ft=function(e,n){return ge.fromDom(e.dom().cloneNode(n))},st=function(e){return ft(e,!1)},dt=function(e){return ft(e,!0)},mt=function(e,n){var t,r,o,i,u=(t=e,r=n,o=ge.fromTag(r),i=ce(t),te(o,i),o),c=fn(dt(e));return bn(u,c),u},gt=function(){var e=ge.fromTag("td");return pn(e,ge.fromTag("br")),e},pt=function(e,n,t){var r=mt(e,n);return q(t,function(e,n){null===e?ue(r,n):ne(r,n,e)}),r},ht=function(e){return e},vt=function(e){return function(){return ge.fromTag("tr",e.dom())}},bt=function(d,e,m){return{row:vt(e),cell:function(e){var r,o,i,n,t,u,c,a=on(e.element()),l=ge.fromTag($(e.element()),a.dom()),f=m.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),s=0<f.length?(r=e.element(),o=l,i=f,ct(r).map(function(e){var n=i.join(","),t=Dn(e,n,function(e){return en(e,r)});return I(t,function(e,n){var t=st(n);return ue(t,"contenteditable"),pn(e,t),t},o)}).getOr(o)):l;return pn(s,ge.fromTag("br")),n=e.element(),t=l,u=n.dom(),c=t.dom(),de(u)&&de(c)&&(c.style.cssText=u.style.cssText),Ce(l,"height"),1!==e.colspan()&&Ce(e.element(),"width"),d(e.element(),l),l},replace:pt,gap:gt}},wt=function(e){return{row:vt(e),cell:gt,replace:ht,gap:gt}},yt=function(e,n){var t=n.column(),r=n.column()+n.colspan()-1,o=n.row(),i=n.row()+n.rowspan()-1;return t<=e.finishCol()&&r>=e.startCol()&&o<=e.finishRow()&&i>=e.startRow()},St=function(e,n){return n.column()>=e.startCol()&&n.column()+n.colspan()-1<=e.finishCol()&&n.row()>=e.startRow()&&n.row()+n.rowspan()-1<=e.finishRow()},xt=function(e,n){return t=Math.min(e.row(),n.row()),r=Math.min(e.column(),n.column()),o=Math.max(e.row()+e.rowspan()-1,n.row()+n.rowspan()-1),i=Math.max(e.column()+e.colspan()-1,n.column()+n.colspan()-1),{startRow:b(t),startCol:b(r),finishRow:b(o),finishCol:b(i)};var t,r,o,i},Ct=function(e,n,t){var r=Qn.findItem(e,n,en),o=Qn.findItem(e,t,en);return r.bind(function(n){return o.map(function(e){return xt(n,e)})})},Rt=function(n,e,t){return Ct(n,e,t).bind(function(e){return function(e,n){for(var t=!0,r=y(St,n),o=n.startRow();o<=n.finishRow();o++)for(var i=n.startCol();i<=n.finishCol();i++)t=t&&Qn.getAt(e,o,i).exists(r);return t?C.some(n):C.none()}(n,e)})},Tt=function(t,e,n){return Ct(t,e,n).map(function(e){var n=Qn.filterItems(t,y(yt,e));return k(n,function(e){return e.element()})})},Ot=function(e,n){return Qn.findItem(e,n,function(e,n){return tn(n,e)}).map(function(e){return e.element()})},Dt=function(u,c,a){return $n(u).bind(function(e){var r,n,o,i,t=Et(e);return r=t,n=u,o=c,i=a,Qn.findItem(r,n,en).bind(function(e){var n=0<o?e.row()+e.rowspan()-1:e.row(),t=0<i?e.column()+e.colspan()-1:e.column();return Qn.getAt(r,n+o,t+i).map(function(e){return e.element()})})})},At=function(e,n,t,r,o){var i=Et(e),u=en(e,t)?C.some(n):Ot(i,n),c=en(e,o)?C.some(r):Ot(i,r);return u.bind(function(n){return c.bind(function(e){return Tt(i,n,e)})})},Et=function(e){var n=Gn(e);return Qn.generate(n)},kt=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];function Bt(){return{up:b({selector:Nn,closest:Mn,predicate:Bn,all:cn}),down:b({selector:En,predicate:On}),styles:b({get:ye,getRaw:xe,set:be,remove:Ce}),attrs:b({get:re,set:ne,remove:ue,copyTo:function(e,n){var t=ce(e);te(n,t)}}),insert:b({before:dn,after:mn,afterAll:vn,append:pn,appendAll:bn,prepend:gn,wrap:hn}),remove:b({unwrap:Sn,remove:yn}),create:b({nu:ge.fromTag,clone:function(e){return ge.fromDom(e.dom().cloneNode(!1))},text:ge.fromText}),query:b({comparePosition:function(e,n){return e.dom().compareDocumentPosition(n.dom())},prevSibling:an,nextSibling:ln}),property:b({children:fn,name:$,parent:un,document:function(e){return e.dom().ownerDocument},isText:Z,isComment:J,isElement:Q,getText:nt,setText:rt,isBoundary:function(e){return!!Q(e)&&("body"===$(e)||A(kt,$(e)))},isEmptyTag:function(e){return!!Q(e)&&A(["br","img","hr","input"],$(e))},isNonEditable:function(e){return Q(e)&&"false"===re(e,"contenteditable")}}),eq:en,is:rn}}var Nt=function(r,o,e,n){var t=o(r,e);return I(n,function(e,n){var t=o(r,n);return It(r,e,t)},t)},It=function(n,e,t){return e.bind(function(e){return t.filter(y(n.eq,e))})},Pt=function(e,n,t){return 0<t.length?Nt(e,n,(r=t)[0],r.slice(1)):C.none();var r},Mt=function(t,e,n,r){void 0===r&&(r=f);var o=[e].concat(t.up().all(e)),i=[n].concat(t.up().all(n)),u=function(n){return _(n,r).fold(function(){return n},function(e){return n.slice(0,e+1)})},c=u(o),a=u(i),l=M(c,function(e){return E(a,(n=e,y(t.eq,n)));var n});return{firstpath:b(c),secondpath:b(a),shared:b(l)}},_t=Bt(),Wt=function(t,e){return Pt(_t,function(e,n){return t(n)},e)},jt=function(e){return Nn(e,"table")},zt=function(l,f,s){var d=function(n){return function(e){return s!==undefined&&s(e)||en(e,n)}};return en(l,f)?C.some({boxes:C.some([l]),start:l,finish:f}):jt(l).bind(function(a){return jt(f).bind(function(i){if(en(a,i))return C.some({boxes:(o=l,u=f,c=Et(a),Tt(c,o,u)),start:l,finish:f});if(tn(a,i)){var e=0<(n=Dn(f,"td,th",d(a))).length?n[n.length-1]:f;return C.some({boxes:At(a,l,a,f,i),start:l,finish:e})}if(tn(i,a)){var n,t=0<(n=Dn(l,"td,th",d(i))).length?n[n.length-1]:l;return C.some({boxes:At(i,l,a,f,i),start:l,finish:t})}return Mt(_t,l,f,r).shared().bind(function(e){return Mn(e,"table",s).bind(function(e){var n=Dn(f,"td,th",d(e)),t=0<n.length?n[n.length-1]:f,r=Dn(l,"td,th",d(e)),o=0<r.length?r[r.length-1]:l;return C.some({boxes:At(e,l,a,f,i),start:o,finish:t})})});var r,o,u,c})})},Lt=function(e,n){var t=En(e,n);return 0<t.length?C.some(t):C.none()},Ft=function(e,n,r){return Pn(e,n).bind(function(t){return Pn(e,r).bind(function(n){return Wt(jt,[t,n]).map(function(e){return{first:b(t),last:b(n),table:b(e)}})})})},Ht=function(e,n,t,r,o){return i=o,M(e,function(e){return Qe(e,i)}).bind(function(e){return Dt(e,n,t).bind(function(e){return t=r,Nn(n=e,"table").bind(function(e){return Pn(e,t).bind(function(e){return zt(e,n).bind(function(n){return n.boxes.map(function(e){return{boxes:e,start:n.start,finish:n.finish}})})})});var n,t})});var i},qt=function(r,e,n){return Ft(r,e,n).bind(function(u){var e=function(e){return en(r,e)},n=Nn(u.first(),"thead,tfoot,tbody,table",e),t=Nn(u.last(),"thead,tfoot,tbody,table",e);return n.bind(function(i){return t.bind(function(e){return en(i,e)?(n=u.table(),t=u.first(),r=u.last(),o=Et(n),Rt(o,t,r)):C.none();var n,t,r,o})})})},Ut="data-mce-first-selected",Vt="data-mce-last-selected",Kt="td[data-mce-selected],th[data-mce-selected]",Xt="[data-mce-selected]",$t=Ut,Gt="td[data-mce-first-selected],th[data-mce-first-selected]",Yt=Vt,Jt="td[data-mce-last-selected],th[data-mce-last-selected]",Qt=/* */Object.freeze({__proto__:null,selected:"data-mce-selected",selectedSelector:Kt,attributeSelector:Xt,firstSelected:$t,firstSelectedSelector:Gt,lastSelected:Yt,lastSelectedSelector:Jt}),Zt=function(u){if(!h(u))throw new Error("cases must be an array");if(0===u.length)throw new Error("there must be at least one case");var c=[],t={};return B(u,function(e,r){var n=F(e);if(1!==n.length)throw new Error("one and only one name per case");var o=n[0],i=e[o];if(t[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!h(i))throw new Error("case arguments must be an array");c.push(o),t[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var t=new Array(e),n=0;n<t.length;n++)t[n]=arguments[n];return{fold:function(){if(arguments.length!==u.length)throw new Error("Wrong number of arguments to fold. Expected "+u.length+", got "+arguments.length);return arguments[r].apply(null,t)},match:function(e){var n=F(e);if(c.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+c.join(",")+"\nActual: "+n.join(","));if(!z(c,function(e){return A(n,e)}))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+c.join(", "));return e[o].apply(null,t)},log:function(e){p.console.log(e,{constructors:c,constructor:o,params:t})}}}}),t},er=Zt([{none:[]},{multiple:["elements"]},{single:["selection"]}]),nr=function(e,n,t,r){return e.fold(n,t,r)},tr=er.none,rr=er.multiple,or=er.single,ir=function(e,n){return nr(n.get(),b([]),o,b([e]))},ur=function(e){return{element:b(e),mergable:C.none,unmergable:C.none,selection:b([e])}},cr=function(e,n,t){return{element:b(t),mergable:b((o=n,nr(e.get(),C.none,function(n,e){return 0===n.length?C.none():qt(o,Gt,Jt).bind(function(e){return 1<n.length?C.some({bounds:b(e),cells:b(n)}):C.none()})},C.none))),unmergable:b(0<(r=ir(t,e)).length&&z(r,function(e){return ie(e,"rowspan")&&1<parseInt(re(e,"rowspan"),10)||ie(e,"colspan")&&1<parseInt(re(e,"colspan"),10)})?C.some(r):C.none()),selection:b(ir(t,e))};var r,o},ar=function(d,e,m,g){d.on("BeforeGetContent",function(t){!0===t.selection&&nr(e.get(),x,function(e){t.preventDefault(),$n(e[0]).map(dt).map(function(e){return[Zn(e,Xt)]}).each(function(e){var n;t.content="text"===t.format?k(e,function(e){return e.dom().innerText}).join(""):(n=d,k(e,function(e){return n.selection.serializer.serialize(e.dom(),{})}).join(""))})},x)}),d.on("BeforeSetContent",function(s){!0===s.selection&&!0===s.paste&&C.from(d.dom.getParent(d.selection.getStart(),"th,td")).each(function(e){var f=ge.fromDom(e);$n(f).each(function(n){var e,t,r,o,i,u=N((e=s.content,(r=(t||p.document).createElement("div")).innerHTML=e,fn(ge.fromDom(r))),function(e){return"meta"!==$(e)});if(1===u.length&&"table"===$(u[0])){s.preventDefault();var c=ge.fromDom(d.getDoc()),a=wt(c),l=(o=f,i=u[0],{element:b(o),clipboard:b(i),generators:b(a)});m.pasteCells(n,l).each(function(e){d.selection.setRng(e),d.focus(),g.clear(n)})}})})})};function lr(r,o){var e=function(e){var n=o(e);if(n<=0||null===n){var t=ye(e,r);return parseFloat(t)||0}return n},i=function(o,e){return P(e,function(e,n){var t=ye(o,n),r=t===undefined?0:parseInt(t,10);return isNaN(r)?e:e+r},0)};return{set:function(e,n){if(!R(n)&&!n.match(/^[0-9]+$/))throw new Error(r+".set accepts only positive integer values. Value was "+n);var t=e.dom();de(t)&&(t.style[r]=n+"px")},get:e,getOuter:e,aggregate:i,max:function(e,n,t){var r=i(e,t);return r<n?n-r:0}}}var fr=lr("height",function(e){var n=e.dom();return pe(e)?n.getBoundingClientRect().height:n.offsetHeight}),sr=function(e){return fr.get(e)},dr=function(e){return fr.getOuter(e)},mr=lr("width",function(e){return e.dom().offsetWidth}),gr=function(e){return mr.get(e)},pr=function(e){return mr.getOuter(e)},hr=function(e,n,t){return r=ye(e,n),o=t,i=parseFloat(r),isNaN(i)?o:i;var r,o,i},vr=function(e){return(c=Je()).browser.isIE()||c.browser.isEdge()?(t=hr(n=e,"padding-top",0),r=hr(n,"padding-bottom",0),o=hr(n,"border-top-width",0),i=hr(n,"border-bottom-width",0),u=n.dom().getBoundingClientRect().height,"border-box"===ye(n,"box-sizing")?u:u-t-r-(o+i)):hr(e,"height",sr(e));var n,t,r,o,i,u,c},br=/(\d+(\.\d+)?)(\w|%)*/,wr=/(\d+(\.\d+)?)%/,yr=/(\d+(\.\d+)?)px|em/,Sr=function(e,n){be(e,"width",n+"px")},xr=function(e,n){be(e,"width",n+"%")},Cr=function(e,n){be(e,"height",n+"px")},Rr=function(e,n,t,r){var o,i,u,c,a,l,f,s=parseInt(e,10);return ae(l=e,f="%",l.length-f.length)&&"table"!==$(n)?(i=s,u=t,c=r,a=$n(o=n).map(function(e){var n=u(e);return Math.floor(i/100*n)}).getOr(i),c(o,a),a):s},Tr=function(e){var n,t=xe(n=e,"height").getOrThunk(function(){return vr(n)+"px"});return t?Rr(t,e,sr,Cr):sr(e)},Or=function(e){return xe(e,"width").fold(function(){return C.from(re(e,"width"))},function(e){return C.some(e)})},Dr=function(e,n){return e/n.pixelWidth()*100},Ar=function(n,t){return Or(n).fold(function(){var e=gr(n);return Dr(e,t)},function(e){return function(e,n,t){var r=wr.exec(n);if(null!==r)return parseFloat(r[1]);var o=gr(e);return Dr(o,t)}(n,e,t)})},Er=function(n,t){return Or(n).fold(function(){return gr(n)},function(e){return function(e,n,t){var r=yr.exec(n);if(null!==r)return parseInt(r[1],10);var o=wr.exec(n);if(null===o)return gr(e);var i=parseFloat(o[1]);return i/100*t.pixelWidth()}(n,e,t)})},kr=function(e){return t="rowspan",Tr(n=e)/Wn(n,t);var n,t},Br=function(e,n,t){be(e,"width",n+t)},Nr=b(wr),Ir=b(yr),Pr=function(t,r){Or(t).bind(function(e){var n=br.exec(e);return null!==n?C.some({width:b(parseFloat(n[1])),unit:b(n[3])}):C.none()}).each(function(e){var n=e.width()/2;Br(t,n,e.unit()),Br(r,n,e.unit())})},Mr=function(t,r){return{left:b(t),top:b(r),translate:function(e,n){return Mr(t+e,r+n)}}},_r=Mr,Wr=function(e,n){return e!==undefined?e:n!==undefined?n:0},jr=function(e){var n=e.dom().ownerDocument,t=n.body,r=n.defaultView,o=n.documentElement;if(t===e.dom())return _r(t.offsetLeft,t.offsetTop);var i=Wr(r.pageYOffset,o.scrollTop),u=Wr(r.pageXOffset,o.scrollLeft),c=Wr(o.clientTop,t.clientTop),a=Wr(o.clientLeft,t.clientLeft);return zr(e).translate(u-a,i-c)},zr=function(e){var n,t=e.dom(),r=t.ownerDocument.body;return r===t?_r(r.offsetLeft,r.offsetTop):pe(e)?(n=t.getBoundingClientRect(),_r(n.left,n.top)):_r(0,0)},Lr=function(e,n){return{row:e,y:n}},Fr=function(e,n){return{col:e,x:n}},Hr=function(e){return jr(e).left()+pr(e)},qr=function(e){return jr(e).left()},Ur=function(e,n){return Fr(e,qr(n))},Vr=function(e,n){return Fr(e,Hr(n))},Kr=function(e){return jr(e).top()},Xr=function(e,n){return Lr(e,Kr(n))},$r=function(e,n){return Lr(e,Kr(n)+dr(n))},Gr=function(t,n,r){if(0===r.length)return[];var e=k(r.slice(1),function(e,n){return e.map(function(e){return t(n,e)})}),o=r[r.length-1].map(function(e){return n(r.length-1,e)});return e.concat([o])},Yr={delta:o,positions:function(e){return Gr(Xr,$r,e)},edge:Kr},Jr={ltr:{delta:o,edge:qr,positions:function(e){return Gr(Ur,Vr,e)}},rtl:{delta:function(e){return-e},edge:Hr,positions:function(e){return Gr(Vr,Ur,e)}}};function Qr(n){var t=function(e){return n(e).isRtl()?Jr.rtl:Jr.ltr};return{delta:function(e,n){return t(n).delta(e,n)},edge:function(e){return t(e).edge(e)},positions:function(e,n){return t(n).positions(e,n)}}}var Zr=function(e){var n=Gn(e);return Qn.generate(n).grid},eo=function(e){for(var n=[],t=function(e){n.push(e)},r=0;r<e.length;r++)e[r].each(t);return n},no=function(e,n,t,r){t===r?ue(e,n):ne(e,n,t)},to=function(o,e){var i=[],u=[],n=function(e,n){0<e.length?function(e,n){var t=In(o,n).getOrThunk(function(){var e=ge.fromTag(n,on(o).dom());return pn(o,e),e});wn(t);var r=k(e,function(e){e.isNew()&&i.push(e.element());var n=e.element();return wn(n),B(e.cells(),function(e){e.isNew()&&u.push(e.element()),no(e.element(),"colspan",e.colspan(),1),no(e.element(),"rowspan",e.rowspan(),1),pn(n,e.element())}),n});bn(t,r)}(e,n):In(o,n).each(yn)},t=[],r=[],c=[];return B(e,function(e){switch(e.section()){case"thead":t.push(e);break;case"tbody":r.push(e);break;case"tfoot":c.push(e)}}),n(t,"thead"),n(r,"tbody"),n(c,"tfoot"),{newRows:i,newCells:u}},ro=function(e,n){var t=re(e,n);return t===undefined||""===t?[]:t.split(" ")},oo=function(e){return e.dom().classList!==undefined},io=function(e,n){return o=n,i=ro(t=e,r="class").concat([o]),ne(t,r,i.join(" ")),!0;var t,r,o,i},uo=function(e,n){return o=n,0<(i=N(ro(t=e,r="class"),function(e){return e!==o})).length?ne(t,r,i.join(" ")):ue(t,r),!1;var t,r,o,i},co=function(e,n){oo(e)?e.dom().classList.add(n):io(e,n)},ao=function(e){0===(oo(e)?e.dom().classList:ro(e,"class")).length&&ue(e,"class")},lo=function(e,n){return oo(e)&&e.dom().classList.contains(n)},fo=function(e,n){for(var t=[],r=e;r<n;r++)t.push(r);return t},so=function(r,o){if(o<0||o>=r.length-1)return C.none();var e=r[o].fold(function(){var e,n,t=(e=r.slice(0,o),(n=T.call(e,0)).reverse(),n);return L(t,function(e,n){return e.map(function(e){return{value:e,delta:n+1}})})},function(e){return C.some({value:e,delta:0})}),n=r[o+1].fold(function(){var e=r.slice(o+1);return L(e,function(e,n){return e.map(function(e){return{value:e,delta:n+1}})})},function(e){return C.some({value:e,delta:1})});return e.bind(function(t){return n.map(function(e){var n=e.delta+t.delta;return Math.abs(e.value-t.value)/n})})},mo=function(t){var e=t.grid,n=fo(0,e.columns()),r=fo(0,e.rows());return k(n,function(n){return go(function(){return j(r,function(e){return Qn.getAt(t,e,n).filter(function(e){return e.column()===n}).fold(b([]),function(e){return[e]})})},function(e){return 1===e.colspan()},function(){return Qn.getAt(t,0,n)})})},go=function(e,n,t){var r=e();return M(r,n).orThunk(function(){return C.from(r[0]).orThunk(t)}).map(function(e){return e.element()})},po=function(t){var e=t.grid,n=fo(0,e.rows()),r=fo(0,e.columns());return k(n,function(n){return go(function(){return j(r,function(e){return Qn.getAt(t,n,e).filter(function(e){return e.row()===n}).fold(b([]),function(e){return[e]})})},function(e){return 1===e.rowspan()},function(){return Qn.getAt(t,n,0)})})},ho=function(e){var n=e.replace(/\./g,"-");return{resolve:function(e){return n+"-"+e}}},vo=ho("ephox-snooker").resolve,bo=vo("resizer-bar"),wo=vo("resizer-rows"),yo=vo("resizer-cols"),So=function(e){var n=En(e.parent(),"."+bo);B(n,yn)},xo=function(t,e,r){var o=t.origin();B(e,function(e){e.each(function(e){var n=r(o,e);co(n,bo),pn(t.parent(),n)})})},Co=function(e,n,l,f){xo(e,n,function(e,n){var t,r,o,i,u,c,a=(t=n.col,r=n.x-e.left(),o=l.top()-e.top(),i=7,u=f,c=ge.fromTag("div"),we(c,{position:"absolute",left:r-i/2+"px",top:o+"px",height:u+"px",width:i+"px"}),te(c,{"data-column":t,role:"presentation"}),c);return co(a,yo),a})},Ro=function(e,n,l,f){xo(e,n,function(e,n){var t,r,o,i,u,c,a=(t=n.row,r=l.left()-e.left(),o=n.y-e.top(),i=f,u=7,c=ge.fromTag("div"),we(c,{position:"absolute",left:r+"px",top:o-u/2+"px",height:u+"px",width:i+"px"}),te(c,{"data-row":t,role:"presentation"}),c);return co(a,wo),a})},To=function(e,n,t,r){So(e);var o=Gn(n),i=Qn.generate(o);!function(e,n,t,r,o,i){var u=jr(n),c=0<t.length?o.positions(t,n):[];Ro(e,c,u,pr(n));var a=0<r.length?i.positions(r,n):[];Co(e,a,u,dr(n))}(e,n,po(i),mo(i),t,r)},Oo=function(e,n){var t=En(e.parent(),"."+bo);B(t,n)},Do=function(e){Oo(e,function(e){be(e,"display","none")})},Ao=function(e){Oo(e,function(e){be(e,"display","block")})},Eo=function(e,n,t){e.cells()[n]=t},ko=function(e,n){return Tn(n,e.section())},Bo=function(e,n){var t=e.cells(),r=k(t,n);return Tn(r,e.section())},No=function(e,n){return e.cells()[n]},Io=function(e,n){return No(e,n).element()},Po=function(e){return e.cells().length},Mo=function(e,n){if(0===e.length)return 0;var t=e[0];return _(e,function(e){return!n(t.element(),e.element())}).fold(function(){return e.length},function(e){return e})},_o=function(e,n,t,r){var o,i=e[n].cells().slice(t),u=Mo(i,r),c=(o=t,k(e,function(e){return No(e,o)}).slice(n));return{colspan:u,rowspan:Mo(c,r)}},Wo=function(a,l){var f=k(a,function(e){return k(e.cells(),function(){return!1})});return k(a,function(e,c){var n,t,r=j(e.cells(),function(e,n){if(!1!==f[c][n])return[];var t,r,o,i,u=_o(a,c,n,l);return function(e,n,t,r){for(var o=e;o<e+t;o++)for(var i=n;i<n+r;i++)f[o][i]=!0}(c,n,u.rowspan,u.colspan),[(t=e.element(),r=u.rowspan,o=u.colspan,i=e.isNew(),{element:b(t),rowspan:b(r),colspan:b(o),isNew:b(i)})]});return n=r,t=e.section(),{details:b(n),section:b(t)}})},jo=function(e,n,t){for(var r=[],o=0;o<e.grid.rows();o++){for(var i=[],u=0;u<e.grid.columns();u++){var c=Qn.getAt(e,o,u).map(function(e){return Rn(e.element(),t)}).getOrThunk(function(){return Rn(n.gap(),!0)});i.push(c)}var a=Tn(i,e.all[o].section());r.push(a)}return r},zo=function(e,c){return k(e,function(e){var n,t,r,o,i,u=(n=e.details(),L(n,function(e){return un(e.element()).map(function(e){var n=un(e).isNone();return Rn(e,n)})}).getOrThunk(function(){return Rn(c.row(),!0)}));return t=u.element(),r=e.details(),o=e.section(),i=u.isNew(),{element:b(t),cells:b(r),section:b(o),isNew:b(i)}})},Lo=function(e,n){var t=Wo(e,en);return zo(t,n)},Fo=function(e,n){return L(e.all,function(e){return M(e.cells(),function(e){return en(n,e.element())})})},Ho=function(c,a,l,f,s){return function(t,r,e,o,i){var n=Gn(r),u=Qn.generate(n);return a(u,e).map(function(e){var n=jo(u,o,!1),t=c(n,e,en,s(o)),r=Lo(t.grid(),o);return{grid:b(r),cursor:t.cursor}}).fold(function(){return C.none()},function(e){var n=to(r,e.grid());return l(r,e.grid(),i),f(r),To(t,r,Yr,i),C.some({cursor:e.cursor,newRows:b(n.newRows),newCells:b(n.newCells)})})}},qo=function(n,e){return Vn(e.element()).bind(function(e){return Fo(n,e)})},Uo=function(n,e){var t=k(e.selection(),function(e){return Vn(e).bind(function(e){return Fo(n,e)})}),r=eo(t);return 0<r.length?C.some({cells:r,generators:e.generators,clipboard:e.clipboard}):C.none()},Vo=function(n,e){var t=k(e.selection(),function(e){return Vn(e).bind(function(e){return Fo(n,e)})}),r=eo(t);return 0<r.length?C.some(r):C.none()},Ko=function(t){return{is:function(e){return t===e},isValue:i,isError:f,getOr:b(t),getOrThunk:b(t),getOrDie:b(t),or:function(e){return Ko(t)},orThunk:function(e){return Ko(t)},fold:function(e,n){return n(t)},map:function(e){return Ko(e(t))},mapError:function(e){return Ko(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOption:function(){return C.some(t)}}},Xo=function(t){return{is:f,isValue:f,isError:i,getOr:o,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(t),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,n){return e(t)},map:function(e){return Xo(t)},mapError:function(e){return Xo(e(t))},each:x,bind:function(e){return Xo(t)},exists:f,forall:i,toOption:C.none}},$o={value:Ko,error:Xo,fromOption:function(e,n){return e.fold(function(){return Xo(n)},Ko)}},Go=function(e,n){return{rowDelta:0,colDelta:Po(e[0])-Po(n[0])}},Yo=function(e,n){return k(e,function(){return Rn(n.cell(),!0)})},Jo=function(n,e,t){return n.concat(function(e,n){for(var t=[],r=0;r<e;r++)t.push(n(r));return t}(e,function(e){return ko(n[n.length-1],Yo(n[n.length-1].cells(),t))}))},Qo=function(e,n,t){return k(e,function(e){return ko(e,e.cells().concat(Yo(fo(0,n),t)))})},Zo=function(e,n,t){var r=n.colDelta<0?Qo:o;return(n.rowDelta<0?Jo:o)(r(e,Math.abs(n.colDelta),t),Math.abs(n.rowDelta),t)},ei=function(e,n,t,r){for(var o=!0,i=0;i<e.length;i++)for(var u=0;u<Po(e[0]);u++){var c=t(Io(e[i],u),n);!0===c&&!1===o?Eo(e[i],u,Rn(r(),!0)):!0===c&&(o=!1)}return e},ni=function(i,t,u,c){if(0<t&&t<i.length){var e=i[t-1].cells(),n=(r=u,P(e,function(e,n){return E(e,function(e){return r(e.element(),n.element())})?e:e.concat([n])},[]));B(n,function(r){for(var o=C.none(),e=function(t){for(var e=function(n){var e=i[t].cells()[n];u(e.element(),r.element())&&(o.isNone()&&(o=C.some(c())),o.each(function(e){Eo(i[t],n,Rn(e,!0))}))},n=0;n<Po(i[0]);n++)e(n)},n=t;n<i.length;n++)e(n)})}var r;return i},ti=function(t,r,o,i,u){return function(e,n,t){if(e.row()>=n.length||e.column()>Po(n[0]))return $o.error("invalid start address out of table bounds, row: "+e.row()+", column: "+e.column());var r=n.slice(e.row()),o=r[0].cells().slice(e.column()),i=Po(t[0]),u=t.length;return $o.value({rowDelta:r.length-u,colDelta:o.length-i})}(t,r,o).map(function(e){var n=Zo(r,e,i);return function(e,n,t,r,o){for(var i,u,c,a,l,f=e.row(),s=e.column(),d=f+t.length,m=s+Po(t[0]),g=f;g<d;g++)for(var p=s;p<m;p++){c=p,l=a=void 0,a=y(o,No((i=n)[u=g],c).element()),l=i[u],1<i.length&&1<Po(l)&&(0<c&&a(Io(l,c-1))||c<l.cells().length-1&&a(Io(l,c+1))||0<u&&a(Io(i[u-1],c))||u<i.length-1&&a(Io(i[u+1],c)))&&ei(n,Io(n[g],p),o,r.cell);var h=Io(t[g-f],p-s),v=r.replace(h);Eo(n[g],p,Rn(v,!0))}return n}(t,n,o,i,u)})},ri=function(e,n,t,r,o){ni(n,e,o,r.cell);var i=Go(t,n),u=Zo(t,i,r),c=Go(n,u),a=Zo(n,c,r);return a.slice(0,e).concat(u).concat(a.slice(e,a.length))},oi=function(t,r,e,o,i){var n=t.slice(0,r),u=t.slice(r),c=Bo(t[e],function(e,n){return 0<r&&r<t.length&&o(Io(t[r-1],n),Io(t[r],n))?No(t[r],n):Rn(i(e.element(),o),!0)});return n.concat([c]).concat(u)},ii=function(e,l,f,s,d){return k(e,function(e){var n,t,r,o,i,u,c,a=0<l&&l<Po(e)&&s(Io(e,l-1),Io(e,l))?No(e,l):Rn(d(Io(e,f),s),!0);return t=l,r=a,o=(n=e).cells(),i=o.slice(0,t),u=o.slice(t),c=i.concat([r]).concat(u),ko(n,c)})},ui=function(e,t,r,o){return k(e,function(e){return Bo(e,function(e){return n=e,E(t,function(e){return r(n.element(),e.element())})?Rn(o(e.element(),r),!0):e;var n})})},ci=function(e,n,t,r){return Io(e[n],t)!==undefined&&0<n&&r(Io(e[n-1],t),Io(e[n],t))},ai=function(e,n,t){return 0<n&&t(Io(e,n-1),Io(e,n))},li=function(t,r,o,e){var n=j(t,function(e,n){return ci(t,n,r,o)||ai(e,r,o)?[]:[No(e,r)]});return ui(t,n,o,e)},fi=function(t,r,o,e){var i=t[r],n=j(i.cells(),function(e,n){return ci(t,r,n,o)||ai(i,n,o)?[]:[e]});return ui(t,n,o,e)},si=Zt([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]),di=Re({},si),mi=function(e,n,i,u){var t,r,c=e.slice(0),o=(r=n,0===(t=e).length?di.none():1===t.length?di.only(0):0===r?di.left(0,1):r===t.length-1?di.right(r-1,r):0<r&&r<t.length-1?di.middle(r-1,r,r+1):di.none()),a=function(e){return k(e,b(0))},l=b(a(c)),f=function(e,n){if(0<=i){var t=Math.max(u.minCellWidth(),c[n]-i);return a(c.slice(0,e)).concat([i,t-c[n]]).concat(a(c.slice(n+1)))}var r=Math.max(u.minCellWidth(),c[e]+i),o=c[e]-r;return a(c.slice(0,e)).concat([r-c[e],o]).concat(a(c.slice(n+1)))},s=f;return o.fold(l,function(e){return u.singleColumnWidth(c[e],i)},s,function(e,n,t){return f(n,t)},function(e,n){if(0<=i)return a(c.slice(0,n)).concat([i]);var t=Math.max(u.minCellWidth(),c[n]+i);return a(c.slice(0,n)).concat([t-c[n]])})},gi=function(e,n,t,r,o){var i=mo(e),u=k(i,function(e){return e.map(n.edge)});return k(i,function(e,n){return e.filter(a(jn)).fold(function(){var e=so(u,n);return r(e)},function(e){return t(e,o)})})},pi=function(e,n,t){return gi(e,n,Ar,function(e){return e.fold(function(){return t.minCellWidth()},function(e){return e/t.pixelWidth()*100})},t)},hi=function(e,n,t){return gi(e,n,Er,function(e){return e.getOrThunk(t.minCellWidth)},t)},vi=function(e,n){return t=n,r=kr,o=function(e){return e.getOrThunk(Hn)},i=po(e),u=k(i,function(e){return e.map(t.edge)}),k(i,function(e,n){return e.filter(a(zn)).fold(function(){var e=so(u,n);return o(e)},function(e){return r(e)})});var t,r,o,i,u},bi=function(e,n,t){for(var r=0,o=e;o<n;o++)r+=t[o]!==undefined?t[o]:0;return r},wi=function(e,t){var n=Qn.justCells(e);return k(n,function(e){var n=bi(e.column(),e.column()+e.colspan(),t);return{element:e.element(),width:n,colspan:e.colspan()}})},yi=function(e){return{width:b(e),pixelWidth:b(e),getWidths:hi,getCellDelta:o,singleColumnWidth:function(e,n){return[Math.max(Fn(),e+n)-e]},minCellWidth:Fn,setElementWidth:Sr,setTableWidth:function(e,n,t){var r=I(n,function(e,n){return e+n},0);Sr(e,r)}}},Si=function(e,n){var t,r,o,i,u=Nr().exec(n);if(null!==u)return t=u[1],r=e,o=parseFloat(t),i=gr(r),{width:b(o),pixelWidth:b(i),getWidths:pi,getCellDelta:function(e){return e/i*100},singleColumnWidth:function(e,n){return[100-e]},minCellWidth:function(){return Fn()/i*100},setElementWidth:xr,setTableWidth:function(e,n,t){xr(e,o+t/100*o)}};var c=Ir().exec(n);if(null!==c){var a=parseInt(c[1],10);return yi(a)}var l=gr(e);return yi(l)},xi=function(n){return Or(n).fold(function(){var e=gr(n);return yi(e)},function(e){return Si(n,e)})},Ci=function(e){return Qn.generate(e)},Ri=function(e){var n=Gn(e);return Ci(n)},Ti=function(e,t,r,n){var o,i,u,c,a=Ri(e),l=vi(a,n),f=k(l,function(e,n){return r===n?Math.max(t+e,Hn()):e}),s=(o=a,i=f,u=Qn.justCells(o),k(u,function(e){var n=bi(e.row(),e.row()+e.rowspan(),i);return{element:e.element,height:b(n),rowspan:e.rowspan}})),d=(c=f,k(a.all,function(e,n){return{element:e.element,height:b(c[n])}}));B(d,function(e){Cr(e.element(),e.height())}),B(s,function(e){Cr(e.element(),e.height())});var m=I(f,function(e,n){return e+n},0);Cr(e,m)},Oi=function(e){return e.slice(0).sort()},Di=function(r,o,i){if(0===o.length)throw new Error("You must specify at least one required field.");var t;return function(n,e){if(!h(e))throw new Error("The "+n+" fields must be an array. Was: "+e+".");B(e,function(e){if(!g(e))throw new Error("The value "+e+" in the "+n+" fields was not a string.")})}("required",o),t=Oi(o),M(t,function(e,n){return n<t.length-1&&e===t[n+1]}).each(function(e){throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+t.join(", ")+"].")}),function(n){var t=F(n);z(o,function(e){return A(t,e)})||function(e,n){throw new Error("All required keys ("+Oi(e).join(", ")+") were not specified. Specified keys were: "+Oi(n).join(", ")+".")}(o,t),r(o,t);var e=N(o,function(e){return!i.validate(n[e],e)});return 0<e.length&&function(e,n){throw new Error("All values need to be of type: "+n+". Keys ("+Oi(e).join(", ")+") were not.")}(e,i.label),n}},Ai=function(n,e){var t=N(e,function(e){return!A(n,e)});0<t.length&&function(e){throw new Error("Unsupported keys for object: "+Oi(e).join(", "))}(t)},Ei=function(e){return Di(Ai,e,{validate:w,label:"function"})},ki=Ei(["cell","row","replace","gap"]),Bi=function(e){var n=_n(e,"colspan",1),t=_n(e,"rowspan",1);return{element:b(e),colspan:b(n),rowspan:b(t)}},Ni=function(r,o){void 0===o&&(o=Bi),ki(r);var t=S(C.none()),i=function(e){var n,t=o(e);return n=t,r.cell(n)},u=function(e){var n=i(e);return t.get().isNone()&&t.set(C.some(n)),c=C.some({item:e,replacement:n}),n},c=C.none();return{getOrInit:function(n,t){return c.fold(function(){return u(n)},function(e){return t(n,e.item)?e.replacement:u(n)})},cursor:t.get}},Ii=function(c,a){return function(r){var o=S(C.none());ki(r);var i=[],u=function(e){var n={scope:c},t=r.replace(e,a,n);return i.push({item:e,sub:t}),o.get().isNone()&&o.set(C.some(t)),t};return{replaceOrInit:function(n,t){return r=n,o=t,M(i,function(e){return o(e.item,r)}).fold(function(){return u(n)},function(e){return t(n,e.item)?e.sub:u(n)});var r,o},cursor:o.get}}},Pi=function(t){ki(t);var e=S(C.none());return{combine:function(n){return e.get().isNone()&&e.set(C.some(n)),function(){var e=t.cell({element:b(n),colspan:b(1),rowspan:b(1)});return Ce(e,"width"),Ce(n,"width"),e}},cursor:e.get}},Mi=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],_i=Bt(),Wi=function(e){return n=e,t=_i.property().name(n),A(Mi,t);var n,t},ji=function(e){return n=e,t=_i.property().name(n),A(["ol","ul"],t);var n,t},zi=function(e){return n=e,A(["br","img","hr","input"],_i.property().name(n));var n},Li=function(e){var n,i=function(e){return"br"===$(e)},t=function(o){return at(o).bind(function(t){var r=ln(t).map(function(e){return!!Wi(e)||!!zi(e)&&"img"!==$(e)}).getOr(!1);return un(t).map(function(e){return!0===r||("li"===$(n=e)||Bn(n,ji).isSome())||i(t)||Wi(e)&&!en(o,e)?[]:[ge.fromTag("br")];var n})}).getOr([])},r=0===(n=j(e,function(e){var n=fn(e);return z(n,function(e){return i(e)||Z(e)&&0===nt(e).trim().length})?[]:n.concat(t(e))})).length?[ge.fromTag("br")]:n;wn(e[0]),bn(e[0],r)},Fi=function(e){0===Kn(e).length&&yn(e)},Hi=function(e,n){return{grid:b(e),cursor:b(n)}},qi=function(e,n,t){return Ui(e,n,t).orThunk(function(){return Ui(e,0,0)})},Ui=function(e,n,t){return C.from(e[n]).bind(function(e){return C.from(e.cells()[t]).bind(function(e){return C.from(e.element())})})},Vi=function(e,n,t){return Hi(e,Ui(e,n,t))},Ki=function(e){return P(e,function(e,n){return E(e,function(e){return e.row()===n.row()})?e:e.concat([n])},[]).sort(function(e,n){return e.row()-n.row()})},Xi=function(e){return P(e,function(e,n){return E(e,function(e){return e.column()===n.column()})?e:e.concat([n])},[]).sort(function(e,n){return e.column()-n.column()})},$i=function(e,n,t){var r,o=(r=t,k(e,function(e){var n=k(Kn(e),function(e){var n=_n(e,"rowspan",1),t=_n(e,"colspan",1);return xn(e,n,t)});return Cn(e,n,r.section())})),i=Qn.generate(o);return jo(i,n,!0)},Gi=function(e,n,t){var r=xi(e),o=Ci(n),i=r.getWidths(o,t,r),u=wi(o,i);B(u,function(e){r.setElementWidth(e.element,e.width)}),0<u.length&&r.setTableWidth(e,i,r.getCellDelta(0))},Yi=Ho(function(e,n,t,r){var o=n[0].row(),i=n[0].row(),u=Ki(n),c=P(u,function(e,n){return oi(e,i,o,t,r.getOrInit)},e);return Vi(c,i,n[0].column())},Vo,x,x,Ni),Ji=Ho(function(e,n,t,r){var o=Ki(n),i=o[o.length-1].row(),u=o[o.length-1].row()+o[o.length-1].rowspan(),c=P(o,function(e,n){return oi(e,u,i,t,r.getOrInit)},e);return Vi(c,u,n[0].column())},Vo,x,x,Ni),Qi=Ho(function(e,n,t,r){var o=Xi(n),i=o[0].column(),u=o[0].column(),c=P(o,function(e,n){return ii(e,u,i,t,r.getOrInit)},e);return Vi(c,n[0].row(),u)},Vo,Gi,x,Ni),Zi=Ho(function(e,n,t,r){var o=n[n.length-1].column(),i=n[n.length-1].column()+n[n.length-1].colspan(),u=Xi(n),c=P(u,function(e,n){return ii(e,i,o,t,r.getOrInit)},e);return Vi(c,n[0].row(),i)},Vo,Gi,x,Ni),eu=Ho(function(e,n,t,r){var o,i,u,c,a=Xi(n),l=(o=e,i=a[0].column(),u=a[a.length-1].column(),c=k(o,function(e){var n=e.cells().slice(0,i).concat(e.cells().slice(u+1));return Tn(n,e.section())}),N(c,function(e){return 0<e.cells().length})),f=qi(l,n[0].row(),n[0].column());return Hi(l,f)},Vo,Gi,Fi,Ni),nu=Ho(function(e,n,t,r){var o,i,u,c=Ki(n),a=(o=e,i=c[0].row(),u=c[c.length-1].row(),o.slice(0,i).concat(o.slice(u+1))),l=qi(a,n[0].row(),n[0].column());return Hi(a,l)},Vo,x,Fi,Ni),tu=(Ho(function(e,n,t,r){var o=li(e,n.column(),t,r.replaceOrInit);return Vi(o,n.row(),n.column())},qo,x,x,Ii("row","th")),Ho(function(e,n,t,r){var o=li(e,n.column(),t,r.replaceOrInit);return Vi(o,n.row(),n.column())},qo,x,x,Ii(null,"td")),Ho(function(e,n,t,r){var o=fi(e,n.row(),t,r.replaceOrInit);return Vi(o,n.row(),n.column())},qo,x,x,Ii("col","th")),Ho(function(e,n,t,r){var o=fi(e,n.row(),t,r.replaceOrInit);return Vi(o,n.row(),n.column())},qo,x,x,Ii(null,"td")),Ho(function(e,n,t,r){var o=n.cells();Li(o);var i=function(e,n,t){if(0===e.length)return e;for(var r=n.startRow();r<=n.finishRow();r++)for(var o=n.startCol();o<=n.finishCol();o++)Eo(e[r],o,Rn(t(),!1));return e}(e,n.bounds(),b(o[0]));return Hi(i,C.from(o[0]))},function(e,n){return n.mergable()},x,x,Pi)),ru=Ho(function(e,n,t,r){var o=I(n,function(e,n){return ei(e,n,t,r.combine(n))},e);return Hi(o,C.from(n[0]))},function(e,n){return n.unmergable()},Gi,x,Pi),ou=Ho(function(e,t,n,r){var o,i,u,c,a,l,f=(o=t.clipboard(),i=t.generators(),u=Gn(o),c=Qn.generate(u),jo(c,i,!0)),s=(a=t.row(),l=t.column(),{row:b(a),column:b(l)});return ti(s,e,f,t.generators(),n).fold(function(){return Hi(e,C.some(t.element()))},function(e){var n=qi(e,t.row(),t.column());return Hi(e,n)})},function(n,t){return Vn(t.element()).bind(function(e){return Fo(n,e).map(function(e){return Re(Re({},e),{generators:t.generators,clipboard:t.clipboard})})})},Gi,x,Ni),iu=Ho(function(e,n,t,r){var o=e[n.cells[0].row()],i=n.cells[0].row(),u=$i(n.clipboard(),n.generators(),o),c=ri(i,e,u,n.generators(),t),a=qi(c,n.cells[0].row(),n.cells[0].column());return Hi(c,a)},Uo,x,x,Ni),uu=Ho(function(e,n,t,r){var o=e[n.cells[0].row()],i=n.cells[n.cells.length-1].row()+n.cells[n.cells.length-1].rowspan(),u=$i(n.clipboard(),n.generators(),o),c=ri(i,e,u,n.generators(),t),a=qi(c,n.cells[0].row(),n.cells[0].column());return Hi(c,a)},Uo,x,x,Ni),cu=function(e){return ge.fromDom(e.getBody())},au=function(e){return e.getBoundingClientRect().width},lu=function(e){return e.getBoundingClientRect().height},fu=function(n){return function(e){return en(e,cu(n))}},su=function(e){return/^[0-9]+$/.test(e)&&(e+="px"),e},du=function(e){var n=En(e,"td[data-mce-style],th[data-mce-style]");ue(e,"data-mce-style"),B(n,function(e){ue(e,"data-mce-style")})},mu={isRtl:b(!1)},gu={isRtl:b(!0)},pu=function(e){return"rtl"==("rtl"===ye(e,"direction")?"rtl":"ltr")?gu:mu},hu={"border-collapse":"collapse",width:"100%"},vu={border:"1"},bu=function(e){return e.getParam("table_default_attributes",vu,"object")},wu=function(e){return e.getParam("table_default_styles",hu,"object")},yu=function(e){return e.getParam("table_tab_navigation",!0,"boolean")},Su=function(e){return e.getParam("table_cell_advtab",!0,"boolean")},xu=function(e){return e.getParam("table_row_advtab",!0,"boolean")},Cu=function(e){return e.getParam("table_advtab",!0,"boolean")},Ru=function(e){return e.getParam("table_style_by_css",!1,"boolean")},Tu=function(e){return e.getParam("table_class_list",[],"array")},Ou=function(e){return!1===e.getParam("table_responsive_width")},Du=function(e){var n=e.getParam("table_clone_elements");return g(n)?C.some(n.split(/[ ,]/)):Array.isArray(n)?C.some(n):C.none()},Au=function(e,n){return e.fire("newrow",{node:n})},Eu=function(e,n){return e.fire("newcell",{node:n})},ku=function(e,n,t,r,o){e.fire("TableSelectionChange",{cells:n,start:t,finish:r,otherCells:o})},Bu=function(e){e.fire("TableSelectionClear")},Nu=function(e,n){return{element:b(e),offset:b(n)}},Iu=function(n,e,t){return n.property().isText(e)&&0===n.property().getText(e).trim().length||n.property().isComment(e)?t(e).bind(function(e){return Iu(n,e,t).orThunk(function(){return C.some(e)})}):C.none()},Pu=function(e,n){return e.property().isText(n)?e.property().getText(n).length:e.property().children(n).length},Mu=function(e,n){var t=Iu(e,n,e.query().prevSibling).getOr(n);if(e.property().isText(t))return Nu(t,Pu(e,t));var r=e.property().children(t);return 0<r.length?Mu(e,r[r.length-1]):Nu(t,Pu(e,t))},_u=Mu,Wu=Bt(),ju=function(f,e){var t=function(e){return"table"===$(cu(e))},s=Du(f),n=function(u,c,a,l){return function(e,n){du(e);var t=l(),r=ge.fromDom(f.getDoc()),o=Qr(pu),i=bt(a,r,s);return c(e)?u(t,e,n,i,o).bind(function(e){return B(e.newRows(),function(e){Au(f,e.dom())}),B(e.newCells(),function(e){Eu(f,e.dom())}),e.cursor().map(function(e){var n=_u(Wu,e),t=f.dom.createRng();return t.setStart(n.element().dom(),n.offset()),t.setEnd(n.element().dom(),n.offset()),t})}):C.none()}};return{deleteRow:n(nu,function(e){var n=Zr(e);return!1===t(f)||1<n.rows()},x,e),deleteColumn:n(eu,function(e){var n=Zr(e);return!1===t(f)||1<n.columns()},x,e),insertRowsBefore:n(Yi,i,x,e),insertRowsAfter:n(Ji,i,x,e),insertColumnsBefore:n(Qi,i,Pr,e),insertColumnsAfter:n(Zi,i,Pr,e),mergeCells:n(tu,i,x,e),unmergeCells:n(ru,i,x,e),pasteRowsBefore:n(iu,i,x,e),pasteRowsAfter:n(uu,i,x,e),pasteCells:n(ou,i,x,e)}},zu=function(e,n,r){var t=Gn(e),o=Qn.generate(t);return Vo(o,n).map(function(e){var n=jo(o,r,!1).slice(e[0].row(),e[e.length-1].row()+e[e.length-1].rowspan()),t=Lo(n,r);return k(t,function(e){var t=st(e.element());return B(e.cells(),function(e){var n=dt(e.element());no(n,"colspan",e.colspan(),1),no(n,"rowspan",e.rowspan(),1),pn(t,n)}),t})})},Lu=tinymce.util.Tools.resolve("tinymce.util.Tools"),Fu=function(n){return function(e){return C.from(e.dom.getParent(e.selection.getStart(),n)).map(ge.fromDom)}},Hu=Fu("th,td"),qu=Fu("th,td,caption"),Uu=function(o,e,i){var n;return n=function(e,n){for(var t=0;t<n.length;t++){var r=o.getStyle(n[t],i);if(void 0===e&&(e=r),e!==r)return""}return e}(n,o.select("td,th",e))},Vu=function(e,n,t){t&&e.formatter.apply("align"+t,{},n)},Ku=function(e,n,t){t&&e.formatter.apply("valign"+t,{},n)},Xu=function(n,t){Lu.each("left center right".split(" "),function(e){n.formatter.remove("align"+e,{},t)})},$u=function(e,r,n){var o=function(e,t){return t=t||[],Lu.each(e,function(e){var n={text:e.text||e.title};e.menu?n.menu=o(e.menu):(n.value=e.value,r&&r(n)),t.push(n)}),t};return o(e,n||[])},Gu=function(n,e){var t=function(e){return fe(e,"rgb")?n.toHex(e):e};return{borderwidth:xe(ge.fromDom(e),"border-width").getOr(""),borderstyle:xe(ge.fromDom(e),"border-style").getOr(""),bordercolor:xe(ge.fromDom(e),"border-color").map(t).getOr(""),backgroundcolor:xe(ge.fromDom(e),"background-color").map(t).getOr("")}},Yu=function(e){var o=e[0],n=e.slice(1),t=F(o);return B(n,function(e){B(t,function(r){q(e,function(e,n){var t=o[r];""!==t&&r===n&&t!==e&&(o[r]="")})})}),o},Ju=function(e){var n=[{name:"borderstyle",type:"selectbox",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}];return{title:"Advanced",name:"advanced",items:"cell"===e?[{name:"borderwidth",type:"input",label:"Border width"}].concat(n):n}},Qu=function(e,n,t,r,o){var i={};return Lu.each(e.split(" "),function(e){r.formatter.matchNode(o,n+e)&&(i[t]=e)}),i[t]||(i[t]=""),i},Zu=y(Qu,"left center right"),ec=y(Qu,"top middle bottom"),nc=function(e,n){var t,r,o,i,u,c,a,l,f=wu(e),s=bu(e),d=e.dom,m=n?(t=d,r=function(e){return fe(e,"rgb")?t.toHex(e):e},o=K(f,"border-style").getOr(""),i=K(f,"border-color").getOr(""),u=K(f,"background-color").getOr(""),{borderstyle:o,bordercolor:r(i),backgroundcolor:r(u)}):{};return Re(Re(Re(Re(Re(Re({},{height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,"class":"",align:"",border:""}),f),s),m),(l=f["border-width"],Ru(e)&&l?{border:l}:K(s,"border").fold(function(){return{}},function(e){return{border:e}}))),(c=K(f,"border-spacing").or(K(s,"cellspacing")).fold(function(){return{}},function(e){return{cellspacing:e}}),a=K(f,"border-padding").or(K(s,"cellpadding")).fold(function(){return{}},function(e){return{cellpadding:e}}),Re(Re({},c),a)))},tc=[{name:"width",type:"input",label:"Width"},{name:"height",type:"input",label:"Height"},{name:"celltype",type:"selectbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"selectbox",label:"Scope",items:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{name:"halign",type:"selectbox",label:"H Align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"selectbox",label:"V Align",items:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}],rc=function(e){return t=(n=e).getParam("table_cell_class_list",[],"array"),r=$u(t,function(e){e.value&&(e.textStyle=function(){return n.formatter.getCssText({block:"tr",classes:[e.value]})})}),(0<t.length?C.some({name:"class",type:"selectbox",label:"Class",items:r}):C.none()).fold(function(){return tc},function(e){return tc.concat(e)});var n,t,r},oc={normal:function(t,r){return{setAttrib:function(e,n){t.setAttrib(r,e,n)},setStyle:function(e,n){t.setStyle(r,e,n)}}},ifTruthy:function(t,r){return{setAttrib:function(e,n){n&&t.setAttrib(r,e,n)},setStyle:function(e,n){n&&t.setStyle(r,e,n)}}}},ic=function(e,n){e.setAttrib("scope",n.scope),e.setAttrib("class",n["class"]),e.setStyle("width",su(n.width)),e.setStyle("height",su(n.height))},uc=function(e,n){e.setStyle("background-color",n.backgroundcolor),e.setStyle("border-color",n.bordercolor),e.setStyle("border-style",n.borderstyle),e.setStyle("border-width",su(n.borderwidth))},cc=function(e,n,t){var r,o,i=e.dom,u=t.celltype&&n[0].nodeName.toLowerCase()!==t.celltype?i.rename(n[0],t.celltype):n[0],c=oc.normal(i,u);ic(c,t),Su(e)&&uc(c,t),Xu(e,u),r=e,o=u,Lu.each("top middle bottom".split(" "),function(e){r.formatter.remove("valign"+e,{},o)}),t.halign&&Vu(e,u,t.halign),t.valign&&Ku(e,u,t.valign)},ac=function(t,e,r){var o=t.dom;Lu.each(e,function(e){r.celltype&&e.nodeName.toLowerCase()!==r.celltype&&(e=o.rename(e,r.celltype));var n=oc.ifTruthy(o,e);ic(n,r),Su(t)&&uc(n,r),r.halign&&Vu(t,e,r.halign),r.valign&&Ku(t,e,r.valign)})},lc=function(e,n,t){var r=t.getData();t.close(),e.undoManager.transact(function(){(1===n.length?cc:ac)(e,n,r),e.focus()})},fc=function(i){var e,n=[];if(n=i.dom.select("td[data-mce-selected],th[data-mce-selected]"),e=i.dom.getParent(i.selection.getStart(),"td,th"),!n.length&&e&&n.push(e),e=e||n[0]){var t=Lu.map(n,function(e){return t=e,r=Su(n=i),o=n.dom,Re(Re(Re({width:o.getStyle(t,"width")||o.getAttrib(t,"width"),height:o.getStyle(t,"height")||o.getAttrib(t,"height"),scope:o.getAttrib(t,"scope"),celltype:t.nodeName.toLowerCase(),"class":o.getAttrib(t,"class","")},Zu("align","halign",n,t)),ec("valign","valign",n,t)),r?Gu(o,t):{});var n,t,r,o}),r=Yu(t),o={type:"tabpanel",tabs:[{title:"General",name:"general",items:rc(i)},Ju("cell")]},u={type:"panel",items:[{type:"grid",columns:2,items:rc(i)}]};i.windowManager.open({title:"Cell Properties",size:"normal",body:Su(i)?o:u,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r,onSubmit:y(lc,i,n)})}},sc=[{type:"selectbox",name:"type",label:"Row type",items:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"selectbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height",type:"input"}],dc=function(e){return t=(n=e).getParam("table_row_class_list",[],"array"),r=$u(t,function(e){e.value&&(e.textStyle=function(){return n.formatter.getCssText({block:"tr",classes:[e.value]})})}),(0<t.length?C.some({name:"class",type:"selectbox",label:"Class",items:r}):C.none()).fold(function(){return sc},function(e){return sc.concat(e)});var n,t,r},mc=function(f,e,s,n){var d=f.dom,m=n.getData();n.close();var g=1===e.length?oc.normal:oc.ifTruthy;f.undoManager.transact(function(){Lu.each(e,function(e){var n,t,r,o,i,u;m.type!==e.parentNode.nodeName.toLowerCase()&&(n=f.dom,t=e,r=m.type,o=n.getParent(t,"table"),i=t.parentNode,(u=n.select(r,o)[0])||(u=n.create(r),o.firstChild?"CAPTION"===o.firstChild.nodeName?n.insertAfter(u,o.firstChild):o.insertBefore(u,o.firstChild):o.appendChild(u)),"tbody"===r&&"THEAD"===i.nodeName&&u.firstChild?u.insertBefore(t,u.firstChild):u.appendChild(t),i.hasChildNodes()||n.remove(i));var c,a,l=g(d,e);l.setAttrib("scope",m.scope),l.setAttrib("class",m["class"]),l.setStyle("height",su(m.height)),xu(f)&&(a=m,(c=l).setStyle("background-color",a.backgroundcolor),c.setStyle("border-color",a.bordercolor),c.setStyle("border-style",a.borderstyle)),m.align!==s.align&&(Xu(f,e),Vu(f,e,m.align))}),f.focus()})},gc=function(i){var e,t,r=i.dom,o=[];if((e=r.getParent(i.selection.getStart(),"table"))&&(t=r.getParent(i.selection.getStart(),"td,th"),Lu.each(e.rows,function(n){Lu.each(n.cells,function(e){if((r.getAttrib(e,"data-mce-selected")||e===t)&&o.indexOf(n)<0)return o.push(n),!1})}),o[0])){var n=Lu.map(o,function(e){return t=e,r=xu(n=i),o=n.dom,Re(Re({height:o.getStyle(t,"height")||o.getAttrib(t,"height"),scope:o.getAttrib(t,"scope"),"class":o.getAttrib(t,"class",""),align:"",type:t.parentNode.nodeName.toLowerCase()},Zu("align","align",n,t)),r?Gu(o,t):{});var n,t,r,o}),u=Yu(n),c={type:"tabpanel",tabs:[{title:"General",name:"general",items:dc(i)},Ju("row")]},a={type:"panel",items:[{type:"grid",columns:2,items:dc(i)}]};i.windowManager.open({title:"Row Properties",size:"normal",body:xu(i)?c:a,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:u,onSubmit:y(mc,i,o,u)})}},pc=tinymce.util.Tools.resolve("tinymce.Env"),hc={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},percentages:!0},vc=function(e,n,t,r,o){void 0===o&&(o=hc);var i=ge.fromTag("table");we(i,o.styles),te(i,o.attributes);var u=ge.fromTag("tbody");pn(i,u);for(var c=[],a=0;a<e;a++){for(var l=ge.fromTag("tr"),f=0;f<n;f++){var s=a<t||f<r?ge.fromTag("th"):ge.fromTag("td");f<r&&ne(s,"scope","row"),a<t&&ne(s,"scope","col"),pn(s,ge.fromTag("br")),o.percentages&&be(s,"width",100/n+"%"),pn(l,s)}c.push(l)}return bn(u,c),i},bc=function(e,n){e.selection.select(n.dom(),!0),e.selection.collapse(!0)},wc=function(r,e,n){var t,o=wu(r),i={styles:o,attributes:bu(r),percentages:(t=o.width,g(t)&&-1!==t.indexOf("%")&&!Ou(r))},u=vc(n,e,0,0,i);ne(u,"data-mce-id","__mce");var c,a,l,f=(c=u,a=ge.fromTag("div"),l=ge.fromDom(c.dom().cloneNode(!0)),pn(a,l),a.dom().innerHTML);return r.insertContent(f),Pn(cu(r),'table[data-mce-id="__mce"]').map(function(e){var n,t;return Ou(r)&&be(e,"width",ye(e,"width")),ue(e,"data-mce-id"),n=r,B(En(e,"tr"),function(e){Au(n,e.dom()),B(En(e,"th,td"),function(e){Eu(n,e.dom())})}),t=r,Pn(e,"td,th").each(y(bc,t)),e.dom()}).getOr(null)},yc=function(e,n,t,r){if("TD"===n.tagName||"TH"===n.tagName)g(t)?e.setStyle(n,t,r):e.setStyle(n,t);else if(n.children)for(var o=0;o<n.children.length;o++)yc(e,n.children[o],t,r)},Sc=function(t,r,e){var o,i=t.dom,u=e.getData();e.close(),""===u["class"]&&delete u["class"],t.undoManager.transact(function(){if(!r){var e=parseInt(u.cols,10)||1,n=parseInt(u.rows,10)||1;r=wc(t,e,n)}!function(e,n,t){var r,o=e.dom,i={},u={};if(i["class"]=t["class"],u.height=su(t.height),o.getAttrib(n,"width")&&!Ru(e)?i.width=(r=t.width)?r.replace(/px$/,""):"":u.width=su(t.width),Ru(e)?(u["border-width"]=su(t.border),u["border-spacing"]=su(t.cellspacing)):(i.border=t.border,i.cellpadding=t.cellpadding,i.cellspacing=t.cellspacing),Ru(e)&&n.children)for(var c=0;c<n.children.length;c++)yc(o,n.children[c],{"border-width":su(t.border),padding:su(t.cellpadding)}),Cu(e)&&yc(o,n.children[c],{"border-color":t.bordercolor});Cu(e)&&(u["background-color"]=t.backgroundcolor,u["border-color"]=t.bordercolor,u["border-style"]=t.borderstyle),i.style=o.serializeStyle(Re(Re({},wu(e)),u)),o.setAttribs(n,Re(Re({},bu(e)),i))}(t,r,u),(o=i.select("caption",r)[0])&&!u.caption&&i.remove(o),!o&&u.caption&&((o=i.create("caption")).innerHTML=pc.ie?"\xa0":'<br data-mce-bogus="1"/>',r.insertBefore(o,r.firstChild)),""===u.align?Xu(t,r):Vu(t,r,u.align),t.focus(),t.addVisual()})},xc=function(e,n){var t,r,o,i,u,c,a,l,f=e.dom,s=nc(e,Cu(e));!1===n?(t=f.getParent(e.selection.getStart(),"table"))?(o=t,i=Cu(r=e),l=r.dom,s=Re(Re({width:l.getStyle(o,"width")||l.getAttrib(o,"width"),height:l.getStyle(o,"height")||l.getAttrib(o,"height"),cellspacing:l.getStyle(o,"border-spacing")||l.getAttrib(o,"cellspacing"),cellpadding:l.getAttrib(o,"cellpadding")||Uu(r.dom,o,"padding"),border:(u=l,c=o,a=xe(ge.fromDom(c),"border-width"),Ru(r)&&a.isSome()?a.getOr(""):u.getAttrib(c,"border")||Uu(r.dom,c,"border-width")||Uu(r.dom,c,"border")),caption:!!l.select("caption",o)[0],"class":l.getAttrib(o,"class","")},Zu("align","align",r,o)),i?Gu(l,o):{})):Cu(e)&&(s.borderstyle="",s.bordercolor="",s.backgroundcolor=""):(s.cols="1",s.rows="1",Cu(e)&&(s.borderstyle="",s.bordercolor="",s.backgroundcolor=""));var d=0<Tu(e).length;d&&s["class"]&&(s["class"]=s["class"].replace(/\s*mce\-item\-table\s*/g,""));var m,g,p,h,v,b={type:"grid",columns:2,items:(g=d,p=n?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],h=(m=e).getParam("table_appearance_options",!0,"boolean")?[{type:"input",name:"cellspacing",label:"Cell spacing",inputMode:"numeric"},{type:"input",name:"cellpadding",label:"Cell padding",inputMode:"numeric"},{type:"input",name:"border",label:"Border width"},{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[],v=g?[{type:"selectbox",name:"class",label:"Class",items:$u(Tu(m),function(e){e.value&&(e.textStyle=function(){return m.formatter.getCssText({block:"table",classes:[e.value]})})})}]:[],p.concat([{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}]).concat(h).concat([{type:"selectbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]).concat(v))},w=Cu(e)?{type:"tabpanel",tabs:[{title:"General",name:"general",items:[b]},Ju("table")]}:{type:"panel",items:[b]};e.windowManager.open({title:"Table Properties",size:"normal",body:w,onSubmit:y(Sc,e,t),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:s})},Cc=Lu.each,Rc=function(s,n,d,m,t){var r=fu(s),i=function(e){return $n(e,r)},o=function(r){Hu(s).each(function(t){i(t).each(function(n){var e=cr(m,n,t);r(n,e).each(function(e){s.selection.setRng(e),s.focus(),d.clear(n),du(n)})})})},u=function(e){return Hu(s).map(function(o){return i(o).bind(function(e){var n=ge.fromDom(s.getDoc()),t=cr(m,e,o),r=bt(x,n,C.none());return zu(e,t,r)})})},c=function(f){t.get().each(function(e){var l=k(e,function(e){return dt(e)});Hu(s).each(function(a){i(a).each(function(n){var e,t,r,o,i=ge.fromDom(s.getDoc()),u=wt(i),c=(e=m,r=l,o=u,{element:b(t=a),mergable:C.none,unmergable:C.none,selection:b(ir(t,e)),clipboard:b(r),generators:b(o)});f(n,c).each(function(e){s.selection.setRng(e),s.focus(),d.clear(n)})})})})};Cc({mceTableSplitCells:function(){o(n.unmergeCells)},mceTableMergeCells:function(){o(n.mergeCells)},mceTableInsertRowBefore:function(){o(n.insertRowsBefore)},mceTableInsertRowAfter:function(){o(n.insertRowsAfter)},mceTableInsertColBefore:function(){o(n.insertColumnsBefore)},mceTableInsertColAfter:function(){o(n.insertColumnsAfter)},mceTableDeleteCol:function(){o(n.deleteColumn)},mceTableDeleteRow:function(){o(n.deleteRow)},mceTableCutRow:function(e){u().each(function(e){t.set(e),o(n.deleteRow)})},mceTableCopyRow:function(e){u().each(function(e){t.set(e)})},mceTablePasteRowBefore:function(e){c(n.pasteRowsBefore)},mceTablePasteRowAfter:function(e){c(n.pasteRowsAfter)},mceTableDelete:function(){qu(s).each(function(e){$n(e,r).filter(a(r)).each(function(e){var n=ge.fromText("");if(mn(e,n),yn(e),s.dom.isEmpty(s.getBody()))s.setContent(""),s.selection.setCursorLocation();else{var t=s.dom.createRng();t.setStart(n.dom(),0),t.setEnd(n.dom(),0),s.selection.setRng(t),s.nodeChanged()}})})}},function(e,n){s.addCommand(n,e)}),Cc({mceInsertTable:y(xc,s,!0),mceTableProps:y(xc,s,!1),mceTableRowProps:y(gc,s),mceTableCellProps:y(fc,s)},function(e,n){s.addCommand(n,function(){e()})})},Tc=function(e){var n=C.from(e.dom().documentElement).map(ge.fromDom).getOr(e);return{parent:b(n),view:b(e),origin:b(_r(0,0))}},Oc=function(e,n){return{parent:b(n),view:b(e),origin:b(_r(0,0))}},Dc=function(e){var r=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(n.length!==t.length)throw new Error('Wrong number of arguments to struct. Expected "['+n.length+']", got '+t.length+" arguments");var r={};return B(n,function(e,n){r[e]=b(t[n])}),r}}.apply(null,e),o=[];return{bind:function(e){if(e===undefined)throw new Error("Event bind error: undefined handler");o.push(e)},unbind:function(n){o=N(o,function(e){return e!==n})},trigger:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=r.apply(null,e);B(o,function(e){e(t)})}}},Ac=function(e){return{registry:U(e,function(e){return{bind:e.bind,unbind:e.unbind}}),trigger:U(e,function(e){return e.trigger})}},Ec=function(e){var t,r,n,o,i,u=ge.fromDom(e.target),c=function(){return e.stopPropagation()},a=function(){return e.preventDefault()},l=(t=a,r=c,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t(r.apply(null,e))});return n=u,o=e.clientX,i=e.clientY,{target:b(n),x:b(o),y:b(i),stop:c,prevent:a,kill:l,raw:b(e)}},kc=function(e,n,t,r,o){var i,u,c=(i=t,u=r,function(e){i(e)&&u(Ec(e))});return e.dom().addEventListener(n,c,o),{unbind:y(Bc,e,n,c,o)}},Bc=function(e,n,t,r){e.dom().removeEventListener(n,t,r)},Nc=b(!0),Ic=function(e,n,t){return kc(e,n,Nc,t,!1)},Pc=Ec,Mc=ho("ephox-dragster").resolve,_c=Ei(["compare","extract","mutate","sink"]),Wc=Ei(["element","start","stop","destroy"]),jc=Ei(["forceDrop","drop","move","delayDrop"]),zc=_c({compare:function(e,n){return _r(n.left()-e.left(),n.top()-e.top())},extract:function(e){return C.some(_r(e.x(),e.y()))},sink:function(e,n){var t=function(e){var n=Re({layerClass:Mc("blocker")},e),t=ge.fromTag("div");ne(t,"role","presentation"),we(t,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),co(t,Mc("blocker")),co(t,n.layerClass);return{element:function(){return t},destroy:function(){yn(t)}}}(n),r=Ic(t.element(),"mousedown",e.forceDrop),o=Ic(t.element(),"mouseup",e.drop),i=Ic(t.element(),"mousemove",e.move),u=Ic(t.element(),"mouseout",e.delayDrop);return Wc({element:t.element,start:function(e){pn(e,t.element())},stop:function(){yn(t.element())},destroy:function(){t.destroy(),o.unbind(),i.unbind(),u.unbind(),r.unbind()}})},mutate:function(e,n){e.mutate(n.left(),n.top())}});function Lc(){var i=C.none(),u=Ac({move:Dc(["info"])});return{onEvent:function(e,o){o.extract(e).each(function(e){var n,t,r;(n=o,t=e,r=i.map(function(e){return n.compare(e,t)}),i=C.some(t),r).each(function(e){u.trigger.move(e)})})},reset:function(){i=C.none()},events:u.registry}}function Fc(){var e=function r(){return{onEvent:x,reset:x}}(),n=Lc(),t=e;return{on:function(){t.reset(),t=n},off:function(){t.reset(),t=e},isOn:function(){return t===n},onEvent:function(e,n){t.onEvent(e,n)},events:n.events}}var Hc=function(n,t,e){var r,o,i,u=!1,c=Ac({start:Dc([]),stop:Dc([])}),a=Fc(),l=function(){d.stop(),a.isOn()&&(a.off(),c.trigger.stop())},f=(r=l,o=200,i=null,{cancel:function(){null!==i&&(p.clearTimeout(i),i=null)},throttle:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];null!==i&&p.clearTimeout(i),i=p.setTimeout(function(){r.apply(null,e),i=null},o)}});a.events.move.bind(function(e){t.mutate(n,e.info())});var s=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];u&&t.apply(null,e)}},d=t.sink(jc({forceDrop:l,drop:s(l),move:s(function(e){f.cancel(),a.onEvent(e,t)}),delayDrop:s(f.throttle)}),e);return{element:d.element,go:function(e){d.start(e),a.on(),c.trigger.start()},on:function(){u=!0},off:function(){u=!1},destroy:function(){d.destroy()},events:c.registry}},qc=function(e){return"true"===re(e,"contenteditable")},Uc=function(){var t,r=Ac({drag:Dc(["xDelta","yDelta","target"])}),o=C.none(),e={mutate:function(e,n){t.trigger.drag(e,n)},events:(t=Ac({drag:Dc(["xDelta","yDelta"])})).registry};e.events.drag.bind(function(n){o.each(function(e){r.trigger.drag(n.xDelta(),n.yDelta(),e)})});return{assign:function(e){o=C.some(e)},get:function(){return o},mutate:e.mutate,events:r.registry}},Vc=vo("resizer-bar-dragging"),Kc=function(o,n,i){var t=Uc(),r=function(e,n){void 0===n&&(n={});var t=n.mode!==undefined?n.mode:zc;return Hc(e,t,n)}(t,{}),u=C.none(),e=function(e,n){return C.from(re(e,n))};t.events.drag.bind(function(t){e(t.target(),"data-row").each(function(e){var n=Ln(t.target(),"top");be(t.target(),"top",n+t.yDelta()+"px")}),e(t.target(),"data-column").each(function(e){var n=Ln(t.target(),"left");be(t.target(),"left",n+t.xDelta()+"px")})});var c=function(e,n){return Ln(e,n)-_n(e,"data-initial-"+n,0)};r.events.stop.bind(function(){t.get().each(function(r){u.each(function(t){e(r,"data-row").each(function(e){var n=c(r,"top");ue(r,"data-initial-top"),m.trigger.adjustHeight(t,n,parseInt(e,10))}),e(r,"data-column").each(function(e){var n=c(r,"left");ue(r,"data-initial-left"),m.trigger.adjustWidth(t,n,parseInt(e,10))}),To(o,t,i,n)})})});var a=function(e,n){m.trigger.startAdjust(),t.assign(e),ne(e,"data-initial-"+n,Ln(e,n)),co(e,Vc),be(e,"opacity","0.2"),r.go(o.parent())},l=Ic(o.parent(),"mousedown",function(e){var n,t;n=e.target(),lo(n,wo)&&a(e.target(),"top"),t=e.target(),lo(t,yo)&&a(e.target(),"left")}),f=function(e){return en(e,o.view())},s=function(e){return Mn(e,"table",f).filter(function(e){return Mn(e,"[contenteditable]",f).exists(qc)})},d=Ic(o.view(),"mouseover",function(e){s(e.target()).fold(function(){pe(e.target())&&So(o)},function(e){u=C.some(e),To(o,e,i,n)})}),m=Ac({adjustHeight:Dc(["table","delta","row"]),adjustWidth:Dc(["table","delta","column"]),startAdjust:Dc([])});return{destroy:function(){l.unbind(),d.unbind(),r.destroy(),So(o)},refresh:function(e){To(o,e,i,n)},on:r.on,off:r.off,hideBars:y(Do,o),showBars:y(Ao,o),events:m.registry}},Xc=function(e,m){var t=Yr,n=Kc(e,m,t),g=Ac({beforeResize:Dc(["table"]),afterResize:Dc(["table"]),startDrag:Dc([])});return n.events.adjustHeight.bind(function(e){g.trigger.beforeResize(e.table());var n=t.delta(e.delta(),e.table());Ti(e.table(),n,e.row(),t),g.trigger.afterResize(e.table())}),n.events.startAdjust.bind(function(e){g.trigger.startDrag()}),n.events.adjustWidth.bind(function(e){g.trigger.beforeResize(e.table());var n,t,r,o,i,u,c,a,l,f,s,d=m.delta(e.delta(),e.table());n=e.table(),t=d,r=e.column(),o=m,i=xi(n),u=i.getCellDelta(t),c=Ri(n),a=i.getWidths(c,o,i),l=mi(a,r,u,i),f=k(l,function(e,n){return e+a[n]}),s=wi(c,f),B(s,function(e){i.setElementWidth(e.element,e.width)}),r===c.grid.columns()-1&&i.setTableWidth(n,f,u),g.trigger.afterResize(e.table())}),{on:n.on,off:n.off,hideBars:n.hideBars,showBars:n.showBars,destroy:n.destroy,events:g.registry}},$c=function(){var e=ge.fromTag("div");return we(e,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),pn(he(ge.fromDom(p.document)),e),e},Gc=function(e,n){return au(e.dom())/au(n.dom())*100+"%"},Yc=function(c){var u,a,l=C.none(),i=C.none(),f=C.none(),s=/(\d+(\.\d+)?)%/,d=function(e){return"TABLE"===e.nodeName},m=function(e){var n=c.dom.getStyle(e,"width")||c.dom.getAttrib(e,"width");return C.from(n).filter(function(e){return 0<e.length})},e=function(){return i};return c.on("init",function(){var e,n,t=Qr(pu),r=(e=c).inline?Oc(cu(e),$c()):Tc(ge.fromDom(e.getDoc()));if(f=C.some(r),n=c.getParam("object_resizing",!0),(g(n)?"table"===n:n)&&c.getParam("table_resize_bars",!0,"boolean")){var o=Xc(r,t);o.on(),o.events.startDrag.bind(function(e){l=C.some(c.selection.getRng())}),o.events.beforeResize.bind(function(e){var n,t,r,o,i=e.table().dom();n=c,r=au(t=i),o=lu(i),n.fire("ObjectResizeStart",{target:t,width:r,height:o})}),o.events.afterResize.bind(function(e){var n,t,r,o,i=e.table(),u=i.dom();du(i),l.each(function(e){c.selection.setRng(e),c.focus()}),n=c,r=au(t=u),o=lu(u),n.fire("ObjectResized",{target:t,width:r,height:o}),c.undoManager.add()}),i=C.some(o)}}),c.on("ObjectResizeStart",function(e){var n,t,r,o=e.target;if(d(o)){var i=m(o).map(function(e){return s.test(e)}).getOr(!1);i&&Ou(c)?(r=o,be(ge.fromDom(r),"width",au(r).toString()+"px")):i||!0!==c.getParam("table_responsive_width")||(n=o,t=ge.fromDom(n),un(t).map(function(e){return Gc(t,e)}).each(function(e){be(t,"width",e),B(En(t,"tr"),function(n){B(fn(n),function(e){be(e,"width",Gc(e,n))})})})),u=e.width,a=m(o).getOr("")}}),c.on("ObjectResized",function(e){var n=e.target;if(d(n)){var t=n;if(s.test(a)){var r=parseFloat(s.exec(a)[1]),o=e.width*r/u;c.dom.setStyle(t,"width",o+"%")}else{var i=[];Lu.each(t.rows,function(e){Lu.each(e.cells,function(e){var n=c.dom.getStyle(e,"width",!0);i.push({cell:e,width:n})})}),Lu.each(i,function(e){c.dom.setStyle(e.cell,"width",e.width),c.dom.setAttrib(e.cell,"width",null)})}}}),c.on("SwitchMode",function(){i.each(function(e){c.mode.isReadOnly()?e.hideBars():e.showBars()})}),{lazyResize:e,lazyWire:function(){return f.getOr(Tc(ge.fromDom(c.getBody())))},destroy:function(){i.each(function(e){e.destroy()}),f.each(function(e){var n;n=e,c.inline&&yn(n.parent())})}}},Jc=Zt([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),Qc=Re(Re({},Jc),{none:function(e){return void 0===e&&(e=undefined),Jc.none(e)}}),Zc=function(t,e){return $n(t,e).bind(function(e){var n=Kn(e);return _(n,function(e){return en(t,e)}).map(function(e){return{index:e,all:n}})})},ea=function(e,n,t,r){return{start:b(e),soffset:b(n),finish:b(t),foffset:b(r)}},na=Zt([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),ta={before:na.before,on:na.on,after:na.after,cata:function(e,n,t,r){return e.fold(n,t,r)},getStart:function(e){return e.fold(o,o,o)}},ra=Zt([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),oa={domRange:ra.domRange,relative:ra.relative,exact:ra.exact,exactFromRange:function(e){return ra.exact(e.start(),e.soffset(),e.finish(),e.foffset())},getWin:function(e){var n,t=e.match({domRange:function(e){return ge.fromDom(e.startContainer)},relative:function(e,n){return ta.getStart(e)},exact:function(e,n,t,r){return e}});return n=t,ge.fromDom(n.dom().ownerDocument.defaultView)},range:ea},ia=function(e,n){return e.selectNodeContents(n.dom())},ua=function(e,n,t){var r,o,i=e.document.createRange();return r=i,n.fold(function(e){r.setStartBefore(e.dom())},function(e,n){r.setStart(e.dom(),n)},function(e){r.setStartAfter(e.dom())}),o=i,t.fold(function(e){o.setEndBefore(e.dom())},function(e,n){o.setEnd(e.dom(),n)},function(e){o.setEndAfter(e.dom())}),i},ca=function(e,n,t,r,o){var i=e.document.createRange();return i.setStart(n.dom(),t),i.setEnd(r.dom(),o),i},aa=function(e){return{left:b(e.left),top:b(e.top),right:b(e.right),bottom:b(e.bottom),width:b(e.width),height:b(e.height)}},la=Zt([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),fa=function(e,n,t){return n(ge.fromDom(t.startContainer),t.startOffset,ge.fromDom(t.endContainer),t.endOffset)},sa=function(e,n){var o,t,r,i=(o=e,n.match({domRange:function(e){return{ltr:b(e),rtl:C.none}},relative:function(e,n){return{ltr:Te(function(){return ua(o,e,n)}),rtl:Te(function(){return C.some(ua(o,n,e))})}},exact:function(e,n,t,r){return{ltr:Te(function(){return ca(o,e,n,t,r)}),rtl:Te(function(){return C.some(ca(o,t,r,e,n))})}}}));return(r=(t=i).ltr()).collapsed?t.rtl().filter(function(e){return!1===e.collapsed}).map(function(e){return la.rtl(ge.fromDom(e.endContainer),e.endOffset,ge.fromDom(e.startContainer),e.startOffset)}).getOrThunk(function(){return fa(0,la.ltr,r)}):fa(0,la.ltr,r)},da=function(i,e){return sa(i,e).match({ltr:function(e,n,t,r){var o=i.document.createRange();return o.setStart(e.dom(),n),o.setEnd(t.dom(),r),o},rtl:function(e,n,t,r){var o=i.document.createRange();return o.setStart(t.dom(),r),o.setEnd(e.dom(),n),o}})},ma=(la.ltr,la.rtl,function(e,n,t){return n>=e.left&&n<=e.right&&t>=e.top&&t<=e.bottom}),ga=function(t,r,e,n,o){var i=function(e){var n=t.dom().createRange();return n.setStart(r.dom(),e),n.collapse(!0),n},u=nt(r).length,c=function(e,n,t,r,o){if(0===o)return 0;if(n===r)return o-1;for(var i=r,u=1;u<o;u++){var c=e(u),a=Math.abs(n-c.left);if(t<=c.bottom){if(t<c.top||i<a)return u-1;i=a}}return 0}(function(e){return i(e).getBoundingClientRect()},e,n,o.right,u);return i(c)},pa=function(e,n,t,r){return Z(n)?function(n,t,r,o){var e=n.dom().createRange();e.selectNode(t.dom());var i=e.getClientRects();return L(i,function(e){return ma(e,r,o)?C.some(e):C.none()}).map(function(e){return ga(n,t,r,o,e)})}(e,n,t,r):(i=n,u=t,c=r,a=(o=e).dom().createRange(),l=fn(i),L(l,function(e){return a.selectNode(e.dom()),ma(a.getBoundingClientRect(),u,c)?pa(o,e,u,c):C.none()}));var o,i,u,c,a,l},ha=function(e,n){return n-e.left<e.right-n},va=function(e,n,t){var r=e.dom().createRange();return r.selectNode(n.dom()),r.collapse(t),r},ba=function(n,e,t){var r=n.dom().createRange();r.selectNode(e.dom());var o=r.getBoundingClientRect(),i=ha(o,t);return(!0===i?ct:at)(e).map(function(e){return va(n,e,i)})},wa=function(e,n,t){var r=n.dom().getBoundingClientRect(),o=ha(r,t);return C.some(va(e,n,o))},ya=function(e,n,t,r){var o=e.dom().createRange();o.selectNode(n.dom());var i=o.getBoundingClientRect();return function(e,n,t,r){var o=e.dom().createRange();o.selectNode(n.dom());var i=o.getBoundingClientRect(),u=Math.max(i.left,Math.min(i.right,t)),c=Math.max(i.top,Math.min(i.bottom,r));return pa(e,n,u,c)}(e,n,Math.max(i.left,Math.min(i.right,t)),Math.max(i.top,Math.min(i.bottom,r)))},Sa=document.caretPositionFromPoint?function(t,e,n){return C.from(t.dom().caretPositionFromPoint(e,n)).bind(function(e){if(null===e.offsetNode)return C.none();var n=t.dom().createRange();return n.setStart(e.offsetNode,e.offset),n.collapse(),C.some(n)})}:document.caretRangeFromPoint?function(e,n,t){return C.from(e.dom().caretRangeFromPoint(n,t))}:function(o,i,n){return ge.fromPoint(o,i,n).bind(function(r){var e=function(){return e=o,t=i,(0===fn(n=r).length?wa:ba)(e,n,t);var e,n,t};return 0===fn(r).length?e():ya(o,r,i,n).orThunk(e)})},xa=function(e,n){var t=$(e);return"input"===t?ta.after(e):A(["br","img"],t)?0===n?ta.before(e):ta.after(e):ta.on(e,n)},Ca=function(e,n){var t=e.fold(ta.before,xa,ta.after),r=n.fold(ta.before,xa,ta.after);return oa.relative(t,r)},Ra=function(e,n,t,r){var o=xa(e,n),i=xa(t,r);return oa.relative(o,i)},Ta=function(e,n,t,r){var o,i,u,c,a,l=(i=n,u=t,c=r,(a=on(o=e).dom().createRange()).setStart(o.dom(),i),a.setEnd(u.dom(),c),a),f=en(e,t)&&n===r;return l.collapsed&&!f},Oa=function(e,n){C.from(e.getSelection()).each(function(e){e.removeAllRanges(),e.addRange(n)})},Da=function(e,n,t,r,o){var i=ca(e,n,t,r,o);Oa(e,i)},Aa=function(s,e){return sa(s,e).match({ltr:function(e,n,t,r){Da(s,e,n,t,r)},rtl:function(e,n,t,r){var o,i,u,c,a,l=s.getSelection();if(l.setBaseAndExtent)l.setBaseAndExtent(e.dom(),n,t.dom(),r);else if(l.extend)try{i=e,u=n,c=t,a=r,(o=l).collapse(i.dom(),u),o.extend(c.dom(),a)}catch(f){Da(s,t,r,e,n)}else Da(s,t,r,e,n)}})},Ea=function(e,n,t,r,o){var i=Ra(n,t,r,o);Aa(e,i)},ka=function(e,n,t){var r=Ca(n,t);Aa(e,r)},Ba=function(e){var o=oa.getWin(e).dom(),n=function(e,n,t,r){return ca(o,e,n,t,r)},t=e.match({domRange:function(e){var n=ge.fromDom(e.startContainer),t=ge.fromDom(e.endContainer);return Ra(n,e.startOffset,t,e.endOffset)},relative:Ca,exact:Ra});return sa(o,t).match({ltr:n,rtl:n})},Na=function(e){var n=ge.fromDom(e.anchorNode),t=ge.fromDom(e.focusNode);return Ta(n,e.anchorOffset,t,e.focusOffset)?C.some(ea(n,e.anchorOffset,t,e.focusOffset)):function(e){if(0<e.rangeCount){var n=e.getRangeAt(0),t=e.getRangeAt(e.rangeCount-1);return C.some(ea(ge.fromDom(n.startContainer),n.startOffset,ge.fromDom(t.endContainer),t.endOffset))}return C.none()}(e)},Ia=function(e,n){var t,r,o=(t=n,r=e.document.createRange(),ia(r,t),r);Oa(e,o)},Pa=function(e){return n=e,C.from(n.getSelection()).filter(function(e){return 0<e.rangeCount}).bind(Na).map(function(e){return oa.exact(e.start(),e.soffset(),e.finish(),e.foffset())});var n},Ma=function(e,n){var t,r,o,i=da(e,n);return r=(t=i).getClientRects(),0<(o=0<r.length?r[0]:t.getBoundingClientRect()).width||0<o.height?C.some(o).map(aa):C.none()},_a=function(e,n,t){return r=e,o=n,i=t,u=ge.fromDom(r.document),Sa(u,o,i).map(function(e){return ea(ge.fromDom(e.startContainer),e.startOffset,ge.fromDom(e.endContainer),e.endOffset)});var r,o,i,u},Wa=tinymce.util.Tools.resolve("tinymce.util.VK"),ja=function(e,n,t,r){return Ha(e,n,Zc(o=t,i).fold(function(){return Qc.none(o)},function(e){return e.index+1<e.all.length?Qc.middle(o,e.all[e.index+1]):Qc.last(o)}),r);var o,i},za=function(e,n,t,r){return Ha(e,n,Zc(o=t,i).fold(function(){return Qc.none()},function(e){return 0<=e.index-1?Qc.middle(o,e.all[e.index-1]):Qc.first(o)}),r);var o,i},La=function(e,n){var t=oa.exact(n,0,n,0);return Ba(t)},Fa=function(e,n){var t,r=En(n,"tr");return(0===(t=r).length?C.none():C.some(t[t.length-1])).bind(function(e){return Pn(e,"td,th").map(function(e){return La(0,e)})})},Ha=function(r,e,n,o,t){return n.fold(C.none,C.none,function(e,n){return ct(n).map(function(e){return La(0,e)})},function(t){return $n(t,e).bind(function(e){var n=ur(t);return r.undoManager.transact(function(){o.insertRowsAfter(e,n)}),Fa(0,e)})})},qa=["table","li","dl"],Ua=function(n,t,r,o){if(n.keyCode===Wa.TAB){var i=cu(t),u=function(e){var n=$(e);return en(e,i)||A(qa,n)},e=t.selection.getRng();if(e.collapsed){var c=ge.fromDom(e.startContainer);Vn(c,u).each(function(e){n.preventDefault(),(n.shiftKey?za:ja)(t,u,e,r,o).each(function(e){t.selection.setRng(e)})})}}},Va=function(e,n){return{selection:b(e),kill:b(n)}},Ka=function(e,n,t,r){return{start:b(ta.on(e,n)),finish:b(ta.on(t,r))}},Xa=function(e,n){var t=da(e,n);return ea(ge.fromDom(t.startContainer),t.startOffset,ge.fromDom(t.endContainer),t.endOffset)},$a=Ka,Ga=function(t,e,r,n,o){return en(r,n)?C.none():zt(r,n,e).bind(function(e){var n=e.boxes.getOr([]);return 0<n.length?(o(t,n,e.start,e.finish),C.some(Va(C.some($a(r,0,r,ot(r))),!0))):C.none()})},Ya=function(e,n){return{item:b(e),mode:b(n)}},Ja=function(e,n,t,r){return void 0===r&&(r=Qa),e.property().parent(n).map(function(e){return Ya(e,r)})},Qa=function(e,n,t,r){return void 0===r&&(r=Za),t.sibling(e,n).map(function(e){return Ya(e,r)})},Za=function(e,n,t,r){void 0===r&&(r=Za);var o=e.property().children(n);return t.first(o).map(function(e){return Ya(e,r)})},el=[{current:Ja,next:Qa,fallback:C.none()},{current:Qa,next:Za,fallback:C.some(Ja)},{current:Za,next:Za,fallback:C.some(Qa)}],nl=function(n,t,r,o,e){return void 0===e&&(e=el),M(e,function(e){return e.current===r}).bind(function(e){return e.current(n,t,o,e.next).orThunk(function(){return e.fallback.bind(function(e){return nl(n,t,e,o)})})})},tl=function(){return{sibling:function(e,n){return e.query().prevSibling(n)},first:function(e){return 0<e.length?C.some(e[e.length-1]):C.none()}}},rl=function(){return{sibling:function(e,n){return e.query().nextSibling(n)},first:function(e){return 0<e.length?C.some(e[0]):C.none()}}},ol=function(n,e,t,r,o,i){return nl(n,e,r,o).bind(function(e){return i(e.item())?C.none():t(e.item())?C.some(e.item()):ol(n,e.item(),t,e.mode(),o,i)})},il=function(n){return function(e){return 0===n.property().children(e).length}},ul=function(e,n,t,r){return ol(e,n,t,Qa,tl(),r)},cl=function(e,n,t,r){return ol(e,n,t,Qa,rl(),r)},al=Bt(),ll=function(e,n){return ul(t=al,e,il(t),n);var t},fl=function(e,n){return cl(t=al,e,il(t),n);var t},sl=Zt([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),dl=function(e){return Mn(e,"tr")},ml=Re(Re({},sl),{verify:function(c,e,n,t,r,a,o){return Mn(t,"td,th",o).bind(function(u){return Mn(e,"td,th",o).map(function(i){return en(u,i)?en(t,u)&&ot(u)===r?a(i):sl.none("in same cell"):Wt(dl,[u,i]).fold(function(){return n=i,t=u,r=(e=c).getRect(n),(o=e.getRect(t)).right>r.left&&o.left<r.right?sl.success():a(i);var e,n,t,r,o},function(e){return a(i)})})}).getOr(sl.none("default"))},cata:function(e,n,t,r,o){return e.fold(n,t,r,o)}}),gl=function(r){return un(r).bind(function(n){var t=fn(n);return pl(t,r).map(function(e){return{parent:b(n),children:b(t),element:b(r),index:b(e)}})})},pl=function(e,n){return _(e,y(en,n))},hl=function(e){return"br"===$(e)},vl=function(e,n,t){return n(e,t).bind(function(e){return Z(e)&&0===nt(e).trim().length?vl(e,n,t):C.some(e)})},bl=function(n,e,t,r){return sn(o=e,i=t).filter(hl).orThunk(function(){return sn(o,i-1).filter(hl)}).bind(function(e){return r.traverse(e).fold(function(){return vl(e,r.gather,n).map(r.relative)},function(e){return gl(e).map(function(e){return ta.on(e.parent(),e.index())})})});var o,i},wl=function(e,n,t,r){var o,i,u;return(hl(n)?(o=e,i=n,(u=r).traverse(i).orThunk(function(){return vl(i,u.gather,o)}).map(u.relative)):bl(e,n,t,r)).map(function(e){return{start:b(e),finish:b(e)}})},yl=function(e,n){return{left:e.left,top:e.top+n,right:e.right,bottom:e.bottom+n}},Sl=function(e,n){return{left:e.left,top:e.top-n,right:e.right,bottom:e.bottom-n}},xl=function(e,n,t){return{left:e.left+n,top:e.top+t,right:e.right+n,bottom:e.bottom+t}},Cl=function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}},Rl=function(e,n){return C.some(e.getRect(n))},Tl=function(e,n,t){return Q(n)?Rl(e,n).map(Cl):Z(n)?(r=e,o=n,(0<=(i=t)&&i<ot(o)?r.getRangedRect(o,i,o,i+1):0<i?r.getRangedRect(o,i-1,o,i):C.none()).map(Cl)):C.none();var r,o,i},Ol=function(e,n){return Q(n)?Rl(e,n).map(Cl):Z(n)?e.getRangedRect(n,0,n,ot(n)).map(Cl):C.none()},Dl=Zt([{none:[]},{retry:["caret"]}]),Al=function(n,e,r){return kn(function(e,n){return n(e)},Bn,e,Wi,t).fold(b(!1),function(e){return Ol(n,e).exists(function(e){return t=e,(n=r).left<t.left||Math.abs(t.right-n.left)<1||n.left>t.right;var n,t})});var t},El={point:function(e){return e.bottom},adjuster:function(e,n,t,r,o){var i=yl(o,5);return Math.abs(t.bottom-r.bottom)<1||t.top>o.bottom?Dl.retry(i):t.top===o.bottom?Dl.retry(yl(o,1)):Al(e,n,o)?Dl.retry(xl(i,5,0)):Dl.none()},move:yl,gather:fl},kl=function(t,r,o,i,u){return 0===u?C.some(i):(a=t,l=i.left,f=r.point(i),a.elementFromPoint(l,f).filter(function(e){return"table"===$(e)}).isSome()?(n=i,c=u-1,kl(t,e=r,o,e.move(n,5),c)):t.situsFromPoint(i.left,r.point(i)).bind(function(e){return e.start().fold(C.none,function(n){return Ol(t,n).bind(function(e){return r.adjuster(t,n,e,o,i).fold(C.none,function(e){return kl(t,r,o,e,u-1)})}).orThunk(function(){return C.some(i)})},C.none)}));var e,n,c,a,l,f},Bl=function(n,t,e){var r,o,i,u=n.move(e,5),c=kl(t,n,e,u,100).getOr(u);return o=c,i=t,((r=n).point(o)>i.getInnerHeight()?C.some(r.point(o)-i.getInnerHeight()):r.point(o)<0?C.some(-r.point(o)):C.none()).fold(function(){return t.situsFromPoint(c.left,n.point(c))},function(e){return t.scrollBy(0,e),t.situsFromPoint(c.left,n.point(c)-e)})},Nl={tryUp:y(Bl,{point:function(e){return e.top},adjuster:function(e,n,t,r,o){var i=Sl(o,5);return Math.abs(t.top-r.top)<1||t.bottom<o.top?Dl.retry(i):t.bottom===o.top?Dl.retry(Sl(o,1)):Al(e,n,o)?Dl.retry(xl(i,5,0)):Dl.none()},move:Sl,gather:ll}),tryDown:y(Bl,El),ieTryUp:function(e,n){return e.situsFromPoint(n.left,n.top-5)},ieTryDown:function(e,n){return e.situsFromPoint(n.left,n.bottom+5)},getJumpSize:b(5)},Il=function(i,u,c){return i.getSelection().bind(function(o){return wl(u,o.finish(),o.foffset(),c).fold(function(){return C.some(Nu(o.finish(),o.foffset()))},function(e){var n,t=i.fromSitus(e),r=ml.verify(i,o.finish(),o.foffset(),t.finish(),t.foffset(),c.failure,u);return n=r,ml.cata(n,function(e){return C.none()},function(){return C.none()},function(e){return C.some(Nu(e,0))},function(e){return C.some(Nu(e,ot(e)))})})})},Pl=function(r,o,i,u,c,a){return 0===a?C.none():Wl(r,o,i,u,c).bind(function(e){var n=r.fromSitus(e),t=ml.verify(r,i,u,n.finish(),n.foffset(),c.failure,o);return ml.cata(t,function(){return C.none()},function(){return C.some(e)},function(e){return en(i,e)&&0===u?Ml(r,i,u,Sl,c):Pl(r,o,e,0,c,a-1)},function(e){return en(i,e)&&u===ot(e)?Ml(r,i,u,yl,c):Pl(r,o,e,ot(e),c,a-1)})})},Ml=function(n,e,t,r,o){return Tl(n,e,t).bind(function(e){return _l(n,o,r(e,Nl.getJumpSize()))})},_l=function(e,n,t){var r=Je().browser;return r.isChrome()||r.isSafari()||r.isFirefox()||r.isEdge()?n.otherRetry(e,t):r.isIE()?n.ieRetry(e,t):C.none()},Wl=function(n,e,t,r,o){return Tl(n,t,r).bind(function(e){return _l(n,o,e)})},jl=function(e,n){return Bn(e,function(e){return un(e).exists(function(e){return en(e,n)})},t).isSome();var t},zl=function(i,u,c,e,a){return Mn(e,"td,th",u).bind(function(o){return Mn(o,"table",u).bind(function(e){return jl(a,e)?Il(n=i,t=u,r=c).bind(function(e){return Pl(n,t,e.element(),e.offset(),r,20).map(n.fromSitus)}).bind(function(n){return Mn(n.finish(),"td,th",u).map(function(e){return{start:b(o),finish:b(e),range:b(n)}})}):C.none();var n,t,r})})},Ll=function(e,n,t,r,o,i){return Je().browser.isIE()?C.none():i(r,n).orThunk(function(){return zl(e,n,t,r,o).map(function(e){var n=e.range();return Va(C.some($a(n.start(),n.soffset(),n.finish(),n.foffset())),!0)})})},Fl=function(e,r){return Mn(e,"tr",r).bind(function(t){return Mn(t,"table",r).bind(function(e){var n=En(e,"tr");return en(t,n[0])?ul(al,e,function(e){return at(e).isSome()},r).map(function(e){var n=ot(e);return Va(C.some($a(e,n,e,n)),!0)}):C.none()})})},Hl=function(e,r){return Mn(e,"tr",r).bind(function(t){return Mn(t,"table",r).bind(function(e){var n=En(e,"tr");return en(t,n[n.length-1])?cl(al,e,function(e){return ct(e).isSome()},r).map(function(e){return Va(C.some($a(e,0,e,0)),!0)}):C.none()})})},ql=function(e,n,t,r,o,i,u){return zl(e,t,r,o,i).bind(function(e){return Ga(n,t,e.start(),e.finish(),u)})},Ul=function(e,n){return Mn(e,"td,th",n)};var Vl={traverse:ln,gather:fl,relative:ta.before,otherRetry:Nl.tryDown,ieRetry:Nl.ieTryDown,failure:ml.failedDown},Kl={traverse:an,gather:ll,relative:ta.before,otherRetry:Nl.tryUp,ieRetry:Nl.ieTryUp,failure:ml.failedUp},Xl=function(n){return function(e){return e===n}},$l=Xl(38),Gl=Xl(40),Yl=function(e){return 37<=e&&e<=40},Jl={isBackward:Xl(37),isForward:Xl(39)},Ql={isBackward:Xl(39),isForward:Xl(37)},Zl=function(e){return{left:e.left(),top:e.top(),right:e.right(),bottom:e.bottom(),width:e.width(),height:e.height()}},ef=function(c){return{elementFromPoint:function(e,n){return ge.fromPoint(ge.fromDom(c.document),e,n)},getRect:function(e){return e.dom().getBoundingClientRect()},getRangedRect:function(e,n,t,r){var o=oa.exact(e,n,t,r);return Ma(c,o).map(Zl)},getSelection:function(){return Pa(c).map(function(e){return Xa(c,e)})},fromSitus:function(e){var n=oa.relative(e.start(),e.finish());return Xa(c,n)},situsFromPoint:function(e,n){return _a(c,e,n).map(function(e){return Ka(e.start(),e.soffset(),e.finish(),e.foffset())})},clearSelection:function(){c.getSelection().removeAllRanges()},collapseSelection:function(u){void 0===u&&(u=!1),Pa(c).each(function(e){return e.fold(function(e){return e.collapse(u)},function(e,n){var t=u?e:n;ka(c,t,t)},function(e,n,t,r){var o=u?e:t,i=u?n:r;Ea(c,o,i,o,i)})})},setSelection:function(e){Ea(c,e.start(),e.soffset(),e.finish(),e.foffset())},setRelativeSelection:function(e,n){ka(c,e,n)},selectContents:function(e){Ia(c,e)},getInnerHeight:function(){return c.innerHeight},getScrollY:function(){var e,n,t,r;return(e=ge.fromDom(c.document),n=e!==undefined?e.dom():p.document,t=n.body.scrollLeft||n.documentElement.scrollLeft,r=n.body.scrollTop||n.documentElement.scrollTop,_r(t,r)).top()},scrollBy:function(e,n){var t,r,o;t=e,r=n,((o=ge.fromDom(c.document))!==undefined?o.dom():p.document).defaultView.scrollBy(t,r)}}},nf=function(e,n){return{rows:e,cols:n}},tf=function(e,n,t,r){var o=function c(o,i,n,u){var t=C.none(),r=function(){t=C.none()};return{mousedown:function(e){u.clear(i),t=Ul(e.target(),n)},mouseover:function(e){t.each(function(r){u.clearBeforeUpdate(i),Ul(e.target(),n).each(function(t){zt(r,t,n).each(function(e){var n=e.boxes.getOr([]);(1<n.length||1===n.length&&!en(r,t))&&(u.selectRange(i,n,e.start,e.finish),o.selectContents(t))})})})},mouseup:function(e){t.each(r)}}}(ef(e),n,t,r);return{mousedown:o.mousedown,mouseover:o.mouseover,mouseup:o.mouseup}},rf=function(e,g,p,h){var l=ef(e),f=function(){return h.clear(g),C.none()};return{keydown:function(e,n,t,r,o,u){var i=e.raw(),c=i.which,a=!0===i.shiftKey;return Lt(g,h.selectedSelector).fold(function(){return Gl(c)&&a?y(ql,l,g,p,Vl,r,n,h.selectRange):$l(c)&&a?y(ql,l,g,p,Kl,r,n,h.selectRange):Gl(c)?y(Ll,l,p,Vl,r,n,Hl):$l(c)?y(Ll,l,p,Kl,r,n,Fl):C.none},function(i){var e=function(e){return function(){return L(e,function(e){return n=e.rows,t=e.cols,r=g,Ht(i,n,t,(o=h).firstSelectedSelector,o.lastSelectedSelector).map(function(e){return o.clearBeforeUpdate(r),o.selectRange(r,e.boxes,e.start,e.finish),e.boxes});var n,t,r,o}).fold(function(){return Ft(g,h.firstSelectedSelector,h.lastSelectedSelector).map(function(e){var n=Gl(c)||u.isForward(c)?ta.after:ta.before;return l.setRelativeSelection(ta.on(e.first(),0),n(e.table())),h.clear(g),Va(C.none(),!0)})},function(e){return C.some(Va(C.none(),!0))})}};return Gl(c)&&a?e([nf(1,0)]):$l(c)&&a?e([nf(-1,0)]):u.isBackward(c)&&a?e([nf(0,-1),nf(-1,0)]):u.isForward(c)&&a?e([nf(0,1),nf(1,0)]):Yl(c)&&!1==a?f:C.none})()},keyup:function(l,f,s,d,m){return Lt(g,h.selectedSelector).fold(function(){var t,r,e,n,o,i,u,c=l.raw(),a=c.which;return!1!=(!0===c.shiftKey)&&Yl(a)?(t=g,r=p,e=f,n=s,o=d,i=m,u=h.selectRange,en(e,o)&&n===i?C.none():Mn(e,"td,th",r).bind(function(n){return Mn(o,"td,th",r).bind(function(e){return Ga(t,r,n,e,u)})})):C.none()},C.none)}}},of=function(e,r,n,o){var i=ef(e);return function(e,t){o.clearBeforeUpdate(r),zt(e,t,n).each(function(e){var n=e.boxes.getOr([]);o.selectRange(r,n,e.start,e.finish),i.selectContents(t),i.collapseSelection()})}},uf=function(n,e){B(e,function(e){!function(e,n){oo(e)?e.dom().classList.remove(n):uo(e,n);ao(e)}(n,e)})},cf={byClass:function(o){var n,t,i=(n=o.selected,function(e){co(e,n)}),r=(t=[o.selected,o.lastSelected,o.firstSelected],function(e){uf(e,t)}),u=function(e){var n=En(e,o.selectedSelector);B(n,r)};return{clearBeforeUpdate:u,clear:u,selectRange:function(e,n,t,r){u(e),B(n,i),co(t,o.firstSelected),co(r,o.lastSelected)},selectedSelector:o.selectedSelector,firstSelectedSelector:o.firstSelectedSelector,lastSelectedSelector:o.lastSelectedSelector}},byAttr:function(o,i,n){var t=function(e){ue(e,o.selected),ue(e,o.firstSelected),ue(e,o.lastSelected)},u=function(e){ne(e,o.selected,"1")},c=function(e){r(e),n()},r=function(e){var n=En(e,o.selectedSelector);B(n,t)};return{clearBeforeUpdate:r,clear:c,selectRange:function(e,n,t,r){c(e),B(n,u),ne(t,o.firstSelected,"1"),ne(r,o.lastSelected,"1"),i(n,t,r)},selectedSelector:o.selectedSelector,firstSelectedSelector:o.firstSelectedSelector,lastSelectedSelector:o.lastSelectedSelector}}},af=function(e,n,s){var t=Gn(e),d=Qn.generate(t);return Vo(d,n).map(function(e){var t,n,r,o,i,u,c,a,l,f=jo(d,s,!1);return{upOrLeftCells:(t=e,n=s,r=f.slice(0,t[t.length-1].row()+1),o=Lo(r,n),j(o,function(e){var n=e.cells().slice(0,t[t.length-1].column()+1);return k(n,function(e){return e.element()})})),downOrRightCells:(u=e,c=s,a=(i=f).slice(u[0].row()+u[0].rowspan()-1,i.length),l=Lo(a,c),j(l,function(e){var n=e.cells().slice(u[0].column()+u[0].colspan()-1,+e.cells().length);return k(n,function(e){return e.element()})}))}})},lf=function(e){return!1===lo(ge.fromDom(e.target),"ephox-snooker-resizer-bar")};function ff(v,b,e){var w=C.none(),a=Du(v),y=cf.byAttr(Qt,function(i,u,c){e.targets().each(function(o){$n(u).each(function(e){var n=ge.fromDom(v.getDoc()),t=bt(x,n,a),r=af(e,o,t);ku(v,i,u,c,r)})})},function(){Bu(v)});v.on("init",function(e){var r=v.getWin(),o=cu(v),n=fu(v),t=tf(r,o,n,y),c=rf(r,o,n,y),i=of(r,o,n,y);v.on("TableSelectorChange",function(e){i(e.start,e.finish)});var u,a,l=function(e,n){!0===e.raw().shiftKey&&(n.kill()&&e.kill(),n.selection().each(function(e){var n=oa.relative(e.start(),e.finish()),t=da(r,n);v.selection.setRng(t)}))},f=function(e){var n=Pc(e);if(n.raw().shiftKey&&Yl(n.raw().which)){var t=v.selection.getRng(),r=ge.fromDom(t.startContainer),o=ge.fromDom(t.endContainer);c.keyup(n,r,t.startOffset,o,t.endOffset).each(function(e){l(n,e)})}},s=function(e){var n=Pc(e);b().each(function(e){e.hideBars()});var t=v.selection.getRng(),r=ge.fromDom(v.selection.getStart()),o=ge.fromDom(t.startContainer),i=ge.fromDom(t.endContainer),u=pu(r).isRtl()?Ql:Jl;c.keydown(n,o,t.startOffset,i,t.endOffset,u).each(function(e){l(n,e)}),b().each(function(e){e.showBars()})},d=function(e){return 0===e.button},m=function(e){d(e)&&lf(e)&&t.mousedown(Pc(e))},g=function(e){var n;((n=e).buttons===undefined||pc.browser.isEdge()&&0===n.buttons||0!=(1&n.buttons))&&lf(e)&&t.mouseover(Pc(e))},p=function(e){d(e)&&lf(e)&&t.mouseup(Pc(e))},h=(u=S(ge.fromDom(o)),a=S(0),{touchEnd:function(e){var n=ge.fromDom(e.target);if("td"===$(n)||"th"===$(n)){var t=u.get(),r=a.get();en(t,n)&&e.timeStamp-r<300&&(e.preventDefault(),i(n,n))}u.set(n),a.set(e.timeStamp)}});v.on("mousedown",m),v.on("mouseover",g),v.on("mouseup",p),v.on("touchend",h.touchEnd),v.on("keyup",f),v.on("keydown",s),v.on("NodeChange",function(){var e=v.selection,n=ge.fromDom(e.getStart()),t=ge.fromDom(e.getEnd());Wt($n,[n,t]).fold(function(){y.clear(o)},x)}),w=C.some({mousedown:m,mouseover:g,mouseup:p,keyup:f,keydown:s})});return{clear:y.clear,destroy:function(){w.each(function(e){})}}}var sf=function(n){return{get:function(){var e=cu(n);return Lt(e,Kt).fold(function(){return n.selection.getStart()===undefined?tr():or(n.selection)},function(e){return rr(e)})}}},df=function(e,t){var o=S(C.none()),i=S([]),n=function(){return qu(e).bind(function(n){return $n(n).map(function(e){return"caption"===$(n)?ur(n):cr(t,e,n)})})},r=function(){o.set(Te(n)()),B(i.get(),function(e){return e()})},u=function(n,t){var r=function(){return o.get().fold(function(){n.setDisabled(!0)},function(e){n.setDisabled(t(e))})};return r(),i.set(i.get().concat([r])),function(){i.set(N(i.get(),function(e){return e!==r}))}};return e.on("NodeChange TableSelectorChange",r),{onSetupTable:function(e){return u(e,function(e){return!1})},onSetupCellOrRow:function(e){return u(e,function(e){return"caption"===$(e.element())})},onSetupMergeable:function(e){return u(e,function(e){return e.mergable().isNone()})},onSetupUnmergeable:function(e){return u(e,function(e){return e.unmergable().isNone()})},resetTargets:r,targets:function(){return o.get()}}},mf=function(n,e){n.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",fetch:function(e){return e("inserttable | cell row column | advtablesort | tableprops deletetable")}});var t=function(e){return function(){return n.execCommand(e)}};n.ui.registry.addButton("tableprops",{tooltip:"Table properties",onAction:t("mceTableProps"),icon:"table",onSetup:e.onSetupTable}),n.ui.registry.addButton("tabledelete",{tooltip:"Delete table",onAction:t("mceTableDelete"),icon:"table-delete-table",onSetup:e.onSetupTable}),n.ui.registry.addButton("tablecellprops",{tooltip:"Cell properties",onAction:t("mceTableCellProps"),icon:"table-cell-properties",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tablemergecells",{tooltip:"Merge cells",onAction:t("mceTableMergeCells"),icon:"table-merge-cells",onSetup:e.onSetupMergeable}),n.ui.registry.addButton("tablesplitcells",{tooltip:"Split cell",onAction:t("mceTableSplitCells"),icon:"table-split-cells",onSetup:e.onSetupUnmergeable}),n.ui.registry.addButton("tableinsertrowbefore",{tooltip:"Insert row before",onAction:t("mceTableInsertRowBefore"),icon:"table-insert-row-above",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tableinsertrowafter",{tooltip:"Insert row after",onAction:t("mceTableInsertRowAfter"),icon:"table-insert-row-after",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tabledeleterow",{tooltip:"Delete row",onAction:t("mceTableDeleteRow"),icon:"table-delete-row",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tablerowprops",{tooltip:"Row properties",onAction:t("mceTableRowProps"),icon:"table-row-properties",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tableinsertcolbefore",{tooltip:"Insert column before",onAction:t("mceTableInsertColBefore"),icon:"table-insert-column-before",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tableinsertcolafter",{tooltip:"Insert column after",onAction:t("mceTableInsertColAfter"),icon:"table-insert-column-after",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tabledeletecol",{tooltip:"Delete column",onAction:t("mceTableDeleteCol"),icon:"table-delete-column",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tablecutrow",{tooltip:"Cut row",onAction:t("mceTableCutRow"),icon:"temporary-placeholder",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tablecopyrow",{tooltip:"Copy row",onAction:t("mceTableCopyRow"),icon:"temporary-placeholder",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tablepasterowbefore",{tooltip:"Paste row before",onAction:t("mceTablePasteRowBefore"),icon:"temporary-placeholder",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tablepasterowafter",{tooltip:"Paste row after",onAction:t("mceTablePasteRowAfter"),icon:"temporary-placeholder",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tableinsertdialog",{tooltip:"Insert table",onAction:t("mceInsertTable"),icon:"table"})},gf=function(n){var e=n.getParam("table_toolbar","tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol");0<e.length&&n.ui.registry.addContextToolbar("table",{predicate:function(e){return n.dom.is(e,"table")&&n.getBody().contains(e)},items:e,scope:"node",position:"node"})},pf=function(r,e){var n=function(e){return function(){return r.execCommand(e)}},t=function(e){var n=e.numRows,t=e.numColumns;r.undoManager.transact(function(){wc(r,t,n)}),r.addVisual()},o={text:"Table properties",onSetup:e.onSetupTable,onAction:n("mceTableProps")},i={text:"Delete table",icon:"table-delete-table",onSetup:e.onSetupTable,onAction:n("mceTableDelete")},u=[{type:"menuitem",text:"Insert row before",icon:"table-insert-row-above",onAction:n("mceTableInsertRowBefore"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Insert row after",icon:"table-insert-row-after",onAction:n("mceTableInsertRowAfter"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Delete row",icon:"table-delete-row",onAction:n("mceTableDeleteRow"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Row properties",icon:"table-row-properties",onAction:n("mceTableRowProps"),onSetup:e.onSetupCellOrRow},{type:"separator"},{type:"menuitem",text:"Cut row",onAction:n("mceTableCutRow"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Copy row",onAction:n("mceTableCopyRow"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Paste row before",onAction:n("mceTablePasteRowBefore"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Paste row after",onAction:n("mceTablePasteRowAfter"),onSetup:e.onSetupCellOrRow}],c={type:"nestedmenuitem",text:"Row",getSubmenuItems:function(){return u}},a=[{type:"menuitem",text:"Insert column before",icon:"table-insert-column-before",onAction:n("mceTableInsertColBefore"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Insert column after",icon:"table-insert-column-after",onAction:n("mceTableInsertColAfter"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Delete column",icon:"table-delete-column",onAction:n("mceTableDeleteCol"),onSetup:e.onSetupCellOrRow}],l={type:"nestedmenuitem",text:"Column",getSubmenuItems:function(){return a}},f=[{type:"menuitem",text:"Cell properties",icon:"table-cell-properties",onAction:n("mceTableCellProps"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Merge cells",icon:"table-merge-cells",onAction:n("mceTableMergeCells"),onSetup:e.onSetupMergeable},{type:"menuitem",text:"Split cell",icon:"table-split-cells",onAction:n("mceTableSplitCells"),onSetup:e.onSetupUnmergeable}],s={type:"nestedmenuitem",text:"Cell",getSubmenuItems:function(){return f}};!1===r.getParam("table_grid",!0,"boolean")?r.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:n("mceInsertTable")}):r.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"inserttable",onAction:t}]}}),r.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:n("mceInsertTable")}),r.ui.registry.addMenuItem("tableprops",o),r.ui.registry.addMenuItem("deletetable",i),r.ui.registry.addNestedMenuItem("row",c),r.ui.registry.addNestedMenuItem("column",l),r.ui.registry.addNestedMenuItem("cell",s),r.ui.registry.addContextMenu("table",{update:function(){return e.resetTargets(),e.targets().fold(function(){return""},function(e){return"caption"===$(e.element())?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable"})}})},hf=function(t,r,e,n){return{insertTable:function(e,n){return wc(t,e,n)},setClipboardRows:function(e){return n=r,t=k(e,ge.fromDom),void n.set(C.from(t));var n,t},getClipboardRows:function(){return r.get().fold(function(){},function(e){return k(e,function(e){return e.dom()})})},resizeHandler:e,selectionTargets:n}};function vf(n){var e=sf(n),t=df(n,e),r=Yc(n),o=ff(n,r.lazyResize,t),i=ju(n,r.lazyWire),u=S(C.none());return Rc(n,i,o,e,u),ar(n,e,i,o),pf(n,t),mf(n,t),gf(n),n.on("PreInit",function(){n.serializer.addTempAttr($t),n.serializer.addTempAttr(Yt)}),yu(n)&&n.on("keydown",function(e){Ua(e,n,i,r.lazyWire)}),n.on("remove",function(){r.destroy(),o.destroy()}),hf(n,u,r,t)}!function wf(){s.add("table",vf)}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/template/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "template" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/template')
+//   ES2015:
+//     import 'tinymce/plugins/template'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/template/plugin.js
@@ -1,1 +1,556 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    function curry(fn) {
+      var initialArgs = [];
+      for (var _i = 1; _i < arguments.length; _i++) {
+        initialArgs[_i - 1] = arguments[_i];
+      }
+      return function () {
+        var restArgs = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          restArgs[_i] = arguments[_i];
+        }
+        var all = initialArgs.concat(restArgs);
+        return fn.apply(null, all);
+      };
+    }
+    var never = constant(false);
+    var always = constant(true);
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.XHR');
+
+    var getCreationDateClasses = function (editor) {
+      return editor.getParam('template_cdate_classes', 'cdate');
+    };
+    var getModificationDateClasses = function (editor) {
+      return editor.getParam('template_mdate_classes', 'mdate');
+    };
+    var getSelectedContentClasses = function (editor) {
+      return editor.getParam('template_selected_content_classes', 'selcontent');
+    };
+    var getPreviewReplaceValues = function (editor) {
+      return editor.getParam('template_preview_replace_values');
+    };
+    var getTemplateReplaceValues = function (editor) {
+      return editor.getParam('template_replace_values');
+    };
+    var getTemplates = function (editorSettings) {
+      return editorSettings.templates;
+    };
+    var getCdateFormat = function (editor) {
+      return editor.getParam('template_cdate_format', editor.translate('%Y-%m-%d'));
+    };
+    var getMdateFormat = function (editor) {
+      return editor.getParam('template_mdate_format', editor.translate('%Y-%m-%d'));
+    };
+
+    var addZeros = function (value, len) {
+      value = '' + value;
+      if (value.length < len) {
+        for (var i = 0; i < len - value.length; i++) {
+          value = '0' + value;
+        }
+      }
+      return value;
+    };
+    var getDateTime = function (editor, fmt, date) {
+      var daysShort = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' ');
+      var daysLong = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' ');
+      var monthsShort = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
+      var monthsLong = 'January February March April May June July August September October November December'.split(' ');
+      date = date || new Date();
+      fmt = fmt.replace('%D', '%m/%d/%Y');
+      fmt = fmt.replace('%r', '%I:%M:%S %p');
+      fmt = fmt.replace('%Y', '' + date.getFullYear());
+      fmt = fmt.replace('%y', '' + date.getYear());
+      fmt = fmt.replace('%m', addZeros(date.getMonth() + 1, 2));
+      fmt = fmt.replace('%d', addZeros(date.getDate(), 2));
+      fmt = fmt.replace('%H', '' + addZeros(date.getHours(), 2));
+      fmt = fmt.replace('%M', '' + addZeros(date.getMinutes(), 2));
+      fmt = fmt.replace('%S', '' + addZeros(date.getSeconds(), 2));
+      fmt = fmt.replace('%I', '' + ((date.getHours() + 11) % 12 + 1));
+      fmt = fmt.replace('%p', '' + (date.getHours() < 12 ? 'AM' : 'PM'));
+      fmt = fmt.replace('%B', '' + editor.translate(monthsLong[date.getMonth()]));
+      fmt = fmt.replace('%b', '' + editor.translate(monthsShort[date.getMonth()]));
+      fmt = fmt.replace('%A', '' + editor.translate(daysLong[date.getDay()]));
+      fmt = fmt.replace('%a', '' + editor.translate(daysShort[date.getDay()]));
+      fmt = fmt.replace('%%', '%');
+      return fmt;
+    };
+
+    var createTemplateList = function (editorSettings, callback) {
+      return function () {
+        var templateList = getTemplates(editorSettings);
+        if (typeof templateList === 'function') {
+          templateList(callback);
+          return;
+        }
+        if (typeof templateList === 'string') {
+          global$2.send({
+            url: templateList,
+            success: function (text) {
+              callback(JSON.parse(text));
+            }
+          });
+        } else {
+          callback(templateList);
+        }
+      };
+    };
+    var replaceTemplateValues = function (html, templateValues) {
+      global$1.each(templateValues, function (v, k) {
+        if (typeof v === 'function') {
+          v = v(k);
+        }
+        html = html.replace(new RegExp('\\{\\$' + k + '\\}', 'g'), v);
+      });
+      return html;
+    };
+    var replaceVals = function (editor, e) {
+      var dom = editor.dom, vl = getTemplateReplaceValues(editor);
+      global$1.each(dom.select('*', e), function (e) {
+        global$1.each(vl, function (v, k) {
+          if (dom.hasClass(e, k)) {
+            if (typeof vl[k] === 'function') {
+              vl[k](e);
+            }
+          }
+        });
+      });
+    };
+    var hasClass = function (n, c) {
+      return new RegExp('\\b' + c + '\\b', 'g').test(n.className);
+    };
+    var insertTemplate = function (editor, ui, html) {
+      var el;
+      var n;
+      var dom = editor.dom;
+      var sel = editor.selection.getContent();
+      html = replaceTemplateValues(html, getTemplateReplaceValues(editor));
+      el = dom.create('div', null, html);
+      n = dom.select('.mceTmpl', el);
+      if (n && n.length > 0) {
+        el = dom.create('div', null);
+        el.appendChild(n[0].cloneNode(true));
+      }
+      global$1.each(dom.select('*', el), function (n) {
+        if (hasClass(n, getCreationDateClasses(editor).replace(/\s+/g, '|'))) {
+          n.innerHTML = getDateTime(editor, getCdateFormat(editor));
+        }
+        if (hasClass(n, getModificationDateClasses(editor).replace(/\s+/g, '|'))) {
+          n.innerHTML = getDateTime(editor, getMdateFormat(editor));
+        }
+        if (hasClass(n, getSelectedContentClasses(editor).replace(/\s+/g, '|'))) {
+          n.innerHTML = sel;
+        }
+      });
+      replaceVals(editor, el);
+      editor.execCommand('mceInsertContent', false, el.innerHTML);
+      editor.addVisual();
+    };
+
+    var register = function (editor) {
+      editor.addCommand('mceInsertTemplate', curry(insertTemplate, editor));
+    };
+
+    var setup = function (editor) {
+      editor.on('PreProcess', function (o) {
+        var dom = editor.dom, dateFormat = getMdateFormat(editor);
+        global$1.each(dom.select('div', o.node), function (e) {
+          if (dom.hasClass(e, 'mceTmpl')) {
+            global$1.each(dom.select('*', e), function (e) {
+              if (dom.hasClass(e, editor.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|'))) {
+                e.innerHTML = getDateTime(editor, dateFormat);
+              }
+            });
+            replaceVals(editor, e);
+          }
+        });
+      });
+    };
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var findUntil = function (xs, pred, until) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return Option.some(x);
+        } else if (until(x, i)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var find = function (xs, pred) {
+      return findUntil(xs, pred, never);
+    };
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.Promise');
+
+    var hasOwnProperty = Object.hasOwnProperty;
+    var get = function (obj, key) {
+      return has(obj, key) ? Option.from(obj[key]) : Option.none();
+    };
+    var has = function (obj, key) {
+      return hasOwnProperty.call(obj, key);
+    };
+
+    var entitiesAttr = {
+      '"': '&quot;',
+      '<': '&lt;',
+      '>': '&gt;',
+      '&': '&amp;',
+      '\'': '&#039;'
+    };
+    var htmlEscape = function (html) {
+      return html.replace(/["'<>&]/g, function (match) {
+        return get(entitiesAttr, match).getOr(match);
+      });
+    };
+
+    var getPreviewContent = function (editor, html) {
+      if (html.indexOf('<html>') === -1) {
+        var contentCssLinks_1 = '';
+        global$1.each(editor.contentCSS, function (url) {
+          contentCssLinks_1 += '<link type="text/css" rel="stylesheet" href="' + editor.documentBaseURI.toAbsolute(url) + '">';
+        });
+        var bodyClass = editor.settings.body_class || '';
+        if (bodyClass.indexOf('=') !== -1) {
+          bodyClass = editor.getParam('body_class', '', 'hash');
+          bodyClass = bodyClass[editor.id] || '';
+        }
+        var encode = editor.dom.encode;
+        var directionality = editor.getBody().dir;
+        var dirAttr = directionality ? ' dir="' + encode(directionality) + '"' : '';
+        html = '<!DOCTYPE html>' + '<html>' + '<head>' + contentCssLinks_1 + '</head>' + '<body class="' + encode(bodyClass) + '"' + dirAttr + '>' + html + '</body>' + '</html>';
+      }
+      return replaceTemplateValues(html, getPreviewReplaceValues(editor));
+    };
+    var open = function (editor, templateList) {
+      var createTemplates = function () {
+        if (!templateList || templateList.length === 0) {
+          var message = editor.translate('No templates defined.');
+          editor.notificationManager.open({
+            text: message,
+            type: 'info'
+          });
+          return Option.none();
+        }
+        return Option.from(global$1.map(templateList, function (template, index) {
+          var isUrlTemplate = function (t) {
+            return t.url !== undefined;
+          };
+          return {
+            selected: index === 0,
+            text: template.title,
+            value: {
+              url: isUrlTemplate(template) ? Option.from(template.url) : Option.none(),
+              content: !isUrlTemplate(template) ? Option.from(template.content) : Option.none(),
+              description: template.description
+            }
+          };
+        }));
+      };
+      var createSelectBoxItems = function (templates) {
+        return map(templates, function (t) {
+          return {
+            text: t.text,
+            value: t.text
+          };
+        });
+      };
+      var findTemplate = function (templates, templateTitle) {
+        return find(templates, function (t) {
+          return t.text === templateTitle;
+        });
+      };
+      var loadFailedAlert = function (api) {
+        editor.windowManager.alert('Could not load the specified template.', function () {
+          return api.focus('template');
+        });
+      };
+      var getTemplateContent = function (t) {
+        return new global$3(function (resolve, reject) {
+          t.value.url.fold(function () {
+            return resolve(t.value.content.getOr(''));
+          }, function (url) {
+            return global$2.send({
+              url: url,
+              success: function (html) {
+                resolve(html);
+              },
+              error: function (e) {
+                reject(e);
+              }
+            });
+          });
+        });
+      };
+      var onChange = function (templates, updateDialog) {
+        return function (api, change) {
+          if (change.name === 'template') {
+            var newTemplateTitle = api.getData().template;
+            findTemplate(templates, newTemplateTitle).each(function (t) {
+              api.block('Loading...');
+              getTemplateContent(t).then(function (previewHtml) {
+                updateDialog(api, t, previewHtml);
+              }).catch(function () {
+                updateDialog(api, t, '');
+                api.disable('save');
+                loadFailedAlert(api);
+              });
+            });
+          }
+        };
+      };
+      var onSubmit = function (templates) {
+        return function (api) {
+          var data = api.getData();
+          findTemplate(templates, data.template).each(function (t) {
+            getTemplateContent(t).then(function (previewHtml) {
+              insertTemplate(editor, false, previewHtml);
+              api.close();
+            }).catch(function () {
+              api.disable('save');
+              loadFailedAlert(api);
+            });
+          });
+        };
+      };
+      var openDialog = function (templates) {
+        var selectBoxItems = createSelectBoxItems(templates);
+        var buildDialogSpec = function (bodyItems, initialData) {
+          return {
+            title: 'Insert Template',
+            size: 'large',
+            body: {
+              type: 'panel',
+              items: bodyItems
+            },
+            initialData: initialData,
+            buttons: [
+              {
+                type: 'cancel',
+                name: 'cancel',
+                text: 'Cancel'
+              },
+              {
+                type: 'submit',
+                name: 'save',
+                text: 'Save',
+                primary: true
+              }
+            ],
+            onSubmit: onSubmit(templates),
+            onChange: onChange(templates, updateDialog)
+          };
+        };
+        var updateDialog = function (dialogApi, template, previewHtml) {
+          var content = getPreviewContent(editor, previewHtml);
+          var bodyItems = [
+            {
+              type: 'selectbox',
+              name: 'template',
+              label: 'Templates',
+              items: selectBoxItems
+            },
+            {
+              type: 'htmlpanel',
+              html: '<p aria-live="polite">' + htmlEscape(template.value.description) + '</p>'
+            },
+            {
+              label: 'Preview',
+              type: 'iframe',
+              name: 'preview',
+              sandboxed: false
+            }
+          ];
+          var initialData = {
+            template: template.text,
+            preview: content
+          };
+          dialogApi.unblock();
+          dialogApi.redial(buildDialogSpec(bodyItems, initialData));
+          dialogApi.focus('template');
+        };
+        var dialogApi = editor.windowManager.open(buildDialogSpec([], {
+          template: '',
+          preview: ''
+        }));
+        dialogApi.block('Loading...');
+        getTemplateContent(templates[0]).then(function (previewHtml) {
+          updateDialog(dialogApi, templates[0], previewHtml);
+        }).catch(function () {
+          updateDialog(dialogApi, templates[0], '');
+          dialogApi.disable('save');
+          loadFailedAlert(dialogApi);
+        });
+      };
+      var optTemplates = createTemplates();
+      optTemplates.each(openDialog);
+    };
+
+    var showDialog = function (editor) {
+      return function (templates) {
+        open(editor, templates);
+      };
+    };
+    var register$1 = function (editor) {
+      editor.ui.registry.addButton('template', {
+        icon: 'template',
+        tooltip: 'Insert template',
+        onAction: createTemplateList(editor.settings, showDialog(editor))
+      });
+      editor.ui.registry.addMenuItem('template', {
+        icon: 'template',
+        text: 'Insert template...',
+        onAction: createTemplateList(editor.settings, showDialog(editor))
+      });
+    };
+
+    function Plugin () {
+      global.add('template', function (editor) {
+        register$1(editor);
+        register(editor);
+        setup(editor);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/template/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(){},o=function(e){return function(){return e}};var n,r,a,u=o(!1),i=o(!0),p=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=tinymce.util.Tools.resolve("tinymce.util.XHR"),l=function(e){return e.getParam("template_replace_values")},s=function(e){return e.getParam("template_mdate_format",e.translate("%Y-%m-%d"))},f=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},m=function(e,t,n){var r="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),o="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),u="January February March April May June July August September October November December".split(" ");return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",f(n.getMonth()+1,2))).replace("%d",f(n.getDate(),2))).replace("%H",""+f(n.getHours(),2))).replace("%M",""+f(n.getMinutes(),2))).replace("%S",""+f(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(u[n.getMonth()]))).replace("%b",""+e.translate(o[n.getMonth()]))).replace("%A",""+e.translate(a[n.getDay()]))).replace("%a",""+e.translate(r[n.getDay()]))).replace("%%","%")},d=function(t,n){return function(){var e=t.templates;"function"!=typeof e?"string"==typeof e?c.send({url:e,success:function(e){n(JSON.parse(e))}}):n(e):e(n)}},g=function(n,e){return p.each(e,function(e,t){"function"==typeof e&&(e=e(t)),n=n.replace(new RegExp("\\{\\$"+t+"\\}","g"),e)}),n},v=function(e,t){var r=e.dom,a=l(e);p.each(r.select("*",t),function(n){p.each(a,function(e,t){r.hasClass(n,t)&&"function"==typeof a[t]&&a[t](n)})})},h=function(e,t){return new RegExp("\\b"+t+"\\b","g").test(e.className)},y=function(n,e,t){var r,a,o=n.dom,u=n.selection.getContent();t=g(t,l(n)),r=o.create("div",null,t),(a=o.select(".mceTmpl",r))&&0<a.length&&(r=o.create("div",null)).appendChild(a[0].cloneNode(!0)),p.each(o.select("*",r),function(e){var t;h(e,n.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(e.innerHTML=m(n,(t=n).getParam("template_cdate_format",t.translate("%Y-%m-%d")))),h(e,n.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(e.innerHTML=m(n,s(n))),h(e,n.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(e.innerHTML=u)}),v(n,r),n.execCommand("mceInsertContent",!1,r.innerHTML),n.addVisual()},b=function(e){e.addCommand("mceInsertTemplate",function t(r){for(var a=[],e=1;e<arguments.length;e++)a[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=a.concat(e);return r.apply(null,n)}}(y,e))},M=function(){return T},T=(n=function(e){return e.isNone()},{fold:function(e,t){return e()},is:u,isSome:u,isNone:i,getOr:a=function(e){return e},getOrThunk:r=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:a,orThunk:r,map:M,each:t,bind:M,exists:u,forall:i,filter:M,equals:n,equals_:n,toArray:function(){return[]},toString:o("none()")}),_=function(n){var e=o(n),t=function(){return a},r=function(e){return e(n)},a={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:i,isNone:u,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return _(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?a:T},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(u,function(e){return t(n,e)})}};return a},O={some:_,none:M,from:function(e){return null===e||e===undefined?T:_(e)}},x=function(e,t){return function(e,t,n){for(var r=0,a=e.length;r<a;r++){var o=e[r];if(t(o,r))return O.some(o);if(n(o,r))break}return O.none()}(e,t,u)},S=tinymce.util.Tools.resolve("tinymce.util.Promise"),w=Object.hasOwnProperty,P=function(e,t){return w.call(e,t)},D={'"':"&quot;","<":"&lt;",">":"&gt;","&":"&amp;","'":"&#039;"},C=function(e){return e.replace(/["'<>&]/g,function(e){return(P(t=D,n=e)?O.from(t[n]):O.none()).getOr(e);var t,n})},A=function(l,t){var e=function(e){return function(e,t){for(var n=e.length,r=new Array(n),a=0;a<n;a++){var o=e[a];r[a]=t(o,a)}return r}(e,function(e){return{text:e.text,value:e.text}})},s=function(e,t){return x(e,function(e){return e.text===t})},f=function(e){l.windowManager.alert("Could not load the specified template.",function(){return e.focus("template")})},m=function(e){return new S(function(t,n){e.value.url.fold(function(){return t(e.value.content.getOr(""))},function(e){return c.send({url:e,success:function(e){t(e)},error:function(e){n(e)}})})})};(function(){if(t&&0!==t.length)return O.from(p.map(t,function(e,t){var n=function(e){return e.url!==undefined};return{selected:0===t,text:e.title,value:{url:n(e)?O.from(e.url):O.none(),content:n(e)?O.none():O.from(e.content),description:e.description}}}));var e=l.translate("No templates defined.");return l.notificationManager.open({text:e,type:"info"}),O.none()})().each(function(o){var u=e(o),i=function(e,t){return{title:"Insert Template",size:"large",body:{type:"panel",items:e},initialData:t,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(t){var e=t.getData();s(n,e.template).each(function(e){m(e).then(function(e){y(l,0,e),t.close()})["catch"](function(){t.disable("save"),f(t)})})},onChange:(r=n=o,a=c,function(n,e){if("template"===e.name){var t=n.getData().template;s(r,t).each(function(t){n.block("Loading..."),m(t).then(function(e){a(n,t,e)})["catch"](function(){a(n,t,""),n.disable("save"),f(n)})})}})};var r,a,n},c=function(e,t,n){var r=function(t,e){if(-1===e.indexOf("<html>")){var n="";p.each(t.contentCSS,function(e){n+='<link type="text/css" rel="stylesheet" href="'+t.documentBaseURI.toAbsolute(e)+'">'});var r=t.settings.body_class||"";-1!==r.indexOf("=")&&(r=(r=t.getParam("body_class","","hash"))[t.id]||"");var a=t.dom.encode,o=t.getBody().dir,u=o?' dir="'+a(o)+'"':"";e="<!DOCTYPE html><html><head>"+n+'</head><body class="'+a(r)+'"'+u+">"+e+"</body></html>"}return g(e,t.getParam("template_preview_replace_values"))}(l,n),a=[{type:"selectbox",name:"template",label:"Templates",items:u},{type:"htmlpanel",html:'<p aria-live="polite">'+C(t.value.description)+"</p>"},{label:"Preview",type:"iframe",name:"preview",sandboxed:!1}],o={template:t.text,preview:r};e.unblock(),e.redial(i(a,o)),e.focus("template")},t=l.windowManager.open(i([],{template:"",preview:""}));t.block("Loading..."),m(o[0]).then(function(e){c(t,o[0],e)})["catch"](function(){c(t,o[0],""),t.disable("save"),f(t)})})},N=function(t){return function(e){A(t,e)}};!function H(){e.add("template",function(e){var t,r;(t=e).ui.registry.addButton("template",{icon:"template",tooltip:"Insert template",onAction:d(t.settings,N(t))}),t.ui.registry.addMenuItem("template",{icon:"template",text:"Insert template...",onAction:d(t.settings,N(t))}),b(e),(r=e).on("PreProcess",function(e){var t=r.dom,n=s(r);p.each(t.select("div",e.node),function(e){t.hasClass(e,"mceTmpl")&&(p.each(t.select("*",e),function(e){t.hasClass(e,r.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(e.innerHTML=m(r,n))}),v(r,e))})})})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/textcolor/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "textcolor" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/textcolor')
+//   ES2015:
+//     import 'tinymce/plugins/textcolor'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/textcolor/plugin.js
@@ -1,1 +1,23 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
 
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    function Plugin () {
+      global.add('textcolor', function () {
+        domGlobals.console.warn('Text color plugin is now built in to the core editor, please remove it from your editor configuration');
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/textcolor/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(o){"use strict";var i=tinymce.util.Tools.resolve("tinymce.PluginManager");!function n(){i.add("textcolor",function(){o.console.warn("Text color plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/textpattern/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "textpattern" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/textpattern')
+//   ES2015:
+//     import 'tinymce/plugins/textpattern'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/textpattern/plugin.js
@@ -1,1 +1,1396 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+    function __spreadArrays() {
+      for (var s = 0, i = 0, il = arguments.length; i < il; i++)
+        s += arguments[i].length;
+      for (var r = Array(s), k = 0, i = 0; i < il; i++)
+        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
+          r[k] = a[j];
+      return r;
+    }
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var identity = function (x) {
+      return x;
+    };
+    var die = function (msg) {
+      return function () {
+        throw new Error(msg);
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var typeOf = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf(value) === type;
+      };
+    };
+    var isString = isType('string');
+    var isObject = isType('object');
+    var isArray = isType('array');
+
+    var nativeSlice = Array.prototype.slice;
+    var nativeIndexOf = Array.prototype.indexOf;
+    var rawIndexOf = function (ts, t) {
+      return nativeIndexOf.call(ts, t);
+    };
+    var contains = function (xs, x) {
+      return rawIndexOf(xs, x) > -1;
+    };
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var each = function (xs, f) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var eachr = function (xs, f) {
+      for (var i = xs.length - 1; i >= 0; i--) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var filter = function (xs, pred) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          r.push(x);
+        }
+      }
+      return r;
+    };
+    var foldr = function (xs, f, acc) {
+      eachr(xs, function (x) {
+        acc = f(acc, x);
+      });
+      return acc;
+    };
+    var foldl = function (xs, f, acc) {
+      each(xs, function (x) {
+        acc = f(acc, x);
+      });
+      return acc;
+    };
+    var findUntil = function (xs, pred, until) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return Option.some(x);
+        } else if (until(x, i)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var find = function (xs, pred) {
+      return findUntil(xs, pred, never);
+    };
+    var forall = function (xs, pred) {
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        var x = xs[i];
+        if (pred(x, i) !== true) {
+          return false;
+        }
+      }
+      return true;
+    };
+    var sort = function (xs, comparator) {
+      var copy = nativeSlice.call(xs, 0);
+      copy.sort(comparator);
+      return copy;
+    };
+    var head = function (xs) {
+      return xs.length === 0 ? Option.none() : Option.some(xs[0]);
+    };
+
+    var keys = Object.keys;
+    var hasOwnProperty = Object.hasOwnProperty;
+    var get = function (obj, key) {
+      return has(obj, key) ? Option.from(obj[key]) : Option.none();
+    };
+    var has = function (obj, key) {
+      return hasOwnProperty.call(obj, key);
+    };
+
+    var generate = function (cases) {
+      if (!isArray(cases)) {
+        throw new Error('cases must be an array');
+      }
+      if (cases.length === 0) {
+        throw new Error('there must be at least one case');
+      }
+      var constructors = [];
+      var adt = {};
+      each(cases, function (acase, count) {
+        var keys$1 = keys(acase);
+        if (keys$1.length !== 1) {
+          throw new Error('one and only one name per case');
+        }
+        var key = keys$1[0];
+        var value = acase[key];
+        if (adt[key] !== undefined) {
+          throw new Error('duplicate key detected:' + key);
+        } else if (key === 'cata') {
+          throw new Error('cannot have a case named cata (sorry)');
+        } else if (!isArray(value)) {
+          throw new Error('case arguments must be an array');
+        }
+        constructors.push(key);
+        adt[key] = function () {
+          var argLength = arguments.length;
+          if (argLength !== value.length) {
+            throw new Error('Wrong number of arguments to case ' + key + '. Expected ' + value.length + ' (' + value + '), got ' + argLength);
+          }
+          var args = new Array(argLength);
+          for (var i = 0; i < args.length; i++) {
+            args[i] = arguments[i];
+          }
+          var match = function (branches) {
+            var branchKeys = keys(branches);
+            if (constructors.length !== branchKeys.length) {
+              throw new Error('Wrong number of arguments to match. Expected: ' + constructors.join(',') + '\nActual: ' + branchKeys.join(','));
+            }
+            var allReqd = forall(constructors, function (reqKey) {
+              return contains(branchKeys, reqKey);
+            });
+            if (!allReqd) {
+              throw new Error('Not all branches were specified when using match. Specified: ' + branchKeys.join(', ') + '\nRequired: ' + constructors.join(', '));
+            }
+            return branches[key].apply(null, args);
+          };
+          return {
+            fold: function () {
+              if (arguments.length !== cases.length) {
+                throw new Error('Wrong number of arguments to fold. Expected ' + cases.length + ', got ' + arguments.length);
+              }
+              var target = arguments[count];
+              return target.apply(null, args);
+            },
+            match: match,
+            log: function (label) {
+              domGlobals.console.log(label, {
+                constructors: constructors,
+                constructor: key,
+                params: args
+              });
+            }
+          };
+        };
+      });
+      return adt;
+    };
+    var Adt = { generate: generate };
+
+    var comparison = Adt.generate([
+      {
+        bothErrors: [
+          'error1',
+          'error2'
+        ]
+      },
+      {
+        firstError: [
+          'error1',
+          'value2'
+        ]
+      },
+      {
+        secondError: [
+          'value1',
+          'error2'
+        ]
+      },
+      {
+        bothValues: [
+          'value1',
+          'value2'
+        ]
+      }
+    ]);
+    var partition = function (results) {
+      var errors = [];
+      var values = [];
+      each(results, function (result) {
+        result.fold(function (err) {
+          errors.push(err);
+        }, function (value) {
+          values.push(value);
+        });
+      });
+      return {
+        errors: errors,
+        values: values
+      };
+    };
+
+    var value = function (o) {
+      var is = function (v) {
+        return o === v;
+      };
+      var or = function (_opt) {
+        return value(o);
+      };
+      var orThunk = function (_f) {
+        return value(o);
+      };
+      var map = function (f) {
+        return value(f(o));
+      };
+      var mapError = function (_f) {
+        return value(o);
+      };
+      var each = function (f) {
+        f(o);
+      };
+      var bind = function (f) {
+        return f(o);
+      };
+      var fold = function (_, onValue) {
+        return onValue(o);
+      };
+      var exists = function (f) {
+        return f(o);
+      };
+      var forall = function (f) {
+        return f(o);
+      };
+      var toOption = function () {
+        return Option.some(o);
+      };
+      return {
+        is: is,
+        isValue: always,
+        isError: never,
+        getOr: constant(o),
+        getOrThunk: constant(o),
+        getOrDie: constant(o),
+        or: or,
+        orThunk: orThunk,
+        fold: fold,
+        map: map,
+        mapError: mapError,
+        each: each,
+        bind: bind,
+        exists: exists,
+        forall: forall,
+        toOption: toOption
+      };
+    };
+    var error = function (message) {
+      var getOrThunk = function (f) {
+        return f();
+      };
+      var getOrDie = function () {
+        return die(String(message))();
+      };
+      var or = function (opt) {
+        return opt;
+      };
+      var orThunk = function (f) {
+        return f();
+      };
+      var map = function (_f) {
+        return error(message);
+      };
+      var mapError = function (f) {
+        return error(f(message));
+      };
+      var bind = function (_f) {
+        return error(message);
+      };
+      var fold = function (onError, _) {
+        return onError(message);
+      };
+      return {
+        is: never,
+        isValue: never,
+        isError: always,
+        getOr: identity,
+        getOrThunk: getOrThunk,
+        getOrDie: getOrDie,
+        or: or,
+        orThunk: orThunk,
+        fold: fold,
+        map: map,
+        mapError: mapError,
+        each: noop,
+        bind: bind,
+        exists: never,
+        forall: always,
+        toOption: Option.none
+      };
+    };
+    var fromOption = function (opt, err) {
+      return opt.fold(function () {
+        return error(err);
+      }, value);
+    };
+    var Result = {
+      value: value,
+      error: error,
+      fromOption: fromOption
+    };
+
+    var isInlinePattern = function (pattern) {
+      return pattern.type === 'inline-command' || pattern.type === 'inline-format';
+    };
+    var isBlockPattern = function (pattern) {
+      return pattern.type === 'block-command' || pattern.type === 'block-format';
+    };
+    var sortPatterns = function (patterns) {
+      return sort(patterns, function (a, b) {
+        if (a.start.length === b.start.length) {
+          return 0;
+        }
+        return a.start.length > b.start.length ? -1 : 1;
+      });
+    };
+    var normalizePattern = function (pattern) {
+      var err = function (message) {
+        return Result.error({
+          message: message,
+          pattern: pattern
+        });
+      };
+      var formatOrCmd = function (name, onFormat, onCommand) {
+        if (pattern.format !== undefined) {
+          var formats = void 0;
+          if (isArray(pattern.format)) {
+            if (!forall(pattern.format, isString)) {
+              return err(name + ' pattern has non-string items in the `format` array');
+            }
+            formats = pattern.format;
+          } else if (isString(pattern.format)) {
+            formats = [pattern.format];
+          } else {
+            return err(name + ' pattern has non-string `format` parameter');
+          }
+          return Result.value(onFormat(formats));
+        } else if (pattern.cmd !== undefined) {
+          if (!isString(pattern.cmd)) {
+            return err(name + ' pattern has non-string `cmd` parameter');
+          }
+          return Result.value(onCommand(pattern.cmd, pattern.value));
+        } else {
+          return err(name + ' pattern is missing both `format` and `cmd` parameters');
+        }
+      };
+      if (!isObject(pattern)) {
+        return err('Raw pattern is not an object');
+      }
+      if (!isString(pattern.start)) {
+        return err('Raw pattern is missing `start` parameter');
+      }
+      if (pattern.end !== undefined) {
+        if (!isString(pattern.end)) {
+          return err('Inline pattern has non-string `end` parameter');
+        }
+        if (pattern.start.length === 0 && pattern.end.length === 0) {
+          return err('Inline pattern has empty `start` and `end` parameters');
+        }
+        var start_1 = pattern.start;
+        var end_1 = pattern.end;
+        if (end_1.length === 0) {
+          end_1 = start_1;
+          start_1 = '';
+        }
+        return formatOrCmd('Inline', function (format) {
+          return {
+            type: 'inline-format',
+            start: start_1,
+            end: end_1,
+            format: format
+          };
+        }, function (cmd, value) {
+          return {
+            type: 'inline-command',
+            start: start_1,
+            end: end_1,
+            cmd: cmd,
+            value: value
+          };
+        });
+      } else if (pattern.replacement !== undefined) {
+        if (!isString(pattern.replacement)) {
+          return err('Replacement pattern has non-string `replacement` parameter');
+        }
+        if (pattern.start.length === 0) {
+          return err('Replacement pattern has empty `start` parameter');
+        }
+        return Result.value({
+          type: 'inline-command',
+          start: '',
+          end: pattern.start,
+          cmd: 'mceInsertContent',
+          value: pattern.replacement
+        });
+      } else {
+        if (pattern.start.length === 0) {
+          return err('Block pattern has empty `start` parameter');
+        }
+        return formatOrCmd('Block', function (formats) {
+          return {
+            type: 'block-format',
+            start: pattern.start,
+            format: formats[0]
+          };
+        }, function (command, commandValue) {
+          return {
+            type: 'block-command',
+            start: pattern.start,
+            cmd: command,
+            value: commandValue
+          };
+        });
+      }
+    };
+    var denormalizePattern = function (pattern) {
+      if (pattern.type === 'block-command') {
+        return {
+          start: pattern.start,
+          cmd: pattern.cmd,
+          value: pattern.value
+        };
+      } else if (pattern.type === 'block-format') {
+        return {
+          start: pattern.start,
+          format: pattern.format
+        };
+      } else if (pattern.type === 'inline-command') {
+        if (pattern.cmd === 'mceInsertContent' && pattern.start === '') {
+          return {
+            start: pattern.end,
+            replacement: pattern.value
+          };
+        } else {
+          return {
+            start: pattern.start,
+            end: pattern.end,
+            cmd: pattern.cmd,
+            value: pattern.value
+          };
+        }
+      } else if (pattern.type === 'inline-format') {
+        return {
+          start: pattern.start,
+          end: pattern.end,
+          format: pattern.format.length === 1 ? pattern.format[0] : pattern.format
+        };
+      }
+    };
+    var createPatternSet = function (patterns) {
+      return {
+        inlinePatterns: filter(patterns, isInlinePattern),
+        blockPatterns: sortPatterns(filter(patterns, isBlockPattern))
+      };
+    };
+
+    var get$1 = function (patternsState) {
+      var setPatterns = function (newPatterns) {
+        var normalized = partition(map(newPatterns, normalizePattern));
+        if (normalized.errors.length > 0) {
+          var firstError = normalized.errors[0];
+          throw new Error(firstError.message + ':\n' + JSON.stringify(firstError.pattern, null, 2));
+        }
+        patternsState.set(createPatternSet(normalized.values));
+      };
+      var getPatterns = function () {
+        return __spreadArrays(map(patternsState.get().inlinePatterns, denormalizePattern), map(patternsState.get().blockPatterns, denormalizePattern));
+      };
+      return {
+        setPatterns: setPatterns,
+        getPatterns: getPatterns
+      };
+    };
+
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
+
+    var error$1 = function () {
+      var args = [];
+      for (var _i = 0; _i < arguments.length; _i++) {
+        args[_i] = arguments[_i];
+      }
+      var console = Global.console;
+      if (console) {
+        if (console.error) {
+          console.error.apply(console, args);
+        } else {
+          console.log.apply(console, args);
+        }
+      }
+    };
+    var defaultPatterns = [
+      {
+        start: '*',
+        end: '*',
+        format: 'italic'
+      },
+      {
+        start: '**',
+        end: '**',
+        format: 'bold'
+      },
+      {
+        start: '#',
+        format: 'h1'
+      },
+      {
+        start: '##',
+        format: 'h2'
+      },
+      {
+        start: '###',
+        format: 'h3'
+      },
+      {
+        start: '####',
+        format: 'h4'
+      },
+      {
+        start: '#####',
+        format: 'h5'
+      },
+      {
+        start: '######',
+        format: 'h6'
+      },
+      {
+        start: '1. ',
+        cmd: 'InsertOrderedList'
+      },
+      {
+        start: '* ',
+        cmd: 'InsertUnorderedList'
+      },
+      {
+        start: '- ',
+        cmd: 'InsertUnorderedList'
+      }
+    ];
+    var getPatternSet = function (editorSettings) {
+      var patterns = get(editorSettings, 'textpattern_patterns').getOr(defaultPatterns);
+      if (!isArray(patterns)) {
+        error$1('The setting textpattern_patterns should be an array');
+        return {
+          inlinePatterns: [],
+          blockPatterns: []
+        };
+      }
+      var normalized = partition(map(patterns, normalizePattern));
+      each(normalized.errors, function (err) {
+        return error$1(err.message, err.pattern);
+      });
+      return createPatternSet(normalized.values);
+    };
+    var getForcedRootBlock = function (editor) {
+      var block = editor.getParam('forced_root_block', 'p');
+      if (block === false) {
+        return '';
+      } else if (block === true) {
+        return 'p';
+      } else {
+        return block;
+      }
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Delay');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.VK');
+
+    var zeroWidth = '\uFEFF';
+    var nbsp = '\xA0';
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var global$4 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
+
+    var global$5 = tinymce.util.Tools.resolve('tinymce.dom.TextSeeker');
+
+    var point = function (container, offset) {
+      return {
+        container: container,
+        offset: offset
+      };
+    };
+
+    var isText = function (node) {
+      return node.nodeType === domGlobals.Node.TEXT_NODE;
+    };
+    var cleanEmptyNodes = function (dom, node, isRoot) {
+      if (node && dom.isEmpty(node) && !isRoot(node)) {
+        var parent_1 = node.parentNode;
+        dom.remove(node);
+        cleanEmptyNodes(dom, parent_1, isRoot);
+      }
+    };
+    var deleteRng = function (dom, rng, isRoot, clean) {
+      if (clean === void 0) {
+        clean = true;
+      }
+      var startParent = rng.startContainer.parentNode;
+      var endParent = rng.endContainer.parentNode;
+      rng.deleteContents();
+      if (clean && !isRoot(rng.startContainer)) {
+        if (isText(rng.startContainer) && rng.startContainer.data.length === 0) {
+          dom.remove(rng.startContainer);
+        }
+        if (isText(rng.endContainer) && rng.endContainer.data.length === 0) {
+          dom.remove(rng.endContainer);
+        }
+        cleanEmptyNodes(dom, startParent, isRoot);
+        if (startParent !== endParent) {
+          cleanEmptyNodes(dom, endParent, isRoot);
+        }
+      }
+    };
+    var isBlockFormatName = function (name, formatter) {
+      var formatSet = formatter.get(name);
+      return isArray(formatSet) && head(formatSet).exists(function (format) {
+        return has(format, 'block');
+      });
+    };
+    var isReplacementPattern = function (pattern) {
+      return pattern.start.length === 0;
+    };
+    var getParentBlock = function (editor, rng) {
+      var parentBlockOpt = Option.from(editor.dom.getParent(rng.startContainer, editor.dom.isBlock));
+      if (getForcedRootBlock(editor) === '') {
+        return parentBlockOpt.orThunk(function () {
+          return Option.some(editor.getBody());
+        });
+      } else {
+        return parentBlockOpt;
+      }
+    };
+
+    var DOM = global$4.DOM;
+    var alwaysNext = function (startNode) {
+      return function (node) {
+        return startNode === node ? -1 : 0;
+      };
+    };
+    var isBoundary = function (dom) {
+      return function (node) {
+        return dom.isBlock(node) || contains([
+          'BR',
+          'IMG',
+          'HR',
+          'INPUT'
+        ], node.nodeName) || dom.getContentEditable(node) === 'false';
+      };
+    };
+    var textBefore = function (node, offset, rootNode) {
+      if (isText(node) && offset >= 0) {
+        return Option.some(point(node, offset));
+      } else {
+        var textSeeker = global$5(DOM);
+        return Option.from(textSeeker.backwards(node, offset, alwaysNext(node), rootNode)).map(function (prev) {
+          return point(prev.container, prev.container.data.length);
+        });
+      }
+    };
+    var textAfter = function (node, offset, rootNode) {
+      if (isText(node) && offset >= node.length) {
+        return Option.some(point(node, offset));
+      } else {
+        var textSeeker = global$5(DOM);
+        return Option.from(textSeeker.forwards(node, offset, alwaysNext(node), rootNode)).map(function (prev) {
+          return point(prev.container, 0);
+        });
+      }
+    };
+    var scanLeft = function (node, offset, rootNode) {
+      if (!isText(node)) {
+        return Option.none();
+      }
+      var text = node.textContent;
+      if (offset >= 0 && offset <= text.length) {
+        return Option.some(point(node, offset));
+      } else {
+        var textSeeker = global$5(DOM);
+        return Option.from(textSeeker.backwards(node, offset, alwaysNext(node), rootNode)).bind(function (prev) {
+          var prevText = prev.container.data;
+          return scanLeft(prev.container, offset + prevText.length, rootNode);
+        });
+      }
+    };
+    var scanRight = function (node, offset, rootNode) {
+      if (!isText(node)) {
+        return Option.none();
+      }
+      var text = node.textContent;
+      if (offset <= text.length) {
+        return Option.some(point(node, offset));
+      } else {
+        var textSeeker = global$5(DOM);
+        return Option.from(textSeeker.forwards(node, offset, alwaysNext(node), rootNode)).bind(function (next) {
+          return scanRight(next.container, offset - text.length, rootNode);
+        });
+      }
+    };
+    var repeatLeft = function (dom, node, offset, process, rootNode) {
+      var search = global$5(dom, isBoundary(dom));
+      return Option.from(search.backwards(node, offset, process, rootNode));
+    };
+
+    var generatePath = function (root, node, offset) {
+      if (isText(node) && (offset < 0 || offset > node.data.length)) {
+        return [];
+      }
+      var p = [offset];
+      var current = node;
+      while (current !== root && current.parentNode) {
+        var parent_1 = current.parentNode;
+        for (var i = 0; i < parent_1.childNodes.length; i++) {
+          if (parent_1.childNodes[i] === current) {
+            p.push(i);
+            break;
+          }
+        }
+        current = parent_1;
+      }
+      return current === root ? p.reverse() : [];
+    };
+    var generatePathRange = function (root, startNode, startOffset, endNode, endOffset) {
+      var start = generatePath(root, startNode, startOffset);
+      var end = generatePath(root, endNode, endOffset);
+      return {
+        start: start,
+        end: end
+      };
+    };
+    var resolvePath = function (root, path) {
+      var nodePath = path.slice();
+      var offset = nodePath.pop();
+      return foldl(nodePath, function (optNode, index) {
+        return optNode.bind(function (node) {
+          return Option.from(node.childNodes[index]);
+        });
+      }, Option.some(root)).bind(function (node) {
+        if (isText(node) && offset >= 0 && offset <= node.data.length) {
+          return Option.some({
+            node: node,
+            offset: offset
+          });
+        } else {
+          return Option.some({
+            node: node,
+            offset: offset
+          });
+        }
+      });
+    };
+    var resolvePathRange = function (root, range) {
+      return resolvePath(root, range.start).bind(function (_a) {
+        var startNode = _a.node, startOffset = _a.offset;
+        return resolvePath(root, range.end).map(function (_a) {
+          var endNode = _a.node, endOffset = _a.offset;
+          var rng = domGlobals.document.createRange();
+          rng.setStart(startNode, startOffset);
+          rng.setEnd(endNode, endOffset);
+          return rng;
+        });
+      });
+    };
+    var generatePathRangeFromRange = function (root, range) {
+      return generatePathRange(root, range.startContainer, range.startOffset, range.endContainer, range.endOffset);
+    };
+
+    var stripPattern = function (dom, block, pattern) {
+      var firstTextNode = textAfter(block, 0, block);
+      firstTextNode.each(function (spot) {
+        var node = spot.container;
+        scanRight(node, pattern.start.length, block).each(function (end) {
+          var rng = dom.createRng();
+          rng.setStart(node, 0);
+          rng.setEnd(end.container, end.offset);
+          deleteRng(dom, rng, function (e) {
+            return e === block;
+          });
+        });
+      });
+    };
+    var applyPattern = function (editor, match) {
+      var dom = editor.dom;
+      var pattern = match.pattern;
+      var rng = resolvePathRange(dom.getRoot(), match.range).getOrDie('Unable to resolve path range');
+      getParentBlock(editor, rng).each(function (block) {
+        if (pattern.type === 'block-format') {
+          if (isBlockFormatName(pattern.format, editor.formatter)) {
+            editor.undoManager.transact(function () {
+              stripPattern(editor.dom, block, pattern);
+              editor.formatter.apply(pattern.format);
+            });
+          }
+        } else if (pattern.type === 'block-command') {
+          editor.undoManager.transact(function () {
+            stripPattern(editor.dom, block, pattern);
+            editor.execCommand(pattern.cmd, false, pattern.value);
+          });
+        }
+      });
+      return true;
+    };
+    var findPattern = function (patterns, text) {
+      var nuText = text.replace(nbsp, ' ');
+      return find(patterns, function (pattern) {
+        if (text.indexOf(pattern.start) !== 0 && nuText.indexOf(pattern.start) !== 0) {
+          return false;
+        }
+        return true;
+      });
+    };
+    var findPatterns = function (editor, patterns) {
+      var dom = editor.dom;
+      var rng = editor.selection.getRng();
+      return getParentBlock(editor, rng).filter(function (block) {
+        var forcedRootBlock = getForcedRootBlock(editor);
+        var matchesForcedRootBlock = forcedRootBlock === '' && dom.is(block, 'body') || dom.is(block, forcedRootBlock);
+        return block !== null && matchesForcedRootBlock;
+      }).bind(function (block) {
+        var blockText = block.textContent;
+        var matchedPattern = findPattern(patterns, blockText);
+        return matchedPattern.map(function (pattern) {
+          if (global$3.trim(blockText).length === pattern.start.length) {
+            return [];
+          }
+          return [{
+              pattern: pattern,
+              range: generatePathRange(dom.getRoot(), block, 0, block, 0)
+            }];
+        });
+      }).getOr([]);
+    };
+    var applyMatches = function (editor, matches) {
+      if (matches.length === 0) {
+        return;
+      }
+      var bookmark = editor.selection.getBookmark();
+      each(matches, function (match) {
+        return applyPattern(editor, match);
+      });
+      editor.selection.moveToBookmark(bookmark);
+    };
+
+    var unique = 0;
+    var generate$1 = function (prefix) {
+      var date = new Date();
+      var time = date.getTime();
+      var random = Math.floor(Math.random() * 1000000000);
+      unique++;
+      return prefix + '_' + random + unique + String(time);
+    };
+
+    var checkRange = function (str, substr, start) {
+      return substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
+    };
+    var endsWith = function (str, suffix) {
+      return checkRange(str, suffix, str.length - suffix.length);
+    };
+
+    var newMarker = function (dom, id) {
+      return dom.create('span', {
+        'data-mce-type': 'bookmark',
+        id: id
+      });
+    };
+    var rangeFromMarker = function (dom, marker) {
+      var rng = dom.createRng();
+      rng.setStartAfter(marker.start);
+      rng.setEndBefore(marker.end);
+      return rng;
+    };
+    var createMarker = function (dom, markerPrefix, pathRange) {
+      var rng = resolvePathRange(dom.getRoot(), pathRange).getOrDie('Unable to resolve path range');
+      var startNode = rng.startContainer;
+      var endNode = rng.endContainer;
+      var textEnd = rng.endOffset === 0 ? endNode : endNode.splitText(rng.endOffset);
+      var textStart = rng.startOffset === 0 ? startNode : startNode.splitText(rng.startOffset);
+      return {
+        prefix: markerPrefix,
+        end: textEnd.parentNode.insertBefore(newMarker(dom, markerPrefix + '-end'), textEnd),
+        start: textStart.parentNode.insertBefore(newMarker(dom, markerPrefix + '-start'), textStart)
+      };
+    };
+    var removeMarker = function (dom, marker, isRoot) {
+      cleanEmptyNodes(dom, dom.get(marker.prefix + '-end'), isRoot);
+      cleanEmptyNodes(dom, dom.get(marker.prefix + '-start'), isRoot);
+    };
+
+    var matchesPattern = function (dom, block, patternContent) {
+      return function (element, offset) {
+        var text = element.data;
+        var searchText = text.substring(0, offset);
+        var startEndIndex = searchText.lastIndexOf(patternContent.charAt(patternContent.length - 1));
+        var startIndex = searchText.lastIndexOf(patternContent);
+        if (startIndex !== -1) {
+          return startIndex + patternContent.length;
+        } else if (startEndIndex !== -1) {
+          return startEndIndex + 1;
+        } else {
+          return -1;
+        }
+      };
+    };
+    var findPatternStartFromSpot = function (dom, pattern, block, spot) {
+      var startPattern = pattern.start;
+      var startSpot = repeatLeft(dom, spot.container, spot.offset, matchesPattern(dom, block, startPattern), block);
+      return startSpot.bind(function (spot) {
+        if (spot.offset >= startPattern.length) {
+          var rng = dom.createRng();
+          rng.setStart(spot.container, spot.offset - startPattern.length);
+          rng.setEnd(spot.container, spot.offset);
+          return Option.some(rng);
+        } else {
+          var offset = spot.offset - startPattern.length;
+          return scanLeft(spot.container, offset, block).map(function (nextSpot) {
+            var rng = dom.createRng();
+            rng.setStart(nextSpot.container, nextSpot.offset);
+            rng.setEnd(spot.container, spot.offset);
+            return rng;
+          }).filter(function (rng) {
+            return rng.toString() === startPattern;
+          }).orThunk(function () {
+            return findPatternStartFromSpot(dom, pattern, block, point(spot.container, 0));
+          });
+        }
+      });
+    };
+    var findPatternStart = function (dom, pattern, node, offset, block, requireGap) {
+      if (requireGap === void 0) {
+        requireGap = false;
+      }
+      if (pattern.start.length === 0 && !requireGap) {
+        var rng = dom.createRng();
+        rng.setStart(node, offset);
+        rng.setEnd(node, offset);
+        return Option.some(rng);
+      }
+      return textBefore(node, offset, block).bind(function (spot) {
+        var start = findPatternStartFromSpot(dom, pattern, block, spot);
+        return start.bind(function (startRange) {
+          if (requireGap) {
+            if (startRange.endContainer === spot.container && startRange.endOffset === spot.offset) {
+              return Option.none();
+            } else if (spot.offset === 0 && startRange.endContainer.textContent.length === startRange.endOffset) {
+              return Option.none();
+            }
+          }
+          return Option.some(startRange);
+        });
+      });
+    };
+    var findPattern$1 = function (editor, block, details) {
+      var dom = editor.dom;
+      var root = dom.getRoot();
+      var pattern = details.pattern;
+      var endNode = details.position.container;
+      var endOffset = details.position.offset;
+      return scanLeft(endNode, endOffset - details.pattern.end.length, block).bind(function (spot) {
+        var endPathRng = generatePathRange(root, spot.container, spot.offset, endNode, endOffset);
+        if (isReplacementPattern(pattern)) {
+          return Option.some({
+            matches: [{
+                pattern: pattern,
+                startRng: endPathRng,
+                endRng: endPathRng
+              }],
+            position: spot
+          });
+        } else {
+          var resultsOpt = findPatternsRec(editor, details.remainingPatterns, spot.container, spot.offset, block);
+          var results_1 = resultsOpt.getOr({
+            matches: [],
+            position: spot
+          });
+          var pos = results_1.position;
+          var start = findPatternStart(dom, pattern, pos.container, pos.offset, block, resultsOpt.isNone());
+          return start.map(function (startRng) {
+            var startPathRng = generatePathRangeFromRange(root, startRng);
+            return {
+              matches: results_1.matches.concat([{
+                  pattern: pattern,
+                  startRng: startPathRng,
+                  endRng: endPathRng
+                }]),
+              position: point(startRng.startContainer, startRng.startOffset)
+            };
+          });
+        }
+      });
+    };
+    var findPatternsRec = function (editor, patterns, node, offset, block) {
+      var dom = editor.dom;
+      return textBefore(node, offset, dom.getRoot()).bind(function (endSpot) {
+        var rng = dom.createRng();
+        rng.setStart(block, 0);
+        rng.setEnd(node, offset);
+        var text = rng.toString();
+        for (var i = 0; i < patterns.length; i++) {
+          var pattern = patterns[i];
+          if (!endsWith(text, pattern.end)) {
+            continue;
+          }
+          var patternsWithoutCurrent = patterns.slice();
+          patternsWithoutCurrent.splice(i, 1);
+          var result = findPattern$1(editor, block, {
+            pattern: pattern,
+            remainingPatterns: patternsWithoutCurrent,
+            position: endSpot
+          });
+          if (result.isSome()) {
+            return result;
+          }
+        }
+        return Option.none();
+      });
+    };
+    var applyPattern$1 = function (editor, pattern, patternRange) {
+      editor.selection.setRng(patternRange);
+      if (pattern.type === 'inline-format') {
+        each(pattern.format, function (format) {
+          editor.formatter.apply(format);
+        });
+      } else {
+        editor.execCommand(pattern.cmd, false, pattern.value);
+      }
+    };
+    var applyReplacementPattern = function (editor, pattern, marker, isRoot) {
+      var markerRange = rangeFromMarker(editor.dom, marker);
+      deleteRng(editor.dom, markerRange, isRoot);
+      applyPattern$1(editor, pattern, markerRange);
+    };
+    var applyPatternWithContent = function (editor, pattern, startMarker, endMarker, isRoot) {
+      var dom = editor.dom;
+      var markerEndRange = rangeFromMarker(dom, endMarker);
+      var markerStartRange = rangeFromMarker(dom, startMarker);
+      deleteRng(dom, markerStartRange, isRoot);
+      deleteRng(dom, markerEndRange, isRoot);
+      var patternMarker = {
+        prefix: startMarker.prefix,
+        start: startMarker.end,
+        end: endMarker.start
+      };
+      var patternRange = rangeFromMarker(dom, patternMarker);
+      applyPattern$1(editor, pattern, patternRange);
+    };
+    var addMarkers = function (dom, matches) {
+      var markerPrefix = generate$1('mce_textpattern');
+      var matchesWithEnds = foldr(matches, function (acc, match) {
+        var endMarker = createMarker(dom, markerPrefix + ('_end' + acc.length), match.endRng);
+        return acc.concat([__assign(__assign({}, match), { endMarker: endMarker })]);
+      }, []);
+      return foldr(matchesWithEnds, function (acc, match) {
+        var idx = matchesWithEnds.length - acc.length - 1;
+        var startMarker = isReplacementPattern(match.pattern) ? match.endMarker : createMarker(dom, markerPrefix + ('_start' + idx), match.startRng);
+        return acc.concat([__assign(__assign({}, match), { startMarker: startMarker })]);
+      }, []);
+    };
+    var findPatterns$1 = function (editor, patterns, space) {
+      var rng = editor.selection.getRng();
+      if (rng.collapsed === false) {
+        return [];
+      }
+      return getParentBlock(editor, rng).bind(function (block) {
+        var offset = rng.startOffset - (space ? 1 : 0);
+        return findPatternsRec(editor, patterns, rng.startContainer, offset, block);
+      }).fold(function () {
+        return [];
+      }, function (result) {
+        return result.matches;
+      });
+    };
+    var applyMatches$1 = function (editor, matches) {
+      if (matches.length === 0) {
+        return;
+      }
+      var dom = editor.dom;
+      var bookmark = editor.selection.getBookmark();
+      var matchesWithMarkers = addMarkers(dom, matches);
+      each(matchesWithMarkers, function (match) {
+        var block = dom.getParent(match.startMarker.start, dom.isBlock);
+        var isRoot = function (node) {
+          return node === block;
+        };
+        if (isReplacementPattern(match.pattern)) {
+          applyReplacementPattern(editor, match.pattern, match.endMarker, isRoot);
+        } else {
+          applyPatternWithContent(editor, match.pattern, match.startMarker, match.endMarker, isRoot);
+        }
+        removeMarker(dom, match.endMarker, isRoot);
+        removeMarker(dom, match.startMarker, isRoot);
+      });
+      editor.selection.moveToBookmark(bookmark);
+    };
+
+    var handleEnter = function (editor, patternSet) {
+      if (!editor.selection.isCollapsed()) {
+        return false;
+      }
+      var inlineMatches = findPatterns$1(editor, patternSet.inlinePatterns, false);
+      var blockMatches = findPatterns(editor, patternSet.blockPatterns);
+      if (blockMatches.length > 0 || inlineMatches.length > 0) {
+        editor.undoManager.add();
+        editor.undoManager.extra(function () {
+          editor.execCommand('mceInsertNewLine');
+        }, function () {
+          editor.insertContent(zeroWidth);
+          applyMatches$1(editor, inlineMatches);
+          applyMatches(editor, blockMatches);
+          var range = editor.selection.getRng();
+          var spot = textBefore(range.startContainer, range.startOffset, editor.dom.getRoot());
+          editor.execCommand('mceInsertNewLine');
+          spot.each(function (s) {
+            var node = s.container;
+            if (node.data.charAt(s.offset - 1) === zeroWidth) {
+              node.deleteData(s.offset - 1, 1);
+              cleanEmptyNodes(editor.dom, node.parentNode, function (e) {
+                return e === editor.dom.getRoot();
+              });
+            }
+          });
+        });
+        return true;
+      }
+      return false;
+    };
+    var handleInlineKey = function (editor, patternSet) {
+      var inlineMatches = findPatterns$1(editor, patternSet.inlinePatterns, true);
+      if (inlineMatches.length > 0) {
+        editor.undoManager.transact(function () {
+          applyMatches$1(editor, inlineMatches);
+        });
+      }
+    };
+    var checkKeyEvent = function (codes, event, predicate) {
+      for (var i = 0; i < codes.length; i++) {
+        if (predicate(codes[i], event)) {
+          return true;
+        }
+      }
+    };
+    var checkKeyCode = function (codes, event) {
+      return checkKeyEvent(codes, event, function (code, event) {
+        return code === event.keyCode && global$2.modifierPressed(event) === false;
+      });
+    };
+    var checkCharCode = function (chars, event) {
+      return checkKeyEvent(chars, event, function (chr, event) {
+        return chr.charCodeAt(0) === event.charCode;
+      });
+    };
+
+    var setup = function (editor, patternsState) {
+      var charCodes = [
+        ',',
+        '.',
+        ';',
+        ':',
+        '!',
+        '?'
+      ];
+      var keyCodes = [32];
+      editor.on('keydown', function (e) {
+        if (e.keyCode === 13 && !global$2.modifierPressed(e)) {
+          if (handleEnter(editor, patternsState.get())) {
+            e.preventDefault();
+          }
+        }
+      }, true);
+      editor.on('keyup', function (e) {
+        if (checkKeyCode(keyCodes, e)) {
+          handleInlineKey(editor, patternsState.get());
+        }
+      });
+      editor.on('keypress', function (e) {
+        if (checkCharCode(charCodes, e)) {
+          global$1.setEditorTimeout(editor, function () {
+            handleInlineKey(editor, patternsState.get());
+          });
+        }
+      });
+    };
+
+    function Plugin () {
+      global.add('textpattern', function (editor) {
+        var patternsState = Cell(getPatternSet(editor.settings));
+        setup(editor, patternsState);
+        return get$1(patternsState);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/textpattern/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(f){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(){return(u=Object.assign||function(t){for(var n,r=1,e=arguments.length;r<e;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};var n,r,e,o=function(){},a=function(t){return function(){return t}},i=function(t){return t},c=a(!1),s=a(!0),l=function(){return d},d=(n=function(t){return t.isNone()},{fold:function(t,n){return t()},is:c,isSome:c,isNone:s,getOr:e=function(t){return t},getOrThunk:r=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(undefined),or:e,orThunk:r,map:l,each:o,bind:l,exists:c,forall:s,filter:l,equals:n,equals_:n,toArray:function(){return[]},toString:a("none()")}),m=function(r){var t=a(r),n=function(){return o},e=function(t){return t(r)},o={fold:function(t,n){return n(r)},is:function(t){return r===t},isSome:s,isNone:c,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return m(t(r))},each:function(t){t(r)},bind:e,exists:e,forall:e,filter:function(t){return t(r)?o:d},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(t){return t.is(r)},equals_:function(t,n){return t.fold(c,function(t){return n(r,t)})}};return o},y={some:m,none:l,from:function(t){return null===t||t===undefined?d:m(t)}},g=function(e){return function(t){return r=typeof(n=t),(null===n?"null":"object"==r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===e;var n,r}},p=g("string"),h=g("object"),v=g("array"),b=Array.prototype.slice,k=Array.prototype.indexOf,O=function(t,n){return r=t,e=n,-1<k.call(r,e);var r,e},w=function(t,n){for(var r=t.length,e=new Array(r),o=0;o<r;o++){var a=t[o];e[o]=n(a,o)}return e},C=function(t,n){for(var r=0,e=t.length;r<e;r++){n(t[r],r)}},E=function(t,n){for(var r=[],e=0,o=t.length;e<o;e++){var a=t[e];n(a,e)&&r.push(a)}return r},x=function(t,n,r){return function(t,n){for(var r=t.length-1;0<=r;r--){n(t[r],r)}}(t,function(t){r=n(r,t)}),r},R=function(t,n){return function(t,n,r){for(var e=0,o=t.length;e<o;e++){var a=t[e];if(n(a,e))return y.some(a);if(r(a,e))break}return y.none()}(t,n,c)},T=function(t,n){for(var r=0,e=t.length;r<e;++r){if(!0!==n(t[r],r))return!1}return!0},N=Object.keys,P=Object.hasOwnProperty,S=function(t,n){return P.call(t,n)},M=(function(i){if(!v(i))throw new Error("cases must be an array");if(0===i.length)throw new Error("there must be at least one case");var u=[],r={};C(i,function(t,e){var n=N(t);if(1!==n.length)throw new Error("one and only one name per case");var o=n[0],a=t[o];if(r[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!v(a))throw new Error("case arguments must be an array");u.push(o),r[o]=function(){var t=arguments.length;if(t!==a.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+a.length+" ("+a+"), got "+t);for(var r=new Array(t),n=0;n<r.length;n++)r[n]=arguments[n];return{fold:function(){if(arguments.length!==i.length)throw new Error("Wrong number of arguments to fold. Expected "+i.length+", got "+arguments.length);return arguments[e].apply(null,r)},match:function(t){var n=N(t);if(u.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+u.join(",")+"\nActual: "+n.join(","));if(!T(u,function(t){return O(n,t)}))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+u.join(", "));return t[o].apply(null,r)},log:function(t){f.console.log(t,{constructors:u,constructor:o,params:r})}}}})}([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(t){var n=[],r=[];return C(t,function(t){t.fold(function(t){n.push(t)},function(t){r.push(t)})}),{errors:n,values:r}}),A=function(r){return{is:function(t){return r===t},isValue:s,isError:c,getOr:a(r),getOrThunk:a(r),getOrDie:a(r),or:function(t){return A(r)},orThunk:function(t){return A(r)},fold:function(t,n){return n(r)},map:function(t){return A(t(r))},mapError:function(t){return A(r)},each:function(t){t(r)},bind:function(t){return t(r)},exists:function(t){return t(r)},forall:function(t){return t(r)},toOption:function(){return y.some(r)}}},B=function(r){return{is:c,isValue:c,isError:s,getOr:i,getOrThunk:function(t){return t()},getOrDie:function(){return t=String(r),function(){throw new Error(t)}();var t},or:function(t){return t},orThunk:function(t){return t()},fold:function(t,n){return t(r)},map:function(t){return B(r)},mapError:function(t){return B(t(r))},each:o,bind:function(t){return B(r)},exists:c,forall:s,toOption:y.none}},D={value:A,error:B,fromOption:function(t,n){return t.fold(function(){return B(n)},A)}},I=function(t){return"inline-command"===t.type||"inline-format"===t.type},j=function(t){return"block-command"===t.type||"block-format"===t.type},_=function(t){return n=t,r=function(t,n){return t.start.length===n.start.length?0:t.start.length>n.start.length?-1:1},(e=b.call(n,0)).sort(r),e;var n,r,e},U=function(o){var a=function(t){return D.error({message:t,pattern:o})},t=function(t,n,r){if(o.format===undefined)return o.cmd!==undefined?p(o.cmd)?D.value(r(o.cmd,o.value)):a(t+" pattern has non-string `cmd` parameter"):a(t+" pattern is missing both `format` and `cmd` parameters");var e=void 0;if(v(o.format)){if(!T(o.format,p))return a(t+" pattern has non-string items in the `format` array");e=o.format}else{if(!p(o.format))return a(t+" pattern has non-string `format` parameter");e=[o.format]}return D.value(n(e))};if(!h(o))return a("Raw pattern is not an object");if(!p(o.start))return a("Raw pattern is missing `start` parameter");if(o.end===undefined)return o.replacement!==undefined?p(o.replacement)?0===o.start.length?a("Replacement pattern has empty `start` parameter"):D.value({type:"inline-command",start:"",end:o.start,cmd:"mceInsertContent",value:o.replacement}):a("Replacement pattern has non-string `replacement` parameter"):0===o.start.length?a("Block pattern has empty `start` parameter"):t("Block",function(t){return{type:"block-format",start:o.start,format:t[0]}},function(t,n){return{type:"block-command",start:o.start,cmd:t,value:n}});if(!p(o.end))return a("Inline pattern has non-string `end` parameter");if(0===o.start.length&&0===o.end.length)return a("Inline pattern has empty `start` and `end` parameters");var r=o.start,e=o.end;return 0===e.length&&(e=r,r=""),t("Inline",function(t){return{type:"inline-format",start:r,end:e,format:t}},function(t,n){return{type:"inline-command",start:r,end:e,cmd:t,value:n}})},q=function(t){return"block-command"===t.type?{start:t.start,cmd:t.cmd,value:t.value}:"block-format"===t.type?{start:t.start,format:t.format}:"inline-command"===t.type?"mceInsertContent"===t.cmd&&""===t.start?{start:t.end,replacement:t.value}:{start:t.start,end:t.end,cmd:t.cmd,value:t.value}:"inline-format"===t.type?{start:t.start,end:t.end,format:1===t.format.length?t.format[0]:t.format}:void 0},L=function(t){return{inlinePatterns:E(t,I),blockPatterns:_(E(t,j))}},V=function(e){return{setPatterns:function(t){var n=M(w(t,U));if(0<n.errors.length){var r=n.errors[0];throw new Error(r.message+":\n"+JSON.stringify(r.pattern,null,2))}e.set(L(n.values))},getPatterns:function(){return function f(){for(var t=0,n=0,r=arguments.length;n<r;n++)t+=arguments[n].length;var e=Array(t),o=0;for(n=0;n<r;n++)for(var a=arguments[n],i=0,u=a.length;i<u;i++,o++)e[o]=a[i];return e}(w(e.get().inlinePatterns,q),w(e.get().blockPatterns,q))}}},W="undefined"!=typeof f.window?f.window:Function("return this;")(),F=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=W.console;r&&(r.error?r.error.apply(r,t):r.log.apply(r,t))},G=[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}],H=function(t){var n,r,e=(S(n=t,r="textpattern_patterns")?y.from(n[r]):y.none()).getOr(G);if(!v(e))return F("The setting textpattern_patterns should be an array"),{inlinePatterns:[],blockPatterns:[]};var o=M(w(e,U));return C(o.errors,function(t){return F(t.message,t.pattern)}),L(o.values)},J=function(t){var n=t.getParam("forced_root_block","p");return!1===n?"":!0===n?"p":n},K=tinymce.util.Tools.resolve("tinymce.util.Delay"),X=tinymce.util.Tools.resolve("tinymce.util.VK"),z=tinymce.util.Tools.resolve("tinymce.util.Tools"),Q=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Y=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),Z=function(t,n){return{container:t,offset:n}},$=function(t){return t.nodeType===f.Node.TEXT_NODE},tt=function(t,n,r){if(n&&t.isEmpty(n)&&!r(n)){var e=n.parentNode;t.remove(n),tt(t,e,r)}},nt=function(t,n,r,e){void 0===e&&(e=!0);var o=n.startContainer.parentNode,a=n.endContainer.parentNode;n.deleteContents(),e&&!r(n.startContainer)&&($(n.startContainer)&&0===n.startContainer.data.length&&t.remove(n.startContainer),$(n.endContainer)&&0===n.endContainer.data.length&&t.remove(n.endContainer),tt(t,o,r),o!==a&&tt(t,a,r))},rt=function(t,n){var r,e=n.get(t);return v(e)&&(0===(r=e).length?y.none():y.some(r[0])).exists(function(t){return S(t,"block")})},et=function(t){return 0===t.start.length},ot=function(t,n){var r=y.from(t.dom.getParent(n.startContainer,t.dom.isBlock));return""===J(t)?r.orThunk(function(){return y.some(t.getBody())}):r},at=Q.DOM,it=function(n){return function(t){return n===t?-1:0}},ut=function(t,n,r){if($(t)&&0<=n)return y.some(Z(t,n));var e=Y(at);return y.from(e.backwards(t,n,it(t),r)).map(function(t){return Z(t.container,t.container.data.length)})},ft=function(t,r,e){if(!$(t))return y.none();var n=t.textContent;if(0<=r&&r<=n.length)return y.some(Z(t,r));var o=Y(at);return y.from(o.backwards(t,r,it(t),e)).bind(function(t){var n=t.container.data;return ft(t.container,r+n.length,e)})},ct=function(t,n,r){if(!$(t))return y.none();var e=t.textContent;if(n<=e.length)return y.some(Z(t,n));var o=Y(at);return y.from(o.forwards(t,n,it(t),r)).bind(function(t){return ct(t.container,n-e.length,r)})},st=function(t,n,r,e,o){var a,i=Y(t,(a=t,function(t){return a.isBlock(t)||O(["BR","IMG","HR","INPUT"],t.nodeName)||"false"===a.getContentEditable(t)}));return y.from(i.backwards(n,r,e,o))},lt=function(t,n,r){if($(n)&&(r<0||r>n.data.length))return[];for(var e=[r],o=n;o!==t&&o.parentNode;){for(var a=o.parentNode,i=0;i<a.childNodes.length;i++)if(a.childNodes[i]===o){e.push(i);break}o=a}return o===t?e.reverse():[]},dt=function(t,n,r,e,o){return{start:lt(t,n,r),end:lt(t,e,o)}},mt=function(t,n){var r,e,o,a=n.slice(),i=a.pop();return r=a,e=function(t,n){return t.bind(function(t){return y.from(t.childNodes[n])})},o=y.some(t),C(r,function(t){o=e(o,t)}),o.bind(function(t){return $(t)&&0<=i&&t.data.length,y.some({node:t,offset:i})})},gt=function(n,r){return mt(n,r.start).bind(function(t){var o=t.node,a=t.offset;return mt(n,r.end).map(function(t){var n=t.node,r=t.offset,e=f.document.createRange();return e.setStart(o,a),e.setEnd(n,r),e})})},pt=function(e,o,n){(function(t,n,r){if($(t)&&n>=t.length)return y.some(Z(t,n));var e=Y(at);return y.from(e.forwards(t,n,it(t),r)).map(function(t){return Z(t.container,0)})})(o,0,o).each(function(t){var r=t.container;ct(r,n.start.length,o).each(function(t){var n=e.createRng();n.setStart(r,0),n.setEnd(t.container,t.offset),nt(e,n,function(t){return t===o})})})},ht=function(e,a){var i=e.dom,t=e.selection.getRng();return ot(e,t).filter(function(t){var n=J(e),r=""===n&&i.is(t,"body")||i.is(t,n);return null!==t&&r}).bind(function(n){var t,r,e,o=n.textContent;return(t=a,e=(r=o).replace("\xa0"," "),R(t,function(t){return 0===r.indexOf(t.start)||0===e.indexOf(t.start)})).map(function(t){return z.trim(o).length===t.start.length?[]:[{pattern:t,range:dt(i.getRoot(),n,0,n,0)}]})}).getOr([])},vt=function(i,t){if(0!==t.length){var n=i.selection.getBookmark();C(t,function(t){return r=t,e=(n=i).dom,o=r.pattern,a=gt(e.getRoot(),r.range).getOrDie("Unable to resolve path range"),ot(n,a).each(function(t){"block-format"===o.type?rt(o.format,n.formatter)&&n.undoManager.transact(function(){pt(n.dom,t,o),n.formatter.apply(o.format)}):"block-command"===o.type&&n.undoManager.transact(function(){pt(n.dom,t,o),n.execCommand(o.cmd,!1,o.value)})}),1;var n,r,e,o,a}),i.selection.moveToBookmark(n)}},yt=0,bt=function(t,n){return t.create("span",{"data-mce-type":"bookmark",id:n})},kt=function(t,n){var r=t.createRng();return r.setStartAfter(n.start),r.setEndBefore(n.end),r},Ot=function(t,n,r){var e=gt(t.getRoot(),r).getOrDie("Unable to resolve path range"),o=e.startContainer,a=e.endContainer,i=0===e.endOffset?a:a.splitText(e.endOffset),u=0===e.startOffset?o:o.splitText(e.startOffset);return{prefix:n,end:i.parentNode.insertBefore(bt(t,n+"-end"),i),start:u.parentNode.insertBefore(bt(t,n+"-start"),u)}},wt=function(t,n,r){tt(t,t.get(n.prefix+"-end"),r),tt(t,t.get(n.prefix+"-start"),r)},Ct=function(e,o,a,t){var i,u=o.start;return st(e,t.container,t.offset,(i=u,function(t,n){var r=t.data.substring(0,n),e=r.lastIndexOf(i.charAt(i.length-1)),o=r.lastIndexOf(i);return-1!==o?o+i.length:-1!==e?e+1:-1}),a).bind(function(r){if(r.offset>=u.length){var t=e.createRng();return t.setStart(r.container,r.offset-u.length),t.setEnd(r.container,r.offset),y.some(t)}var n=r.offset-u.length;return ft(r.container,n,a).map(function(t){var n=e.createRng();return n.setStart(t.container,t.offset),n.setEnd(r.container,r.offset),n}).filter(function(t){return t.toString()===u}).orThunk(function(){return Ct(e,o,a,Z(r.container,0))})})},Et=function(a,i,u){var f=a.dom,c=f.getRoot(),s=u.pattern,l=u.position.container,d=u.position.offset;return ft(l,d-u.pattern.end.length,i).bind(function(t){var e=dt(c,t.container,t.offset,l,d);if(et(s))return y.some({matches:[{pattern:s,startRng:e,endRng:e}],position:t});var n=xt(a,u.remainingPatterns,t.container,t.offset,i),o=n.getOr({matches:[],position:t}),r=o.position;return function(t,r,n,e,o,a){if(void 0===a&&(a=!1),0!==r.start.length||a)return ut(n,e,o).bind(function(n){return Ct(t,r,o,n).bind(function(t){if(a){if(t.endContainer===n.container&&t.endOffset===n.offset)return y.none();if(0===n.offset&&t.endContainer.textContent.length===t.endOffset)return y.none()}return y.some(t)})});var i=t.createRng();return i.setStart(n,e),i.setEnd(n,e),y.some(i)}(f,s,r.container,r.offset,i,n.isNone()).map(function(t){var n,r=dt(c,(n=t).startContainer,n.startOffset,n.endContainer,n.endOffset);return{matches:o.matches.concat([{pattern:s,startRng:r,endRng:e}]),position:Z(t.startContainer,t.startOffset)}})})},xt=function(d,m,g,p,h){var v=d.dom;return ut(g,p,v.getRoot()).bind(function(t){var n=v.createRng();n.setStart(h,0),n.setEnd(g,p);for(var r,e,o,a,i,u=n.toString(),f=0;f<m.length;f++){var c=m[f];if(r=u,e=c.end,i=a=o=void 0,a=e,i=(o=r).length-e.length,""===a||o.length>=a.length&&o.substr(i,i+a.length)===a){var s=m.slice();s.splice(f,1);var l=Et(d,h,{pattern:c,remainingPatterns:s,position:t});if(l.isSome())return l}}return y.none()})},Rt=function(n,t,r){n.selection.setRng(r),"inline-format"===t.type?C(t.format,function(t){n.formatter.apply(t)}):n.execCommand(t.cmd,!1,t.value)},Tt=function(o,t){var n,r,a=(n="mce_textpattern",r=(new Date).getTime(),n+"_"+Math.floor(1e9*Math.random())+ ++yt+String(r)),i=x(t,function(t,n){var r=Ot(o,a+"_end"+t.length,n.endRng);return t.concat([u(u({},n),{endMarker:r})])},[]);return x(i,function(t,n){var r=i.length-t.length-1,e=et(n.pattern)?n.endMarker:Ot(o,a+"_start"+r,n.startRng);return t.concat([u(u({},n),{startMarker:e})])},[])},Nt=function(r,e,o){var a=r.selection.getRng();return!1===a.collapsed?[]:ot(r,a).bind(function(t){var n=a.startOffset-(o?1:0);return xt(r,e,a.startContainer,n,t)}).fold(function(){return[]},function(t){return t.matches})},Pt=function(f,t){if(0!==t.length){var c=f.dom,n=f.selection.getBookmark(),r=Tt(c,t);C(r,function(t){var n,r,e,o,a,i=c.getParent(t.startMarker.start,c.isBlock),u=function(t){return t===i};et(t.pattern)?(n=f,r=t.pattern,e=t.endMarker,o=u,a=kt(n.dom,e),nt(n.dom,a,o),Rt(n,r,a)):function(t,n,r,e,o){var a=t.dom,i=kt(a,e),u=kt(a,r);nt(a,u,o),nt(a,i,o);var f={prefix:r.prefix,start:r.end,end:e.start},c=kt(a,f);Rt(t,n,c)}(f,t.pattern,t.startMarker,t.endMarker,u),wt(c,t.endMarker,u),wt(c,t.startMarker,u)}),f.selection.moveToBookmark(n)}},St=function(t,n){var r=Nt(t,n.inlinePatterns,!0);0<r.length&&t.undoManager.transact(function(){Pt(t,r)})},Mt=function(t,n,r){for(var e=0;e<t.length;e++)if(r(t[e],n))return!0},At=function(n,r){var e=[",",".",";",":","!","?"],o=[32];n.on("keydown",function(t){13!==t.keyCode||X.modifierPressed(t)||!function(r,t){if(!r.selection.isCollapsed())return!1;var e=Nt(r,t.inlinePatterns,!1),o=ht(r,t.blockPatterns);return(0<o.length||0<e.length)&&(r.undoManager.add(),r.undoManager.extra(function(){r.execCommand("mceInsertNewLine")},function(){r.insertContent("\ufeff"),Pt(r,e),vt(r,o);var t=r.selection.getRng(),n=ut(t.startContainer,t.startOffset,r.dom.getRoot());r.execCommand("mceInsertNewLine"),n.each(function(t){var n=t.container;"\ufeff"===n.data.charAt(t.offset-1)&&(n.deleteData(t.offset-1,1),tt(r.dom,n.parentNode,function(t){return t===r.dom.getRoot()}))})}),!0)}(n,r.get())||t.preventDefault()},!0),n.on("keyup",function(t){Mt(o,t,function(t,n){return t===n.keyCode&&!1===X.modifierPressed(n)})&&St(n,r.get())}),n.on("keypress",function(t){Mt(e,t,function(t,n){return t.charCodeAt(0)===n.charCode})&&K.setEditorTimeout(n,function(){St(n,r.get())})})};!function Bt(){t.add("textpattern",function(t){var n,r,e=(n=H(t.settings),r=n,{get:function(){return r},set:function(t){r=t}});return At(t,e),V(e)})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/toc/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "toc" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/toc')
+//   ES2015:
+//     import 'tinymce/plugins/toc'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/toc/plugin.js
@@ -1,1 +1,236 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.I18n');
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var getTocClass = function (editor) {
+      return editor.getParam('toc_class', 'mce-toc');
+    };
+    var getTocHeader = function (editor) {
+      var tagName = editor.getParam('toc_header', 'h2');
+      return /^h[1-6]$/.test(tagName) ? tagName : 'h2';
+    };
+    var getTocDepth = function (editor) {
+      var depth = parseInt(editor.getParam('toc_depth', '3'), 10);
+      return depth >= 1 && depth <= 9 ? depth : 3;
+    };
+
+    var create = function (prefix) {
+      var counter = 0;
+      return function () {
+        var guid = new Date().getTime().toString(32);
+        return prefix + guid + (counter++).toString(32);
+      };
+    };
+
+    var tocId = create('mcetoc_');
+    var generateSelector = function generateSelector(depth) {
+      var i;
+      var selector = [];
+      for (i = 1; i <= depth; i++) {
+        selector.push('h' + i);
+      }
+      return selector.join(',');
+    };
+    var hasHeaders = function (editor) {
+      return readHeaders(editor).length > 0;
+    };
+    var readHeaders = function (editor) {
+      var tocClass = getTocClass(editor);
+      var headerTag = getTocHeader(editor);
+      var selector = generateSelector(getTocDepth(editor));
+      var headers = editor.$(selector);
+      if (headers.length && /^h[1-9]$/i.test(headerTag)) {
+        headers = headers.filter(function (i, el) {
+          return !editor.dom.hasClass(el.parentNode, tocClass);
+        });
+      }
+      return global$3.map(headers, function (h) {
+        return {
+          id: h.id ? h.id : tocId(),
+          level: parseInt(h.nodeName.replace(/^H/i, ''), 10),
+          title: editor.$.text(h),
+          element: h
+        };
+      });
+    };
+    var getMinLevel = function (headers) {
+      var i, minLevel = 9;
+      for (i = 0; i < headers.length; i++) {
+        if (headers[i].level < minLevel) {
+          minLevel = headers[i].level;
+        }
+        if (minLevel === 1) {
+          return minLevel;
+        }
+      }
+      return minLevel;
+    };
+    var generateTitle = function (tag, title) {
+      var openTag = '<' + tag + ' contenteditable="true">';
+      var closeTag = '</' + tag + '>';
+      return openTag + global$1.DOM.encode(title) + closeTag;
+    };
+    var generateTocHtml = function (editor) {
+      var html = generateTocContentHtml(editor);
+      return '<div class="' + editor.dom.encode(getTocClass(editor)) + '" contenteditable="false">' + html + '</div>';
+    };
+    var generateTocContentHtml = function (editor) {
+      var html = '';
+      var headers = readHeaders(editor);
+      var prevLevel = getMinLevel(headers) - 1;
+      var i, ii, h, nextLevel;
+      if (!headers.length) {
+        return '';
+      }
+      html += generateTitle(getTocHeader(editor), global$2.translate('Table of Contents'));
+      for (i = 0; i < headers.length; i++) {
+        h = headers[i];
+        h.element.id = h.id;
+        nextLevel = headers[i + 1] && headers[i + 1].level;
+        if (prevLevel === h.level) {
+          html += '<li>';
+        } else {
+          for (ii = prevLevel; ii < h.level; ii++) {
+            html += '<ul><li>';
+          }
+        }
+        html += '<a href="#' + h.id + '">' + h.title + '</a>';
+        if (nextLevel === h.level || !nextLevel) {
+          html += '</li>';
+          if (!nextLevel) {
+            html += '</ul>';
+          }
+        } else {
+          for (ii = h.level; ii > nextLevel; ii--) {
+            html += '</li></ul><li>';
+          }
+        }
+        prevLevel = h.level;
+      }
+      return html;
+    };
+    var isEmptyOrOffscren = function (editor, nodes) {
+      return !nodes.length || editor.dom.getParents(nodes[0], '.mce-offscreen-selection').length > 0;
+    };
+    var insertToc = function (editor) {
+      var tocClass = getTocClass(editor);
+      var $tocElm = editor.$('.' + tocClass);
+      if (isEmptyOrOffscren(editor, $tocElm)) {
+        editor.insertContent(generateTocHtml(editor));
+      } else {
+        updateToc(editor);
+      }
+    };
+    var updateToc = function (editor) {
+      var tocClass = getTocClass(editor);
+      var $tocElm = editor.$('.' + tocClass);
+      if ($tocElm.length) {
+        editor.undoManager.transact(function () {
+          $tocElm.html(generateTocContentHtml(editor));
+        });
+      }
+    };
+
+    var register = function (editor) {
+      editor.addCommand('mceInsertToc', function () {
+        insertToc(editor);
+      });
+      editor.addCommand('mceUpdateToc', function () {
+        updateToc(editor);
+      });
+    };
+
+    var setup = function (editor) {
+      var $ = editor.$, tocClass = getTocClass(editor);
+      editor.on('PreProcess', function (e) {
+        var $tocElm = $('.' + tocClass, e.node);
+        if ($tocElm.length) {
+          $tocElm.removeAttr('contentEditable');
+          $tocElm.find('[contenteditable]').removeAttr('contentEditable');
+        }
+      });
+      editor.on('SetContent', function () {
+        var $tocElm = $('.' + tocClass);
+        if ($tocElm.length) {
+          $tocElm.attr('contentEditable', false);
+          $tocElm.children(':first-child').attr('contentEditable', true);
+        }
+      });
+    };
+
+    var toggleState = function (editor) {
+      return function (api) {
+        var toggleDisabledState = function () {
+          return api.setDisabled(editor.mode.isReadOnly() || !hasHeaders(editor));
+        };
+        toggleDisabledState();
+        editor.on('LoadContent SetContent change', toggleDisabledState);
+        return function () {
+          return editor.on('LoadContent SetContent change', toggleDisabledState);
+        };
+      };
+    };
+    var isToc = function (editor) {
+      return function (elm) {
+        return elm && editor.dom.is(elm, '.' + getTocClass(editor)) && editor.getBody().contains(elm);
+      };
+    };
+    var register$1 = function (editor) {
+      editor.ui.registry.addButton('toc', {
+        icon: 'toc',
+        tooltip: 'Table of contents',
+        onAction: function () {
+          return editor.execCommand('mceInsertToc');
+        },
+        onSetup: toggleState(editor)
+      });
+      editor.ui.registry.addButton('tocupdate', {
+        icon: 'reload',
+        tooltip: 'Update',
+        onAction: function () {
+          return editor.execCommand('mceUpdateToc');
+        }
+      });
+      editor.ui.registry.addMenuItem('toc', {
+        icon: 'toc',
+        text: 'Table of contents',
+        onAction: function () {
+          return editor.execCommand('mceInsertToc');
+        },
+        onSetup: toggleState(editor)
+      });
+      editor.ui.registry.addContextToolbar('toc', {
+        items: 'tocupdate',
+        predicate: isToc(editor),
+        scope: 'node',
+        position: 'node'
+      });
+    };
+
+    function Plugin () {
+      global.add('toc', function (editor) {
+        register(editor);
+        register$1(editor);
+        setup(editor);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/toc/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var e,n,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=tinymce.util.Tools.resolve("tinymce.util.I18n"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(t){return t.getParam("toc_class","mce-toc")},m=function(t){var e=t.getParam("toc_header","h2");return/^h[1-6]$/.test(e)?e:"h2"},a=(e="mcetoc_",n=0,function(){var t=(new Date).getTime().toString(32);return e+t+(n++).toString(32)}),u=function u(t){var e,n=[];for(e=1;e<=t;e++)n.push("h"+e);return n.join(",")},v=function(n){var t,o=l(n),e=m(n),i=u(1<=(t=parseInt(n.getParam("toc_depth","3"),10))&&t<=9?t:3),r=n.$(i);return r.length&&/^h[1-9]$/i.test(e)&&(r=r.filter(function(t,e){return!n.dom.hasClass(e.parentNode,o)})),c.map(r,function(t){return{id:t.id?t.id:a(),level:parseInt(t.nodeName.replace(/^H/i,""),10),title:n.$.text(t),element:t}})},d=function(t){var e,n,o,i,r,c,l,a="",u=v(t),d=function(t){var e,n=9;for(e=0;e<t.length;e++)if(t[e].level<n&&(n=t[e].level),1===n)return n;return n}(u)-1;if(!u.length)return"";for(a+=(r=m(t),c=f.translate("Table of Contents"),l="</"+r+">","<"+r+' contenteditable="true">'+s.DOM.encode(c)+l),e=0;e<u.length;e++){if((o=u[e]).element.id=o.id,i=u[e+1]&&u[e+1].level,d===o.level)a+="<li>";else for(n=d;n<o.level;n++)a+="<ul><li>";if(a+='<a href="#'+o.id+'">'+o.title+"</a>",i!==o.level&&i)for(n=o.level;i<n;n--)a+="</li></ul><li>";else a+="</li>",i||(a+="</ul>");d=o.level}return a},r=function(t){var e,n,o,i,r=l(t),c=t.$("."+r);o=t,!(i=c).length||0<o.dom.getParents(i[0],".mce-offscreen-selection").length?t.insertContent((n=d(e=t),'<div class="'+e.dom.encode(l(e))+'" contenteditable="false">'+n+"</div>")):g(t)},g=function(t){var e=l(t),n=t.$("."+e);n.length&&t.undoManager.transact(function(){n.html(d(t))})},o=function(n){return function(t){var e=function(){return t.setDisabled(n.mode.isReadOnly()||!(0<v(n).length))};return e(),n.on("LoadContent SetContent change",e),function(){return n.on("LoadContent SetContent change",e)}}},h=function(t){var e;t.ui.registry.addButton("toc",{icon:"toc",tooltip:"Table of contents",onAction:function(){return t.execCommand("mceInsertToc")},onSetup:o(t)}),t.ui.registry.addButton("tocupdate",{icon:"reload",tooltip:"Update",onAction:function(){return t.execCommand("mceUpdateToc")}}),t.ui.registry.addMenuItem("toc",{icon:"toc",text:"Table of contents",onAction:function(){return t.execCommand("mceInsertToc")},onSetup:o(t)}),t.ui.registry.addContextToolbar("toc",{items:"tocupdate",predicate:(e=t,function(t){return t&&e.dom.is(t,"."+l(e))&&e.getBody().contains(t)}),scope:"node",position:"node"})};!function i(){t.add("toc",function(t){var e,n,o,i;(e=t).addCommand("mceInsertToc",function(){r(e)}),e.addCommand("mceUpdateToc",function(){g(e)}),h(t),o=(n=t).$,i=l(n),n.on("PreProcess",function(t){var e=o("."+i,t.node);e.length&&(e.removeAttr("contentEditable"),e.find("[contenteditable]").removeAttr("contentEditable"))}),n.on("SetContent",function(){var t=o("."+i);t.length&&(t.attr("contentEditable",!1),t.children(":first-child").attr("contentEditable",!0))})})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/visualblocks/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "visualblocks" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/visualblocks')
+//   ES2015:
+//     import 'tinymce/plugins/visualblocks'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/visualblocks/plugin.js
@@ -1,1 +1,108 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
 
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var fireVisualBlocks = function (editor, state) {
+      editor.fire('VisualBlocks', { state: state });
+    };
+
+    var toggleVisualBlocks = function (editor, pluginUrl, enabledState) {
+      var dom = editor.dom;
+      dom.toggleClass(editor.getBody(), 'mce-visualblocks');
+      enabledState.set(!enabledState.get());
+      fireVisualBlocks(editor, enabledState.get());
+    };
+
+    var register = function (editor, pluginUrl, enabledState) {
+      editor.addCommand('mceVisualBlocks', function () {
+        toggleVisualBlocks(editor, pluginUrl, enabledState);
+      });
+    };
+
+    var isEnabledByDefault = function (editor) {
+      return editor.getParam('visualblocks_default_state', false, 'boolean');
+    };
+
+    var setup = function (editor, pluginUrl, enabledState) {
+      editor.on('PreviewFormats AfterPreviewFormats', function (e) {
+        if (enabledState.get()) {
+          editor.dom.toggleClass(editor.getBody(), 'mce-visualblocks', e.type === 'afterpreviewformats');
+        }
+      });
+      editor.on('init', function () {
+        if (isEnabledByDefault(editor)) {
+          toggleVisualBlocks(editor, pluginUrl, enabledState);
+        }
+      });
+      editor.on('remove', function () {
+        editor.dom.removeClass(editor.getBody(), 'mce-visualblocks');
+      });
+    };
+
+    var toggleActiveState = function (editor, enabledState) {
+      return function (api) {
+        api.setActive(enabledState.get());
+        var editorEventCallback = function (e) {
+          return api.setActive(e.state);
+        };
+        editor.on('VisualBlocks', editorEventCallback);
+        return function () {
+          return editor.off('VisualBlocks', editorEventCallback);
+        };
+      };
+    };
+    var register$1 = function (editor, enabledState) {
+      editor.ui.registry.addToggleButton('visualblocks', {
+        icon: 'visualblocks',
+        tooltip: 'Show blocks',
+        onAction: function () {
+          return editor.execCommand('mceVisualBlocks');
+        },
+        onSetup: toggleActiveState(editor, enabledState)
+      });
+      editor.ui.registry.addToggleMenuItem('visualblocks', {
+        text: 'Show blocks',
+        icon: 'visualblocks',
+        onAction: function () {
+          return editor.execCommand('mceVisualBlocks');
+        },
+        onSetup: toggleActiveState(editor, enabledState)
+      });
+    };
+
+    function Plugin () {
+      global.add('visualblocks', function (editor, pluginUrl) {
+        var enabledState = Cell(false);
+        register(editor, pluginUrl, enabledState);
+        register$1(editor, enabledState);
+        setup(editor, pluginUrl, enabledState);
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/visualblocks/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(o,t,e){var n,s;o.dom.toggleClass(o.getBody(),"mce-visualblocks"),e.set(!e.get()),n=o,s=e.get(),n.fire("VisualBlocks",{state:s})},m=function(e,n){return function(t){t.setActive(n.get());var o=function(o){return t.setActive(o.state)};return e.on("VisualBlocks",o),function(){return e.off("VisualBlocks",o)}}};!function t(){o.add("visualblocks",function(o,t){var e,n,s,i,c,u,l,a=(e=!1,{get:function(){return e},set:function(o){e=o}});s=a,(n=o).addCommand("mceVisualBlocks",function(){r(n,0,s)}),c=a,(i=o).ui.registry.addToggleButton("visualblocks",{icon:"visualblocks",tooltip:"Show blocks",onAction:function(){return i.execCommand("mceVisualBlocks")},onSetup:m(i,c)}),i.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",icon:"visualblocks",onAction:function(){return i.execCommand("mceVisualBlocks")},onSetup:m(i,c)}),l=a,(u=o).on("PreviewFormats AfterPreviewFormats",function(o){l.get()&&u.dom.toggleClass(u.getBody(),"mce-visualblocks","afterpreviewformats"===o.type)}),u.on("init",function(){u.getParam("visualblocks_default_state",!1,"boolean")&&r(u,0,l)}),u.on("remove",function(){u.dom.removeClass(u.getBody(),"mce-visualblocks")})})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/visualchars/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "visualchars" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/visualchars')
+//   ES2015:
+//     import 'tinymce/plugins/visualchars'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/visualchars/plugin.js
@@ -1,1 +1,540 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var get = function (toggleState) {
+      var isEnabled = function () {
+        return toggleState.get();
+      };
+      return { isEnabled: isEnabled };
+    };
+
+    var fireVisualChars = function (editor, state) {
+      return editor.fire('VisualChars', { state: state });
+    };
+
+    var noop = function () {
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var typeOf = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf(value) === type;
+      };
+    };
+    var isSimpleType = function (type) {
+      return function (value) {
+        return typeof value === type;
+      };
+    };
+    var isString = isType('string');
+    var isBoolean = isSimpleType('boolean');
+    var isNumber = isSimpleType('number');
+
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var each = function (xs, f) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var filter = function (xs, pred) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          r.push(x);
+        }
+      }
+      return r;
+    };
+
+    var keys = Object.keys;
+    var each$1 = function (obj, f) {
+      var props = keys(obj);
+      for (var k = 0, len = props.length; k < len; k++) {
+        var i = props[k];
+        var x = obj[i];
+        f(x, i);
+      }
+    };
+
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
+
+    var TEXT = 3;
+
+    var type = function (element) {
+      return element.dom().nodeType;
+    };
+    var value = function (element) {
+      return element.dom().nodeValue;
+    };
+    var isType$1 = function (t) {
+      return function (element) {
+        return type(element) === t;
+      };
+    };
+    var isText = isType$1(TEXT);
+
+    var rawSet = function (dom, key, value) {
+      if (isString(value) || isBoolean(value) || isNumber(value)) {
+        dom.setAttribute(key, value + '');
+      } else {
+        domGlobals.console.error('Invalid call to Attr.set. Key ', key, ':: Value ', value, ':: Element ', dom);
+        throw new Error('Attribute value was not simple');
+      }
+    };
+    var set = function (element, key, value) {
+      rawSet(element.dom(), key, value);
+    };
+    var get$1 = function (element, key) {
+      var v = element.dom().getAttribute(key);
+      return v === null ? undefined : v;
+    };
+    var remove = function (element, key) {
+      element.dom().removeAttribute(key);
+    };
+
+    var read = function (element, attr) {
+      var value = get$1(element, attr);
+      return value === undefined || value === '' ? [] : value.split(' ');
+    };
+    var add = function (element, attr, id) {
+      var old = read(element, attr);
+      var nu = old.concat([id]);
+      set(element, attr, nu.join(' '));
+      return true;
+    };
+    var remove$1 = function (element, attr, id) {
+      var nu = filter(read(element, attr), function (v) {
+        return v !== id;
+      });
+      if (nu.length > 0) {
+        set(element, attr, nu.join(' '));
+      } else {
+        remove(element, attr);
+      }
+      return false;
+    };
+
+    var supports = function (element) {
+      return element.dom().classList !== undefined;
+    };
+    var get$2 = function (element) {
+      return read(element, 'class');
+    };
+    var add$1 = function (element, clazz) {
+      return add(element, 'class', clazz);
+    };
+    var remove$2 = function (element, clazz) {
+      return remove$1(element, 'class', clazz);
+    };
+
+    var add$2 = function (element, clazz) {
+      if (supports(element)) {
+        element.dom().classList.add(clazz);
+      } else {
+        add$1(element, clazz);
+      }
+    };
+    var cleanClass = function (element) {
+      var classList = supports(element) ? element.dom().classList : get$2(element);
+      if (classList.length === 0) {
+        remove(element, 'class');
+      }
+    };
+    var remove$3 = function (element, clazz) {
+      if (supports(element)) {
+        var classList = element.dom().classList;
+        classList.remove(clazz);
+      } else {
+        remove$2(element, clazz);
+      }
+      cleanClass(element);
+    };
+
+    var fromHtml = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      if (!div.hasChildNodes() || div.childNodes.length > 1) {
+        domGlobals.console.error('HTML does not have a single root node', html);
+        throw new Error('HTML must have a single root node');
+      }
+      return fromDom(div.childNodes[0]);
+    };
+    var fromTag = function (tag, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createElement(tag);
+      return fromDom(node);
+    };
+    var fromText = function (text, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createTextNode(text);
+      return fromDom(node);
+    };
+    var fromDom = function (node) {
+      if (node === null || node === undefined) {
+        throw new Error('Node cannot be null or undefined');
+      }
+      return { dom: constant(node) };
+    };
+    var fromPoint = function (docElm, x, y) {
+      var doc = docElm.dom();
+      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
+    };
+    var Element = {
+      fromHtml: fromHtml,
+      fromTag: fromTag,
+      fromText: fromText,
+      fromDom: fromDom,
+      fromPoint: fromPoint
+    };
+
+    var charMap = {
+      '\xA0': 'nbsp',
+      '\xAD': 'shy'
+    };
+    var charMapToRegExp = function (charMap, global) {
+      var regExp = '';
+      each$1(charMap, function (_value, key) {
+        regExp += key;
+      });
+      return new RegExp('[' + regExp + ']', global ? 'g' : '');
+    };
+    var charMapToSelector = function (charMap) {
+      var selector = '';
+      each$1(charMap, function (value) {
+        if (selector) {
+          selector += ',';
+        }
+        selector += 'span.mce-' + value;
+      });
+      return selector;
+    };
+    var regExp = charMapToRegExp(charMap);
+    var regExpGlobal = charMapToRegExp(charMap, true);
+    var selector = charMapToSelector(charMap);
+    var nbspClass = 'mce-nbsp';
+
+    var wrapCharWithSpan = function (value) {
+      return '<span data-mce-bogus="1" class="mce-' + charMap[value] + '">' + value + '</span>';
+    };
+
+    var isMatch = function (n) {
+      var value$1 = value(n);
+      return isText(n) && value$1 !== undefined && regExp.test(value$1);
+    };
+    var filterDescendants = function (scope, predicate) {
+      var result = [];
+      var dom = scope.dom();
+      var children = map(dom.childNodes, Element.fromDom);
+      each(children, function (x) {
+        if (predicate(x)) {
+          result = result.concat([x]);
+        }
+        result = result.concat(filterDescendants(x, predicate));
+      });
+      return result;
+    };
+    var findParentElm = function (elm, rootElm) {
+      while (elm.parentNode) {
+        if (elm.parentNode === rootElm) {
+          return elm;
+        }
+        elm = elm.parentNode;
+      }
+    };
+    var replaceWithSpans = function (text) {
+      return text.replace(regExpGlobal, wrapCharWithSpan);
+    };
+
+    var isWrappedNbsp = function (node) {
+      return node.nodeName.toLowerCase() === 'span' && node.classList.contains('mce-nbsp-wrap');
+    };
+    var show = function (editor, rootElm) {
+      var nodeList = filterDescendants(Element.fromDom(rootElm), isMatch);
+      each(nodeList, function (n) {
+        var parent = n.dom().parentNode;
+        if (isWrappedNbsp(parent)) {
+          add$2(Element.fromDom(parent), nbspClass);
+        } else {
+          var withSpans = replaceWithSpans(editor.dom.encode(value(n)));
+          var div = editor.dom.create('div', null, withSpans);
+          var node = void 0;
+          while (node = div.lastChild) {
+            editor.dom.insertAfter(node, n.dom());
+          }
+          editor.dom.remove(n.dom());
+        }
+      });
+    };
+    var hide = function (editor, rootElm) {
+      var nodeList = editor.dom.select(selector, rootElm);
+      each(nodeList, function (node) {
+        if (isWrappedNbsp(node)) {
+          remove$3(Element.fromDom(node), nbspClass);
+        } else {
+          editor.dom.remove(node, true);
+        }
+      });
+    };
+    var toggle = function (editor) {
+      var body = editor.getBody();
+      var bookmark = editor.selection.getBookmark();
+      var parentNode = findParentElm(editor.selection.getNode(), body);
+      parentNode = parentNode !== undefined ? parentNode : body;
+      hide(editor, parentNode);
+      show(editor, parentNode);
+      editor.selection.moveToBookmark(bookmark);
+    };
+
+    var toggleVisualChars = function (editor, toggleState) {
+      var body = editor.getBody();
+      var selection = editor.selection;
+      var bookmark;
+      toggleState.set(!toggleState.get());
+      fireVisualChars(editor, toggleState.get());
+      bookmark = selection.getBookmark();
+      if (toggleState.get() === true) {
+        show(editor, body);
+      } else {
+        hide(editor, body);
+      }
+      selection.moveToBookmark(bookmark);
+    };
+
+    var register = function (editor, toggleState) {
+      editor.addCommand('mceVisualChars', function () {
+        toggleVisualChars(editor, toggleState);
+      });
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Delay');
+
+    var setup = function (editor, toggleState) {
+      var debouncedToggle = global$1.debounce(function () {
+        toggle(editor);
+      }, 300);
+      if (editor.settings.forced_root_block !== false) {
+        editor.on('keydown', function (e) {
+          if (toggleState.get() === true) {
+            e.keyCode === 13 ? toggle(editor) : debouncedToggle();
+          }
+        });
+      }
+    };
+
+    var isEnabledByDefault = function (editor) {
+      return editor.getParam('visualchars_default_state', false);
+    };
+
+    var setup$1 = function (editor, toggleState) {
+      editor.on('init', function () {
+        var valueForToggling = !isEnabledByDefault(editor);
+        toggleState.set(valueForToggling);
+        toggleVisualChars(editor, toggleState);
+      });
+    };
+
+    var toggleActiveState = function (editor, enabledStated) {
+      return function (api) {
+        api.setActive(enabledStated.get());
+        var editorEventCallback = function (e) {
+          return api.setActive(e.state);
+        };
+        editor.on('VisualChars', editorEventCallback);
+        return function () {
+          return editor.off('VisualChars', editorEventCallback);
+        };
+      };
+    };
+    var register$1 = function (editor, toggleState) {
+      editor.ui.registry.addToggleButton('visualchars', {
+        tooltip: 'Show invisible characters',
+        icon: 'visualchars',
+        onAction: function () {
+          return editor.execCommand('mceVisualChars');
+        },
+        onSetup: toggleActiveState(editor, toggleState)
+      });
+      editor.ui.registry.addToggleMenuItem('visualchars', {
+        text: 'Show invisible characters',
+        icon: 'visualchars',
+        onAction: function () {
+          return editor.execCommand('mceVisualChars');
+        },
+        onSetup: toggleActiveState(editor, toggleState)
+      });
+    };
+
+    function Plugin () {
+      global.add('visualchars', function (editor) {
+        var toggleState = Cell(false);
+        register(editor, toggleState);
+        register$1(editor, toggleState);
+        setup(editor, toggleState);
+        setup$1(editor, toggleState);
+        return get(toggleState);
+      });
+    }
+
+    Plugin();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/visualchars/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(r){"use strict";var n,t,e,o,u,i,c=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(n){return function(){return n}},s=a(!1),f=a(!0),l=function(){return d},d=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:s,isSome:s,isNone:f,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(undefined),or:e,orThunk:t,map:l,each:function(){},bind:l,exists:s,forall:f,filter:l,equals:n,equals_:n,toArray:function(){return[]},toString:a("none()")}),m=function(e){var n=a(e),t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:f,isNone:s,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return m(n(e))},each:function(n){n(e)},bind:r,exists:r,forall:r,filter:function(n){return n(e)?o:d},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(s,function(n){return t(e,n)})}};return o},v=function(n){return null===n||n===undefined?d:m(n)},g=function(t){return function(n){return typeof n===t}},h=(o="string",function(n){return e=typeof(t=n),(null===t?"null":"object"==e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e)===o;var t,e}),p=g("boolean"),y=g("number"),w=function(n,t){for(var e=0,r=n.length;e<r;e++){t(n[e],e)}},b=Object.keys,N=function(n,t){for(var e=b(n),r=0,o=e.length;r<o;r++){var u=e[r];t(n[u],u)}},T=("undefined"!=typeof r.window?r.window:Function("return this;")(),function(n){return n.dom().nodeValue}),k=(u=3,function(n){return n.dom().nodeType===u}),A=function(n,t,e){!function(n,t,e){if(!(h(e)||p(e)||y(e)))throw r.console.error("Invalid call to Attr.set. Key ",t,":: Value ",e,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(t,e+"")}(n.dom(),t,e)},O=function(n,t){n.dom().removeAttribute(t)},C=function(n,t){var e,r,o=(e=t,null===(r=n.dom().getAttribute(e))?undefined:r);return o===undefined||""===o?[]:o.split(" ")},S=function(n){return n.dom().classList!==undefined},D=function(n,t){return o=t,u=C(e=n,r="class").concat([o]),A(e,r,u.join(" ")),!0;var e,r,o,u},E=function(n,t){return o=t,0<(u=function(n,t){for(var e=[],r=0,o=n.length;r<o;r++){var u=n[r];t(u,r)&&e.push(u)}return e}(C(e=n,r="class"),function(n){return n!==o})).length?A(e,r,u.join(" ")):O(e,r),!1;var e,r,o,u},L=function(n){0===(S(n)?n.dom().classList:C(n,"class")).length&&O(n,"class")},x=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:a(n)}},V={fromHtml:function(n,t){var e=(t||r.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw r.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return x(e.childNodes[0])},fromTag:function(n,t){var e=(t||r.document).createElement(n);return x(e)},fromText:function(n,t){var e=(t||r.document).createTextNode(n);return x(e)},fromDom:x,fromPoint:function(n,t,e){var r=n.dom();return v(r.elementFromPoint(t,e)).map(x)}},B={"\xa0":"nbsp","\xad":"shy"},P=function(n,t){var e="";return N(n,function(n,t){e+=t}),new RegExp("["+e+"]",t?"g":"")},_=P(B),j=P(B,!0),M=(i="",N(B,function(n){i&&(i+=","),i+="span.mce-"+n}),i),q="mce-nbsp",H=function(n){return'<span data-mce-bogus="1" class="mce-'+B[n]+'">'+n+"</span>"},F=function(n){var t=T(n);return k(n)&&t!==undefined&&_.test(t)},I=function(n,t){var e=[],r=function(n,t){for(var e=n.length,r=new Array(e),o=0;o<e;o++){var u=n[o];r[o]=t(u,o)}return r}(n.dom().childNodes,V.fromDom);return w(r,function(n){t(n)&&(e=e.concat([n])),e=e.concat(I(n,t))}),e},U=function(n){return"span"===n.nodeName.toLowerCase()&&n.classList.contains("mce-nbsp-wrap")},K=function(c,n){var t=I(V.fromDom(n),F);w(t,function(n){var t,e,r=n.dom().parentNode;if(U(r))t=V.fromDom(r),e=q,S(t)?t.dom().classList.add(e):D(t,e);else{for(var o=c.dom.encode(T(n)).replace(j,H),u=c.dom.create("div",null,o),i=void 0;i=u.lastChild;)c.dom.insertAfter(i,n.dom());c.dom.remove(n.dom())}})},R=function(t,n){var e=t.dom.select(M,n);w(e,function(n){U(n)?function(n,t){S(n)?n.dom().classList.remove(t):E(n,t);L(n)}(V.fromDom(n),q):t.dom.remove(n,!0)})},z=function(n){var t=n.getBody(),e=n.selection.getBookmark(),r=function(n,t){for(;n.parentNode;){if(n.parentNode===t)return n;n=n.parentNode}}(n.selection.getNode(),t);r=r!==undefined?r:t,R(n,r),K(n,r),n.selection.moveToBookmark(e)},G=function(n,t){var e,r,o,u=n.getBody(),i=n.selection;t.set(!t.get()),r=n,o=t.get(),r.fire("VisualChars",{state:o}),e=i.getBookmark(),(!0===t.get()?K:R)(n,u),i.moveToBookmark(e)},J=tinymce.util.Tools.resolve("tinymce.util.Delay"),Q=function(e,r){return function(t){t.setActive(r.get());var n=function(n){return t.setActive(n.state)};return e.on("VisualChars",n),function(){return e.off("VisualChars",n)}}};!function W(){c.add("visualchars",function(n){var t,e,r,o,u,i,c,a,s,f,l,d=(t=!1,{get:function(){return t},set:function(n){t=n}});return r=d,(e=n).addCommand("mceVisualChars",function(){G(e,r)}),u=d,(o=n).ui.registry.addToggleButton("visualchars",{tooltip:"Show invisible characters",icon:"visualchars",onAction:function(){return o.execCommand("mceVisualChars")},onSetup:Q(o,u)}),o.ui.registry.addToggleMenuItem("visualchars",{text:"Show invisible characters",icon:"visualchars",onAction:function(){return o.execCommand("mceVisualChars")},onSetup:Q(o,u)}),i=n,c=d,a=J.debounce(function(){z(i)},300),!1!==i.settings.forced_root_block&&i.on("keydown",function(n){!0===c.get()&&(13===n.keyCode?z(i):a())}),f=d,(s=n).on("init",function(){var n=!s.getParam("visualchars_default_state",!1);f.set(n),G(s,f)}),l=d,{isEnabled:function(){return l.get()}}})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/wordcount/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "wordcount" plugin for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/plugins/wordcount')
+//   ES2015:
+//     import 'tinymce/plugins/wordcount'
+require('./plugin.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/wordcount/plugin.js
@@ -1,1 +1,419 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function () {
+    'use strict';
+
+    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
+
+    var identity = function (x) {
+      return x;
+    };
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+
+    var punctuationStr = '[!-#%-*,-\\/:;?@\\[-\\]_{}\xA1\xAB\xB7\xBB\xBF;\xB7\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1361-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u3008\u3009\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30\u2E31\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uff3f\uFF5B\uFF5D\uFF5F-\uFF65]';
+    var regExps = {
+      aletter: '[A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05F3\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u10a0-\u10c5\u10d0-\u10fa\u10fc\u1100-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bc0-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u24B6-\u24E9\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2d00-\u2d25\u2d30-\u2d65\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005\u303b\u303c\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790\ua791\ua7a0-\ua7a9\ua7fa-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]',
+      midnumlet: '[-\'\\.\u2018\u2019\u2024\uFE52\uFF07\uFF0E]',
+      midletter: '[:\xB7\xB7\u05F4\u2027\uFE13\uFE55\uFF1A]',
+      midnum: '[\xB1+*/,;;\u0589\u060C\u060D\u066C\u07F8\u2044\uFE10\uFE14\uFE50\uFE54\uFF0C\uFF1B]',
+      numeric: '[0-9\u0660-\u0669\u066B\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9]',
+      cr: '\\r',
+      lf: '\\n',
+      newline: '[\x0B\f\x85\u2028\u2029]',
+      extend: '[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f\u109a-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b6-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u192b\u1930-\u193b\u19b0-\u19c0\u19c8\u19c9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f\u1b00-\u1b04\u1b34-\u1b44\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1baa\u1be6-\u1bf3\u1c24-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\uA672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe3-\uabea\uabec\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]',
+      format: '[\xAD\u0600-\u0603\u06DD\u070F\u17b4\u17b5\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\uFEFF\uFFF9-\uFFFB]',
+      katakana: '[\u3031-\u3035\u309B\u309C\u30A0-\u30fa\u30fc-\u30ff\u31f0-\u31ff\u32D0-\u32FE\u3300-\u3357\uff66-\uff9d]',
+      extendnumlet: '[=_\u203f\u2040\u2054\ufe33\ufe34\ufe4d-\ufe4f\uff3f\u2200-\u22FF<>]',
+      punctuation: punctuationStr
+    };
+    var characterIndices = {
+      ALETTER: 0,
+      MIDNUMLET: 1,
+      MIDLETTER: 2,
+      MIDNUM: 3,
+      NUMERIC: 4,
+      CR: 5,
+      LF: 6,
+      NEWLINE: 7,
+      EXTEND: 8,
+      FORMAT: 9,
+      KATAKANA: 10,
+      EXTENDNUMLET: 11,
+      AT: 12,
+      OTHER: 13
+    };
+    var SETS = [
+      new RegExp(regExps.aletter),
+      new RegExp(regExps.midnumlet),
+      new RegExp(regExps.midletter),
+      new RegExp(regExps.midnum),
+      new RegExp(regExps.numeric),
+      new RegExp(regExps.cr),
+      new RegExp(regExps.lf),
+      new RegExp(regExps.newline),
+      new RegExp(regExps.extend),
+      new RegExp(regExps.format),
+      new RegExp(regExps.katakana),
+      new RegExp(regExps.extendnumlet),
+      new RegExp('@')
+    ];
+    var EMPTY_STRING = '';
+    var PUNCTUATION = new RegExp('^' + regExps.punctuation + '$');
+    var WHITESPACE = /^\s+$/;
+
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+
+    var SETS$1 = SETS;
+    var OTHER = characterIndices.OTHER;
+    var getType = function (char) {
+      var type = OTHER;
+      var setsLength = SETS$1.length;
+      for (var j = 0; j < setsLength; ++j) {
+        var set = SETS$1[j];
+        if (set && set.test(char)) {
+          type = j;
+          break;
+        }
+      }
+      return type;
+    };
+    var memoize = function (func) {
+      var cache = {};
+      return function (char) {
+        if (cache[char]) {
+          return cache[char];
+        } else {
+          var result = func(char);
+          cache[char] = result;
+          return result;
+        }
+      };
+    };
+    var classify = function (characters) {
+      var memoized = memoize(getType);
+      return map(characters, memoized);
+    };
+
+    var isWordBoundary = function (map, index) {
+      var prevType;
+      var type = map[index];
+      var nextType = map[index + 1];
+      var nextNextType;
+      if (index < 0 || index > map.length - 1 && index !== 0) {
+        return false;
+      }
+      if (type === characterIndices.ALETTER && nextType === characterIndices.ALETTER) {
+        return false;
+      }
+      nextNextType = map[index + 2];
+      if (type === characterIndices.ALETTER && (nextType === characterIndices.MIDLETTER || nextType === characterIndices.MIDNUMLET || nextType === characterIndices.AT) && nextNextType === characterIndices.ALETTER) {
+        return false;
+      }
+      prevType = map[index - 1];
+      if ((type === characterIndices.MIDLETTER || type === characterIndices.MIDNUMLET || nextType === characterIndices.AT) && nextType === characterIndices.ALETTER && prevType === characterIndices.ALETTER) {
+        return false;
+      }
+      if ((type === characterIndices.NUMERIC || type === characterIndices.ALETTER) && (nextType === characterIndices.NUMERIC || nextType === characterIndices.ALETTER)) {
+        return false;
+      }
+      if ((type === characterIndices.MIDNUM || type === characterIndices.MIDNUMLET) && nextType === characterIndices.NUMERIC && prevType === characterIndices.NUMERIC) {
+        return false;
+      }
+      if (type === characterIndices.NUMERIC && (nextType === characterIndices.MIDNUM || nextType === characterIndices.MIDNUMLET) && nextNextType === characterIndices.NUMERIC) {
+        return false;
+      }
+      if (type === characterIndices.EXTEND || type === characterIndices.FORMAT || prevType === characterIndices.EXTEND || prevType === characterIndices.FORMAT || nextType === characterIndices.EXTEND || nextType === characterIndices.FORMAT) {
+        return false;
+      }
+      if (type === characterIndices.CR && nextType === characterIndices.LF) {
+        return false;
+      }
+      if (type === characterIndices.NEWLINE || type === characterIndices.CR || type === characterIndices.LF) {
+        return true;
+      }
+      if (nextType === characterIndices.NEWLINE || nextType === characterIndices.CR || nextType === characterIndices.LF) {
+        return true;
+      }
+      if (type === characterIndices.KATAKANA && nextType === characterIndices.KATAKANA) {
+        return false;
+      }
+      if (nextType === characterIndices.EXTENDNUMLET && (type === characterIndices.ALETTER || type === characterIndices.NUMERIC || type === characterIndices.KATAKANA || type === characterIndices.EXTENDNUMLET)) {
+        return false;
+      }
+      if (type === characterIndices.EXTENDNUMLET && (nextType === characterIndices.ALETTER || nextType === characterIndices.NUMERIC || nextType === characterIndices.KATAKANA)) {
+        return false;
+      }
+      if (type === characterIndices.AT) {
+        return false;
+      }
+      return true;
+    };
+
+    var zeroWidth = '\uFEFF';
+    var removeZwsp = function (s) {
+      return s.replace(/\uFEFF/g, '');
+    };
+
+    var EMPTY_STRING$1 = EMPTY_STRING;
+    var WHITESPACE$1 = WHITESPACE;
+    var PUNCTUATION$1 = PUNCTUATION;
+    var isProtocol = function (str) {
+      return str === 'http' || str === 'https';
+    };
+    var findWordEnd = function (characters, startIndex) {
+      var i;
+      for (i = startIndex; i < characters.length; i++) {
+        if (WHITESPACE$1.test(characters[i])) {
+          break;
+        }
+      }
+      return i;
+    };
+    var findUrlEnd = function (characters, startIndex) {
+      var endIndex = findWordEnd(characters, startIndex + 1);
+      var peakedWord = characters.slice(startIndex + 1, endIndex).join(EMPTY_STRING$1);
+      return peakedWord.substr(0, 3) === '://' ? endIndex : startIndex;
+    };
+    var findWords = function (chars, sChars, characterMap, options) {
+      var words = [];
+      var word = [];
+      for (var i = 0; i < characterMap.length; ++i) {
+        word.push(chars[i]);
+        if (isWordBoundary(characterMap, i)) {
+          var ch = sChars[i];
+          if ((options.includeWhitespace || !WHITESPACE$1.test(ch)) && (options.includePunctuation || !PUNCTUATION$1.test(ch))) {
+            var startOfWord = i - word.length + 1;
+            var endOfWord = i + 1;
+            var str = sChars.slice(startOfWord, endOfWord).join(EMPTY_STRING$1);
+            if (isProtocol(str)) {
+              var endOfUrl = findUrlEnd(sChars, i);
+              var url = chars.slice(endOfWord, endOfUrl);
+              Array.prototype.push.apply(word, url);
+              i = endOfUrl;
+            }
+            words.push(word);
+          }
+          word = [];
+        }
+      }
+      return words;
+    };
+    var getDefaultOptions = function () {
+      return {
+        includeWhitespace: false,
+        includePunctuation: false
+      };
+    };
+    var getWords = function (chars, extract, options) {
+      options = __assign(__assign({}, getDefaultOptions()), options);
+      var filteredChars = [];
+      var extractedChars = [];
+      for (var i = 0; i < chars.length; i++) {
+        var ch = extract(chars[i]);
+        if (ch !== zeroWidth) {
+          filteredChars.push(chars[i]);
+          extractedChars.push(ch);
+        }
+      }
+      var characterMap = classify(extractedChars);
+      return findWords(filteredChars, extractedChars, characterMap, options);
+    };
+
+    var getWords$1 = getWords;
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');
+
+    var getText = function (node, schema) {
+      var blockElements = schema.getBlockElements();
+      var shortEndedElements = schema.getShortEndedElements();
+      var isNewline = function (node) {
+        return blockElements[node.nodeName] || shortEndedElements[node.nodeName];
+      };
+      var textBlocks = [];
+      var txt = '';
+      var treeWalker = new global$1(node, node);
+      while (node = treeWalker.next()) {
+        if (node.nodeType === 3) {
+          txt += removeZwsp(node.data);
+        } else if (isNewline(node) && txt.length) {
+          textBlocks.push(txt);
+          txt = '';
+        }
+      }
+      if (txt.length) {
+        textBlocks.push(txt);
+      }
+      return textBlocks;
+    };
+
+    var strLen = function (str) {
+      return str.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, '_').length;
+    };
+    var countWords = function (node, schema) {
+      var text = getText(node, schema).join('\n');
+      return getWords$1(text.split(''), identity).length;
+    };
+    var countCharacters = function (node, schema) {
+      var text = getText(node, schema).join('');
+      return strLen(text);
+    };
+    var countCharactersWithoutSpaces = function (node, schema) {
+      var text = getText(node, schema).join('').replace(/\s/g, '');
+      return strLen(text);
+    };
+
+    var createBodyCounter = function (editor, count) {
+      return function () {
+        return count(editor.getBody(), editor.schema);
+      };
+    };
+    var createSelectionCounter = function (editor, count) {
+      return function () {
+        return count(editor.selection.getRng().cloneContents(), editor.schema);
+      };
+    };
+    var createBodyWordCounter = function (editor) {
+      return createBodyCounter(editor, countWords);
+    };
+    var get = function (editor) {
+      return {
+        body: {
+          getWordCount: createBodyWordCounter(editor),
+          getCharacterCount: createBodyCounter(editor, countCharacters),
+          getCharacterCountWithoutSpaces: createBodyCounter(editor, countCharactersWithoutSpaces)
+        },
+        selection: {
+          getWordCount: createSelectionCounter(editor, countWords),
+          getCharacterCount: createSelectionCounter(editor, countCharacters),
+          getCharacterCountWithoutSpaces: createSelectionCounter(editor, countCharactersWithoutSpaces)
+        },
+        getCount: createBodyWordCounter(editor)
+      };
+    };
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Delay');
+
+    var fireWordCountUpdate = function (editor, api) {
+      editor.fire('wordCountUpdate', {
+        wordCount: {
+          words: api.body.getWordCount(),
+          characters: api.body.getCharacterCount(),
+          charactersWithoutSpaces: api.body.getCharacterCountWithoutSpaces()
+        }
+      });
+    };
+
+    var updateCount = function (editor, api) {
+      fireWordCountUpdate(editor, api);
+    };
+    var setup = function (editor, api, delay) {
+      var debouncedUpdate = global$2.debounce(function () {
+        return updateCount(editor, api);
+      }, delay);
+      editor.on('init', function () {
+        updateCount(editor, api);
+        global$2.setEditorTimeout(editor, function () {
+          editor.on('SetContent BeforeAddUndo Undo Redo keyup', debouncedUpdate);
+        }, 0);
+      });
+    };
+
+    var open = function (editor, api) {
+      editor.windowManager.open({
+        title: 'Word Count',
+        body: {
+          type: 'panel',
+          items: [{
+              type: 'table',
+              header: [
+                'Count',
+                'Document',
+                'Selection'
+              ],
+              cells: [
+                [
+                  'Words',
+                  String(api.body.getWordCount()),
+                  String(api.selection.getWordCount())
+                ],
+                [
+                  'Characters (no spaces)',
+                  String(api.body.getCharacterCountWithoutSpaces()),
+                  String(api.selection.getCharacterCountWithoutSpaces())
+                ],
+                [
+                  'Characters',
+                  String(api.body.getCharacterCount()),
+                  String(api.selection.getCharacterCount())
+                ]
+              ]
+            }]
+        },
+        buttons: [{
+            type: 'cancel',
+            name: 'close',
+            text: 'Close',
+            primary: true
+          }]
+      });
+    };
+
+    var register = function (editor, api) {
+      editor.ui.registry.addButton('wordcount', {
+        tooltip: 'Word count',
+        icon: 'character-count',
+        onAction: function () {
+          return open(editor, api);
+        }
+      });
+      editor.ui.registry.addMenuItem('wordcount', {
+        text: 'Word count',
+        icon: 'character-count',
+        onAction: function () {
+          return open(editor, api);
+        }
+      });
+    };
+
+    function Plugin (delay) {
+      if (delay === void 0) {
+        delay = 300;
+      }
+      global.add('wordcount', function (editor) {
+        var api = get(editor);
+        register(editor, api);
+        setup(editor, api, delay);
+        return api;
+      });
+    }
+
+    Plugin();
+
+}());
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/plugins/wordcount/plugin.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(t){return t},i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},e="[-'\\.\u2018\u2019\u2024\ufe52\uff07\uff0e]",n="[:\xb7\xb7\u05f4\u2027\ufe13\ufe55\uff1a]",o="[\xb1+*/,;;\u0589\u060c\u060d\u066c\u07f8\u2044\ufe10\ufe14\ufe50\ufe54\uff0c\uff1b]",u="[0-9\u0660-\u0669\u066b\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9]",c="\\r",a="\\n",s="[\x0B\f\x85\u2028\u2029]",g="[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f\u109a-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b6-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u192b\u1930-\u193b\u19b0-\u19c0\u19c8\u19c9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f\u1b00-\u1b04\u1b34-\u1b44\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1baa\u1be6-\u1bf3\u1c24-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe3-\uabea\uabec\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]",l="[\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200e\u200f\u202a-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb]",p="[\u3031-\u3035\u309b\u309c\u30a0-\u30fa\u30fc-\u30ff\u31f0-\u31ff\u32d0-\u32fe\u3300-\u3357\uff66-\uff9d]",d="[=_\u203f\u2040\u2054\ufe33\ufe34\ufe4d-\ufe4f\uff3f\u2200-\u22ff<>]",f="[!-#%-*,-\\/:;?@\\[-\\]_{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]",m=0,E=1,W=2,x=3,R=4,b=5,S=6,F=7,j=8,A=9,D=10,T=11,B=12,h=13,C=[new RegExp("[A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f3\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u10a0-\u10c5\u10d0-\u10fa\u10fc\u1100-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bc0-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u24b6-\u24e9\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2d00-\u2d25\u2d30-\u2d65\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005\u303b\u303c\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790\ua791\ua7a0-\ua7a9\ua7fa-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]"),new RegExp(e),new RegExp(n),new RegExp(o),new RegExp(u),new RegExp(c),new RegExp(a),new RegExp(s),new RegExp(g),new RegExp(l),new RegExp(p),new RegExp(d),new RegExp("@")],y=new RegExp("^"+f+"$"),v=C,w=h,k=function(t){for(var e=w,n=v.length,r=0;r<n;++r){var o=v[r];if(o&&o.test(t)){e=r;break}}return e},P=function(t){var n,r;return function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var u=t[o];r[o]=e(u,o)}return r}(t,(n=k,r={},function(t){if(r[t])return r[t];var e=n(t);return r[t]=e}))},M=/^\s+$/,O=y,U=function(t,e){var n=function(t,e){var n;for(n=e;n<t.length&&!M.test(t[n]);n++);return n}(t,e+1);return"://"===t.slice(e+1,n).join("").substr(0,3)?n:e},_=function(t,e,n){n=i(i({},{includeWhitespace:!1,includePunctuation:!1}),n);for(var r=[],o=[],u=0;u<t.length;u++){var c=e(t[u]);"\ufeff"!==c&&(r.push(t[u]),o.push(c))}return function(t,e,n,r){for(var o,u,c,i,a,s,g,l=[],p=[],d=0;d<n.length;++d)if(p.push(t[d]),a=i=void 0,s=(u=n)[c=d],g=u[c+1],!(c<0||c>u.length-1&&0!==c||s===m&&g===m||(a=u[c+2],s===m&&(g===W||g===E||g===B)&&a===m||(i=u[c-1],(s===W||s===E||g===B)&&g===m&&i===m||!(s!==R&&s!==m||g!==R&&g!==m)||(s===x||s===E)&&g===R&&i===R||s===R&&(g===x||g===E)&&a===R||s===j||s===A||i===j||i===A||g===j||g===A||s===b&&g===S||s!==F&&s!==b&&s!==S&&g!==F&&g!==b&&g!==S&&(s===D&&g===D||g===T&&(s===m||s===R||s===D||s===T)||s===T&&(g===m||g===R||g===D)||s===B))))){var f=e[d];if((r.includeWhitespace||!M.test(f))&&(r.includePunctuation||!O.test(f))){var h=d-p.length+1,C=d+1,y=e.slice(h,C).join("");if("http"===(o=y)||"https"===o){var v=U(e,d),w=t.slice(C,v);Array.prototype.push.apply(p,w),d=v}l.push(p)}p=[]}return l}(r,o,P(o),n)},N=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),$=function(t,e){for(var n,r=e.getBlockElements(),o=e.getShortEndedElements(),u=[],c="",i=new N(t,t);t=i.next();)3===t.nodeType?c+=t.data.replace(/\uFEFF/g,""):(r[(n=t).nodeName]||o[n.nodeName])&&c.length&&(u.push(c),c="");return c.length&&u.push(c),u},z=function(t){return t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length},I=function(t,e){var n=$(t,e).join("\n");return _(n.split(""),r).length},Z=function(t,e){var n=$(t,e).join("");return z(n)},q=function(t,e){var n=$(t,e).join("").replace(/\s/g,"");return z(n)},G=function(t,e){return function(){return e(t.getBody(),t.schema)}},H=function(t,e){return function(){return e(t.selection.getRng().cloneContents(),t.schema)}},J=function(t){return G(t,I)},K=tinymce.util.Tools.resolve("tinymce.util.Delay"),L=function(t,e){var n;n=e,t.fire("wordCountUpdate",{wordCount:{words:n.body.getWordCount(),characters:n.body.getCharacterCount(),charactersWithoutSpaces:n.body.getCharacterCountWithoutSpaces()}})},Q=function(t,e){t.windowManager.open({title:"Word Count",body:{type:"panel",items:[{type:"table",header:["Count","Document","Selection"],cells:[["Words",String(e.body.getWordCount()),String(e.selection.getWordCount())],["Characters (no spaces)",String(e.body.getCharacterCountWithoutSpaces()),String(e.selection.getCharacterCountWithoutSpaces())],["Characters",String(e.body.getCharacterCount()),String(e.selection.getCharacterCount())]]}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}]})};!function V(s){void 0===s&&(s=300),t.add("wordcount",function(t){var e,n,r,o,u,c,i,a={body:{getWordCount:J(e=t),getCharacterCount:G(e,Z),getCharacterCountWithoutSpaces:G(e,q)},selection:{getWordCount:H(e,I),getCharacterCount:H(e,Z),getCharacterCountWithoutSpaces:H(e,q)},getCount:J(e)};return r=a,(n=t).ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:function(){return Q(n,r)}}),n.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:function(){return Q(n,r)}}),o=t,u=a,c=s,i=K.debounce(function(){return L(o,u)},c),o.on("init",function(){L(o,u),K.setEditorTimeout(o,function(){o.on("SetContent BeforeAddUndo Undo Redo keyup",i)},0)}),a})}()}();

--- /dev/null
+++ b/tinymce/5/js/tinymce/readme.md
@@ -1,1 +1,78 @@
+# TinyMCE
 
+TinyMCE is the world’s most popular open source web-based WYSIWYG editor.
+
+Trusted and loved by millions of developers, and integrated into thousands of applications, such as:
+
+- Content management systems (CMSs)
+- Learning management systems (LMSs)
+- Customer relationship management (CRM) and marketing automation systems
+- Email marketing systems
+- Content creation in SaaS systems
+
+<p align="center">
+  <img alt="Screenshot of the TinyMCE Editor" src="https://www.tiny.cloud/storage/github-readme-images/tinymce-editor.png"\>
+</p>
+
+## Our Tiny contribution
+
+Content is powerful. It can be used to inform, educate, connect, learn, and inspire change.
+
+More online applications are providing a platform for people to benefit from the transformational power of content.
+
+With this in mind, as technology continues to advance and evolve, we want to make sure people will always have access to the best tools for creating content, enabling them to participate freely and seamlessly without barriers.
+
+TinyMCE easily integrates into applications of all types and sizes, to provide the best content creation experience possible.
+
+<p align="center">
+  <img alt="Tiny Technologies Logo" src="https://www.tiny.cloud/storage/github-readme-images/tiny-image.png"\>
+</p>
+
+## Try the demo
+
+You can access a [full featured demo of TinyMCE](https://www.tiny.cloud/docs/demo/full-featured/) in the docs on the Tiny website.
+
+## Get started with TinyMCE
+
+Get an instance of TinyMCE up and running quickly with the [TinyMCE quick start guide](https://www.tiny.cloud/docs/quick-start/).
+
+TinyMCE provides a range of configuration options that allow you to integrate it into your application. Start customizing with a [basic setup](https://www.tiny.cloud/docs/general-configuration-guide/basic-setup/).
+
+Configure it for one of three modes of editing:
+
+- [TinyMCE classic editing mode](https://www.tiny.cloud/docs/general-configuration-guide/use-tinymce-classic/).
+- [TinyMCE inline editing mode](https://www.tiny.cloud/docs/general-configuration-guide/use-tinymce-inline/).
+- [TinyMCE distraction-free editing mode](https://www.tiny.cloud/docs/general-configuration-guide/use-tinymce-distraction-free/).
+
+## Features
+
+### Integration
+
+TinyMCE is easily integrated into your projects with the help of components such as:
+
+- [tinymce-react](https://github.com/tinymce/tinymce-react)
+- [tinymce-vue](https://github.com/tinymce/tinymce-vue)
+- [tinymce-angular](https://github.com/tinymce/tinymce-angular)
+
+See the Tiny docs for a full list of [integration components](https://www.tiny.cloud/docs/integrations/).
+
+### Customization
+
+It is easy to [configure the UI](https://www.tiny.cloud/docs/general-configuration-guide/customize-ui/) to match the design of your site and applications, and you can [configure the editor](https://www.tiny.cloud/docs/general-configuration-guide/basic-setup/) with as much or as little functionality as you like, depending on your users and requirements.
+
+With [50+ powerful plugins available](https://www.tiny.cloud/apps/), adding additional functionality is as simple as including a single line of code. Realizing the full power of most plugins requires only a few lines more.
+
+### Extensibility
+
+Sometimes your business requirements can be quite unique, and you need the freedom and flexibility to innovate. View the source code and develop your own extensions for custom functionality to meet your own requirements. The [API](https://www.tiny.cloud/docs/api/) is exposed to make it easier for you to write custom functionality that fits within the existing framework of TinyMCE [UI components](https://www.tiny.cloud/docs/ui-components/).
+
+## Compiling and contributing
+
+As TinyMCE transitioned to a modern codebase through 2017 and 2018, many external dependencies were added from previously closed-source projects. This became unwieldy to develop, so in June 2019 the decision was made to bring those projects together in a monorepo.
+
+For information on compiling and contributing, see: [contribution guidelines](https://github.com/tinymce/tinymce/blob/master/CONTRIBUTING.md).
+
+## Want more information?
+
+Visit the [TinyMCE home page](https://tiny.cloud/) and check out the [TinyMCE documentation](https://www.tiny.cloud/docs/).
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/content/dark/content.css
@@ -1,1 +1,60 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+body {
+  background-color: #2f3742;
+  color: #dfe0e4;
+  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
+  line-height: 1.4;
+  margin: 1rem;
+}
+a {
+  color: #4099ff;
+}
+table {
+  border-collapse: collapse;
+}
+table th,
+table td {
+  border: 1px solid #6d737b;
+  padding: 0.4rem;
+}
+figure {
+  display: table;
+  margin: 1rem auto;
+}
+figure figcaption {
+  color: #8a8f97;
+  display: block;
+  margin-top: 0.25rem;
+  text-align: center;
+}
+hr {
+  border-color: #6d737b;
+  border-style: solid;
+  border-width: 1px 0 0 0;
+}
+code {
+  background-color: #6d737b;
+  border-radius: 3px;
+  padding: 0.1rem 0.2rem;
+}
+/* Make text in selected cells in tables dark and readable */
+td[data-mce-selected],
+th[data-mce-selected] {
+  color: #333;
+}
+.mce-content-body:not([dir=rtl]) blockquote {
+  border-left: 2px solid #6d737b;
+  margin-left: 1.5rem;
+  padding-left: 1rem;
+}
+.mce-content-body[dir=rtl] blockquote {
+  border-right: 2px solid #6d737b;
+  margin-right: 1.5rem;
+  padding-right: 1rem;
+}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/content/dark/content.min.css
@@ -1,1 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+body{background-color:#2f3742;color:#dfe0e4;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}a{color:#4099ff}table{border-collapse:collapse}table td,table th{border:1px solid #6d737b;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#8a8f97;display:block;margin-top:.25rem;text-align:center}hr{border-color:#6d737b;border-style:solid;border-width:1px 0 0 0}code{background-color:#6d737b;border-radius:3px;padding:.1rem .2rem}td[data-mce-selected],th[data-mce-selected]{color:#333}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #6d737b;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #6d737b;margin-right:1.5rem;padding-right:1rem}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/content/default/content.css
@@ -1,1 +1,50 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+body {
+  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
+  line-height: 1.4;
+  margin: 1rem;
+}
+table {
+  border-collapse: collapse;
+}
+table th,
+table td {
+  border: 1px solid #ccc;
+  padding: 0.4rem;
+}
+figure {
+  display: table;
+  margin: 1rem auto;
+}
+figure figcaption {
+  color: #999;
+  display: block;
+  margin-top: 0.25rem;
+  text-align: center;
+}
+hr {
+  border-color: #ccc;
+  border-style: solid;
+  border-width: 1px 0 0 0;
+}
+code {
+  background-color: #e8e8e8;
+  border-radius: 3px;
+  padding: 0.1rem 0.2rem;
+}
+.mce-content-body:not([dir=rtl]) blockquote {
+  border-left: 2px solid #ccc;
+  margin-left: 1.5rem;
+  padding-left: 1rem;
+}
+.mce-content-body[dir=rtl] blockquote {
+  border-right: 2px solid #ccc;
+  margin-right: 1.5rem;
+  padding-right: 1rem;
+}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/content/default/content.min.css
@@ -1,1 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/content/document/content.css
@@ -1,1 +1,55 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+@media screen {
+  html {
+    background: #f4f4f4;
+    min-height: 100%;
+  }
+}
+body {
+  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
+}
+@media screen {
+  body {
+    background-color: #fff;
+    box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
+    box-sizing: border-box;
+    margin: 1rem auto 0;
+    max-width: 820px;
+    min-height: calc(100vh - 1rem);
+    padding: 4rem 6rem 6rem 6rem;
+  }
+}
+table {
+  border-collapse: collapse;
+}
+table th,
+table td {
+  border: 1px solid #ccc;
+  padding: 0.4rem;
+}
+figure figcaption {
+  color: #999;
+  margin-top: 0.25rem;
+  text-align: center;
+}
+hr {
+  border-color: #ccc;
+  border-style: solid;
+  border-width: 1px 0 0 0;
+}
+.mce-content-body:not([dir=rtl]) blockquote {
+  border-left: 2px solid #ccc;
+  margin-left: 1.5rem;
+  padding-left: 1rem;
+}
+.mce-content-body[dir=rtl] blockquote {
+  border-right: 2px solid #ccc;
+  margin-right: 1.5rem;
+  padding-right: 1rem;
+}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/content/document/content.min.css
@@ -1,1 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+@media screen{html{background:#f4f4f4;min-height:100%}}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif}@media screen{body{background-color:#fff;box-shadow:0 0 4px rgba(0,0,0,.15);box-sizing:border-box;margin:1rem auto 0;max-width:820px;min-height:calc(100vh - 1rem);padding:4rem 6rem 6rem 6rem}}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure figcaption{color:#999;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/content/writer/content.css
@@ -1,1 +1,51 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+body {
+  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
+  line-height: 1.4;
+  margin: 1rem auto;
+  max-width: 900px;
+}
+table {
+  border-collapse: collapse;
+}
+table th,
+table td {
+  border: 1px solid #ccc;
+  padding: 0.4rem;
+}
+figure {
+  display: table;
+  margin: 1rem auto;
+}
+figure figcaption {
+  color: #999;
+  display: block;
+  margin-top: 0.25rem;
+  text-align: center;
+}
+hr {
+  border-color: #ccc;
+  border-style: solid;
+  border-width: 1px 0 0 0;
+}
+code {
+  background-color: #e8e8e8;
+  border-radius: 3px;
+  padding: 0.1rem 0.2rem;
+}
+.mce-content-body:not([dir=rtl]) blockquote {
+  border-left: 2px solid #ccc;
+  margin-left: 1.5rem;
+  padding-left: 1rem;
+}
+.mce-content-body[dir=rtl] blockquote {
+  border-right: 2px solid #ccc;
+  margin-right: 1.5rem;
+  padding-right: 1rem;
+}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/content/writer/content.min.css
@@ -1,1 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem auto;max-width:900px}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide-dark/content.css
@@ -1,1 +1,678 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.mce-content-body .mce-item-anchor {
+  background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%20fill%3D%22%23cccccc%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
+  cursor: default;
+  display: inline-block;
+  height: 12px !important;
+  padding: 0 2px;
+  -webkit-user-modify: read-only;
+  -moz-user-modify: read-only;
+  -webkit-user-select: all;
+  -moz-user-select: all;
+  -ms-user-select: all;
+      user-select: all;
+  width: 8px !important;
+}
+.mce-content-body .mce-item-anchor[data-mce-selected] {
+  outline-offset: 1px;
+}
+.tox-comments-visible .tox-comment {
+  background-color: #fff0b7;
+}
+.tox-comments-visible .tox-comment--active {
+  background-color: #ffe168;
+}
+.tox-checklist > li:not(.tox-checklist--hidden) {
+  list-style: none;
+  margin: 0.25em 0;
+}
+.tox-checklist > li:not(.tox-checklist--hidden)::before {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%236d737b%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");
+  background-size: 100%;
+  content: '';
+  cursor: pointer;
+  height: 1em;
+  margin-left: -1.5em;
+  margin-top: 0.125em;
+  position: absolute;
+  width: 1em;
+}
+.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");
+}
+[dir=rtl] .tox-checklist > li:not(.tox-checklist--hidden)::before {
+  margin-left: 0;
+  margin-right: -1.5em;
+}
+/* stylelint-disable */
+/* http://prismjs.com/ */
+/**
+ * Dracula Theme originally by Zeno Rocha [@zenorocha]
+ * https://draculatheme.com/
+ *
+ * Ported for PrismJS by Albert Vallverdu [@byverdu]
+ */
+code[class*="language-"],
+pre[class*="language-"] {
+  color: #f8f8f2;
+  background: none;
+  text-shadow: 0 1px rgba(0, 0, 0, 0.3);
+  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
+  text-align: left;
+  white-space: pre;
+  word-spacing: normal;
+  word-break: normal;
+  word-wrap: normal;
+  line-height: 1.5;
+  -moz-tab-size: 4;
+  tab-size: 4;
+  -webkit-hyphens: none;
+  -ms-hyphens: none;
+  hyphens: none;
+}
+/* Code blocks */
+pre[class*="language-"] {
+  padding: 1em;
+  margin: 0.5em 0;
+  overflow: auto;
+  border-radius: 0.3em;
+}
+:not(pre) > code[class*="language-"],
+pre[class*="language-"] {
+  background: #282a36;
+}
+/* Inline code */
+:not(pre) > code[class*="language-"] {
+  padding: 0.1em;
+  border-radius: 0.3em;
+  white-space: normal;
+}
+.token.comment,
+.token.prolog,
+.token.doctype,
+.token.cdata {
+  color: #6272a4;
+}
+.token.punctuation {
+  color: #f8f8f2;
+}
+.namespace {
+  opacity: 0.7;
+}
+.token.property,
+.token.tag,
+.token.constant,
+.token.symbol,
+.token.deleted {
+  color: #ff79c6;
+}
+.token.boolean,
+.token.number {
+  color: #bd93f9;
+}
+.token.selector,
+.token.attr-name,
+.token.string,
+.token.char,
+.token.builtin,
+.token.inserted {
+  color: #50fa7b;
+}
+.token.operator,
+.token.entity,
+.token.url,
+.language-css .token.string,
+.style .token.string,
+.token.variable {
+  color: #f8f8f2;
+}
+.token.atrule,
+.token.attr-value,
+.token.function,
+.token.class-name {
+  color: #f1fa8c;
+}
+.token.keyword {
+  color: #8be9fd;
+}
+.token.regex,
+.token.important {
+  color: #ffb86c;
+}
+.token.important,
+.token.bold {
+  font-weight: bold;
+}
+.token.italic {
+  font-style: italic;
+}
+.token.entity {
+  cursor: help;
+}
+/* stylelint-enable */
+.mce-content-body {
+  overflow-wrap: break-word;
+  word-wrap: break-word;
+}
+.mce-content-body .mce-visual-caret {
+  background-color: black;
+  background-color: currentColor;
+  position: absolute;
+}
+.mce-content-body .mce-visual-caret-hidden {
+  display: none;
+}
+.mce-content-body *[data-mce-caret] {
+  left: -1000px;
+  margin: 0;
+  padding: 0;
+  position: absolute;
+  right: auto;
+  top: 0;
+}
+.mce-content-body .mce-offscreen-selection {
+  left: -2000000px;
+  max-width: 1000000px;
+  position: absolute;
+}
+.mce-content-body *[contentEditable=false] {
+  cursor: default;
+}
+.mce-content-body *[contentEditable=true] {
+  cursor: text;
+}
+.tox-cursor-format-painter {
+  cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
+}
+.mce-content-body figure.align-left {
+  float: left;
+}
+.mce-content-body figure.align-right {
+  float: right;
+}
+.mce-content-body figure.image.align-center {
+  display: table;
+  margin-left: auto;
+  margin-right: auto;
+}
+.mce-preview-object {
+  border: 1px solid gray;
+  display: inline-block;
+  line-height: 0;
+  margin: 0 2px 0 2px;
+  position: relative;
+}
+.mce-preview-object .mce-shim {
+  background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
+  height: 100%;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.mce-preview-object[data-mce-selected="2"] .mce-shim {
+  display: none;
+}
+.mce-object {
+  background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%20fill%3D%22%23cccccc%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
+  border: 1px dashed #aaa;
+}
+.mce-pagebreak {
+  border: 1px dashed #aaa;
+  cursor: default;
+  display: block;
+  height: 5px;
+  margin-top: 15px;
+  page-break-before: always;
+  width: 100%;
+}
+@media print {
+  .mce-pagebreak {
+    border: 0;
+  }
+}
+.tiny-pageembed .mce-shim {
+  background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
+  height: 100%;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.tiny-pageembed[data-mce-selected="2"] .mce-shim {
+  display: none;
+}
+.tiny-pageembed {
+  display: inline-block;
+  position: relative;
+}
+.tiny-pageembed--21by9,
+.tiny-pageembed--16by9,
+.tiny-pageembed--4by3,
+.tiny-pageembed--1by1 {
+  display: block;
+  overflow: hidden;
+  padding: 0;
+  position: relative;
+  width: 100%;
+}
+.tiny-pageembed--21by9 {
+  padding-top: 42.857143%;
+}
+.tiny-pageembed--16by9 {
+  padding-top: 56.25%;
+}
+.tiny-pageembed--4by3 {
+  padding-top: 75%;
+}
+.tiny-pageembed--1by1 {
+  padding-top: 100%;
+}
+.tiny-pageembed--21by9 iframe,
+.tiny-pageembed--16by9 iframe,
+.tiny-pageembed--4by3 iframe,
+.tiny-pageembed--1by1 iframe {
+  border: 0;
+  height: 100%;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.mce-content-body[data-mce-placeholder] {
+  position: relative;
+}
+.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {
+  color: rgba(34, 47, 62, 0.7);
+  content: attr(data-mce-placeholder);
+  position: absolute;
+}
+.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before {
+  left: 1px;
+}
+.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before {
+  right: 1px;
+}
+.mce-content-body div.mce-resizehandle {
+  background-color: #4099ff;
+  border-color: #4099ff;
+  border-style: solid;
+  border-width: 1px;
+  box-sizing: border-box;
+  height: 10px;
+  position: absolute;
+  width: 10px;
+  z-index: 10000;
+}
+.mce-content-body div.mce-resizehandle:hover {
+  background-color: #4099ff;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(1) {
+  cursor: nwse-resize;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(2) {
+  cursor: nesw-resize;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(3) {
+  cursor: nwse-resize;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(4) {
+  cursor: nesw-resize;
+}
+.mce-content-body .mce-clonedresizable {
+  opacity: 0.5;
+  outline: 1px dashed black;
+  position: absolute;
+  z-index: 10000;
+}
+.mce-content-body .mce-resize-helper {
+  background: #555;
+  background: rgba(0, 0, 0, 0.75);
+  border: 1px;
+  border-radius: 3px;
+  color: white;
+  display: none;
+  font-family: sans-serif;
+  font-size: 12px;
+  line-height: 14px;
+  margin: 5px 10px;
+  padding: 5px;
+  position: absolute;
+  white-space: nowrap;
+  z-index: 10001;
+}
+.tox-rtc-user-selection {
+  position: relative;
+}
+.tox-rtc-user-cursor {
+  bottom: 0;
+  cursor: default;
+  position: absolute;
+  top: 0;
+  width: 2px;
+}
+.tox-rtc-user-cursor::before {
+  background-color: inherit;
+  border-radius: 50%;
+  content: '';
+  display: block;
+  height: 8px;
+  position: absolute;
+  right: -3px;
+  top: -3px;
+  width: 8px;
+}
+.tox-rtc-user-cursor:hover::after {
+  background-color: inherit;
+  border-radius: 100px;
+  box-sizing: border-box;
+  color: #fff;
+  content: attr(data-user);
+  display: block;
+  font-size: 12px;
+  font-weight: bold;
+  left: -5px;
+  min-height: 8px;
+  min-width: 8px;
+  padding: 0 12px;
+  position: absolute;
+  top: -11px;
+  white-space: nowrap;
+  z-index: 1000;
+}
+.tox-rtc-user-selection--1 .tox-rtc-user-cursor {
+  background-color: #2dc26b;
+}
+.tox-rtc-user-selection--2 .tox-rtc-user-cursor {
+  background-color: #e03e2d;
+}
+.tox-rtc-user-selection--3 .tox-rtc-user-cursor {
+  background-color: #f1c40f;
+}
+.tox-rtc-user-selection--4 .tox-rtc-user-cursor {
+  background-color: #3598db;
+}
+.tox-rtc-user-selection--5 .tox-rtc-user-cursor {
+  background-color: #b96ad9;
+}
+.tox-rtc-user-selection--6 .tox-rtc-user-cursor {
+  background-color: #e67e23;
+}
+.tox-rtc-user-selection--7 .tox-rtc-user-cursor {
+  background-color: #aaa69d;
+}
+.tox-rtc-user-selection--8 .tox-rtc-user-cursor {
+  background-color: #f368e0;
+}
+.tox-rtc-remote-image {
+  background: #eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center;
+  border: 1px solid #ccc;
+  min-height: 240px;
+  min-width: 320px;
+}
+.mce-match-marker {
+  background: #aaa;
+  color: #fff;
+}
+.mce-match-marker-selected {
+  background: #39f;
+  color: #fff;
+}
+.mce-match-marker-selected::-moz-selection {
+  background: #39f;
+  color: #fff;
+}
+.mce-match-marker-selected::selection {
+  background: #39f;
+  color: #fff;
+}
+.mce-content-body img[data-mce-selected],
+.mce-content-body table[data-mce-selected] {
+  outline: 3px solid #4099ff;
+}
+.mce-content-body hr[data-mce-selected] {
+  outline: 3px solid #4099ff;
+  outline-offset: 1px;
+}
+.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus {
+  outline: 3px solid #4099ff;
+}
+.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover {
+  outline: 3px solid #4099ff;
+}
+.mce-content-body *[contentEditable=false][data-mce-selected] {
+  cursor: not-allowed;
+  outline: 3px solid #4099ff;
+}
+.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,
+.mce-content-body.mce-content-readonly *[contentEditable=true]:hover {
+  outline: none;
+}
+.mce-content-body *[data-mce-selected="inline-boundary"] {
+  background-color: #4099ff;
+}
+.mce-content-body .mce-edit-focus {
+  outline: 3px solid #4099ff;
+}
+.mce-content-body td[data-mce-selected],
+.mce-content-body th[data-mce-selected] {
+  background-color: #b4d7ff !important;
+}
+.mce-content-body td[data-mce-selected]::-moz-selection,
+.mce-content-body th[data-mce-selected]::-moz-selection {
+  background: none;
+}
+.mce-content-body td[data-mce-selected]::selection,
+.mce-content-body th[data-mce-selected]::selection {
+  background: none;
+}
+.mce-content-body td[data-mce-selected] *,
+.mce-content-body th[data-mce-selected] * {
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+}
+.mce-content-body img::-moz-selection {
+  background: none;
+}
+.mce-content-body img::selection {
+  background: none;
+}
+.ephox-snooker-resizer-bar {
+  background-color: #4099ff;
+  opacity: 0;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+.ephox-snooker-resizer-cols {
+  cursor: col-resize;
+}
+.ephox-snooker-resizer-rows {
+  cursor: row-resize;
+}
+.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging {
+  opacity: 1;
+}
+.mce-spellchecker-word {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");
+  background-position: 0 calc(100% + 1px);
+  background-repeat: repeat-x;
+  background-size: auto 6px;
+  cursor: default;
+  height: 2rem;
+}
+.mce-spellchecker-grammar {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");
+  background-position: 0 calc(100% + 1px);
+  background-repeat: repeat-x;
+  background-size: auto 6px;
+  cursor: default;
+}
+.mce-toc {
+  border: 1px solid gray;
+}
+.mce-toc h2 {
+  margin: 4px;
+}
+.mce-toc li {
+  list-style-type: none;
+}
+.mce-item-table,
+.mce-item-table td,
+.mce-item-table th,
+.mce-item-table caption {
+  border: 1px dashed #bbb;
+}
+.mce-visualblocks p,
+.mce-visualblocks h1,
+.mce-visualblocks h2,
+.mce-visualblocks h3,
+.mce-visualblocks h4,
+.mce-visualblocks h5,
+.mce-visualblocks h6,
+.mce-visualblocks div:not([data-mce-bogus]),
+.mce-visualblocks section,
+.mce-visualblocks article,
+.mce-visualblocks blockquote,
+.mce-visualblocks address,
+.mce-visualblocks pre,
+.mce-visualblocks figure,
+.mce-visualblocks figcaption,
+.mce-visualblocks hgroup,
+.mce-visualblocks aside,
+.mce-visualblocks ul,
+.mce-visualblocks ol,
+.mce-visualblocks dl {
+  background-repeat: no-repeat;
+  border: 1px dashed #bbb;
+  margin-left: 3px;
+  padding-top: 10px;
+}
+.mce-visualblocks p {
+  background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);
+}
+.mce-visualblocks h1 {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);
+}
+.mce-visualblocks h2 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);
+}
+.mce-visualblocks h3 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);
+}
+.mce-visualblocks h4 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);
+}
+.mce-visualblocks h5 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);
+}
+.mce-visualblocks h6 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);
+}
+.mce-visualblocks div:not([data-mce-bogus]) {
+  background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);
+}
+.mce-visualblocks section {
+  background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);
+}
+.mce-visualblocks article {
+  background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);
+}
+.mce-visualblocks blockquote {
+  background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);
+}
+.mce-visualblocks address {
+  background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);
+}
+.mce-visualblocks pre {
+  background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);
+}
+.mce-visualblocks figure {
+  background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);
+}
+.mce-visualblocks figcaption {
+  border: 1px dashed #bbb;
+}
+.mce-visualblocks hgroup {
+  background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);
+}
+.mce-visualblocks aside {
+  background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);
+}
+.mce-visualblocks ul {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==);
+}
+.mce-visualblocks ol {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);
+}
+.mce-visualblocks dl {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);
+}
+.mce-visualblocks:not([dir=rtl]) p,
+.mce-visualblocks:not([dir=rtl]) h1,
+.mce-visualblocks:not([dir=rtl]) h2,
+.mce-visualblocks:not([dir=rtl]) h3,
+.mce-visualblocks:not([dir=rtl]) h4,
+.mce-visualblocks:not([dir=rtl]) h5,
+.mce-visualblocks:not([dir=rtl]) h6,
+.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),
+.mce-visualblocks:not([dir=rtl]) section,
+.mce-visualblocks:not([dir=rtl]) article,
+.mce-visualblocks:not([dir=rtl]) blockquote,
+.mce-visualblocks:not([dir=rtl]) address,
+.mce-visualblocks:not([dir=rtl]) pre,
+.mce-visualblocks:not([dir=rtl]) figure,
+.mce-visualblocks:not([dir=rtl]) figcaption,
+.mce-visualblocks:not([dir=rtl]) hgroup,
+.mce-visualblocks:not([dir=rtl]) aside,
+.mce-visualblocks:not([dir=rtl]) ul,
+.mce-visualblocks:not([dir=rtl]) ol,
+.mce-visualblocks:not([dir=rtl]) dl {
+  margin-left: 3px;
+}
+.mce-visualblocks[dir=rtl] p,
+.mce-visualblocks[dir=rtl] h1,
+.mce-visualblocks[dir=rtl] h2,
+.mce-visualblocks[dir=rtl] h3,
+.mce-visualblocks[dir=rtl] h4,
+.mce-visualblocks[dir=rtl] h5,
+.mce-visualblocks[dir=rtl] h6,
+.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),
+.mce-visualblocks[dir=rtl] section,
+.mce-visualblocks[dir=rtl] article,
+.mce-visualblocks[dir=rtl] blockquote,
+.mce-visualblocks[dir=rtl] address,
+.mce-visualblocks[dir=rtl] pre,
+.mce-visualblocks[dir=rtl] figure,
+.mce-visualblocks[dir=rtl] figcaption,
+.mce-visualblocks[dir=rtl] hgroup,
+.mce-visualblocks[dir=rtl] aside,
+.mce-visualblocks[dir=rtl] ul,
+.mce-visualblocks[dir=rtl] ol,
+.mce-visualblocks[dir=rtl] dl {
+  background-position-x: right;
+  margin-right: 3px;
+}
+.mce-nbsp,
+.mce-shy {
+  background: #aaa;
+}
+.mce-shy::after {
+  content: '-';
+}
+body {
+  font-family: sans-serif;
+}
+table {
+  border-collapse: collapse;
+}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide-dark/content.inline.css
@@ -1,1 +1,690 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.mce-content-body .mce-item-anchor {
+  background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
+  cursor: default;
+  display: inline-block;
+  height: 12px !important;
+  padding: 0 2px;
+  -webkit-user-modify: read-only;
+  -moz-user-modify: read-only;
+  -webkit-user-select: all;
+  -moz-user-select: all;
+  -ms-user-select: all;
+      user-select: all;
+  width: 8px !important;
+}
+.mce-content-body .mce-item-anchor[data-mce-selected] {
+  outline-offset: 1px;
+}
+.tox-comments-visible .tox-comment {
+  background-color: #fff0b7;
+}
+.tox-comments-visible .tox-comment--active {
+  background-color: #ffe168;
+}
+.tox-checklist > li:not(.tox-checklist--hidden) {
+  list-style: none;
+  margin: 0.25em 0;
+}
+.tox-checklist > li:not(.tox-checklist--hidden)::before {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");
+  background-size: 100%;
+  content: '';
+  cursor: pointer;
+  height: 1em;
+  margin-left: -1.5em;
+  margin-top: 0.125em;
+  position: absolute;
+  width: 1em;
+}
+.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");
+}
+[dir=rtl] .tox-checklist > li:not(.tox-checklist--hidden)::before {
+  margin-left: 0;
+  margin-right: -1.5em;
+}
+/* stylelint-disable */
+/* http://prismjs.com/ */
+/**
+ * prism.js default theme for JavaScript, CSS and HTML
+ * Based on dabblet (http://dabblet.com)
+ * @author Lea Verou
+ */
+code[class*="language-"],
+pre[class*="language-"] {
+  color: black;
+  background: none;
+  text-shadow: 0 1px white;
+  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
+  font-size: 1em;
+  text-align: left;
+  white-space: pre;
+  word-spacing: normal;
+  word-break: normal;
+  word-wrap: normal;
+  line-height: 1.5;
+  -moz-tab-size: 4;
+  tab-size: 4;
+  -webkit-hyphens: none;
+  -ms-hyphens: none;
+  hyphens: none;
+}
+pre[class*="language-"]::-moz-selection,
+pre[class*="language-"] ::-moz-selection,
+code[class*="language-"]::-moz-selection,
+code[class*="language-"] ::-moz-selection {
+  text-shadow: none;
+  background: #b3d4fc;
+}
+pre[class*="language-"]::selection,
+pre[class*="language-"] ::selection,
+code[class*="language-"]::selection,
+code[class*="language-"] ::selection {
+  text-shadow: none;
+  background: #b3d4fc;
+}
+@media print {
+  code[class*="language-"],
+  pre[class*="language-"] {
+    text-shadow: none;
+  }
+}
+/* Code blocks */
+pre[class*="language-"] {
+  padding: 1em;
+  margin: 0.5em 0;
+  overflow: auto;
+}
+:not(pre) > code[class*="language-"],
+pre[class*="language-"] {
+  background: #f5f2f0;
+}
+/* Inline code */
+:not(pre) > code[class*="language-"] {
+  padding: 0.1em;
+  border-radius: 0.3em;
+  white-space: normal;
+}
+.token.comment,
+.token.prolog,
+.token.doctype,
+.token.cdata {
+  color: slategray;
+}
+.token.punctuation {
+  color: #999;
+}
+.namespace {
+  opacity: 0.7;
+}
+.token.property,
+.token.tag,
+.token.boolean,
+.token.number,
+.token.constant,
+.token.symbol,
+.token.deleted {
+  color: #905;
+}
+.token.selector,
+.token.attr-name,
+.token.string,
+.token.char,
+.token.builtin,
+.token.inserted {
+  color: #690;
+}
+.token.operator,
+.token.entity,
+.token.url,
+.language-css .token.string,
+.style .token.string {
+  color: #9a6e3a;
+  background: hsla(0, 0%, 100%, 0.5);
+}
+.token.atrule,
+.token.attr-value,
+.token.keyword {
+  color: #07a;
+}
+.token.function,
+.token.class-name {
+  color: #DD4A68;
+}
+.token.regex,
+.token.important,
+.token.variable {
+  color: #e90;
+}
+.token.important,
+.token.bold {
+  font-weight: bold;
+}
+.token.italic {
+  font-style: italic;
+}
+.token.entity {
+  cursor: help;
+}
+/* stylelint-enable */
+.mce-content-body {
+  overflow-wrap: break-word;
+  word-wrap: break-word;
+}
+.mce-content-body .mce-visual-caret {
+  background-color: black;
+  background-color: currentColor;
+  position: absolute;
+}
+.mce-content-body .mce-visual-caret-hidden {
+  display: none;
+}
+.mce-content-body *[data-mce-caret] {
+  left: -1000px;
+  margin: 0;
+  padding: 0;
+  position: absolute;
+  right: auto;
+  top: 0;
+}
+.mce-content-body .mce-offscreen-selection {
+  left: -2000000px;
+  max-width: 1000000px;
+  position: absolute;
+}
+.mce-content-body *[contentEditable=false] {
+  cursor: default;
+}
+.mce-content-body *[contentEditable=true] {
+  cursor: text;
+}
+.tox-cursor-format-painter {
+  cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
+}
+.mce-content-body figure.align-left {
+  float: left;
+}
+.mce-content-body figure.align-right {
+  float: right;
+}
+.mce-content-body figure.image.align-center {
+  display: table;
+  margin-left: auto;
+  margin-right: auto;
+}
+.mce-preview-object {
+  border: 1px solid gray;
+  display: inline-block;
+  line-height: 0;
+  margin: 0 2px 0 2px;
+  position: relative;
+}
+.mce-preview-object .mce-shim {
+  background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
+  height: 100%;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.mce-preview-object[data-mce-selected="2"] .mce-shim {
+  display: none;
+}
+.mce-object {
+  background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
+  border: 1px dashed #aaa;
+}
+.mce-pagebreak {
+  border: 1px dashed #aaa;
+  cursor: default;
+  display: block;
+  height: 5px;
+  margin-top: 15px;
+  page-break-before: always;
+  width: 100%;
+}
+@media print {
+  .mce-pagebreak {
+    border: 0;
+  }
+}
+.tiny-pageembed .mce-shim {
+  background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
+  height: 100%;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.tiny-pageembed[data-mce-selected="2"] .mce-shim {
+  display: none;
+}
+.tiny-pageembed {
+  display: inline-block;
+  position: relative;
+}
+.tiny-pageembed--21by9,
+.tiny-pageembed--16by9,
+.tiny-pageembed--4by3,
+.tiny-pageembed--1by1 {
+  display: block;
+  overflow: hidden;
+  padding: 0;
+  position: relative;
+  width: 100%;
+}
+.tiny-pageembed--21by9 {
+  padding-top: 42.857143%;
+}
+.tiny-pageembed--16by9 {
+  padding-top: 56.25%;
+}
+.tiny-pageembed--4by3 {
+  padding-top: 75%;
+}
+.tiny-pageembed--1by1 {
+  padding-top: 100%;
+}
+.tiny-pageembed--21by9 iframe,
+.tiny-pageembed--16by9 iframe,
+.tiny-pageembed--4by3 iframe,
+.tiny-pageembed--1by1 iframe {
+  border: 0;
+  height: 100%;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.mce-content-body[data-mce-placeholder] {
+  position: relative;
+}
+.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {
+  color: rgba(34, 47, 62, 0.7);
+  content: attr(data-mce-placeholder);
+  position: absolute;
+}
+.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before {
+  left: 1px;
+}
+.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before {
+  right: 1px;
+}
+.mce-content-body div.mce-resizehandle {
+  background-color: #4099ff;
+  border-color: #4099ff;
+  border-style: solid;
+  border-width: 1px;
+  box-sizing: border-box;
+  height: 10px;
+  position: absolute;
+  width: 10px;
+  z-index: 10000;
+}
+.mce-content-body div.mce-resizehandle:hover {
+  background-color: #4099ff;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(1) {
+  cursor: nwse-resize;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(2) {
+  cursor: nesw-resize;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(3) {
+  cursor: nwse-resize;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(4) {
+  cursor: nesw-resize;
+}
+.mce-content-body .mce-clonedresizable {
+  opacity: 0.5;
+  outline: 1px dashed black;
+  position: absolute;
+  z-index: 10000;
+}
+.mce-content-body .mce-resize-helper {
+  background: #555;
+  background: rgba(0, 0, 0, 0.75);
+  border: 1px;
+  border-radius: 3px;
+  color: white;
+  display: none;
+  font-family: sans-serif;
+  font-size: 12px;
+  line-height: 14px;
+  margin: 5px 10px;
+  padding: 5px;
+  position: absolute;
+  white-space: nowrap;
+  z-index: 10001;
+}
+.tox-rtc-user-selection {
+  position: relative;
+}
+.tox-rtc-user-cursor {
+  bottom: 0;
+  cursor: default;
+  position: absolute;
+  top: 0;
+  width: 2px;
+}
+.tox-rtc-user-cursor::before {
+  background-color: inherit;
+  border-radius: 50%;
+  content: '';
+  display: block;
+  height: 8px;
+  position: absolute;
+  right: -3px;
+  top: -3px;
+  width: 8px;
+}
+.tox-rtc-user-cursor:hover::after {
+  background-color: inherit;
+  border-radius: 100px;
+  box-sizing: border-box;
+  color: #fff;
+  content: attr(data-user);
+  display: block;
+  font-size: 12px;
+  font-weight: bold;
+  left: -5px;
+  min-height: 8px;
+  min-width: 8px;
+  padding: 0 12px;
+  position: absolute;
+  top: -11px;
+  white-space: nowrap;
+  z-index: 1000;
+}
+.tox-rtc-user-selection--1 .tox-rtc-user-cursor {
+  background-color: #2dc26b;
+}
+.tox-rtc-user-selection--2 .tox-rtc-user-cursor {
+  background-color: #e03e2d;
+}
+.tox-rtc-user-selection--3 .tox-rtc-user-cursor {
+  background-color: #f1c40f;
+}
+.tox-rtc-user-selection--4 .tox-rtc-user-cursor {
+  background-color: #3598db;
+}
+.tox-rtc-user-selection--5 .tox-rtc-user-cursor {
+  background-color: #b96ad9;
+}
+.tox-rtc-user-selection--6 .tox-rtc-user-cursor {
+  background-color: #e67e23;
+}
+.tox-rtc-user-selection--7 .tox-rtc-user-cursor {
+  background-color: #aaa69d;
+}
+.tox-rtc-user-selection--8 .tox-rtc-user-cursor {
+  background-color: #f368e0;
+}
+.tox-rtc-remote-image {
+  background: #eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center;
+  border: 1px solid #ccc;
+  min-height: 240px;
+  min-width: 320px;
+}
+.mce-match-marker {
+  background: #aaa;
+  color: #fff;
+}
+.mce-match-marker-selected {
+  background: #39f;
+  color: #fff;
+}
+.mce-match-marker-selected::-moz-selection {
+  background: #39f;
+  color: #fff;
+}
+.mce-match-marker-selected::selection {
+  background: #39f;
+  color: #fff;
+}
+.mce-content-body img[data-mce-selected],
+.mce-content-body table[data-mce-selected] {
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body hr[data-mce-selected] {
+  outline: 3px solid #b4d7ff;
+  outline-offset: 1px;
+}
+.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus {
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover {
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body *[contentEditable=false][data-mce-selected] {
+  cursor: not-allowed;
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,
+.mce-content-body.mce-content-readonly *[contentEditable=true]:hover {
+  outline: none;
+}
+.mce-content-body *[data-mce-selected="inline-boundary"] {
+  background-color: #b4d7ff;
+}
+.mce-content-body .mce-edit-focus {
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body td[data-mce-selected],
+.mce-content-body th[data-mce-selected] {
+  background-color: #b4d7ff !important;
+}
+.mce-content-body td[data-mce-selected]::-moz-selection,
+.mce-content-body th[data-mce-selected]::-moz-selection {
+  background: none;
+}
+.mce-content-body td[data-mce-selected]::selection,
+.mce-content-body th[data-mce-selected]::selection {
+  background: none;
+}
+.mce-content-body td[data-mce-selected] *,
+.mce-content-body th[data-mce-selected] * {
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+}
+.mce-content-body img::-moz-selection {
+  background: none;
+}
+.mce-content-body img::selection {
+  background: none;
+}
+.ephox-snooker-resizer-bar {
+  background-color: #b4d7ff;
+  opacity: 0;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+.ephox-snooker-resizer-cols {
+  cursor: col-resize;
+}
+.ephox-snooker-resizer-rows {
+  cursor: row-resize;
+}
+.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging {
+  opacity: 1;
+}
+.mce-spellchecker-word {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");
+  background-position: 0 calc(100% + 1px);
+  background-repeat: repeat-x;
+  background-size: auto 6px;
+  cursor: default;
+  height: 2rem;
+}
+.mce-spellchecker-grammar {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");
+  background-position: 0 calc(100% + 1px);
+  background-repeat: repeat-x;
+  background-size: auto 6px;
+  cursor: default;
+}
+.mce-toc {
+  border: 1px solid gray;
+}
+.mce-toc h2 {
+  margin: 4px;
+}
+.mce-toc li {
+  list-style-type: none;
+}
+.mce-item-table,
+.mce-item-table td,
+.mce-item-table th,
+.mce-item-table caption {
+  border: 1px dashed #bbb;
+}
+.mce-visualblocks p,
+.mce-visualblocks h1,
+.mce-visualblocks h2,
+.mce-visualblocks h3,
+.mce-visualblocks h4,
+.mce-visualblocks h5,
+.mce-visualblocks h6,
+.mce-visualblocks div:not([data-mce-bogus]),
+.mce-visualblocks section,
+.mce-visualblocks article,
+.mce-visualblocks blockquote,
+.mce-visualblocks address,
+.mce-visualblocks pre,
+.mce-visualblocks figure,
+.mce-visualblocks figcaption,
+.mce-visualblocks hgroup,
+.mce-visualblocks aside,
+.mce-visualblocks ul,
+.mce-visualblocks ol,
+.mce-visualblocks dl {
+  background-repeat: no-repeat;
+  border: 1px dashed #bbb;
+  margin-left: 3px;
+  padding-top: 10px;
+}
+.mce-visualblocks p {
+  background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);
+}
+.mce-visualblocks h1 {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);
+}
+.mce-visualblocks h2 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);
+}
+.mce-visualblocks h3 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);
+}
+.mce-visualblocks h4 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);
+}
+.mce-visualblocks h5 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);
+}
+.mce-visualblocks h6 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);
+}
+.mce-visualblocks div:not([data-mce-bogus]) {
+  background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);
+}
+.mce-visualblocks section {
+  background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);
+}
+.mce-visualblocks article {
+  background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);
+}
+.mce-visualblocks blockquote {
+  background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);
+}
+.mce-visualblocks address {
+  background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);
+}
+.mce-visualblocks pre {
+  background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);
+}
+.mce-visualblocks figure {
+  background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);
+}
+.mce-visualblocks figcaption {
+  border: 1px dashed #bbb;
+}
+.mce-visualblocks hgroup {
+  background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);
+}
+.mce-visualblocks aside {
+  background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);
+}
+.mce-visualblocks ul {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==);
+}
+.mce-visualblocks ol {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);
+}
+.mce-visualblocks dl {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);
+}
+.mce-visualblocks:not([dir=rtl]) p,
+.mce-visualblocks:not([dir=rtl]) h1,
+.mce-visualblocks:not([dir=rtl]) h2,
+.mce-visualblocks:not([dir=rtl]) h3,
+.mce-visualblocks:not([dir=rtl]) h4,
+.mce-visualblocks:not([dir=rtl]) h5,
+.mce-visualblocks:not([dir=rtl]) h6,
+.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),
+.mce-visualblocks:not([dir=rtl]) section,
+.mce-visualblocks:not([dir=rtl]) article,
+.mce-visualblocks:not([dir=rtl]) blockquote,
+.mce-visualblocks:not([dir=rtl]) address,
+.mce-visualblocks:not([dir=rtl]) pre,
+.mce-visualblocks:not([dir=rtl]) figure,
+.mce-visualblocks:not([dir=rtl]) figcaption,
+.mce-visualblocks:not([dir=rtl]) hgroup,
+.mce-visualblocks:not([dir=rtl]) aside,
+.mce-visualblocks:not([dir=rtl]) ul,
+.mce-visualblocks:not([dir=rtl]) ol,
+.mce-visualblocks:not([dir=rtl]) dl {
+  margin-left: 3px;
+}
+.mce-visualblocks[dir=rtl] p,
+.mce-visualblocks[dir=rtl] h1,
+.mce-visualblocks[dir=rtl] h2,
+.mce-visualblocks[dir=rtl] h3,
+.mce-visualblocks[dir=rtl] h4,
+.mce-visualblocks[dir=rtl] h5,
+.mce-visualblocks[dir=rtl] h6,
+.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),
+.mce-visualblocks[dir=rtl] section,
+.mce-visualblocks[dir=rtl] article,
+.mce-visualblocks[dir=rtl] blockquote,
+.mce-visualblocks[dir=rtl] address,
+.mce-visualblocks[dir=rtl] pre,
+.mce-visualblocks[dir=rtl] figure,
+.mce-visualblocks[dir=rtl] figcaption,
+.mce-visualblocks[dir=rtl] hgroup,
+.mce-visualblocks[dir=rtl] aside,
+.mce-visualblocks[dir=rtl] ul,
+.mce-visualblocks[dir=rtl] ol,
+.mce-visualblocks[dir=rtl] dl {
+  background-position-x: right;
+  margin-right: 3px;
+}
+.mce-nbsp,
+.mce-shy {
+  background: #aaa;
+}
+.mce-shy::after {
+  content: '-';
+}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide-dark/content.inline.min.css
@@ -1,1 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.mce-content-body .mce-item-anchor{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;cursor:default;display:inline-block;height:12px!important;padding:0 2px;-webkit-user-modify:read-only;-moz-user-modify:read-only;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;width:8px!important}.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset:1px}.tox-comments-visible .tox-comment{background-color:#fff0b7}.tox-comments-visible .tox-comment--active{background-color:#ffe168}.tox-checklist>li:not(.tox-checklist--hidden){list-style:none;margin:.25em 0}.tox-checklist>li:not(.tox-checklist--hidden)::before{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");background-size:100%;content:'';cursor:pointer;height:1em;margin-left:-1.5em;margin-top:.125em;position:absolute;width:1em}.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A")}[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-left:0;margin-right:-1.5em}code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.mce-content-body{overflow-wrap:break-word;word-wrap:break-word}.mce-content-body .mce-visual-caret{background-color:#000;background-color:currentColor;position:absolute}.mce-content-body .mce-visual-caret-hidden{display:none}.mce-content-body [data-mce-caret]{left:-1000px;margin:0;padding:0;position:absolute;right:auto;top:0}.mce-content-body .mce-offscreen-selection{left:-2000000px;max-width:1000000px;position:absolute}.mce-content-body [contentEditable=false]{cursor:default}.mce-content-body [contentEditable=true]{cursor:text}.tox-cursor-format-painter{cursor:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default}.mce-content-body figure.align-left{float:left}.mce-content-body figure.align-right{float:right}.mce-content-body figure.image.align-center{display:table;margin-left:auto;margin-right:auto}.mce-preview-object{border:1px solid gray;display:inline-block;line-height:0;margin:0 2px 0 2px;position:relative}.mce-preview-object .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-object{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;border:1px dashed #aaa}.mce-pagebreak{border:1px dashed #aaa;cursor:default;display:block;height:5px;margin-top:15px;page-break-before:always;width:100%}@media print{.mce-pagebreak{border:0}}.tiny-pageembed .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.tiny-pageembed[data-mce-selected="2"] .mce-shim{display:none}.tiny-pageembed{display:inline-block;position:relative}.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{display:block;overflow:hidden;padding:0;position:relative;width:100%}.tiny-pageembed--21by9{padding-top:42.857143%}.tiny-pageembed--16by9{padding-top:56.25%}.tiny-pageembed--4by3{padding-top:75%}.tiny-pageembed--1by1{padding-top:100%}.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.mce-content-body[data-mce-placeholder]{position:relative}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before{color:rgba(34,47,62,.7);content:attr(data-mce-placeholder);position:absolute}.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before{left:1px}.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before{right:1px}.mce-content-body div.mce-resizehandle{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;height:10px;position:absolute;width:10px;z-index:10000}.mce-content-body div.mce-resizehandle:hover{background-color:#4099ff}.mce-content-body div.mce-resizehandle:nth-of-type(1){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor:nesw-resize}.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor:nesw-resize}.mce-content-body .mce-clonedresizable{opacity:.5;outline:1px dashed #000;position:absolute;z-index:10000}.mce-content-body .mce-resize-helper{background:#555;background:rgba(0,0,0,.75);border:1px;border-radius:3px;color:#fff;display:none;font-family:sans-serif;font-size:12px;line-height:14px;margin:5px 10px;padding:5px;position:absolute;white-space:nowrap;z-index:10001}.tox-rtc-user-selection{position:relative}.tox-rtc-user-cursor{bottom:0;cursor:default;position:absolute;top:0;width:2px}.tox-rtc-user-cursor::before{background-color:inherit;border-radius:50%;content:'';display:block;height:8px;position:absolute;right:-3px;top:-3px;width:8px}.tox-rtc-user-cursor:hover::after{background-color:inherit;border-radius:100px;box-sizing:border-box;color:#fff;content:attr(data-user);display:block;font-size:12px;font-weight:700;left:-5px;min-height:8px;min-width:8px;padding:0 12px;position:absolute;top:-11px;white-space:nowrap;z-index:1000}.tox-rtc-user-selection--1 .tox-rtc-user-cursor{background-color:#2dc26b}.tox-rtc-user-selection--2 .tox-rtc-user-cursor{background-color:#e03e2d}.tox-rtc-user-selection--3 .tox-rtc-user-cursor{background-color:#f1c40f}.tox-rtc-user-selection--4 .tox-rtc-user-cursor{background-color:#3598db}.tox-rtc-user-selection--5 .tox-rtc-user-cursor{background-color:#b96ad9}.tox-rtc-user-selection--6 .tox-rtc-user-cursor{background-color:#e67e23}.tox-rtc-user-selection--7 .tox-rtc-user-cursor{background-color:#aaa69d}.tox-rtc-user-selection--8 .tox-rtc-user-cursor{background-color:#f368e0}.tox-rtc-remote-image{background:#eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center;border:1px solid #ccc;min-height:240px;min-width:320px}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-match-marker-selected::-moz-selection{background:#39f;color:#fff}.mce-match-marker-selected::selection{background:#39f;color:#fff}.mce-content-body img[data-mce-selected],.mce-content-body table[data-mce-selected]{outline:3px solid #b4d7ff}.mce-content-body hr[data-mce-selected]{outline:3px solid #b4d7ff;outline-offset:1px}.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false][data-mce-selected]{cursor:not-allowed;outline:3px solid #b4d7ff}.mce-content-body.mce-content-readonly [contentEditable=true]:focus,.mce-content-body.mce-content-readonly [contentEditable=true]:hover{outline:0}.mce-content-body [data-mce-selected=inline-boundary]{background-color:#b4d7ff}.mce-content-body .mce-edit-focus{outline:3px solid #b4d7ff}.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{background-color:#b4d7ff!important}.mce-content-body td[data-mce-selected]::-moz-selection,.mce-content-body th[data-mce-selected]::-moz-selection{background:0 0}.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background:0 0}.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mce-content-body img::-moz-selection{background:0 0}.mce-content-body img::selection{background:0 0}.ephox-snooker-resizer-bar{background-color:#b4d7ff;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:1}.mce-spellchecker-word{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default;height:2rem}.mce-spellchecker-grammar{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-item-table,.mce-item-table caption,.mce-item-table td,.mce-item-table th{border:1px dashed #bbb}.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{background-repeat:no-repeat;border:1px dashed #bbb;margin-left:3px;padding-top:10px}.mce-visualblocks p{background-image:url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)}.mce-visualblocks h1{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)}.mce-visualblocks h2{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)}.mce-visualblocks h3{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)}.mce-visualblocks h4{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)}.mce-visualblocks h5{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)}.mce-visualblocks h6{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)}.mce-visualblocks div:not([data-mce-bogus]){background-image:url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)}.mce-visualblocks section{background-image:url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)}.mce-visualblocks article{background-image:url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)}.mce-visualblocks blockquote{background-image:url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)}.mce-visualblocks address{background-image:url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=)}.mce-visualblocks pre{background-image:url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)}.mce-visualblocks figure{background-image:url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7)}.mce-visualblocks figcaption{border:1px dashed #bbb}.mce-visualblocks hgroup{background-image:url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)}.mce-visualblocks aside{background-image:url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)}.mce-visualblocks ul{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)}.mce-visualblocks ol{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==)}.mce-visualblocks dl{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==)}.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left:3px}.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x:right;margin-right:3px}.mce-nbsp,.mce-shy{background:#aaa}.mce-shy::after{content:'-'}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide-dark/content.min.css
@@ -1,1 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.mce-content-body .mce-item-anchor{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%20fill%3D%22%23cccccc%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;cursor:default;display:inline-block;height:12px!important;padding:0 2px;-webkit-user-modify:read-only;-moz-user-modify:read-only;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;width:8px!important}.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset:1px}.tox-comments-visible .tox-comment{background-color:#fff0b7}.tox-comments-visible .tox-comment--active{background-color:#ffe168}.tox-checklist>li:not(.tox-checklist--hidden){list-style:none;margin:.25em 0}.tox-checklist>li:not(.tox-checklist--hidden)::before{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%236d737b%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");background-size:100%;content:'';cursor:pointer;height:1em;margin-left:-1.5em;margin-top:.125em;position:absolute;width:1em}.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A")}[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-left:0;margin-right:-1.5em}code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#282a36}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#6272a4}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#ff79c6}.token.boolean,.token.number{color:#bd93f9}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#50fa7b}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#f1fa8c}.token.keyword{color:#8be9fd}.token.important,.token.regex{color:#ffb86c}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.mce-content-body{overflow-wrap:break-word;word-wrap:break-word}.mce-content-body .mce-visual-caret{background-color:#000;background-color:currentColor;position:absolute}.mce-content-body .mce-visual-caret-hidden{display:none}.mce-content-body [data-mce-caret]{left:-1000px;margin:0;padding:0;position:absolute;right:auto;top:0}.mce-content-body .mce-offscreen-selection{left:-2000000px;max-width:1000000px;position:absolute}.mce-content-body [contentEditable=false]{cursor:default}.mce-content-body [contentEditable=true]{cursor:text}.tox-cursor-format-painter{cursor:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default}.mce-content-body figure.align-left{float:left}.mce-content-body figure.align-right{float:right}.mce-content-body figure.image.align-center{display:table;margin-left:auto;margin-right:auto}.mce-preview-object{border:1px solid gray;display:inline-block;line-height:0;margin:0 2px 0 2px;position:relative}.mce-preview-object .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-object{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%20fill%3D%22%23cccccc%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;border:1px dashed #aaa}.mce-pagebreak{border:1px dashed #aaa;cursor:default;display:block;height:5px;margin-top:15px;page-break-before:always;width:100%}@media print{.mce-pagebreak{border:0}}.tiny-pageembed .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.tiny-pageembed[data-mce-selected="2"] .mce-shim{display:none}.tiny-pageembed{display:inline-block;position:relative}.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{display:block;overflow:hidden;padding:0;position:relative;width:100%}.tiny-pageembed--21by9{padding-top:42.857143%}.tiny-pageembed--16by9{padding-top:56.25%}.tiny-pageembed--4by3{padding-top:75%}.tiny-pageembed--1by1{padding-top:100%}.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.mce-content-body[data-mce-placeholder]{position:relative}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before{color:rgba(34,47,62,.7);content:attr(data-mce-placeholder);position:absolute}.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before{left:1px}.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before{right:1px}.mce-content-body div.mce-resizehandle{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;height:10px;position:absolute;width:10px;z-index:10000}.mce-content-body div.mce-resizehandle:hover{background-color:#4099ff}.mce-content-body div.mce-resizehandle:nth-of-type(1){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor:nesw-resize}.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor:nesw-resize}.mce-content-body .mce-clonedresizable{opacity:.5;outline:1px dashed #000;position:absolute;z-index:10000}.mce-content-body .mce-resize-helper{background:#555;background:rgba(0,0,0,.75);border:1px;border-radius:3px;color:#fff;display:none;font-family:sans-serif;font-size:12px;line-height:14px;margin:5px 10px;padding:5px;position:absolute;white-space:nowrap;z-index:10001}.tox-rtc-user-selection{position:relative}.tox-rtc-user-cursor{bottom:0;cursor:default;position:absolute;top:0;width:2px}.tox-rtc-user-cursor::before{background-color:inherit;border-radius:50%;content:'';display:block;height:8px;position:absolute;right:-3px;top:-3px;width:8px}.tox-rtc-user-cursor:hover::after{background-color:inherit;border-radius:100px;box-sizing:border-box;color:#fff;content:attr(data-user);display:block;font-size:12px;font-weight:700;left:-5px;min-height:8px;min-width:8px;padding:0 12px;position:absolute;top:-11px;white-space:nowrap;z-index:1000}.tox-rtc-user-selection--1 .tox-rtc-user-cursor{background-color:#2dc26b}.tox-rtc-user-selection--2 .tox-rtc-user-cursor{background-color:#e03e2d}.tox-rtc-user-selection--3 .tox-rtc-user-cursor{background-color:#f1c40f}.tox-rtc-user-selection--4 .tox-rtc-user-cursor{background-color:#3598db}.tox-rtc-user-selection--5 .tox-rtc-user-cursor{background-color:#b96ad9}.tox-rtc-user-selection--6 .tox-rtc-user-cursor{background-color:#e67e23}.tox-rtc-user-selection--7 .tox-rtc-user-cursor{background-color:#aaa69d}.tox-rtc-user-selection--8 .tox-rtc-user-cursor{background-color:#f368e0}.tox-rtc-remote-image{background:#eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center;border:1px solid #ccc;min-height:240px;min-width:320px}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-match-marker-selected::-moz-selection{background:#39f;color:#fff}.mce-match-marker-selected::selection{background:#39f;color:#fff}.mce-content-body img[data-mce-selected],.mce-content-body table[data-mce-selected]{outline:3px solid #4099ff}.mce-content-body hr[data-mce-selected]{outline:3px solid #4099ff;outline-offset:1px}.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline:3px solid #4099ff}.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline:3px solid #4099ff}.mce-content-body [contentEditable=false][data-mce-selected]{cursor:not-allowed;outline:3px solid #4099ff}.mce-content-body.mce-content-readonly [contentEditable=true]:focus,.mce-content-body.mce-content-readonly [contentEditable=true]:hover{outline:0}.mce-content-body [data-mce-selected=inline-boundary]{background-color:#4099ff}.mce-content-body .mce-edit-focus{outline:3px solid #4099ff}.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{background-color:#b4d7ff!important}.mce-content-body td[data-mce-selected]::-moz-selection,.mce-content-body th[data-mce-selected]::-moz-selection{background:0 0}.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background:0 0}.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mce-content-body img::-moz-selection{background:0 0}.mce-content-body img::selection{background:0 0}.ephox-snooker-resizer-bar{background-color:#4099ff;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:1}.mce-spellchecker-word{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default;height:2rem}.mce-spellchecker-grammar{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-item-table,.mce-item-table caption,.mce-item-table td,.mce-item-table th{border:1px dashed #bbb}.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{background-repeat:no-repeat;border:1px dashed #bbb;margin-left:3px;padding-top:10px}.mce-visualblocks p{background-image:url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)}.mce-visualblocks h1{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)}.mce-visualblocks h2{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)}.mce-visualblocks h3{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)}.mce-visualblocks h4{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)}.mce-visualblocks h5{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)}.mce-visualblocks h6{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)}.mce-visualblocks div:not([data-mce-bogus]){background-image:url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)}.mce-visualblocks section{background-image:url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)}.mce-visualblocks article{background-image:url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)}.mce-visualblocks blockquote{background-image:url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)}.mce-visualblocks address{background-image:url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=)}.mce-visualblocks pre{background-image:url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)}.mce-visualblocks figure{background-image:url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7)}.mce-visualblocks figcaption{border:1px dashed #bbb}.mce-visualblocks hgroup{background-image:url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)}.mce-visualblocks aside{background-image:url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)}.mce-visualblocks ul{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)}.mce-visualblocks ol{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==)}.mce-visualblocks dl{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==)}.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left:3px}.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x:right;margin-right:3px}.mce-nbsp,.mce-shy{background:#aaa}.mce-shy::after{content:'-'}body{font-family:sans-serif}table{border-collapse:collapse}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide-dark/content.mobile.css
@@ -1,1 +1,30 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection {
+  /* Note: this file is used inside the content, so isn't part of theming */
+  background-color: green;
+  display: inline-block;
+  opacity: 0.5;
+  position: absolute;
+}
+body {
+  -webkit-text-size-adjust: none;
+}
+body img {
+  /* this is related to the content margin */
+  max-width: 96vw;
+}
+body table img {
+  max-width: 95%;
+}
+body {
+  font-family: sans-serif;
+}
+table {
+  border-collapse: collapse;
+}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide-dark/content.mobile.min.css
@@ -1,1 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{background-color:green;display:inline-block;opacity:.5;position:absolute}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}body{font-family:sans-serif}table{border-collapse:collapse}
 

 Binary files /dev/null and b/tinymce/5/js/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff differ
--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide-dark/skin.css
@@ -1,1 +1,2898 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.tox {
+  box-sizing: content-box;
+  color: #2A3746;
+  cursor: auto;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+  font-size: 16px;
+  font-style: normal;
+  font-weight: normal;
+  line-height: normal;
+  -webkit-tap-highlight-color: transparent;
+  text-decoration: none;
+  text-shadow: none;
+  text-transform: none;
+  vertical-align: initial;
+  white-space: normal;
+}
+.tox *:not(svg):not(rect) {
+  box-sizing: inherit;
+  color: inherit;
+  cursor: inherit;
+  direction: inherit;
+  font-family: inherit;
+  font-size: inherit;
+  font-style: inherit;
+  font-weight: inherit;
+  line-height: inherit;
+  -webkit-tap-highlight-color: inherit;
+  text-align: inherit;
+  text-decoration: inherit;
+  text-shadow: inherit;
+  text-transform: inherit;
+  vertical-align: inherit;
+  white-space: inherit;
+}
+.tox *:not(svg):not(rect) {
+  /* stylelint-disable-line no-duplicate-selectors */
+  background: transparent;
+  border: 0;
+  float: none;
+  height: auto;
+  margin: 0;
+  max-width: none;
+  outline: 0;
+  padding: 0;
+  position: static;
+  width: auto;
+}
+.tox:not([dir=rtl]) {
+  direction: ltr;
+  text-align: left;
+}
+.tox[dir=rtl] {
+  direction: rtl;
+  text-align: right;
+}
+.tox-tinymce {
+  border: 1px solid #000000;
+  border-radius: 0;
+  box-shadow: none;
+  box-sizing: border-box;
+  display: flex;
+  flex-direction: column;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+  overflow: hidden;
+  position: relative;
+  visibility: inherit !important;
+}
+.tox-tinymce-inline {
+  border: none;
+  box-shadow: none;
+}
+.tox-tinymce-inline .tox-editor-header {
+  border: 1px solid #000000;
+  border-radius: 0;
+  box-shadow: none;
+}
+.tox-tinymce-aux {
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+  z-index: 1300;
+}
+.tox-tinymce *:focus,
+.tox-tinymce-aux *:focus {
+  outline: none;
+}
+button::-moz-focus-inner {
+  border: 0;
+}
+.tox .accessibility-issue__header {
+  align-items: center;
+  display: flex;
+  margin-bottom: 4px;
+}
+.tox .accessibility-issue__description {
+  align-items: stretch;
+  border: 1px solid #000000;
+  border-radius: 3px;
+  display: flex;
+  justify-content: space-between;
+}
+.tox .accessibility-issue__description > div {
+  padding-bottom: 4px;
+}
+.tox .accessibility-issue__description > div > div {
+  align-items: center;
+  display: flex;
+  margin-bottom: 4px;
+}
+.tox .accessibility-issue__description > *:last-child:not(:only-child) {
+  border-color: #000000;
+  border-style: solid;
+}
+.tox .accessibility-issue__repair {
+  margin-top: 16px;
+}
+.tox .accessibility-issue--info .accessibility-issue__description {
+  background-color: rgba(32, 122, 183, 0.5);
+  border-color: #207ab7;
+  color: #fff;
+}
+.tox .accessibility-issue--info .accessibility-issue__description > *:last-child {
+  border-color: #207ab7;
+}
+.tox .accessibility-issue--info h2 {
+  color: #fff;
+}
+.tox .accessibility-issue--info .tox-icon svg {
+  fill: #fff;
+}
+.tox .accessibility-issue--info a .tox-icon {
+  color: #fff;
+}
+.tox .accessibility-issue--warn .accessibility-issue__description {
+  background-color: rgba(255, 165, 0, 0.5);
+  border-color: rgba(255, 165, 0, 0.8);
+  color: #fff;
+}
+.tox .accessibility-issue--warn .accessibility-issue__description > *:last-child {
+  border-color: rgba(255, 165, 0, 0.8);
+}
+.tox .accessibility-issue--warn h2 {
+  color: #fff;
+}
+.tox .accessibility-issue--warn .tox-icon svg {
+  fill: #fff;
+}
+.tox .accessibility-issue--warn a .tox-icon {
+  color: #fff;
+}
+.tox .accessibility-issue--error .accessibility-issue__description {
+  background-color: rgba(204, 0, 0, 0.5);
+  border-color: rgba(204, 0, 0, 0.8);
+  color: #fff;
+}
+.tox .accessibility-issue--error .accessibility-issue__description > *:last-child {
+  border-color: rgba(204, 0, 0, 0.8);
+}
+.tox .accessibility-issue--error h2 {
+  color: #fff;
+}
+.tox .accessibility-issue--error .tox-icon svg {
+  fill: #fff;
+}
+.tox .accessibility-issue--error a .tox-icon {
+  color: #fff;
+}
+.tox .accessibility-issue--success .accessibility-issue__description {
+  background-color: rgba(120, 171, 70, 0.5);
+  border-color: rgba(120, 171, 70, 0.8);
+  color: #fff;
+}
+.tox .accessibility-issue--success .accessibility-issue__description > *:last-child {
+  border-color: rgba(120, 171, 70, 0.8);
+}
+.tox .accessibility-issue--success h2 {
+  color: #fff;
+}
+.tox .accessibility-issue--success .tox-icon svg {
+  fill: #fff;
+}
+.tox .accessibility-issue--success a .tox-icon {
+  color: #fff;
+}
+.tox .tox-dialog__body-content .accessibility-issue__header h1,
+.tox .tox-dialog__body-content .tox-form__group .accessibility-issue__description h2 {
+  margin-top: 0;
+}
+.tox:not([dir=rtl]) .accessibility-issue__header .tox-button {
+  margin-left: 4px;
+}
+.tox:not([dir=rtl]) .accessibility-issue__header > *:nth-last-child(2) {
+  margin-left: auto;
+}
+.tox:not([dir=rtl]) .accessibility-issue__description {
+  padding: 4px 4px 4px 8px;
+}
+.tox:not([dir=rtl]) .accessibility-issue__description > *:last-child {
+  border-left-width: 1px;
+  padding-left: 4px;
+}
+.tox[dir=rtl] .accessibility-issue__header .tox-button {
+  margin-right: 4px;
+}
+.tox[dir=rtl] .accessibility-issue__header > *:nth-last-child(2) {
+  margin-right: auto;
+}
+.tox[dir=rtl] .accessibility-issue__description {
+  padding: 4px 8px 4px 4px;
+}
+.tox[dir=rtl] .accessibility-issue__description > *:last-child {
+  border-right-width: 1px;
+  padding-right: 4px;
+}
+.tox .tox-anchorbar {
+  display: flex;
+  flex: 0 0 auto;
+}
+.tox .tox-bar {
+  display: flex;
+  flex: 0 0 auto;
+}
+.tox .tox-button {
+  background-color: #207ab7;
+  background-image: none;
+  background-position: 0 0;
+  background-repeat: repeat;
+  border-color: #207ab7;
+  border-radius: 3px;
+  border-style: solid;
+  border-width: 1px;
+  box-shadow: none;
+  box-sizing: border-box;
+  color: #fff;
+  cursor: pointer;
+  display: inline-block;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+  font-size: 14px;
+  font-weight: bold;
+  letter-spacing: normal;
+  line-height: 24px;
+  margin: 0;
+  outline: none;
+  padding: 4px 16px;
+  text-align: center;
+  text-decoration: none;
+  text-transform: capitalize;
+  white-space: nowrap;
+}
+.tox .tox-button[disabled] {
+  background-color: #207ab7;
+  background-image: none;
+  border-color: #207ab7;
+  box-shadow: none;
+  color: rgba(255, 255, 255, 0.5);
+  cursor: not-allowed;
+}
+.tox .tox-button:focus:not(:disabled) {
+  background-color: #1c6ca1;
+  background-image: none;
+  border-color: #1c6ca1;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-button:hover:not(:disabled) {
+  background-color: #1c6ca1;
+  background-image: none;
+  border-color: #1c6ca1;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-button:active:not(:disabled) {
+  background-color: #185d8c;
+  background-image: none;
+  border-color: #185d8c;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-button--secondary {
+  background-color: #3d546f;
+  background-image: none;
+  background-position: 0 0;
+  background-repeat: repeat;
+  border-color: #3d546f;
+  border-radius: 3px;
+  border-style: solid;
+  border-width: 1px;
+  box-shadow: none;
+  color: #fff;
+  outline: none;
+  padding: 4px 16px;
+  text-decoration: none;
+  text-transform: capitalize;
+}
+.tox .tox-button--secondary[disabled] {
+  background-color: #3d546f;
+  background-image: none;
+  border-color: #3d546f;
+  box-shadow: none;
+  color: rgba(255, 255, 255, 0.5);
+}
+.tox .tox-button--secondary:focus:not(:disabled) {
+  background-color: #34485f;
+  background-image: none;
+  border-color: #34485f;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-button--secondary:hover:not(:disabled) {
+  background-color: #34485f;
+  background-image: none;
+  border-color: #34485f;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-button--secondary:active:not(:disabled) {
+  background-color: #2b3b4e;
+  background-image: none;
+  border-color: #2b3b4e;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-button--icon,
+.tox .tox-button.tox-button--icon,
+.tox .tox-button.tox-button--secondary.tox-button--icon {
+  padding: 4px;
+}
+.tox .tox-button--icon .tox-icon svg,
+.tox .tox-button.tox-button--icon .tox-icon svg,
+.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg {
+  display: block;
+  fill: currentColor;
+}
+.tox .tox-button-link {
+  background: 0;
+  border: none;
+  box-sizing: border-box;
+  cursor: pointer;
+  display: inline-block;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+  font-size: 16px;
+  font-weight: normal;
+  line-height: 1.3;
+  margin: 0;
+  padding: 0;
+  white-space: nowrap;
+}
+.tox .tox-button-link--sm {
+  font-size: 14px;
+}
+.tox .tox-button--naked {
+  background-color: transparent;
+  border-color: transparent;
+  box-shadow: unset;
+  color: #fff;
+}
+.tox .tox-button--naked[disabled] {
+  background-color: #3d546f;
+  border-color: #3d546f;
+  box-shadow: none;
+  color: rgba(255, 255, 255, 0.5);
+}
+.tox .tox-button--naked:hover:not(:disabled) {
+  background-color: #34485f;
+  border-color: #34485f;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-button--naked:focus:not(:disabled) {
+  background-color: #34485f;
+  border-color: #34485f;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-button--naked:active:not(:disabled) {
+  background-color: #2b3b4e;
+  border-color: #2b3b4e;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-button--naked .tox-icon svg {
+  fill: currentColor;
+}
+.tox .tox-button--naked.tox-button--icon:hover:not(:disabled) {
+  color: #fff;
+}
+.tox .tox-checkbox {
+  align-items: center;
+  border-radius: 3px;
+  cursor: pointer;
+  display: flex;
+  height: 36px;
+  min-width: 36px;
+}
+.tox .tox-checkbox__input {
+  /* Hide from view but visible to screen readers */
+  height: 1px;
+  overflow: hidden;
+  position: absolute;
+  top: auto;
+  width: 1px;
+}
+.tox .tox-checkbox__icons {
+  align-items: center;
+  border-radius: 3px;
+  box-shadow: 0 0 0 2px transparent;
+  box-sizing: content-box;
+  display: flex;
+  height: 24px;
+  justify-content: center;
+  padding: calc(4px - 1px);
+  width: 24px;
+}
+.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg {
+  display: block;
+  fill: rgba(255, 255, 255, 0.2);
+}
+.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg {
+  display: none;
+  fill: #207ab7;
+}
+.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg {
+  display: none;
+  fill: #207ab7;
+}
+.tox .tox-checkbox--disabled {
+  color: rgba(255, 255, 255, 0.5);
+  cursor: not-allowed;
+}
+.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__checked svg {
+  fill: rgba(255, 255, 255, 0.5);
+}
+.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__unchecked svg {
+  fill: rgba(255, 255, 255, 0.5);
+}
+.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg {
+  fill: rgba(255, 255, 255, 0.5);
+}
+.tox input.tox-checkbox__input:checked + .tox-checkbox__icons .tox-checkbox-icon__unchecked svg {
+  display: none;
+}
+.tox input.tox-checkbox__input:checked + .tox-checkbox__icons .tox-checkbox-icon__checked svg {
+  display: block;
+}
+.tox input.tox-checkbox__input:indeterminate + .tox-checkbox__icons .tox-checkbox-icon__unchecked svg {
+  display: none;
+}
+.tox input.tox-checkbox__input:indeterminate + .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg {
+  display: block;
+}
+.tox input.tox-checkbox__input:focus + .tox-checkbox__icons {
+  border-radius: 3px;
+  box-shadow: inset 0 0 0 1px #207ab7;
+  padding: calc(4px - 1px);
+}
+.tox:not([dir=rtl]) .tox-checkbox__label {
+  margin-left: 4px;
+}
+.tox:not([dir=rtl]) .tox-checkbox__input {
+  left: -10000px;
+}
+.tox:not([dir=rtl]) .tox-bar .tox-checkbox {
+  margin-left: 4px;
+}
+.tox[dir=rtl] .tox-checkbox__label {
+  margin-right: 4px;
+}
+.tox[dir=rtl] .tox-checkbox__input {
+  right: -10000px;
+}
+.tox[dir=rtl] .tox-bar .tox-checkbox {
+  margin-right: 4px;
+}
+.tox {
+  /* stylelint-disable-next-line no-descending-specificity */
+}
+.tox .tox-collection--toolbar .tox-collection__group {
+  display: flex;
+  padding: 0;
+}
+.tox .tox-collection--grid .tox-collection__group {
+  display: flex;
+  flex-wrap: wrap;
+  max-height: 208px;
+  overflow-x: hidden;
+  overflow-y: auto;
+  padding: 0;
+}
+.tox .tox-collection--list .tox-collection__group {
+  border-bottom-width: 0;
+  border-color: #1a1a1a;
+  border-left-width: 0;
+  border-right-width: 0;
+  border-style: solid;
+  border-top-width: 1px;
+  padding: 4px 0;
+}
+.tox .tox-collection--list .tox-collection__group:first-child {
+  border-top-width: 0;
+}
+.tox .tox-collection__group-heading {
+  background-color: #333333;
+  color: #fff;
+  cursor: default;
+  font-size: 12px;
+  font-style: normal;
+  font-weight: normal;
+  margin-bottom: 4px;
+  margin-top: -4px;
+  padding: 4px 8px;
+  text-transform: none;
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+}
+.tox .tox-collection__item {
+  align-items: center;
+  color: #fff;
+  cursor: pointer;
+  display: flex;
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+}
+.tox .tox-collection--list .tox-collection__item {
+  padding: 4px 8px;
+}
+.tox .tox-collection--toolbar .tox-collection__item {
+  border-radius: 3px;
+  padding: 4px;
+}
+.tox .tox-collection--grid .tox-collection__item {
+  border-radius: 3px;
+  padding: 4px;
+}
+.tox .tox-collection--list .tox-collection__item--enabled {
+  background-color: #2b3b4e;
+  color: #fff;
+}
+.tox .tox-collection--list .tox-collection__item--active {
+  background-color: #4a5562;
+}
+.tox .tox-collection--toolbar .tox-collection__item--enabled {
+  background-color: #757d87;
+  color: #fff;
+}
+.tox .tox-collection--toolbar .tox-collection__item--active {
+  background-color: #4a5562;
+}
+.tox .tox-collection--grid .tox-collection__item--enabled {
+  background-color: #757d87;
+  color: #fff;
+}
+.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled) {
+  background-color: #4a5562;
+  color: #fff;
+}
+.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled) {
+  color: #fff;
+}
+.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled) {
+  color: #fff;
+}
+.tox .tox-collection__item--state-disabled {
+  background-color: transparent;
+  color: rgba(255, 255, 255, 0.5);
+  cursor: not-allowed;
+}
+.tox .tox-collection__item-icon,
+.tox .tox-collection__item-checkmark {
+  align-items: center;
+  display: flex;
+  height: 24px;
+  justify-content: center;
+  width: 24px;
+}
+.tox .tox-collection__item-icon svg,
+.tox .tox-collection__item-checkmark svg {
+  fill: currentColor;
+}
+.tox .tox-collection--toolbar-lg .tox-collection__item-icon {
+  height: 48px;
+  width: 48px;
+}
+.tox .tox-collection__item-label {
+  color: currentColor;
+  display: inline-block;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+  font-size: 14px;
+  font-style: normal;
+  font-weight: normal;
+  line-height: 24px;
+  text-transform: none;
+  word-break: break-all;
+}
+.tox .tox-collection__item-accessory {
+  color: rgba(255, 255, 255, 0.5);
+  display: inline-block;
+  font-size: 14px;
+  height: 24px;
+  line-height: 24px;
+  text-transform: none;
+}
+.tox .tox-collection__item-caret {
+  align-items: center;
+  display: flex;
+  min-height: 24px;
+}
+.tox .tox-collection__item-caret::after {
+  content: '';
+  font-size: 0;
+  min-height: inherit;
+}
+.tox .tox-collection__item-caret svg {
+  fill: #fff;
+}
+.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg {
+  display: none;
+}
+.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-accessory + .tox-collection__item-checkmark {
+  display: none;
+}
+.tox .tox-collection--horizontal {
+  background-color: #2b3b4e;
+  border: 1px solid #1a1a1a;
+  border-radius: 3px;
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
+  display: flex;
+  flex: 0 0 auto;
+  flex-shrink: 0;
+  flex-wrap: nowrap;
+  margin-bottom: 0;
+  overflow-x: auto;
+  padding: 0;
+}
+.tox .tox-collection--horizontal .tox-collection__group {
+  align-items: center;
+  display: flex;
+  flex-wrap: nowrap;
+  margin: 0;
+  padding: 0 4px;
+}
+.tox .tox-collection--horizontal .tox-collection__item {
+  height: 34px;
+  margin: 2px 0 3px 0;
+  padding: 0 4px;
+}
+.tox .tox-collection--horizontal .tox-collection__item-label {
+  white-space: nowrap;
+}
+.tox .tox-collection--horizontal .tox-collection__item-caret {
+  margin-left: 4px;
+}
+.tox:not([dir=rtl]) .tox-collection--horizontal .tox-collection__group:not(:last-of-type) {
+  border-right: 1px solid #000000;
+}
+.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item > *:not(:first-child) {
+  margin-left: 8px;
+}
+.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item-label:first-child {
+  margin-left: 4px;
+}
+.tox:not([dir=rtl]) .tox-collection__item-accessory {
+  margin-left: 16px;
+  text-align: right;
+}
+.tox:not([dir=rtl]) .tox-collection .tox-collection__item-caret {
+  margin-left: 16px;
+}
+.tox[dir=rtl] .tox-collection--horizontal .tox-collection__group:not(:last-of-type) {
+  border-left: 1px solid #000000;
+}
+.tox[dir=rtl] .tox-collection--list .tox-collection__item > *:not(:first-child) {
+  margin-right: 8px;
+}
+.tox[dir=rtl] .tox-collection--list .tox-collection__item-label:first-child {
+  margin-right: 4px;
+}
+.tox[dir=rtl] .tox-collection__item-icon-rtl {
+  /* stylelint-disable-next-line no-descending-specificity */
+}
+.tox[dir=rtl] .tox-collection__item-icon-rtl .tox-collection__item-icon svg {
+  transform: rotateY(180deg);
+}
+.tox[dir=rtl] .tox-collection__item-accessory {
+  margin-right: 16px;
+  text-align: left;
+}
+.tox[dir=rtl] .tox-collection .tox-collection__item-caret {
+  margin-right: 16px;
+  transform: rotateY(180deg);
+}
+.tox[dir=rtl] .tox-collection--horizontal .tox-collection__item-caret {
+  margin-right: 4px;
+}
+.tox .tox-color-picker-container {
+  display: flex;
+  flex-direction: row;
+  height: 225px;
+  margin: 0;
+}
+.tox .tox-sv-palette {
+  box-sizing: border-box;
+  display: flex;
+  height: 100%;
+}
+.tox .tox-sv-palette-spectrum {
+  height: 100%;
+}
+.tox .tox-sv-palette,
+.tox .tox-sv-palette-spectrum {
+  width: 225px;
+}
+.tox .tox-sv-palette-thumb {
+  background: none;
+  border: 1px solid black;
+  border-radius: 50%;
+  box-sizing: content-box;
+  height: 12px;
+  position: absolute;
+  width: 12px;
+}
+.tox .tox-sv-palette-inner-thumb {
+  border: 1px solid white;
+  border-radius: 50%;
+  height: 10px;
+  position: absolute;
+  width: 10px;
+}
+.tox .tox-hue-slider {
+  box-sizing: border-box;
+  height: 100%;
+  width: 25px;
+}
+.tox .tox-hue-slider-spectrum {
+  background: linear-gradient(to bottom, #f00, #ff0080, #f0f, #8000ff, #00f, #0080ff, #0ff, #00ff80, #0f0, #80ff00, #ff0, #ff8000, #f00);
+  height: 100%;
+  width: 100%;
+}
+.tox .tox-hue-slider,
+.tox .tox-hue-slider-spectrum {
+  width: 20px;
+}
+.tox .tox-hue-slider-thumb {
+  background: white;
+  border: 1px solid black;
+  box-sizing: content-box;
+  height: 4px;
+  width: 100%;
+}
+.tox .tox-rgb-form {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+}
+.tox .tox-rgb-form div {
+  align-items: center;
+  display: flex;
+  justify-content: space-between;
+  margin-bottom: 5px;
+  width: inherit;
+}
+.tox .tox-rgb-form input {
+  width: 6em;
+}
+.tox .tox-rgb-form input.tox-invalid {
+  /* Need !important to override Chrome's focus styling unfortunately */
+  border: 1px solid red !important;
+}
+.tox .tox-rgb-form .tox-rgba-preview {
+  border: 1px solid black;
+  flex-grow: 2;
+  margin-bottom: 0;
+}
+.tox:not([dir=rtl]) .tox-sv-palette {
+  margin-right: 15px;
+}
+.tox:not([dir=rtl]) .tox-hue-slider {
+  margin-right: 15px;
+}
+.tox:not([dir=rtl]) .tox-hue-slider-thumb {
+  margin-left: -1px;
+}
+.tox:not([dir=rtl]) .tox-rgb-form label {
+  margin-right: 0.5em;
+}
+.tox[dir=rtl] .tox-sv-palette {
+  margin-left: 15px;
+}
+.tox[dir=rtl] .tox-hue-slider {
+  margin-left: 15px;
+}
+.tox[dir=rtl] .tox-hue-slider-thumb {
+  margin-right: -1px;
+}
+.tox[dir=rtl] .tox-rgb-form label {
+  margin-left: 0.5em;
+}
+.tox .tox-toolbar .tox-swatches,
+.tox .tox-toolbar__primary .tox-swatches,
+.tox .tox-toolbar__overflow .tox-swatches {
+  margin: 2px 0 3px 4px;
+}
+.tox .tox-collection--list .tox-collection__group .tox-swatches-menu {
+  border: 0;
+  margin: -4px 0;
+}
+.tox .tox-swatches__row {
+  display: flex;
+}
+.tox .tox-swatch {
+  height: 30px;
+  transition: transform 0.15s, box-shadow 0.15s;
+  width: 30px;
+}
+.tox .tox-swatch:hover,
+.tox .tox-swatch:focus {
+  box-shadow: 0 0 0 1px rgba(127, 127, 127, 0.3) inset;
+  transform: scale(0.8);
+}
+.tox .tox-swatch--remove {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+}
+.tox .tox-swatch--remove svg path {
+  stroke: #e74c3c;
+}
+.tox .tox-swatches__picker-btn {
+  align-items: center;
+  background-color: transparent;
+  border: 0;
+  cursor: pointer;
+  display: flex;
+  height: 30px;
+  justify-content: center;
+  outline: none;
+  padding: 0;
+  width: 30px;
+}
+.tox .tox-swatches__picker-btn svg {
+  height: 24px;
+  width: 24px;
+}
+.tox .tox-swatches__picker-btn:hover {
+  background: #4a5562;
+}
+.tox:not([dir=rtl]) .tox-swatches__picker-btn {
+  margin-left: auto;
+}
+.tox[dir=rtl] .tox-swatches__picker-btn {
+  margin-right: auto;
+}
+.tox .tox-comment-thread {
+  background: #2b3b4e;
+  position: relative;
+}
+.tox .tox-comment-thread > *:not(:first-child) {
+  margin-top: 8px;
+}
+.tox .tox-comment {
+  background: #2b3b4e;
+  border: 1px solid #000000;
+  border-radius: 3px;
+  box-shadow: 0 4px 8px 0 rgba(42, 55, 70, 0.1);
+  padding: 8px 8px 16px 8px;
+  position: relative;
+}
+.tox .tox-comment__header {
+  align-items: center;
+  color: #fff;
+  display: flex;
+  justify-content: space-between;
+}
+.tox .tox-comment__date {
+  color: rgba(255, 255, 255, 0.5);
+  font-size: 12px;
+}
+.tox .tox-comment__body {
+  color: #fff;
+  font-size: 14px;
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1.3;
+  margin-top: 8px;
+  position: relative;
+  text-transform: initial;
+}
+.tox .tox-comment__body textarea {
+  resize: none;
+  white-space: normal;
+  width: 100%;
+}
+.tox .tox-comment__expander {
+  padding-top: 8px;
+}
+.tox .tox-comment__expander p {
+  color: rgba(255, 255, 255, 0.5);
+  font-size: 14px;
+  font-style: normal;
+}
+.tox .tox-comment__body p {
+  margin: 0;
+}
+.tox .tox-comment__buttonspacing {
+  padding-top: 16px;
+  text-align: center;
+}
+.tox .tox-comment-thread__overlay::after {
+  background: #2b3b4e;
+  bottom: 0;
+  content: "";
+  display: flex;
+  left: 0;
+  opacity: 0.9;
+  position: absolute;
+  right: 0;
+  top: 0;
+  z-index: 5;
+}
+.tox .tox-comment__reply {
+  display: flex;
+  flex-shrink: 0;
+  flex-wrap: wrap;
+  justify-content: flex-end;
+  margin-top: 8px;
+}
+.tox .tox-comment__reply > *:first-child {
+  margin-bottom: 8px;
+  width: 100%;
+}
+.tox .tox-comment__edit {
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: flex-end;
+  margin-top: 16px;
+}
+.tox .tox-comment__gradient::after {
+  background: linear-gradient(rgba(43, 59, 78, 0), #2b3b4e);
+  bottom: 0;
+  content: "";
+  display: block;
+  height: 5em;
+  margin-top: -40px;
+  position: absolute;
+  width: 100%;
+}
+.tox .tox-comment__overlay {
+  background: #2b3b4e;
+  bottom: 0;
+  display: flex;
+  flex-direction: column;
+  flex-grow: 1;
+  left: 0;
+  opacity: 0.9;
+  position: absolute;
+  right: 0;
+  text-align: center;
+  top: 0;
+  z-index: 5;
+}
+.tox .tox-comment__loading-text {
+  align-items: center;
+  color: #fff;
+  display: flex;
+  flex-direction: column;
+  position: relative;
+}
+.tox .tox-comment__loading-text > div {
+  padding-bottom: 16px;
+}
+.tox .tox-comment__overlaytext {
+  bottom: 0;
+  flex-direction: column;
+  font-size: 14px;
+  left: 0;
+  padding: 1em;
+  position: absolute;
+  right: 0;
+  top: 0;
+  z-index: 10;
+}
+.tox .tox-comment__overlaytext p {
+  background-color: #2b3b4e;
+  box-shadow: 0 0 8px 8px #2b3b4e;
+  color: #fff;
+  text-align: center;
+}
+.tox .tox-comment__overlaytext div:nth-of-type(2) {
+  font-size: 0.8em;
+}
+.tox .tox-comment__busy-spinner {
+  align-items: center;
+  background-color: #2b3b4e;
+  bottom: 0;
+  display: flex;
+  justify-content: center;
+  left: 0;
+  position: absolute;
+  right: 0;
+  top: 0;
+  z-index: 20;
+}
+.tox .tox-comment__scroll {
+  display: flex;
+  flex-direction: column;
+  flex-shrink: 1;
+  overflow: auto;
+}
+.tox .tox-conversations {
+  margin: 8px;
+}
+.tox:not([dir=rtl]) .tox-comment__edit {
+  margin-left: 8px;
+}
+.tox:not([dir=rtl]) .tox-comment__buttonspacing > *:last-child,
+.tox:not([dir=rtl]) .tox-comment__edit > *:last-child,
+.tox:not([dir=rtl]) .tox-comment__reply > *:last-child {
+  margin-left: 8px;
+}
+.tox[dir=rtl] .tox-comment__edit {
+  margin-right: 8px;
+}
+.tox[dir=rtl] .tox-comment__buttonspacing > *:last-child,
+.tox[dir=rtl] .tox-comment__edit > *:last-child,
+.tox[dir=rtl] .tox-comment__reply > *:last-child {
+  margin-right: 8px;
+}
+.tox .tox-user {
+  align-items: center;
+  display: flex;
+}
+.tox .tox-user__avatar svg {
+  fill: rgba(255, 255, 255, 0.5);
+}
+.tox .tox-user__name {
+  color: rgba(255, 255, 255, 0.5);
+  font-size: 12px;
+  font-style: normal;
+  font-weight: bold;
+  text-transform: uppercase;
+}
+.tox:not([dir=rtl]) .tox-user__avatar svg {
+  margin-right: 8px;
+}
+.tox:not([dir=rtl]) .tox-user__avatar + .tox-user__name {
+  margin-left: 8px;
+}
+.tox[dir=rtl] .tox-user__avatar svg {
+  margin-left: 8px;
+}
+.tox[dir=rtl] .tox-user__avatar + .tox-user__name {
+  margin-right: 8px;
+}
+.tox .tox-dialog-wrap {
+  align-items: center;
+  bottom: 0;
+  display: flex;
+  justify-content: center;
+  left: 0;
+  position: fixed;
+  right: 0;
+  top: 0;
+  z-index: 1100;
+}
+.tox .tox-dialog-wrap__backdrop {
+  background-color: rgba(34, 47, 62, 0.75);
+  bottom: 0;
+  left: 0;
+  position: absolute;
+  right: 0;
+  top: 0;
+  z-index: 1;
+}
+.tox .tox-dialog-wrap__backdrop--opaque {
+  background-color: #222f3e;
+}
+.tox .tox-dialog {
+  background-color: #2b3b4e;
+  border-color: #000000;
+  border-radius: 3px;
+  border-style: solid;
+  border-width: 1px;
+  box-shadow: 0 16px 16px -10px rgba(42, 55, 70, 0.15), 0 0 40px 1px rgba(42, 55, 70, 0.15);
+  display: flex;
+  flex-direction: column;
+  max-height: 100%;
+  max-width: 480px;
+  overflow: hidden;
+  position: relative;
+  width: 95vw;
+  z-index: 2;
+}
+@media only screen and (max-width:767px) {
+  body:not(.tox-force-desktop) .tox .tox-dialog {
+    align-self: flex-start;
+    margin: 8px auto;
+    width: calc(100vw - 16px);
+  }
+}
+.tox .tox-dialog-inline {
+  z-index: 1100;
+}
+.tox .tox-dialog__header {
+  align-items: center;
+  background-color: #2b3b4e;
+  border-bottom: none;
+  color: #fff;
+  display: flex;
+  font-size: 16px;
+  justify-content: space-between;
+  padding: 8px 16px 0 16px;
+  position: relative;
+}
+.tox .tox-dialog__header .tox-button {
+  z-index: 1;
+}
+.tox .tox-dialog__draghandle {
+  cursor: grab;
+  height: 100%;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.tox .tox-dialog__draghandle:active {
+  cursor: grabbing;
+}
+.tox .tox-dialog__dismiss {
+  margin-left: auto;
+}
+.tox .tox-dialog__title {
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+  font-size: 20px;
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1.3;
+  margin: 0;
+  text-transform: none;
+}
+.tox .tox-dialog__body {
+  color: #fff;
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+  font-size: 16px;
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1.3;
+  min-width: 0;
+  text-align: left;
+  text-transform: none;
+}
+@media only screen and (max-width:767px) {
+  body:not(.tox-force-desktop) .tox .tox-dialog__body {
+    flex-direction: column;
+  }
+}
+.tox .tox-dialog__body-nav {
+  align-items: flex-start;
+  display: flex;
+  flex-direction: column;
+  padding: 16px 16px;
+}
+@media only screen and (max-width:767px) {
+  body:not(.tox-force-desktop) .tox .tox-dialog__body-nav {
+    flex-direction: row;
+    -webkit-overflow-scrolling: touch;
+    overflow-x: auto;
+    padding-bottom: 0;
+  }
+}
+.tox .tox-dialog__body-nav-item {
+  border-bottom: 2px solid transparent;
+  color: rgba(255, 255, 255, 0.5);
+  display: inline-block;
+  font-size: 14px;
+  line-height: 1.3;
+  margin-bottom: 8px;
+  text-decoration: none;
+  white-space: nowrap;
+}
+.tox .tox-dialog__body-nav-item:focus {
+  background-color: rgba(32, 122, 183, 0.1);
+}
+.tox .tox-dialog__body-nav-item--active {
+  border-bottom: 2px solid #207ab7;
+  color: #207ab7;
+}
+.tox .tox-dialog__body-content {
+  box-sizing: border-box;
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  -ms-flex-preferred-size: auto;
+  max-height: 650px;
+  overflow: auto;
+  -webkit-overflow-scrolling: touch;
+  padding: 16px 16px;
+}
+.tox .tox-dialog__body-content > * {
+  margin-bottom: 0;
+  margin-top: 16px;
+}
+.tox .tox-dialog__body-content > *:first-child {
+  margin-top: 0;
+}
+.tox .tox-dialog__body-content > *:last-child {
+  margin-bottom: 0;
+}
+.tox .tox-dialog__body-content > *:only-child {
+  margin-bottom: 0;
+  margin-top: 0;
+}
+.tox .tox-dialog__body-content a {
+  color: #207ab7;
+  cursor: pointer;
+  text-decoration: none;
+}
+.tox .tox-dialog__body-content a:hover,
+.tox .tox-dialog__body-content a:focus {
+  color: #185d8c;
+  text-decoration: none;
+}
+.tox .tox-dialog__body-content a:active {
+  color: #185d8c;
+  text-decoration: none;
+}
+.tox .tox-dialog__body-content svg {
+  fill: #fff;
+}
+.tox .tox-dialog__body-content ul {
+  display: block;
+  list-style-type: disc;
+  margin-bottom: 16px;
+  -webkit-margin-end: 0;
+          margin-inline-end: 0;
+  -webkit-margin-start: 0;
+          margin-inline-start: 0;
+  -webkit-padding-start: 2.5rem;
+          padding-inline-start: 2.5rem;
+}
+.tox .tox-dialog__body-content .tox-form__group h1 {
+  font-size: 20px;
+  font-weight: bold;
+  margin-bottom: 16px;
+  margin-top: 2rem;
+}
+.tox .tox-dialog__body-content .tox-form__group h2 {
+  font-size: 16px;
+  font-weight: bold;
+  margin-bottom: 16px;
+  margin-top: 2rem;
+}
+.tox .tox-dialog__body-content .tox-form__group p {
+  margin-bottom: 16px;
+}
+.tox .tox-dialog__body-content .tox-form__group h1:first-child,
+.tox .tox-dialog__body-content .tox-form__group h2:first-child,
+.tox .tox-dialog__body-content .tox-form__group p:first-child {
+  margin-top: 0;
+}
+.tox .tox-dialog__body-content .tox-form__group h1:last-child,
+.tox .tox-dialog__body-content .tox-form__group h2:last-child,
+.tox .tox-dialog__body-content .tox-form__group p:last-child {
+  margin-bottom: 0;
+}
+.tox .tox-dialog__body-content .tox-form__group h1:only-child,
+.tox .tox-dialog__body-content .tox-form__group h2:only-child,
+.tox .tox-dialog__body-content .tox-form__group p:only-child {
+  margin-bottom: 0;
+  margin-top: 0;
+}
+.tox .tox-dialog--width-lg {
+  height: 650px;
+  max-width: 1200px;
+}
+.tox .tox-dialog--width-md {
+  max-width: 800px;
+}
+.tox .tox-dialog--width-md .tox-dialog__body-content {
+  overflow: auto;
+}
+.tox .tox-dialog__body-content--centered {
+  text-align: center;
+}
+.tox .tox-dialog__footer {
+  align-items: center;
+  background-color: #2b3b4e;
+  border-top: 1px solid #000000;
+  display: flex;
+  justify-content: space-between;
+  padding: 8px 16px;
+}
+.tox .tox-dialog__footer-start,
+.tox .tox-dialog__footer-end {
+  display: flex;
+}
+.tox .tox-dialog__busy-spinner {
+  align-items: center;
+  background-color: rgba(34, 47, 62, 0.75);
+  bottom: 0;
+  display: flex;
+  justify-content: center;
+  left: 0;
+  position: absolute;
+  right: 0;
+  top: 0;
+  z-index: 3;
+}
+.tox .tox-dialog__table {
+  border-collapse: collapse;
+  width: 100%;
+}
+.tox .tox-dialog__table thead th {
+  font-weight: bold;
+  padding-bottom: 8px;
+}
+.tox .tox-dialog__table tbody tr {
+  border-bottom: 1px solid #000000;
+}
+.tox .tox-dialog__table tbody tr:last-child {
+  border-bottom: none;
+}
+.tox .tox-dialog__table td {
+  padding-bottom: 8px;
+  padding-top: 8px;
+}
+.tox .tox-dialog__popups {
+  position: absolute;
+  width: 100%;
+  z-index: 1100;
+}
+.tox .tox-dialog__body-iframe {
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-dialog__body-iframe .tox-navobj {
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2) {
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+  height: 100%;
+}
+.tox .tox-dialog-dock-fadeout {
+  opacity: 0;
+  visibility: hidden;
+}
+.tox .tox-dialog-dock-fadein {
+  opacity: 1;
+  visibility: visible;
+}
+.tox .tox-dialog-dock-transition {
+  transition: visibility 0s linear 0.3s, opacity 0.3s ease;
+}
+.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein {
+  transition-delay: 0s;
+}
+body.tox-dialog__disable-scroll {
+  overflow: hidden;
+}
+.tox.tox-platform-ie {
+  /* IE11 CSS styles go here */
+}
+.tox.tox-platform-ie .tox-dialog-wrap {
+  position: -ms-device-fixed;
+}
+@media only screen and (max-width:767px) {
+  body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav {
+    margin-right: 0;
+  }
+}
+@media only screen and (max-width:767px) {
+  body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child) {
+    margin-left: 8px;
+  }
+}
+.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start > *,
+.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end > * {
+  margin-left: 8px;
+}
+.tox[dir=rtl] .tox-dialog__body {
+  text-align: right;
+}
+@media only screen and (max-width:767px) {
+  body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav {
+    margin-left: 0;
+  }
+}
+@media only screen and (max-width:767px) {
+  body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child) {
+    margin-right: 8px;
+  }
+}
+.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start > *,
+.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end > * {
+  margin-right: 8px;
+}
+.tox .tox-dropzone-container {
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-dropzone {
+  align-items: center;
+  background: #fff;
+  border: 2px dashed #000000;
+  box-sizing: border-box;
+  display: flex;
+  flex-direction: column;
+  flex-grow: 1;
+  justify-content: center;
+  min-height: 100px;
+  padding: 10px;
+}
+.tox .tox-dropzone p {
+  color: rgba(255, 255, 255, 0.5);
+  margin: 0 0 16px 0;
+}
+.tox .tox-edit-area {
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+  overflow: hidden;
+  position: relative;
+}
+.tox .tox-edit-area__iframe {
+  background-color: #fff;
+  border: 0;
+  box-sizing: border-box;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+  height: 100%;
+  position: absolute;
+  width: 100%;
+}
+.tox.tox-inline-edit-area {
+  border: 1px dotted #000000;
+}
+.tox .tox-editor-container {
+  display: flex;
+  flex: 1 1 auto;
+  flex-direction: column;
+  overflow: hidden;
+}
+.tox .tox-editor-header {
+  z-index: 1;
+}
+.tox:not(.tox-tinymce-inline) .tox-editor-header {
+  box-shadow: none;
+  transition: box-shadow 0.5s;
+}
+.tox.tox-tinymce--toolbar-bottom .tox-editor-header,
+.tox.tox-tinymce-inline .tox-editor-header {
+  margin-bottom: -1px;
+}
+.tox.tox-tinymce--toolbar-sticky-on .tox-editor-header {
+  box-shadow: 0 4px 4px -3px rgba(0, 0, 0, 0.25);
+}
+.tox-editor-dock-fadeout {
+  opacity: 0;
+  visibility: hidden;
+}
+.tox-editor-dock-fadein {
+  opacity: 1;
+  visibility: visible;
+}
+.tox-editor-dock-transition {
+  transition: visibility 0s linear 0.25s, opacity 0.25s ease;
+}
+.tox-editor-dock-transition.tox-editor-dock-fadein {
+  transition-delay: 0s;
+}
+.tox .tox-control-wrap {
+  flex: 1;
+  position: relative;
+}
+.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,
+.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,
+.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid {
+  display: none;
+}
+.tox .tox-control-wrap svg {
+  display: block;
+}
+.tox .tox-control-wrap__status-icon-wrap {
+  position: absolute;
+  top: 50%;
+  transform: translateY(-50%);
+}
+.tox .tox-control-wrap__status-icon-invalid svg {
+  fill: #c00;
+}
+.tox .tox-control-wrap__status-icon-unknown svg {
+  fill: orange;
+}
+.tox .tox-control-wrap__status-icon-valid svg {
+  fill: green;
+}
+.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,
+.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,
+.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield {
+  padding-right: 32px;
+}
+.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap {
+  right: 4px;
+}
+.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,
+.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,
+.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield {
+  padding-left: 32px;
+}
+.tox[dir=rtl] .tox-control-wrap__status-icon-wrap {
+  left: 4px;
+}
+.tox .tox-autocompleter {
+  max-width: 25em;
+}
+.tox .tox-autocompleter .tox-menu {
+  max-width: 25em;
+}
+.tox .tox-autocompleter .tox-autocompleter-highlight {
+  font-weight: bold;
+}
+.tox .tox-color-input {
+  display: flex;
+  position: relative;
+  z-index: 1;
+}
+.tox .tox-color-input .tox-textfield {
+  z-index: -1;
+}
+.tox .tox-color-input span {
+  border-color: rgba(42, 55, 70, 0.2);
+  border-radius: 3px;
+  border-style: solid;
+  border-width: 1px;
+  box-shadow: none;
+  box-sizing: border-box;
+  height: 24px;
+  position: absolute;
+  top: 6px;
+  width: 24px;
+}
+.tox .tox-color-input span:hover:not([aria-disabled=true]),
+.tox .tox-color-input span:focus:not([aria-disabled=true]) {
+  border-color: #207ab7;
+  cursor: pointer;
+}
+.tox .tox-color-input span::before {
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.25) 25%, transparent 25%), linear-gradient(-45deg, rgba(255, 255, 255, 0.25) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.25) 75%), linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.25) 75%);
+  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
+  background-size: 12px 12px;
+  border: 1px solid #2b3b4e;
+  border-radius: 3px;
+  box-sizing: border-box;
+  content: '';
+  height: 24px;
+  left: -1px;
+  position: absolute;
+  top: -1px;
+  width: 24px;
+  z-index: -1;
+}
+.tox .tox-color-input span[aria-disabled=true] {
+  cursor: not-allowed;
+}
+.tox:not([dir=rtl]) .tox-color-input {
+  /* stylelint-disable-next-line no-descending-specificity */
+}
+.tox:not([dir=rtl]) .tox-color-input .tox-textfield {
+  padding-left: 36px;
+}
+.tox:not([dir=rtl]) .tox-color-input span {
+  left: 6px;
+}
+.tox[dir="rtl"] .tox-color-input {
+  /* stylelint-disable-next-line no-descending-specificity */
+}
+.tox[dir="rtl"] .tox-color-input .tox-textfield {
+  padding-right: 36px;
+}
+.tox[dir="rtl"] .tox-color-input span {
+  right: 6px;
+}
+.tox .tox-label,
+.tox .tox-toolbar-label {
+  color: rgba(255, 255, 255, 0.5);
+  display: block;
+  font-size: 14px;
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1.3;
+  padding: 0 8px 0 0;
+  text-transform: none;
+  white-space: nowrap;
+}
+.tox .tox-toolbar-label {
+  padding: 0 8px;
+}
+.tox[dir=rtl] .tox-label {
+  padding: 0 0 0 8px;
+}
+.tox .tox-form {
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-form__group {
+  box-sizing: border-box;
+  margin-bottom: 4px;
+}
+.tox .tox-form-group--maximize {
+  flex: 1;
+}
+.tox .tox-form__group--error {
+  color: #c00;
+}
+.tox .tox-form__group--collection {
+  display: flex;
+}
+.tox .tox-form__grid {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: wrap;
+  justify-content: space-between;
+}
+.tox .tox-form__grid--2col > .tox-form__group {
+  width: calc(50% - (8px / 2));
+}
+.tox .tox-form__grid--3col > .tox-form__group {
+  width: calc(100% / 3 - (8px / 2));
+}
+.tox .tox-form__grid--4col > .tox-form__group {
+  width: calc(25% - (8px / 2));
+}
+.tox .tox-form__controls-h-stack {
+  align-items: center;
+  display: flex;
+}
+.tox .tox-form__group--inline {
+  align-items: center;
+  display: flex;
+}
+.tox .tox-form__group--stretched {
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-form__group--stretched .tox-textarea {
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-form__group--stretched .tox-navobj {
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-form__group--stretched .tox-navobj :nth-child(2) {
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+  height: 100%;
+}
+.tox:not([dir=rtl]) .tox-form__controls-h-stack > *:not(:first-child) {
+  margin-left: 4px;
+}
+.tox[dir=rtl] .tox-form__controls-h-stack > *:not(:first-child) {
+  margin-right: 4px;
+}
+.tox .tox-lock.tox-locked .tox-lock-icon__unlock,
+.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock {
+  display: none;
+}
+.tox .tox-textfield,
+.tox .tox-toolbar-textfield,
+.tox .tox-selectfield select,
+.tox .tox-textarea {
+  -webkit-appearance: none;
+     -moz-appearance: none;
+          appearance: none;
+  background-color: #2b3b4e;
+  border-color: #000000;
+  border-radius: 3px;
+  border-style: solid;
+  border-width: 1px;
+  box-shadow: none;
+  box-sizing: border-box;
+  color: #fff;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+  font-size: 16px;
+  line-height: 24px;
+  margin: 0;
+  min-height: 34px;
+  outline: none;
+  padding: 5px 4.75px;
+  resize: none;
+  width: 100%;
+}
+.tox .tox-textfield[disabled],
+.tox .tox-textarea[disabled] {
+  background-color: #222f3e;
+  color: rgba(255, 255, 255, 0.85);
+  cursor: not-allowed;
+}
+.tox .tox-textfield:focus,
+.tox .tox-selectfield select:focus,
+.tox .tox-textarea:focus {
+  border-color: #207ab7;
+  box-shadow: none;
+  outline: none;
+}
+.tox .tox-toolbar-textfield {
+  border-width: 0;
+  margin-bottom: 3px;
+  margin-top: 2px;
+  max-width: 250px;
+}
+.tox .tox-naked-btn {
+  background-color: transparent;
+  border: 0;
+  border-color: transparent;
+  box-shadow: unset;
+  color: #207ab7;
+  cursor: pointer;
+  display: block;
+  margin: 0;
+  padding: 0;
+}
+.tox .tox-naked-btn svg {
+  display: block;
+  fill: #fff;
+}
+.tox:not([dir=rtl]) .tox-toolbar-textfield + * {
+  margin-left: 4px;
+}
+.tox[dir=rtl] .tox-toolbar-textfield + * {
+  margin-right: 4px;
+}
+.tox .tox-selectfield {
+  cursor: pointer;
+  position: relative;
+}
+.tox .tox-selectfield select[disabled] {
+  background-color: #19232e;
+  color: rgba(255, 255, 255, 0.85);
+  cursor: not-allowed;
+}
+.tox .tox-selectfield select::-ms-expand {
+  display: none;
+}
+.tox .tox-selectfield svg {
+  pointer-events: none;
+  position: absolute;
+  top: 50%;
+  transform: translateY(-50%);
+}
+.tox:not([dir=rtl]) .tox-selectfield select[size="0"],
+.tox:not([dir=rtl]) .tox-selectfield select[size="1"] {
+  padding-right: 24px;
+}
+.tox:not([dir=rtl]) .tox-selectfield svg {
+  right: 8px;
+}
+.tox[dir=rtl] .tox-selectfield select[size="0"],
+.tox[dir=rtl] .tox-selectfield select[size="1"] {
+  padding-left: 24px;
+}
+.tox[dir=rtl] .tox-selectfield svg {
+  left: 8px;
+}
+.tox .tox-textarea {
+  -webkit-appearance: textarea;
+     -moz-appearance: textarea;
+          appearance: textarea;
+  white-space: pre-wrap;
+}
+.tox-fullscreen {
+  border: 0;
+  height: 100%;
+  left: 0;
+  margin: 0;
+  overflow: hidden;
+  -ms-scroll-chaining: none;
+      overscroll-behavior: none;
+  padding: 0;
+  position: fixed;
+  top: 0;
+  touch-action: pinch-zoom;
+  width: 100%;
+}
+.tox-fullscreen .tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle {
+  display: none;
+}
+.tox-fullscreen .tox.tox-tinymce.tox-fullscreen {
+  z-index: 1200;
+}
+.tox-fullscreen .tox.tox-tinymce-aux {
+  z-index: 1201;
+}
+.tox .tox-help__more-link {
+  list-style: none;
+  margin-top: 1em;
+}
+.tox .tox-image-tools {
+  width: 100%;
+}
+.tox .tox-image-tools__toolbar {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+}
+.tox .tox-image-tools__image {
+  background-color: #666;
+  height: 380px;
+  overflow: auto;
+  position: relative;
+  width: 100%;
+}
+.tox .tox-image-tools__image,
+.tox .tox-image-tools__image + .tox-image-tools__toolbar {
+  margin-top: 8px;
+}
+.tox .tox-image-tools__image-bg {
+  background: url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==);
+}
+.tox .tox-image-tools__toolbar > .tox-spacer {
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-croprect-block {
+  background: black;
+  filter: alpha(opacity=50);
+  opacity: 0.5;
+  position: absolute;
+  zoom: 1;
+}
+.tox .tox-croprect-handle {
+  border: 2px solid white;
+  height: 20px;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 20px;
+}
+.tox .tox-croprect-handle-move {
+  border: 0;
+  cursor: move;
+  position: absolute;
+}
+.tox .tox-croprect-handle-nw {
+  border-width: 2px 0 0 2px;
+  cursor: nw-resize;
+  left: 100px;
+  margin: -2px 0 0 -2px;
+  top: 100px;
+}
+.tox .tox-croprect-handle-ne {
+  border-width: 2px 2px 0 0;
+  cursor: ne-resize;
+  left: 200px;
+  margin: -2px 0 0 -20px;
+  top: 100px;
+}
+.tox .tox-croprect-handle-sw {
+  border-width: 0 0 2px 2px;
+  cursor: sw-resize;
+  left: 100px;
+  margin: -20px 2px 0 -2px;
+  top: 200px;
+}
+.tox .tox-croprect-handle-se {
+  border-width: 0 2px 2px 0;
+  cursor: se-resize;
+  left: 200px;
+  margin: -20px 0 0 -20px;
+  top: 200px;
+}
+.tox:not([dir=rtl]) .tox-image-tools__toolbar > .tox-slider:not(:first-of-type) {
+  margin-left: 8px;
+}
+.tox:not([dir=rtl]) .tox-image-tools__toolbar > .tox-button + .tox-slider {
+  margin-left: 32px;
+}
+.tox:not([dir=rtl]) .tox-image-tools__toolbar > .tox-slider + .tox-button {
+  margin-left: 32px;
+}
+.tox[dir=rtl] .tox-image-tools__toolbar > .tox-slider:not(:first-of-type) {
+  margin-right: 8px;
+}
+.tox[dir=rtl] .tox-image-tools__toolbar > .tox-button + .tox-slider {
+  margin-right: 32px;
+}
+.tox[dir=rtl] .tox-image-tools__toolbar > .tox-slider + .tox-button {
+  margin-right: 32px;
+}
+.tox .tox-insert-table-picker {
+  display: flex;
+  flex-wrap: wrap;
+  width: 170px;
+}
+.tox .tox-insert-table-picker > div {
+  border-color: #000000;
+  border-style: solid;
+  border-width: 0 1px 1px 0;
+  box-sizing: border-box;
+  height: 17px;
+  width: 17px;
+}
+.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker {
+  margin: -4px 0;
+}
+.tox .tox-insert-table-picker .tox-insert-table-picker__selected {
+  background-color: rgba(32, 122, 183, 0.5);
+  border-color: rgba(32, 122, 183, 0.5);
+}
+.tox .tox-insert-table-picker__label {
+  color: #fff;
+  display: block;
+  font-size: 14px;
+  padding: 4px;
+  text-align: center;
+  width: 100%;
+}
+.tox:not([dir=rtl]) {
+  /* stylelint-disable-next-line no-descending-specificity */
+}
+.tox:not([dir=rtl]) .tox-insert-table-picker > div:nth-child(10n) {
+  border-right: 0;
+}
+.tox[dir=rtl] {
+  /* stylelint-disable-next-line no-descending-specificity */
+}
+.tox[dir=rtl] .tox-insert-table-picker > div:nth-child(10n+1) {
+  border-right: 0;
+}
+.tox {
+  /* stylelint-disable */
+  /* stylelint-enable */
+}
+.tox .tox-menu {
+  background-color: #2b3b4e;
+  border: 1px solid #000000;
+  border-radius: 3px;
+  box-shadow: 0 4px 8px 0 rgba(42, 55, 70, 0.1);
+  display: inline-block;
+  overflow: hidden;
+  vertical-align: top;
+  z-index: 1150;
+}
+.tox .tox-menu.tox-collection.tox-collection--list {
+  padding: 0;
+}
+.tox .tox-menu.tox-collection.tox-collection--toolbar {
+  padding: 4px;
+}
+.tox .tox-menu.tox-collection.tox-collection--grid {
+  padding: 4px;
+}
+.tox .tox-menu__label h1,
+.tox .tox-menu__label h2,
+.tox .tox-menu__label h3,
+.tox .tox-menu__label h4,
+.tox .tox-menu__label h5,
+.tox .tox-menu__label h6,
+.tox .tox-menu__label p,
+.tox .tox-menu__label blockquote,
+.tox .tox-menu__label code {
+  margin: 0;
+}
+.tox .tox-menubar {
+  background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23000000'/%3E%3C/svg%3E") left 0 top 0 #222f3e;
+  background-color: #222f3e;
+  display: flex;
+  flex: 0 0 auto;
+  flex-shrink: 0;
+  flex-wrap: wrap;
+  padding: 0 4px 0 4px;
+}
+.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar {
+  border-top: 1px solid #000000;
+}
+/* Deprecated. Remove in next major release */
+.tox .tox-mbtn {
+  align-items: center;
+  background: transparent;
+  border: 0;
+  border-radius: 3px;
+  box-shadow: none;
+  color: #fff;
+  display: flex;
+  flex: 0 0 auto;
+  font-size: 14px;
+  font-style: normal;
+  font-weight: normal;
+  height: 34px;
+  justify-content: center;
+  margin: 2px 0 3px 0;
+  outline: none;
+  overflow: hidden;
+  padding: 0 4px;
+  text-transform: none;
+  width: auto;
+}
+.tox .tox-mbtn[disabled] {
+  background-color: transparent;
+  border: 0;
+  box-shadow: none;
+  color: rgba(255, 255, 255, 0.5);
+  cursor: not-allowed;
+}
+.tox .tox-mbtn:focus:not(:disabled) {
+  background: #4a5562;
+  border: 0;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-mbtn--active {
+  background: #757d87;
+  border: 0;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active) {
+  background: #4a5562;
+  border: 0;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-mbtn__select-label {
+  cursor: default;
+  font-weight: normal;
+  margin: 0 4px;
+}
+.tox .tox-mbtn[disabled] .tox-mbtn__select-label {
+  cursor: not-allowed;
+}
+.tox .tox-mbtn__select-chevron {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+  width: 16px;
+  display: none;
+}
+.tox .tox-notification {
+  border-radius: 3px;
+  border-style: solid;
+  border-width: 1px;
+  box-shadow: none;
+  box-sizing: border-box;
+  display: -ms-grid;
+  display: grid;
+  font-size: 14px;
+  font-weight: normal;
+  -ms-grid-columns: minmax(40px, 1fr) auto minmax(40px, 1fr);
+      grid-template-columns: minmax(40px, 1fr) auto minmax(40px, 1fr);
+  margin-top: 4px;
+  opacity: 0;
+  padding: 4px;
+  transition: transform 100ms ease-in, opacity 150ms ease-in;
+}
+.tox .tox-notification p {
+  font-size: 14px;
+  font-weight: normal;
+}
+.tox .tox-notification a {
+  text-decoration: underline;
+}
+.tox .tox-notification--in {
+  opacity: 1;
+}
+.tox .tox-notification--success {
+  background-color: #e4eeda;
+  border-color: #d7e6c8;
+  color: #fff;
+}
+.tox .tox-notification--success p {
+  color: #fff;
+}
+.tox .tox-notification--success a {
+  color: #547831;
+}
+.tox .tox-notification--success svg {
+  fill: #fff;
+}
+.tox .tox-notification--error {
+  background-color: #f8dede;
+  border-color: #f2bfbf;
+  color: #fff;
+}
+.tox .tox-notification--error p {
+  color: #fff;
+}
+.tox .tox-notification--error a {
+  color: #c00;
+}
+.tox .tox-notification--error svg {
+  fill: #fff;
+}
+.tox .tox-notification--warn,
+.tox .tox-notification--warning {
+  background-color: #fffaea;
+  border-color: #ffe89d;
+  color: #fff;
+}
+.tox .tox-notification--warn p,
+.tox .tox-notification--warning p {
+  color: #fff;
+}
+.tox .tox-notification--warn a,
+.tox .tox-notification--warning a {
+  color: #fff;
+}
+.tox .tox-notification--warn svg,
+.tox .tox-notification--warning svg {
+  fill: #fff;
+}
+.tox .tox-notification--info {
+  background-color: #d9edf7;
+  border-color: #779ecb;
+  color: #fff;
+}
+.tox .tox-notification--info p {
+  color: #fff;
+}
+.tox .tox-notification--info a {
+  color: #fff;
+}
+.tox .tox-notification--info svg {
+  fill: #fff;
+}
+.tox .tox-notification__body {
+  -ms-grid-row-align: center;
+      align-self: center;
+  color: #fff;
+  font-size: 14px;
+  -ms-grid-column-span: 1;
+  grid-column-end: 3;
+  -ms-grid-column: 2;
+      grid-column-start: 2;
+  -ms-grid-row-span: 1;
+  grid-row-end: 2;
+  -ms-grid-row: 1;
+      grid-row-start: 1;
+  text-align: center;
+  white-space: normal;
+  word-break: break-all;
+  word-break: break-word;
+}
+.tox .tox-notification__body > * {
+  margin: 0;
+}
+.tox .tox-notification__body > * + * {
+  margin-top: 1rem;
+}
+.tox .tox-notification__icon {
+  -ms-grid-row-align: center;
+      align-self: center;
+  -ms-grid-column-span: 1;
+  grid-column-end: 2;
+  -ms-grid-column: 1;
+      grid-column-start: 1;
+  -ms-grid-row-span: 1;
+  grid-row-end: 2;
+  -ms-grid-row: 1;
+      grid-row-start: 1;
+  -ms-grid-column-align: end;
+      justify-self: end;
+}
+.tox .tox-notification__icon svg {
+  display: block;
+}
+.tox .tox-notification__dismiss {
+  -ms-grid-row-align: start;
+      align-self: start;
+  -ms-grid-column-span: 1;
+  grid-column-end: 4;
+  -ms-grid-column: 3;
+      grid-column-start: 3;
+  -ms-grid-row-span: 1;
+  grid-row-end: 2;
+  -ms-grid-row: 1;
+      grid-row-start: 1;
+  -ms-grid-column-align: end;
+      justify-self: end;
+}
+.tox .tox-notification .tox-progress-bar {
+  -ms-grid-column-span: 3;
+  grid-column-end: 4;
+  -ms-grid-column: 1;
+      grid-column-start: 1;
+  -ms-grid-row-span: 1;
+  grid-row-end: 3;
+  -ms-grid-row: 2;
+      grid-row-start: 2;
+  -ms-grid-column-align: center;
+      justify-self: center;
+}
+.tox .tox-pop {
+  display: inline-block;
+  position: relative;
+}
+.tox .tox-pop--resizing {
+  transition: width 0.1s ease;
+}
+.tox .tox-pop--resizing .tox-toolbar {
+  flex-wrap: nowrap;
+}
+.tox .tox-pop__dialog {
+  background-color: #222f3e;
+  border: 1px solid #000000;
+  border-radius: 3px;
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
+  min-width: 0;
+  overflow: hidden;
+}
+.tox .tox-pop__dialog > *:not(.tox-toolbar) {
+  margin: 4px 4px 4px 8px;
+}
+.tox .tox-pop__dialog .tox-toolbar {
+  background-color: transparent;
+  margin-bottom: -1px;
+}
+.tox .tox-pop::before,
+.tox .tox-pop::after {
+  border-style: solid;
+  content: '';
+  display: block;
+  height: 0;
+  position: absolute;
+  width: 0;
+}
+.tox .tox-pop.tox-pop--bottom::before,
+.tox .tox-pop.tox-pop--bottom::after {
+  left: 50%;
+  top: 100%;
+}
+.tox .tox-pop.tox-pop--bottom::after {
+  border-color: #222f3e transparent transparent transparent;
+  border-width: 8px;
+  margin-left: -8px;
+  margin-top: -1px;
+}
+.tox .tox-pop.tox-pop--bottom::before {
+  border-color: #000000 transparent transparent transparent;
+  border-width: 9px;
+  margin-left: -9px;
+}
+.tox .tox-pop.tox-pop--top::before,
+.tox .tox-pop.tox-pop--top::after {
+  left: 50%;
+  top: 0;
+  transform: translateY(-100%);
+}
+.tox .tox-pop.tox-pop--top::after {
+  border-color: transparent transparent #222f3e transparent;
+  border-width: 8px;
+  margin-left: -8px;
+  margin-top: 1px;
+}
+.tox .tox-pop.tox-pop--top::before {
+  border-color: transparent transparent #000000 transparent;
+  border-width: 9px;
+  margin-left: -9px;
+}
+.tox .tox-pop.tox-pop--left::before,
+.tox .tox-pop.tox-pop--left::after {
+  left: 0;
+  top: calc(50% - 1px);
+  transform: translateY(-50%);
+}
+.tox .tox-pop.tox-pop--left::after {
+  border-color: transparent #222f3e transparent transparent;
+  border-width: 8px;
+  margin-left: -15px;
+}
+.tox .tox-pop.tox-pop--left::before {
+  border-color: transparent #000000 transparent transparent;
+  border-width: 10px;
+  margin-left: -19px;
+}
+.tox .tox-pop.tox-pop--right::before,
+.tox .tox-pop.tox-pop--right::after {
+  left: 100%;
+  top: calc(50% + 1px);
+  transform: translateY(-50%);
+}
+.tox .tox-pop.tox-pop--right::after {
+  border-color: transparent transparent transparent #222f3e;
+  border-width: 8px;
+  margin-left: -1px;
+}
+.tox .tox-pop.tox-pop--right::before {
+  border-color: transparent transparent transparent #000000;
+  border-width: 10px;
+  margin-left: -1px;
+}
+.tox .tox-pop.tox-pop--align-left::before,
+.tox .tox-pop.tox-pop--align-left::after {
+  left: 20px;
+}
+.tox .tox-pop.tox-pop--align-right::before,
+.tox .tox-pop.tox-pop--align-right::after {
+  left: calc(100% - 20px);
+}
+.tox .tox-sidebar-wrap {
+  display: flex;
+  flex-direction: row;
+  flex-grow: 1;
+  -ms-flex-preferred-size: 0;
+  min-height: 0;
+}
+.tox .tox-sidebar {
+  background-color: #222f3e;
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-end;
+}
+.tox .tox-sidebar__slider {
+  display: flex;
+  overflow: hidden;
+}
+.tox .tox-sidebar__pane-container {
+  display: flex;
+}
+.tox .tox-sidebar__pane {
+  display: flex;
+}
+.tox .tox-sidebar--sliding-closed {
+  opacity: 0;
+}
+.tox .tox-sidebar--sliding-open {
+  opacity: 1;
+}
+.tox .tox-sidebar--sliding-growing,
+.tox .tox-sidebar--sliding-shrinking {
+  transition: width 0.5s ease, opacity 0.5s ease;
+}
+.tox .tox-selector {
+  background-color: #4099ff;
+  border-color: #4099ff;
+  border-style: solid;
+  border-width: 1px;
+  box-sizing: border-box;
+  display: inline-block;
+  height: 10px;
+  position: absolute;
+  width: 10px;
+}
+.tox.tox-platform-touch .tox-selector {
+  height: 12px;
+  width: 12px;
+}
+.tox .tox-slider {
+  align-items: center;
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+  height: 24px;
+  justify-content: center;
+  position: relative;
+}
+.tox .tox-slider__rail {
+  background-color: transparent;
+  border: 1px solid #000000;
+  border-radius: 3px;
+  height: 10px;
+  min-width: 120px;
+  width: 100%;
+}
+.tox .tox-slider__handle {
+  background-color: #207ab7;
+  border: 2px solid #185d8c;
+  border-radius: 3px;
+  box-shadow: none;
+  height: 24px;
+  left: 50%;
+  position: absolute;
+  top: 50%;
+  transform: translateX(-50%) translateY(-50%);
+  width: 14px;
+}
+.tox .tox-source-code {
+  overflow: auto;
+}
+.tox .tox-spinner {
+  display: flex;
+}
+.tox .tox-spinner > div {
+  animation: tam-bouncing-dots 1.5s ease-in-out 0s infinite both;
+  background-color: rgba(255, 255, 255, 0.5);
+  border-radius: 100%;
+  height: 8px;
+  width: 8px;
+}
+.tox .tox-spinner > div:nth-child(1) {
+  animation-delay: -0.32s;
+}
+.tox .tox-spinner > div:nth-child(2) {
+  animation-delay: -0.16s;
+}
+@keyframes tam-bouncing-dots {
+  0%,
+  80%,
+  100% {
+    transform: scale(0);
+  }
+  40% {
+    transform: scale(1);
+  }
+}
+.tox:not([dir=rtl]) .tox-spinner > div:not(:first-child) {
+  margin-left: 4px;
+}
+.tox[dir=rtl] .tox-spinner > div:not(:first-child) {
+  margin-right: 4px;
+}
+.tox .tox-statusbar {
+  align-items: center;
+  background-color: #222f3e;
+  border-top: 1px solid #000000;
+  color: #fff;
+  display: flex;
+  flex: 0 0 auto;
+  font-size: 12px;
+  font-weight: normal;
+  height: 18px;
+  overflow: hidden;
+  padding: 0 8px;
+  position: relative;
+  text-transform: uppercase;
+}
+.tox .tox-statusbar__text-container {
+  display: flex;
+  flex: 1 1 auto;
+  justify-content: flex-end;
+  overflow: hidden;
+}
+.tox .tox-statusbar__path {
+  display: flex;
+  flex: 1 1 auto;
+  margin-right: auto;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.tox .tox-statusbar__path > * {
+  display: inline;
+  white-space: nowrap;
+}
+.tox .tox-statusbar__wordcount {
+  flex: 0 0 auto;
+  margin-left: 1ch;
+}
+.tox .tox-statusbar a,
+.tox .tox-statusbar__path-item,
+.tox .tox-statusbar__wordcount {
+  color: #fff;
+  text-decoration: none;
+}
+.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled=true]),
+.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled=true]),
+.tox .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled=true]),
+.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled=true]),
+.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled=true]),
+.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled=true]) {
+  cursor: pointer;
+  text-decoration: underline;
+}
+.tox .tox-statusbar__resize-handle {
+  align-items: flex-end;
+  align-self: stretch;
+  cursor: nwse-resize;
+  display: flex;
+  flex: 0 0 auto;
+  justify-content: flex-end;
+  margin-left: auto;
+  margin-right: -8px;
+  padding-left: 1ch;
+}
+.tox .tox-statusbar__resize-handle svg {
+  display: block;
+  fill: #fff;
+}
+.tox:not([dir=rtl]) .tox-statusbar__path > * {
+  margin-right: 4px;
+}
+.tox:not([dir=rtl]) .tox-statusbar__branding {
+  margin-left: 1ch;
+}
+.tox[dir=rtl] .tox-statusbar {
+  flex-direction: row-reverse;
+}
+.tox[dir=rtl] .tox-statusbar__path > * {
+  margin-left: 4px;
+}
+.tox .tox-throbber {
+  z-index: 1400;
+}
+.tox .tox-throbber__busy-spinner {
+  align-items: center;
+  background-color: rgba(34, 47, 62, 0.6);
+  bottom: 0;
+  display: flex;
+  justify-content: center;
+  left: 0;
+  position: absolute;
+  right: 0;
+  top: 0;
+}
+.tox .tox-tbtn {
+  align-items: center;
+  background: transparent;
+  border: 0;
+  border-radius: 3px;
+  box-shadow: none;
+  color: #fff;
+  display: flex;
+  flex: 0 0 auto;
+  font-size: 14px;
+  font-style: normal;
+  font-weight: normal;
+  height: 34px;
+  justify-content: center;
+  margin: 2px 0 3px 0;
+  outline: none;
+  overflow: hidden;
+  padding: 0;
+  text-transform: none;
+  width: 34px;
+}
+.tox .tox-tbtn svg {
+  display: block;
+  fill: #fff;
+}
+.tox .tox-tbtn.tox-tbtn-more {
+  padding-left: 5px;
+  padding-right: 5px;
+  width: inherit;
+}
+.tox .tox-tbtn:focus {
+  background: #4a5562;
+  border: 0;
+  box-shadow: none;
+}
+.tox .tox-tbtn:hover {
+  background: #4a5562;
+  border: 0;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-tbtn:hover svg {
+  fill: #fff;
+}
+.tox .tox-tbtn:active {
+  background: #757d87;
+  border: 0;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-tbtn:active svg {
+  fill: #fff;
+}
+.tox .tox-tbtn--disabled,
+.tox .tox-tbtn--disabled:hover,
+.tox .tox-tbtn:disabled,
+.tox .tox-tbtn:disabled:hover {
+  background: transparent;
+  border: 0;
+  box-shadow: none;
+  color: rgba(255, 255, 255, 0.5);
+  cursor: not-allowed;
+}
+.tox .tox-tbtn--disabled svg,
+.tox .tox-tbtn--disabled:hover svg,
+.tox .tox-tbtn:disabled svg,
+.tox .tox-tbtn:disabled:hover svg {
+  /* stylelint-disable-line no-descending-specificity */
+  fill: rgba(255, 255, 255, 0.5);
+}
+.tox .tox-tbtn--enabled,
+.tox .tox-tbtn--enabled:hover {
+  background: #757d87;
+  border: 0;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-tbtn--enabled > *,
+.tox .tox-tbtn--enabled:hover > * {
+  transform: none;
+}
+.tox .tox-tbtn--enabled svg,
+.tox .tox-tbtn--enabled:hover svg {
+  /* stylelint-disable-line no-descending-specificity */
+  fill: #fff;
+}
+.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) {
+  color: #fff;
+}
+.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg {
+  fill: #fff;
+}
+.tox .tox-tbtn:active > * {
+  transform: none;
+}
+.tox .tox-tbtn--md {
+  height: 51px;
+  width: 51px;
+}
+.tox .tox-tbtn--lg {
+  flex-direction: column;
+  height: 68px;
+  width: 68px;
+}
+.tox .tox-tbtn--return {
+  -ms-grid-row-align: stretch;
+      align-self: stretch;
+  height: unset;
+  width: 16px;
+}
+.tox .tox-tbtn--labeled {
+  padding: 0 4px;
+  width: unset;
+}
+.tox .tox-tbtn__vlabel {
+  display: block;
+  font-size: 10px;
+  font-weight: normal;
+  letter-spacing: -0.025em;
+  margin-bottom: 4px;
+  white-space: nowrap;
+}
+.tox .tox-tbtn--select {
+  margin: 2px 0 3px 0;
+  padding: 0 4px;
+  width: auto;
+}
+.tox .tox-tbtn__select-label {
+  cursor: default;
+  font-weight: normal;
+  margin: 0 4px;
+}
+.tox .tox-tbtn__select-chevron {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+  width: 16px;
+}
+.tox .tox-tbtn__select-chevron svg {
+  fill: rgba(255, 255, 255, 0.5);
+}
+.tox .tox-tbtn--bespoke .tox-tbtn__select-label {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  width: 7em;
+}
+.tox .tox-split-button {
+  border: 0;
+  border-radius: 3px;
+  box-sizing: border-box;
+  display: flex;
+  margin: 2px 0 3px 0;
+  overflow: hidden;
+}
+.tox .tox-split-button:hover {
+  box-shadow: 0 0 0 1px #4a5562 inset;
+}
+.tox .tox-split-button:focus {
+  background: #4a5562;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-split-button > * {
+  border-radius: 0;
+}
+.tox .tox-split-button__chevron {
+  width: 16px;
+}
+.tox .tox-split-button__chevron svg {
+  fill: rgba(255, 255, 255, 0.5);
+}
+.tox .tox-split-button .tox-tbtn {
+  margin: 0;
+}
+.tox.tox-platform-touch .tox-split-button .tox-tbtn:first-child {
+  width: 30px;
+}
+.tox.tox-platform-touch .tox-split-button__chevron {
+  width: 20px;
+}
+.tox .tox-split-button.tox-tbtn--disabled:hover,
+.tox .tox-split-button.tox-tbtn--disabled:focus,
+.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover,
+.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus {
+  background: transparent;
+  box-shadow: none;
+  color: rgba(255, 255, 255, 0.5);
+}
+.tox .tox-toolbar-overlord {
+  background-color: #222f3e;
+}
+.tox .tox-toolbar,
+.tox .tox-toolbar__primary,
+.tox .tox-toolbar__overflow {
+  background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23000000'/%3E%3C/svg%3E") left 0 top 0 #222f3e;
+  background-color: #222f3e;
+  display: flex;
+  flex: 0 0 auto;
+  flex-shrink: 0;
+  flex-wrap: wrap;
+  padding: 0 0;
+}
+.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed {
+  height: 0;
+  opacity: 0;
+  padding-bottom: 0;
+  padding-top: 0;
+  visibility: hidden;
+}
+.tox .tox-toolbar__overflow--growing {
+  transition: height 0.3s ease, opacity 0.2s linear 0.1s;
+}
+.tox .tox-toolbar__overflow--shrinking {
+  transition: opacity 0.3s ease, height 0.2s linear 0.1s, visibility 0s linear 0.3s;
+}
+.tox .tox-menubar + .tox-toolbar,
+.tox .tox-menubar + .tox-toolbar-overlord .tox-toolbar__primary {
+  border-top: 1px solid #000000;
+  margin-top: -1px;
+}
+.tox .tox-toolbar--scrolling {
+  flex-wrap: nowrap;
+  overflow-x: auto;
+}
+.tox .tox-pop .tox-toolbar {
+  border-width: 0;
+}
+.tox .tox-toolbar--no-divider {
+  background-image: none;
+}
+.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar:first-child,
+.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar-overlord:first-child .tox-toolbar__primary {
+  border-top: 1px solid #000000;
+}
+.tox.tox-tinymce-aux .tox-toolbar__overflow {
+  background-color: #222f3e;
+  border: 1px solid #000000;
+  border-radius: 3px;
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
+}
+.tox[dir=rtl] .tox-tbtn__icon-rtl svg {
+  transform: rotateY(180deg);
+}
+.tox .tox-toolbar__group {
+  align-items: center;
+  display: flex;
+  flex-wrap: wrap;
+  margin: 0 0;
+  padding: 0 4px 0 4px;
+}
+.tox .tox-toolbar__group--pull-right {
+  margin-left: auto;
+}
+.tox .tox-toolbar--scrolling .tox-toolbar__group {
+  flex-shrink: 0;
+  flex-wrap: nowrap;
+}
+.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type) {
+  border-right: 1px solid #000000;
+}
+.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type) {
+  border-left: 1px solid #000000;
+}
+.tox .tox-tooltip {
+  display: inline-block;
+  padding: 8px;
+  position: relative;
+}
+.tox .tox-tooltip__body {
+  background-color: #3d546f;
+  border-radius: 3px;
+  box-shadow: 0 2px 4px rgba(42, 55, 70, 0.3);
+  color: rgba(255, 255, 255, 0.75);
+  font-size: 14px;
+  font-style: normal;
+  font-weight: normal;
+  padding: 4px 8px;
+  text-transform: none;
+}
+.tox .tox-tooltip__arrow {
+  position: absolute;
+}
+.tox .tox-tooltip--down .tox-tooltip__arrow {
+  border-left: 8px solid transparent;
+  border-right: 8px solid transparent;
+  border-top: 8px solid #3d546f;
+  bottom: 0;
+  left: 50%;
+  position: absolute;
+  transform: translateX(-50%);
+}
+.tox .tox-tooltip--up .tox-tooltip__arrow {
+  border-bottom: 8px solid #3d546f;
+  border-left: 8px solid transparent;
+  border-right: 8px solid transparent;
+  left: 50%;
+  position: absolute;
+  top: 0;
+  transform: translateX(-50%);
+}
+.tox .tox-tooltip--right .tox-tooltip__arrow {
+  border-bottom: 8px solid transparent;
+  border-left: 8px solid #3d546f;
+  border-top: 8px solid transparent;
+  position: absolute;
+  right: 0;
+  top: 50%;
+  transform: translateY(-50%);
+}
+.tox .tox-tooltip--left .tox-tooltip__arrow {
+  border-bottom: 8px solid transparent;
+  border-right: 8px solid #3d546f;
+  border-top: 8px solid transparent;
+  left: 0;
+  position: absolute;
+  top: 50%;
+  transform: translateY(-50%);
+}
+.tox .tox-well {
+  border: 1px solid #000000;
+  border-radius: 3px;
+  padding: 8px;
+  width: 100%;
+}
+.tox .tox-well > *:first-child {
+  margin-top: 0;
+}
+.tox .tox-well > *:last-child {
+  margin-bottom: 0;
+}
+.tox .tox-well > *:only-child {
+  margin: 0;
+}
+.tox .tox-custom-editor {
+  border: 1px solid #000000;
+  border-radius: 3px;
+  display: flex;
+  flex: 1;
+  position: relative;
+}
+/* stylelint-disable */
+.tox {
+  /* stylelint-enable */
+}
+.tox .tox-dialog-loading::before {
+  background-color: rgba(0, 0, 0, 0.5);
+  content: "";
+  height: 100%;
+  position: absolute;
+  width: 100%;
+  z-index: 1000;
+}
+.tox .tox-tab {
+  cursor: pointer;
+}
+.tox .tox-dialog__content-js {
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-dialog__body-content .tox-collection {
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-image-tools-edit-panel {
+  height: 60px;
+}
+.tox .tox-image-tools__sidebar {
+  height: 60px;
+}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide-dark/skin.min.css
@@ -1,1 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.tox{box-sizing:content-box;color:#2a3746;cursor:auto;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:normal;-webkit-tap-highlight-color:transparent;text-decoration:none;text-shadow:none;text-transform:none;vertical-align:initial;white-space:normal}.tox :not(svg):not(rect){box-sizing:inherit;color:inherit;cursor:inherit;direction:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;-webkit-tap-highlight-color:inherit;text-align:inherit;text-decoration:inherit;text-shadow:inherit;text-transform:inherit;vertical-align:inherit;white-space:inherit}.tox :not(svg):not(rect){background:0 0;border:0;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.tox:not([dir=rtl]){direction:ltr;text-align:left}.tox[dir=rtl]{direction:rtl;text-align:right}.tox-tinymce{border:1px solid #000;border-radius:0;box-shadow:none;box-sizing:border-box;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;overflow:hidden;position:relative;visibility:inherit!important}.tox-tinymce-inline{border:none;box-shadow:none}.tox-tinymce-inline .tox-editor-header{border:1px solid #000;border-radius:0;box-shadow:none}.tox-tinymce-aux{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;z-index:1300}.tox-tinymce :focus,.tox-tinymce-aux :focus{outline:0}button::-moz-focus-inner{border:0}.tox .accessibility-issue__header{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description{align-items:stretch;border:1px solid #000;border-radius:3px;display:flex;justify-content:space-between}.tox .accessibility-issue__description>div{padding-bottom:4px}.tox .accessibility-issue__description>div>div{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description>:last-child:not(:only-child){border-color:#000;border-style:solid}.tox .accessibility-issue__repair{margin-top:16px}.tox .accessibility-issue--info .accessibility-issue__description{background-color:rgba(32,122,183,.5);border-color:#207ab7;color:#fff}.tox .accessibility-issue--info .accessibility-issue__description>:last-child{border-color:#207ab7}.tox .accessibility-issue--info h2{color:#fff}.tox .accessibility-issue--info .tox-icon svg{fill:#fff}.tox .accessibility-issue--info a .tox-icon{color:#fff}.tox .accessibility-issue--warn .accessibility-issue__description{background-color:rgba(255,165,0,.5);border-color:rgba(255,165,0,.8);color:#fff}.tox .accessibility-issue--warn .accessibility-issue__description>:last-child{border-color:rgba(255,165,0,.8)}.tox .accessibility-issue--warn h2{color:#fff}.tox .accessibility-issue--warn .tox-icon svg{fill:#fff}.tox .accessibility-issue--warn a .tox-icon{color:#fff}.tox .accessibility-issue--error .accessibility-issue__description{background-color:rgba(204,0,0,.5);border-color:rgba(204,0,0,.8);color:#fff}.tox .accessibility-issue--error .accessibility-issue__description>:last-child{border-color:rgba(204,0,0,.8)}.tox .accessibility-issue--error h2{color:#fff}.tox .accessibility-issue--error .tox-icon svg{fill:#fff}.tox .accessibility-issue--error a .tox-icon{color:#fff}.tox .accessibility-issue--success .accessibility-issue__description{background-color:rgba(120,171,70,.5);border-color:rgba(120,171,70,.8);color:#fff}.tox .accessibility-issue--success .accessibility-issue__description>:last-child{border-color:rgba(120,171,70,.8)}.tox .accessibility-issue--success h2{color:#fff}.tox .accessibility-issue--success .tox-icon svg{fill:#fff}.tox .accessibility-issue--success a .tox-icon{color:#fff}.tox .tox-dialog__body-content .accessibility-issue__header h1,.tox .tox-dialog__body-content .tox-form__group .accessibility-issue__description h2{margin-top:0}.tox:not([dir=rtl]) .accessibility-issue__header .tox-button{margin-left:4px}.tox:not([dir=rtl]) .accessibility-issue__header>:nth-last-child(2){margin-left:auto}.tox:not([dir=rtl]) .accessibility-issue__description{padding:4px 4px 4px 8px}.tox:not([dir=rtl]) .accessibility-issue__description>:last-child{border-left-width:1px;padding-left:4px}.tox[dir=rtl] .accessibility-issue__header .tox-button{margin-right:4px}.tox[dir=rtl] .accessibility-issue__header>:nth-last-child(2){margin-right:auto}.tox[dir=rtl] .accessibility-issue__description{padding:4px 8px 4px 4px}.tox[dir=rtl] .accessibility-issue__description>:last-child{border-right-width:1px;padding-right:4px}.tox .tox-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bar{display:flex;flex:0 0 auto}.tox .tox-button{background-color:#207ab7;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#207ab7;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;font-weight:700;letter-spacing:normal;line-height:24px;margin:0;outline:0;padding:4px 16px;text-align:center;text-decoration:none;text-transform:capitalize;white-space:nowrap}.tox .tox-button[disabled]{background-color:#207ab7;background-image:none;border-color:#207ab7;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-button:focus:not(:disabled){background-color:#1c6ca1;background-image:none;border-color:#1c6ca1;box-shadow:none;color:#fff}.tox .tox-button:hover:not(:disabled){background-color:#1c6ca1;background-image:none;border-color:#1c6ca1;box-shadow:none;color:#fff}.tox .tox-button:active:not(:disabled){background-color:#185d8c;background-image:none;border-color:#185d8c;box-shadow:none;color:#fff}.tox .tox-button--secondary{background-color:#3d546f;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#3d546f;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;color:#fff;outline:0;padding:4px 16px;text-decoration:none;text-transform:capitalize}.tox .tox-button--secondary[disabled]{background-color:#3d546f;background-image:none;border-color:#3d546f;box-shadow:none;color:rgba(255,255,255,.5)}.tox .tox-button--secondary:focus:not(:disabled){background-color:#34485f;background-image:none;border-color:#34485f;box-shadow:none;color:#fff}.tox .tox-button--secondary:hover:not(:disabled){background-color:#34485f;background-image:none;border-color:#34485f;box-shadow:none;color:#fff}.tox .tox-button--secondary:active:not(:disabled){background-color:#2b3b4e;background-image:none;border-color:#2b3b4e;box-shadow:none;color:#fff}.tox .tox-button--icon,.tox .tox-button.tox-button--icon,.tox .tox-button.tox-button--secondary.tox-button--icon{padding:4px}.tox .tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg{display:block;fill:currentColor}.tox .tox-button-link{background:0;border:none;box-sizing:border-box;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;white-space:nowrap}.tox .tox-button-link--sm{font-size:14px}.tox .tox-button--naked{background-color:transparent;border-color:transparent;box-shadow:unset;color:#fff}.tox .tox-button--naked[disabled]{background-color:#3d546f;border-color:#3d546f;box-shadow:none;color:rgba(255,255,255,.5)}.tox .tox-button--naked:hover:not(:disabled){background-color:#34485f;border-color:#34485f;box-shadow:none;color:#fff}.tox .tox-button--naked:focus:not(:disabled){background-color:#34485f;border-color:#34485f;box-shadow:none;color:#fff}.tox .tox-button--naked:active:not(:disabled){background-color:#2b3b4e;border-color:#2b3b4e;box-shadow:none;color:#fff}.tox .tox-button--naked .tox-icon svg{fill:currentColor}.tox .tox-button--naked.tox-button--icon:hover:not(:disabled){color:#fff}.tox .tox-checkbox{align-items:center;border-radius:3px;cursor:pointer;display:flex;height:36px;min-width:36px}.tox .tox-checkbox__input{height:1px;overflow:hidden;position:absolute;top:auto;width:1px}.tox .tox-checkbox__icons{align-items:center;border-radius:3px;box-shadow:0 0 0 2px transparent;box-sizing:content-box;display:flex;height:24px;justify-content:center;padding:calc(4px - 1px);width:24px}.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:block;fill:rgba(255,255,255,.2)}.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:none;fill:#207ab7}.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg{display:none;fill:#207ab7}.tox .tox-checkbox--disabled{color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__checked svg{fill:rgba(255,255,255,.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:rgba(255,255,255,.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{fill:rgba(255,255,255,.5)}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__checked svg{display:block}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:block}.tox input.tox-checkbox__input:focus+.tox-checkbox__icons{border-radius:3px;box-shadow:inset 0 0 0 1px #207ab7;padding:calc(4px - 1px)}.tox:not([dir=rtl]) .tox-checkbox__label{margin-left:4px}.tox:not([dir=rtl]) .tox-checkbox__input{left:-10000px}.tox:not([dir=rtl]) .tox-bar .tox-checkbox{margin-left:4px}.tox[dir=rtl] .tox-checkbox__label{margin-right:4px}.tox[dir=rtl] .tox-checkbox__input{right:-10000px}.tox[dir=rtl] .tox-bar .tox-checkbox{margin-right:4px}.tox .tox-collection--toolbar .tox-collection__group{display:flex;padding:0}.tox .tox-collection--grid .tox-collection__group{display:flex;flex-wrap:wrap;max-height:208px;overflow-x:hidden;overflow-y:auto;padding:0}.tox .tox-collection--list .tox-collection__group{border-bottom-width:0;border-color:#1a1a1a;border-left-width:0;border-right-width:0;border-style:solid;border-top-width:1px;padding:4px 0}.tox .tox-collection--list .tox-collection__group:first-child{border-top-width:0}.tox .tox-collection__group-heading{background-color:#333;color:#fff;cursor:default;font-size:12px;font-style:normal;font-weight:400;margin-bottom:4px;margin-top:-4px;padding:4px 8px;text-transform:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tox .tox-collection__item{align-items:center;color:#fff;cursor:pointer;display:flex;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tox .tox-collection--list .tox-collection__item{padding:4px 8px}.tox .tox-collection--toolbar .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--grid .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--list .tox-collection__item--enabled{background-color:#2b3b4e;color:#fff}.tox .tox-collection--list .tox-collection__item--active{background-color:#4a5562}.tox .tox-collection--toolbar .tox-collection__item--enabled{background-color:#757d87;color:#fff}.tox .tox-collection--toolbar .tox-collection__item--active{background-color:#4a5562}.tox .tox-collection--grid .tox-collection__item--enabled{background-color:#757d87;color:#fff}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#4a5562;color:#fff}.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#fff}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#fff}.tox .tox-collection__item--state-disabled{background-color:transparent;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-collection__item-checkmark,.tox .tox-collection__item-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.tox .tox-collection__item-checkmark svg,.tox .tox-collection__item-icon svg{fill:currentColor}.tox .tox-collection--toolbar-lg .tox-collection__item-icon{height:48px;width:48px}.tox .tox-collection__item-label{color:currentColor;display:inline-block;flex:1;-ms-flex-preferred-size:auto;font-size:14px;font-style:normal;font-weight:400;line-height:24px;text-transform:none;word-break:break-all}.tox .tox-collection__item-accessory{color:rgba(255,255,255,.5);display:inline-block;font-size:14px;height:24px;line-height:24px;text-transform:none}.tox .tox-collection__item-caret{align-items:center;display:flex;min-height:24px}.tox .tox-collection__item-caret::after{content:'';font-size:0;min-height:inherit}.tox .tox-collection__item-caret svg{fill:#fff}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg{display:none}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-accessory+.tox-collection__item-checkmark{display:none}.tox .tox-collection--horizontal{background-color:#2b3b4e;border:1px solid #1a1a1a;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:nowrap;margin-bottom:0;overflow-x:auto;padding:0}.tox .tox-collection--horizontal .tox-collection__group{align-items:center;display:flex;flex-wrap:nowrap;margin:0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item{height:34px;margin:2px 0 3px 0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item-label{white-space:nowrap}.tox .tox-collection--horizontal .tox-collection__item-caret{margin-left:4px}.tox:not([dir=rtl]) .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-right:1px solid #000}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>:not(:first-child){margin-left:8px}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item-label:first-child{margin-left:4px}.tox:not([dir=rtl]) .tox-collection__item-accessory{margin-left:16px;text-align:right}.tox:not([dir=rtl]) .tox-collection .tox-collection__item-caret{margin-left:16px}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-left:1px solid #000}.tox[dir=rtl] .tox-collection--list .tox-collection__item>:not(:first-child){margin-right:8px}.tox[dir=rtl] .tox-collection--list .tox-collection__item-label:first-child{margin-right:4px}.tox[dir=rtl] .tox-collection__item-icon-rtl .tox-collection__item-icon svg{transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection__item-accessory{margin-right:16px;text-align:left}.tox[dir=rtl] .tox-collection .tox-collection__item-caret{margin-right:16px;transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__item-caret{margin-right:4px}.tox .tox-color-picker-container{display:flex;flex-direction:row;height:225px;margin:0}.tox .tox-sv-palette{box-sizing:border-box;display:flex;height:100%}.tox .tox-sv-palette-spectrum{height:100%}.tox .tox-sv-palette,.tox .tox-sv-palette-spectrum{width:225px}.tox .tox-sv-palette-thumb{background:0 0;border:1px solid #000;border-radius:50%;box-sizing:content-box;height:12px;position:absolute;width:12px}.tox .tox-sv-palette-inner-thumb{border:1px solid #fff;border-radius:50%;height:10px;position:absolute;width:10px}.tox .tox-hue-slider{box-sizing:border-box;height:100%;width:25px}.tox .tox-hue-slider-spectrum{background:linear-gradient(to bottom,red,#ff0080,#f0f,#8000ff,#00f,#0080ff,#0ff,#00ff80,#0f0,#80ff00,#ff0,#ff8000,red);height:100%;width:100%}.tox .tox-hue-slider,.tox .tox-hue-slider-spectrum{width:20px}.tox .tox-hue-slider-thumb{background:#fff;border:1px solid #000;box-sizing:content-box;height:4px;width:100%}.tox .tox-rgb-form{display:flex;flex-direction:column;justify-content:space-between}.tox .tox-rgb-form div{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px;width:inherit}.tox .tox-rgb-form input{width:6em}.tox .tox-rgb-form input.tox-invalid{border:1px solid red!important}.tox .tox-rgb-form .tox-rgba-preview{border:1px solid #000;flex-grow:2;margin-bottom:0}.tox:not([dir=rtl]) .tox-sv-palette{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider-thumb{margin-left:-1px}.tox:not([dir=rtl]) .tox-rgb-form label{margin-right:.5em}.tox[dir=rtl] .tox-sv-palette{margin-left:15px}.tox[dir=rtl] .tox-hue-slider{margin-left:15px}.tox[dir=rtl] .tox-hue-slider-thumb{margin-right:-1px}.tox[dir=rtl] .tox-rgb-form label{margin-left:.5em}.tox .tox-toolbar .tox-swatches,.tox .tox-toolbar__overflow .tox-swatches,.tox .tox-toolbar__primary .tox-swatches{margin:2px 0 3px 4px}.tox .tox-collection--list .tox-collection__group .tox-swatches-menu{border:0;margin:-4px 0}.tox .tox-swatches__row{display:flex}.tox .tox-swatch{height:30px;transition:transform .15s,box-shadow .15s;width:30px}.tox .tox-swatch:focus,.tox .tox-swatch:hover{box-shadow:0 0 0 1px rgba(127,127,127,.3) inset;transform:scale(.8)}.tox .tox-swatch--remove{align-items:center;display:flex;justify-content:center}.tox .tox-swatch--remove svg path{stroke:#e74c3c}.tox .tox-swatches__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-swatches__picker-btn svg{height:24px;width:24px}.tox .tox-swatches__picker-btn:hover{background:#4a5562}.tox:not([dir=rtl]) .tox-swatches__picker-btn{margin-left:auto}.tox[dir=rtl] .tox-swatches__picker-btn{margin-right:auto}.tox .tox-comment-thread{background:#2b3b4e;position:relative}.tox .tox-comment-thread>:not(:first-child){margin-top:8px}.tox .tox-comment{background:#2b3b4e;border:1px solid #000;border-radius:3px;box-shadow:0 4px 8px 0 rgba(42,55,70,.1);padding:8px 8px 16px 8px;position:relative}.tox .tox-comment__header{align-items:center;color:#fff;display:flex;justify-content:space-between}.tox .tox-comment__date{color:rgba(255,255,255,.5);font-size:12px}.tox .tox-comment__body{color:#fff;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;margin-top:8px;position:relative;text-transform:initial}.tox .tox-comment__body textarea{resize:none;white-space:normal;width:100%}.tox .tox-comment__expander{padding-top:8px}.tox .tox-comment__expander p{color:rgba(255,255,255,.5);font-size:14px;font-style:normal}.tox .tox-comment__body p{margin:0}.tox .tox-comment__buttonspacing{padding-top:16px;text-align:center}.tox .tox-comment-thread__overlay::after{background:#2b3b4e;bottom:0;content:"";display:flex;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:5}.tox .tox-comment__reply{display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}.tox .tox-comment__reply>:first-child{margin-bottom:8px;width:100%}.tox .tox-comment__edit{display:flex;flex-wrap:wrap;justify-content:flex-end;margin-top:16px}.tox .tox-comment__gradient::after{background:linear-gradient(rgba(43,59,78,0),#2b3b4e);bottom:0;content:"";display:block;height:5em;margin-top:-40px;position:absolute;width:100%}.tox .tox-comment__overlay{background:#2b3b4e;bottom:0;display:flex;flex-direction:column;flex-grow:1;left:0;opacity:.9;position:absolute;right:0;text-align:center;top:0;z-index:5}.tox .tox-comment__loading-text{align-items:center;color:#fff;display:flex;flex-direction:column;position:relative}.tox .tox-comment__loading-text>div{padding-bottom:16px}.tox .tox-comment__overlaytext{bottom:0;flex-direction:column;font-size:14px;left:0;padding:1em;position:absolute;right:0;top:0;z-index:10}.tox .tox-comment__overlaytext p{background-color:#2b3b4e;box-shadow:0 0 8px 8px #2b3b4e;color:#fff;text-align:center}.tox .tox-comment__overlaytext div:nth-of-type(2){font-size:.8em}.tox .tox-comment__busy-spinner{align-items:center;background-color:#2b3b4e;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:20}.tox .tox-comment__scroll{display:flex;flex-direction:column;flex-shrink:1;overflow:auto}.tox .tox-conversations{margin:8px}.tox:not([dir=rtl]) .tox-comment__edit{margin-left:8px}.tox:not([dir=rtl]) .tox-comment__buttonspacing>:last-child,.tox:not([dir=rtl]) .tox-comment__edit>:last-child,.tox:not([dir=rtl]) .tox-comment__reply>:last-child{margin-left:8px}.tox[dir=rtl] .tox-comment__edit{margin-right:8px}.tox[dir=rtl] .tox-comment__buttonspacing>:last-child,.tox[dir=rtl] .tox-comment__edit>:last-child,.tox[dir=rtl] .tox-comment__reply>:last-child{margin-right:8px}.tox .tox-user{align-items:center;display:flex}.tox .tox-user__avatar svg{fill:rgba(255,255,255,.5)}.tox .tox-user__name{color:rgba(255,255,255,.5);font-size:12px;font-style:normal;font-weight:700;text-transform:uppercase}.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right:8px}.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left:8px}.tox[dir=rtl] .tox-user__avatar svg{margin-left:8px}.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right:8px}.tox .tox-dialog-wrap{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:1100}.tox .tox-dialog-wrap__backdrop{background-color:rgba(34,47,62,.75);bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}.tox .tox-dialog-wrap__backdrop--opaque{background-color:#222f3e}.tox .tox-dialog{background-color:#2b3b4e;border-color:#000;border-radius:3px;border-style:solid;border-width:1px;box-shadow:0 16px 16px -10px rgba(42,55,70,.15),0 0 40px 1px rgba(42,55,70,.15);display:flex;flex-direction:column;max-height:100%;max-width:480px;overflow:hidden;position:relative;width:95vw;z-index:2}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog{align-self:flex-start;margin:8px auto;width:calc(100vw - 16px)}}.tox .tox-dialog-inline{z-index:1100}.tox .tox-dialog__header{align-items:center;background-color:#2b3b4e;border-bottom:none;color:#fff;display:flex;font-size:16px;justify-content:space-between;padding:8px 16px 0 16px;position:relative}.tox .tox-dialog__header .tox-button{z-index:1}.tox .tox-dialog__draghandle{cursor:grab;height:100%;left:0;position:absolute;top:0;width:100%}.tox .tox-dialog__draghandle:active{cursor:grabbing}.tox .tox-dialog__dismiss{margin-left:auto}.tox .tox-dialog__title{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-style:normal;font-weight:400;line-height:1.3;margin:0;text-transform:none}.tox .tox-dialog__body{color:#fff;display:flex;flex:1;-ms-flex-preferred-size:auto;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;min-width:0;text-align:left;text-transform:none}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body{flex-direction:column}}.tox .tox-dialog__body-nav{align-items:flex-start;display:flex;flex-direction:column;padding:16px 16px}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body-nav{flex-direction:row;-webkit-overflow-scrolling:touch;overflow-x:auto;padding-bottom:0}}.tox .tox-dialog__body-nav-item{border-bottom:2px solid transparent;color:rgba(255,255,255,.5);display:inline-block;font-size:14px;line-height:1.3;margin-bottom:8px;text-decoration:none;white-space:nowrap}.tox .tox-dialog__body-nav-item:focus{background-color:rgba(32,122,183,.1)}.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid #207ab7;color:#207ab7}.tox .tox-dialog__body-content{box-sizing:border-box;display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto;max-height:650px;overflow:auto;-webkit-overflow-scrolling:touch;padding:16px 16px}.tox .tox-dialog__body-content>*{margin-bottom:0;margin-top:16px}.tox .tox-dialog__body-content>:first-child{margin-top:0}.tox .tox-dialog__body-content>:last-child{margin-bottom:0}.tox .tox-dialog__body-content>:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content a{color:#207ab7;cursor:pointer;text-decoration:none}.tox .tox-dialog__body-content a:focus,.tox .tox-dialog__body-content a:hover{color:#185d8c;text-decoration:none}.tox .tox-dialog__body-content a:active{color:#185d8c;text-decoration:none}.tox .tox-dialog__body-content svg{fill:#fff}.tox .tox-dialog__body-content ul{display:block;list-style-type:disc;margin-bottom:16px;-webkit-margin-end:0;margin-inline-end:0;-webkit-margin-start:0;margin-inline-start:0;-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}.tox .tox-dialog__body-content .tox-form__group h1{font-size:20px;font-weight:700;margin-bottom:16px;margin-top:2rem}.tox .tox-dialog__body-content .tox-form__group h2{font-size:16px;font-weight:700;margin-bottom:16px;margin-top:2rem}.tox .tox-dialog__body-content .tox-form__group p{margin-bottom:16px}.tox .tox-dialog__body-content .tox-form__group h1:first-child,.tox .tox-dialog__body-content .tox-form__group h2:first-child,.tox .tox-dialog__body-content .tox-form__group p:first-child{margin-top:0}.tox .tox-dialog__body-content .tox-form__group h1:last-child,.tox .tox-dialog__body-content .tox-form__group h2:last-child,.tox .tox-dialog__body-content .tox-form__group p:last-child{margin-bottom:0}.tox .tox-dialog__body-content .tox-form__group h1:only-child,.tox .tox-dialog__body-content .tox-form__group h2:only-child,.tox .tox-dialog__body-content .tox-form__group p:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog--width-lg{height:650px;max-width:1200px}.tox .tox-dialog--width-md{max-width:800px}.tox .tox-dialog--width-md .tox-dialog__body-content{overflow:auto}.tox .tox-dialog__body-content--centered{text-align:center}.tox .tox-dialog__footer{align-items:center;background-color:#2b3b4e;border-top:1px solid #000;display:flex;justify-content:space-between;padding:8px 16px}.tox .tox-dialog__footer-end,.tox .tox-dialog__footer-start{display:flex}.tox .tox-dialog__busy-spinner{align-items:center;background-color:rgba(34,47,62,.75);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:3}.tox .tox-dialog__table{border-collapse:collapse;width:100%}.tox .tox-dialog__table thead th{font-weight:700;padding-bottom:8px}.tox .tox-dialog__table tbody tr{border-bottom:1px solid #000}.tox .tox-dialog__table tbody tr:last-child{border-bottom:none}.tox .tox-dialog__table td{padding-bottom:8px;padding-top:8px}.tox .tox-dialog__popups{position:absolute;width:100%;z-index:1100}.tox .tox-dialog__body-iframe{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-iframe .tox-navobj{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2){flex:1;-ms-flex-preferred-size:auto;height:100%}.tox .tox-dialog-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-dialog-dock-fadein{opacity:1;visibility:visible}.tox .tox-dialog-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein{transition-delay:0s}body.tox-dialog__disable-scroll{overflow:hidden}.tox.tox-platform-ie .tox-dialog-wrap{position:-ms-device-fixed}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav{margin-right:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child){margin-left:8px}}.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end>*,.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start>*{margin-left:8px}.tox[dir=rtl] .tox-dialog__body{text-align:right}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav{margin-left:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child){margin-right:8px}}.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end>*,.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start>*{margin-right:8px}.tox .tox-dropzone-container{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dropzone{align-items:center;background:#fff;border:2px dashed #000;box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;min-height:100px;padding:10px}.tox .tox-dropzone p{color:rgba(255,255,255,.5);margin:0 0 16px 0}.tox .tox-edit-area{display:flex;flex:1;-ms-flex-preferred-size:auto;overflow:hidden;position:relative}.tox .tox-edit-area__iframe{background-color:#fff;border:0;box-sizing:border-box;flex:1;-ms-flex-preferred-size:auto;height:100%;position:absolute;width:100%}.tox.tox-inline-edit-area{border:1px dotted #000}.tox .tox-editor-container{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-editor-header{z-index:1}.tox:not(.tox-tinymce-inline) .tox-editor-header{box-shadow:none;transition:box-shadow .5s}.tox.tox-tinymce--toolbar-bottom .tox-editor-header,.tox.tox-tinymce-inline .tox-editor-header{margin-bottom:-1px}.tox.tox-tinymce--toolbar-sticky-on .tox-editor-header{box-shadow:0 4px 4px -3px rgba(0,0,0,.25)}.tox-editor-dock-fadeout{opacity:0;visibility:hidden}.tox-editor-dock-fadein{opacity:1;visibility:visible}.tox-editor-dock-transition{transition:visibility 0s linear .25s,opacity .25s ease}.tox-editor-dock-transition.tox-editor-dock-fadein{transition-delay:0s}.tox .tox-control-wrap{flex:1;position:relative}.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid{display:none}.tox .tox-control-wrap svg{display:block}.tox .tox-control-wrap__status-icon-wrap{position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-control-wrap__status-icon-invalid svg{fill:#c00}.tox .tox-control-wrap__status-icon-unknown svg{fill:orange}.tox .tox-control-wrap__status-icon-valid svg{fill:green}.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield{padding-right:32px}.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap{right:4px}.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield{padding-left:32px}.tox[dir=rtl] .tox-control-wrap__status-icon-wrap{left:4px}.tox .tox-autocompleter{max-width:25em}.tox .tox-autocompleter .tox-menu{max-width:25em}.tox .tox-autocompleter .tox-autocompleter-highlight{font-weight:700}.tox .tox-color-input{display:flex;position:relative;z-index:1}.tox .tox-color-input .tox-textfield{z-index:-1}.tox .tox-color-input span{border-color:rgba(42,55,70,.2);border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;height:24px;position:absolute;top:6px;width:24px}.tox .tox-color-input span:focus:not([aria-disabled=true]),.tox .tox-color-input span:hover:not([aria-disabled=true]){border-color:#207ab7;cursor:pointer}.tox .tox-color-input span::before{background-image:linear-gradient(45deg,rgba(255,255,255,.25) 25%,transparent 25%),linear-gradient(-45deg,rgba(255,255,255,.25) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(255,255,255,.25) 75%),linear-gradient(-45deg,transparent 75%,rgba(255,255,255,.25) 75%);background-position:0 0,0 6px,6px -6px,-6px 0;background-size:12px 12px;border:1px solid #2b3b4e;border-radius:3px;box-sizing:border-box;content:'';height:24px;left:-1px;position:absolute;top:-1px;width:24px;z-index:-1}.tox .tox-color-input span[aria-disabled=true]{cursor:not-allowed}.tox:not([dir=rtl]) .tox-color-input .tox-textfield{padding-left:36px}.tox:not([dir=rtl]) .tox-color-input span{left:6px}.tox[dir=rtl] .tox-color-input .tox-textfield{padding-right:36px}.tox[dir=rtl] .tox-color-input span{right:6px}.tox .tox-label,.tox .tox-toolbar-label{color:rgba(255,255,255,.5);display:block;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;padding:0 8px 0 0;text-transform:none;white-space:nowrap}.tox .tox-toolbar-label{padding:0 8px}.tox[dir=rtl] .tox-label{padding:0 0 0 8px}.tox .tox-form{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-form__group{box-sizing:border-box;margin-bottom:4px}.tox .tox-form-group--maximize{flex:1}.tox .tox-form__group--error{color:#c00}.tox .tox-form__group--collection{display:flex}.tox .tox-form__grid{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}.tox .tox-form__grid--2col>.tox-form__group{width:calc(50% - (8px / 2))}.tox .tox-form__grid--3col>.tox-form__group{width:calc(100% / 3 - (8px / 2))}.tox .tox-form__grid--4col>.tox-form__group{width:calc(25% - (8px / 2))}.tox .tox-form__controls-h-stack{align-items:center;display:flex}.tox .tox-form__group--inline{align-items:center;display:flex}.tox .tox-form__group--stretched{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-textarea{flex:1;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-navobj{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex:1;-ms-flex-preferred-size:auto;height:100%}.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-form__controls-h-stack>:not(:first-child){margin-right:4px}.tox .tox-lock.tox-locked .tox-lock-icon__unlock,.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock{display:none}.tox .tox-selectfield select,.tox .tox-textarea,.tox .tox-textfield,.tox .tox-toolbar-textfield{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#2b3b4e;border-color:#000;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#fff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 4.75px;resize:none;width:100%}.tox .tox-textarea[disabled],.tox .tox-textfield[disabled]{background-color:#222f3e;color:rgba(255,255,255,.85);cursor:not-allowed}.tox .tox-selectfield select:focus,.tox .tox-textarea:focus,.tox .tox-textfield:focus{border-color:#207ab7;box-shadow:none;outline:0}.tox .tox-toolbar-textfield{border-width:0;margin-bottom:3px;margin-top:2px;max-width:250px}.tox .tox-naked-btn{background-color:transparent;border:0;border-color:transparent;box-shadow:unset;color:#207ab7;cursor:pointer;display:block;margin:0;padding:0}.tox .tox-naked-btn svg{display:block;fill:#fff}.tox:not([dir=rtl]) .tox-toolbar-textfield+*{margin-left:4px}.tox[dir=rtl] .tox-toolbar-textfield+*{margin-right:4px}.tox .tox-selectfield{cursor:pointer;position:relative}.tox .tox-selectfield select[disabled]{background-color:#19232e;color:rgba(255,255,255,.85);cursor:not-allowed}.tox .tox-selectfield select::-ms-expand{display:none}.tox .tox-selectfield svg{pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}.tox:not([dir=rtl]) .tox-selectfield select[size="0"],.tox:not([dir=rtl]) .tox-selectfield select[size="1"]{padding-right:24px}.tox:not([dir=rtl]) .tox-selectfield svg{right:8px}.tox[dir=rtl] .tox-selectfield select[size="0"],.tox[dir=rtl] .tox-selectfield select[size="1"]{padding-left:24px}.tox[dir=rtl] .tox-selectfield svg{left:8px}.tox .tox-textarea{-webkit-appearance:textarea;-moz-appearance:textarea;appearance:textarea;white-space:pre-wrap}.tox-fullscreen{border:0;height:100%;left:0;margin:0;overflow:hidden;-ms-scroll-chaining:none;overscroll-behavior:none;padding:0;position:fixed;top:0;touch-action:pinch-zoom;width:100%}.tox-fullscreen .tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-fullscreen .tox.tox-tinymce.tox-fullscreen{z-index:1200}.tox-fullscreen .tox.tox-tinymce-aux{z-index:1201}.tox .tox-help__more-link{list-style:none;margin-top:1em}.tox .tox-image-tools{width:100%}.tox .tox-image-tools__toolbar{align-items:center;display:flex;justify-content:center}.tox .tox-image-tools__image{background-color:#666;height:380px;overflow:auto;position:relative;width:100%}.tox .tox-image-tools__image,.tox .tox-image-tools__image+.tox-image-tools__toolbar{margin-top:8px}.tox .tox-image-tools__image-bg{background:url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==)}.tox .tox-image-tools__toolbar>.tox-spacer{flex:1;-ms-flex-preferred-size:auto}.tox .tox-croprect-block{background:#000;opacity:.5;position:absolute;zoom:1}.tox .tox-croprect-handle{border:2px solid #fff;height:20px;left:0;position:absolute;top:0;width:20px}.tox .tox-croprect-handle-move{border:0;cursor:move;position:absolute}.tox .tox-croprect-handle-nw{border-width:2px 0 0 2px;cursor:nw-resize;left:100px;margin:-2px 0 0 -2px;top:100px}.tox .tox-croprect-handle-ne{border-width:2px 2px 0 0;cursor:ne-resize;left:200px;margin:-2px 0 0 -20px;top:100px}.tox .tox-croprect-handle-sw{border-width:0 0 2px 2px;cursor:sw-resize;left:100px;margin:-20px 2px 0 -2px;top:200px}.tox .tox-croprect-handle-se{border-width:0 2px 2px 0;cursor:se-resize;left:200px;margin:-20px 0 0 -20px;top:200px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-left:8px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-left:32px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-left:32px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-right:8px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-right:32px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-right:32px}.tox .tox-insert-table-picker{display:flex;flex-wrap:wrap;width:170px}.tox .tox-insert-table-picker>div{border-color:#000;border-style:solid;border-width:0 1px 1px 0;box-sizing:border-box;height:17px;width:17px}.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin:-4px 0}.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color:rgba(32,122,183,.5);border-color:rgba(32,122,183,.5)}.tox .tox-insert-table-picker__label{color:#fff;display:block;font-size:14px;padding:4px;text-align:center;width:100%}.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right:0}.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right:0}.tox .tox-menu{background-color:#2b3b4e;border:1px solid #000;border-radius:3px;box-shadow:0 4px 8px 0 rgba(42,55,70,.1);display:inline-block;overflow:hidden;vertical-align:top;z-index:1150}.tox .tox-menu.tox-collection.tox-collection--list{padding:0}.tox .tox-menu.tox-collection.tox-collection--toolbar{padding:4px}.tox .tox-menu.tox-collection.tox-collection--grid{padding:4px}.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin:0}.tox .tox-menubar{background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23000000'/%3E%3C/svg%3E") left 0 top 0 #222f3e;background-color:#222f3e;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 4px 0 4px}.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar{border-top:1px solid #000}.tox .tox-mbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#fff;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:34px;justify-content:center;margin:2px 0 3px 0;outline:0;overflow:hidden;padding:0 4px;text-transform:none;width:auto}.tox .tox-mbtn[disabled]{background-color:transparent;border:0;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-mbtn:focus:not(:disabled){background:#4a5562;border:0;box-shadow:none;color:#fff}.tox .tox-mbtn--active{background:#757d87;border:0;box-shadow:none;color:#fff}.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active){background:#4a5562;border:0;box-shadow:none;color:#fff}.tox .tox-mbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-mbtn[disabled] .tox-mbtn__select-label{cursor:not-allowed}.tox .tox-mbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px;display:none}.tox .tox-notification{border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;display:-ms-grid;display:grid;font-size:14px;font-weight:400;-ms-grid-columns:minmax(40px,1fr) auto minmax(40px,1fr);grid-template-columns:minmax(40px,1fr) auto minmax(40px,1fr);margin-top:4px;opacity:0;padding:4px;transition:transform .1s ease-in,opacity 150ms ease-in}.tox .tox-notification p{font-size:14px;font-weight:400}.tox .tox-notification a{text-decoration:underline}.tox .tox-notification--in{opacity:1}.tox .tox-notification--success{background-color:#e4eeda;border-color:#d7e6c8;color:#fff}.tox .tox-notification--success p{color:#fff}.tox .tox-notification--success a{color:#547831}.tox .tox-notification--success svg{fill:#fff}.tox .tox-notification--error{background-color:#f8dede;border-color:#f2bfbf;color:#fff}.tox .tox-notification--error p{color:#fff}.tox .tox-notification--error a{color:#c00}.tox .tox-notification--error svg{fill:#fff}.tox .tox-notification--warn,.tox .tox-notification--warning{background-color:#fffaea;border-color:#ffe89d;color:#fff}.tox .tox-notification--warn p,.tox .tox-notification--warning p{color:#fff}.tox .tox-notification--warn a,.tox .tox-notification--warning a{color:#fff}.tox .tox-notification--warn svg,.tox .tox-notification--warning svg{fill:#fff}.tox .tox-notification--info{background-color:#d9edf7;border-color:#779ecb;color:#fff}.tox .tox-notification--info p{color:#fff}.tox .tox-notification--info a{color:#fff}.tox .tox-notification--info svg{fill:#fff}.tox .tox-notification__body{-ms-grid-row-align:center;align-self:center;color:#fff;font-size:14px;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-column:2;grid-column-start:2;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;text-align:center;white-space:normal;word-break:break-all;word-break:break-word}.tox .tox-notification__body>*{margin:0}.tox .tox-notification__body>*+*{margin-top:1rem}.tox .tox-notification__icon{-ms-grid-row-align:center;align-self:center;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-column:1;grid-column-start:1;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-column-align:end;justify-self:end}.tox .tox-notification__icon svg{display:block}.tox .tox-notification__dismiss{-ms-grid-row-align:start;align-self:start;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-column:3;grid-column-start:3;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-column-align:end;justify-self:end}.tox .tox-notification .tox-progress-bar{-ms-grid-column-span:3;grid-column-end:4;-ms-grid-column:1;grid-column-start:1;-ms-grid-row-span:1;grid-row-end:3;-ms-grid-row:2;grid-row-start:2;-ms-grid-column-align:center;justify-self:center}.tox .tox-pop{display:inline-block;position:relative}.tox .tox-pop--resizing{transition:width .1s ease}.tox .tox-pop--resizing .tox-toolbar{flex-wrap:nowrap}.tox .tox-pop__dialog{background-color:#222f3e;border:1px solid #000;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15);min-width:0;overflow:hidden}.tox .tox-pop__dialog>:not(.tox-toolbar){margin:4px 4px 4px 8px}.tox .tox-pop__dialog .tox-toolbar{background-color:transparent;margin-bottom:-1px}.tox .tox-pop::after,.tox .tox-pop::before{border-style:solid;content:'';display:block;height:0;position:absolute;width:0}.tox .tox-pop.tox-pop--bottom::after,.tox .tox-pop.tox-pop--bottom::before{left:50%;top:100%}.tox .tox-pop.tox-pop--bottom::after{border-color:#222f3e transparent transparent transparent;border-width:8px;margin-left:-8px;margin-top:-1px}.tox .tox-pop.tox-pop--bottom::before{border-color:#000 transparent transparent transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--top::after,.tox .tox-pop.tox-pop--top::before{left:50%;top:0;transform:translateY(-100%)}.tox .tox-pop.tox-pop--top::after{border-color:transparent transparent #222f3e transparent;border-width:8px;margin-left:-8px;margin-top:1px}.tox .tox-pop.tox-pop--top::before{border-color:transparent transparent #000 transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--left::after,.tox .tox-pop.tox-pop--left::before{left:0;top:calc(50% - 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--left::after{border-color:transparent #222f3e transparent transparent;border-width:8px;margin-left:-15px}.tox .tox-pop.tox-pop--left::before{border-color:transparent #000 transparent transparent;border-width:10px;margin-left:-19px}.tox .tox-pop.tox-pop--right::after,.tox .tox-pop.tox-pop--right::before{left:100%;top:calc(50% + 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--right::after{border-color:transparent transparent transparent #222f3e;border-width:8px;margin-left:-1px}.tox .tox-pop.tox-pop--right::before{border-color:transparent transparent transparent #000;border-width:10px;margin-left:-1px}.tox .tox-pop.tox-pop--align-left::after,.tox .tox-pop.tox-pop--align-left::before{left:20px}.tox .tox-pop.tox-pop--align-right::after,.tox .tox-pop.tox-pop--align-right::before{left:calc(100% - 20px)}.tox .tox-sidebar-wrap{display:flex;flex-direction:row;flex-grow:1;-ms-flex-preferred-size:0;min-height:0}.tox .tox-sidebar{background-color:#222f3e;display:flex;flex-direction:row;justify-content:flex-end}.tox .tox-sidebar__slider{display:flex;overflow:hidden}.tox .tox-sidebar__pane-container{display:flex}.tox .tox-sidebar__pane{display:flex}.tox .tox-sidebar--sliding-closed{opacity:0}.tox .tox-sidebar--sliding-open{opacity:1}.tox .tox-sidebar--sliding-growing,.tox .tox-sidebar--sliding-shrinking{transition:width .5s ease,opacity .5s ease}.tox .tox-selector{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;display:inline-block;height:10px;position:absolute;width:10px}.tox.tox-platform-touch .tox-selector{height:12px;width:12px}.tox .tox-slider{align-items:center;display:flex;flex:1;-ms-flex-preferred-size:auto;height:24px;justify-content:center;position:relative}.tox .tox-slider__rail{background-color:transparent;border:1px solid #000;border-radius:3px;height:10px;min-width:120px;width:100%}.tox .tox-slider__handle{background-color:#207ab7;border:2px solid #185d8c;border-radius:3px;box-shadow:none;height:24px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:14px}.tox .tox-source-code{overflow:auto}.tox .tox-spinner{display:flex}.tox .tox-spinner>div{animation:tam-bouncing-dots 1.5s ease-in-out 0s infinite both;background-color:rgba(255,255,255,.5);border-radius:100%;height:8px;width:8px}.tox .tox-spinner>div:nth-child(1){animation-delay:-.32s}.tox .tox-spinner>div:nth-child(2){animation-delay:-.16s}@keyframes tam-bouncing-dots{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.tox:not([dir=rtl]) .tox-spinner>div:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-spinner>div:not(:first-child){margin-right:4px}.tox .tox-statusbar{align-items:center;background-color:#222f3e;border-top:1px solid #000;color:#fff;display:flex;flex:0 0 auto;font-size:12px;font-weight:400;height:18px;overflow:hidden;padding:0 8px;position:relative;text-transform:uppercase}.tox .tox-statusbar__text-container{display:flex;flex:1 1 auto;justify-content:flex-end;overflow:hidden}.tox .tox-statusbar__path{display:flex;flex:1 1 auto;margin-right:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-statusbar__path>*{display:inline;white-space:nowrap}.tox .tox-statusbar__wordcount{flex:0 0 auto;margin-left:1ch}.tox .tox-statusbar a,.tox .tox-statusbar__path-item,.tox .tox-statusbar__wordcount{color:#fff;text-decoration:none}.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled=true]){cursor:pointer;text-decoration:underline}.tox .tox-statusbar__resize-handle{align-items:flex-end;align-self:stretch;cursor:nwse-resize;display:flex;flex:0 0 auto;justify-content:flex-end;margin-left:auto;margin-right:-8px;padding-left:1ch}.tox .tox-statusbar__resize-handle svg{display:block;fill:#fff}.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right:4px}.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left:1ch}.tox[dir=rtl] .tox-statusbar{flex-direction:row-reverse}.tox[dir=rtl] .tox-statusbar__path>*{margin-left:4px}.tox .tox-throbber{z-index:1400}.tox .tox-throbber__busy-spinner{align-items:center;background-color:rgba(34,47,62,.6);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.tox .tox-tbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#fff;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:34px;justify-content:center;margin:2px 0 3px 0;outline:0;overflow:hidden;padding:0;text-transform:none;width:34px}.tox .tox-tbtn svg{display:block;fill:#fff}.tox .tox-tbtn.tox-tbtn-more{padding-left:5px;padding-right:5px;width:inherit}.tox .tox-tbtn:focus{background:#4a5562;border:0;box-shadow:none}.tox .tox-tbtn:hover{background:#4a5562;border:0;box-shadow:none;color:#fff}.tox .tox-tbtn:hover svg{fill:#fff}.tox .tox-tbtn:active{background:#757d87;border:0;box-shadow:none;color:#fff}.tox .tox-tbtn:active svg{fill:#fff}.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{background:0 0;border:0;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill:rgba(255,255,255,.5)}.tox .tox-tbtn--enabled,.tox .tox-tbtn--enabled:hover{background:#757d87;border:0;box-shadow:none;color:#fff}.tox .tox-tbtn--enabled:hover>*,.tox .tox-tbtn--enabled>*{transform:none}.tox .tox-tbtn--enabled svg,.tox .tox-tbtn--enabled:hover svg{fill:#fff}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){color:#fff}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg{fill:#fff}.tox .tox-tbtn:active>*{transform:none}.tox .tox-tbtn--md{height:51px;width:51px}.tox .tox-tbtn--lg{flex-direction:column;height:68px;width:68px}.tox .tox-tbtn--return{-ms-grid-row-align:stretch;align-self:stretch;height:unset;width:16px}.tox .tox-tbtn--labeled{padding:0 4px;width:unset}.tox .tox-tbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-tbtn--select{margin:2px 0 3px 0;padding:0 4px;width:auto}.tox .tox-tbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-tbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-tbtn__select-chevron svg{fill:rgba(255,255,255,.5)}.tox .tox-tbtn--bespoke .tox-tbtn__select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:7em}.tox .tox-split-button{border:0;border-radius:3px;box-sizing:border-box;display:flex;margin:2px 0 3px 0;overflow:hidden}.tox .tox-split-button:hover{box-shadow:0 0 0 1px #4a5562 inset}.tox .tox-split-button:focus{background:#4a5562;box-shadow:none;color:#fff}.tox .tox-split-button>*{border-radius:0}.tox .tox-split-button__chevron{width:16px}.tox .tox-split-button__chevron svg{fill:rgba(255,255,255,.5)}.tox .tox-split-button .tox-tbtn{margin:0}.tox.tox-platform-touch .tox-split-button .tox-tbtn:first-child{width:30px}.tox.tox-platform-touch .tox-split-button__chevron{width:20px}.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus,.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover,.tox .tox-split-button.tox-tbtn--disabled:focus,.tox .tox-split-button.tox-tbtn--disabled:hover{background:0 0;box-shadow:none;color:rgba(255,255,255,.5)}.tox .tox-toolbar-overlord{background-color:#222f3e}.tox .tox-toolbar,.tox .tox-toolbar__overflow,.tox .tox-toolbar__primary{background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23000000'/%3E%3C/svg%3E") left 0 top 0 #222f3e;background-color:#222f3e;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 0}.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed{height:0;opacity:0;padding-bottom:0;padding-top:0;visibility:hidden}.tox .tox-toolbar__overflow--growing{transition:height .3s ease,opacity .2s linear .1s}.tox .tox-toolbar__overflow--shrinking{transition:opacity .3s ease,height .2s linear .1s,visibility 0s linear .3s}.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord .tox-toolbar__primary{border-top:1px solid #000;margin-top:-1px}.tox .tox-toolbar--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-pop .tox-toolbar{border-width:0}.tox .tox-toolbar--no-divider{background-image:none}.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar-overlord:first-child .tox-toolbar__primary,.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar:first-child{border-top:1px solid #000}.tox.tox-tinymce-aux .tox-toolbar__overflow{background-color:#222f3e;border:1px solid #000;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15)}.tox[dir=rtl] .tox-tbtn__icon-rtl svg{transform:rotateY(180deg)}.tox .tox-toolbar__group{align-items:center;display:flex;flex-wrap:wrap;margin:0 0;padding:0 4px 0 4px}.tox .tox-toolbar__group--pull-right{margin-left:auto}.tox .tox-toolbar--scrolling .tox-toolbar__group{flex-shrink:0;flex-wrap:nowrap}.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right:1px solid #000}.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left:1px solid #000}.tox .tox-tooltip{display:inline-block;padding:8px;position:relative}.tox .tox-tooltip__body{background-color:#3d546f;border-radius:3px;box-shadow:0 2px 4px rgba(42,55,70,.3);color:rgba(255,255,255,.75);font-size:14px;font-style:normal;font-weight:400;padding:4px 8px;text-transform:none}.tox .tox-tooltip__arrow{position:absolute}.tox .tox-tooltip--down .tox-tooltip__arrow{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #3d546f;bottom:0;left:50%;position:absolute;transform:translateX(-50%)}.tox .tox-tooltip--up .tox-tooltip__arrow{border-bottom:8px solid #3d546f;border-left:8px solid transparent;border-right:8px solid transparent;left:50%;position:absolute;top:0;transform:translateX(-50%)}.tox .tox-tooltip--right .tox-tooltip__arrow{border-bottom:8px solid transparent;border-left:8px solid #3d546f;border-top:8px solid transparent;position:absolute;right:0;top:50%;transform:translateY(-50%)}.tox .tox-tooltip--left .tox-tooltip__arrow{border-bottom:8px solid transparent;border-right:8px solid #3d546f;border-top:8px solid transparent;left:0;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-well{border:1px solid #000;border-radius:3px;padding:8px;width:100%}.tox .tox-well>:first-child{margin-top:0}.tox .tox-well>:last-child{margin-bottom:0}.tox .tox-well>:only-child{margin:0}.tox .tox-custom-editor{border:1px solid #000;border-radius:3px;display:flex;flex:1;position:relative}.tox .tox-dialog-loading::before{background-color:rgba(0,0,0,.5);content:"";height:100%;position:absolute;width:100%;z-index:1000}.tox .tox-tab{cursor:pointer}.tox .tox-dialog__content-js{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-content .tox-collection{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-image-tools-edit-panel{height:60px}.tox .tox-image-tools__sidebar{height:60px}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide-dark/skin.mobile.css
@@ -1,1 +1,674 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+/* RESET all the things! */
+.tinymce-mobile-outer-container {
+  all: initial;
+  display: block;
+}
+.tinymce-mobile-outer-container * {
+  border: 0;
+  box-sizing: initial;
+  cursor: inherit;
+  float: none;
+  line-height: 1;
+  margin: 0;
+  outline: 0;
+  padding: 0;
+  -webkit-tap-highlight-color: transparent;
+  /* TBIO-3691, stop the gray flicker on touch. */
+  text-shadow: none;
+  white-space: nowrap;
+}
+.tinymce-mobile-icon-arrow-back::before {
+  content: "\e5cd";
+}
+.tinymce-mobile-icon-image::before {
+  content: "\e412";
+}
+.tinymce-mobile-icon-cancel-circle::before {
+  content: "\e5c9";
+}
+.tinymce-mobile-icon-full-dot::before {
+  content: "\e061";
+}
+.tinymce-mobile-icon-align-center::before {
+  content: "\e234";
+}
+.tinymce-mobile-icon-align-left::before {
+  content: "\e236";
+}
+.tinymce-mobile-icon-align-right::before {
+  content: "\e237";
+}
+.tinymce-mobile-icon-bold::before {
+  content: "\e238";
+}
+.tinymce-mobile-icon-italic::before {
+  content: "\e23f";
+}
+.tinymce-mobile-icon-unordered-list::before {
+  content: "\e241";
+}
+.tinymce-mobile-icon-ordered-list::before {
+  content: "\e242";
+}
+.tinymce-mobile-icon-font-size::before {
+  content: "\e245";
+}
+.tinymce-mobile-icon-underline::before {
+  content: "\e249";
+}
+.tinymce-mobile-icon-link::before {
+  content: "\e157";
+}
+.tinymce-mobile-icon-unlink::before {
+  content: "\eca2";
+}
+.tinymce-mobile-icon-color::before {
+  content: "\e891";
+}
+.tinymce-mobile-icon-previous::before {
+  content: "\e314";
+}
+.tinymce-mobile-icon-next::before {
+  content: "\e315";
+}
+.tinymce-mobile-icon-large-font::before,
+.tinymce-mobile-icon-style-formats::before {
+  content: "\e264";
+}
+.tinymce-mobile-icon-undo::before {
+  content: "\e166";
+}
+.tinymce-mobile-icon-redo::before {
+  content: "\e15a";
+}
+.tinymce-mobile-icon-removeformat::before {
+  content: "\e239";
+}
+.tinymce-mobile-icon-small-font::before {
+  content: "\e906";
+}
+.tinymce-mobile-icon-readonly-back::before,
+.tinymce-mobile-format-matches::after {
+  content: "\e5ca";
+}
+.tinymce-mobile-icon-small-heading::before {
+  content: "small";
+}
+.tinymce-mobile-icon-large-heading::before {
+  content: "large";
+}
+.tinymce-mobile-icon-small-heading::before,
+.tinymce-mobile-icon-large-heading::before {
+  font-family: sans-serif;
+  font-size: 80%;
+}
+.tinymce-mobile-mask-edit-icon::before {
+  content: "\e254";
+}
+.tinymce-mobile-icon-back::before {
+  content: "\e5c4";
+}
+.tinymce-mobile-icon-heading::before {
+  /* TODO: Translate */
+  content: "Headings";
+  font-family: sans-serif;
+  font-size: 80%;
+  font-weight: bold;
+}
+.tinymce-mobile-icon-h1::before {
+  content: "H1";
+  font-weight: bold;
+}
+.tinymce-mobile-icon-h2::before {
+  content: "H2";
+  font-weight: bold;
+}
+.tinymce-mobile-icon-h3::before {
+  content: "H3";
+  font-weight: bold;
+}
+.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+  background: rgba(51, 51, 51, 0.5);
+  height: 100%;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container {
+  align-items: center;
+  border-radius: 50%;
+  display: flex;
+  flex-direction: column;
+  font-family: sans-serif;
+  font-size: 1em;
+  justify-content: space-between;
+}
+.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .mixin-menu-item {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+  border-radius: 50%;
+  height: 2.1em;
+  width: 2.1em;
+}
+.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+  flex-direction: column;
+  font-size: 1em;
+}
+@media only screen and (min-device-width:700px) {
+  .tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section {
+    font-size: 1.2em;
+  }
+}
+.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+  border-radius: 50%;
+  height: 2.1em;
+  width: 2.1em;
+  background-color: white;
+  color: #207ab7;
+}
+.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon::before {
+  content: "\e900";
+  font-family: 'tinymce-mobile', sans-serif;
+}
+.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section:not(.tinymce-mobile-mask-tap-icon-selected) .tinymce-mobile-mask-tap-icon {
+  z-index: 2;
+}
+.tinymce-mobile-android-container.tinymce-mobile-android-maximized {
+  background: #ffffff;
+  border: none;
+  bottom: 0;
+  display: flex;
+  flex-direction: column;
+  left: 0;
+  position: fixed;
+  right: 0;
+  top: 0;
+}
+.tinymce-mobile-android-container:not(.tinymce-mobile-android-maximized) {
+  position: relative;
+}
+.tinymce-mobile-android-container .tinymce-mobile-editor-socket {
+  display: flex;
+  flex-grow: 1;
+}
+.tinymce-mobile-android-container .tinymce-mobile-editor-socket iframe {
+  display: flex !important;
+  flex-grow: 1;
+  height: auto !important;
+}
+.tinymce-mobile-android-scroll-reload {
+  overflow: hidden;
+}
+:not(.tinymce-mobile-readonly-mode) > .tinymce-mobile-android-selection-context-toolbar {
+  margin-top: 23px;
+}
+.tinymce-mobile-toolstrip {
+  background: #fff;
+  display: flex;
+  flex: 0 0 auto;
+  z-index: 1;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar {
+  align-items: center;
+  background-color: #fff;
+  border-bottom: 1px solid #cccccc;
+  display: flex;
+  flex: 1;
+  height: 2.5em;
+  width: 100%;
+  /* Make it no larger than the toolstrip, so that it needs to scroll */
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group {
+  align-items: center;
+  display: flex;
+  height: 100%;
+  flex-shrink: 1;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group > div {
+  align-items: center;
+  display: flex;
+  height: 100%;
+  flex: 1;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-exit-container {
+  background: #f44336;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-toolbar-scrollable-group {
+  flex-grow: 1;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item {
+  padding-left: 0.5em;
+  padding-right: 0.5em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button {
+  align-items: center;
+  display: flex;
+  height: 80%;
+  margin-left: 2px;
+  margin-right: 2px;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button.tinymce-mobile-toolbar-button-selected {
+  background: #c8cbcf;
+  color: #cccccc;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:first-of-type,
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:last-of-type {
+  background: #207ab7;
+  color: #eceff1;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar {
+  /* Note, this file is imported inside .tinymce-mobile-context-toolbar, so that prefix is on everything here. */
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group {
+  align-items: center;
+  display: flex;
+  height: 100%;
+  flex: 1;
+  padding-bottom: 0.4em;
+  padding-top: 0.4em;
+  /* Make any buttons appearing on the left and right display in the centre (e.g. color edges) */
+  /* For widgets like the colour picker, use the whole height */
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog {
+  display: flex;
+  min-height: 1.5em;
+  overflow: hidden;
+  padding-left: 0;
+  padding-right: 0;
+  position: relative;
+  width: 100%;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain {
+  display: flex;
+  height: 100%;
+  transition: left cubic-bezier(0.4, 0, 1, 1) 0.15s;
+  width: 100%;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen {
+  display: flex;
+  flex: 0 0 auto;
+  justify-content: space-between;
+  width: 100%;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen input {
+  font-family: Sans-serif;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container {
+  display: flex;
+  flex-grow: 1;
+  position: relative;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container .tinymce-mobile-input-container-x {
+  -ms-grid-row-align: center;
+      align-self: center;
+  background: inherit;
+  border: none;
+  border-radius: 50%;
+  color: #888;
+  font-size: 0.6em;
+  font-weight: bold;
+  height: 100%;
+  padding-right: 2px;
+  position: absolute;
+  right: 0;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container.tinymce-mobile-input-container-empty .tinymce-mobile-input-container-x {
+  display: none;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous,
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next {
+  align-items: center;
+  display: flex;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous::before,
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next::before {
+  align-items: center;
+  display: flex;
+  font-weight: bold;
+  height: 100%;
+  padding-left: 0.5em;
+  padding-right: 0.5em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous.tinymce-mobile-toolbar-navigation-disabled::before,
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next.tinymce-mobile-toolbar-navigation-disabled::before {
+  visibility: hidden;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item {
+  color: #cccccc;
+  font-size: 10px;
+  line-height: 10px;
+  margin: 0 2px;
+  padding-top: 3px;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item.tinymce-mobile-dot-active {
+  color: #c8cbcf;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-font::before,
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-heading::before {
+  margin-left: 0.5em;
+  margin-right: 0.9em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-font::before,
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-heading::before {
+  margin-left: 0.9em;
+  margin-right: 0.5em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider {
+  display: flex;
+  flex: 1;
+  margin-left: 0;
+  margin-right: 0;
+  padding: 0.28em 0;
+  position: relative;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container {
+  align-items: center;
+  display: flex;
+  flex-grow: 1;
+  height: 100%;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container .tinymce-mobile-slider-size-line {
+  background: #cccccc;
+  display: flex;
+  flex: 1;
+  height: 0.2em;
+  margin-bottom: 0.3em;
+  margin-top: 0.3em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container {
+  padding-left: 2em;
+  padding-right: 2em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container {
+  align-items: center;
+  display: flex;
+  flex-grow: 1;
+  height: 100%;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container .tinymce-mobile-slider-gradient {
+  background: linear-gradient(to right, hsl(0, 100%, 50%) 0%, hsl(60, 100%, 50%) 17%, hsl(120, 100%, 50%) 33%, hsl(180, 100%, 50%) 50%, hsl(240, 100%, 50%) 67%, hsl(300, 100%, 50%) 83%, hsl(0, 100%, 50%) 100%);
+  display: flex;
+  flex: 1;
+  height: 0.2em;
+  margin-bottom: 0.3em;
+  margin-top: 0.3em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-black {
+  /* Not part of theming */
+  background: black;
+  height: 0.2em;
+  margin-bottom: 0.3em;
+  margin-top: 0.3em;
+  width: 1.2em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-white {
+  /* Not part of theming */
+  background: white;
+  height: 0.2em;
+  margin-bottom: 0.3em;
+  margin-top: 0.3em;
+  width: 1.2em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb {
+  /* vertically centering trick (margin: auto, top: 0, bottom: 0). On iOS and Safari, if you leave
+     * out these values, then it shows the thumb at the top of the spectrum. This is probably because it is
+     * absolutely positioned with only a left value, and not a top. Note, on Chrome it seems to be fine without
+     * this approach.
+    */
+  align-items: center;
+  background-clip: padding-box;
+  background-color: #455a64;
+  border: 0.5em solid rgba(136, 136, 136, 0);
+  border-radius: 3em;
+  bottom: 0;
+  color: #fff;
+  display: flex;
+  height: 0.5em;
+  justify-content: center;
+  left: -10px;
+  margin: auto;
+  position: absolute;
+  top: 0;
+  transition: border 120ms cubic-bezier(0.39, 0.58, 0.57, 1);
+  width: 0.5em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb.tinymce-mobile-thumb-active {
+  border: 0.5em solid rgba(136, 136, 136, 0.39);
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper,
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group > div {
+  align-items: center;
+  display: flex;
+  height: 100%;
+  flex: 1;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper {
+  flex-direction: column;
+  justify-content: center;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item {
+  align-items: center;
+  display: flex;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item:not(.tinymce-mobile-serialised-dialog) {
+  height: 100%;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-container {
+  display: flex;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input {
+  background: #ffffff;
+  border: none;
+  border-radius: 0;
+  color: #455a64;
+  flex-grow: 1;
+  font-size: 0.85em;
+  padding-bottom: 0.1em;
+  padding-left: 5px;
+  padding-top: 0.1em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::-webkit-input-placeholder {
+  /* WebKit, Blink, Edge */
+  color: #888;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::placeholder {
+  /* WebKit, Blink, Edge */
+  color: #888;
+}
+/* dropup */
+.tinymce-mobile-dropup {
+  background: white;
+  display: flex;
+  overflow: hidden;
+  width: 100%;
+}
+.tinymce-mobile-dropup.tinymce-mobile-dropup-shrinking {
+  transition: height 0.3s ease-out;
+}
+.tinymce-mobile-dropup.tinymce-mobile-dropup-growing {
+  transition: height 0.3s ease-in;
+}
+.tinymce-mobile-dropup.tinymce-mobile-dropup-closed {
+  flex-grow: 0;
+}
+.tinymce-mobile-dropup.tinymce-mobile-dropup-open:not(.tinymce-mobile-dropup-growing) {
+  flex-grow: 1;
+}
+/* TODO min-height for device size and orientation */
+.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed) {
+  min-height: 200px;
+}
+@media only screen and (orientation: landscape) {
+  .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed) {
+    min-height: 200px;
+  }
+}
+@media only screen and (min-device-width : 320px) and (max-device-width : 568px) and (orientation : landscape) {
+  .tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed) {
+    min-height: 150px;
+  }
+}
+/* styles menu */
+.tinymce-mobile-styles-menu {
+  font-family: sans-serif;
+  outline: 4px solid black;
+  overflow: hidden;
+  position: relative;
+  width: 100%;
+}
+.tinymce-mobile-styles-menu [role="menu"] {
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+  position: absolute;
+  width: 100%;
+}
+.tinymce-mobile-styles-menu [role="menu"].transitioning {
+  transition: transform 0.5s ease-in-out;
+}
+.tinymce-mobile-styles-menu .tinymce-mobile-styles-item {
+  border-bottom: 1px solid #ddd;
+  color: #455a64;
+  cursor: pointer;
+  display: flex;
+  padding: 1em 1em;
+  position: relative;
+}
+.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser .tinymce-mobile-styles-collapse-icon::before {
+  color: #455a64;
+  content: "\e314";
+  font-family: 'tinymce-mobile', sans-serif;
+}
+.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-styles-item-is-menu::after {
+  color: #455a64;
+  content: "\e315";
+  font-family: 'tinymce-mobile', sans-serif;
+  padding-left: 1em;
+  padding-right: 1em;
+  position: absolute;
+  right: 0;
+}
+.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-format-matches::after {
+  font-family: 'tinymce-mobile', sans-serif;
+  padding-left: 1em;
+  padding-right: 1em;
+  position: absolute;
+  right: 0;
+}
+.tinymce-mobile-styles-menu .tinymce-mobile-styles-separator,
+.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser {
+  align-items: center;
+  background: #fff;
+  border-top: #455a64;
+  color: #455a64;
+  display: flex;
+  min-height: 2.5em;
+  padding-left: 1em;
+  padding-right: 1em;
+}
+.tinymce-mobile-styles-menu [data-transitioning-destination="before"][data-transitioning-state],
+.tinymce-mobile-styles-menu [data-transitioning-state="before"] {
+  transform: translate(-100%);
+}
+.tinymce-mobile-styles-menu [data-transitioning-destination="current"][data-transitioning-state],
+.tinymce-mobile-styles-menu [data-transitioning-state="current"] {
+  transform: translate(0%);
+}
+.tinymce-mobile-styles-menu [data-transitioning-destination="after"][data-transitioning-state],
+.tinymce-mobile-styles-menu [data-transitioning-state="after"] {
+  transform: translate(100%);
+}
+@font-face {
+  font-family: 'tinymce-mobile';
+  font-style: normal;
+  font-weight: normal;
+  src: url('fonts/tinymce-mobile.woff?8x92w3') format('woff');
+}
+@media (min-device-width: 700px) {
+  .tinymce-mobile-outer-container,
+  .tinymce-mobile-outer-container input {
+    font-size: 25px;
+  }
+}
+@media (max-device-width: 700px) {
+  .tinymce-mobile-outer-container,
+  .tinymce-mobile-outer-container input {
+    font-size: 18px;
+  }
+}
+.tinymce-mobile-icon {
+  font-family: 'tinymce-mobile', sans-serif;
+}
+.mixin-flex-and-centre {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+}
+.mixin-flex-bar {
+  align-items: center;
+  display: flex;
+  height: 100%;
+}
+.tinymce-mobile-outer-container .tinymce-mobile-editor-socket iframe {
+  background-color: #fff;
+  width: 100%;
+}
+.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon {
+  /* Note, on the iPod touch in landscape, this isn't visible when the navbar appears */
+  background-color: #207ab7;
+  border-radius: 50%;
+  bottom: 1em;
+  color: white;
+  font-size: 1em;
+  height: 2.1em;
+  position: fixed;
+  right: 2em;
+  width: 2.1em;
+  align-items: center;
+  display: flex;
+  justify-content: center;
+}
+@media only screen and (min-device-width:700px) {
+  .tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon {
+    font-size: 1.2em;
+  }
+}
+.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket {
+  height: 300px;
+  overflow: hidden;
+}
+.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket iframe {
+  height: 100%;
+}
+.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-toolstrip {
+  display: none;
+}
+/*
+  Note, that if you don't include this (::-webkit-file-upload-button), the toolbar width gets
+  increased and the whole body becomes scrollable. It's important!
+ */
+input[type="file"]::-webkit-file-upload-button {
+  display: none;
+}
+@media only screen and (min-device-width : 320px) and (max-device-width : 568px) and (orientation : landscape) {
+  .tinymce-mobile-ios-container .tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon {
+    bottom: 50%;
+  }
+}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide-dark/skin.mobile.min.css
@@ -1,1 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.tinymce-mobile-outer-container{all:initial;display:block}.tinymce-mobile-outer-container *{border:0;box-sizing:initial;cursor:inherit;float:none;line-height:1;margin:0;outline:0;padding:0;-webkit-tap-highlight-color:transparent;text-shadow:none;white-space:nowrap}.tinymce-mobile-icon-arrow-back::before{content:"\e5cd"}.tinymce-mobile-icon-image::before{content:"\e412"}.tinymce-mobile-icon-cancel-circle::before{content:"\e5c9"}.tinymce-mobile-icon-full-dot::before{content:"\e061"}.tinymce-mobile-icon-align-center::before{content:"\e234"}.tinymce-mobile-icon-align-left::before{content:"\e236"}.tinymce-mobile-icon-align-right::before{content:"\e237"}.tinymce-mobile-icon-bold::before{content:"\e238"}.tinymce-mobile-icon-italic::before{content:"\e23f"}.tinymce-mobile-icon-unordered-list::before{content:"\e241"}.tinymce-mobile-icon-ordered-list::before{content:"\e242"}.tinymce-mobile-icon-font-size::before{content:"\e245"}.tinymce-mobile-icon-underline::before{content:"\e249"}.tinymce-mobile-icon-link::before{content:"\e157"}.tinymce-mobile-icon-unlink::before{content:"\eca2"}.tinymce-mobile-icon-color::before{content:"\e891"}.tinymce-mobile-icon-previous::before{content:"\e314"}.tinymce-mobile-icon-next::before{content:"\e315"}.tinymce-mobile-icon-large-font::before,.tinymce-mobile-icon-style-formats::before{content:"\e264"}.tinymce-mobile-icon-undo::before{content:"\e166"}.tinymce-mobile-icon-redo::before{content:"\e15a"}.tinymce-mobile-icon-removeformat::before{content:"\e239"}.tinymce-mobile-icon-small-font::before{content:"\e906"}.tinymce-mobile-format-matches::after,.tinymce-mobile-icon-readonly-back::before{content:"\e5ca"}.tinymce-mobile-icon-small-heading::before{content:"small"}.tinymce-mobile-icon-large-heading::before{content:"large"}.tinymce-mobile-icon-large-heading::before,.tinymce-mobile-icon-small-heading::before{font-family:sans-serif;font-size:80%}.tinymce-mobile-mask-edit-icon::before{content:"\e254"}.tinymce-mobile-icon-back::before{content:"\e5c4"}.tinymce-mobile-icon-heading::before{content:"Headings";font-family:sans-serif;font-size:80%;font-weight:700}.tinymce-mobile-icon-h1::before{content:"H1";font-weight:700}.tinymce-mobile-icon-h2::before{content:"H2";font-weight:700}.tinymce-mobile-icon-h3::before{content:"H3";font-weight:700}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask{align-items:center;display:flex;justify-content:center;background:rgba(51,51,51,.5);height:100%;position:absolute;top:0;width:100%}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container{align-items:center;border-radius:50%;display:flex;flex-direction:column;font-family:sans-serif;font-size:1em;justify-content:space-between}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .mixin-menu-item{align-items:center;display:flex;justify-content:center;border-radius:50%;height:2.1em;width:2.1em}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section{align-items:center;display:flex;justify-content:center;flex-direction:column;font-size:1em}@media only screen and (min-device-width:700px){.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section{font-size:1.2em}}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon{align-items:center;display:flex;justify-content:center;border-radius:50%;height:2.1em;width:2.1em;background-color:#fff;color:#207ab7}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon::before{content:"\e900";font-family:tinymce-mobile,sans-serif}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section:not(.tinymce-mobile-mask-tap-icon-selected) .tinymce-mobile-mask-tap-icon{z-index:2}.tinymce-mobile-android-container.tinymce-mobile-android-maximized{background:#fff;border:none;bottom:0;display:flex;flex-direction:column;left:0;position:fixed;right:0;top:0}.tinymce-mobile-android-container:not(.tinymce-mobile-android-maximized){position:relative}.tinymce-mobile-android-container .tinymce-mobile-editor-socket{display:flex;flex-grow:1}.tinymce-mobile-android-container .tinymce-mobile-editor-socket iframe{display:flex!important;flex-grow:1;height:auto!important}.tinymce-mobile-android-scroll-reload{overflow:hidden}:not(.tinymce-mobile-readonly-mode)>.tinymce-mobile-android-selection-context-toolbar{margin-top:23px}.tinymce-mobile-toolstrip{background:#fff;display:flex;flex:0 0 auto;z-index:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar{align-items:center;background-color:#fff;border-bottom:1px solid #ccc;display:flex;flex:1;height:2.5em;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group{align-items:center;display:flex;height:100%;flex-shrink:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group>div{align-items:center;display:flex;height:100%;flex:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-exit-container{background:#f44336}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-toolbar-scrollable-group{flex-grow:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item{padding-left:.5em;padding-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button{align-items:center;display:flex;height:80%;margin-left:2px;margin-right:2px}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button.tinymce-mobile-toolbar-button-selected{background:#c8cbcf;color:#ccc}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:first-of-type,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:last-of-type{background:#207ab7;color:#eceff1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group{align-items:center;display:flex;height:100%;flex:1;padding-bottom:.4em;padding-top:.4em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog{display:flex;min-height:1.5em;overflow:hidden;padding-left:0;padding-right:0;position:relative;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain{display:flex;height:100%;transition:left cubic-bezier(.4,0,1,1) .15s;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen{display:flex;flex:0 0 auto;justify-content:space-between;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen input{font-family:Sans-serif}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container{display:flex;flex-grow:1;position:relative}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container .tinymce-mobile-input-container-x{-ms-grid-row-align:center;align-self:center;background:inherit;border:none;border-radius:50%;color:#888;font-size:.6em;font-weight:700;height:100%;padding-right:2px;position:absolute;right:0}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container.tinymce-mobile-input-container-empty .tinymce-mobile-input-container-x{display:none}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous{align-items:center;display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous::before{align-items:center;display:flex;font-weight:700;height:100%;padding-left:.5em;padding-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next.tinymce-mobile-toolbar-navigation-disabled::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous.tinymce-mobile-toolbar-navigation-disabled::before{visibility:hidden}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item{color:#ccc;font-size:10px;line-height:10px;margin:0 2px;padding-top:3px}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item.tinymce-mobile-dot-active{color:#c8cbcf}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-font::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-heading::before{margin-left:.5em;margin-right:.9em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-font::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-heading::before{margin-left:.9em;margin-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider{display:flex;flex:1;margin-left:0;margin-right:0;padding:.28em 0;position:relative}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container{align-items:center;display:flex;flex-grow:1;height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container .tinymce-mobile-slider-size-line{background:#ccc;display:flex;flex:1;height:.2em;margin-bottom:.3em;margin-top:.3em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container{padding-left:2em;padding-right:2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container{align-items:center;display:flex;flex-grow:1;height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container .tinymce-mobile-slider-gradient{background:linear-gradient(to right,red 0,#feff00 17%,#0f0 33%,#00feff 50%,#00f 67%,#ff00fe 83%,red 100%);display:flex;flex:1;height:.2em;margin-bottom:.3em;margin-top:.3em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-black{background:#000;height:.2em;margin-bottom:.3em;margin-top:.3em;width:1.2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-white{background:#fff;height:.2em;margin-bottom:.3em;margin-top:.3em;width:1.2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb{align-items:center;background-clip:padding-box;background-color:#455a64;border:.5em solid rgba(136,136,136,0);border-radius:3em;bottom:0;color:#fff;display:flex;height:.5em;justify-content:center;left:-10px;margin:auto;position:absolute;top:0;transition:border 120ms cubic-bezier(.39,.58,.57,1);width:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb.tinymce-mobile-thumb-active{border:.5em solid rgba(136,136,136,.39)}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group>div{align-items:center;display:flex;height:100%;flex:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper{flex-direction:column;justify-content:center}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item{align-items:center;display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item:not(.tinymce-mobile-serialised-dialog){height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-container{display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input{background:#fff;border:none;border-radius:0;color:#455a64;flex-grow:1;font-size:.85em;padding-bottom:.1em;padding-left:5px;padding-top:.1em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::-webkit-input-placeholder{color:#888}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::placeholder{color:#888}.tinymce-mobile-dropup{background:#fff;display:flex;overflow:hidden;width:100%}.tinymce-mobile-dropup.tinymce-mobile-dropup-shrinking{transition:height .3s ease-out}.tinymce-mobile-dropup.tinymce-mobile-dropup-growing{transition:height .3s ease-in}.tinymce-mobile-dropup.tinymce-mobile-dropup-closed{flex-grow:0}.tinymce-mobile-dropup.tinymce-mobile-dropup-open:not(.tinymce-mobile-dropup-growing){flex-grow:1}.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:200px}@media only screen and (orientation:landscape){.tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:200px}}@media only screen and (min-device-width :320px) and (max-device-width :568px) and (orientation :landscape){.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:150px}}.tinymce-mobile-styles-menu{font-family:sans-serif;outline:4px solid #000;overflow:hidden;position:relative;width:100%}.tinymce-mobile-styles-menu [role=menu]{display:flex;flex-direction:column;height:100%;position:absolute;width:100%}.tinymce-mobile-styles-menu [role=menu].transitioning{transition:transform .5s ease-in-out}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item{border-bottom:1px solid #ddd;color:#455a64;cursor:pointer;display:flex;padding:1em 1em;position:relative}.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser .tinymce-mobile-styles-collapse-icon::before{color:#455a64;content:"\e314";font-family:tinymce-mobile,sans-serif}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-styles-item-is-menu::after{color:#455a64;content:"\e315";font-family:tinymce-mobile,sans-serif;padding-left:1em;padding-right:1em;position:absolute;right:0}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-format-matches::after{font-family:tinymce-mobile,sans-serif;padding-left:1em;padding-right:1em;position:absolute;right:0}.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser,.tinymce-mobile-styles-menu .tinymce-mobile-styles-separator{align-items:center;background:#fff;border-top:#455a64;color:#455a64;display:flex;min-height:2.5em;padding-left:1em;padding-right:1em}.tinymce-mobile-styles-menu [data-transitioning-destination=before][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=before]{transform:translate(-100%)}.tinymce-mobile-styles-menu [data-transitioning-destination=current][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=current]{transform:translate(0)}.tinymce-mobile-styles-menu [data-transitioning-destination=after][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=after]{transform:translate(100%)}@font-face{font-family:tinymce-mobile;font-style:normal;font-weight:400;src:url(fonts/tinymce-mobile.woff?8x92w3) format('woff')}@media (min-device-width:700px){.tinymce-mobile-outer-container,.tinymce-mobile-outer-container input{font-size:25px}}@media (max-device-width:700px){.tinymce-mobile-outer-container,.tinymce-mobile-outer-container input{font-size:18px}}.tinymce-mobile-icon{font-family:tinymce-mobile,sans-serif}.mixin-flex-and-centre{align-items:center;display:flex;justify-content:center}.mixin-flex-bar{align-items:center;display:flex;height:100%}.tinymce-mobile-outer-container .tinymce-mobile-editor-socket iframe{background-color:#fff;width:100%}.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{background-color:#207ab7;border-radius:50%;bottom:1em;color:#fff;font-size:1em;height:2.1em;position:fixed;right:2em;width:2.1em;align-items:center;display:flex;justify-content:center}@media only screen and (min-device-width:700px){.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{font-size:1.2em}}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket{height:300px;overflow:hidden}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket iframe{height:100%}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-toolstrip{display:none}input[type=file]::-webkit-file-upload-button{display:none}@media only screen and (min-device-width :320px) and (max-device-width :568px) and (orientation :landscape){.tinymce-mobile-ios-container .tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{bottom:50%}}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide/content.css
@@ -1,1 +1,696 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.mce-content-body .mce-item-anchor {
+  background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
+  cursor: default;
+  display: inline-block;
+  height: 12px !important;
+  padding: 0 2px;
+  -webkit-user-modify: read-only;
+  -moz-user-modify: read-only;
+  -webkit-user-select: all;
+  -moz-user-select: all;
+  -ms-user-select: all;
+      user-select: all;
+  width: 8px !important;
+}
+.mce-content-body .mce-item-anchor[data-mce-selected] {
+  outline-offset: 1px;
+}
+.tox-comments-visible .tox-comment {
+  background-color: #fff0b7;
+}
+.tox-comments-visible .tox-comment--active {
+  background-color: #ffe168;
+}
+.tox-checklist > li:not(.tox-checklist--hidden) {
+  list-style: none;
+  margin: 0.25em 0;
+}
+.tox-checklist > li:not(.tox-checklist--hidden)::before {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");
+  background-size: 100%;
+  content: '';
+  cursor: pointer;
+  height: 1em;
+  margin-left: -1.5em;
+  margin-top: 0.125em;
+  position: absolute;
+  width: 1em;
+}
+.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");
+}
+[dir=rtl] .tox-checklist > li:not(.tox-checklist--hidden)::before {
+  margin-left: 0;
+  margin-right: -1.5em;
+}
+/* stylelint-disable */
+/* http://prismjs.com/ */
+/**
+ * prism.js default theme for JavaScript, CSS and HTML
+ * Based on dabblet (http://dabblet.com)
+ * @author Lea Verou
+ */
+code[class*="language-"],
+pre[class*="language-"] {
+  color: black;
+  background: none;
+  text-shadow: 0 1px white;
+  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
+  font-size: 1em;
+  text-align: left;
+  white-space: pre;
+  word-spacing: normal;
+  word-break: normal;
+  word-wrap: normal;
+  line-height: 1.5;
+  -moz-tab-size: 4;
+  tab-size: 4;
+  -webkit-hyphens: none;
+  -ms-hyphens: none;
+  hyphens: none;
+}
+pre[class*="language-"]::-moz-selection,
+pre[class*="language-"] ::-moz-selection,
+code[class*="language-"]::-moz-selection,
+code[class*="language-"] ::-moz-selection {
+  text-shadow: none;
+  background: #b3d4fc;
+}
+pre[class*="language-"]::selection,
+pre[class*="language-"] ::selection,
+code[class*="language-"]::selection,
+code[class*="language-"] ::selection {
+  text-shadow: none;
+  background: #b3d4fc;
+}
+@media print {
+  code[class*="language-"],
+  pre[class*="language-"] {
+    text-shadow: none;
+  }
+}
+/* Code blocks */
+pre[class*="language-"] {
+  padding: 1em;
+  margin: 0.5em 0;
+  overflow: auto;
+}
+:not(pre) > code[class*="language-"],
+pre[class*="language-"] {
+  background: #f5f2f0;
+}
+/* Inline code */
+:not(pre) > code[class*="language-"] {
+  padding: 0.1em;
+  border-radius: 0.3em;
+  white-space: normal;
+}
+.token.comment,
+.token.prolog,
+.token.doctype,
+.token.cdata {
+  color: slategray;
+}
+.token.punctuation {
+  color: #999;
+}
+.namespace {
+  opacity: 0.7;
+}
+.token.property,
+.token.tag,
+.token.boolean,
+.token.number,
+.token.constant,
+.token.symbol,
+.token.deleted {
+  color: #905;
+}
+.token.selector,
+.token.attr-name,
+.token.string,
+.token.char,
+.token.builtin,
+.token.inserted {
+  color: #690;
+}
+.token.operator,
+.token.entity,
+.token.url,
+.language-css .token.string,
+.style .token.string {
+  color: #9a6e3a;
+  background: hsla(0, 0%, 100%, 0.5);
+}
+.token.atrule,
+.token.attr-value,
+.token.keyword {
+  color: #07a;
+}
+.token.function,
+.token.class-name {
+  color: #DD4A68;
+}
+.token.regex,
+.token.important,
+.token.variable {
+  color: #e90;
+}
+.token.important,
+.token.bold {
+  font-weight: bold;
+}
+.token.italic {
+  font-style: italic;
+}
+.token.entity {
+  cursor: help;
+}
+/* stylelint-enable */
+.mce-content-body {
+  overflow-wrap: break-word;
+  word-wrap: break-word;
+}
+.mce-content-body .mce-visual-caret {
+  background-color: black;
+  background-color: currentColor;
+  position: absolute;
+}
+.mce-content-body .mce-visual-caret-hidden {
+  display: none;
+}
+.mce-content-body *[data-mce-caret] {
+  left: -1000px;
+  margin: 0;
+  padding: 0;
+  position: absolute;
+  right: auto;
+  top: 0;
+}
+.mce-content-body .mce-offscreen-selection {
+  left: -2000000px;
+  max-width: 1000000px;
+  position: absolute;
+}
+.mce-content-body *[contentEditable=false] {
+  cursor: default;
+}
+.mce-content-body *[contentEditable=true] {
+  cursor: text;
+}
+.tox-cursor-format-painter {
+  cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
+}
+.mce-content-body figure.align-left {
+  float: left;
+}
+.mce-content-body figure.align-right {
+  float: right;
+}
+.mce-content-body figure.image.align-center {
+  display: table;
+  margin-left: auto;
+  margin-right: auto;
+}
+.mce-preview-object {
+  border: 1px solid gray;
+  display: inline-block;
+  line-height: 0;
+  margin: 0 2px 0 2px;
+  position: relative;
+}
+.mce-preview-object .mce-shim {
+  background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
+  height: 100%;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.mce-preview-object[data-mce-selected="2"] .mce-shim {
+  display: none;
+}
+.mce-object {
+  background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
+  border: 1px dashed #aaa;
+}
+.mce-pagebreak {
+  border: 1px dashed #aaa;
+  cursor: default;
+  display: block;
+  height: 5px;
+  margin-top: 15px;
+  page-break-before: always;
+  width: 100%;
+}
+@media print {
+  .mce-pagebreak {
+    border: 0;
+  }
+}
+.tiny-pageembed .mce-shim {
+  background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
+  height: 100%;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.tiny-pageembed[data-mce-selected="2"] .mce-shim {
+  display: none;
+}
+.tiny-pageembed {
+  display: inline-block;
+  position: relative;
+}
+.tiny-pageembed--21by9,
+.tiny-pageembed--16by9,
+.tiny-pageembed--4by3,
+.tiny-pageembed--1by1 {
+  display: block;
+  overflow: hidden;
+  padding: 0;
+  position: relative;
+  width: 100%;
+}
+.tiny-pageembed--21by9 {
+  padding-top: 42.857143%;
+}
+.tiny-pageembed--16by9 {
+  padding-top: 56.25%;
+}
+.tiny-pageembed--4by3 {
+  padding-top: 75%;
+}
+.tiny-pageembed--1by1 {
+  padding-top: 100%;
+}
+.tiny-pageembed--21by9 iframe,
+.tiny-pageembed--16by9 iframe,
+.tiny-pageembed--4by3 iframe,
+.tiny-pageembed--1by1 iframe {
+  border: 0;
+  height: 100%;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.mce-content-body[data-mce-placeholder] {
+  position: relative;
+}
+.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {
+  color: rgba(34, 47, 62, 0.7);
+  content: attr(data-mce-placeholder);
+  position: absolute;
+}
+.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before {
+  left: 1px;
+}
+.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before {
+  right: 1px;
+}
+.mce-content-body div.mce-resizehandle {
+  background-color: #4099ff;
+  border-color: #4099ff;
+  border-style: solid;
+  border-width: 1px;
+  box-sizing: border-box;
+  height: 10px;
+  position: absolute;
+  width: 10px;
+  z-index: 10000;
+}
+.mce-content-body div.mce-resizehandle:hover {
+  background-color: #4099ff;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(1) {
+  cursor: nwse-resize;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(2) {
+  cursor: nesw-resize;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(3) {
+  cursor: nwse-resize;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(4) {
+  cursor: nesw-resize;
+}
+.mce-content-body .mce-clonedresizable {
+  opacity: 0.5;
+  outline: 1px dashed black;
+  position: absolute;
+  z-index: 10000;
+}
+.mce-content-body .mce-resize-helper {
+  background: #555;
+  background: rgba(0, 0, 0, 0.75);
+  border: 1px;
+  border-radius: 3px;
+  color: white;
+  display: none;
+  font-family: sans-serif;
+  font-size: 12px;
+  line-height: 14px;
+  margin: 5px 10px;
+  padding: 5px;
+  position: absolute;
+  white-space: nowrap;
+  z-index: 10001;
+}
+.tox-rtc-user-selection {
+  position: relative;
+}
+.tox-rtc-user-cursor {
+  bottom: 0;
+  cursor: default;
+  position: absolute;
+  top: 0;
+  width: 2px;
+}
+.tox-rtc-user-cursor::before {
+  background-color: inherit;
+  border-radius: 50%;
+  content: '';
+  display: block;
+  height: 8px;
+  position: absolute;
+  right: -3px;
+  top: -3px;
+  width: 8px;
+}
+.tox-rtc-user-cursor:hover::after {
+  background-color: inherit;
+  border-radius: 100px;
+  box-sizing: border-box;
+  color: #fff;
+  content: attr(data-user);
+  display: block;
+  font-size: 12px;
+  font-weight: bold;
+  left: -5px;
+  min-height: 8px;
+  min-width: 8px;
+  padding: 0 12px;
+  position: absolute;
+  top: -11px;
+  white-space: nowrap;
+  z-index: 1000;
+}
+.tox-rtc-user-selection--1 .tox-rtc-user-cursor {
+  background-color: #2dc26b;
+}
+.tox-rtc-user-selection--2 .tox-rtc-user-cursor {
+  background-color: #e03e2d;
+}
+.tox-rtc-user-selection--3 .tox-rtc-user-cursor {
+  background-color: #f1c40f;
+}
+.tox-rtc-user-selection--4 .tox-rtc-user-cursor {
+  background-color: #3598db;
+}
+.tox-rtc-user-selection--5 .tox-rtc-user-cursor {
+  background-color: #b96ad9;
+}
+.tox-rtc-user-selection--6 .tox-rtc-user-cursor {
+  background-color: #e67e23;
+}
+.tox-rtc-user-selection--7 .tox-rtc-user-cursor {
+  background-color: #aaa69d;
+}
+.tox-rtc-user-selection--8 .tox-rtc-user-cursor {
+  background-color: #f368e0;
+}
+.tox-rtc-remote-image {
+  background: #eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center;
+  border: 1px solid #ccc;
+  min-height: 240px;
+  min-width: 320px;
+}
+.mce-match-marker {
+  background: #aaa;
+  color: #fff;
+}
+.mce-match-marker-selected {
+  background: #39f;
+  color: #fff;
+}
+.mce-match-marker-selected::-moz-selection {
+  background: #39f;
+  color: #fff;
+}
+.mce-match-marker-selected::selection {
+  background: #39f;
+  color: #fff;
+}
+.mce-content-body img[data-mce-selected],
+.mce-content-body table[data-mce-selected] {
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body hr[data-mce-selected] {
+  outline: 3px solid #b4d7ff;
+  outline-offset: 1px;
+}
+.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus {
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover {
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body *[contentEditable=false][data-mce-selected] {
+  cursor: not-allowed;
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,
+.mce-content-body.mce-content-readonly *[contentEditable=true]:hover {
+  outline: none;
+}
+.mce-content-body *[data-mce-selected="inline-boundary"] {
+  background-color: #b4d7ff;
+}
+.mce-content-body .mce-edit-focus {
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body td[data-mce-selected],
+.mce-content-body th[data-mce-selected] {
+  background-color: #b4d7ff !important;
+}
+.mce-content-body td[data-mce-selected]::-moz-selection,
+.mce-content-body th[data-mce-selected]::-moz-selection {
+  background: none;
+}
+.mce-content-body td[data-mce-selected]::selection,
+.mce-content-body th[data-mce-selected]::selection {
+  background: none;
+}
+.mce-content-body td[data-mce-selected] *,
+.mce-content-body th[data-mce-selected] * {
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+}
+.mce-content-body img::-moz-selection {
+  background: none;
+}
+.mce-content-body img::selection {
+  background: none;
+}
+.ephox-snooker-resizer-bar {
+  background-color: #b4d7ff;
+  opacity: 0;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+.ephox-snooker-resizer-cols {
+  cursor: col-resize;
+}
+.ephox-snooker-resizer-rows {
+  cursor: row-resize;
+}
+.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging {
+  opacity: 1;
+}
+.mce-spellchecker-word {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");
+  background-position: 0 calc(100% + 1px);
+  background-repeat: repeat-x;
+  background-size: auto 6px;
+  cursor: default;
+  height: 2rem;
+}
+.mce-spellchecker-grammar {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");
+  background-position: 0 calc(100% + 1px);
+  background-repeat: repeat-x;
+  background-size: auto 6px;
+  cursor: default;
+}
+.mce-toc {
+  border: 1px solid gray;
+}
+.mce-toc h2 {
+  margin: 4px;
+}
+.mce-toc li {
+  list-style-type: none;
+}
+.mce-item-table,
+.mce-item-table td,
+.mce-item-table th,
+.mce-item-table caption {
+  border: 1px dashed #bbb;
+}
+.mce-visualblocks p,
+.mce-visualblocks h1,
+.mce-visualblocks h2,
+.mce-visualblocks h3,
+.mce-visualblocks h4,
+.mce-visualblocks h5,
+.mce-visualblocks h6,
+.mce-visualblocks div:not([data-mce-bogus]),
+.mce-visualblocks section,
+.mce-visualblocks article,
+.mce-visualblocks blockquote,
+.mce-visualblocks address,
+.mce-visualblocks pre,
+.mce-visualblocks figure,
+.mce-visualblocks figcaption,
+.mce-visualblocks hgroup,
+.mce-visualblocks aside,
+.mce-visualblocks ul,
+.mce-visualblocks ol,
+.mce-visualblocks dl {
+  background-repeat: no-repeat;
+  border: 1px dashed #bbb;
+  margin-left: 3px;
+  padding-top: 10px;
+}
+.mce-visualblocks p {
+  background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);
+}
+.mce-visualblocks h1 {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);
+}
+.mce-visualblocks h2 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);
+}
+.mce-visualblocks h3 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);
+}
+.mce-visualblocks h4 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);
+}
+.mce-visualblocks h5 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);
+}
+.mce-visualblocks h6 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);
+}
+.mce-visualblocks div:not([data-mce-bogus]) {
+  background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);
+}
+.mce-visualblocks section {
+  background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);
+}
+.mce-visualblocks article {
+  background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);
+}
+.mce-visualblocks blockquote {
+  background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);
+}
+.mce-visualblocks address {
+  background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);
+}
+.mce-visualblocks pre {
+  background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);
+}
+.mce-visualblocks figure {
+  background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);
+}
+.mce-visualblocks figcaption {
+  border: 1px dashed #bbb;
+}
+.mce-visualblocks hgroup {
+  background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);
+}
+.mce-visualblocks aside {
+  background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);
+}
+.mce-visualblocks ul {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==);
+}
+.mce-visualblocks ol {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);
+}
+.mce-visualblocks dl {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);
+}
+.mce-visualblocks:not([dir=rtl]) p,
+.mce-visualblocks:not([dir=rtl]) h1,
+.mce-visualblocks:not([dir=rtl]) h2,
+.mce-visualblocks:not([dir=rtl]) h3,
+.mce-visualblocks:not([dir=rtl]) h4,
+.mce-visualblocks:not([dir=rtl]) h5,
+.mce-visualblocks:not([dir=rtl]) h6,
+.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),
+.mce-visualblocks:not([dir=rtl]) section,
+.mce-visualblocks:not([dir=rtl]) article,
+.mce-visualblocks:not([dir=rtl]) blockquote,
+.mce-visualblocks:not([dir=rtl]) address,
+.mce-visualblocks:not([dir=rtl]) pre,
+.mce-visualblocks:not([dir=rtl]) figure,
+.mce-visualblocks:not([dir=rtl]) figcaption,
+.mce-visualblocks:not([dir=rtl]) hgroup,
+.mce-visualblocks:not([dir=rtl]) aside,
+.mce-visualblocks:not([dir=rtl]) ul,
+.mce-visualblocks:not([dir=rtl]) ol,
+.mce-visualblocks:not([dir=rtl]) dl {
+  margin-left: 3px;
+}
+.mce-visualblocks[dir=rtl] p,
+.mce-visualblocks[dir=rtl] h1,
+.mce-visualblocks[dir=rtl] h2,
+.mce-visualblocks[dir=rtl] h3,
+.mce-visualblocks[dir=rtl] h4,
+.mce-visualblocks[dir=rtl] h5,
+.mce-visualblocks[dir=rtl] h6,
+.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),
+.mce-visualblocks[dir=rtl] section,
+.mce-visualblocks[dir=rtl] article,
+.mce-visualblocks[dir=rtl] blockquote,
+.mce-visualblocks[dir=rtl] address,
+.mce-visualblocks[dir=rtl] pre,
+.mce-visualblocks[dir=rtl] figure,
+.mce-visualblocks[dir=rtl] figcaption,
+.mce-visualblocks[dir=rtl] hgroup,
+.mce-visualblocks[dir=rtl] aside,
+.mce-visualblocks[dir=rtl] ul,
+.mce-visualblocks[dir=rtl] ol,
+.mce-visualblocks[dir=rtl] dl {
+  background-position-x: right;
+  margin-right: 3px;
+}
+.mce-nbsp,
+.mce-shy {
+  background: #aaa;
+}
+.mce-shy::after {
+  content: '-';
+}
+body {
+  font-family: sans-serif;
+}
+table {
+  border-collapse: collapse;
+}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide/content.inline.css
@@ -1,1 +1,690 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.mce-content-body .mce-item-anchor {
+  background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
+  cursor: default;
+  display: inline-block;
+  height: 12px !important;
+  padding: 0 2px;
+  -webkit-user-modify: read-only;
+  -moz-user-modify: read-only;
+  -webkit-user-select: all;
+  -moz-user-select: all;
+  -ms-user-select: all;
+      user-select: all;
+  width: 8px !important;
+}
+.mce-content-body .mce-item-anchor[data-mce-selected] {
+  outline-offset: 1px;
+}
+.tox-comments-visible .tox-comment {
+  background-color: #fff0b7;
+}
+.tox-comments-visible .tox-comment--active {
+  background-color: #ffe168;
+}
+.tox-checklist > li:not(.tox-checklist--hidden) {
+  list-style: none;
+  margin: 0.25em 0;
+}
+.tox-checklist > li:not(.tox-checklist--hidden)::before {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");
+  background-size: 100%;
+  content: '';
+  cursor: pointer;
+  height: 1em;
+  margin-left: -1.5em;
+  margin-top: 0.125em;
+  position: absolute;
+  width: 1em;
+}
+.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");
+}
+[dir=rtl] .tox-checklist > li:not(.tox-checklist--hidden)::before {
+  margin-left: 0;
+  margin-right: -1.5em;
+}
+/* stylelint-disable */
+/* http://prismjs.com/ */
+/**
+ * prism.js default theme for JavaScript, CSS and HTML
+ * Based on dabblet (http://dabblet.com)
+ * @author Lea Verou
+ */
+code[class*="language-"],
+pre[class*="language-"] {
+  color: black;
+  background: none;
+  text-shadow: 0 1px white;
+  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
+  font-size: 1em;
+  text-align: left;
+  white-space: pre;
+  word-spacing: normal;
+  word-break: normal;
+  word-wrap: normal;
+  line-height: 1.5;
+  -moz-tab-size: 4;
+  tab-size: 4;
+  -webkit-hyphens: none;
+  -ms-hyphens: none;
+  hyphens: none;
+}
+pre[class*="language-"]::-moz-selection,
+pre[class*="language-"] ::-moz-selection,
+code[class*="language-"]::-moz-selection,
+code[class*="language-"] ::-moz-selection {
+  text-shadow: none;
+  background: #b3d4fc;
+}
+pre[class*="language-"]::selection,
+pre[class*="language-"] ::selection,
+code[class*="language-"]::selection,
+code[class*="language-"] ::selection {
+  text-shadow: none;
+  background: #b3d4fc;
+}
+@media print {
+  code[class*="language-"],
+  pre[class*="language-"] {
+    text-shadow: none;
+  }
+}
+/* Code blocks */
+pre[class*="language-"] {
+  padding: 1em;
+  margin: 0.5em 0;
+  overflow: auto;
+}
+:not(pre) > code[class*="language-"],
+pre[class*="language-"] {
+  background: #f5f2f0;
+}
+/* Inline code */
+:not(pre) > code[class*="language-"] {
+  padding: 0.1em;
+  border-radius: 0.3em;
+  white-space: normal;
+}
+.token.comment,
+.token.prolog,
+.token.doctype,
+.token.cdata {
+  color: slategray;
+}
+.token.punctuation {
+  color: #999;
+}
+.namespace {
+  opacity: 0.7;
+}
+.token.property,
+.token.tag,
+.token.boolean,
+.token.number,
+.token.constant,
+.token.symbol,
+.token.deleted {
+  color: #905;
+}
+.token.selector,
+.token.attr-name,
+.token.string,
+.token.char,
+.token.builtin,
+.token.inserted {
+  color: #690;
+}
+.token.operator,
+.token.entity,
+.token.url,
+.language-css .token.string,
+.style .token.string {
+  color: #9a6e3a;
+  background: hsla(0, 0%, 100%, 0.5);
+}
+.token.atrule,
+.token.attr-value,
+.token.keyword {
+  color: #07a;
+}
+.token.function,
+.token.class-name {
+  color: #DD4A68;
+}
+.token.regex,
+.token.important,
+.token.variable {
+  color: #e90;
+}
+.token.important,
+.token.bold {
+  font-weight: bold;
+}
+.token.italic {
+  font-style: italic;
+}
+.token.entity {
+  cursor: help;
+}
+/* stylelint-enable */
+.mce-content-body {
+  overflow-wrap: break-word;
+  word-wrap: break-word;
+}
+.mce-content-body .mce-visual-caret {
+  background-color: black;
+  background-color: currentColor;
+  position: absolute;
+}
+.mce-content-body .mce-visual-caret-hidden {
+  display: none;
+}
+.mce-content-body *[data-mce-caret] {
+  left: -1000px;
+  margin: 0;
+  padding: 0;
+  position: absolute;
+  right: auto;
+  top: 0;
+}
+.mce-content-body .mce-offscreen-selection {
+  left: -2000000px;
+  max-width: 1000000px;
+  position: absolute;
+}
+.mce-content-body *[contentEditable=false] {
+  cursor: default;
+}
+.mce-content-body *[contentEditable=true] {
+  cursor: text;
+}
+.tox-cursor-format-painter {
+  cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
+}
+.mce-content-body figure.align-left {
+  float: left;
+}
+.mce-content-body figure.align-right {
+  float: right;
+}
+.mce-content-body figure.image.align-center {
+  display: table;
+  margin-left: auto;
+  margin-right: auto;
+}
+.mce-preview-object {
+  border: 1px solid gray;
+  display: inline-block;
+  line-height: 0;
+  margin: 0 2px 0 2px;
+  position: relative;
+}
+.mce-preview-object .mce-shim {
+  background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
+  height: 100%;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.mce-preview-object[data-mce-selected="2"] .mce-shim {
+  display: none;
+}
+.mce-object {
+  background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
+  border: 1px dashed #aaa;
+}
+.mce-pagebreak {
+  border: 1px dashed #aaa;
+  cursor: default;
+  display: block;
+  height: 5px;
+  margin-top: 15px;
+  page-break-before: always;
+  width: 100%;
+}
+@media print {
+  .mce-pagebreak {
+    border: 0;
+  }
+}
+.tiny-pageembed .mce-shim {
+  background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
+  height: 100%;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.tiny-pageembed[data-mce-selected="2"] .mce-shim {
+  display: none;
+}
+.tiny-pageembed {
+  display: inline-block;
+  position: relative;
+}
+.tiny-pageembed--21by9,
+.tiny-pageembed--16by9,
+.tiny-pageembed--4by3,
+.tiny-pageembed--1by1 {
+  display: block;
+  overflow: hidden;
+  padding: 0;
+  position: relative;
+  width: 100%;
+}
+.tiny-pageembed--21by9 {
+  padding-top: 42.857143%;
+}
+.tiny-pageembed--16by9 {
+  padding-top: 56.25%;
+}
+.tiny-pageembed--4by3 {
+  padding-top: 75%;
+}
+.tiny-pageembed--1by1 {
+  padding-top: 100%;
+}
+.tiny-pageembed--21by9 iframe,
+.tiny-pageembed--16by9 iframe,
+.tiny-pageembed--4by3 iframe,
+.tiny-pageembed--1by1 iframe {
+  border: 0;
+  height: 100%;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.mce-content-body[data-mce-placeholder] {
+  position: relative;
+}
+.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {
+  color: rgba(34, 47, 62, 0.7);
+  content: attr(data-mce-placeholder);
+  position: absolute;
+}
+.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before {
+  left: 1px;
+}
+.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before {
+  right: 1px;
+}
+.mce-content-body div.mce-resizehandle {
+  background-color: #4099ff;
+  border-color: #4099ff;
+  border-style: solid;
+  border-width: 1px;
+  box-sizing: border-box;
+  height: 10px;
+  position: absolute;
+  width: 10px;
+  z-index: 10000;
+}
+.mce-content-body div.mce-resizehandle:hover {
+  background-color: #4099ff;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(1) {
+  cursor: nwse-resize;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(2) {
+  cursor: nesw-resize;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(3) {
+  cursor: nwse-resize;
+}
+.mce-content-body div.mce-resizehandle:nth-of-type(4) {
+  cursor: nesw-resize;
+}
+.mce-content-body .mce-clonedresizable {
+  opacity: 0.5;
+  outline: 1px dashed black;
+  position: absolute;
+  z-index: 10000;
+}
+.mce-content-body .mce-resize-helper {
+  background: #555;
+  background: rgba(0, 0, 0, 0.75);
+  border: 1px;
+  border-radius: 3px;
+  color: white;
+  display: none;
+  font-family: sans-serif;
+  font-size: 12px;
+  line-height: 14px;
+  margin: 5px 10px;
+  padding: 5px;
+  position: absolute;
+  white-space: nowrap;
+  z-index: 10001;
+}
+.tox-rtc-user-selection {
+  position: relative;
+}
+.tox-rtc-user-cursor {
+  bottom: 0;
+  cursor: default;
+  position: absolute;
+  top: 0;
+  width: 2px;
+}
+.tox-rtc-user-cursor::before {
+  background-color: inherit;
+  border-radius: 50%;
+  content: '';
+  display: block;
+  height: 8px;
+  position: absolute;
+  right: -3px;
+  top: -3px;
+  width: 8px;
+}
+.tox-rtc-user-cursor:hover::after {
+  background-color: inherit;
+  border-radius: 100px;
+  box-sizing: border-box;
+  color: #fff;
+  content: attr(data-user);
+  display: block;
+  font-size: 12px;
+  font-weight: bold;
+  left: -5px;
+  min-height: 8px;
+  min-width: 8px;
+  padding: 0 12px;
+  position: absolute;
+  top: -11px;
+  white-space: nowrap;
+  z-index: 1000;
+}
+.tox-rtc-user-selection--1 .tox-rtc-user-cursor {
+  background-color: #2dc26b;
+}
+.tox-rtc-user-selection--2 .tox-rtc-user-cursor {
+  background-color: #e03e2d;
+}
+.tox-rtc-user-selection--3 .tox-rtc-user-cursor {
+  background-color: #f1c40f;
+}
+.tox-rtc-user-selection--4 .tox-rtc-user-cursor {
+  background-color: #3598db;
+}
+.tox-rtc-user-selection--5 .tox-rtc-user-cursor {
+  background-color: #b96ad9;
+}
+.tox-rtc-user-selection--6 .tox-rtc-user-cursor {
+  background-color: #e67e23;
+}
+.tox-rtc-user-selection--7 .tox-rtc-user-cursor {
+  background-color: #aaa69d;
+}
+.tox-rtc-user-selection--8 .tox-rtc-user-cursor {
+  background-color: #f368e0;
+}
+.tox-rtc-remote-image {
+  background: #eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center;
+  border: 1px solid #ccc;
+  min-height: 240px;
+  min-width: 320px;
+}
+.mce-match-marker {
+  background: #aaa;
+  color: #fff;
+}
+.mce-match-marker-selected {
+  background: #39f;
+  color: #fff;
+}
+.mce-match-marker-selected::-moz-selection {
+  background: #39f;
+  color: #fff;
+}
+.mce-match-marker-selected::selection {
+  background: #39f;
+  color: #fff;
+}
+.mce-content-body img[data-mce-selected],
+.mce-content-body table[data-mce-selected] {
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body hr[data-mce-selected] {
+  outline: 3px solid #b4d7ff;
+  outline-offset: 1px;
+}
+.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus {
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover {
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body *[contentEditable=false][data-mce-selected] {
+  cursor: not-allowed;
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,
+.mce-content-body.mce-content-readonly *[contentEditable=true]:hover {
+  outline: none;
+}
+.mce-content-body *[data-mce-selected="inline-boundary"] {
+  background-color: #b4d7ff;
+}
+.mce-content-body .mce-edit-focus {
+  outline: 3px solid #b4d7ff;
+}
+.mce-content-body td[data-mce-selected],
+.mce-content-body th[data-mce-selected] {
+  background-color: #b4d7ff !important;
+}
+.mce-content-body td[data-mce-selected]::-moz-selection,
+.mce-content-body th[data-mce-selected]::-moz-selection {
+  background: none;
+}
+.mce-content-body td[data-mce-selected]::selection,
+.mce-content-body th[data-mce-selected]::selection {
+  background: none;
+}
+.mce-content-body td[data-mce-selected] *,
+.mce-content-body th[data-mce-selected] * {
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+}
+.mce-content-body img::-moz-selection {
+  background: none;
+}
+.mce-content-body img::selection {
+  background: none;
+}
+.ephox-snooker-resizer-bar {
+  background-color: #b4d7ff;
+  opacity: 0;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+.ephox-snooker-resizer-cols {
+  cursor: col-resize;
+}
+.ephox-snooker-resizer-rows {
+  cursor: row-resize;
+}
+.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging {
+  opacity: 1;
+}
+.mce-spellchecker-word {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");
+  background-position: 0 calc(100% + 1px);
+  background-repeat: repeat-x;
+  background-size: auto 6px;
+  cursor: default;
+  height: 2rem;
+}
+.mce-spellchecker-grammar {
+  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");
+  background-position: 0 calc(100% + 1px);
+  background-repeat: repeat-x;
+  background-size: auto 6px;
+  cursor: default;
+}
+.mce-toc {
+  border: 1px solid gray;
+}
+.mce-toc h2 {
+  margin: 4px;
+}
+.mce-toc li {
+  list-style-type: none;
+}
+.mce-item-table,
+.mce-item-table td,
+.mce-item-table th,
+.mce-item-table caption {
+  border: 1px dashed #bbb;
+}
+.mce-visualblocks p,
+.mce-visualblocks h1,
+.mce-visualblocks h2,
+.mce-visualblocks h3,
+.mce-visualblocks h4,
+.mce-visualblocks h5,
+.mce-visualblocks h6,
+.mce-visualblocks div:not([data-mce-bogus]),
+.mce-visualblocks section,
+.mce-visualblocks article,
+.mce-visualblocks blockquote,
+.mce-visualblocks address,
+.mce-visualblocks pre,
+.mce-visualblocks figure,
+.mce-visualblocks figcaption,
+.mce-visualblocks hgroup,
+.mce-visualblocks aside,
+.mce-visualblocks ul,
+.mce-visualblocks ol,
+.mce-visualblocks dl {
+  background-repeat: no-repeat;
+  border: 1px dashed #bbb;
+  margin-left: 3px;
+  padding-top: 10px;
+}
+.mce-visualblocks p {
+  background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);
+}
+.mce-visualblocks h1 {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);
+}
+.mce-visualblocks h2 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);
+}
+.mce-visualblocks h3 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);
+}
+.mce-visualblocks h4 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);
+}
+.mce-visualblocks h5 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);
+}
+.mce-visualblocks h6 {
+  background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);
+}
+.mce-visualblocks div:not([data-mce-bogus]) {
+  background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);
+}
+.mce-visualblocks section {
+  background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);
+}
+.mce-visualblocks article {
+  background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);
+}
+.mce-visualblocks blockquote {
+  background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);
+}
+.mce-visualblocks address {
+  background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);
+}
+.mce-visualblocks pre {
+  background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);
+}
+.mce-visualblocks figure {
+  background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);
+}
+.mce-visualblocks figcaption {
+  border: 1px dashed #bbb;
+}
+.mce-visualblocks hgroup {
+  background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);
+}
+.mce-visualblocks aside {
+  background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);
+}
+.mce-visualblocks ul {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==);
+}
+.mce-visualblocks ol {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);
+}
+.mce-visualblocks dl {
+  background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);
+}
+.mce-visualblocks:not([dir=rtl]) p,
+.mce-visualblocks:not([dir=rtl]) h1,
+.mce-visualblocks:not([dir=rtl]) h2,
+.mce-visualblocks:not([dir=rtl]) h3,
+.mce-visualblocks:not([dir=rtl]) h4,
+.mce-visualblocks:not([dir=rtl]) h5,
+.mce-visualblocks:not([dir=rtl]) h6,
+.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),
+.mce-visualblocks:not([dir=rtl]) section,
+.mce-visualblocks:not([dir=rtl]) article,
+.mce-visualblocks:not([dir=rtl]) blockquote,
+.mce-visualblocks:not([dir=rtl]) address,
+.mce-visualblocks:not([dir=rtl]) pre,
+.mce-visualblocks:not([dir=rtl]) figure,
+.mce-visualblocks:not([dir=rtl]) figcaption,
+.mce-visualblocks:not([dir=rtl]) hgroup,
+.mce-visualblocks:not([dir=rtl]) aside,
+.mce-visualblocks:not([dir=rtl]) ul,
+.mce-visualblocks:not([dir=rtl]) ol,
+.mce-visualblocks:not([dir=rtl]) dl {
+  margin-left: 3px;
+}
+.mce-visualblocks[dir=rtl] p,
+.mce-visualblocks[dir=rtl] h1,
+.mce-visualblocks[dir=rtl] h2,
+.mce-visualblocks[dir=rtl] h3,
+.mce-visualblocks[dir=rtl] h4,
+.mce-visualblocks[dir=rtl] h5,
+.mce-visualblocks[dir=rtl] h6,
+.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),
+.mce-visualblocks[dir=rtl] section,
+.mce-visualblocks[dir=rtl] article,
+.mce-visualblocks[dir=rtl] blockquote,
+.mce-visualblocks[dir=rtl] address,
+.mce-visualblocks[dir=rtl] pre,
+.mce-visualblocks[dir=rtl] figure,
+.mce-visualblocks[dir=rtl] figcaption,
+.mce-visualblocks[dir=rtl] hgroup,
+.mce-visualblocks[dir=rtl] aside,
+.mce-visualblocks[dir=rtl] ul,
+.mce-visualblocks[dir=rtl] ol,
+.mce-visualblocks[dir=rtl] dl {
+  background-position-x: right;
+  margin-right: 3px;
+}
+.mce-nbsp,
+.mce-shy {
+  background: #aaa;
+}
+.mce-shy::after {
+  content: '-';
+}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide/content.inline.min.css
@@ -1,1 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.mce-content-body .mce-item-anchor{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;cursor:default;display:inline-block;height:12px!important;padding:0 2px;-webkit-user-modify:read-only;-moz-user-modify:read-only;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;width:8px!important}.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset:1px}.tox-comments-visible .tox-comment{background-color:#fff0b7}.tox-comments-visible .tox-comment--active{background-color:#ffe168}.tox-checklist>li:not(.tox-checklist--hidden){list-style:none;margin:.25em 0}.tox-checklist>li:not(.tox-checklist--hidden)::before{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");background-size:100%;content:'';cursor:pointer;height:1em;margin-left:-1.5em;margin-top:.125em;position:absolute;width:1em}.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A")}[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-left:0;margin-right:-1.5em}code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.mce-content-body{overflow-wrap:break-word;word-wrap:break-word}.mce-content-body .mce-visual-caret{background-color:#000;background-color:currentColor;position:absolute}.mce-content-body .mce-visual-caret-hidden{display:none}.mce-content-body [data-mce-caret]{left:-1000px;margin:0;padding:0;position:absolute;right:auto;top:0}.mce-content-body .mce-offscreen-selection{left:-2000000px;max-width:1000000px;position:absolute}.mce-content-body [contentEditable=false]{cursor:default}.mce-content-body [contentEditable=true]{cursor:text}.tox-cursor-format-painter{cursor:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default}.mce-content-body figure.align-left{float:left}.mce-content-body figure.align-right{float:right}.mce-content-body figure.image.align-center{display:table;margin-left:auto;margin-right:auto}.mce-preview-object{border:1px solid gray;display:inline-block;line-height:0;margin:0 2px 0 2px;position:relative}.mce-preview-object .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-object{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;border:1px dashed #aaa}.mce-pagebreak{border:1px dashed #aaa;cursor:default;display:block;height:5px;margin-top:15px;page-break-before:always;width:100%}@media print{.mce-pagebreak{border:0}}.tiny-pageembed .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.tiny-pageembed[data-mce-selected="2"] .mce-shim{display:none}.tiny-pageembed{display:inline-block;position:relative}.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{display:block;overflow:hidden;padding:0;position:relative;width:100%}.tiny-pageembed--21by9{padding-top:42.857143%}.tiny-pageembed--16by9{padding-top:56.25%}.tiny-pageembed--4by3{padding-top:75%}.tiny-pageembed--1by1{padding-top:100%}.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.mce-content-body[data-mce-placeholder]{position:relative}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before{color:rgba(34,47,62,.7);content:attr(data-mce-placeholder);position:absolute}.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before{left:1px}.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before{right:1px}.mce-content-body div.mce-resizehandle{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;height:10px;position:absolute;width:10px;z-index:10000}.mce-content-body div.mce-resizehandle:hover{background-color:#4099ff}.mce-content-body div.mce-resizehandle:nth-of-type(1){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor:nesw-resize}.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor:nesw-resize}.mce-content-body .mce-clonedresizable{opacity:.5;outline:1px dashed #000;position:absolute;z-index:10000}.mce-content-body .mce-resize-helper{background:#555;background:rgba(0,0,0,.75);border:1px;border-radius:3px;color:#fff;display:none;font-family:sans-serif;font-size:12px;line-height:14px;margin:5px 10px;padding:5px;position:absolute;white-space:nowrap;z-index:10001}.tox-rtc-user-selection{position:relative}.tox-rtc-user-cursor{bottom:0;cursor:default;position:absolute;top:0;width:2px}.tox-rtc-user-cursor::before{background-color:inherit;border-radius:50%;content:'';display:block;height:8px;position:absolute;right:-3px;top:-3px;width:8px}.tox-rtc-user-cursor:hover::after{background-color:inherit;border-radius:100px;box-sizing:border-box;color:#fff;content:attr(data-user);display:block;font-size:12px;font-weight:700;left:-5px;min-height:8px;min-width:8px;padding:0 12px;position:absolute;top:-11px;white-space:nowrap;z-index:1000}.tox-rtc-user-selection--1 .tox-rtc-user-cursor{background-color:#2dc26b}.tox-rtc-user-selection--2 .tox-rtc-user-cursor{background-color:#e03e2d}.tox-rtc-user-selection--3 .tox-rtc-user-cursor{background-color:#f1c40f}.tox-rtc-user-selection--4 .tox-rtc-user-cursor{background-color:#3598db}.tox-rtc-user-selection--5 .tox-rtc-user-cursor{background-color:#b96ad9}.tox-rtc-user-selection--6 .tox-rtc-user-cursor{background-color:#e67e23}.tox-rtc-user-selection--7 .tox-rtc-user-cursor{background-color:#aaa69d}.tox-rtc-user-selection--8 .tox-rtc-user-cursor{background-color:#f368e0}.tox-rtc-remote-image{background:#eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center;border:1px solid #ccc;min-height:240px;min-width:320px}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-match-marker-selected::-moz-selection{background:#39f;color:#fff}.mce-match-marker-selected::selection{background:#39f;color:#fff}.mce-content-body img[data-mce-selected],.mce-content-body table[data-mce-selected]{outline:3px solid #b4d7ff}.mce-content-body hr[data-mce-selected]{outline:3px solid #b4d7ff;outline-offset:1px}.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false][data-mce-selected]{cursor:not-allowed;outline:3px solid #b4d7ff}.mce-content-body.mce-content-readonly [contentEditable=true]:focus,.mce-content-body.mce-content-readonly [contentEditable=true]:hover{outline:0}.mce-content-body [data-mce-selected=inline-boundary]{background-color:#b4d7ff}.mce-content-body .mce-edit-focus{outline:3px solid #b4d7ff}.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{background-color:#b4d7ff!important}.mce-content-body td[data-mce-selected]::-moz-selection,.mce-content-body th[data-mce-selected]::-moz-selection{background:0 0}.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background:0 0}.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mce-content-body img::-moz-selection{background:0 0}.mce-content-body img::selection{background:0 0}.ephox-snooker-resizer-bar{background-color:#b4d7ff;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:1}.mce-spellchecker-word{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default;height:2rem}.mce-spellchecker-grammar{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-item-table,.mce-item-table caption,.mce-item-table td,.mce-item-table th{border:1px dashed #bbb}.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{background-repeat:no-repeat;border:1px dashed #bbb;margin-left:3px;padding-top:10px}.mce-visualblocks p{background-image:url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)}.mce-visualblocks h1{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)}.mce-visualblocks h2{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)}.mce-visualblocks h3{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)}.mce-visualblocks h4{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)}.mce-visualblocks h5{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)}.mce-visualblocks h6{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)}.mce-visualblocks div:not([data-mce-bogus]){background-image:url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)}.mce-visualblocks section{background-image:url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)}.mce-visualblocks article{background-image:url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)}.mce-visualblocks blockquote{background-image:url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)}.mce-visualblocks address{background-image:url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=)}.mce-visualblocks pre{background-image:url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)}.mce-visualblocks figure{background-image:url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7)}.mce-visualblocks figcaption{border:1px dashed #bbb}.mce-visualblocks hgroup{background-image:url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)}.mce-visualblocks aside{background-image:url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)}.mce-visualblocks ul{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)}.mce-visualblocks ol{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==)}.mce-visualblocks dl{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==)}.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left:3px}.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x:right;margin-right:3px}.mce-nbsp,.mce-shy{background:#aaa}.mce-shy::after{content:'-'}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide/content.min.css
@@ -1,1 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.mce-content-body .mce-item-anchor{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;cursor:default;display:inline-block;height:12px!important;padding:0 2px;-webkit-user-modify:read-only;-moz-user-modify:read-only;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;width:8px!important}.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset:1px}.tox-comments-visible .tox-comment{background-color:#fff0b7}.tox-comments-visible .tox-comment--active{background-color:#ffe168}.tox-checklist>li:not(.tox-checklist--hidden){list-style:none;margin:.25em 0}.tox-checklist>li:not(.tox-checklist--hidden)::before{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");background-size:100%;content:'';cursor:pointer;height:1em;margin-left:-1.5em;margin-top:.125em;position:absolute;width:1em}.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A")}[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-left:0;margin-right:-1.5em}code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.mce-content-body{overflow-wrap:break-word;word-wrap:break-word}.mce-content-body .mce-visual-caret{background-color:#000;background-color:currentColor;position:absolute}.mce-content-body .mce-visual-caret-hidden{display:none}.mce-content-body [data-mce-caret]{left:-1000px;margin:0;padding:0;position:absolute;right:auto;top:0}.mce-content-body .mce-offscreen-selection{left:-2000000px;max-width:1000000px;position:absolute}.mce-content-body [contentEditable=false]{cursor:default}.mce-content-body [contentEditable=true]{cursor:text}.tox-cursor-format-painter{cursor:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default}.mce-content-body figure.align-left{float:left}.mce-content-body figure.align-right{float:right}.mce-content-body figure.image.align-center{display:table;margin-left:auto;margin-right:auto}.mce-preview-object{border:1px solid gray;display:inline-block;line-height:0;margin:0 2px 0 2px;position:relative}.mce-preview-object .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-object{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;border:1px dashed #aaa}.mce-pagebreak{border:1px dashed #aaa;cursor:default;display:block;height:5px;margin-top:15px;page-break-before:always;width:100%}@media print{.mce-pagebreak{border:0}}.tiny-pageembed .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.tiny-pageembed[data-mce-selected="2"] .mce-shim{display:none}.tiny-pageembed{display:inline-block;position:relative}.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{display:block;overflow:hidden;padding:0;position:relative;width:100%}.tiny-pageembed--21by9{padding-top:42.857143%}.tiny-pageembed--16by9{padding-top:56.25%}.tiny-pageembed--4by3{padding-top:75%}.tiny-pageembed--1by1{padding-top:100%}.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.mce-content-body[data-mce-placeholder]{position:relative}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before{color:rgba(34,47,62,.7);content:attr(data-mce-placeholder);position:absolute}.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before{left:1px}.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before{right:1px}.mce-content-body div.mce-resizehandle{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;height:10px;position:absolute;width:10px;z-index:10000}.mce-content-body div.mce-resizehandle:hover{background-color:#4099ff}.mce-content-body div.mce-resizehandle:nth-of-type(1){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor:nesw-resize}.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor:nesw-resize}.mce-content-body .mce-clonedresizable{opacity:.5;outline:1px dashed #000;position:absolute;z-index:10000}.mce-content-body .mce-resize-helper{background:#555;background:rgba(0,0,0,.75);border:1px;border-radius:3px;color:#fff;display:none;font-family:sans-serif;font-size:12px;line-height:14px;margin:5px 10px;padding:5px;position:absolute;white-space:nowrap;z-index:10001}.tox-rtc-user-selection{position:relative}.tox-rtc-user-cursor{bottom:0;cursor:default;position:absolute;top:0;width:2px}.tox-rtc-user-cursor::before{background-color:inherit;border-radius:50%;content:'';display:block;height:8px;position:absolute;right:-3px;top:-3px;width:8px}.tox-rtc-user-cursor:hover::after{background-color:inherit;border-radius:100px;box-sizing:border-box;color:#fff;content:attr(data-user);display:block;font-size:12px;font-weight:700;left:-5px;min-height:8px;min-width:8px;padding:0 12px;position:absolute;top:-11px;white-space:nowrap;z-index:1000}.tox-rtc-user-selection--1 .tox-rtc-user-cursor{background-color:#2dc26b}.tox-rtc-user-selection--2 .tox-rtc-user-cursor{background-color:#e03e2d}.tox-rtc-user-selection--3 .tox-rtc-user-cursor{background-color:#f1c40f}.tox-rtc-user-selection--4 .tox-rtc-user-cursor{background-color:#3598db}.tox-rtc-user-selection--5 .tox-rtc-user-cursor{background-color:#b96ad9}.tox-rtc-user-selection--6 .tox-rtc-user-cursor{background-color:#e67e23}.tox-rtc-user-selection--7 .tox-rtc-user-cursor{background-color:#aaa69d}.tox-rtc-user-selection--8 .tox-rtc-user-cursor{background-color:#f368e0}.tox-rtc-remote-image{background:#eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center;border:1px solid #ccc;min-height:240px;min-width:320px}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-match-marker-selected::-moz-selection{background:#39f;color:#fff}.mce-match-marker-selected::selection{background:#39f;color:#fff}.mce-content-body img[data-mce-selected],.mce-content-body table[data-mce-selected]{outline:3px solid #b4d7ff}.mce-content-body hr[data-mce-selected]{outline:3px solid #b4d7ff;outline-offset:1px}.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false][data-mce-selected]{cursor:not-allowed;outline:3px solid #b4d7ff}.mce-content-body.mce-content-readonly [contentEditable=true]:focus,.mce-content-body.mce-content-readonly [contentEditable=true]:hover{outline:0}.mce-content-body [data-mce-selected=inline-boundary]{background-color:#b4d7ff}.mce-content-body .mce-edit-focus{outline:3px solid #b4d7ff}.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{background-color:#b4d7ff!important}.mce-content-body td[data-mce-selected]::-moz-selection,.mce-content-body th[data-mce-selected]::-moz-selection{background:0 0}.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background:0 0}.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mce-content-body img::-moz-selection{background:0 0}.mce-content-body img::selection{background:0 0}.ephox-snooker-resizer-bar{background-color:#b4d7ff;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:1}.mce-spellchecker-word{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default;height:2rem}.mce-spellchecker-grammar{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-item-table,.mce-item-table caption,.mce-item-table td,.mce-item-table th{border:1px dashed #bbb}.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{background-repeat:no-repeat;border:1px dashed #bbb;margin-left:3px;padding-top:10px}.mce-visualblocks p{background-image:url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)}.mce-visualblocks h1{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)}.mce-visualblocks h2{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)}.mce-visualblocks h3{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)}.mce-visualblocks h4{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)}.mce-visualblocks h5{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)}.mce-visualblocks h6{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)}.mce-visualblocks div:not([data-mce-bogus]){background-image:url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)}.mce-visualblocks section{background-image:url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)}.mce-visualblocks article{background-image:url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)}.mce-visualblocks blockquote{background-image:url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)}.mce-visualblocks address{background-image:url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=)}.mce-visualblocks pre{background-image:url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)}.mce-visualblocks figure{background-image:url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7)}.mce-visualblocks figcaption{border:1px dashed #bbb}.mce-visualblocks hgroup{background-image:url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)}.mce-visualblocks aside{background-image:url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)}.mce-visualblocks ul{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)}.mce-visualblocks ol{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==)}.mce-visualblocks dl{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==)}.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left:3px}.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x:right;margin-right:3px}.mce-nbsp,.mce-shy{background:#aaa}.mce-shy::after{content:'-'}body{font-family:sans-serif}table{border-collapse:collapse}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide/content.mobile.css
@@ -1,1 +1,30 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection {
+  /* Note: this file is used inside the content, so isn't part of theming */
+  background-color: green;
+  display: inline-block;
+  opacity: 0.5;
+  position: absolute;
+}
+body {
+  -webkit-text-size-adjust: none;
+}
+body img {
+  /* this is related to the content margin */
+  max-width: 96vw;
+}
+body table img {
+  max-width: 95%;
+}
+body {
+  font-family: sans-serif;
+}
+table {
+  border-collapse: collapse;
+}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide/content.mobile.min.css
@@ -1,1 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{background-color:green;display:inline-block;opacity:.5;position:absolute}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}body{font-family:sans-serif}table{border-collapse:collapse}
 

 Binary files /dev/null and b/tinymce/5/js/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff differ
--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide/skin.css
@@ -1,1 +1,2898 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.tox {
+  box-sizing: content-box;
+  color: #222f3e;
+  cursor: auto;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+  font-size: 16px;
+  font-style: normal;
+  font-weight: normal;
+  line-height: normal;
+  -webkit-tap-highlight-color: transparent;
+  text-decoration: none;
+  text-shadow: none;
+  text-transform: none;
+  vertical-align: initial;
+  white-space: normal;
+}
+.tox *:not(svg):not(rect) {
+  box-sizing: inherit;
+  color: inherit;
+  cursor: inherit;
+  direction: inherit;
+  font-family: inherit;
+  font-size: inherit;
+  font-style: inherit;
+  font-weight: inherit;
+  line-height: inherit;
+  -webkit-tap-highlight-color: inherit;
+  text-align: inherit;
+  text-decoration: inherit;
+  text-shadow: inherit;
+  text-transform: inherit;
+  vertical-align: inherit;
+  white-space: inherit;
+}
+.tox *:not(svg):not(rect) {
+  /* stylelint-disable-line no-duplicate-selectors */
+  background: transparent;
+  border: 0;
+  float: none;
+  height: auto;
+  margin: 0;
+  max-width: none;
+  outline: 0;
+  padding: 0;
+  position: static;
+  width: auto;
+}
+.tox:not([dir=rtl]) {
+  direction: ltr;
+  text-align: left;
+}
+.tox[dir=rtl] {
+  direction: rtl;
+  text-align: right;
+}
+.tox-tinymce {
+  border: 1px solid #cccccc;
+  border-radius: 0;
+  box-shadow: none;
+  box-sizing: border-box;
+  display: flex;
+  flex-direction: column;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+  overflow: hidden;
+  position: relative;
+  visibility: inherit !important;
+}
+.tox-tinymce-inline {
+  border: none;
+  box-shadow: none;
+}
+.tox-tinymce-inline .tox-editor-header {
+  border: 1px solid #cccccc;
+  border-radius: 0;
+  box-shadow: none;
+}
+.tox-tinymce-aux {
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+  z-index: 1300;
+}
+.tox-tinymce *:focus,
+.tox-tinymce-aux *:focus {
+  outline: none;
+}
+button::-moz-focus-inner {
+  border: 0;
+}
+.tox .accessibility-issue__header {
+  align-items: center;
+  display: flex;
+  margin-bottom: 4px;
+}
+.tox .accessibility-issue__description {
+  align-items: stretch;
+  border: 1px solid #cccccc;
+  border-radius: 3px;
+  display: flex;
+  justify-content: space-between;
+}
+.tox .accessibility-issue__description > div {
+  padding-bottom: 4px;
+}
+.tox .accessibility-issue__description > div > div {
+  align-items: center;
+  display: flex;
+  margin-bottom: 4px;
+}
+.tox .accessibility-issue__description > *:last-child:not(:only-child) {
+  border-color: #cccccc;
+  border-style: solid;
+}
+.tox .accessibility-issue__repair {
+  margin-top: 16px;
+}
+.tox .accessibility-issue--info .accessibility-issue__description {
+  background-color: rgba(32, 122, 183, 0.1);
+  border-color: rgba(32, 122, 183, 0.4);
+  color: #222f3e;
+}
+.tox .accessibility-issue--info .accessibility-issue__description > *:last-child {
+  border-color: rgba(32, 122, 183, 0.4);
+}
+.tox .accessibility-issue--info h2 {
+  color: #207ab7;
+}
+.tox .accessibility-issue--info .tox-icon svg {
+  fill: #207ab7;
+}
+.tox .accessibility-issue--info a .tox-icon {
+  color: #207ab7;
+}
+.tox .accessibility-issue--warn .accessibility-issue__description {
+  background-color: rgba(255, 165, 0, 0.1);
+  border-color: rgba(255, 165, 0, 0.5);
+  color: #222f3e;
+}
+.tox .accessibility-issue--warn .accessibility-issue__description > *:last-child {
+  border-color: rgba(255, 165, 0, 0.5);
+}
+.tox .accessibility-issue--warn h2 {
+  color: #cc8500;
+}
+.tox .accessibility-issue--warn .tox-icon svg {
+  fill: #cc8500;
+}
+.tox .accessibility-issue--warn a .tox-icon {
+  color: #cc8500;
+}
+.tox .accessibility-issue--error .accessibility-issue__description {
+  background-color: rgba(204, 0, 0, 0.1);
+  border-color: rgba(204, 0, 0, 0.4);
+  color: #222f3e;
+}
+.tox .accessibility-issue--error .accessibility-issue__description > *:last-child {
+  border-color: rgba(204, 0, 0, 0.4);
+}
+.tox .accessibility-issue--error h2 {
+  color: #c00;
+}
+.tox .accessibility-issue--error .tox-icon svg {
+  fill: #c00;
+}
+.tox .accessibility-issue--error a .tox-icon {
+  color: #c00;
+}
+.tox .accessibility-issue--success .accessibility-issue__description {
+  background-color: rgba(120, 171, 70, 0.1);
+  border-color: rgba(120, 171, 70, 0.4);
+  color: #222f3e;
+}
+.tox .accessibility-issue--success .accessibility-issue__description > *:last-child {
+  border-color: rgba(120, 171, 70, 0.4);
+}
+.tox .accessibility-issue--success h2 {
+  color: #78AB46;
+}
+.tox .accessibility-issue--success .tox-icon svg {
+  fill: #78AB46;
+}
+.tox .accessibility-issue--success a .tox-icon {
+  color: #78AB46;
+}
+.tox .tox-dialog__body-content .accessibility-issue__header h1,
+.tox .tox-dialog__body-content .tox-form__group .accessibility-issue__description h2 {
+  margin-top: 0;
+}
+.tox:not([dir=rtl]) .accessibility-issue__header .tox-button {
+  margin-left: 4px;
+}
+.tox:not([dir=rtl]) .accessibility-issue__header > *:nth-last-child(2) {
+  margin-left: auto;
+}
+.tox:not([dir=rtl]) .accessibility-issue__description {
+  padding: 4px 4px 4px 8px;
+}
+.tox:not([dir=rtl]) .accessibility-issue__description > *:last-child {
+  border-left-width: 1px;
+  padding-left: 4px;
+}
+.tox[dir=rtl] .accessibility-issue__header .tox-button {
+  margin-right: 4px;
+}
+.tox[dir=rtl] .accessibility-issue__header > *:nth-last-child(2) {
+  margin-right: auto;
+}
+.tox[dir=rtl] .accessibility-issue__description {
+  padding: 4px 8px 4px 4px;
+}
+.tox[dir=rtl] .accessibility-issue__description > *:last-child {
+  border-right-width: 1px;
+  padding-right: 4px;
+}
+.tox .tox-anchorbar {
+  display: flex;
+  flex: 0 0 auto;
+}
+.tox .tox-bar {
+  display: flex;
+  flex: 0 0 auto;
+}
+.tox .tox-button {
+  background-color: #207ab7;
+  background-image: none;
+  background-position: 0 0;
+  background-repeat: repeat;
+  border-color: #207ab7;
+  border-radius: 3px;
+  border-style: solid;
+  border-width: 1px;
+  box-shadow: none;
+  box-sizing: border-box;
+  color: #fff;
+  cursor: pointer;
+  display: inline-block;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+  font-size: 14px;
+  font-weight: bold;
+  letter-spacing: normal;
+  line-height: 24px;
+  margin: 0;
+  outline: none;
+  padding: 4px 16px;
+  text-align: center;
+  text-decoration: none;
+  text-transform: capitalize;
+  white-space: nowrap;
+}
+.tox .tox-button[disabled] {
+  background-color: #207ab7;
+  background-image: none;
+  border-color: #207ab7;
+  box-shadow: none;
+  color: rgba(255, 255, 255, 0.5);
+  cursor: not-allowed;
+}
+.tox .tox-button:focus:not(:disabled) {
+  background-color: #1c6ca1;
+  background-image: none;
+  border-color: #1c6ca1;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-button:hover:not(:disabled) {
+  background-color: #1c6ca1;
+  background-image: none;
+  border-color: #1c6ca1;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-button:active:not(:disabled) {
+  background-color: #185d8c;
+  background-image: none;
+  border-color: #185d8c;
+  box-shadow: none;
+  color: #fff;
+}
+.tox .tox-button--secondary {
+  background-color: #f0f0f0;
+  background-image: none;
+  background-position: 0 0;
+  background-repeat: repeat;
+  border-color: #f0f0f0;
+  border-radius: 3px;
+  border-style: solid;
+  border-width: 1px;
+  box-shadow: none;
+  color: #222f3e;
+  outline: none;
+  padding: 4px 16px;
+  text-decoration: none;
+  text-transform: capitalize;
+}
+.tox .tox-button--secondary[disabled] {
+  background-color: #f0f0f0;
+  background-image: none;
+  border-color: #f0f0f0;
+  box-shadow: none;
+  color: rgba(34, 47, 62, 0.5);
+}
+.tox .tox-button--secondary:focus:not(:disabled) {
+  background-color: #e3e3e3;
+  background-image: none;
+  border-color: #e3e3e3;
+  box-shadow: none;
+  color: #222f3e;
+}
+.tox .tox-button--secondary:hover:not(:disabled) {
+  background-color: #e3e3e3;
+  background-image: none;
+  border-color: #e3e3e3;
+  box-shadow: none;
+  color: #222f3e;
+}
+.tox .tox-button--secondary:active:not(:disabled) {
+  background-color: #d6d6d6;
+  background-image: none;
+  border-color: #d6d6d6;
+  box-shadow: none;
+  color: #222f3e;
+}
+.tox .tox-button--icon,
+.tox .tox-button.tox-button--icon,
+.tox .tox-button.tox-button--secondary.tox-button--icon {
+  padding: 4px;
+}
+.tox .tox-button--icon .tox-icon svg,
+.tox .tox-button.tox-button--icon .tox-icon svg,
+.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg {
+  display: block;
+  fill: currentColor;
+}
+.tox .tox-button-link {
+  background: 0;
+  border: none;
+  box-sizing: border-box;
+  cursor: pointer;
+  display: inline-block;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+  font-size: 16px;
+  font-weight: normal;
+  line-height: 1.3;
+  margin: 0;
+  padding: 0;
+  white-space: nowrap;
+}
+.tox .tox-button-link--sm {
+  font-size: 14px;
+}
+.tox .tox-button--naked {
+  background-color: transparent;
+  border-color: transparent;
+  box-shadow: unset;
+  color: #222f3e;
+}
+.tox .tox-button--naked[disabled] {
+  background-color: #f0f0f0;
+  border-color: #f0f0f0;
+  box-shadow: none;
+  color: rgba(34, 47, 62, 0.5);
+}
+.tox .tox-button--naked:hover:not(:disabled) {
+  background-color: #e3e3e3;
+  border-color: #e3e3e3;
+  box-shadow: none;
+  color: #222f3e;
+}
+.tox .tox-button--naked:focus:not(:disabled) {
+  background-color: #e3e3e3;
+  border-color: #e3e3e3;
+  box-shadow: none;
+  color: #222f3e;
+}
+.tox .tox-button--naked:active:not(:disabled) {
+  background-color: #d6d6d6;
+  border-color: #d6d6d6;
+  box-shadow: none;
+  color: #222f3e;
+}
+.tox .tox-button--naked .tox-icon svg {
+  fill: currentColor;
+}
+.tox .tox-button--naked.tox-button--icon:hover:not(:disabled) {
+  color: #222f3e;
+}
+.tox .tox-checkbox {
+  align-items: center;
+  border-radius: 3px;
+  cursor: pointer;
+  display: flex;
+  height: 36px;
+  min-width: 36px;
+}
+.tox .tox-checkbox__input {
+  /* Hide from view but visible to screen readers */
+  height: 1px;
+  overflow: hidden;
+  position: absolute;
+  top: auto;
+  width: 1px;
+}
+.tox .tox-checkbox__icons {
+  align-items: center;
+  border-radius: 3px;
+  box-shadow: 0 0 0 2px transparent;
+  box-sizing: content-box;
+  display: flex;
+  height: 24px;
+  justify-content: center;
+  padding: calc(4px - 1px);
+  width: 24px;
+}
+.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg {
+  display: block;
+  fill: rgba(34, 47, 62, 0.3);
+}
+.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg {
+  display: none;
+  fill: #207ab7;
+}
+.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg {
+  display: none;
+  fill: #207ab7;
+}
+.tox .tox-checkbox--disabled {
+  color: rgba(34, 47, 62, 0.5);
+  cursor: not-allowed;
+}
+.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__checked svg {
+  fill: rgba(34, 47, 62, 0.5);
+}
+.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__unchecked svg {
+  fill: rgba(34, 47, 62, 0.5);
+}
+.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg {
+  fill: rgba(34, 47, 62, 0.5);
+}
+.tox input.tox-checkbox__input:checked + .tox-checkbox__icons .tox-checkbox-icon__unchecked svg {
+  display: none;
+}
+.tox input.tox-checkbox__input:checked + .tox-checkbox__icons .tox-checkbox-icon__checked svg {
+  display: block;
+}
+.tox input.tox-checkbox__input:indeterminate + .tox-checkbox__icons .tox-checkbox-icon__unchecked svg {
+  display: none;
+}
+.tox input.tox-checkbox__input:indeterminate + .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg {
+  display: block;
+}
+.tox input.tox-checkbox__input:focus + .tox-checkbox__icons {
+  border-radius: 3px;
+  box-shadow: inset 0 0 0 1px #207ab7;
+  padding: calc(4px - 1px);
+}
+.tox:not([dir=rtl]) .tox-checkbox__label {
+  margin-left: 4px;
+}
+.tox:not([dir=rtl]) .tox-checkbox__input {
+  left: -10000px;
+}
+.tox:not([dir=rtl]) .tox-bar .tox-checkbox {
+  margin-left: 4px;
+}
+.tox[dir=rtl] .tox-checkbox__label {
+  margin-right: 4px;
+}
+.tox[dir=rtl] .tox-checkbox__input {
+  right: -10000px;
+}
+.tox[dir=rtl] .tox-bar .tox-checkbox {
+  margin-right: 4px;
+}
+.tox {
+  /* stylelint-disable-next-line no-descending-specificity */
+}
+.tox .tox-collection--toolbar .tox-collection__group {
+  display: flex;
+  padding: 0;
+}
+.tox .tox-collection--grid .tox-collection__group {
+  display: flex;
+  flex-wrap: wrap;
+  max-height: 208px;
+  overflow-x: hidden;
+  overflow-y: auto;
+  padding: 0;
+}
+.tox .tox-collection--list .tox-collection__group {
+  border-bottom-width: 0;
+  border-color: #cccccc;
+  border-left-width: 0;
+  border-right-width: 0;
+  border-style: solid;
+  border-top-width: 1px;
+  padding: 4px 0;
+}
+.tox .tox-collection--list .tox-collection__group:first-child {
+  border-top-width: 0;
+}
+.tox .tox-collection__group-heading {
+  background-color: #e6e6e6;
+  color: rgba(34, 47, 62, 0.7);
+  cursor: default;
+  font-size: 12px;
+  font-style: normal;
+  font-weight: normal;
+  margin-bottom: 4px;
+  margin-top: -4px;
+  padding: 4px 8px;
+  text-transform: none;
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+}
+.tox .tox-collection__item {
+  align-items: center;
+  color: #222f3e;
+  cursor: pointer;
+  display: flex;
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+}
+.tox .tox-collection--list .tox-collection__item {
+  padding: 4px 8px;
+}
+.tox .tox-collection--toolbar .tox-collection__item {
+  border-radius: 3px;
+  padding: 4px;
+}
+.tox .tox-collection--grid .tox-collection__item {
+  border-radius: 3px;
+  padding: 4px;
+}
+.tox .tox-collection--list .tox-collection__item--enabled {
+  background-color: #fff;
+  color: #222f3e;
+}
+.tox .tox-collection--list .tox-collection__item--active {
+  background-color: #dee0e2;
+}
+.tox .tox-collection--toolbar .tox-collection__item--enabled {
+  background-color: #c8cbcf;
+  color: #222f3e;
+}
+.tox .tox-collection--toolbar .tox-collection__item--active {
+  background-color: #dee0e2;
+}
+.tox .tox-collection--grid .tox-collection__item--enabled {
+  background-color: #c8cbcf;
+  color: #222f3e;
+}
+.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled) {
+  background-color: #dee0e2;
+  color: #222f3e;
+}
+.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled) {
+  color: #222f3e;
+}
+.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled) {
+  color: #222f3e;
+}
+.tox .tox-collection__item--state-disabled {
+  background-color: transparent;
+  color: rgba(34, 47, 62, 0.5);
+  cursor: not-allowed;
+}
+.tox .tox-collection__item-icon,
+.tox .tox-collection__item-checkmark {
+  align-items: center;
+  display: flex;
+  height: 24px;
+  justify-content: center;
+  width: 24px;
+}
+.tox .tox-collection__item-icon svg,
+.tox .tox-collection__item-checkmark svg {
+  fill: currentColor;
+}
+.tox .tox-collection--toolbar-lg .tox-collection__item-icon {
+  height: 48px;
+  width: 48px;
+}
+.tox .tox-collection__item-label {
+  color: currentColor;
+  display: inline-block;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+  font-size: 14px;
+  font-style: normal;
+  font-weight: normal;
+  line-height: 24px;
+  text-transform: none;
+  word-break: break-all;
+}
+.tox .tox-collection__item-accessory {
+  color: rgba(34, 47, 62, 0.7);
+  display: inline-block;
+  font-size: 14px;
+  height: 24px;
+  line-height: 24px;
+  text-transform: none;
+}
+.tox .tox-collection__item-caret {
+  align-items: center;
+  display: flex;
+  min-height: 24px;
+}
+.tox .tox-collection__item-caret::after {
+  content: '';
+  font-size: 0;
+  min-height: inherit;
+}
+.tox .tox-collection__item-caret svg {
+  fill: #222f3e;
+}
+.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg {
+  display: none;
+}
+.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-accessory + .tox-collection__item-checkmark {
+  display: none;
+}
+.tox .tox-collection--horizontal {
+  background-color: #fff;
+  border: 1px solid #cccccc;
+  border-radius: 3px;
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
+  display: flex;
+  flex: 0 0 auto;
+  flex-shrink: 0;
+  flex-wrap: nowrap;
+  margin-bottom: 0;
+  overflow-x: auto;
+  padding: 0;
+}
+.tox .tox-collection--horizontal .tox-collection__group {
+  align-items: center;
+  display: flex;
+  flex-wrap: nowrap;
+  margin: 0;
+  padding: 0 4px;
+}
+.tox .tox-collection--horizontal .tox-collection__item {
+  height: 34px;
+  margin: 2px 0 3px 0;
+  padding: 0 4px;
+}
+.tox .tox-collection--horizontal .tox-collection__item-label {
+  white-space: nowrap;
+}
+.tox .tox-collection--horizontal .tox-collection__item-caret {
+  margin-left: 4px;
+}
+.tox:not([dir=rtl]) .tox-collection--horizontal .tox-collection__group:not(:last-of-type) {
+  border-right: 1px solid #cccccc;
+}
+.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item > *:not(:first-child) {
+  margin-left: 8px;
+}
+.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item-label:first-child {
+  margin-left: 4px;
+}
+.tox:not([dir=rtl]) .tox-collection__item-accessory {
+  margin-left: 16px;
+  text-align: right;
+}
+.tox:not([dir=rtl]) .tox-collection .tox-collection__item-caret {
+  margin-left: 16px;
+}
+.tox[dir=rtl] .tox-collection--horizontal .tox-collection__group:not(:last-of-type) {
+  border-left: 1px solid #cccccc;
+}
+.tox[dir=rtl] .tox-collection--list .tox-collection__item > *:not(:first-child) {
+  margin-right: 8px;
+}
+.tox[dir=rtl] .tox-collection--list .tox-collection__item-label:first-child {
+  margin-right: 4px;
+}
+.tox[dir=rtl] .tox-collection__item-icon-rtl {
+  /* stylelint-disable-next-line no-descending-specificity */
+}
+.tox[dir=rtl] .tox-collection__item-icon-rtl .tox-collection__item-icon svg {
+  transform: rotateY(180deg);
+}
+.tox[dir=rtl] .tox-collection__item-accessory {
+  margin-right: 16px;
+  text-align: left;
+}
+.tox[dir=rtl] .tox-collection .tox-collection__item-caret {
+  margin-right: 16px;
+  transform: rotateY(180deg);
+}
+.tox[dir=rtl] .tox-collection--horizontal .tox-collection__item-caret {
+  margin-right: 4px;
+}
+.tox .tox-color-picker-container {
+  display: flex;
+  flex-direction: row;
+  height: 225px;
+  margin: 0;
+}
+.tox .tox-sv-palette {
+  box-sizing: border-box;
+  display: flex;
+  height: 100%;
+}
+.tox .tox-sv-palette-spectrum {
+  height: 100%;
+}
+.tox .tox-sv-palette,
+.tox .tox-sv-palette-spectrum {
+  width: 225px;
+}
+.tox .tox-sv-palette-thumb {
+  background: none;
+  border: 1px solid black;
+  border-radius: 50%;
+  box-sizing: content-box;
+  height: 12px;
+  position: absolute;
+  width: 12px;
+}
+.tox .tox-sv-palette-inner-thumb {
+  border: 1px solid white;
+  border-radius: 50%;
+  height: 10px;
+  position: absolute;
+  width: 10px;
+}
+.tox .tox-hue-slider {
+  box-sizing: border-box;
+  height: 100%;
+  width: 25px;
+}
+.tox .tox-hue-slider-spectrum {
+  background: linear-gradient(to bottom, #f00, #ff0080, #f0f, #8000ff, #00f, #0080ff, #0ff, #00ff80, #0f0, #80ff00, #ff0, #ff8000, #f00);
+  height: 100%;
+  width: 100%;
+}
+.tox .tox-hue-slider,
+.tox .tox-hue-slider-spectrum {
+  width: 20px;
+}
+.tox .tox-hue-slider-thumb {
+  background: white;
+  border: 1px solid black;
+  box-sizing: content-box;
+  height: 4px;
+  width: 100%;
+}
+.tox .tox-rgb-form {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+}
+.tox .tox-rgb-form div {
+  align-items: center;
+  display: flex;
+  justify-content: space-between;
+  margin-bottom: 5px;
+  width: inherit;
+}
+.tox .tox-rgb-form input {
+  width: 6em;
+}
+.tox .tox-rgb-form input.tox-invalid {
+  /* Need !important to override Chrome's focus styling unfortunately */
+  border: 1px solid red !important;
+}
+.tox .tox-rgb-form .tox-rgba-preview {
+  border: 1px solid black;
+  flex-grow: 2;
+  margin-bottom: 0;
+}
+.tox:not([dir=rtl]) .tox-sv-palette {
+  margin-right: 15px;
+}
+.tox:not([dir=rtl]) .tox-hue-slider {
+  margin-right: 15px;
+}
+.tox:not([dir=rtl]) .tox-hue-slider-thumb {
+  margin-left: -1px;
+}
+.tox:not([dir=rtl]) .tox-rgb-form label {
+  margin-right: 0.5em;
+}
+.tox[dir=rtl] .tox-sv-palette {
+  margin-left: 15px;
+}
+.tox[dir=rtl] .tox-hue-slider {
+  margin-left: 15px;
+}
+.tox[dir=rtl] .tox-hue-slider-thumb {
+  margin-right: -1px;
+}
+.tox[dir=rtl] .tox-rgb-form label {
+  margin-left: 0.5em;
+}
+.tox .tox-toolbar .tox-swatches,
+.tox .tox-toolbar__primary .tox-swatches,
+.tox .tox-toolbar__overflow .tox-swatches {
+  margin: 2px 0 3px 4px;
+}
+.tox .tox-collection--list .tox-collection__group .tox-swatches-menu {
+  border: 0;
+  margin: -4px 0;
+}
+.tox .tox-swatches__row {
+  display: flex;
+}
+.tox .tox-swatch {
+  height: 30px;
+  transition: transform 0.15s, box-shadow 0.15s;
+  width: 30px;
+}
+.tox .tox-swatch:hover,
+.tox .tox-swatch:focus {
+  box-shadow: 0 0 0 1px rgba(127, 127, 127, 0.3) inset;
+  transform: scale(0.8);
+}
+.tox .tox-swatch--remove {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+}
+.tox .tox-swatch--remove svg path {
+  stroke: #e74c3c;
+}
+.tox .tox-swatches__picker-btn {
+  align-items: center;
+  background-color: transparent;
+  border: 0;
+  cursor: pointer;
+  display: flex;
+  height: 30px;
+  justify-content: center;
+  outline: none;
+  padding: 0;
+  width: 30px;
+}
+.tox .tox-swatches__picker-btn svg {
+  height: 24px;
+  width: 24px;
+}
+.tox .tox-swatches__picker-btn:hover {
+  background: #dee0e2;
+}
+.tox:not([dir=rtl]) .tox-swatches__picker-btn {
+  margin-left: auto;
+}
+.tox[dir=rtl] .tox-swatches__picker-btn {
+  margin-right: auto;
+}
+.tox .tox-comment-thread {
+  background: #fff;
+  position: relative;
+}
+.tox .tox-comment-thread > *:not(:first-child) {
+  margin-top: 8px;
+}
+.tox .tox-comment {
+  background: #fff;
+  border: 1px solid #cccccc;
+  border-radius: 3px;
+  box-shadow: 0 4px 8px 0 rgba(34, 47, 62, 0.1);
+  padding: 8px 8px 16px 8px;
+  position: relative;
+}
+.tox .tox-comment__header {
+  align-items: center;
+  color: #222f3e;
+  display: flex;
+  justify-content: space-between;
+}
+.tox .tox-comment__date {
+  color: rgba(34, 47, 62, 0.7);
+  font-size: 12px;
+}
+.tox .tox-comment__body {
+  color: #222f3e;
+  font-size: 14px;
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1.3;
+  margin-top: 8px;
+  position: relative;
+  text-transform: initial;
+}
+.tox .tox-comment__body textarea {
+  resize: none;
+  white-space: normal;
+  width: 100%;
+}
+.tox .tox-comment__expander {
+  padding-top: 8px;
+}
+.tox .tox-comment__expander p {
+  color: rgba(34, 47, 62, 0.7);
+  font-size: 14px;
+  font-style: normal;
+}
+.tox .tox-comment__body p {
+  margin: 0;
+}
+.tox .tox-comment__buttonspacing {
+  padding-top: 16px;
+  text-align: center;
+}
+.tox .tox-comment-thread__overlay::after {
+  background: #fff;
+  bottom: 0;
+  content: "";
+  display: flex;
+  left: 0;
+  opacity: 0.9;
+  position: absolute;
+  right: 0;
+  top: 0;
+  z-index: 5;
+}
+.tox .tox-comment__reply {
+  display: flex;
+  flex-shrink: 0;
+  flex-wrap: wrap;
+  justify-content: flex-end;
+  margin-top: 8px;
+}
+.tox .tox-comment__reply > *:first-child {
+  margin-bottom: 8px;
+  width: 100%;
+}
+.tox .tox-comment__edit {
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: flex-end;
+  margin-top: 16px;
+}
+.tox .tox-comment__gradient::after {
+  background: linear-gradient(rgba(255, 255, 255, 0), #fff);
+  bottom: 0;
+  content: "";
+  display: block;
+  height: 5em;
+  margin-top: -40px;
+  position: absolute;
+  width: 100%;
+}
+.tox .tox-comment__overlay {
+  background: #fff;
+  bottom: 0;
+  display: flex;
+  flex-direction: column;
+  flex-grow: 1;
+  left: 0;
+  opacity: 0.9;
+  position: absolute;
+  right: 0;
+  text-align: center;
+  top: 0;
+  z-index: 5;
+}
+.tox .tox-comment__loading-text {
+  align-items: center;
+  color: #222f3e;
+  display: flex;
+  flex-direction: column;
+  position: relative;
+}
+.tox .tox-comment__loading-text > div {
+  padding-bottom: 16px;
+}
+.tox .tox-comment__overlaytext {
+  bottom: 0;
+  flex-direction: column;
+  font-size: 14px;
+  left: 0;
+  padding: 1em;
+  position: absolute;
+  right: 0;
+  top: 0;
+  z-index: 10;
+}
+.tox .tox-comment__overlaytext p {
+  background-color: #fff;
+  box-shadow: 0 0 8px 8px #fff;
+  color: #222f3e;
+  text-align: center;
+}
+.tox .tox-comment__overlaytext div:nth-of-type(2) {
+  font-size: 0.8em;
+}
+.tox .tox-comment__busy-spinner {
+  align-items: center;
+  background-color: #fff;
+  bottom: 0;
+  display: flex;
+  justify-content: center;
+  left: 0;
+  position: absolute;
+  right: 0;
+  top: 0;
+  z-index: 20;
+}
+.tox .tox-comment__scroll {
+  display: flex;
+  flex-direction: column;
+  flex-shrink: 1;
+  overflow: auto;
+}
+.tox .tox-conversations {
+  margin: 8px;
+}
+.tox:not([dir=rtl]) .tox-comment__edit {
+  margin-left: 8px;
+}
+.tox:not([dir=rtl]) .tox-comment__buttonspacing > *:last-child,
+.tox:not([dir=rtl]) .tox-comment__edit > *:last-child,
+.tox:not([dir=rtl]) .tox-comment__reply > *:last-child {
+  margin-left: 8px;
+}
+.tox[dir=rtl] .tox-comment__edit {
+  margin-right: 8px;
+}
+.tox[dir=rtl] .tox-comment__buttonspacing > *:last-child,
+.tox[dir=rtl] .tox-comment__edit > *:last-child,
+.tox[dir=rtl] .tox-comment__reply > *:last-child {
+  margin-right: 8px;
+}
+.tox .tox-user {
+  align-items: center;
+  display: flex;
+}
+.tox .tox-user__avatar svg {
+  fill: rgba(34, 47, 62, 0.7);
+}
+.tox .tox-user__name {
+  color: rgba(34, 47, 62, 0.7);
+  font-size: 12px;
+  font-style: normal;
+  font-weight: bold;
+  text-transform: uppercase;
+}
+.tox:not([dir=rtl]) .tox-user__avatar svg {
+  margin-right: 8px;
+}
+.tox:not([dir=rtl]) .tox-user__avatar + .tox-user__name {
+  margin-left: 8px;
+}
+.tox[dir=rtl] .tox-user__avatar svg {
+  margin-left: 8px;
+}
+.tox[dir=rtl] .tox-user__avatar + .tox-user__name {
+  margin-right: 8px;
+}
+.tox .tox-dialog-wrap {
+  align-items: center;
+  bottom: 0;
+  display: flex;
+  justify-content: center;
+  left: 0;
+  position: fixed;
+  right: 0;
+  top: 0;
+  z-index: 1100;
+}
+.tox .tox-dialog-wrap__backdrop {
+  background-color: rgba(255, 255, 255, 0.75);
+  bottom: 0;
+  left: 0;
+  position: absolute;
+  right: 0;
+  top: 0;
+  z-index: 1;
+}
+.tox .tox-dialog-wrap__backdrop--opaque {
+  background-color: #fff;
+}
+.tox .tox-dialog {
+  background-color: #fff;
+  border-color: #cccccc;
+  border-radius: 3px;
+  border-style: solid;
+  border-width: 1px;
+  box-shadow: 0 16px 16px -10px rgba(34, 47, 62, 0.15), 0 0 40px 1px rgba(34, 47, 62, 0.15);
+  display: flex;
+  flex-direction: column;
+  max-height: 100%;
+  max-width: 480px;
+  overflow: hidden;
+  position: relative;
+  width: 95vw;
+  z-index: 2;
+}
+@media only screen and (max-width:767px) {
+  body:not(.tox-force-desktop) .tox .tox-dialog {
+    align-self: flex-start;
+    margin: 8px auto;
+    width: calc(100vw - 16px);
+  }
+}
+.tox .tox-dialog-inline {
+  z-index: 1100;
+}
+.tox .tox-dialog__header {
+  align-items: center;
+  background-color: #fff;
+  border-bottom: none;
+  color: #222f3e;
+  display: flex;
+  font-size: 16px;
+  justify-content: space-between;
+  padding: 8px 16px 0 16px;
+  position: relative;
+}
+.tox .tox-dialog__header .tox-button {
+  z-index: 1;
+}
+.tox .tox-dialog__draghandle {
+  cursor: grab;
+  height: 100%;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.tox .tox-dialog__draghandle:active {
+  cursor: grabbing;
+}
+.tox .tox-dialog__dismiss {
+  margin-left: auto;
+}
+.tox .tox-dialog__title {
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+  font-size: 20px;
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1.3;
+  margin: 0;
+  text-transform: none;
+}
+.tox .tox-dialog__body {
+  color: #222f3e;
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+  font-size: 16px;
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1.3;
+  min-width: 0;
+  text-align: left;
+  text-transform: none;
+}
+@media only screen and (max-width:767px) {
+  body:not(.tox-force-desktop) .tox .tox-dialog__body {
+    flex-direction: column;
+  }
+}
+.tox .tox-dialog__body-nav {
+  align-items: flex-start;
+  display: flex;
+  flex-direction: column;
+  padding: 16px 16px;
+}
+@media only screen and (max-width:767px) {
+  body:not(.tox-force-desktop) .tox .tox-dialog__body-nav {
+    flex-direction: row;
+    -webkit-overflow-scrolling: touch;
+    overflow-x: auto;
+    padding-bottom: 0;
+  }
+}
+.tox .tox-dialog__body-nav-item {
+  border-bottom: 2px solid transparent;
+  color: rgba(34, 47, 62, 0.7);
+  display: inline-block;
+  font-size: 14px;
+  line-height: 1.3;
+  margin-bottom: 8px;
+  text-decoration: none;
+  white-space: nowrap;
+}
+.tox .tox-dialog__body-nav-item:focus {
+  background-color: rgba(32, 122, 183, 0.1);
+}
+.tox .tox-dialog__body-nav-item--active {
+  border-bottom: 2px solid #207ab7;
+  color: #207ab7;
+}
+.tox .tox-dialog__body-content {
+  box-sizing: border-box;
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  -ms-flex-preferred-size: auto;
+  max-height: 650px;
+  overflow: auto;
+  -webkit-overflow-scrolling: touch;
+  padding: 16px 16px;
+}
+.tox .tox-dialog__body-content > * {
+  margin-bottom: 0;
+  margin-top: 16px;
+}
+.tox .tox-dialog__body-content > *:first-child {
+  margin-top: 0;
+}
+.tox .tox-dialog__body-content > *:last-child {
+  margin-bottom: 0;
+}
+.tox .tox-dialog__body-content > *:only-child {
+  margin-bottom: 0;
+  margin-top: 0;
+}
+.tox .tox-dialog__body-content a {
+  color: #207ab7;
+  cursor: pointer;
+  text-decoration: none;
+}
+.tox .tox-dialog__body-content a:hover,
+.tox .tox-dialog__body-content a:focus {
+  color: #185d8c;
+  text-decoration: none;
+}
+.tox .tox-dialog__body-content a:active {
+  color: #185d8c;
+  text-decoration: none;
+}
+.tox .tox-dialog__body-content svg {
+  fill: #222f3e;
+}
+.tox .tox-dialog__body-content ul {
+  display: block;
+  list-style-type: disc;
+  margin-bottom: 16px;
+  -webkit-margin-end: 0;
+          margin-inline-end: 0;
+  -webkit-margin-start: 0;
+          margin-inline-start: 0;
+  -webkit-padding-start: 2.5rem;
+          padding-inline-start: 2.5rem;
+}
+.tox .tox-dialog__body-content .tox-form__group h1 {
+  font-size: 20px;
+  font-weight: bold;
+  margin-bottom: 16px;
+  margin-top: 2rem;
+}
+.tox .tox-dialog__body-content .tox-form__group h2 {
+  font-size: 16px;
+  font-weight: bold;
+  margin-bottom: 16px;
+  margin-top: 2rem;
+}
+.tox .tox-dialog__body-content .tox-form__group p {
+  margin-bottom: 16px;
+}
+.tox .tox-dialog__body-content .tox-form__group h1:first-child,
+.tox .tox-dialog__body-content .tox-form__group h2:first-child,
+.tox .tox-dialog__body-content .tox-form__group p:first-child {
+  margin-top: 0;
+}
+.tox .tox-dialog__body-content .tox-form__group h1:last-child,
+.tox .tox-dialog__body-content .tox-form__group h2:last-child,
+.tox .tox-dialog__body-content .tox-form__group p:last-child {
+  margin-bottom: 0;
+}
+.tox .tox-dialog__body-content .tox-form__group h1:only-child,
+.tox .tox-dialog__body-content .tox-form__group h2:only-child,
+.tox .tox-dialog__body-content .tox-form__group p:only-child {
+  margin-bottom: 0;
+  margin-top: 0;
+}
+.tox .tox-dialog--width-lg {
+  height: 650px;
+  max-width: 1200px;
+}
+.tox .tox-dialog--width-md {
+  max-width: 800px;
+}
+.tox .tox-dialog--width-md .tox-dialog__body-content {
+  overflow: auto;
+}
+.tox .tox-dialog__body-content--centered {
+  text-align: center;
+}
+.tox .tox-dialog__footer {
+  align-items: center;
+  background-color: #fff;
+  border-top: 1px solid #cccccc;
+  display: flex;
+  justify-content: space-between;
+  padding: 8px 16px;
+}
+.tox .tox-dialog__footer-start,
+.tox .tox-dialog__footer-end {
+  display: flex;
+}
+.tox .tox-dialog__busy-spinner {
+  align-items: center;
+  background-color: rgba(255, 255, 255, 0.75);
+  bottom: 0;
+  display: flex;
+  justify-content: center;
+  left: 0;
+  position: absolute;
+  right: 0;
+  top: 0;
+  z-index: 3;
+}
+.tox .tox-dialog__table {
+  border-collapse: collapse;
+  width: 100%;
+}
+.tox .tox-dialog__table thead th {
+  font-weight: bold;
+  padding-bottom: 8px;
+}
+.tox .tox-dialog__table tbody tr {
+  border-bottom: 1px solid #cccccc;
+}
+.tox .tox-dialog__table tbody tr:last-child {
+  border-bottom: none;
+}
+.tox .tox-dialog__table td {
+  padding-bottom: 8px;
+  padding-top: 8px;
+}
+.tox .tox-dialog__popups {
+  position: absolute;
+  width: 100%;
+  z-index: 1100;
+}
+.tox .tox-dialog__body-iframe {
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-dialog__body-iframe .tox-navobj {
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2) {
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+  height: 100%;
+}
+.tox .tox-dialog-dock-fadeout {
+  opacity: 0;
+  visibility: hidden;
+}
+.tox .tox-dialog-dock-fadein {
+  opacity: 1;
+  visibility: visible;
+}
+.tox .tox-dialog-dock-transition {
+  transition: visibility 0s linear 0.3s, opacity 0.3s ease;
+}
+.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein {
+  transition-delay: 0s;
+}
+body.tox-dialog__disable-scroll {
+  overflow: hidden;
+}
+.tox.tox-platform-ie {
+  /* IE11 CSS styles go here */
+}
+.tox.tox-platform-ie .tox-dialog-wrap {
+  position: -ms-device-fixed;
+}
+@media only screen and (max-width:767px) {
+  body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav {
+    margin-right: 0;
+  }
+}
+@media only screen and (max-width:767px) {
+  body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child) {
+    margin-left: 8px;
+  }
+}
+.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start > *,
+.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end > * {
+  margin-left: 8px;
+}
+.tox[dir=rtl] .tox-dialog__body {
+  text-align: right;
+}
+@media only screen and (max-width:767px) {
+  body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav {
+    margin-left: 0;
+  }
+}
+@media only screen and (max-width:767px) {
+  body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child) {
+    margin-right: 8px;
+  }
+}
+.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start > *,
+.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end > * {
+  margin-right: 8px;
+}
+.tox .tox-dropzone-container {
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-dropzone {
+  align-items: center;
+  background: #fff;
+  border: 2px dashed #cccccc;
+  box-sizing: border-box;
+  display: flex;
+  flex-direction: column;
+  flex-grow: 1;
+  justify-content: center;
+  min-height: 100px;
+  padding: 10px;
+}
+.tox .tox-dropzone p {
+  color: rgba(34, 47, 62, 0.7);
+  margin: 0 0 16px 0;
+}
+.tox .tox-edit-area {
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+  overflow: hidden;
+  position: relative;
+}
+.tox .tox-edit-area__iframe {
+  background-color: #fff;
+  border: 0;
+  box-sizing: border-box;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+  height: 100%;
+  position: absolute;
+  width: 100%;
+}
+.tox.tox-inline-edit-area {
+  border: 1px dotted #cccccc;
+}
+.tox .tox-editor-container {
+  display: flex;
+  flex: 1 1 auto;
+  flex-direction: column;
+  overflow: hidden;
+}
+.tox .tox-editor-header {
+  z-index: 1;
+}
+.tox:not(.tox-tinymce-inline) .tox-editor-header {
+  box-shadow: none;
+  transition: box-shadow 0.5s;
+}
+.tox.tox-tinymce--toolbar-bottom .tox-editor-header,
+.tox.tox-tinymce-inline .tox-editor-header {
+  margin-bottom: -1px;
+}
+.tox.tox-tinymce--toolbar-sticky-on .tox-editor-header {
+  box-shadow: 0 4px 4px -3px rgba(0, 0, 0, 0.25);
+}
+.tox-editor-dock-fadeout {
+  opacity: 0;
+  visibility: hidden;
+}
+.tox-editor-dock-fadein {
+  opacity: 1;
+  visibility: visible;
+}
+.tox-editor-dock-transition {
+  transition: visibility 0s linear 0.25s, opacity 0.25s ease;
+}
+.tox-editor-dock-transition.tox-editor-dock-fadein {
+  transition-delay: 0s;
+}
+.tox .tox-control-wrap {
+  flex: 1;
+  position: relative;
+}
+.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,
+.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,
+.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid {
+  display: none;
+}
+.tox .tox-control-wrap svg {
+  display: block;
+}
+.tox .tox-control-wrap__status-icon-wrap {
+  position: absolute;
+  top: 50%;
+  transform: translateY(-50%);
+}
+.tox .tox-control-wrap__status-icon-invalid svg {
+  fill: #c00;
+}
+.tox .tox-control-wrap__status-icon-unknown svg {
+  fill: orange;
+}
+.tox .tox-control-wrap__status-icon-valid svg {
+  fill: green;
+}
+.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,
+.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,
+.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield {
+  padding-right: 32px;
+}
+.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap {
+  right: 4px;
+}
+.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,
+.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,
+.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield {
+  padding-left: 32px;
+}
+.tox[dir=rtl] .tox-control-wrap__status-icon-wrap {
+  left: 4px;
+}
+.tox .tox-autocompleter {
+  max-width: 25em;
+}
+.tox .tox-autocompleter .tox-menu {
+  max-width: 25em;
+}
+.tox .tox-autocompleter .tox-autocompleter-highlight {
+  font-weight: bold;
+}
+.tox .tox-color-input {
+  display: flex;
+  position: relative;
+  z-index: 1;
+}
+.tox .tox-color-input .tox-textfield {
+  z-index: -1;
+}
+.tox .tox-color-input span {
+  border-color: rgba(34, 47, 62, 0.2);
+  border-radius: 3px;
+  border-style: solid;
+  border-width: 1px;
+  box-shadow: none;
+  box-sizing: border-box;
+  height: 24px;
+  position: absolute;
+  top: 6px;
+  width: 24px;
+}
+.tox .tox-color-input span:hover:not([aria-disabled=true]),
+.tox .tox-color-input span:focus:not([aria-disabled=true]) {
+  border-color: #207ab7;
+  cursor: pointer;
+}
+.tox .tox-color-input span::before {
+  background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.25) 25%, transparent 25%), linear-gradient(-45deg, rgba(0, 0, 0, 0.25) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.25) 75%), linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.25) 75%);
+  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
+  background-size: 12px 12px;
+  border: 1px solid #fff;
+  border-radius: 3px;
+  box-sizing: border-box;
+  content: '';
+  height: 24px;
+  left: -1px;
+  position: absolute;
+  top: -1px;
+  width: 24px;
+  z-index: -1;
+}
+.tox .tox-color-input span[aria-disabled=true] {
+  cursor: not-allowed;
+}
+.tox:not([dir=rtl]) .tox-color-input {
+  /* stylelint-disable-next-line no-descending-specificity */
+}
+.tox:not([dir=rtl]) .tox-color-input .tox-textfield {
+  padding-left: 36px;
+}
+.tox:not([dir=rtl]) .tox-color-input span {
+  left: 6px;
+}
+.tox[dir="rtl"] .tox-color-input {
+  /* stylelint-disable-next-line no-descending-specificity */
+}
+.tox[dir="rtl"] .tox-color-input .tox-textfield {
+  padding-right: 36px;
+}
+.tox[dir="rtl"] .tox-color-input span {
+  right: 6px;
+}
+.tox .tox-label,
+.tox .tox-toolbar-label {
+  color: rgba(34, 47, 62, 0.7);
+  display: block;
+  font-size: 14px;
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1.3;
+  padding: 0 8px 0 0;
+  text-transform: none;
+  white-space: nowrap;
+}
+.tox .tox-toolbar-label {
+  padding: 0 8px;
+}
+.tox[dir=rtl] .tox-label {
+  padding: 0 0 0 8px;
+}
+.tox .tox-form {
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-form__group {
+  box-sizing: border-box;
+  margin-bottom: 4px;
+}
+.tox .tox-form-group--maximize {
+  flex: 1;
+}
+.tox .tox-form__group--error {
+  color: #c00;
+}
+.tox .tox-form__group--collection {
+  display: flex;
+}
+.tox .tox-form__grid {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: wrap;
+  justify-content: space-between;
+}
+.tox .tox-form__grid--2col > .tox-form__group {
+  width: calc(50% - (8px / 2));
+}
+.tox .tox-form__grid--3col > .tox-form__group {
+  width: calc(100% / 3 - (8px / 2));
+}
+.tox .tox-form__grid--4col > .tox-form__group {
+  width: calc(25% - (8px / 2));
+}
+.tox .tox-form__controls-h-stack {
+  align-items: center;
+  display: flex;
+}
+.tox .tox-form__group--inline {
+  align-items: center;
+  display: flex;
+}
+.tox .tox-form__group--stretched {
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-form__group--stretched .tox-textarea {
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-form__group--stretched .tox-navobj {
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-form__group--stretched .tox-navobj :nth-child(2) {
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+  height: 100%;
+}
+.tox:not([dir=rtl]) .tox-form__controls-h-stack > *:not(:first-child) {
+  margin-left: 4px;
+}
+.tox[dir=rtl] .tox-form__controls-h-stack > *:not(:first-child) {
+  margin-right: 4px;
+}
+.tox .tox-lock.tox-locked .tox-lock-icon__unlock,
+.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock {
+  display: none;
+}
+.tox .tox-textfield,
+.tox .tox-toolbar-textfield,
+.tox .tox-selectfield select,
+.tox .tox-textarea {
+  -webkit-appearance: none;
+     -moz-appearance: none;
+          appearance: none;
+  background-color: #fff;
+  border-color: #cccccc;
+  border-radius: 3px;
+  border-style: solid;
+  border-width: 1px;
+  box-shadow: none;
+  box-sizing: border-box;
+  color: #222f3e;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+  font-size: 16px;
+  line-height: 24px;
+  margin: 0;
+  min-height: 34px;
+  outline: none;
+  padding: 5px 4.75px;
+  resize: none;
+  width: 100%;
+}
+.tox .tox-textfield[disabled],
+.tox .tox-textarea[disabled] {
+  background-color: #f2f2f2;
+  color: rgba(34, 47, 62, 0.85);
+  cursor: not-allowed;
+}
+.tox .tox-textfield:focus,
+.tox .tox-selectfield select:focus,
+.tox .tox-textarea:focus {
+  border-color: #207ab7;
+  box-shadow: none;
+  outline: none;
+}
+.tox .tox-toolbar-textfield {
+  border-width: 0;
+  margin-bottom: 3px;
+  margin-top: 2px;
+  max-width: 250px;
+}
+.tox .tox-naked-btn {
+  background-color: transparent;
+  border: 0;
+  border-color: transparent;
+  box-shadow: unset;
+  color: #207ab7;
+  cursor: pointer;
+  display: block;
+  margin: 0;
+  padding: 0;
+}
+.tox .tox-naked-btn svg {
+  display: block;
+  fill: #222f3e;
+}
+.tox:not([dir=rtl]) .tox-toolbar-textfield + * {
+  margin-left: 4px;
+}
+.tox[dir=rtl] .tox-toolbar-textfield + * {
+  margin-right: 4px;
+}
+.tox .tox-selectfield {
+  cursor: pointer;
+  position: relative;
+}
+.tox .tox-selectfield select[disabled] {
+  background-color: #f2f2f2;
+  color: rgba(34, 47, 62, 0.85);
+  cursor: not-allowed;
+}
+.tox .tox-selectfield select::-ms-expand {
+  display: none;
+}
+.tox .tox-selectfield svg {
+  pointer-events: none;
+  position: absolute;
+  top: 50%;
+  transform: translateY(-50%);
+}
+.tox:not([dir=rtl]) .tox-selectfield select[size="0"],
+.tox:not([dir=rtl]) .tox-selectfield select[size="1"] {
+  padding-right: 24px;
+}
+.tox:not([dir=rtl]) .tox-selectfield svg {
+  right: 8px;
+}
+.tox[dir=rtl] .tox-selectfield select[size="0"],
+.tox[dir=rtl] .tox-selectfield select[size="1"] {
+  padding-left: 24px;
+}
+.tox[dir=rtl] .tox-selectfield svg {
+  left: 8px;
+}
+.tox .tox-textarea {
+  -webkit-appearance: textarea;
+     -moz-appearance: textarea;
+          appearance: textarea;
+  white-space: pre-wrap;
+}
+.tox-fullscreen {
+  border: 0;
+  height: 100%;
+  left: 0;
+  margin: 0;
+  overflow: hidden;
+  -ms-scroll-chaining: none;
+      overscroll-behavior: none;
+  padding: 0;
+  position: fixed;
+  top: 0;
+  touch-action: pinch-zoom;
+  width: 100%;
+}
+.tox-fullscreen .tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle {
+  display: none;
+}
+.tox-fullscreen .tox.tox-tinymce.tox-fullscreen {
+  z-index: 1200;
+}
+.tox-fullscreen .tox.tox-tinymce-aux {
+  z-index: 1201;
+}
+.tox .tox-help__more-link {
+  list-style: none;
+  margin-top: 1em;
+}
+.tox .tox-image-tools {
+  width: 100%;
+}
+.tox .tox-image-tools__toolbar {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+}
+.tox .tox-image-tools__image {
+  background-color: #666;
+  height: 380px;
+  overflow: auto;
+  position: relative;
+  width: 100%;
+}
+.tox .tox-image-tools__image,
+.tox .tox-image-tools__image + .tox-image-tools__toolbar {
+  margin-top: 8px;
+}
+.tox .tox-image-tools__image-bg {
+  background: url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==);
+}
+.tox .tox-image-tools__toolbar > .tox-spacer {
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-croprect-block {
+  background: black;
+  filter: alpha(opacity=50);
+  opacity: 0.5;
+  position: absolute;
+  zoom: 1;
+}
+.tox .tox-croprect-handle {
+  border: 2px solid white;
+  height: 20px;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 20px;
+}
+.tox .tox-croprect-handle-move {
+  border: 0;
+  cursor: move;
+  position: absolute;
+}
+.tox .tox-croprect-handle-nw {
+  border-width: 2px 0 0 2px;
+  cursor: nw-resize;
+  left: 100px;
+  margin: -2px 0 0 -2px;
+  top: 100px;
+}
+.tox .tox-croprect-handle-ne {
+  border-width: 2px 2px 0 0;
+  cursor: ne-resize;
+  left: 200px;
+  margin: -2px 0 0 -20px;
+  top: 100px;
+}
+.tox .tox-croprect-handle-sw {
+  border-width: 0 0 2px 2px;
+  cursor: sw-resize;
+  left: 100px;
+  margin: -20px 2px 0 -2px;
+  top: 200px;
+}
+.tox .tox-croprect-handle-se {
+  border-width: 0 2px 2px 0;
+  cursor: se-resize;
+  left: 200px;
+  margin: -20px 0 0 -20px;
+  top: 200px;
+}
+.tox:not([dir=rtl]) .tox-image-tools__toolbar > .tox-slider:not(:first-of-type) {
+  margin-left: 8px;
+}
+.tox:not([dir=rtl]) .tox-image-tools__toolbar > .tox-button + .tox-slider {
+  margin-left: 32px;
+}
+.tox:not([dir=rtl]) .tox-image-tools__toolbar > .tox-slider + .tox-button {
+  margin-left: 32px;
+}
+.tox[dir=rtl] .tox-image-tools__toolbar > .tox-slider:not(:first-of-type) {
+  margin-right: 8px;
+}
+.tox[dir=rtl] .tox-image-tools__toolbar > .tox-button + .tox-slider {
+  margin-right: 32px;
+}
+.tox[dir=rtl] .tox-image-tools__toolbar > .tox-slider + .tox-button {
+  margin-right: 32px;
+}
+.tox .tox-insert-table-picker {
+  display: flex;
+  flex-wrap: wrap;
+  width: 170px;
+}
+.tox .tox-insert-table-picker > div {
+  border-color: #cccccc;
+  border-style: solid;
+  border-width: 0 1px 1px 0;
+  box-sizing: border-box;
+  height: 17px;
+  width: 17px;
+}
+.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker {
+  margin: -4px 0;
+}
+.tox .tox-insert-table-picker .tox-insert-table-picker__selected {
+  background-color: rgba(32, 122, 183, 0.5);
+  border-color: rgba(32, 122, 183, 0.5);
+}
+.tox .tox-insert-table-picker__label {
+  color: rgba(34, 47, 62, 0.7);
+  display: block;
+  font-size: 14px;
+  padding: 4px;
+  text-align: center;
+  width: 100%;
+}
+.tox:not([dir=rtl]) {
+  /* stylelint-disable-next-line no-descending-specificity */
+}
+.tox:not([dir=rtl]) .tox-insert-table-picker > div:nth-child(10n) {
+  border-right: 0;
+}
+.tox[dir=rtl] {
+  /* stylelint-disable-next-line no-descending-specificity */
+}
+.tox[dir=rtl] .tox-insert-table-picker > div:nth-child(10n+1) {
+  border-right: 0;
+}
+.tox {
+  /* stylelint-disable */
+  /* stylelint-enable */
+}
+.tox .tox-menu {
+  background-color: #fff;
+  border: 1px solid #cccccc;
+  border-radius: 3px;
+  box-shadow: 0 4px 8px 0 rgba(34, 47, 62, 0.1);
+  display: inline-block;
+  overflow: hidden;
+  vertical-align: top;
+  z-index: 1150;
+}
+.tox .tox-menu.tox-collection.tox-collection--list {
+  padding: 0;
+}
+.tox .tox-menu.tox-collection.tox-collection--toolbar {
+  padding: 4px;
+}
+.tox .tox-menu.tox-collection.tox-collection--grid {
+  padding: 4px;
+}
+.tox .tox-menu__label h1,
+.tox .tox-menu__label h2,
+.tox .tox-menu__label h3,
+.tox .tox-menu__label h4,
+.tox .tox-menu__label h5,
+.tox .tox-menu__label h6,
+.tox .tox-menu__label p,
+.tox .tox-menu__label blockquote,
+.tox .tox-menu__label code {
+  margin: 0;
+}
+.tox .tox-menubar {
+  background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #fff;
+  background-color: #fff;
+  display: flex;
+  flex: 0 0 auto;
+  flex-shrink: 0;
+  flex-wrap: wrap;
+  padding: 0 4px 0 4px;
+}
+.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar {
+  border-top: 1px solid #cccccc;
+}
+/* Deprecated. Remove in next major release */
+.tox .tox-mbtn {
+  align-items: center;
+  background: transparent;
+  border: 0;
+  border-radius: 3px;
+  box-shadow: none;
+  color: #222f3e;
+  display: flex;
+  flex: 0 0 auto;
+  font-size: 14px;
+  font-style: normal;
+  font-weight: normal;
+  height: 34px;
+  justify-content: center;
+  margin: 2px 0 3px 0;
+  outline: none;
+  overflow: hidden;
+  padding: 0 4px;
+  text-transform: none;
+  width: auto;
+}
+.tox .tox-mbtn[disabled] {
+  background-color: transparent;
+  border: 0;
+  box-shadow: none;
+  color: rgba(34, 47, 62, 0.5);
+  cursor: not-allowed;
+}
+.tox .tox-mbtn:focus:not(:disabled) {
+  background: #dee0e2;
+  border: 0;
+  box-shadow: none;
+  color: #222f3e;
+}
+.tox .tox-mbtn--active {
+  background: #c8cbcf;
+  border: 0;
+  box-shadow: none;
+  color: #222f3e;
+}
+.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active) {
+  background: #dee0e2;
+  border: 0;
+  box-shadow: none;
+  color: #222f3e;
+}
+.tox .tox-mbtn__select-label {
+  cursor: default;
+  font-weight: normal;
+  margin: 0 4px;
+}
+.tox .tox-mbtn[disabled] .tox-mbtn__select-label {
+  cursor: not-allowed;
+}
+.tox .tox-mbtn__select-chevron {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+  width: 16px;
+  display: none;
+}
+.tox .tox-notification {
+  border-radius: 3px;
+  border-style: solid;
+  border-width: 1px;
+  box-shadow: none;
+  box-sizing: border-box;
+  display: -ms-grid;
+  display: grid;
+  font-size: 14px;
+  font-weight: normal;
+  -ms-grid-columns: minmax(40px, 1fr) auto minmax(40px, 1fr);
+      grid-template-columns: minmax(40px, 1fr) auto minmax(40px, 1fr);
+  margin-top: 4px;
+  opacity: 0;
+  padding: 4px;
+  transition: transform 100ms ease-in, opacity 150ms ease-in;
+}
+.tox .tox-notification p {
+  font-size: 14px;
+  font-weight: normal;
+}
+.tox .tox-notification a {
+  text-decoration: underline;
+}
+.tox .tox-notification--in {
+  opacity: 1;
+}
+.tox .tox-notification--success {
+  background-color: #e4eeda;
+  border-color: #d7e6c8;
+  color: #222f3e;
+}
+.tox .tox-notification--success p {
+  color: #222f3e;
+}
+.tox .tox-notification--success a {
+  color: #547831;
+}
+.tox .tox-notification--success svg {
+  fill: #222f3e;
+}
+.tox .tox-notification--error {
+  background-color: #f8dede;
+  border-color: #f2bfbf;
+  color: #222f3e;
+}
+.tox .tox-notification--error p {
+  color: #222f3e;
+}
+.tox .tox-notification--error a {
+  color: #c00;
+}
+.tox .tox-notification--error svg {
+  fill: #222f3e;
+}
+.tox .tox-notification--warn,
+.tox .tox-notification--warning {
+  background-color: #fffaea;
+  border-color: #ffe89d;
+  color: #222f3e;
+}
+.tox .tox-notification--warn p,
+.tox .tox-notification--warning p {
+  color: #222f3e;
+}
+.tox .tox-notification--warn a,
+.tox .tox-notification--warning a {
+  color: #222f3e;
+}
+.tox .tox-notification--warn svg,
+.tox .tox-notification--warning svg {
+  fill: #222f3e;
+}
+.tox .tox-notification--info {
+  background-color: #d9edf7;
+  border-color: #779ecb;
+  color: #222f3e;
+}
+.tox .tox-notification--info p {
+  color: #222f3e;
+}
+.tox .tox-notification--info a {
+  color: #222f3e;
+}
+.tox .tox-notification--info svg {
+  fill: #222f3e;
+}
+.tox .tox-notification__body {
+  -ms-grid-row-align: center;
+      align-self: center;
+  color: #222f3e;
+  font-size: 14px;
+  -ms-grid-column-span: 1;
+  grid-column-end: 3;
+  -ms-grid-column: 2;
+      grid-column-start: 2;
+  -ms-grid-row-span: 1;
+  grid-row-end: 2;
+  -ms-grid-row: 1;
+      grid-row-start: 1;
+  text-align: center;
+  white-space: normal;
+  word-break: break-all;
+  word-break: break-word;
+}
+.tox .tox-notification__body > * {
+  margin: 0;
+}
+.tox .tox-notification__body > * + * {
+  margin-top: 1rem;
+}
+.tox .tox-notification__icon {
+  -ms-grid-row-align: center;
+      align-self: center;
+  -ms-grid-column-span: 1;
+  grid-column-end: 2;
+  -ms-grid-column: 1;
+      grid-column-start: 1;
+  -ms-grid-row-span: 1;
+  grid-row-end: 2;
+  -ms-grid-row: 1;
+      grid-row-start: 1;
+  -ms-grid-column-align: end;
+      justify-self: end;
+}
+.tox .tox-notification__icon svg {
+  display: block;
+}
+.tox .tox-notification__dismiss {
+  -ms-grid-row-align: start;
+      align-self: start;
+  -ms-grid-column-span: 1;
+  grid-column-end: 4;
+  -ms-grid-column: 3;
+      grid-column-start: 3;
+  -ms-grid-row-span: 1;
+  grid-row-end: 2;
+  -ms-grid-row: 1;
+      grid-row-start: 1;
+  -ms-grid-column-align: end;
+      justify-self: end;
+}
+.tox .tox-notification .tox-progress-bar {
+  -ms-grid-column-span: 3;
+  grid-column-end: 4;
+  -ms-grid-column: 1;
+      grid-column-start: 1;
+  -ms-grid-row-span: 1;
+  grid-row-end: 3;
+  -ms-grid-row: 2;
+      grid-row-start: 2;
+  -ms-grid-column-align: center;
+      justify-self: center;
+}
+.tox .tox-pop {
+  display: inline-block;
+  position: relative;
+}
+.tox .tox-pop--resizing {
+  transition: width 0.1s ease;
+}
+.tox .tox-pop--resizing .tox-toolbar {
+  flex-wrap: nowrap;
+}
+.tox .tox-pop__dialog {
+  background-color: #fff;
+  border: 1px solid #cccccc;
+  border-radius: 3px;
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
+  min-width: 0;
+  overflow: hidden;
+}
+.tox .tox-pop__dialog > *:not(.tox-toolbar) {
+  margin: 4px 4px 4px 8px;
+}
+.tox .tox-pop__dialog .tox-toolbar {
+  background-color: transparent;
+  margin-bottom: -1px;
+}
+.tox .tox-pop::before,
+.tox .tox-pop::after {
+  border-style: solid;
+  content: '';
+  display: block;
+  height: 0;
+  position: absolute;
+  width: 0;
+}
+.tox .tox-pop.tox-pop--bottom::before,
+.tox .tox-pop.tox-pop--bottom::after {
+  left: 50%;
+  top: 100%;
+}
+.tox .tox-pop.tox-pop--bottom::after {
+  border-color: #fff transparent transparent transparent;
+  border-width: 8px;
+  margin-left: -8px;
+  margin-top: -1px;
+}
+.tox .tox-pop.tox-pop--bottom::before {
+  border-color: #cccccc transparent transparent transparent;
+  border-width: 9px;
+  margin-left: -9px;
+}
+.tox .tox-pop.tox-pop--top::before,
+.tox .tox-pop.tox-pop--top::after {
+  left: 50%;
+  top: 0;
+  transform: translateY(-100%);
+}
+.tox .tox-pop.tox-pop--top::after {
+  border-color: transparent transparent #fff transparent;
+  border-width: 8px;
+  margin-left: -8px;
+  margin-top: 1px;
+}
+.tox .tox-pop.tox-pop--top::before {
+  border-color: transparent transparent #cccccc transparent;
+  border-width: 9px;
+  margin-left: -9px;
+}
+.tox .tox-pop.tox-pop--left::before,
+.tox .tox-pop.tox-pop--left::after {
+  left: 0;
+  top: calc(50% - 1px);
+  transform: translateY(-50%);
+}
+.tox .tox-pop.tox-pop--left::after {
+  border-color: transparent #fff transparent transparent;
+  border-width: 8px;
+  margin-left: -15px;
+}
+.tox .tox-pop.tox-pop--left::before {
+  border-color: transparent #cccccc transparent transparent;
+  border-width: 10px;
+  margin-left: -19px;
+}
+.tox .tox-pop.tox-pop--right::before,
+.tox .tox-pop.tox-pop--right::after {
+  left: 100%;
+  top: calc(50% + 1px);
+  transform: translateY(-50%);
+}
+.tox .tox-pop.tox-pop--right::after {
+  border-color: transparent transparent transparent #fff;
+  border-width: 8px;
+  margin-left: -1px;
+}
+.tox .tox-pop.tox-pop--right::before {
+  border-color: transparent transparent transparent #cccccc;
+  border-width: 10px;
+  margin-left: -1px;
+}
+.tox .tox-pop.tox-pop--align-left::before,
+.tox .tox-pop.tox-pop--align-left::after {
+  left: 20px;
+}
+.tox .tox-pop.tox-pop--align-right::before,
+.tox .tox-pop.tox-pop--align-right::after {
+  left: calc(100% - 20px);
+}
+.tox .tox-sidebar-wrap {
+  display: flex;
+  flex-direction: row;
+  flex-grow: 1;
+  -ms-flex-preferred-size: 0;
+  min-height: 0;
+}
+.tox .tox-sidebar {
+  background-color: #fff;
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-end;
+}
+.tox .tox-sidebar__slider {
+  display: flex;
+  overflow: hidden;
+}
+.tox .tox-sidebar__pane-container {
+  display: flex;
+}
+.tox .tox-sidebar__pane {
+  display: flex;
+}
+.tox .tox-sidebar--sliding-closed {
+  opacity: 0;
+}
+.tox .tox-sidebar--sliding-open {
+  opacity: 1;
+}
+.tox .tox-sidebar--sliding-growing,
+.tox .tox-sidebar--sliding-shrinking {
+  transition: width 0.5s ease, opacity 0.5s ease;
+}
+.tox .tox-selector {
+  background-color: #4099ff;
+  border-color: #4099ff;
+  border-style: solid;
+  border-width: 1px;
+  box-sizing: border-box;
+  display: inline-block;
+  height: 10px;
+  position: absolute;
+  width: 10px;
+}
+.tox.tox-platform-touch .tox-selector {
+  height: 12px;
+  width: 12px;
+}
+.tox .tox-slider {
+  align-items: center;
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+  height: 24px;
+  justify-content: center;
+  position: relative;
+}
+.tox .tox-slider__rail {
+  background-color: transparent;
+  border: 1px solid #cccccc;
+  border-radius: 3px;
+  height: 10px;
+  min-width: 120px;
+  width: 100%;
+}
+.tox .tox-slider__handle {
+  background-color: #207ab7;
+  border: 2px solid #185d8c;
+  border-radius: 3px;
+  box-shadow: none;
+  height: 24px;
+  left: 50%;
+  position: absolute;
+  top: 50%;
+  transform: translateX(-50%) translateY(-50%);
+  width: 14px;
+}
+.tox .tox-source-code {
+  overflow: auto;
+}
+.tox .tox-spinner {
+  display: flex;
+}
+.tox .tox-spinner > div {
+  animation: tam-bouncing-dots 1.5s ease-in-out 0s infinite both;
+  background-color: rgba(34, 47, 62, 0.7);
+  border-radius: 100%;
+  height: 8px;
+  width: 8px;
+}
+.tox .tox-spinner > div:nth-child(1) {
+  animation-delay: -0.32s;
+}
+.tox .tox-spinner > div:nth-child(2) {
+  animation-delay: -0.16s;
+}
+@keyframes tam-bouncing-dots {
+  0%,
+  80%,
+  100% {
+    transform: scale(0);
+  }
+  40% {
+    transform: scale(1);
+  }
+}
+.tox:not([dir=rtl]) .tox-spinner > div:not(:first-child) {
+  margin-left: 4px;
+}
+.tox[dir=rtl] .tox-spinner > div:not(:first-child) {
+  margin-right: 4px;
+}
+.tox .tox-statusbar {
+  align-items: center;
+  background-color: #fff;
+  border-top: 1px solid #cccccc;
+  color: rgba(34, 47, 62, 0.7);
+  display: flex;
+  flex: 0 0 auto;
+  font-size: 12px;
+  font-weight: normal;
+  height: 18px;
+  overflow: hidden;
+  padding: 0 8px;
+  position: relative;
+  text-transform: uppercase;
+}
+.tox .tox-statusbar__text-container {
+  display: flex;
+  flex: 1 1 auto;
+  justify-content: flex-end;
+  overflow: hidden;
+}
+.tox .tox-statusbar__path {
+  display: flex;
+  flex: 1 1 auto;
+  margin-right: auto;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.tox .tox-statusbar__path > * {
+  display: inline;
+  white-space: nowrap;
+}
+.tox .tox-statusbar__wordcount {
+  flex: 0 0 auto;
+  margin-left: 1ch;
+}
+.tox .tox-statusbar a,
+.tox .tox-statusbar__path-item,
+.tox .tox-statusbar__wordcount {
+  color: rgba(34, 47, 62, 0.7);
+  text-decoration: none;
+}
+.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled=true]),
+.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled=true]),
+.tox .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled=true]),
+.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled=true]),
+.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled=true]),
+.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled=true]) {
+  cursor: pointer;
+  text-decoration: underline;
+}
+.tox .tox-statusbar__resize-handle {
+  align-items: flex-end;
+  align-self: stretch;
+  cursor: nwse-resize;
+  display: flex;
+  flex: 0 0 auto;
+  justify-content: flex-end;
+  margin-left: auto;
+  margin-right: -8px;
+  padding-left: 1ch;
+}
+.tox .tox-statusbar__resize-handle svg {
+  display: block;
+  fill: rgba(34, 47, 62, 0.7);
+}
+.tox:not([dir=rtl]) .tox-statusbar__path > * {
+  margin-right: 4px;
+}
+.tox:not([dir=rtl]) .tox-statusbar__branding {
+  margin-left: 1ch;
+}
+.tox[dir=rtl] .tox-statusbar {
+  flex-direction: row-reverse;
+}
+.tox[dir=rtl] .tox-statusbar__path > * {
+  margin-left: 4px;
+}
+.tox .tox-throbber {
+  z-index: 1400;
+}
+.tox .tox-throbber__busy-spinner {
+  align-items: center;
+  background-color: rgba(255, 255, 255, 0.6);
+  bottom: 0;
+  display: flex;
+  justify-content: center;
+  left: 0;
+  position: absolute;
+  right: 0;
+  top: 0;
+}
+.tox .tox-tbtn {
+  align-items: center;
+  background: transparent;
+  border: 0;
+  border-radius: 3px;
+  box-shadow: none;
+  color: #222f3e;
+  display: flex;
+  flex: 0 0 auto;
+  font-size: 14px;
+  font-style: normal;
+  font-weight: normal;
+  height: 34px;
+  justify-content: center;
+  margin: 2px 0 3px 0;
+  outline: none;
+  overflow: hidden;
+  padding: 0;
+  text-transform: none;
+  width: 34px;
+}
+.tox .tox-tbtn svg {
+  display: block;
+  fill: #222f3e;
+}
+.tox .tox-tbtn.tox-tbtn-more {
+  padding-left: 5px;
+  padding-right: 5px;
+  width: inherit;
+}
+.tox .tox-tbtn:focus {
+  background: #dee0e2;
+  border: 0;
+  box-shadow: none;
+}
+.tox .tox-tbtn:hover {
+  background: #dee0e2;
+  border: 0;
+  box-shadow: none;
+  color: #222f3e;
+}
+.tox .tox-tbtn:hover svg {
+  fill: #222f3e;
+}
+.tox .tox-tbtn:active {
+  background: #c8cbcf;
+  border: 0;
+  box-shadow: none;
+  color: #222f3e;
+}
+.tox .tox-tbtn:active svg {
+  fill: #222f3e;
+}
+.tox .tox-tbtn--disabled,
+.tox .tox-tbtn--disabled:hover,
+.tox .tox-tbtn:disabled,
+.tox .tox-tbtn:disabled:hover {
+  background: transparent;
+  border: 0;
+  box-shadow: none;
+  color: rgba(34, 47, 62, 0.5);
+  cursor: not-allowed;
+}
+.tox .tox-tbtn--disabled svg,
+.tox .tox-tbtn--disabled:hover svg,
+.tox .tox-tbtn:disabled svg,
+.tox .tox-tbtn:disabled:hover svg {
+  /* stylelint-disable-line no-descending-specificity */
+  fill: rgba(34, 47, 62, 0.5);
+}
+.tox .tox-tbtn--enabled,
+.tox .tox-tbtn--enabled:hover {
+  background: #c8cbcf;
+  border: 0;
+  box-shadow: none;
+  color: #222f3e;
+}
+.tox .tox-tbtn--enabled > *,
+.tox .tox-tbtn--enabled:hover > * {
+  transform: none;
+}
+.tox .tox-tbtn--enabled svg,
+.tox .tox-tbtn--enabled:hover svg {
+  /* stylelint-disable-line no-descending-specificity */
+  fill: #222f3e;
+}
+.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) {
+  color: #222f3e;
+}
+.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg {
+  fill: #222f3e;
+}
+.tox .tox-tbtn:active > * {
+  transform: none;
+}
+.tox .tox-tbtn--md {
+  height: 51px;
+  width: 51px;
+}
+.tox .tox-tbtn--lg {
+  flex-direction: column;
+  height: 68px;
+  width: 68px;
+}
+.tox .tox-tbtn--return {
+  -ms-grid-row-align: stretch;
+      align-self: stretch;
+  height: unset;
+  width: 16px;
+}
+.tox .tox-tbtn--labeled {
+  padding: 0 4px;
+  width: unset;
+}
+.tox .tox-tbtn__vlabel {
+  display: block;
+  font-size: 10px;
+  font-weight: normal;
+  letter-spacing: -0.025em;
+  margin-bottom: 4px;
+  white-space: nowrap;
+}
+.tox .tox-tbtn--select {
+  margin: 2px 0 3px 0;
+  padding: 0 4px;
+  width: auto;
+}
+.tox .tox-tbtn__select-label {
+  cursor: default;
+  font-weight: normal;
+  margin: 0 4px;
+}
+.tox .tox-tbtn__select-chevron {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+  width: 16px;
+}
+.tox .tox-tbtn__select-chevron svg {
+  fill: rgba(34, 47, 62, 0.5);
+}
+.tox .tox-tbtn--bespoke .tox-tbtn__select-label {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  width: 7em;
+}
+.tox .tox-split-button {
+  border: 0;
+  border-radius: 3px;
+  box-sizing: border-box;
+  display: flex;
+  margin: 2px 0 3px 0;
+  overflow: hidden;
+}
+.tox .tox-split-button:hover {
+  box-shadow: 0 0 0 1px #dee0e2 inset;
+}
+.tox .tox-split-button:focus {
+  background: #dee0e2;
+  box-shadow: none;
+  color: #222f3e;
+}
+.tox .tox-split-button > * {
+  border-radius: 0;
+}
+.tox .tox-split-button__chevron {
+  width: 16px;
+}
+.tox .tox-split-button__chevron svg {
+  fill: rgba(34, 47, 62, 0.5);
+}
+.tox .tox-split-button .tox-tbtn {
+  margin: 0;
+}
+.tox.tox-platform-touch .tox-split-button .tox-tbtn:first-child {
+  width: 30px;
+}
+.tox.tox-platform-touch .tox-split-button__chevron {
+  width: 20px;
+}
+.tox .tox-split-button.tox-tbtn--disabled:hover,
+.tox .tox-split-button.tox-tbtn--disabled:focus,
+.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover,
+.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus {
+  background: transparent;
+  box-shadow: none;
+  color: rgba(34, 47, 62, 0.5);
+}
+.tox .tox-toolbar-overlord {
+  background-color: #fff;
+}
+.tox .tox-toolbar,
+.tox .tox-toolbar__primary,
+.tox .tox-toolbar__overflow {
+  background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #fff;
+  background-color: #fff;
+  display: flex;
+  flex: 0 0 auto;
+  flex-shrink: 0;
+  flex-wrap: wrap;
+  padding: 0 0;
+}
+.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed {
+  height: 0;
+  opacity: 0;
+  padding-bottom: 0;
+  padding-top: 0;
+  visibility: hidden;
+}
+.tox .tox-toolbar__overflow--growing {
+  transition: height 0.3s ease, opacity 0.2s linear 0.1s;
+}
+.tox .tox-toolbar__overflow--shrinking {
+  transition: opacity 0.3s ease, height 0.2s linear 0.1s, visibility 0s linear 0.3s;
+}
+.tox .tox-menubar + .tox-toolbar,
+.tox .tox-menubar + .tox-toolbar-overlord .tox-toolbar__primary {
+  border-top: 1px solid #cccccc;
+  margin-top: -1px;
+}
+.tox .tox-toolbar--scrolling {
+  flex-wrap: nowrap;
+  overflow-x: auto;
+}
+.tox .tox-pop .tox-toolbar {
+  border-width: 0;
+}
+.tox .tox-toolbar--no-divider {
+  background-image: none;
+}
+.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar:first-child,
+.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar-overlord:first-child .tox-toolbar__primary {
+  border-top: 1px solid #cccccc;
+}
+.tox.tox-tinymce-aux .tox-toolbar__overflow {
+  background-color: #fff;
+  border: 1px solid #cccccc;
+  border-radius: 3px;
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
+}
+.tox[dir=rtl] .tox-tbtn__icon-rtl svg {
+  transform: rotateY(180deg);
+}
+.tox .tox-toolbar__group {
+  align-items: center;
+  display: flex;
+  flex-wrap: wrap;
+  margin: 0 0;
+  padding: 0 4px 0 4px;
+}
+.tox .tox-toolbar__group--pull-right {
+  margin-left: auto;
+}
+.tox .tox-toolbar--scrolling .tox-toolbar__group {
+  flex-shrink: 0;
+  flex-wrap: nowrap;
+}
+.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type) {
+  border-right: 1px solid #cccccc;
+}
+.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type) {
+  border-left: 1px solid #cccccc;
+}
+.tox .tox-tooltip {
+  display: inline-block;
+  padding: 8px;
+  position: relative;
+}
+.tox .tox-tooltip__body {
+  background-color: #222f3e;
+  border-radius: 3px;
+  box-shadow: 0 2px 4px rgba(34, 47, 62, 0.3);
+  color: rgba(255, 255, 255, 0.75);
+  font-size: 14px;
+  font-style: normal;
+  font-weight: normal;
+  padding: 4px 8px;
+  text-transform: none;
+}
+.tox .tox-tooltip__arrow {
+  position: absolute;
+}
+.tox .tox-tooltip--down .tox-tooltip__arrow {
+  border-left: 8px solid transparent;
+  border-right: 8px solid transparent;
+  border-top: 8px solid #222f3e;
+  bottom: 0;
+  left: 50%;
+  position: absolute;
+  transform: translateX(-50%);
+}
+.tox .tox-tooltip--up .tox-tooltip__arrow {
+  border-bottom: 8px solid #222f3e;
+  border-left: 8px solid transparent;
+  border-right: 8px solid transparent;
+  left: 50%;
+  position: absolute;
+  top: 0;
+  transform: translateX(-50%);
+}
+.tox .tox-tooltip--right .tox-tooltip__arrow {
+  border-bottom: 8px solid transparent;
+  border-left: 8px solid #222f3e;
+  border-top: 8px solid transparent;
+  position: absolute;
+  right: 0;
+  top: 50%;
+  transform: translateY(-50%);
+}
+.tox .tox-tooltip--left .tox-tooltip__arrow {
+  border-bottom: 8px solid transparent;
+  border-right: 8px solid #222f3e;
+  border-top: 8px solid transparent;
+  left: 0;
+  position: absolute;
+  top: 50%;
+  transform: translateY(-50%);
+}
+.tox .tox-well {
+  border: 1px solid #cccccc;
+  border-radius: 3px;
+  padding: 8px;
+  width: 100%;
+}
+.tox .tox-well > *:first-child {
+  margin-top: 0;
+}
+.tox .tox-well > *:last-child {
+  margin-bottom: 0;
+}
+.tox .tox-well > *:only-child {
+  margin: 0;
+}
+.tox .tox-custom-editor {
+  border: 1px solid #cccccc;
+  border-radius: 3px;
+  display: flex;
+  flex: 1;
+  position: relative;
+}
+/* stylelint-disable */
+.tox {
+  /* stylelint-enable */
+}
+.tox .tox-dialog-loading::before {
+  background-color: rgba(0, 0, 0, 0.5);
+  content: "";
+  height: 100%;
+  position: absolute;
+  width: 100%;
+  z-index: 1000;
+}
+.tox .tox-tab {
+  cursor: pointer;
+}
+.tox .tox-dialog__content-js {
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-dialog__body-content .tox-collection {
+  display: flex;
+  flex: 1;
+  -ms-flex-preferred-size: auto;
+}
+.tox .tox-image-tools-edit-panel {
+  height: 60px;
+}
+.tox .tox-image-tools__sidebar {
+  height: 60px;
+}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide/skin.min.css
@@ -1,1 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.tox{box-sizing:content-box;color:#222f3e;cursor:auto;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:normal;-webkit-tap-highlight-color:transparent;text-decoration:none;text-shadow:none;text-transform:none;vertical-align:initial;white-space:normal}.tox :not(svg):not(rect){box-sizing:inherit;color:inherit;cursor:inherit;direction:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;-webkit-tap-highlight-color:inherit;text-align:inherit;text-decoration:inherit;text-shadow:inherit;text-transform:inherit;vertical-align:inherit;white-space:inherit}.tox :not(svg):not(rect){background:0 0;border:0;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.tox:not([dir=rtl]){direction:ltr;text-align:left}.tox[dir=rtl]{direction:rtl;text-align:right}.tox-tinymce{border:1px solid #ccc;border-radius:0;box-shadow:none;box-sizing:border-box;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;overflow:hidden;position:relative;visibility:inherit!important}.tox-tinymce-inline{border:none;box-shadow:none}.tox-tinymce-inline .tox-editor-header{border:1px solid #ccc;border-radius:0;box-shadow:none}.tox-tinymce-aux{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;z-index:1300}.tox-tinymce :focus,.tox-tinymce-aux :focus{outline:0}button::-moz-focus-inner{border:0}.tox .accessibility-issue__header{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description{align-items:stretch;border:1px solid #ccc;border-radius:3px;display:flex;justify-content:space-between}.tox .accessibility-issue__description>div{padding-bottom:4px}.tox .accessibility-issue__description>div>div{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description>:last-child:not(:only-child){border-color:#ccc;border-style:solid}.tox .accessibility-issue__repair{margin-top:16px}.tox .accessibility-issue--info .accessibility-issue__description{background-color:rgba(32,122,183,.1);border-color:rgba(32,122,183,.4);color:#222f3e}.tox .accessibility-issue--info .accessibility-issue__description>:last-child{border-color:rgba(32,122,183,.4)}.tox .accessibility-issue--info h2{color:#207ab7}.tox .accessibility-issue--info .tox-icon svg{fill:#207ab7}.tox .accessibility-issue--info a .tox-icon{color:#207ab7}.tox .accessibility-issue--warn .accessibility-issue__description{background-color:rgba(255,165,0,.1);border-color:rgba(255,165,0,.5);color:#222f3e}.tox .accessibility-issue--warn .accessibility-issue__description>:last-child{border-color:rgba(255,165,0,.5)}.tox .accessibility-issue--warn h2{color:#cc8500}.tox .accessibility-issue--warn .tox-icon svg{fill:#cc8500}.tox .accessibility-issue--warn a .tox-icon{color:#cc8500}.tox .accessibility-issue--error .accessibility-issue__description{background-color:rgba(204,0,0,.1);border-color:rgba(204,0,0,.4);color:#222f3e}.tox .accessibility-issue--error .accessibility-issue__description>:last-child{border-color:rgba(204,0,0,.4)}.tox .accessibility-issue--error h2{color:#c00}.tox .accessibility-issue--error .tox-icon svg{fill:#c00}.tox .accessibility-issue--error a .tox-icon{color:#c00}.tox .accessibility-issue--success .accessibility-issue__description{background-color:rgba(120,171,70,.1);border-color:rgba(120,171,70,.4);color:#222f3e}.tox .accessibility-issue--success .accessibility-issue__description>:last-child{border-color:rgba(120,171,70,.4)}.tox .accessibility-issue--success h2{color:#78ab46}.tox .accessibility-issue--success .tox-icon svg{fill:#78ab46}.tox .accessibility-issue--success a .tox-icon{color:#78ab46}.tox .tox-dialog__body-content .accessibility-issue__header h1,.tox .tox-dialog__body-content .tox-form__group .accessibility-issue__description h2{margin-top:0}.tox:not([dir=rtl]) .accessibility-issue__header .tox-button{margin-left:4px}.tox:not([dir=rtl]) .accessibility-issue__header>:nth-last-child(2){margin-left:auto}.tox:not([dir=rtl]) .accessibility-issue__description{padding:4px 4px 4px 8px}.tox:not([dir=rtl]) .accessibility-issue__description>:last-child{border-left-width:1px;padding-left:4px}.tox[dir=rtl] .accessibility-issue__header .tox-button{margin-right:4px}.tox[dir=rtl] .accessibility-issue__header>:nth-last-child(2){margin-right:auto}.tox[dir=rtl] .accessibility-issue__description{padding:4px 8px 4px 4px}.tox[dir=rtl] .accessibility-issue__description>:last-child{border-right-width:1px;padding-right:4px}.tox .tox-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bar{display:flex;flex:0 0 auto}.tox .tox-button{background-color:#207ab7;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#207ab7;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;font-weight:700;letter-spacing:normal;line-height:24px;margin:0;outline:0;padding:4px 16px;text-align:center;text-decoration:none;text-transform:capitalize;white-space:nowrap}.tox .tox-button[disabled]{background-color:#207ab7;background-image:none;border-color:#207ab7;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-button:focus:not(:disabled){background-color:#1c6ca1;background-image:none;border-color:#1c6ca1;box-shadow:none;color:#fff}.tox .tox-button:hover:not(:disabled){background-color:#1c6ca1;background-image:none;border-color:#1c6ca1;box-shadow:none;color:#fff}.tox .tox-button:active:not(:disabled){background-color:#185d8c;background-image:none;border-color:#185d8c;box-shadow:none;color:#fff}.tox .tox-button--secondary{background-color:#f0f0f0;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#f0f0f0;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;color:#222f3e;outline:0;padding:4px 16px;text-decoration:none;text-transform:capitalize}.tox .tox-button--secondary[disabled]{background-color:#f0f0f0;background-image:none;border-color:#f0f0f0;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-button--secondary:focus:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--secondary:hover:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--secondary:active:not(:disabled){background-color:#d6d6d6;background-image:none;border-color:#d6d6d6;box-shadow:none;color:#222f3e}.tox .tox-button--icon,.tox .tox-button.tox-button--icon,.tox .tox-button.tox-button--secondary.tox-button--icon{padding:4px}.tox .tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg{display:block;fill:currentColor}.tox .tox-button-link{background:0;border:none;box-sizing:border-box;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;white-space:nowrap}.tox .tox-button-link--sm{font-size:14px}.tox .tox-button--naked{background-color:transparent;border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked[disabled]{background-color:#f0f0f0;border-color:#f0f0f0;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-button--naked:hover:not(:disabled){background-color:#e3e3e3;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--naked:focus:not(:disabled){background-color:#e3e3e3;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--naked:active:not(:disabled){background-color:#d6d6d6;border-color:#d6d6d6;box-shadow:none;color:#222f3e}.tox .tox-button--naked .tox-icon svg{fill:currentColor}.tox .tox-button--naked.tox-button--icon:hover:not(:disabled){color:#222f3e}.tox .tox-checkbox{align-items:center;border-radius:3px;cursor:pointer;display:flex;height:36px;min-width:36px}.tox .tox-checkbox__input{height:1px;overflow:hidden;position:absolute;top:auto;width:1px}.tox .tox-checkbox__icons{align-items:center;border-radius:3px;box-shadow:0 0 0 2px transparent;box-sizing:content-box;display:flex;height:24px;justify-content:center;padding:calc(4px - 1px);width:24px}.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:block;fill:rgba(34,47,62,.3)}.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:none;fill:#207ab7}.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg{display:none;fill:#207ab7}.tox .tox-checkbox--disabled{color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__checked svg{fill:rgba(34,47,62,.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:rgba(34,47,62,.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{fill:rgba(34,47,62,.5)}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__checked svg{display:block}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:block}.tox input.tox-checkbox__input:focus+.tox-checkbox__icons{border-radius:3px;box-shadow:inset 0 0 0 1px #207ab7;padding:calc(4px - 1px)}.tox:not([dir=rtl]) .tox-checkbox__label{margin-left:4px}.tox:not([dir=rtl]) .tox-checkbox__input{left:-10000px}.tox:not([dir=rtl]) .tox-bar .tox-checkbox{margin-left:4px}.tox[dir=rtl] .tox-checkbox__label{margin-right:4px}.tox[dir=rtl] .tox-checkbox__input{right:-10000px}.tox[dir=rtl] .tox-bar .tox-checkbox{margin-right:4px}.tox .tox-collection--toolbar .tox-collection__group{display:flex;padding:0}.tox .tox-collection--grid .tox-collection__group{display:flex;flex-wrap:wrap;max-height:208px;overflow-x:hidden;overflow-y:auto;padding:0}.tox .tox-collection--list .tox-collection__group{border-bottom-width:0;border-color:#ccc;border-left-width:0;border-right-width:0;border-style:solid;border-top-width:1px;padding:4px 0}.tox .tox-collection--list .tox-collection__group:first-child{border-top-width:0}.tox .tox-collection__group-heading{background-color:#e6e6e6;color:rgba(34,47,62,.7);cursor:default;font-size:12px;font-style:normal;font-weight:400;margin-bottom:4px;margin-top:-4px;padding:4px 8px;text-transform:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tox .tox-collection__item{align-items:center;color:#222f3e;cursor:pointer;display:flex;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tox .tox-collection--list .tox-collection__item{padding:4px 8px}.tox .tox-collection--toolbar .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--grid .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--list .tox-collection__item--enabled{background-color:#fff;color:#222f3e}.tox .tox-collection--list .tox-collection__item--active{background-color:#dee0e2}.tox .tox-collection--toolbar .tox-collection__item--enabled{background-color:#c8cbcf;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active{background-color:#dee0e2}.tox .tox-collection--grid .tox-collection__item--enabled{background-color:#c8cbcf;color:#222f3e}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#dee0e2;color:#222f3e}.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#222f3e}.tox .tox-collection__item--state-disabled{background-color:transparent;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-collection__item-checkmark,.tox .tox-collection__item-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.tox .tox-collection__item-checkmark svg,.tox .tox-collection__item-icon svg{fill:currentColor}.tox .tox-collection--toolbar-lg .tox-collection__item-icon{height:48px;width:48px}.tox .tox-collection__item-label{color:currentColor;display:inline-block;flex:1;-ms-flex-preferred-size:auto;font-size:14px;font-style:normal;font-weight:400;line-height:24px;text-transform:none;word-break:break-all}.tox .tox-collection__item-accessory{color:rgba(34,47,62,.7);display:inline-block;font-size:14px;height:24px;line-height:24px;text-transform:none}.tox .tox-collection__item-caret{align-items:center;display:flex;min-height:24px}.tox .tox-collection__item-caret::after{content:'';font-size:0;min-height:inherit}.tox .tox-collection__item-caret svg{fill:#222f3e}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg{display:none}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-accessory+.tox-collection__item-checkmark{display:none}.tox .tox-collection--horizontal{background-color:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:nowrap;margin-bottom:0;overflow-x:auto;padding:0}.tox .tox-collection--horizontal .tox-collection__group{align-items:center;display:flex;flex-wrap:nowrap;margin:0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item{height:34px;margin:2px 0 3px 0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item-label{white-space:nowrap}.tox .tox-collection--horizontal .tox-collection__item-caret{margin-left:4px}.tox:not([dir=rtl]) .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-right:1px solid #ccc}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>:not(:first-child){margin-left:8px}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item-label:first-child{margin-left:4px}.tox:not([dir=rtl]) .tox-collection__item-accessory{margin-left:16px;text-align:right}.tox:not([dir=rtl]) .tox-collection .tox-collection__item-caret{margin-left:16px}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-left:1px solid #ccc}.tox[dir=rtl] .tox-collection--list .tox-collection__item>:not(:first-child){margin-right:8px}.tox[dir=rtl] .tox-collection--list .tox-collection__item-label:first-child{margin-right:4px}.tox[dir=rtl] .tox-collection__item-icon-rtl .tox-collection__item-icon svg{transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection__item-accessory{margin-right:16px;text-align:left}.tox[dir=rtl] .tox-collection .tox-collection__item-caret{margin-right:16px;transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__item-caret{margin-right:4px}.tox .tox-color-picker-container{display:flex;flex-direction:row;height:225px;margin:0}.tox .tox-sv-palette{box-sizing:border-box;display:flex;height:100%}.tox .tox-sv-palette-spectrum{height:100%}.tox .tox-sv-palette,.tox .tox-sv-palette-spectrum{width:225px}.tox .tox-sv-palette-thumb{background:0 0;border:1px solid #000;border-radius:50%;box-sizing:content-box;height:12px;position:absolute;width:12px}.tox .tox-sv-palette-inner-thumb{border:1px solid #fff;border-radius:50%;height:10px;position:absolute;width:10px}.tox .tox-hue-slider{box-sizing:border-box;height:100%;width:25px}.tox .tox-hue-slider-spectrum{background:linear-gradient(to bottom,red,#ff0080,#f0f,#8000ff,#00f,#0080ff,#0ff,#00ff80,#0f0,#80ff00,#ff0,#ff8000,red);height:100%;width:100%}.tox .tox-hue-slider,.tox .tox-hue-slider-spectrum{width:20px}.tox .tox-hue-slider-thumb{background:#fff;border:1px solid #000;box-sizing:content-box;height:4px;width:100%}.tox .tox-rgb-form{display:flex;flex-direction:column;justify-content:space-between}.tox .tox-rgb-form div{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px;width:inherit}.tox .tox-rgb-form input{width:6em}.tox .tox-rgb-form input.tox-invalid{border:1px solid red!important}.tox .tox-rgb-form .tox-rgba-preview{border:1px solid #000;flex-grow:2;margin-bottom:0}.tox:not([dir=rtl]) .tox-sv-palette{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider-thumb{margin-left:-1px}.tox:not([dir=rtl]) .tox-rgb-form label{margin-right:.5em}.tox[dir=rtl] .tox-sv-palette{margin-left:15px}.tox[dir=rtl] .tox-hue-slider{margin-left:15px}.tox[dir=rtl] .tox-hue-slider-thumb{margin-right:-1px}.tox[dir=rtl] .tox-rgb-form label{margin-left:.5em}.tox .tox-toolbar .tox-swatches,.tox .tox-toolbar__overflow .tox-swatches,.tox .tox-toolbar__primary .tox-swatches{margin:2px 0 3px 4px}.tox .tox-collection--list .tox-collection__group .tox-swatches-menu{border:0;margin:-4px 0}.tox .tox-swatches__row{display:flex}.tox .tox-swatch{height:30px;transition:transform .15s,box-shadow .15s;width:30px}.tox .tox-swatch:focus,.tox .tox-swatch:hover{box-shadow:0 0 0 1px rgba(127,127,127,.3) inset;transform:scale(.8)}.tox .tox-swatch--remove{align-items:center;display:flex;justify-content:center}.tox .tox-swatch--remove svg path{stroke:#e74c3c}.tox .tox-swatches__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-swatches__picker-btn svg{height:24px;width:24px}.tox .tox-swatches__picker-btn:hover{background:#dee0e2}.tox:not([dir=rtl]) .tox-swatches__picker-btn{margin-left:auto}.tox[dir=rtl] .tox-swatches__picker-btn{margin-right:auto}.tox .tox-comment-thread{background:#fff;position:relative}.tox .tox-comment-thread>:not(:first-child){margin-top:8px}.tox .tox-comment{background:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);padding:8px 8px 16px 8px;position:relative}.tox .tox-comment__header{align-items:center;color:#222f3e;display:flex;justify-content:space-between}.tox .tox-comment__date{color:rgba(34,47,62,.7);font-size:12px}.tox .tox-comment__body{color:#222f3e;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;margin-top:8px;position:relative;text-transform:initial}.tox .tox-comment__body textarea{resize:none;white-space:normal;width:100%}.tox .tox-comment__expander{padding-top:8px}.tox .tox-comment__expander p{color:rgba(34,47,62,.7);font-size:14px;font-style:normal}.tox .tox-comment__body p{margin:0}.tox .tox-comment__buttonspacing{padding-top:16px;text-align:center}.tox .tox-comment-thread__overlay::after{background:#fff;bottom:0;content:"";display:flex;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:5}.tox .tox-comment__reply{display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}.tox .tox-comment__reply>:first-child{margin-bottom:8px;width:100%}.tox .tox-comment__edit{display:flex;flex-wrap:wrap;justify-content:flex-end;margin-top:16px}.tox .tox-comment__gradient::after{background:linear-gradient(rgba(255,255,255,0),#fff);bottom:0;content:"";display:block;height:5em;margin-top:-40px;position:absolute;width:100%}.tox .tox-comment__overlay{background:#fff;bottom:0;display:flex;flex-direction:column;flex-grow:1;left:0;opacity:.9;position:absolute;right:0;text-align:center;top:0;z-index:5}.tox .tox-comment__loading-text{align-items:center;color:#222f3e;display:flex;flex-direction:column;position:relative}.tox .tox-comment__loading-text>div{padding-bottom:16px}.tox .tox-comment__overlaytext{bottom:0;flex-direction:column;font-size:14px;left:0;padding:1em;position:absolute;right:0;top:0;z-index:10}.tox .tox-comment__overlaytext p{background-color:#fff;box-shadow:0 0 8px 8px #fff;color:#222f3e;text-align:center}.tox .tox-comment__overlaytext div:nth-of-type(2){font-size:.8em}.tox .tox-comment__busy-spinner{align-items:center;background-color:#fff;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:20}.tox .tox-comment__scroll{display:flex;flex-direction:column;flex-shrink:1;overflow:auto}.tox .tox-conversations{margin:8px}.tox:not([dir=rtl]) .tox-comment__edit{margin-left:8px}.tox:not([dir=rtl]) .tox-comment__buttonspacing>:last-child,.tox:not([dir=rtl]) .tox-comment__edit>:last-child,.tox:not([dir=rtl]) .tox-comment__reply>:last-child{margin-left:8px}.tox[dir=rtl] .tox-comment__edit{margin-right:8px}.tox[dir=rtl] .tox-comment__buttonspacing>:last-child,.tox[dir=rtl] .tox-comment__edit>:last-child,.tox[dir=rtl] .tox-comment__reply>:last-child{margin-right:8px}.tox .tox-user{align-items:center;display:flex}.tox .tox-user__avatar svg{fill:rgba(34,47,62,.7)}.tox .tox-user__name{color:rgba(34,47,62,.7);font-size:12px;font-style:normal;font-weight:700;text-transform:uppercase}.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right:8px}.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left:8px}.tox[dir=rtl] .tox-user__avatar svg{margin-left:8px}.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right:8px}.tox .tox-dialog-wrap{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:1100}.tox .tox-dialog-wrap__backdrop{background-color:rgba(255,255,255,.75);bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}.tox .tox-dialog-wrap__backdrop--opaque{background-color:#fff}.tox .tox-dialog{background-color:#fff;border-color:#ccc;border-radius:3px;border-style:solid;border-width:1px;box-shadow:0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);display:flex;flex-direction:column;max-height:100%;max-width:480px;overflow:hidden;position:relative;width:95vw;z-index:2}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog{align-self:flex-start;margin:8px auto;width:calc(100vw - 16px)}}.tox .tox-dialog-inline{z-index:1100}.tox .tox-dialog__header{align-items:center;background-color:#fff;border-bottom:none;color:#222f3e;display:flex;font-size:16px;justify-content:space-between;padding:8px 16px 0 16px;position:relative}.tox .tox-dialog__header .tox-button{z-index:1}.tox .tox-dialog__draghandle{cursor:grab;height:100%;left:0;position:absolute;top:0;width:100%}.tox .tox-dialog__draghandle:active{cursor:grabbing}.tox .tox-dialog__dismiss{margin-left:auto}.tox .tox-dialog__title{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-style:normal;font-weight:400;line-height:1.3;margin:0;text-transform:none}.tox .tox-dialog__body{color:#222f3e;display:flex;flex:1;-ms-flex-preferred-size:auto;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;min-width:0;text-align:left;text-transform:none}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body{flex-direction:column}}.tox .tox-dialog__body-nav{align-items:flex-start;display:flex;flex-direction:column;padding:16px 16px}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body-nav{flex-direction:row;-webkit-overflow-scrolling:touch;overflow-x:auto;padding-bottom:0}}.tox .tox-dialog__body-nav-item{border-bottom:2px solid transparent;color:rgba(34,47,62,.7);display:inline-block;font-size:14px;line-height:1.3;margin-bottom:8px;text-decoration:none;white-space:nowrap}.tox .tox-dialog__body-nav-item:focus{background-color:rgba(32,122,183,.1)}.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid #207ab7;color:#207ab7}.tox .tox-dialog__body-content{box-sizing:border-box;display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto;max-height:650px;overflow:auto;-webkit-overflow-scrolling:touch;padding:16px 16px}.tox .tox-dialog__body-content>*{margin-bottom:0;margin-top:16px}.tox .tox-dialog__body-content>:first-child{margin-top:0}.tox .tox-dialog__body-content>:last-child{margin-bottom:0}.tox .tox-dialog__body-content>:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content a{color:#207ab7;cursor:pointer;text-decoration:none}.tox .tox-dialog__body-content a:focus,.tox .tox-dialog__body-content a:hover{color:#185d8c;text-decoration:none}.tox .tox-dialog__body-content a:active{color:#185d8c;text-decoration:none}.tox .tox-dialog__body-content svg{fill:#222f3e}.tox .tox-dialog__body-content ul{display:block;list-style-type:disc;margin-bottom:16px;-webkit-margin-end:0;margin-inline-end:0;-webkit-margin-start:0;margin-inline-start:0;-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}.tox .tox-dialog__body-content .tox-form__group h1{font-size:20px;font-weight:700;margin-bottom:16px;margin-top:2rem}.tox .tox-dialog__body-content .tox-form__group h2{font-size:16px;font-weight:700;margin-bottom:16px;margin-top:2rem}.tox .tox-dialog__body-content .tox-form__group p{margin-bottom:16px}.tox .tox-dialog__body-content .tox-form__group h1:first-child,.tox .tox-dialog__body-content .tox-form__group h2:first-child,.tox .tox-dialog__body-content .tox-form__group p:first-child{margin-top:0}.tox .tox-dialog__body-content .tox-form__group h1:last-child,.tox .tox-dialog__body-content .tox-form__group h2:last-child,.tox .tox-dialog__body-content .tox-form__group p:last-child{margin-bottom:0}.tox .tox-dialog__body-content .tox-form__group h1:only-child,.tox .tox-dialog__body-content .tox-form__group h2:only-child,.tox .tox-dialog__body-content .tox-form__group p:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog--width-lg{height:650px;max-width:1200px}.tox .tox-dialog--width-md{max-width:800px}.tox .tox-dialog--width-md .tox-dialog__body-content{overflow:auto}.tox .tox-dialog__body-content--centered{text-align:center}.tox .tox-dialog__footer{align-items:center;background-color:#fff;border-top:1px solid #ccc;display:flex;justify-content:space-between;padding:8px 16px}.tox .tox-dialog__footer-end,.tox .tox-dialog__footer-start{display:flex}.tox .tox-dialog__busy-spinner{align-items:center;background-color:rgba(255,255,255,.75);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:3}.tox .tox-dialog__table{border-collapse:collapse;width:100%}.tox .tox-dialog__table thead th{font-weight:700;padding-bottom:8px}.tox .tox-dialog__table tbody tr{border-bottom:1px solid #ccc}.tox .tox-dialog__table tbody tr:last-child{border-bottom:none}.tox .tox-dialog__table td{padding-bottom:8px;padding-top:8px}.tox .tox-dialog__popups{position:absolute;width:100%;z-index:1100}.tox .tox-dialog__body-iframe{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-iframe .tox-navobj{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2){flex:1;-ms-flex-preferred-size:auto;height:100%}.tox .tox-dialog-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-dialog-dock-fadein{opacity:1;visibility:visible}.tox .tox-dialog-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein{transition-delay:0s}body.tox-dialog__disable-scroll{overflow:hidden}.tox.tox-platform-ie .tox-dialog-wrap{position:-ms-device-fixed}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav{margin-right:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child){margin-left:8px}}.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end>*,.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start>*{margin-left:8px}.tox[dir=rtl] .tox-dialog__body{text-align:right}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav{margin-left:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child){margin-right:8px}}.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end>*,.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start>*{margin-right:8px}.tox .tox-dropzone-container{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dropzone{align-items:center;background:#fff;border:2px dashed #ccc;box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;min-height:100px;padding:10px}.tox .tox-dropzone p{color:rgba(34,47,62,.7);margin:0 0 16px 0}.tox .tox-edit-area{display:flex;flex:1;-ms-flex-preferred-size:auto;overflow:hidden;position:relative}.tox .tox-edit-area__iframe{background-color:#fff;border:0;box-sizing:border-box;flex:1;-ms-flex-preferred-size:auto;height:100%;position:absolute;width:100%}.tox.tox-inline-edit-area{border:1px dotted #ccc}.tox .tox-editor-container{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-editor-header{z-index:1}.tox:not(.tox-tinymce-inline) .tox-editor-header{box-shadow:none;transition:box-shadow .5s}.tox.tox-tinymce--toolbar-bottom .tox-editor-header,.tox.tox-tinymce-inline .tox-editor-header{margin-bottom:-1px}.tox.tox-tinymce--toolbar-sticky-on .tox-editor-header{box-shadow:0 4px 4px -3px rgba(0,0,0,.25)}.tox-editor-dock-fadeout{opacity:0;visibility:hidden}.tox-editor-dock-fadein{opacity:1;visibility:visible}.tox-editor-dock-transition{transition:visibility 0s linear .25s,opacity .25s ease}.tox-editor-dock-transition.tox-editor-dock-fadein{transition-delay:0s}.tox .tox-control-wrap{flex:1;position:relative}.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid{display:none}.tox .tox-control-wrap svg{display:block}.tox .tox-control-wrap__status-icon-wrap{position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-control-wrap__status-icon-invalid svg{fill:#c00}.tox .tox-control-wrap__status-icon-unknown svg{fill:orange}.tox .tox-control-wrap__status-icon-valid svg{fill:green}.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield{padding-right:32px}.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap{right:4px}.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield{padding-left:32px}.tox[dir=rtl] .tox-control-wrap__status-icon-wrap{left:4px}.tox .tox-autocompleter{max-width:25em}.tox .tox-autocompleter .tox-menu{max-width:25em}.tox .tox-autocompleter .tox-autocompleter-highlight{font-weight:700}.tox .tox-color-input{display:flex;position:relative;z-index:1}.tox .tox-color-input .tox-textfield{z-index:-1}.tox .tox-color-input span{border-color:rgba(34,47,62,.2);border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;height:24px;position:absolute;top:6px;width:24px}.tox .tox-color-input span:focus:not([aria-disabled=true]),.tox .tox-color-input span:hover:not([aria-disabled=true]){border-color:#207ab7;cursor:pointer}.tox .tox-color-input span::before{background-image:linear-gradient(45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(-45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.25) 75%),linear-gradient(-45deg,transparent 75%,rgba(0,0,0,.25) 75%);background-position:0 0,0 6px,6px -6px,-6px 0;background-size:12px 12px;border:1px solid #fff;border-radius:3px;box-sizing:border-box;content:'';height:24px;left:-1px;position:absolute;top:-1px;width:24px;z-index:-1}.tox .tox-color-input span[aria-disabled=true]{cursor:not-allowed}.tox:not([dir=rtl]) .tox-color-input .tox-textfield{padding-left:36px}.tox:not([dir=rtl]) .tox-color-input span{left:6px}.tox[dir=rtl] .tox-color-input .tox-textfield{padding-right:36px}.tox[dir=rtl] .tox-color-input span{right:6px}.tox .tox-label,.tox .tox-toolbar-label{color:rgba(34,47,62,.7);display:block;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;padding:0 8px 0 0;text-transform:none;white-space:nowrap}.tox .tox-toolbar-label{padding:0 8px}.tox[dir=rtl] .tox-label{padding:0 0 0 8px}.tox .tox-form{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-form__group{box-sizing:border-box;margin-bottom:4px}.tox .tox-form-group--maximize{flex:1}.tox .tox-form__group--error{color:#c00}.tox .tox-form__group--collection{display:flex}.tox .tox-form__grid{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}.tox .tox-form__grid--2col>.tox-form__group{width:calc(50% - (8px / 2))}.tox .tox-form__grid--3col>.tox-form__group{width:calc(100% / 3 - (8px / 2))}.tox .tox-form__grid--4col>.tox-form__group{width:calc(25% - (8px / 2))}.tox .tox-form__controls-h-stack{align-items:center;display:flex}.tox .tox-form__group--inline{align-items:center;display:flex}.tox .tox-form__group--stretched{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-textarea{flex:1;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-navobj{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex:1;-ms-flex-preferred-size:auto;height:100%}.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-form__controls-h-stack>:not(:first-child){margin-right:4px}.tox .tox-lock.tox-locked .tox-lock-icon__unlock,.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock{display:none}.tox .tox-selectfield select,.tox .tox-textarea,.tox .tox-textfield,.tox .tox-toolbar-textfield{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#ccc;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 4.75px;resize:none;width:100%}.tox .tox-textarea[disabled],.tox .tox-textfield[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-selectfield select:focus,.tox .tox-textarea:focus,.tox .tox-textfield:focus{border-color:#207ab7;box-shadow:none;outline:0}.tox .tox-toolbar-textfield{border-width:0;margin-bottom:3px;margin-top:2px;max-width:250px}.tox .tox-naked-btn{background-color:transparent;border:0;border-color:transparent;box-shadow:unset;color:#207ab7;cursor:pointer;display:block;margin:0;padding:0}.tox .tox-naked-btn svg{display:block;fill:#222f3e}.tox:not([dir=rtl]) .tox-toolbar-textfield+*{margin-left:4px}.tox[dir=rtl] .tox-toolbar-textfield+*{margin-right:4px}.tox .tox-selectfield{cursor:pointer;position:relative}.tox .tox-selectfield select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-selectfield select::-ms-expand{display:none}.tox .tox-selectfield svg{pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}.tox:not([dir=rtl]) .tox-selectfield select[size="0"],.tox:not([dir=rtl]) .tox-selectfield select[size="1"]{padding-right:24px}.tox:not([dir=rtl]) .tox-selectfield svg{right:8px}.tox[dir=rtl] .tox-selectfield select[size="0"],.tox[dir=rtl] .tox-selectfield select[size="1"]{padding-left:24px}.tox[dir=rtl] .tox-selectfield svg{left:8px}.tox .tox-textarea{-webkit-appearance:textarea;-moz-appearance:textarea;appearance:textarea;white-space:pre-wrap}.tox-fullscreen{border:0;height:100%;left:0;margin:0;overflow:hidden;-ms-scroll-chaining:none;overscroll-behavior:none;padding:0;position:fixed;top:0;touch-action:pinch-zoom;width:100%}.tox-fullscreen .tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-fullscreen .tox.tox-tinymce.tox-fullscreen{z-index:1200}.tox-fullscreen .tox.tox-tinymce-aux{z-index:1201}.tox .tox-help__more-link{list-style:none;margin-top:1em}.tox .tox-image-tools{width:100%}.tox .tox-image-tools__toolbar{align-items:center;display:flex;justify-content:center}.tox .tox-image-tools__image{background-color:#666;height:380px;overflow:auto;position:relative;width:100%}.tox .tox-image-tools__image,.tox .tox-image-tools__image+.tox-image-tools__toolbar{margin-top:8px}.tox .tox-image-tools__image-bg{background:url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==)}.tox .tox-image-tools__toolbar>.tox-spacer{flex:1;-ms-flex-preferred-size:auto}.tox .tox-croprect-block{background:#000;opacity:.5;position:absolute;zoom:1}.tox .tox-croprect-handle{border:2px solid #fff;height:20px;left:0;position:absolute;top:0;width:20px}.tox .tox-croprect-handle-move{border:0;cursor:move;position:absolute}.tox .tox-croprect-handle-nw{border-width:2px 0 0 2px;cursor:nw-resize;left:100px;margin:-2px 0 0 -2px;top:100px}.tox .tox-croprect-handle-ne{border-width:2px 2px 0 0;cursor:ne-resize;left:200px;margin:-2px 0 0 -20px;top:100px}.tox .tox-croprect-handle-sw{border-width:0 0 2px 2px;cursor:sw-resize;left:100px;margin:-20px 2px 0 -2px;top:200px}.tox .tox-croprect-handle-se{border-width:0 2px 2px 0;cursor:se-resize;left:200px;margin:-20px 0 0 -20px;top:200px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-left:8px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-left:32px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-left:32px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-right:8px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-right:32px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-right:32px}.tox .tox-insert-table-picker{display:flex;flex-wrap:wrap;width:170px}.tox .tox-insert-table-picker>div{border-color:#ccc;border-style:solid;border-width:0 1px 1px 0;box-sizing:border-box;height:17px;width:17px}.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin:-4px 0}.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color:rgba(32,122,183,.5);border-color:rgba(32,122,183,.5)}.tox .tox-insert-table-picker__label{color:rgba(34,47,62,.7);display:block;font-size:14px;padding:4px;text-align:center;width:100%}.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right:0}.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right:0}.tox .tox-menu{background-color:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);display:inline-block;overflow:hidden;vertical-align:top;z-index:1150}.tox .tox-menu.tox-collection.tox-collection--list{padding:0}.tox .tox-menu.tox-collection.tox-collection--toolbar{padding:4px}.tox .tox-menu.tox-collection.tox-collection--grid{padding:4px}.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin:0}.tox .tox-menubar{background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #fff;background-color:#fff;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 4px 0 4px}.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar{border-top:1px solid #ccc}.tox .tox-mbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:34px;justify-content:center;margin:2px 0 3px 0;outline:0;overflow:hidden;padding:0 4px;text-transform:none;width:auto}.tox .tox-mbtn[disabled]{background-color:transparent;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-mbtn:focus:not(:disabled){background:#dee0e2;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn--active{background:#c8cbcf;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active){background:#dee0e2;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-mbtn[disabled] .tox-mbtn__select-label{cursor:not-allowed}.tox .tox-mbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px;display:none}.tox .tox-notification{border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;display:-ms-grid;display:grid;font-size:14px;font-weight:400;-ms-grid-columns:minmax(40px,1fr) auto minmax(40px,1fr);grid-template-columns:minmax(40px,1fr) auto minmax(40px,1fr);margin-top:4px;opacity:0;padding:4px;transition:transform .1s ease-in,opacity 150ms ease-in}.tox .tox-notification p{font-size:14px;font-weight:400}.tox .tox-notification a{text-decoration:underline}.tox .tox-notification--in{opacity:1}.tox .tox-notification--success{background-color:#e4eeda;border-color:#d7e6c8;color:#222f3e}.tox .tox-notification--success p{color:#222f3e}.tox .tox-notification--success a{color:#547831}.tox .tox-notification--success svg{fill:#222f3e}.tox .tox-notification--error{background-color:#f8dede;border-color:#f2bfbf;color:#222f3e}.tox .tox-notification--error p{color:#222f3e}.tox .tox-notification--error a{color:#c00}.tox .tox-notification--error svg{fill:#222f3e}.tox .tox-notification--warn,.tox .tox-notification--warning{background-color:#fffaea;border-color:#ffe89d;color:#222f3e}.tox .tox-notification--warn p,.tox .tox-notification--warning p{color:#222f3e}.tox .tox-notification--warn a,.tox .tox-notification--warning a{color:#222f3e}.tox .tox-notification--warn svg,.tox .tox-notification--warning svg{fill:#222f3e}.tox .tox-notification--info{background-color:#d9edf7;border-color:#779ecb;color:#222f3e}.tox .tox-notification--info p{color:#222f3e}.tox .tox-notification--info a{color:#222f3e}.tox .tox-notification--info svg{fill:#222f3e}.tox .tox-notification__body{-ms-grid-row-align:center;align-self:center;color:#222f3e;font-size:14px;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-column:2;grid-column-start:2;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;text-align:center;white-space:normal;word-break:break-all;word-break:break-word}.tox .tox-notification__body>*{margin:0}.tox .tox-notification__body>*+*{margin-top:1rem}.tox .tox-notification__icon{-ms-grid-row-align:center;align-self:center;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-column:1;grid-column-start:1;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-column-align:end;justify-self:end}.tox .tox-notification__icon svg{display:block}.tox .tox-notification__dismiss{-ms-grid-row-align:start;align-self:start;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-column:3;grid-column-start:3;-ms-grid-row-span:1;grid-row-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-column-align:end;justify-self:end}.tox .tox-notification .tox-progress-bar{-ms-grid-column-span:3;grid-column-end:4;-ms-grid-column:1;grid-column-start:1;-ms-grid-row-span:1;grid-row-end:3;-ms-grid-row:2;grid-row-start:2;-ms-grid-column-align:center;justify-self:center}.tox .tox-pop{display:inline-block;position:relative}.tox .tox-pop--resizing{transition:width .1s ease}.tox .tox-pop--resizing .tox-toolbar{flex-wrap:nowrap}.tox .tox-pop__dialog{background-color:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15);min-width:0;overflow:hidden}.tox .tox-pop__dialog>:not(.tox-toolbar){margin:4px 4px 4px 8px}.tox .tox-pop__dialog .tox-toolbar{background-color:transparent;margin-bottom:-1px}.tox .tox-pop::after,.tox .tox-pop::before{border-style:solid;content:'';display:block;height:0;position:absolute;width:0}.tox .tox-pop.tox-pop--bottom::after,.tox .tox-pop.tox-pop--bottom::before{left:50%;top:100%}.tox .tox-pop.tox-pop--bottom::after{border-color:#fff transparent transparent transparent;border-width:8px;margin-left:-8px;margin-top:-1px}.tox .tox-pop.tox-pop--bottom::before{border-color:#ccc transparent transparent transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--top::after,.tox .tox-pop.tox-pop--top::before{left:50%;top:0;transform:translateY(-100%)}.tox .tox-pop.tox-pop--top::after{border-color:transparent transparent #fff transparent;border-width:8px;margin-left:-8px;margin-top:1px}.tox .tox-pop.tox-pop--top::before{border-color:transparent transparent #ccc transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--left::after,.tox .tox-pop.tox-pop--left::before{left:0;top:calc(50% - 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--left::after{border-color:transparent #fff transparent transparent;border-width:8px;margin-left:-15px}.tox .tox-pop.tox-pop--left::before{border-color:transparent #ccc transparent transparent;border-width:10px;margin-left:-19px}.tox .tox-pop.tox-pop--right::after,.tox .tox-pop.tox-pop--right::before{left:100%;top:calc(50% + 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--right::after{border-color:transparent transparent transparent #fff;border-width:8px;margin-left:-1px}.tox .tox-pop.tox-pop--right::before{border-color:transparent transparent transparent #ccc;border-width:10px;margin-left:-1px}.tox .tox-pop.tox-pop--align-left::after,.tox .tox-pop.tox-pop--align-left::before{left:20px}.tox .tox-pop.tox-pop--align-right::after,.tox .tox-pop.tox-pop--align-right::before{left:calc(100% - 20px)}.tox .tox-sidebar-wrap{display:flex;flex-direction:row;flex-grow:1;-ms-flex-preferred-size:0;min-height:0}.tox .tox-sidebar{background-color:#fff;display:flex;flex-direction:row;justify-content:flex-end}.tox .tox-sidebar__slider{display:flex;overflow:hidden}.tox .tox-sidebar__pane-container{display:flex}.tox .tox-sidebar__pane{display:flex}.tox .tox-sidebar--sliding-closed{opacity:0}.tox .tox-sidebar--sliding-open{opacity:1}.tox .tox-sidebar--sliding-growing,.tox .tox-sidebar--sliding-shrinking{transition:width .5s ease,opacity .5s ease}.tox .tox-selector{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;display:inline-block;height:10px;position:absolute;width:10px}.tox.tox-platform-touch .tox-selector{height:12px;width:12px}.tox .tox-slider{align-items:center;display:flex;flex:1;-ms-flex-preferred-size:auto;height:24px;justify-content:center;position:relative}.tox .tox-slider__rail{background-color:transparent;border:1px solid #ccc;border-radius:3px;height:10px;min-width:120px;width:100%}.tox .tox-slider__handle{background-color:#207ab7;border:2px solid #185d8c;border-radius:3px;box-shadow:none;height:24px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:14px}.tox .tox-source-code{overflow:auto}.tox .tox-spinner{display:flex}.tox .tox-spinner>div{animation:tam-bouncing-dots 1.5s ease-in-out 0s infinite both;background-color:rgba(34,47,62,.7);border-radius:100%;height:8px;width:8px}.tox .tox-spinner>div:nth-child(1){animation-delay:-.32s}.tox .tox-spinner>div:nth-child(2){animation-delay:-.16s}@keyframes tam-bouncing-dots{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.tox:not([dir=rtl]) .tox-spinner>div:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-spinner>div:not(:first-child){margin-right:4px}.tox .tox-statusbar{align-items:center;background-color:#fff;border-top:1px solid #ccc;color:rgba(34,47,62,.7);display:flex;flex:0 0 auto;font-size:12px;font-weight:400;height:18px;overflow:hidden;padding:0 8px;position:relative;text-transform:uppercase}.tox .tox-statusbar__text-container{display:flex;flex:1 1 auto;justify-content:flex-end;overflow:hidden}.tox .tox-statusbar__path{display:flex;flex:1 1 auto;margin-right:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-statusbar__path>*{display:inline;white-space:nowrap}.tox .tox-statusbar__wordcount{flex:0 0 auto;margin-left:1ch}.tox .tox-statusbar a,.tox .tox-statusbar__path-item,.tox .tox-statusbar__wordcount{color:rgba(34,47,62,.7);text-decoration:none}.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled=true]){cursor:pointer;text-decoration:underline}.tox .tox-statusbar__resize-handle{align-items:flex-end;align-self:stretch;cursor:nwse-resize;display:flex;flex:0 0 auto;justify-content:flex-end;margin-left:auto;margin-right:-8px;padding-left:1ch}.tox .tox-statusbar__resize-handle svg{display:block;fill:rgba(34,47,62,.7)}.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right:4px}.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left:1ch}.tox[dir=rtl] .tox-statusbar{flex-direction:row-reverse}.tox[dir=rtl] .tox-statusbar__path>*{margin-left:4px}.tox .tox-throbber{z-index:1400}.tox .tox-throbber__busy-spinner{align-items:center;background-color:rgba(255,255,255,.6);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.tox .tox-tbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:34px;justify-content:center;margin:2px 0 3px 0;outline:0;overflow:hidden;padding:0;text-transform:none;width:34px}.tox .tox-tbtn svg{display:block;fill:#222f3e}.tox .tox-tbtn.tox-tbtn-more{padding-left:5px;padding-right:5px;width:inherit}.tox .tox-tbtn:focus{background:#dee0e2;border:0;box-shadow:none}.tox .tox-tbtn:hover{background:#dee0e2;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:hover svg{fill:#222f3e}.tox .tox-tbtn:active{background:#c8cbcf;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:active svg{fill:#222f3e}.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{background:0 0;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill:rgba(34,47,62,.5)}.tox .tox-tbtn--enabled,.tox .tox-tbtn--enabled:hover{background:#c8cbcf;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn--enabled:hover>*,.tox .tox-tbtn--enabled>*{transform:none}.tox .tox-tbtn--enabled svg,.tox .tox-tbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){color:#222f3e}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg{fill:#222f3e}.tox .tox-tbtn:active>*{transform:none}.tox .tox-tbtn--md{height:51px;width:51px}.tox .tox-tbtn--lg{flex-direction:column;height:68px;width:68px}.tox .tox-tbtn--return{-ms-grid-row-align:stretch;align-self:stretch;height:unset;width:16px}.tox .tox-tbtn--labeled{padding:0 4px;width:unset}.tox .tox-tbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-tbtn--select{margin:2px 0 3px 0;padding:0 4px;width:auto}.tox .tox-tbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-tbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-tbtn__select-chevron svg{fill:rgba(34,47,62,.5)}.tox .tox-tbtn--bespoke .tox-tbtn__select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:7em}.tox .tox-split-button{border:0;border-radius:3px;box-sizing:border-box;display:flex;margin:2px 0 3px 0;overflow:hidden}.tox .tox-split-button:hover{box-shadow:0 0 0 1px #dee0e2 inset}.tox .tox-split-button:focus{background:#dee0e2;box-shadow:none;color:#222f3e}.tox .tox-split-button>*{border-radius:0}.tox .tox-split-button__chevron{width:16px}.tox .tox-split-button__chevron svg{fill:rgba(34,47,62,.5)}.tox .tox-split-button .tox-tbtn{margin:0}.tox.tox-platform-touch .tox-split-button .tox-tbtn:first-child{width:30px}.tox.tox-platform-touch .tox-split-button__chevron{width:20px}.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus,.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover,.tox .tox-split-button.tox-tbtn--disabled:focus,.tox .tox-split-button.tox-tbtn--disabled:hover{background:0 0;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-toolbar-overlord{background-color:#fff}.tox .tox-toolbar,.tox .tox-toolbar__overflow,.tox .tox-toolbar__primary{background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #fff;background-color:#fff;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 0}.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed{height:0;opacity:0;padding-bottom:0;padding-top:0;visibility:hidden}.tox .tox-toolbar__overflow--growing{transition:height .3s ease,opacity .2s linear .1s}.tox .tox-toolbar__overflow--shrinking{transition:opacity .3s ease,height .2s linear .1s,visibility 0s linear .3s}.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord .tox-toolbar__primary{border-top:1px solid #ccc;margin-top:-1px}.tox .tox-toolbar--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-pop .tox-toolbar{border-width:0}.tox .tox-toolbar--no-divider{background-image:none}.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar-overlord:first-child .tox-toolbar__primary,.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar:first-child{border-top:1px solid #ccc}.tox.tox-tinymce-aux .tox-toolbar__overflow{background-color:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15)}.tox[dir=rtl] .tox-tbtn__icon-rtl svg{transform:rotateY(180deg)}.tox .tox-toolbar__group{align-items:center;display:flex;flex-wrap:wrap;margin:0 0;padding:0 4px 0 4px}.tox .tox-toolbar__group--pull-right{margin-left:auto}.tox .tox-toolbar--scrolling .tox-toolbar__group{flex-shrink:0;flex-wrap:nowrap}.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right:1px solid #ccc}.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left:1px solid #ccc}.tox .tox-tooltip{display:inline-block;padding:8px;position:relative}.tox .tox-tooltip__body{background-color:#222f3e;border-radius:3px;box-shadow:0 2px 4px rgba(34,47,62,.3);color:rgba(255,255,255,.75);font-size:14px;font-style:normal;font-weight:400;padding:4px 8px;text-transform:none}.tox .tox-tooltip__arrow{position:absolute}.tox .tox-tooltip--down .tox-tooltip__arrow{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #222f3e;bottom:0;left:50%;position:absolute;transform:translateX(-50%)}.tox .tox-tooltip--up .tox-tooltip__arrow{border-bottom:8px solid #222f3e;border-left:8px solid transparent;border-right:8px solid transparent;left:50%;position:absolute;top:0;transform:translateX(-50%)}.tox .tox-tooltip--right .tox-tooltip__arrow{border-bottom:8px solid transparent;border-left:8px solid #222f3e;border-top:8px solid transparent;position:absolute;right:0;top:50%;transform:translateY(-50%)}.tox .tox-tooltip--left .tox-tooltip__arrow{border-bottom:8px solid transparent;border-right:8px solid #222f3e;border-top:8px solid transparent;left:0;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-well{border:1px solid #ccc;border-radius:3px;padding:8px;width:100%}.tox .tox-well>:first-child{margin-top:0}.tox .tox-well>:last-child{margin-bottom:0}.tox .tox-well>:only-child{margin:0}.tox .tox-custom-editor{border:1px solid #ccc;border-radius:3px;display:flex;flex:1;position:relative}.tox .tox-dialog-loading::before{background-color:rgba(0,0,0,.5);content:"";height:100%;position:absolute;width:100%;z-index:1000}.tox .tox-tab{cursor:pointer}.tox .tox-dialog__content-js{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-content .tox-collection{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-image-tools-edit-panel{height:60px}.tox .tox-image-tools__sidebar{height:60px}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide/skin.mobile.css
@@ -1,1 +1,674 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+/* RESET all the things! */
+.tinymce-mobile-outer-container {
+  all: initial;
+  display: block;
+}
+.tinymce-mobile-outer-container * {
+  border: 0;
+  box-sizing: initial;
+  cursor: inherit;
+  float: none;
+  line-height: 1;
+  margin: 0;
+  outline: 0;
+  padding: 0;
+  -webkit-tap-highlight-color: transparent;
+  /* TBIO-3691, stop the gray flicker on touch. */
+  text-shadow: none;
+  white-space: nowrap;
+}
+.tinymce-mobile-icon-arrow-back::before {
+  content: "\e5cd";
+}
+.tinymce-mobile-icon-image::before {
+  content: "\e412";
+}
+.tinymce-mobile-icon-cancel-circle::before {
+  content: "\e5c9";
+}
+.tinymce-mobile-icon-full-dot::before {
+  content: "\e061";
+}
+.tinymce-mobile-icon-align-center::before {
+  content: "\e234";
+}
+.tinymce-mobile-icon-align-left::before {
+  content: "\e236";
+}
+.tinymce-mobile-icon-align-right::before {
+  content: "\e237";
+}
+.tinymce-mobile-icon-bold::before {
+  content: "\e238";
+}
+.tinymce-mobile-icon-italic::before {
+  content: "\e23f";
+}
+.tinymce-mobile-icon-unordered-list::before {
+  content: "\e241";
+}
+.tinymce-mobile-icon-ordered-list::before {
+  content: "\e242";
+}
+.tinymce-mobile-icon-font-size::before {
+  content: "\e245";
+}
+.tinymce-mobile-icon-underline::before {
+  content: "\e249";
+}
+.tinymce-mobile-icon-link::before {
+  content: "\e157";
+}
+.tinymce-mobile-icon-unlink::before {
+  content: "\eca2";
+}
+.tinymce-mobile-icon-color::before {
+  content: "\e891";
+}
+.tinymce-mobile-icon-previous::before {
+  content: "\e314";
+}
+.tinymce-mobile-icon-next::before {
+  content: "\e315";
+}
+.tinymce-mobile-icon-large-font::before,
+.tinymce-mobile-icon-style-formats::before {
+  content: "\e264";
+}
+.tinymce-mobile-icon-undo::before {
+  content: "\e166";
+}
+.tinymce-mobile-icon-redo::before {
+  content: "\e15a";
+}
+.tinymce-mobile-icon-removeformat::before {
+  content: "\e239";
+}
+.tinymce-mobile-icon-small-font::before {
+  content: "\e906";
+}
+.tinymce-mobile-icon-readonly-back::before,
+.tinymce-mobile-format-matches::after {
+  content: "\e5ca";
+}
+.tinymce-mobile-icon-small-heading::before {
+  content: "small";
+}
+.tinymce-mobile-icon-large-heading::before {
+  content: "large";
+}
+.tinymce-mobile-icon-small-heading::before,
+.tinymce-mobile-icon-large-heading::before {
+  font-family: sans-serif;
+  font-size: 80%;
+}
+.tinymce-mobile-mask-edit-icon::before {
+  content: "\e254";
+}
+.tinymce-mobile-icon-back::before {
+  content: "\e5c4";
+}
+.tinymce-mobile-icon-heading::before {
+  /* TODO: Translate */
+  content: "Headings";
+  font-family: sans-serif;
+  font-size: 80%;
+  font-weight: bold;
+}
+.tinymce-mobile-icon-h1::before {
+  content: "H1";
+  font-weight: bold;
+}
+.tinymce-mobile-icon-h2::before {
+  content: "H2";
+  font-weight: bold;
+}
+.tinymce-mobile-icon-h3::before {
+  content: "H3";
+  font-weight: bold;
+}
+.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+  background: rgba(51, 51, 51, 0.5);
+  height: 100%;
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container {
+  align-items: center;
+  border-radius: 50%;
+  display: flex;
+  flex-direction: column;
+  font-family: sans-serif;
+  font-size: 1em;
+  justify-content: space-between;
+}
+.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .mixin-menu-item {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+  border-radius: 50%;
+  height: 2.1em;
+  width: 2.1em;
+}
+.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+  flex-direction: column;
+  font-size: 1em;
+}
+@media only screen and (min-device-width:700px) {
+  .tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section {
+    font-size: 1.2em;
+  }
+}
+.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+  border-radius: 50%;
+  height: 2.1em;
+  width: 2.1em;
+  background-color: white;
+  color: #207ab7;
+}
+.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon::before {
+  content: "\e900";
+  font-family: 'tinymce-mobile', sans-serif;
+}
+.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section:not(.tinymce-mobile-mask-tap-icon-selected) .tinymce-mobile-mask-tap-icon {
+  z-index: 2;
+}
+.tinymce-mobile-android-container.tinymce-mobile-android-maximized {
+  background: #ffffff;
+  border: none;
+  bottom: 0;
+  display: flex;
+  flex-direction: column;
+  left: 0;
+  position: fixed;
+  right: 0;
+  top: 0;
+}
+.tinymce-mobile-android-container:not(.tinymce-mobile-android-maximized) {
+  position: relative;
+}
+.tinymce-mobile-android-container .tinymce-mobile-editor-socket {
+  display: flex;
+  flex-grow: 1;
+}
+.tinymce-mobile-android-container .tinymce-mobile-editor-socket iframe {
+  display: flex !important;
+  flex-grow: 1;
+  height: auto !important;
+}
+.tinymce-mobile-android-scroll-reload {
+  overflow: hidden;
+}
+:not(.tinymce-mobile-readonly-mode) > .tinymce-mobile-android-selection-context-toolbar {
+  margin-top: 23px;
+}
+.tinymce-mobile-toolstrip {
+  background: #fff;
+  display: flex;
+  flex: 0 0 auto;
+  z-index: 1;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar {
+  align-items: center;
+  background-color: #fff;
+  border-bottom: 1px solid #cccccc;
+  display: flex;
+  flex: 1;
+  height: 2.5em;
+  width: 100%;
+  /* Make it no larger than the toolstrip, so that it needs to scroll */
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group {
+  align-items: center;
+  display: flex;
+  height: 100%;
+  flex-shrink: 1;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group > div {
+  align-items: center;
+  display: flex;
+  height: 100%;
+  flex: 1;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-exit-container {
+  background: #f44336;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-toolbar-scrollable-group {
+  flex-grow: 1;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item {
+  padding-left: 0.5em;
+  padding-right: 0.5em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button {
+  align-items: center;
+  display: flex;
+  height: 80%;
+  margin-left: 2px;
+  margin-right: 2px;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button.tinymce-mobile-toolbar-button-selected {
+  background: #c8cbcf;
+  color: #cccccc;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:first-of-type,
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:last-of-type {
+  background: #207ab7;
+  color: #eceff1;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar {
+  /* Note, this file is imported inside .tinymce-mobile-context-toolbar, so that prefix is on everything here. */
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group {
+  align-items: center;
+  display: flex;
+  height: 100%;
+  flex: 1;
+  padding-bottom: 0.4em;
+  padding-top: 0.4em;
+  /* Make any buttons appearing on the left and right display in the centre (e.g. color edges) */
+  /* For widgets like the colour picker, use the whole height */
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog {
+  display: flex;
+  min-height: 1.5em;
+  overflow: hidden;
+  padding-left: 0;
+  padding-right: 0;
+  position: relative;
+  width: 100%;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain {
+  display: flex;
+  height: 100%;
+  transition: left cubic-bezier(0.4, 0, 1, 1) 0.15s;
+  width: 100%;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen {
+  display: flex;
+  flex: 0 0 auto;
+  justify-content: space-between;
+  width: 100%;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen input {
+  font-family: Sans-serif;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container {
+  display: flex;
+  flex-grow: 1;
+  position: relative;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container .tinymce-mobile-input-container-x {
+  -ms-grid-row-align: center;
+      align-self: center;
+  background: inherit;
+  border: none;
+  border-radius: 50%;
+  color: #888;
+  font-size: 0.6em;
+  font-weight: bold;
+  height: 100%;
+  padding-right: 2px;
+  position: absolute;
+  right: 0;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container.tinymce-mobile-input-container-empty .tinymce-mobile-input-container-x {
+  display: none;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous,
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next {
+  align-items: center;
+  display: flex;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous::before,
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next::before {
+  align-items: center;
+  display: flex;
+  font-weight: bold;
+  height: 100%;
+  padding-left: 0.5em;
+  padding-right: 0.5em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous.tinymce-mobile-toolbar-navigation-disabled::before,
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next.tinymce-mobile-toolbar-navigation-disabled::before {
+  visibility: hidden;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item {
+  color: #cccccc;
+  font-size: 10px;
+  line-height: 10px;
+  margin: 0 2px;
+  padding-top: 3px;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item.tinymce-mobile-dot-active {
+  color: #c8cbcf;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-font::before,
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-heading::before {
+  margin-left: 0.5em;
+  margin-right: 0.9em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-font::before,
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-heading::before {
+  margin-left: 0.9em;
+  margin-right: 0.5em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider {
+  display: flex;
+  flex: 1;
+  margin-left: 0;
+  margin-right: 0;
+  padding: 0.28em 0;
+  position: relative;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container {
+  align-items: center;
+  display: flex;
+  flex-grow: 1;
+  height: 100%;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container .tinymce-mobile-slider-size-line {
+  background: #cccccc;
+  display: flex;
+  flex: 1;
+  height: 0.2em;
+  margin-bottom: 0.3em;
+  margin-top: 0.3em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container {
+  padding-left: 2em;
+  padding-right: 2em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container {
+  align-items: center;
+  display: flex;
+  flex-grow: 1;
+  height: 100%;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container .tinymce-mobile-slider-gradient {
+  background: linear-gradient(to right, hsl(0, 100%, 50%) 0%, hsl(60, 100%, 50%) 17%, hsl(120, 100%, 50%) 33%, hsl(180, 100%, 50%) 50%, hsl(240, 100%, 50%) 67%, hsl(300, 100%, 50%) 83%, hsl(0, 100%, 50%) 100%);
+  display: flex;
+  flex: 1;
+  height: 0.2em;
+  margin-bottom: 0.3em;
+  margin-top: 0.3em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-black {
+  /* Not part of theming */
+  background: black;
+  height: 0.2em;
+  margin-bottom: 0.3em;
+  margin-top: 0.3em;
+  width: 1.2em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-white {
+  /* Not part of theming */
+  background: white;
+  height: 0.2em;
+  margin-bottom: 0.3em;
+  margin-top: 0.3em;
+  width: 1.2em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb {
+  /* vertically centering trick (margin: auto, top: 0, bottom: 0). On iOS and Safari, if you leave
+     * out these values, then it shows the thumb at the top of the spectrum. This is probably because it is
+     * absolutely positioned with only a left value, and not a top. Note, on Chrome it seems to be fine without
+     * this approach.
+    */
+  align-items: center;
+  background-clip: padding-box;
+  background-color: #455a64;
+  border: 0.5em solid rgba(136, 136, 136, 0);
+  border-radius: 3em;
+  bottom: 0;
+  color: #fff;
+  display: flex;
+  height: 0.5em;
+  justify-content: center;
+  left: -10px;
+  margin: auto;
+  position: absolute;
+  top: 0;
+  transition: border 120ms cubic-bezier(0.39, 0.58, 0.57, 1);
+  width: 0.5em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb.tinymce-mobile-thumb-active {
+  border: 0.5em solid rgba(136, 136, 136, 0.39);
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper,
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group > div {
+  align-items: center;
+  display: flex;
+  height: 100%;
+  flex: 1;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper {
+  flex-direction: column;
+  justify-content: center;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item {
+  align-items: center;
+  display: flex;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item:not(.tinymce-mobile-serialised-dialog) {
+  height: 100%;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-container {
+  display: flex;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input {
+  background: #ffffff;
+  border: none;
+  border-radius: 0;
+  color: #455a64;
+  flex-grow: 1;
+  font-size: 0.85em;
+  padding-bottom: 0.1em;
+  padding-left: 5px;
+  padding-top: 0.1em;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::-webkit-input-placeholder {
+  /* WebKit, Blink, Edge */
+  color: #888;
+}
+.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::placeholder {
+  /* WebKit, Blink, Edge */
+  color: #888;
+}
+/* dropup */
+.tinymce-mobile-dropup {
+  background: white;
+  display: flex;
+  overflow: hidden;
+  width: 100%;
+}
+.tinymce-mobile-dropup.tinymce-mobile-dropup-shrinking {
+  transition: height 0.3s ease-out;
+}
+.tinymce-mobile-dropup.tinymce-mobile-dropup-growing {
+  transition: height 0.3s ease-in;
+}
+.tinymce-mobile-dropup.tinymce-mobile-dropup-closed {
+  flex-grow: 0;
+}
+.tinymce-mobile-dropup.tinymce-mobile-dropup-open:not(.tinymce-mobile-dropup-growing) {
+  flex-grow: 1;
+}
+/* TODO min-height for device size and orientation */
+.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed) {
+  min-height: 200px;
+}
+@media only screen and (orientation: landscape) {
+  .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed) {
+    min-height: 200px;
+  }
+}
+@media only screen and (min-device-width : 320px) and (max-device-width : 568px) and (orientation : landscape) {
+  .tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed) {
+    min-height: 150px;
+  }
+}
+/* styles menu */
+.tinymce-mobile-styles-menu {
+  font-family: sans-serif;
+  outline: 4px solid black;
+  overflow: hidden;
+  position: relative;
+  width: 100%;
+}
+.tinymce-mobile-styles-menu [role="menu"] {
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+  position: absolute;
+  width: 100%;
+}
+.tinymce-mobile-styles-menu [role="menu"].transitioning {
+  transition: transform 0.5s ease-in-out;
+}
+.tinymce-mobile-styles-menu .tinymce-mobile-styles-item {
+  border-bottom: 1px solid #ddd;
+  color: #455a64;
+  cursor: pointer;
+  display: flex;
+  padding: 1em 1em;
+  position: relative;
+}
+.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser .tinymce-mobile-styles-collapse-icon::before {
+  color: #455a64;
+  content: "\e314";
+  font-family: 'tinymce-mobile', sans-serif;
+}
+.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-styles-item-is-menu::after {
+  color: #455a64;
+  content: "\e315";
+  font-family: 'tinymce-mobile', sans-serif;
+  padding-left: 1em;
+  padding-right: 1em;
+  position: absolute;
+  right: 0;
+}
+.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-format-matches::after {
+  font-family: 'tinymce-mobile', sans-serif;
+  padding-left: 1em;
+  padding-right: 1em;
+  position: absolute;
+  right: 0;
+}
+.tinymce-mobile-styles-menu .tinymce-mobile-styles-separator,
+.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser {
+  align-items: center;
+  background: #fff;
+  border-top: #455a64;
+  color: #455a64;
+  display: flex;
+  min-height: 2.5em;
+  padding-left: 1em;
+  padding-right: 1em;
+}
+.tinymce-mobile-styles-menu [data-transitioning-destination="before"][data-transitioning-state],
+.tinymce-mobile-styles-menu [data-transitioning-state="before"] {
+  transform: translate(-100%);
+}
+.tinymce-mobile-styles-menu [data-transitioning-destination="current"][data-transitioning-state],
+.tinymce-mobile-styles-menu [data-transitioning-state="current"] {
+  transform: translate(0%);
+}
+.tinymce-mobile-styles-menu [data-transitioning-destination="after"][data-transitioning-state],
+.tinymce-mobile-styles-menu [data-transitioning-state="after"] {
+  transform: translate(100%);
+}
+@font-face {
+  font-family: 'tinymce-mobile';
+  font-style: normal;
+  font-weight: normal;
+  src: url('fonts/tinymce-mobile.woff?8x92w3') format('woff');
+}
+@media (min-device-width: 700px) {
+  .tinymce-mobile-outer-container,
+  .tinymce-mobile-outer-container input {
+    font-size: 25px;
+  }
+}
+@media (max-device-width: 700px) {
+  .tinymce-mobile-outer-container,
+  .tinymce-mobile-outer-container input {
+    font-size: 18px;
+  }
+}
+.tinymce-mobile-icon {
+  font-family: 'tinymce-mobile', sans-serif;
+}
+.mixin-flex-and-centre {
+  align-items: center;
+  display: flex;
+  justify-content: center;
+}
+.mixin-flex-bar {
+  align-items: center;
+  display: flex;
+  height: 100%;
+}
+.tinymce-mobile-outer-container .tinymce-mobile-editor-socket iframe {
+  background-color: #fff;
+  width: 100%;
+}
+.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon {
+  /* Note, on the iPod touch in landscape, this isn't visible when the navbar appears */
+  background-color: #207ab7;
+  border-radius: 50%;
+  bottom: 1em;
+  color: white;
+  font-size: 1em;
+  height: 2.1em;
+  position: fixed;
+  right: 2em;
+  width: 2.1em;
+  align-items: center;
+  display: flex;
+  justify-content: center;
+}
+@media only screen and (min-device-width:700px) {
+  .tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon {
+    font-size: 1.2em;
+  }
+}
+.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket {
+  height: 300px;
+  overflow: hidden;
+}
+.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket iframe {
+  height: 100%;
+}
+.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-toolstrip {
+  display: none;
+}
+/*
+  Note, that if you don't include this (::-webkit-file-upload-button), the toolbar width gets
+  increased and the whole body becomes scrollable. It's important!
+ */
+input[type="file"]::-webkit-file-upload-button {
+  display: none;
+}
+@media only screen and (min-device-width : 320px) and (max-device-width : 568px) and (orientation : landscape) {
+  .tinymce-mobile-ios-container .tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon {
+    bottom: 50%;
+  }
+}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/skins/ui/oxide/skin.mobile.min.css
@@ -1,1 +1,8 @@
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ */
+.tinymce-mobile-outer-container{all:initial;display:block}.tinymce-mobile-outer-container *{border:0;box-sizing:initial;cursor:inherit;float:none;line-height:1;margin:0;outline:0;padding:0;-webkit-tap-highlight-color:transparent;text-shadow:none;white-space:nowrap}.tinymce-mobile-icon-arrow-back::before{content:"\e5cd"}.tinymce-mobile-icon-image::before{content:"\e412"}.tinymce-mobile-icon-cancel-circle::before{content:"\e5c9"}.tinymce-mobile-icon-full-dot::before{content:"\e061"}.tinymce-mobile-icon-align-center::before{content:"\e234"}.tinymce-mobile-icon-align-left::before{content:"\e236"}.tinymce-mobile-icon-align-right::before{content:"\e237"}.tinymce-mobile-icon-bold::before{content:"\e238"}.tinymce-mobile-icon-italic::before{content:"\e23f"}.tinymce-mobile-icon-unordered-list::before{content:"\e241"}.tinymce-mobile-icon-ordered-list::before{content:"\e242"}.tinymce-mobile-icon-font-size::before{content:"\e245"}.tinymce-mobile-icon-underline::before{content:"\e249"}.tinymce-mobile-icon-link::before{content:"\e157"}.tinymce-mobile-icon-unlink::before{content:"\eca2"}.tinymce-mobile-icon-color::before{content:"\e891"}.tinymce-mobile-icon-previous::before{content:"\e314"}.tinymce-mobile-icon-next::before{content:"\e315"}.tinymce-mobile-icon-large-font::before,.tinymce-mobile-icon-style-formats::before{content:"\e264"}.tinymce-mobile-icon-undo::before{content:"\e166"}.tinymce-mobile-icon-redo::before{content:"\e15a"}.tinymce-mobile-icon-removeformat::before{content:"\e239"}.tinymce-mobile-icon-small-font::before{content:"\e906"}.tinymce-mobile-format-matches::after,.tinymce-mobile-icon-readonly-back::before{content:"\e5ca"}.tinymce-mobile-icon-small-heading::before{content:"small"}.tinymce-mobile-icon-large-heading::before{content:"large"}.tinymce-mobile-icon-large-heading::before,.tinymce-mobile-icon-small-heading::before{font-family:sans-serif;font-size:80%}.tinymce-mobile-mask-edit-icon::before{content:"\e254"}.tinymce-mobile-icon-back::before{content:"\e5c4"}.tinymce-mobile-icon-heading::before{content:"Headings";font-family:sans-serif;font-size:80%;font-weight:700}.tinymce-mobile-icon-h1::before{content:"H1";font-weight:700}.tinymce-mobile-icon-h2::before{content:"H2";font-weight:700}.tinymce-mobile-icon-h3::before{content:"H3";font-weight:700}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask{align-items:center;display:flex;justify-content:center;background:rgba(51,51,51,.5);height:100%;position:absolute;top:0;width:100%}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container{align-items:center;border-radius:50%;display:flex;flex-direction:column;font-family:sans-serif;font-size:1em;justify-content:space-between}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .mixin-menu-item{align-items:center;display:flex;justify-content:center;border-radius:50%;height:2.1em;width:2.1em}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section{align-items:center;display:flex;justify-content:center;flex-direction:column;font-size:1em}@media only screen and (min-device-width:700px){.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section{font-size:1.2em}}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon{align-items:center;display:flex;justify-content:center;border-radius:50%;height:2.1em;width:2.1em;background-color:#fff;color:#207ab7}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon::before{content:"\e900";font-family:tinymce-mobile,sans-serif}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section:not(.tinymce-mobile-mask-tap-icon-selected) .tinymce-mobile-mask-tap-icon{z-index:2}.tinymce-mobile-android-container.tinymce-mobile-android-maximized{background:#fff;border:none;bottom:0;display:flex;flex-direction:column;left:0;position:fixed;right:0;top:0}.tinymce-mobile-android-container:not(.tinymce-mobile-android-maximized){position:relative}.tinymce-mobile-android-container .tinymce-mobile-editor-socket{display:flex;flex-grow:1}.tinymce-mobile-android-container .tinymce-mobile-editor-socket iframe{display:flex!important;flex-grow:1;height:auto!important}.tinymce-mobile-android-scroll-reload{overflow:hidden}:not(.tinymce-mobile-readonly-mode)>.tinymce-mobile-android-selection-context-toolbar{margin-top:23px}.tinymce-mobile-toolstrip{background:#fff;display:flex;flex:0 0 auto;z-index:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar{align-items:center;background-color:#fff;border-bottom:1px solid #ccc;display:flex;flex:1;height:2.5em;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group{align-items:center;display:flex;height:100%;flex-shrink:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group>div{align-items:center;display:flex;height:100%;flex:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-exit-container{background:#f44336}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-toolbar-scrollable-group{flex-grow:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item{padding-left:.5em;padding-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button{align-items:center;display:flex;height:80%;margin-left:2px;margin-right:2px}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button.tinymce-mobile-toolbar-button-selected{background:#c8cbcf;color:#ccc}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:first-of-type,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:last-of-type{background:#207ab7;color:#eceff1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group{align-items:center;display:flex;height:100%;flex:1;padding-bottom:.4em;padding-top:.4em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog{display:flex;min-height:1.5em;overflow:hidden;padding-left:0;padding-right:0;position:relative;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain{display:flex;height:100%;transition:left cubic-bezier(.4,0,1,1) .15s;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen{display:flex;flex:0 0 auto;justify-content:space-between;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen input{font-family:Sans-serif}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container{display:flex;flex-grow:1;position:relative}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container .tinymce-mobile-input-container-x{-ms-grid-row-align:center;align-self:center;background:inherit;border:none;border-radius:50%;color:#888;font-size:.6em;font-weight:700;height:100%;padding-right:2px;position:absolute;right:0}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container.tinymce-mobile-input-container-empty .tinymce-mobile-input-container-x{display:none}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous{align-items:center;display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous::before{align-items:center;display:flex;font-weight:700;height:100%;padding-left:.5em;padding-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next.tinymce-mobile-toolbar-navigation-disabled::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous.tinymce-mobile-toolbar-navigation-disabled::before{visibility:hidden}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item{color:#ccc;font-size:10px;line-height:10px;margin:0 2px;padding-top:3px}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item.tinymce-mobile-dot-active{color:#c8cbcf}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-font::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-heading::before{margin-left:.5em;margin-right:.9em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-font::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-heading::before{margin-left:.9em;margin-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider{display:flex;flex:1;margin-left:0;margin-right:0;padding:.28em 0;position:relative}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container{align-items:center;display:flex;flex-grow:1;height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container .tinymce-mobile-slider-size-line{background:#ccc;display:flex;flex:1;height:.2em;margin-bottom:.3em;margin-top:.3em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container{padding-left:2em;padding-right:2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container{align-items:center;display:flex;flex-grow:1;height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container .tinymce-mobile-slider-gradient{background:linear-gradient(to right,red 0,#feff00 17%,#0f0 33%,#00feff 50%,#00f 67%,#ff00fe 83%,red 100%);display:flex;flex:1;height:.2em;margin-bottom:.3em;margin-top:.3em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-black{background:#000;height:.2em;margin-bottom:.3em;margin-top:.3em;width:1.2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-white{background:#fff;height:.2em;margin-bottom:.3em;margin-top:.3em;width:1.2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb{align-items:center;background-clip:padding-box;background-color:#455a64;border:.5em solid rgba(136,136,136,0);border-radius:3em;bottom:0;color:#fff;display:flex;height:.5em;justify-content:center;left:-10px;margin:auto;position:absolute;top:0;transition:border 120ms cubic-bezier(.39,.58,.57,1);width:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb.tinymce-mobile-thumb-active{border:.5em solid rgba(136,136,136,.39)}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group>div{align-items:center;display:flex;height:100%;flex:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper{flex-direction:column;justify-content:center}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item{align-items:center;display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item:not(.tinymce-mobile-serialised-dialog){height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-container{display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input{background:#fff;border:none;border-radius:0;color:#455a64;flex-grow:1;font-size:.85em;padding-bottom:.1em;padding-left:5px;padding-top:.1em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::-webkit-input-placeholder{color:#888}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::placeholder{color:#888}.tinymce-mobile-dropup{background:#fff;display:flex;overflow:hidden;width:100%}.tinymce-mobile-dropup.tinymce-mobile-dropup-shrinking{transition:height .3s ease-out}.tinymce-mobile-dropup.tinymce-mobile-dropup-growing{transition:height .3s ease-in}.tinymce-mobile-dropup.tinymce-mobile-dropup-closed{flex-grow:0}.tinymce-mobile-dropup.tinymce-mobile-dropup-open:not(.tinymce-mobile-dropup-growing){flex-grow:1}.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:200px}@media only screen and (orientation:landscape){.tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:200px}}@media only screen and (min-device-width :320px) and (max-device-width :568px) and (orientation :landscape){.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:150px}}.tinymce-mobile-styles-menu{font-family:sans-serif;outline:4px solid #000;overflow:hidden;position:relative;width:100%}.tinymce-mobile-styles-menu [role=menu]{display:flex;flex-direction:column;height:100%;position:absolute;width:100%}.tinymce-mobile-styles-menu [role=menu].transitioning{transition:transform .5s ease-in-out}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item{border-bottom:1px solid #ddd;color:#455a64;cursor:pointer;display:flex;padding:1em 1em;position:relative}.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser .tinymce-mobile-styles-collapse-icon::before{color:#455a64;content:"\e314";font-family:tinymce-mobile,sans-serif}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-styles-item-is-menu::after{color:#455a64;content:"\e315";font-family:tinymce-mobile,sans-serif;padding-left:1em;padding-right:1em;position:absolute;right:0}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-format-matches::after{font-family:tinymce-mobile,sans-serif;padding-left:1em;padding-right:1em;position:absolute;right:0}.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser,.tinymce-mobile-styles-menu .tinymce-mobile-styles-separator{align-items:center;background:#fff;border-top:#455a64;color:#455a64;display:flex;min-height:2.5em;padding-left:1em;padding-right:1em}.tinymce-mobile-styles-menu [data-transitioning-destination=before][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=before]{transform:translate(-100%)}.tinymce-mobile-styles-menu [data-transitioning-destination=current][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=current]{transform:translate(0)}.tinymce-mobile-styles-menu [data-transitioning-destination=after][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=after]{transform:translate(100%)}@font-face{font-family:tinymce-mobile;font-style:normal;font-weight:400;src:url(fonts/tinymce-mobile.woff?8x92w3) format('woff')}@media (min-device-width:700px){.tinymce-mobile-outer-container,.tinymce-mobile-outer-container input{font-size:25px}}@media (max-device-width:700px){.tinymce-mobile-outer-container,.tinymce-mobile-outer-container input{font-size:18px}}.tinymce-mobile-icon{font-family:tinymce-mobile,sans-serif}.mixin-flex-and-centre{align-items:center;display:flex;justify-content:center}.mixin-flex-bar{align-items:center;display:flex;height:100%}.tinymce-mobile-outer-container .tinymce-mobile-editor-socket iframe{background-color:#fff;width:100%}.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{background-color:#207ab7;border-radius:50%;bottom:1em;color:#fff;font-size:1em;height:2.1em;position:fixed;right:2em;width:2.1em;align-items:center;display:flex;justify-content:center}@media only screen and (min-device-width:700px){.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{font-size:1.2em}}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket{height:300px;overflow:hidden}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket iframe{height:100%}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-toolstrip{display:none}input[type=file]::-webkit-file-upload-button{display:none}@media only screen and (min-device-width :320px) and (max-device-width :568px) and (orientation :landscape){.tinymce-mobile-ios-container .tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{bottom:50%}}
 

--- /dev/null
+++ b/tinymce/5/js/tinymce/themes/mobile/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "mobile" theme for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/themes/mobile')
+//   ES2015:
+//     import 'tinymce/themes/mobile'
+require('./theme.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/themes/mobile/theme.js
@@ -1,1 +1,13541 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+    function __rest(s, e) {
+      var t = {};
+      for (var p in s)
+        if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+          t[p] = s[p];
+      if (s != null && typeof Object.getOwnPropertySymbols === 'function')
+        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+          if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+            t[p[i]] = s[p[i]];
+        }
+      return t;
+    }
+    function __spreadArrays() {
+      for (var s = 0, i = 0, il = arguments.length; i < il; i++)
+        s += arguments[i].length;
+      for (var r = Array(s), k = 0, i = 0; i < il; i++)
+        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
+          r[k] = a[j];
+      return r;
+    }
+
+    var noop = function () {
+    };
+    var compose = function (fa, fb) {
+      return function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        return fa(fb.apply(null, args));
+      };
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var identity = function (x) {
+      return x;
+    };
+    function curry(fn) {
+      var initialArgs = [];
+      for (var _i = 1; _i < arguments.length; _i++) {
+        initialArgs[_i - 1] = arguments[_i];
+      }
+      return function () {
+        var restArgs = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          restArgs[_i] = arguments[_i];
+        }
+        var all = initialArgs.concat(restArgs);
+        return fn.apply(null, all);
+      };
+    }
+    var not = function (f) {
+      return function (t) {
+        return !f(t);
+      };
+    };
+    var die = function (msg) {
+      return function () {
+        throw new Error(msg);
+      };
+    };
+    var apply = function (f) {
+      return f();
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var keys = Object.keys;
+    var hasOwnProperty = Object.hasOwnProperty;
+    var each = function (obj, f) {
+      var props = keys(obj);
+      for (var k = 0, len = props.length; k < len; k++) {
+        var i = props[k];
+        var x = obj[i];
+        f(x, i);
+      }
+    };
+    var map = function (obj, f) {
+      return tupleMap(obj, function (x, i) {
+        return {
+          k: i,
+          v: f(x, i)
+        };
+      });
+    };
+    var tupleMap = function (obj, f) {
+      var r = {};
+      each(obj, function (x, i) {
+        var tuple = f(x, i);
+        r[tuple.k] = tuple.v;
+      });
+      return r;
+    };
+    var objAcc = function (r) {
+      return function (x, i) {
+        r[i] = x;
+      };
+    };
+    var internalFilter = function (obj, pred, onTrue, onFalse) {
+      var r = {};
+      each(obj, function (x, i) {
+        (pred(x, i) ? onTrue : onFalse)(x, i);
+      });
+      return r;
+    };
+    var filter = function (obj, pred) {
+      var t = {};
+      internalFilter(obj, pred, objAcc(t), noop);
+      return t;
+    };
+    var mapToArray = function (obj, f) {
+      var r = [];
+      each(obj, function (value, name) {
+        r.push(f(value, name));
+      });
+      return r;
+    };
+    var find = function (obj, pred) {
+      var props = keys(obj);
+      for (var k = 0, len = props.length; k < len; k++) {
+        var i = props[k];
+        var x = obj[i];
+        if (pred(x, i, obj)) {
+          return Option.some(x);
+        }
+      }
+      return Option.none();
+    };
+    var values = function (obj) {
+      return mapToArray(obj, function (v) {
+        return v;
+      });
+    };
+    var get = function (obj, key) {
+      return has(obj, key) ? Option.from(obj[key]) : Option.none();
+    };
+    var has = function (obj, key) {
+      return hasOwnProperty.call(obj, key);
+    };
+    var hasNonNullableKey = function (obj, key) {
+      return has(obj, key) && obj[key] !== undefined && obj[key] !== null;
+    };
+
+    var cached = function (f) {
+      var called = false;
+      var r;
+      return function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (!called) {
+          called = true;
+          r = f.apply(null, args);
+        }
+        return r;
+      };
+    };
+
+    var firstMatch = function (regexes, s) {
+      for (var i = 0; i < regexes.length; i++) {
+        var x = regexes[i];
+        if (x.test(s)) {
+          return x;
+        }
+      }
+      return undefined;
+    };
+    var find$1 = function (regexes, agent) {
+      var r = firstMatch(regexes, agent);
+      if (!r) {
+        return {
+          major: 0,
+          minor: 0
+        };
+      }
+      var group = function (i) {
+        return Number(agent.replace(r, '$' + i));
+      };
+      return nu(group(1), group(2));
+    };
+    var detect = function (versionRegexes, agent) {
+      var cleanedAgent = String(agent).toLowerCase();
+      if (versionRegexes.length === 0) {
+        return unknown();
+      }
+      return find$1(versionRegexes, cleanedAgent);
+    };
+    var unknown = function () {
+      return nu(0, 0);
+    };
+    var nu = function (major, minor) {
+      return {
+        major: major,
+        minor: minor
+      };
+    };
+    var Version = {
+      nu: nu,
+      detect: detect,
+      unknown: unknown
+    };
+
+    var edge = 'Edge';
+    var chrome = 'Chrome';
+    var ie = 'IE';
+    var opera = 'Opera';
+    var firefox = 'Firefox';
+    var safari = 'Safari';
+    var unknown$1 = function () {
+      return nu$1({
+        current: undefined,
+        version: Version.unknown()
+      });
+    };
+    var nu$1 = function (info) {
+      var current = info.current;
+      var version = info.version;
+      var isBrowser = function (name) {
+        return function () {
+          return current === name;
+        };
+      };
+      return {
+        current: current,
+        version: version,
+        isEdge: isBrowser(edge),
+        isChrome: isBrowser(chrome),
+        isIE: isBrowser(ie),
+        isOpera: isBrowser(opera),
+        isFirefox: isBrowser(firefox),
+        isSafari: isBrowser(safari)
+      };
+    };
+    var Browser = {
+      unknown: unknown$1,
+      nu: nu$1,
+      edge: constant(edge),
+      chrome: constant(chrome),
+      ie: constant(ie),
+      opera: constant(opera),
+      firefox: constant(firefox),
+      safari: constant(safari)
+    };
+
+    var windows = 'Windows';
+    var ios = 'iOS';
+    var android = 'Android';
+    var linux = 'Linux';
+    var osx = 'OSX';
+    var solaris = 'Solaris';
+    var freebsd = 'FreeBSD';
+    var chromeos = 'ChromeOS';
+    var unknown$2 = function () {
+      return nu$2({
+        current: undefined,
+        version: Version.unknown()
+      });
+    };
+    var nu$2 = function (info) {
+      var current = info.current;
+      var version = info.version;
+      var isOS = function (name) {
+        return function () {
+          return current === name;
+        };
+      };
+      return {
+        current: current,
+        version: version,
+        isWindows: isOS(windows),
+        isiOS: isOS(ios),
+        isAndroid: isOS(android),
+        isOSX: isOS(osx),
+        isLinux: isOS(linux),
+        isSolaris: isOS(solaris),
+        isFreeBSD: isOS(freebsd),
+        isChromeOS: isOS(chromeos)
+      };
+    };
+    var OperatingSystem = {
+      unknown: unknown$2,
+      nu: nu$2,
+      windows: constant(windows),
+      ios: constant(ios),
+      android: constant(android),
+      linux: constant(linux),
+      osx: constant(osx),
+      solaris: constant(solaris),
+      freebsd: constant(freebsd),
+      chromeos: constant(chromeos)
+    };
+
+    var DeviceType = function (os, browser, userAgent, mediaMatch) {
+      var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
+      var isiPhone = os.isiOS() && !isiPad;
+      var isMobile = os.isiOS() || os.isAndroid();
+      var isTouch = isMobile || mediaMatch('(pointer:coarse)');
+      var isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');
+      var isPhone = isiPhone || isMobile && !isTablet;
+      var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
+      var isDesktop = !isPhone && !isTablet && !iOSwebview;
+      return {
+        isiPad: constant(isiPad),
+        isiPhone: constant(isiPhone),
+        isTablet: constant(isTablet),
+        isPhone: constant(isPhone),
+        isTouch: constant(isTouch),
+        isAndroid: os.isAndroid,
+        isiOS: os.isiOS,
+        isWebView: constant(iOSwebview),
+        isDesktop: constant(isDesktop)
+      };
+    };
+
+    var typeOf = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf(value) === type;
+      };
+    };
+    var isSimpleType = function (type) {
+      return function (value) {
+        return typeof value === type;
+      };
+    };
+    var isString = isType('string');
+    var isObject = isType('object');
+    var isArray = isType('array');
+    var isBoolean = isSimpleType('boolean');
+    var isFunction = isSimpleType('function');
+    var isNumber = isSimpleType('number');
+
+    var nativeSlice = Array.prototype.slice;
+    var nativeIndexOf = Array.prototype.indexOf;
+    var nativePush = Array.prototype.push;
+    var rawIndexOf = function (ts, t) {
+      return nativeIndexOf.call(ts, t);
+    };
+    var contains = function (xs, x) {
+      return rawIndexOf(xs, x) > -1;
+    };
+    var exists = function (xs, pred) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return true;
+        }
+      }
+      return false;
+    };
+    var map$1 = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var each$1 = function (xs, f) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var eachr = function (xs, f) {
+      for (var i = xs.length - 1; i >= 0; i--) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var filter$1 = function (xs, pred) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          r.push(x);
+        }
+      }
+      return r;
+    };
+    var foldr = function (xs, f, acc) {
+      eachr(xs, function (x) {
+        acc = f(acc, x);
+      });
+      return acc;
+    };
+    var foldl = function (xs, f, acc) {
+      each$1(xs, function (x) {
+        acc = f(acc, x);
+      });
+      return acc;
+    };
+    var findUntil = function (xs, pred, until) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return Option.some(x);
+        } else if (until(x, i)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var find$2 = function (xs, pred) {
+      return findUntil(xs, pred, never);
+    };
+    var findIndex = function (xs, pred) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return Option.some(i);
+        }
+      }
+      return Option.none();
+    };
+    var flatten = function (xs) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        if (!isArray(xs[i])) {
+          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
+        }
+        nativePush.apply(r, xs[i]);
+      }
+      return r;
+    };
+    var bind = function (xs, f) {
+      return flatten(map$1(xs, f));
+    };
+    var forall = function (xs, pred) {
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        var x = xs[i];
+        if (pred(x, i) !== true) {
+          return false;
+        }
+      }
+      return true;
+    };
+    var reverse = function (xs) {
+      var r = nativeSlice.call(xs, 0);
+      r.reverse();
+      return r;
+    };
+    var difference = function (a1, a2) {
+      return filter$1(a1, function (x) {
+        return !contains(a2, x);
+      });
+    };
+    var pure = function (x) {
+      return [x];
+    };
+    var sort = function (xs, comparator) {
+      var copy = nativeSlice.call(xs, 0);
+      copy.sort(comparator);
+      return copy;
+    };
+    var findMap = function (arr, f) {
+      for (var i = 0; i < arr.length; i++) {
+        var r = f(arr[i], i);
+        if (r.isSome()) {
+          return r;
+        }
+      }
+      return Option.none();
+    };
+
+    var detect$1 = function (candidates, userAgent) {
+      var agent = String(userAgent).toLowerCase();
+      return find$2(candidates, function (candidate) {
+        return candidate.search(agent);
+      });
+    };
+    var detectBrowser = function (browsers, userAgent) {
+      return detect$1(browsers, userAgent).map(function (browser) {
+        var version = Version.detect(browser.versionRegexes, userAgent);
+        return {
+          current: browser.name,
+          version: version
+        };
+      });
+    };
+    var detectOs = function (oses, userAgent) {
+      return detect$1(oses, userAgent).map(function (os) {
+        var version = Version.detect(os.versionRegexes, userAgent);
+        return {
+          current: os.name,
+          version: version
+        };
+      });
+    };
+    var UaString = {
+      detectBrowser: detectBrowser,
+      detectOs: detectOs
+    };
+
+    var checkRange = function (str, substr, start) {
+      return substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
+    };
+    var supplant = function (str, obj) {
+      var isStringOrNumber = function (a) {
+        var t = typeof a;
+        return t === 'string' || t === 'number';
+      };
+      return str.replace(/\$\{([^{}]*)\}/g, function (fullMatch, key) {
+        var value = obj[key];
+        return isStringOrNumber(value) ? value.toString() : fullMatch;
+      });
+    };
+    var contains$1 = function (str, substr) {
+      return str.indexOf(substr) !== -1;
+    };
+    var endsWith = function (str, suffix) {
+      return checkRange(str, suffix, str.length - suffix.length);
+    };
+    var blank = function (r) {
+      return function (s) {
+        return s.replace(r, '');
+      };
+    };
+    var trim = blank(/^\s+|\s+$/g);
+
+    var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
+    var checkContains = function (target) {
+      return function (uastring) {
+        return contains$1(uastring, target);
+      };
+    };
+    var browsers = [
+      {
+        name: 'Edge',
+        versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
+        search: function (uastring) {
+          return contains$1(uastring, 'edge/') && contains$1(uastring, 'chrome') && contains$1(uastring, 'safari') && contains$1(uastring, 'applewebkit');
+        }
+      },
+      {
+        name: 'Chrome',
+        versionRegexes: [
+          /.*?chrome\/([0-9]+)\.([0-9]+).*/,
+          normalVersionRegex
+        ],
+        search: function (uastring) {
+          return contains$1(uastring, 'chrome') && !contains$1(uastring, 'chromeframe');
+        }
+      },
+      {
+        name: 'IE',
+        versionRegexes: [
+          /.*?msie\ ?([0-9]+)\.([0-9]+).*/,
+          /.*?rv:([0-9]+)\.([0-9]+).*/
+        ],
+        search: function (uastring) {
+          return contains$1(uastring, 'msie') || contains$1(uastring, 'trident');
+        }
+      },
+      {
+        name: 'Opera',
+        versionRegexes: [
+          normalVersionRegex,
+          /.*?opera\/([0-9]+)\.([0-9]+).*/
+        ],
+        search: checkContains('opera')
+      },
+      {
+        name: 'Firefox',
+        versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
+        search: checkContains('firefox')
+      },
+      {
+        name: 'Safari',
+        versionRegexes: [
+          normalVersionRegex,
+          /.*?cpu os ([0-9]+)_([0-9]+).*/
+        ],
+        search: function (uastring) {
+          return (contains$1(uastring, 'safari') || contains$1(uastring, 'mobile/')) && contains$1(uastring, 'applewebkit');
+        }
+      }
+    ];
+    var oses = [
+      {
+        name: 'Windows',
+        search: checkContains('win'),
+        versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
+      },
+      {
+        name: 'iOS',
+        search: function (uastring) {
+          return contains$1(uastring, 'iphone') || contains$1(uastring, 'ipad');
+        },
+        versionRegexes: [
+          /.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
+          /.*cpu os ([0-9]+)_([0-9]+).*/,
+          /.*cpu iphone os ([0-9]+)_([0-9]+).*/
+        ]
+      },
+      {
+        name: 'Android',
+        search: checkContains('android'),
+        versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
+      },
+      {
+        name: 'OSX',
+        search: checkContains('mac os x'),
+        versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]
+      },
+      {
+        name: 'Linux',
+        search: checkContains('linux'),
+        versionRegexes: []
+      },
+      {
+        name: 'Solaris',
+        search: checkContains('sunos'),
+        versionRegexes: []
+      },
+      {
+        name: 'FreeBSD',
+        search: checkContains('freebsd'),
+        versionRegexes: []
+      },
+      {
+        name: 'ChromeOS',
+        search: checkContains('cros'),
+        versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/]
+      }
+    ];
+    var PlatformInfo = {
+      browsers: constant(browsers),
+      oses: constant(oses)
+    };
+
+    var detect$2 = function (userAgent, mediaMatch) {
+      var browsers = PlatformInfo.browsers();
+      var oses = PlatformInfo.oses();
+      var browser = UaString.detectBrowser(browsers, userAgent).fold(Browser.unknown, Browser.nu);
+      var os = UaString.detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
+      var deviceType = DeviceType(os, browser, userAgent, mediaMatch);
+      return {
+        browser: browser,
+        os: os,
+        deviceType: deviceType
+      };
+    };
+    var PlatformDetection = { detect: detect$2 };
+
+    var mediaMatch = function (query) {
+      return domGlobals.window.matchMedia(query).matches;
+    };
+    var platform = cached(function () {
+      return PlatformDetection.detect(domGlobals.navigator.userAgent, mediaMatch);
+    });
+    var detect$3 = function () {
+      return platform();
+    };
+
+    var touchstart = constant('touchstart');
+    var touchmove = constant('touchmove');
+    var touchend = constant('touchend');
+    var mousedown = constant('mousedown');
+    var mousemove = constant('mousemove');
+    var mouseup = constant('mouseup');
+    var mouseover = constant('mouseover');
+    var keydown = constant('keydown');
+    var keyup = constant('keyup');
+    var input = constant('input');
+    var change = constant('change');
+    var click = constant('click');
+    var transitionend = constant('transitionend');
+    var selectstart = constant('selectstart');
+
+    var alloy = { tap: constant('alloy.tap') };
+    var focus = constant('alloy.focus');
+    var postBlur = constant('alloy.blur.post');
+    var postPaste = constant('alloy.paste.post');
+    var receive = constant('alloy.receive');
+    var execute = constant('alloy.execute');
+    var focusItem = constant('alloy.focus.item');
+    var tap = alloy.tap;
+    var longpress = constant('alloy.longpress');
+    var systemInit = constant('alloy.system.init');
+    var attachedToDom = constant('alloy.system.attached');
+    var detachedFromDom = constant('alloy.system.detached');
+    var focusShifted = constant('alloy.focusmanager.shifted');
+    var highlight = constant('alloy.highlight');
+    var dehighlight = constant('alloy.dehighlight');
+
+    var emit = function (component, event) {
+      dispatchWith(component, component.element(), event, {});
+    };
+    var emitWith = function (component, event, properties) {
+      dispatchWith(component, component.element(), event, properties);
+    };
+    var emitExecute = function (component) {
+      emit(component, execute());
+    };
+    var dispatch = function (component, target, event) {
+      dispatchWith(component, target, event, {});
+    };
+    var dispatchWith = function (component, target, event, properties) {
+      var data = __assign({ target: target }, properties);
+      component.getSystem().triggerEvent(event, target, map(data, constant));
+    };
+    var dispatchEvent = function (component, target, event, simulatedEvent) {
+      component.getSystem().triggerEvent(event, target, simulatedEvent.event());
+    };
+    var dispatchFocus = function (component, target) {
+      component.getSystem().triggerFocus(target, component.element());
+    };
+
+    var fromHtml = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      if (!div.hasChildNodes() || div.childNodes.length > 1) {
+        domGlobals.console.error('HTML does not have a single root node', html);
+        throw new Error('HTML must have a single root node');
+      }
+      return fromDom(div.childNodes[0]);
+    };
+    var fromTag = function (tag, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createElement(tag);
+      return fromDom(node);
+    };
+    var fromText = function (text, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createTextNode(text);
+      return fromDom(node);
+    };
+    var fromDom = function (node) {
+      if (node === null || node === undefined) {
+        throw new Error('Node cannot be null or undefined');
+      }
+      return { dom: constant(node) };
+    };
+    var fromPoint = function (docElm, x, y) {
+      var doc = docElm.dom();
+      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
+    };
+    var Element = {
+      fromHtml: fromHtml,
+      fromTag: fromTag,
+      fromText: fromText,
+      fromDom: fromDom,
+      fromPoint: fromPoint
+    };
+
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
+
+    var DOCUMENT = 9;
+    var ELEMENT = 1;
+    var TEXT = 3;
+
+    var name = function (element) {
+      var r = element.dom().nodeName;
+      return r.toLowerCase();
+    };
+    var type = function (element) {
+      return element.dom().nodeType;
+    };
+    var isType$1 = function (t) {
+      return function (element) {
+        return type(element) === t;
+      };
+    };
+    var isElement = isType$1(ELEMENT);
+    var isText = isType$1(TEXT);
+
+    var inBody = function (element) {
+      var dom = isText(element) ? element.dom().parentNode : element.dom();
+      return dom !== undefined && dom !== null && dom.ownerDocument.body.contains(dom);
+    };
+    var body = function () {
+      return getBody(Element.fromDom(domGlobals.document));
+    };
+    var getBody = function (doc) {
+      var b = doc.dom().body;
+      if (b === null || b === undefined) {
+        throw new Error('Body is not available yet');
+      }
+      return Element.fromDom(b);
+    };
+
+    var ELEMENT$1 = ELEMENT;
+    var DOCUMENT$1 = DOCUMENT;
+    var is = function (element, selector) {
+      var dom = element.dom();
+      if (dom.nodeType !== ELEMENT$1) {
+        return false;
+      } else {
+        var elem = dom;
+        if (elem.matches !== undefined) {
+          return elem.matches(selector);
+        } else if (elem.msMatchesSelector !== undefined) {
+          return elem.msMatchesSelector(selector);
+        } else if (elem.webkitMatchesSelector !== undefined) {
+          return elem.webkitMatchesSelector(selector);
+        } else if (elem.mozMatchesSelector !== undefined) {
+          return elem.mozMatchesSelector(selector);
+        } else {
+          throw new Error('Browser lacks native selectors');
+        }
+      }
+    };
+    var bypassSelector = function (dom) {
+      return dom.nodeType !== ELEMENT$1 && dom.nodeType !== DOCUMENT$1 || dom.childElementCount === 0;
+    };
+    var all = function (selector, scope) {
+      var base = scope === undefined ? domGlobals.document : scope.dom();
+      return bypassSelector(base) ? [] : map$1(base.querySelectorAll(selector), Element.fromDom);
+    };
+    var one = function (selector, scope) {
+      var base = scope === undefined ? domGlobals.document : scope.dom();
+      return bypassSelector(base) ? Option.none() : Option.from(base.querySelector(selector)).map(Element.fromDom);
+    };
+
+    var eq = function (e1, e2) {
+      return e1.dom() === e2.dom();
+    };
+
+    var owner = function (element) {
+      return Element.fromDom(element.dom().ownerDocument);
+    };
+    var defaultView = function (element) {
+      return Element.fromDom(element.dom().ownerDocument.defaultView);
+    };
+    var parent = function (element) {
+      return Option.from(element.dom().parentNode).map(Element.fromDom);
+    };
+    var parents = function (element, isRoot) {
+      var stop = isFunction(isRoot) ? isRoot : never;
+      var dom = element.dom();
+      var ret = [];
+      while (dom.parentNode !== null && dom.parentNode !== undefined) {
+        var rawParent = dom.parentNode;
+        var p = Element.fromDom(rawParent);
+        ret.push(p);
+        if (stop(p) === true) {
+          break;
+        } else {
+          dom = rawParent;
+        }
+      }
+      return ret;
+    };
+    var siblings = function (element) {
+      var filterSelf = function (elements) {
+        return filter$1(elements, function (x) {
+          return !eq(element, x);
+        });
+      };
+      return parent(element).map(children).map(filterSelf).getOr([]);
+    };
+    var nextSibling = function (element) {
+      return Option.from(element.dom().nextSibling).map(Element.fromDom);
+    };
+    var children = function (element) {
+      return map$1(element.dom().childNodes, Element.fromDom);
+    };
+    var child = function (element, index) {
+      var cs = element.dom().childNodes;
+      return Option.from(cs[index]).map(Element.fromDom);
+    };
+    var firstChild = function (element) {
+      return child(element, 0);
+    };
+
+    var before = function (marker, element) {
+      var parent$1 = parent(marker);
+      parent$1.each(function (v) {
+        v.dom().insertBefore(element.dom(), marker.dom());
+      });
+    };
+    var after = function (marker, element) {
+      var sibling = nextSibling(marker);
+      sibling.fold(function () {
+        var parent$1 = parent(marker);
+        parent$1.each(function (v) {
+          append(v, element);
+        });
+      }, function (v) {
+        before(v, element);
+      });
+    };
+    var prepend = function (parent, element) {
+      var firstChild$1 = firstChild(parent);
+      firstChild$1.fold(function () {
+        append(parent, element);
+      }, function (v) {
+        parent.dom().insertBefore(element.dom(), v.dom());
+      });
+    };
+    var append = function (parent, element) {
+      parent.dom().appendChild(element.dom());
+    };
+    var appendAt = function (parent, element, index) {
+      child(parent, index).fold(function () {
+        append(parent, element);
+      }, function (v) {
+        before(v, element);
+      });
+    };
+
+    var append$1 = function (parent, elements) {
+      each$1(elements, function (x) {
+        append(parent, x);
+      });
+    };
+
+    var empty = function (element) {
+      element.dom().textContent = '';
+      each$1(children(element), function (rogue) {
+        remove(rogue);
+      });
+    };
+    var remove = function (element) {
+      var dom = element.dom();
+      if (dom.parentNode !== null) {
+        dom.parentNode.removeChild(dom);
+      }
+    };
+
+    var fireDetaching = function (component) {
+      emit(component, detachedFromDom());
+      var children = component.components();
+      each$1(children, fireDetaching);
+    };
+    var fireAttaching = function (component) {
+      var children = component.components();
+      each$1(children, fireAttaching);
+      emit(component, attachedToDom());
+    };
+    var attach = function (parent, child) {
+      append(parent.element(), child.element());
+    };
+    var detachChildren = function (component) {
+      each$1(component.components(), function (childComp) {
+        return remove(childComp.element());
+      });
+      empty(component.element());
+      component.syncComponents();
+    };
+    var replaceChildren = function (component, newChildren) {
+      var subs = component.components();
+      detachChildren(component);
+      var deleted = difference(subs, newChildren);
+      each$1(deleted, function (comp) {
+        fireDetaching(comp);
+        component.getSystem().removeFromWorld(comp);
+      });
+      each$1(newChildren, function (childComp) {
+        if (!childComp.getSystem().isConnected()) {
+          component.getSystem().addToWorld(childComp);
+          attach(component, childComp);
+          if (inBody(component.element())) {
+            fireAttaching(childComp);
+          }
+        } else {
+          attach(component, childComp);
+        }
+        component.syncComponents();
+      });
+    };
+
+    var attach$1 = function (parent, child) {
+      attachWith(parent, child, append);
+    };
+    var attachWith = function (parent, child, insertion) {
+      parent.getSystem().addToWorld(child);
+      insertion(parent.element(), child.element());
+      if (inBody(parent.element())) {
+        fireAttaching(child);
+      }
+      parent.syncComponents();
+    };
+    var doDetach = function (component) {
+      fireDetaching(component);
+      remove(component.element());
+      component.getSystem().removeFromWorld(component);
+    };
+    var detach = function (component) {
+      var parent$1 = parent(component.element()).bind(function (p) {
+        return component.getSystem().getByDom(p).toOption();
+      });
+      doDetach(component);
+      parent$1.each(function (p) {
+        p.syncComponents();
+      });
+    };
+    var attachSystemAfter = function (element, guiSystem) {
+      attachSystemWith(element, guiSystem, after);
+    };
+    var attachSystemWith = function (element, guiSystem, inserter) {
+      inserter(element, guiSystem.element());
+      var children$1 = children(guiSystem.element());
+      each$1(children$1, function (child) {
+        guiSystem.getByDom(child).each(fireAttaching);
+      });
+    };
+    var detachSystem = function (guiSystem) {
+      var children$1 = children(guiSystem.element());
+      each$1(children$1, function (child) {
+        guiSystem.getByDom(child).each(fireDetaching);
+      });
+      remove(guiSystem.element());
+    };
+
+    var value = function (o) {
+      var is = function (v) {
+        return o === v;
+      };
+      var or = function (_opt) {
+        return value(o);
+      };
+      var orThunk = function (_f) {
+        return value(o);
+      };
+      var map = function (f) {
+        return value(f(o));
+      };
+      var mapError = function (_f) {
+        return value(o);
+      };
+      var each = function (f) {
+        f(o);
+      };
+      var bind = function (f) {
+        return f(o);
+      };
+      var fold = function (_, onValue) {
+        return onValue(o);
+      };
+      var exists = function (f) {
+        return f(o);
+      };
+      var forall = function (f) {
+        return f(o);
+      };
+      var toOption = function () {
+        return Option.some(o);
+      };
+      return {
+        is: is,
+        isValue: always,
+        isError: never,
+        getOr: constant(o),
+        getOrThunk: constant(o),
+        getOrDie: constant(o),
+        or: or,
+        orThunk: orThunk,
+        fold: fold,
+        map: map,
+        mapError: mapError,
+        each: each,
+        bind: bind,
+        exists: exists,
+        forall: forall,
+        toOption: toOption
+      };
+    };
+    var error = function (message) {
+      var getOrThunk = function (f) {
+        return f();
+      };
+      var getOrDie = function () {
+        return die(String(message))();
+      };
+      var or = function (opt) {
+        return opt;
+      };
+      var orThunk = function (f) {
+        return f();
+      };
+      var map = function (_f) {
+        return error(message);
+      };
+      var mapError = function (f) {
+        return error(f(message));
+      };
+      var bind = function (_f) {
+        return error(message);
+      };
+      var fold = function (onError, _) {
+        return onError(message);
+      };
+      return {
+        is: never,
+        isValue: never,
+        isError: always,
+        getOr: identity,
+        getOrThunk: getOrThunk,
+        getOrDie: getOrDie,
+        or: or,
+        orThunk: orThunk,
+        fold: fold,
+        map: map,
+        mapError: mapError,
+        each: noop,
+        bind: bind,
+        exists: never,
+        forall: always,
+        toOption: Option.none
+      };
+    };
+    var fromOption = function (opt, err) {
+      return opt.fold(function () {
+        return error(err);
+      }, value);
+    };
+    var Result = {
+      value: value,
+      error: error,
+      fromOption: fromOption
+    };
+
+    var generate = function (cases) {
+      if (!isArray(cases)) {
+        throw new Error('cases must be an array');
+      }
+      if (cases.length === 0) {
+        throw new Error('there must be at least one case');
+      }
+      var constructors = [];
+      var adt = {};
+      each$1(cases, function (acase, count) {
+        var keys$1 = keys(acase);
+        if (keys$1.length !== 1) {
+          throw new Error('one and only one name per case');
+        }
+        var key = keys$1[0];
+        var value = acase[key];
+        if (adt[key] !== undefined) {
+          throw new Error('duplicate key detected:' + key);
+        } else if (key === 'cata') {
+          throw new Error('cannot have a case named cata (sorry)');
+        } else if (!isArray(value)) {
+          throw new Error('case arguments must be an array');
+        }
+        constructors.push(key);
+        adt[key] = function () {
+          var argLength = arguments.length;
+          if (argLength !== value.length) {
+            throw new Error('Wrong number of arguments to case ' + key + '. Expected ' + value.length + ' (' + value + '), got ' + argLength);
+          }
+          var args = new Array(argLength);
+          for (var i = 0; i < args.length; i++) {
+            args[i] = arguments[i];
+          }
+          var match = function (branches) {
+            var branchKeys = keys(branches);
+            if (constructors.length !== branchKeys.length) {
+              throw new Error('Wrong number of arguments to match. Expected: ' + constructors.join(',') + '\nActual: ' + branchKeys.join(','));
+            }
+            var allReqd = forall(constructors, function (reqKey) {
+              return contains(branchKeys, reqKey);
+            });
+            if (!allReqd) {
+              throw new Error('Not all branches were specified when using match. Specified: ' + branchKeys.join(', ') + '\nRequired: ' + constructors.join(', '));
+            }
+            return branches[key].apply(null, args);
+          };
+          return {
+            fold: function () {
+              if (arguments.length !== cases.length) {
+                throw new Error('Wrong number of arguments to fold. Expected ' + cases.length + ', got ' + arguments.length);
+              }
+              var target = arguments[count];
+              return target.apply(null, args);
+            },
+            match: match,
+            log: function (label) {
+              domGlobals.console.log(label, {
+                constructors: constructors,
+                constructor: key,
+                params: args
+              });
+            }
+          };
+        };
+      });
+      return adt;
+    };
+    var Adt = { generate: generate };
+
+    var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
+    var shallow = function (old, nu) {
+      return nu;
+    };
+    var deep = function (old, nu) {
+      var bothObjects = isObject(old) && isObject(nu);
+      return bothObjects ? deepMerge(old, nu) : nu;
+    };
+    var baseMerge = function (merger) {
+      return function () {
+        var objects = new Array(arguments.length);
+        for (var i = 0; i < objects.length; i++) {
+          objects[i] = arguments[i];
+        }
+        if (objects.length === 0) {
+          throw new Error('Can\'t merge zero objects');
+        }
+        var ret = {};
+        for (var j = 0; j < objects.length; j++) {
+          var curObject = objects[j];
+          for (var key in curObject) {
+            if (hasOwnProperty$1.call(curObject, key)) {
+              ret[key] = merger(ret[key], curObject[key]);
+            }
+          }
+        }
+        return ret;
+      };
+    };
+    var deepMerge = baseMerge(deep);
+    var merge = baseMerge(shallow);
+
+    var SimpleResultType;
+    (function (SimpleResultType) {
+      SimpleResultType[SimpleResultType['Error'] = 0] = 'Error';
+      SimpleResultType[SimpleResultType['Value'] = 1] = 'Value';
+    }(SimpleResultType || (SimpleResultType = {})));
+    var fold = function (res, onError, onValue) {
+      return res.stype === SimpleResultType.Error ? onError(res.serror) : onValue(res.svalue);
+    };
+    var partition = function (results) {
+      var values = [];
+      var errors = [];
+      each$1(results, function (obj) {
+        fold(obj, function (err) {
+          return errors.push(err);
+        }, function (val) {
+          return values.push(val);
+        });
+      });
+      return {
+        values: values,
+        errors: errors
+      };
+    };
+    var mapError = function (res, f) {
+      if (res.stype === SimpleResultType.Error) {
+        return {
+          stype: SimpleResultType.Error,
+          serror: f(res.serror)
+        };
+      } else {
+        return res;
+      }
+    };
+    var map$2 = function (res, f) {
+      if (res.stype === SimpleResultType.Value) {
+        return {
+          stype: SimpleResultType.Value,
+          svalue: f(res.svalue)
+        };
+      } else {
+        return res;
+      }
+    };
+    var bind$1 = function (res, f) {
+      if (res.stype === SimpleResultType.Value) {
+        return f(res.svalue);
+      } else {
+        return res;
+      }
+    };
+    var bindError = function (res, f) {
+      if (res.stype === SimpleResultType.Error) {
+        return f(res.serror);
+      } else {
+        return res;
+      }
+    };
+    var svalue = function (v) {
+      return {
+        stype: SimpleResultType.Value,
+        svalue: v
+      };
+    };
+    var serror = function (e) {
+      return {
+        stype: SimpleResultType.Error,
+        serror: e
+      };
+    };
+    var toResult = function (res) {
+      return fold(res, Result.error, Result.value);
+    };
+    var fromResult = function (res) {
+      return res.fold(serror, svalue);
+    };
+    var SimpleResult = {
+      fromResult: fromResult,
+      toResult: toResult,
+      svalue: svalue,
+      partition: partition,
+      serror: serror,
+      bind: bind$1,
+      bindError: bindError,
+      map: map$2,
+      mapError: mapError,
+      fold: fold
+    };
+
+    var adt = Adt.generate([
+      { strict: [] },
+      { defaultedThunk: ['fallbackThunk'] },
+      { asOption: [] },
+      { asDefaultedOptionThunk: ['fallbackThunk'] },
+      { mergeWithThunk: ['baseThunk'] }
+    ]);
+    var defaulted = function (fallback) {
+      return adt.defaultedThunk(constant(fallback));
+    };
+    var mergeWith = function (base) {
+      return adt.mergeWithThunk(constant(base));
+    };
+    var strict = adt.strict;
+    var asOption = adt.asOption;
+    var defaultedThunk = adt.defaultedThunk;
+    var asDefaultedOptionThunk = adt.asDefaultedOptionThunk;
+    var mergeWithThunk = adt.mergeWithThunk;
+
+    var exclude = function (obj, fields) {
+      var r = {};
+      each(obj, function (v, k) {
+        if (!contains(fields, k)) {
+          r[k] = v;
+        }
+      });
+      return r;
+    };
+
+    var wrap = function (key, value) {
+      var _a;
+      return _a = {}, _a[key] = value, _a;
+    };
+    var wrapAll = function (keyvalues) {
+      var r = {};
+      each$1(keyvalues, function (kv) {
+        r[kv.key] = kv.value;
+      });
+      return r;
+    };
+
+    var comparison = Adt.generate([
+      {
+        bothErrors: [
+          'error1',
+          'error2'
+        ]
+      },
+      {
+        firstError: [
+          'error1',
+          'value2'
+        ]
+      },
+      {
+        secondError: [
+          'value1',
+          'error2'
+        ]
+      },
+      {
+        bothValues: [
+          'value1',
+          'value2'
+        ]
+      }
+    ]);
+    var partition$1 = function (results) {
+      var errors = [];
+      var values = [];
+      each$1(results, function (result) {
+        result.fold(function (err) {
+          errors.push(err);
+        }, function (value) {
+          values.push(value);
+        });
+      });
+      return {
+        errors: errors,
+        values: values
+      };
+    };
+
+    var exclude$1 = function (obj, fields) {
+      return exclude(obj, fields);
+    };
+    var wrap$1 = function (key, value) {
+      return wrap(key, value);
+    };
+    var wrapAll$1 = function (keyvalues) {
+      return wrapAll(keyvalues);
+    };
+    var mergeValues = function (values, base) {
+      return values.length === 0 ? Result.value(base) : Result.value(deepMerge(base, merge.apply(undefined, values)));
+    };
+    var mergeErrors = function (errors) {
+      return Result.error(flatten(errors));
+    };
+    var consolidate = function (objs, base) {
+      var partitions = partition$1(objs);
+      return partitions.errors.length > 0 ? mergeErrors(partitions.errors) : mergeValues(partitions.values, base);
+    };
+
+    var mergeValues$1 = function (values, base) {
+      return values.length > 0 ? SimpleResult.svalue(deepMerge(base, merge.apply(undefined, values))) : SimpleResult.svalue(base);
+    };
+    var mergeErrors$1 = function (errors) {
+      return compose(SimpleResult.serror, flatten)(errors);
+    };
+    var consolidateObj = function (objects, base) {
+      var partition = SimpleResult.partition(objects);
+      return partition.errors.length > 0 ? mergeErrors$1(partition.errors) : mergeValues$1(partition.values, base);
+    };
+    var consolidateArr = function (objects) {
+      var partitions = SimpleResult.partition(objects);
+      return partitions.errors.length > 0 ? mergeErrors$1(partitions.errors) : SimpleResult.svalue(partitions.values);
+    };
+    var ResultCombine = {
+      consolidateObj: consolidateObj,
+      consolidateArr: consolidateArr
+    };
+
+    var formatObj = function (input) {
+      return isObject(input) && keys(input).length > 100 ? ' removed due to size' : JSON.stringify(input, null, 2);
+    };
+    var formatErrors = function (errors) {
+      var es = errors.length > 10 ? errors.slice(0, 10).concat([{
+          path: [],
+          getErrorInfo: function () {
+            return '... (only showing first ten failures)';
+          }
+        }]) : errors;
+      return map$1(es, function (e) {
+        return 'Failed path: (' + e.path.join(' > ') + ')\n' + e.getErrorInfo();
+      });
+    };
+
+    var nu$3 = function (path, getErrorInfo) {
+      return SimpleResult.serror([{
+          path: path,
+          getErrorInfo: getErrorInfo
+        }]);
+    };
+    var missingStrict = function (path, key, obj) {
+      return nu$3(path, function () {
+        return 'Could not find valid *strict* value for "' + key + '" in ' + formatObj(obj);
+      });
+    };
+    var missingKey = function (path, key) {
+      return nu$3(path, function () {
+        return 'Choice schema did not contain choice key: "' + key + '"';
+      });
+    };
+    var missingBranch = function (path, branches, branch) {
+      return nu$3(path, function () {
+        return 'The chosen schema: "' + branch + '" did not exist in branches: ' + formatObj(branches);
+      });
+    };
+    var unsupportedFields = function (path, unsupported) {
+      return nu$3(path, function () {
+        return 'There are unsupported fields: [' + unsupported.join(', ') + '] specified';
+      });
+    };
+    var custom = function (path, err) {
+      return nu$3(path, function () {
+        return err;
+      });
+    };
+
+    var adt$1 = Adt.generate([
+      {
+        field: [
+          'key',
+          'okey',
+          'presence',
+          'prop'
+        ]
+      },
+      {
+        state: [
+          'okey',
+          'instantiator'
+        ]
+      }
+    ]);
+    var strictAccess = function (path, obj, key) {
+      return get(obj, key).fold(function () {
+        return missingStrict(path, key, obj);
+      }, SimpleResult.svalue);
+    };
+    var fallbackAccess = function (obj, key, fallbackThunk) {
+      var v = get(obj, key).fold(function () {
+        return fallbackThunk(obj);
+      }, identity);
+      return SimpleResult.svalue(v);
+    };
+    var optionAccess = function (obj, key) {
+      return SimpleResult.svalue(get(obj, key));
+    };
+    var optionDefaultedAccess = function (obj, key, fallback) {
+      var opt = get(obj, key).map(function (val) {
+        return val === true ? fallback(obj) : val;
+      });
+      return SimpleResult.svalue(opt);
+    };
+    var cExtractOne = function (path, obj, field, strength) {
+      return field.fold(function (key, okey, presence, prop) {
+        var bundle = function (av) {
+          var result = prop.extract(path.concat([key]), strength, av);
+          return SimpleResult.map(result, function (res) {
+            return wrap(okey, strength(res));
+          });
+        };
+        var bundleAsOption = function (optValue) {
+          return optValue.fold(function () {
+            var outcome = wrap(okey, strength(Option.none()));
+            return SimpleResult.svalue(outcome);
+          }, function (ov) {
+            var result = prop.extract(path.concat([key]), strength, ov);
+            return SimpleResult.map(result, function (res) {
+              return wrap(okey, strength(Option.some(res)));
+            });
+          });
+        };
+        return function () {
+          return presence.fold(function () {
+            return SimpleResult.bind(strictAccess(path, obj, key), bundle);
+          }, function (fallbackThunk) {
+            return SimpleResult.bind(fallbackAccess(obj, key, fallbackThunk), bundle);
+          }, function () {
+            return SimpleResult.bind(optionAccess(obj, key), bundleAsOption);
+          }, function (fallbackThunk) {
+            return SimpleResult.bind(optionDefaultedAccess(obj, key, fallbackThunk), bundleAsOption);
+          }, function (baseThunk) {
+            var base = baseThunk(obj);
+            var result = SimpleResult.map(fallbackAccess(obj, key, constant({})), function (v) {
+              return deepMerge(base, v);
+            });
+            return SimpleResult.bind(result, bundle);
+          });
+        }();
+      }, function (okey, instantiator) {
+        var state = instantiator(obj);
+        return SimpleResult.svalue(wrap(okey, strength(state)));
+      });
+    };
+    var cExtract = function (path, obj, fields, strength) {
+      var results = map$1(fields, function (field) {
+        return cExtractOne(path, obj, field, strength);
+      });
+      return ResultCombine.consolidateObj(results, {});
+    };
+    var value$1 = function (validator) {
+      var extract = function (path, strength, val) {
+        return SimpleResult.bindError(validator(val, strength), function (err) {
+          return custom(path, err);
+        });
+      };
+      var toString = function () {
+        return 'val';
+      };
+      return {
+        extract: extract,
+        toString: toString
+      };
+    };
+    var getSetKeys = function (obj) {
+      return keys(filter(obj, function (value) {
+        return value !== undefined && value !== null;
+      }));
+    };
+    var objOfOnly = function (fields) {
+      var delegate = objOf(fields);
+      var fieldNames = foldr(fields, function (acc, f) {
+        return f.fold(function (key) {
+          return deepMerge(acc, wrap$1(key, true));
+        }, constant(acc));
+      }, {});
+      var extract = function (path, strength, o) {
+        var keys = isBoolean(o) ? [] : getSetKeys(o);
+        var extra = filter$1(keys, function (k) {
+          return !hasNonNullableKey(fieldNames, k);
+        });
+        return extra.length === 0 ? delegate.extract(path, strength, o) : unsupportedFields(path, extra);
+      };
+      return {
+        extract: extract,
+        toString: delegate.toString
+      };
+    };
+    var objOf = function (fields) {
+      var extract = function (path, strength, o) {
+        return cExtract(path, o, fields, strength);
+      };
+      var toString = function () {
+        var fieldStrings = map$1(fields, function (field) {
+          return field.fold(function (key, okey, presence, prop) {
+            return key + ' -> ' + prop.toString();
+          }, function (okey, _instantiator) {
+            return 'state(' + okey + ')';
+          });
+        });
+        return 'obj{\n' + fieldStrings.join('\n') + '}';
+      };
+      return {
+        extract: extract,
+        toString: toString
+      };
+    };
+    var arrOf = function (prop) {
+      var extract = function (path, strength, array) {
+        var results = map$1(array, function (a, i) {
+          return prop.extract(path.concat(['[' + i + ']']), strength, a);
+        });
+        return ResultCombine.consolidateArr(results);
+      };
+      var toString = function () {
+        return 'array(' + prop.toString() + ')';
+      };
+      return {
+        extract: extract,
+        toString: toString
+      };
+    };
+    var setOf = function (validator, prop) {
+      var validateKeys = function (path, keys) {
+        return arrOf(value$1(validator)).extract(path, identity, keys);
+      };
+      var extract = function (path, strength, o) {
+        var keys$1 = keys(o);
+        var validatedKeys = validateKeys(path, keys$1);
+        return SimpleResult.bind(validatedKeys, function (validKeys) {
+          var schema = map$1(validKeys, function (vk) {
+            return adt$1.field(vk, vk, strict(), prop);
+          });
+          return objOf(schema).extract(path, strength, o);
+        });
+      };
+      var toString = function () {
+        return 'setOf(' + prop.toString() + ')';
+      };
+      return {
+        extract: extract,
+        toString: toString
+      };
+    };
+    var anyValue = constant(value$1(SimpleResult.svalue));
+    var state = adt$1.state;
+    var field = adt$1.field;
+
+    var chooseFrom = function (path, strength, input, branches, ch) {
+      var fields = get(branches, ch);
+      return fields.fold(function () {
+        return missingBranch(path, branches, ch);
+      }, function (vp) {
+        return vp.extract(path.concat(['branch: ' + ch]), strength, input);
+      });
+    };
+    var choose = function (key, branches) {
+      var extract = function (path, strength, input) {
+        var choice = get(input, key);
+        return choice.fold(function () {
+          return missingKey(path, key);
+        }, function (chosen) {
+          return chooseFrom(path, strength, input, branches, chosen);
+        });
+      };
+      var toString = function () {
+        return 'chooseOn(' + key + '). Possible values: ' + keys(branches);
+      };
+      return {
+        extract: extract,
+        toString: toString
+      };
+    };
+
+    var _anyValue = value$1(SimpleResult.svalue);
+    var valueOf = function (validator) {
+      return value$1(function (v) {
+        return validator(v).fold(SimpleResult.serror, SimpleResult.svalue);
+      });
+    };
+    var setOf$1 = function (validator, prop) {
+      return setOf(function (v) {
+        return SimpleResult.fromResult(validator(v));
+      }, prop);
+    };
+    var extract = function (label, prop, strength, obj) {
+      var res = prop.extract([label], strength, obj);
+      return SimpleResult.mapError(res, function (errs) {
+        return {
+          input: obj,
+          errors: errs
+        };
+      });
+    };
+    var asRaw = function (label, prop, obj) {
+      return SimpleResult.toResult(extract(label, prop, identity, obj));
+    };
+    var getOrDie = function (extraction) {
+      return extraction.fold(function (errInfo) {
+        throw new Error(formatError(errInfo));
+      }, identity);
+    };
+    var asRawOrDie = function (label, prop, obj) {
+      return getOrDie(asRaw(label, prop, obj));
+    };
+    var formatError = function (errInfo) {
+      return 'Errors: \n' + formatErrors(errInfo.errors).join('\n') + '\n\nInput object: ' + formatObj(errInfo.input);
+    };
+    var choose$1 = function (key, branches) {
+      return choose(key, map(branches, objOf));
+    };
+    var anyValue$1 = constant(_anyValue);
+    var typedValue = function (validator, expectedType) {
+      return value$1(function (a) {
+        var actualType = typeof a;
+        return validator(a) ? SimpleResult.svalue(a) : SimpleResult.serror('Expected type: ' + expectedType + ' but got: ' + actualType);
+      });
+    };
+    var functionProcessor = typedValue(isFunction, 'function');
+
+    var strict$1 = function (key) {
+      return field(key, key, strict(), anyValue());
+    };
+    var strictOf = function (key, schema) {
+      return field(key, key, strict(), schema);
+    };
+    var strictFunction = function (key) {
+      return strictOf(key, functionProcessor);
+    };
+    var forbid = function (key, message) {
+      return field(key, key, asOption(), value$1(function (_v) {
+        return SimpleResult.serror('The field: ' + key + ' is forbidden. ' + message);
+      }));
+    };
+    var strictObjOf = function (key, objSchema) {
+      return field(key, key, strict(), objOf(objSchema));
+    };
+    var option = function (key) {
+      return field(key, key, asOption(), anyValue());
+    };
+    var optionOf = function (key, schema) {
+      return field(key, key, asOption(), schema);
+    };
+    var optionObjOf = function (key, objSchema) {
+      return optionOf(key, objOf(objSchema));
+    };
+    var optionObjOfOnly = function (key, objSchema) {
+      return optionOf(key, objOfOnly(objSchema));
+    };
+    var defaulted$1 = function (key, fallback) {
+      return field(key, key, defaulted(fallback), anyValue());
+    };
+    var defaultedOf = function (key, fallback, schema) {
+      return field(key, key, defaulted(fallback), schema);
+    };
+    var defaultedFunction = function (key, fallback) {
+      return defaultedOf(key, fallback, functionProcessor);
+    };
+    var defaultedObjOf = function (key, fallback, objSchema) {
+      return defaultedOf(key, fallback, objOf(objSchema));
+    };
+    var state$1 = function (okey, instantiator) {
+      return state(okey, instantiator);
+    };
+
+    var ensureIsRoot = function (isRoot) {
+      return isFunction(isRoot) ? isRoot : constant(false);
+    };
+    var ancestor = function (scope, transform, isRoot) {
+      var element = scope.dom();
+      var stop = ensureIsRoot(isRoot);
+      while (element.parentNode) {
+        element = element.parentNode;
+        var el = Element.fromDom(element);
+        var transformed = transform(el);
+        if (transformed.isSome()) {
+          return transformed;
+        } else if (stop(el)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var closest = function (scope, transform, isRoot) {
+      var current = transform(scope);
+      var stop = ensureIsRoot(isRoot);
+      return current.orThunk(function () {
+        return stop(scope) ? Option.none() : ancestor(scope, transform, stop);
+      });
+    };
+
+    var isSource = function (component, simulatedEvent) {
+      return eq(component.element(), simulatedEvent.event().target());
+    };
+
+    var nu$4 = function (parts) {
+      if (!hasNonNullableKey(parts, 'can') && !hasNonNullableKey(parts, 'abort') && !hasNonNullableKey(parts, 'run')) {
+        throw new Error('EventHandler defined by: ' + JSON.stringify(parts, null, 2) + ' does not have can, abort, or run!');
+      }
+      return asRawOrDie('Extracting event.handler', objOfOnly([
+        defaulted$1('can', constant(true)),
+        defaulted$1('abort', constant(false)),
+        defaulted$1('run', noop)
+      ]), parts);
+    };
+    var all$1 = function (handlers, f) {
+      return function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        return foldl(handlers, function (acc, handler) {
+          return acc && f(handler).apply(undefined, args);
+        }, true);
+      };
+    };
+    var any = function (handlers, f) {
+      return function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        return foldl(handlers, function (acc, handler) {
+          return acc || f(handler).apply(undefined, args);
+        }, false);
+      };
+    };
+    var read = function (handler) {
+      return isFunction(handler) ? {
+        can: constant(true),
+        abort: constant(false),
+        run: handler
+      } : handler;
+    };
+    var fuse = function (handlers) {
+      var can = all$1(handlers, function (handler) {
+        return handler.can;
+      });
+      var abort = any(handlers, function (handler) {
+        return handler.abort;
+      });
+      var run = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        each$1(handlers, function (handler) {
+          handler.run.apply(undefined, args);
+        });
+      };
+      return nu$4({
+        can: can,
+        abort: abort,
+        run: run
+      });
+    };
+
+    var derive = function (configs) {
+      return wrapAll$1(configs);
+    };
+    var abort = function (name, predicate) {
+      return {
+        key: name,
+        value: nu$4({ abort: predicate })
+      };
+    };
+    var can = function (name, predicate) {
+      return {
+        key: name,
+        value: nu$4({ can: predicate })
+      };
+    };
+    var run = function (name, handler) {
+      return {
+        key: name,
+        value: nu$4({ run: handler })
+      };
+    };
+    var runActionExtra = function (name, action, extra) {
+      return {
+        key: name,
+        value: nu$4({
+          run: function (component, simulatedEvent) {
+            action.apply(undefined, [
+              component,
+              simulatedEvent
+            ].concat(extra));
+          }
+        })
+      };
+    };
+    var runOnName = function (name) {
+      return function (handler) {
+        return run(name, handler);
+      };
+    };
+    var runOnSourceName = function (name) {
+      return function (handler) {
+        return {
+          key: name,
+          value: nu$4({
+            run: function (component, simulatedEvent) {
+              if (isSource(component, simulatedEvent)) {
+                handler(component, simulatedEvent);
+              }
+            }
+          })
+        };
+      };
+    };
+    var redirectToUid = function (name, uid) {
+      return run(name, function (component, simulatedEvent) {
+        component.getSystem().getByUid(uid).each(function (redirectee) {
+          dispatchEvent(redirectee, redirectee.element(), name, simulatedEvent);
+        });
+      });
+    };
+    var redirectToPart = function (name, detail, partName) {
+      var uid = detail.partUids[partName];
+      return redirectToUid(name, uid);
+    };
+    var cutter = function (name) {
+      return run(name, function (component, simulatedEvent) {
+        simulatedEvent.cut();
+      });
+    };
+    var stopper = function (name) {
+      return run(name, function (component, simulatedEvent) {
+        simulatedEvent.stop();
+      });
+    };
+    var runOnSource = function (name, f) {
+      return runOnSourceName(name)(f);
+    };
+    var runOnAttached = runOnSourceName(attachedToDom());
+    var runOnDetached = runOnSourceName(detachedFromDom());
+    var runOnInit = runOnSourceName(systemInit());
+    var runOnExecute = runOnName(execute());
+
+    var markAsBehaviourApi = function (f, apiName, apiFunction) {
+      var delegate = apiFunction.toString();
+      var endIndex = delegate.indexOf(')') + 1;
+      var openBracketIndex = delegate.indexOf('(');
+      var parameters = delegate.substring(openBracketIndex + 1, endIndex - 1).split(/,\s*/);
+      f.toFunctionAnnotation = function () {
+        return {
+          name: apiName,
+          parameters: cleanParameters(parameters.slice(0, 1).concat(parameters.slice(3)))
+        };
+      };
+      return f;
+    };
+    var cleanParameters = function (parameters) {
+      return map$1(parameters, function (p) {
+        return endsWith(p, '/*') ? p.substring(0, p.length - '/*'.length) : p;
+      });
+    };
+    var markAsExtraApi = function (f, extraName) {
+      var delegate = f.toString();
+      var endIndex = delegate.indexOf(')') + 1;
+      var openBracketIndex = delegate.indexOf('(');
+      var parameters = delegate.substring(openBracketIndex + 1, endIndex - 1).split(/,\s*/);
+      f.toFunctionAnnotation = function () {
+        return {
+          name: extraName,
+          parameters: cleanParameters(parameters)
+        };
+      };
+      return f;
+    };
+    var markAsSketchApi = function (f, apiFunction) {
+      var delegate = apiFunction.toString();
+      var endIndex = delegate.indexOf(')') + 1;
+      var openBracketIndex = delegate.indexOf('(');
+      var parameters = delegate.substring(openBracketIndex + 1, endIndex - 1).split(/,\s*/);
+      f.toFunctionAnnotation = function () {
+        return {
+          name: 'OVERRIDE',
+          parameters: cleanParameters(parameters.slice(1))
+        };
+      };
+      return f;
+    };
+
+    var nu$5 = function (s) {
+      return {
+        classes: s.classes !== undefined ? s.classes : [],
+        attributes: s.attributes !== undefined ? s.attributes : {},
+        styles: s.styles !== undefined ? s.styles : {}
+      };
+    };
+    var merge$1 = function (defnA, mod) {
+      return __assign(__assign({}, defnA), {
+        attributes: __assign(__assign({}, defnA.attributes), mod.attributes),
+        styles: __assign(__assign({}, defnA.styles), mod.styles),
+        classes: defnA.classes.concat(mod.classes)
+      });
+    };
+
+    var executeEvent = function (bConfig, bState, executor) {
+      return runOnExecute(function (component) {
+        executor(component, bConfig, bState);
+      });
+    };
+    var loadEvent = function (bConfig, bState, f) {
+      return runOnInit(function (component, _simulatedEvent) {
+        f(component, bConfig, bState);
+      });
+    };
+    var create = function (schema, name, active, apis, extra, state) {
+      var configSchema = objOfOnly(schema);
+      var schemaSchema = optionObjOf(name, [optionObjOfOnly('config', schema)]);
+      return doCreate(configSchema, schemaSchema, name, active, apis, extra, state);
+    };
+    var createModes = function (modes, name, active, apis, extra, state) {
+      var configSchema = modes;
+      var schemaSchema = optionObjOf(name, [optionOf('config', modes)]);
+      return doCreate(configSchema, schemaSchema, name, active, apis, extra, state);
+    };
+    var wrapApi = function (bName, apiFunction, apiName) {
+      var f = function (component) {
+        var rest = [];
+        for (var _i = 1; _i < arguments.length; _i++) {
+          rest[_i - 1] = arguments[_i];
+        }
+        var args = [component].concat(rest);
+        return component.config({ name: constant(bName) }).fold(function () {
+          throw new Error('We could not find any behaviour configuration for: ' + bName + '. Using API: ' + apiName);
+        }, function (info) {
+          var rest = Array.prototype.slice.call(args, 1);
+          return apiFunction.apply(undefined, [
+            component,
+            info.config,
+            info.state
+          ].concat(rest));
+        });
+      };
+      return markAsBehaviourApi(f, apiName, apiFunction);
+    };
+    var revokeBehaviour = function (name) {
+      return {
+        key: name,
+        value: undefined
+      };
+    };
+    var doCreate = function (configSchema, schemaSchema, name, active, apis, extra, state) {
+      var getConfig = function (info) {
+        return hasNonNullableKey(info, name) ? info[name]() : Option.none();
+      };
+      var wrappedApis = map(apis, function (apiF, apiName) {
+        return wrapApi(name, apiF, apiName);
+      });
+      var wrappedExtra = map(extra, function (extraF, extraName) {
+        return markAsExtraApi(extraF, extraName);
+      });
+      var me = __assign(__assign(__assign({}, wrappedExtra), wrappedApis), {
+        revoke: curry(revokeBehaviour, name),
+        config: function (spec) {
+          var prepared = asRawOrDie(name + '-config', configSchema, spec);
+          return {
+            key: name,
+            value: {
+              config: prepared,
+              me: me,
+              configAsRaw: cached(function () {
+                return asRawOrDie(name + '-config', configSchema, spec);
+              }),
+              initialConfig: spec,
+              state: state
+            }
+          };
+        },
+        schema: function () {
+          return schemaSchema;
+        },
+        exhibit: function (info, base) {
+          return getConfig(info).bind(function (behaviourInfo) {
+            return get(active, 'exhibit').map(function (exhibitor) {
+              return exhibitor(base, behaviourInfo.config, behaviourInfo.state);
+            });
+          }).getOr(nu$5({}));
+        },
+        name: function () {
+          return name;
+        },
+        handlers: function (info) {
+          return getConfig(info).map(function (behaviourInfo) {
+            var getEvents = get(active, 'events').getOr(function () {
+              return {};
+            });
+            return getEvents(behaviourInfo.config, behaviourInfo.state);
+          }).getOr({});
+        }
+      });
+      return me;
+    };
+
+    var NoState = {
+      init: function () {
+        return nu$6({
+          readState: function () {
+            return 'No State required';
+          }
+        });
+      }
+    };
+    var nu$6 = function (spec) {
+      return spec;
+    };
+
+    var derive$1 = function (capabilities) {
+      return wrapAll$1(capabilities);
+    };
+    var simpleSchema = objOfOnly([
+      strict$1('fields'),
+      strict$1('name'),
+      defaulted$1('active', {}),
+      defaulted$1('apis', {}),
+      defaulted$1('state', NoState),
+      defaulted$1('extra', {})
+    ]);
+    var create$1 = function (data) {
+      var value = asRawOrDie('Creating behaviour: ' + data.name, simpleSchema, data);
+      return create(value.fields, value.name, value.active, value.apis, value.extra, value.state);
+    };
+    var modeSchema = objOfOnly([
+      strict$1('branchKey'),
+      strict$1('branches'),
+      strict$1('name'),
+      defaulted$1('active', {}),
+      defaulted$1('apis', {}),
+      defaulted$1('state', NoState),
+      defaulted$1('extra', {})
+    ]);
+    var createModes$1 = function (data) {
+      var value = asRawOrDie('Creating behaviour: ' + data.name, modeSchema, data);
+      return createModes(choose$1(value.branchKey, value.branches), value.name, value.active, value.apis, value.extra, value.state);
+    };
+    var revoke = constant(undefined);
+
+    var rawSet = function (dom, key, value) {
+      if (isString(value) || isBoolean(value) || isNumber(value)) {
+        dom.setAttribute(key, value + '');
+      } else {
+        domGlobals.console.error('Invalid call to Attr.set. Key ', key, ':: Value ', value, ':: Element ', dom);
+        throw new Error('Attribute value was not simple');
+      }
+    };
+    var set = function (element, key, value) {
+      rawSet(element.dom(), key, value);
+    };
+    var setAll = function (element, attrs) {
+      var dom = element.dom();
+      each(attrs, function (v, k) {
+        rawSet(dom, k, v);
+      });
+    };
+    var get$1 = function (element, key) {
+      var v = element.dom().getAttribute(key);
+      return v === null ? undefined : v;
+    };
+    var getOpt = function (element, key) {
+      return Option.from(get$1(element, key));
+    };
+    var has$1 = function (element, key) {
+      var dom = element.dom();
+      return dom && dom.hasAttribute ? dom.hasAttribute(key) : false;
+    };
+    var remove$1 = function (element, key) {
+      element.dom().removeAttribute(key);
+    };
+
+    var read$1 = function (element, attr) {
+      var value = get$1(element, attr);
+      return value === undefined || value === '' ? [] : value.split(' ');
+    };
+    var add = function (element, attr, id) {
+      var old = read$1(element, attr);
+      var nu = old.concat([id]);
+      set(element, attr, nu.join(' '));
+      return true;
+    };
+    var remove$2 = function (element, attr, id) {
+      var nu = filter$1(read$1(element, attr), function (v) {
+        return v !== id;
+      });
+      if (nu.length > 0) {
+        set(element, attr, nu.join(' '));
+      } else {
+        remove$1(element, attr);
+      }
+      return false;
+    };
+
+    var supports = function (element) {
+      return element.dom().classList !== undefined;
+    };
+    var get$2 = function (element) {
+      return read$1(element, 'class');
+    };
+    var add$1 = function (element, clazz) {
+      return add(element, 'class', clazz);
+    };
+    var remove$3 = function (element, clazz) {
+      return remove$2(element, 'class', clazz);
+    };
+
+    var add$2 = function (element, clazz) {
+      if (supports(element)) {
+        element.dom().classList.add(clazz);
+      } else {
+        add$1(element, clazz);
+      }
+    };
+    var cleanClass = function (element) {
+      var classList = supports(element) ? element.dom().classList : get$2(element);
+      if (classList.length === 0) {
+        remove$1(element, 'class');
+      }
+    };
+    var remove$4 = function (element, clazz) {
+      if (supports(element)) {
+        var classList = element.dom().classList;
+        classList.remove(clazz);
+      } else {
+        remove$3(element, clazz);
+      }
+      cleanClass(element);
+    };
+    var has$2 = function (element, clazz) {
+      return supports(element) && element.dom().classList.contains(clazz);
+    };
+
+    var swap = function (element, addCls, removeCls) {
+      remove$4(element, removeCls);
+      add$2(element, addCls);
+    };
+    var toAlpha = function (component, swapConfig, _swapState) {
+      swap(component.element(), swapConfig.alpha, swapConfig.omega);
+    };
+    var toOmega = function (component, swapConfig, _swapState) {
+      swap(component.element(), swapConfig.omega, swapConfig.alpha);
+    };
+    var clear = function (component, swapConfig, _swapState) {
+      remove$4(component.element(), swapConfig.alpha);
+      remove$4(component.element(), swapConfig.omega);
+    };
+    var isAlpha = function (component, swapConfig, _swapState) {
+      return has$2(component.element(), swapConfig.alpha);
+    };
+    var isOmega = function (component, swapConfig, _swapState) {
+      return has$2(component.element(), swapConfig.omega);
+    };
+
+    var SwapApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        toAlpha: toAlpha,
+        toOmega: toOmega,
+        isAlpha: isAlpha,
+        isOmega: isOmega,
+        clear: clear
+    });
+
+    var SwapSchema = [
+      strict$1('alpha'),
+      strict$1('omega')
+    ];
+
+    var Swapping = create$1({
+      fields: SwapSchema,
+      name: 'swapping',
+      apis: SwapApis
+    });
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    function ClosestOrAncestor (is, ancestor, scope, a, isRoot) {
+      return is(scope, a) ? Option.some(scope) : isFunction(isRoot) && isRoot(scope) ? Option.none() : ancestor(scope, a, isRoot);
+    }
+
+    var ancestor$1 = function (scope, predicate, isRoot) {
+      var element = scope.dom();
+      var stop = isFunction(isRoot) ? isRoot : constant(false);
+      while (element.parentNode) {
+        element = element.parentNode;
+        var el = Element.fromDom(element);
+        if (predicate(el)) {
+          return Option.some(el);
+        } else if (stop(el)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var closest$1 = function (scope, predicate, isRoot) {
+      var is = function (s, test) {
+        return test(s);
+      };
+      return ClosestOrAncestor(is, ancestor$1, scope, predicate, isRoot);
+    };
+    var descendant = function (scope, predicate) {
+      var descend = function (node) {
+        for (var i = 0; i < node.childNodes.length; i++) {
+          var child_1 = Element.fromDom(node.childNodes[i]);
+          if (predicate(child_1)) {
+            return Option.some(child_1);
+          }
+          var res = descend(node.childNodes[i]);
+          if (res.isSome()) {
+            return res;
+          }
+        }
+        return Option.none();
+      };
+      return descend(scope.dom());
+    };
+
+    var focus$1 = function (element) {
+      return element.dom().focus();
+    };
+    var blur = function (element) {
+      return element.dom().blur();
+    };
+    var hasFocus = function (element) {
+      var doc = owner(element).dom();
+      return element.dom() === doc.activeElement;
+    };
+    var active = function (_doc) {
+      var doc = _doc !== undefined ? _doc.dom() : domGlobals.document;
+      return Option.from(doc.activeElement).map(Element.fromDom);
+    };
+    var search = function (element) {
+      return active(owner(element)).filter(function (e) {
+        return element.dom().contains(e.dom());
+      });
+    };
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.ThemeManager');
+
+    var openLink = function (target) {
+      var link = domGlobals.document.createElement('a');
+      link.target = '_blank';
+      link.href = target.href;
+      link.rel = 'noreferrer noopener';
+      var nuEvt = domGlobals.document.createEvent('MouseEvents');
+      nuEvt.initMouseEvent('click', true, true, domGlobals.window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+      domGlobals.document.body.appendChild(link);
+      link.dispatchEvent(nuEvt);
+      domGlobals.document.body.removeChild(link);
+    };
+
+    var isSkinDisabled = function (editor) {
+      return editor.settings.skin === false;
+    };
+    var readOnlyOnInit = function (_editor) {
+      return false;
+    };
+
+    var formatChanged = 'formatChanged';
+    var orientationChanged = 'orientationChanged';
+    var dropupDismissed = 'dropupDismissed';
+
+    var fromHtml$1 = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      return children(Element.fromDom(div));
+    };
+
+    var get$3 = function (element) {
+      return element.dom().innerHTML;
+    };
+    var set$1 = function (element, content) {
+      var owner$1 = owner(element);
+      var docDom = owner$1.dom();
+      var fragment = Element.fromDom(docDom.createDocumentFragment());
+      var contentElements = fromHtml$1(content, docDom);
+      append$1(fragment, contentElements);
+      empty(element);
+      append(element, fragment);
+    };
+    var getOuter = function (element) {
+      var container = Element.fromTag('div');
+      var clone = Element.fromDom(element.dom().cloneNode(true));
+      append(container, clone);
+      return get$3(container);
+    };
+
+    var clone = function (original, isDeep) {
+      return Element.fromDom(original.dom().cloneNode(isDeep));
+    };
+    var shallow$1 = function (original) {
+      return clone(original, false);
+    };
+
+    var getHtml = function (element) {
+      var clone = shallow$1(element);
+      return getOuter(clone);
+    };
+
+    var element = function (elem) {
+      return getHtml(elem);
+    };
+
+    var chooseChannels = function (channels, message) {
+      return message.universal() ? channels : filter$1(channels, function (ch) {
+        return contains(message.channels(), ch);
+      });
+    };
+    var events = function (receiveConfig) {
+      return derive([run(receive(), function (component, message) {
+          var channelMap = receiveConfig.channels;
+          var channels = keys(channelMap);
+          var receivingData = message;
+          var targetChannels = chooseChannels(channels, receivingData);
+          each$1(targetChannels, function (ch) {
+            var channelInfo = channelMap[ch];
+            var channelSchema = channelInfo.schema;
+            var data = asRawOrDie('channel[' + ch + '] data\nReceiver: ' + element(component.element()), channelSchema, receivingData.data());
+            channelInfo.onReceive(component, data);
+          });
+        })]);
+    };
+
+    var ActiveReceiving = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events
+    });
+
+    var unknown$3 = 'unknown';
+    var EventConfiguration;
+    (function (EventConfiguration) {
+      EventConfiguration[EventConfiguration['STOP'] = 0] = 'STOP';
+      EventConfiguration[EventConfiguration['NORMAL'] = 1] = 'NORMAL';
+      EventConfiguration[EventConfiguration['LOGGING'] = 2] = 'LOGGING';
+    }(EventConfiguration || (EventConfiguration = {})));
+    var eventConfig = Cell({});
+    var makeEventLogger = function (eventName, initialTarget) {
+      var sequence = [];
+      var startTime = new Date().getTime();
+      return {
+        logEventCut: function (_name, target, purpose) {
+          sequence.push({
+            outcome: 'cut',
+            target: target,
+            purpose: purpose
+          });
+        },
+        logEventStopped: function (_name, target, purpose) {
+          sequence.push({
+            outcome: 'stopped',
+            target: target,
+            purpose: purpose
+          });
+        },
+        logNoParent: function (_name, target, purpose) {
+          sequence.push({
+            outcome: 'no-parent',
+            target: target,
+            purpose: purpose
+          });
+        },
+        logEventNoHandlers: function (_name, target) {
+          sequence.push({
+            outcome: 'no-handlers-left',
+            target: target
+          });
+        },
+        logEventResponse: function (_name, target, purpose) {
+          sequence.push({
+            outcome: 'response',
+            purpose: purpose,
+            target: target
+          });
+        },
+        write: function () {
+          var finishTime = new Date().getTime();
+          if (contains([
+              'mousemove',
+              'mouseover',
+              'mouseout',
+              systemInit()
+            ], eventName)) {
+            return;
+          }
+          domGlobals.console.log(eventName, {
+            event: eventName,
+            time: finishTime - startTime,
+            target: initialTarget.dom(),
+            sequence: map$1(sequence, function (s) {
+              if (!contains([
+                  'cut',
+                  'stopped',
+                  'response'
+                ], s.outcome)) {
+                return s.outcome;
+              } else {
+                return '{' + s.purpose + '} ' + s.outcome + ' at (' + element(s.target) + ')';
+              }
+            })
+          });
+        }
+      };
+    };
+    var processEvent = function (eventName, initialTarget, f) {
+      var status = get(eventConfig.get(), eventName).orThunk(function () {
+        var patterns = keys(eventConfig.get());
+        return findMap(patterns, function (p) {
+          return eventName.indexOf(p) > -1 ? Option.some(eventConfig.get()[p]) : Option.none();
+        });
+      }).getOr(EventConfiguration.NORMAL);
+      switch (status) {
+      case EventConfiguration.NORMAL:
+        return f(noLogger());
+      case EventConfiguration.LOGGING: {
+          var logger = makeEventLogger(eventName, initialTarget);
+          var output = f(logger);
+          logger.write();
+          return output;
+        }
+      case EventConfiguration.STOP:
+        return true;
+      }
+    };
+    var path = [
+      'alloy/data/Fields',
+      'alloy/debugging/Debugging'
+    ];
+    var getTrace = function () {
+      var err = new Error();
+      if (err.stack !== undefined) {
+        var lines = err.stack.split('\n');
+        return find$2(lines, function (line) {
+          return line.indexOf('alloy') > 0 && !exists(path, function (p) {
+            return line.indexOf(p) > -1;
+          });
+        }).getOr(unknown$3);
+      } else {
+        return unknown$3;
+      }
+    };
+    var ignoreEvent = {
+      logEventCut: noop,
+      logEventStopped: noop,
+      logNoParent: noop,
+      logEventNoHandlers: noop,
+      logEventResponse: noop,
+      write: noop
+    };
+    var monitorEvent = function (eventName, initialTarget, f) {
+      return processEvent(eventName, initialTarget, f);
+    };
+    var noLogger = constant(ignoreEvent);
+
+    var menuFields = constant([
+      strict$1('menu'),
+      strict$1('selectedMenu')
+    ]);
+    var itemFields = constant([
+      strict$1('item'),
+      strict$1('selectedItem')
+    ]);
+    var schema = constant(objOf(itemFields().concat(menuFields())));
+    var itemSchema = constant(objOf(itemFields()));
+
+    var _initSize = strictObjOf('initSize', [
+      strict$1('numColumns'),
+      strict$1('numRows')
+    ]);
+    var itemMarkers = function () {
+      return strictOf('markers', itemSchema());
+    };
+    var tieredMenuMarkers = function () {
+      return strictObjOf('markers', [strict$1('backgroundMenu')].concat(menuFields()).concat(itemFields()));
+    };
+    var markers = function (required) {
+      return strictObjOf('markers', map$1(required, strict$1));
+    };
+    var onPresenceHandler = function (label, fieldName, presence) {
+      var trace = getTrace();
+      return field(fieldName, fieldName, presence, valueOf(function (f) {
+        return Result.value(function () {
+          var args = [];
+          for (var _i = 0; _i < arguments.length; _i++) {
+            args[_i] = arguments[_i];
+          }
+          return f.apply(undefined, args);
+        });
+      }));
+    };
+    var onHandler = function (fieldName) {
+      return onPresenceHandler('onHandler', fieldName, defaulted(noop));
+    };
+    var onKeyboardHandler = function (fieldName) {
+      return onPresenceHandler('onKeyboardHandler', fieldName, defaulted(Option.none));
+    };
+    var onStrictHandler = function (fieldName) {
+      return onPresenceHandler('onHandler', fieldName, strict());
+    };
+    var onStrictKeyboardHandler = function (fieldName) {
+      return onPresenceHandler('onKeyboardHandler', fieldName, strict());
+    };
+    var output = function (name, value) {
+      return state$1(name, constant(value));
+    };
+    var snapshot = function (name) {
+      return state$1(name, identity);
+    };
+    var initSize = constant(_initSize);
+
+    var ReceivingSchema = [strictOf('channels', setOf$1(Result.value, objOfOnly([
+        onStrictHandler('onReceive'),
+        defaulted$1('schema', anyValue$1())
+      ])))];
+
+    var Receiving = create$1({
+      fields: ReceivingSchema,
+      name: 'receiving',
+      active: ActiveReceiving
+    });
+
+    var updateAriaState = function (component, toggleConfig, toggleState) {
+      var ariaInfo = toggleConfig.aria;
+      ariaInfo.update(component, ariaInfo, toggleState.get());
+    };
+    var updateClass = function (component, toggleConfig, toggleState) {
+      toggleConfig.toggleClass.each(function (toggleClass) {
+        if (toggleState.get()) {
+          add$2(component.element(), toggleClass);
+        } else {
+          remove$4(component.element(), toggleClass);
+        }
+      });
+    };
+    var toggle = function (component, toggleConfig, toggleState) {
+      set$2(component, toggleConfig, toggleState, !toggleState.get());
+    };
+    var on = function (component, toggleConfig, toggleState) {
+      toggleState.set(true);
+      updateClass(component, toggleConfig, toggleState);
+      updateAriaState(component, toggleConfig, toggleState);
+    };
+    var off = function (component, toggleConfig, toggleState) {
+      toggleState.set(false);
+      updateClass(component, toggleConfig, toggleState);
+      updateAriaState(component, toggleConfig, toggleState);
+    };
+    var set$2 = function (component, toggleConfig, toggleState, state) {
+      var action = state ? on : off;
+      action(component, toggleConfig, toggleState);
+    };
+    var isOn = function (component, toggleConfig, toggleState) {
+      return toggleState.get();
+    };
+    var onLoad = function (component, toggleConfig, toggleState) {
+      set$2(component, toggleConfig, toggleState, toggleConfig.selected);
+    };
+
+    var ToggleApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        onLoad: onLoad,
+        toggle: toggle,
+        isOn: isOn,
+        on: on,
+        off: off,
+        set: set$2
+    });
+
+    var exhibit = function () {
+      return nu$5({});
+    };
+    var events$1 = function (toggleConfig, toggleState) {
+      var execute = executeEvent(toggleConfig, toggleState, toggle);
+      var load = loadEvent(toggleConfig, toggleState, onLoad);
+      return derive(flatten([
+        toggleConfig.toggleOnExecute ? [execute] : [],
+        [load]
+      ]));
+    };
+
+    var ActiveToggle = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        exhibit: exhibit,
+        events: events$1
+    });
+
+    var SetupBehaviourCellState = function (initialState) {
+      var init = function () {
+        var cell = Cell(initialState);
+        var get = function () {
+          return cell.get();
+        };
+        var set = function (newState) {
+          return cell.set(newState);
+        };
+        var clear = function () {
+          return cell.set(initialState);
+        };
+        var readState = function () {
+          return cell.get();
+        };
+        return {
+          get: get,
+          set: set,
+          clear: clear,
+          readState: readState
+        };
+      };
+      return { init: init };
+    };
+
+    var updatePressed = function (component, ariaInfo, status) {
+      set(component.element(), 'aria-pressed', status);
+      if (ariaInfo.syncWithExpanded) {
+        updateExpanded(component, ariaInfo, status);
+      }
+    };
+    var updateSelected = function (component, ariaInfo, status) {
+      set(component.element(), 'aria-selected', status);
+    };
+    var updateChecked = function (component, ariaInfo, status) {
+      set(component.element(), 'aria-checked', status);
+    };
+    var updateExpanded = function (component, ariaInfo, status) {
+      set(component.element(), 'aria-expanded', status);
+    };
+
+    var ToggleSchema = [
+      defaulted$1('selected', false),
+      option('toggleClass'),
+      defaulted$1('toggleOnExecute', true),
+      defaultedOf('aria', { mode: 'none' }, choose$1('mode', {
+        pressed: [
+          defaulted$1('syncWithExpanded', false),
+          output('update', updatePressed)
+        ],
+        checked: [output('update', updateChecked)],
+        expanded: [output('update', updateExpanded)],
+        selected: [output('update', updateSelected)],
+        none: [output('update', noop)]
+      }))
+    ];
+
+    var Toggling = create$1({
+      fields: ToggleSchema,
+      name: 'toggling',
+      active: ActiveToggle,
+      apis: ToggleApis,
+      state: SetupBehaviourCellState(false)
+    });
+
+    var format = function (command, update) {
+      return Receiving.config({
+        channels: wrap$1(formatChanged, {
+          onReceive: function (button, data) {
+            if (data.command === command) {
+              update(button, data.state);
+            }
+          }
+        })
+      });
+    };
+    var orientation = function (onReceive) {
+      return Receiving.config({ channels: wrap$1(orientationChanged, { onReceive: onReceive }) });
+    };
+    var receive$1 = function (channel, onReceive) {
+      return {
+        key: channel,
+        value: { onReceive: onReceive }
+      };
+    };
+
+    var prefix = 'tinymce-mobile';
+    var resolve = function (p) {
+      return prefix + '-' + p;
+    };
+
+    var pointerEvents = function () {
+      var onClick = function (component, simulatedEvent) {
+        simulatedEvent.stop();
+        emitExecute(component);
+      };
+      return [
+        run(click(), onClick),
+        run(tap(), onClick),
+        cutter(touchstart()),
+        cutter(mousedown())
+      ];
+    };
+    var events$2 = function (optAction) {
+      var executeHandler = function (action) {
+        return runOnExecute(function (component, simulatedEvent) {
+          action(component);
+          simulatedEvent.stop();
+        });
+      };
+      return derive(flatten([
+        optAction.map(executeHandler).toArray(),
+        pointerEvents()
+      ]));
+    };
+
+    var focus$2 = function (component, focusConfig) {
+      if (!focusConfig.ignore) {
+        focus$1(component.element());
+        focusConfig.onFocus(component);
+      }
+    };
+    var blur$1 = function (component, focusConfig) {
+      if (!focusConfig.ignore) {
+        blur(component.element());
+      }
+    };
+    var isFocused = function (component) {
+      return hasFocus(component.element());
+    };
+
+    var FocusApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        focus: focus$2,
+        blur: blur$1,
+        isFocused: isFocused
+    });
+
+    var exhibit$1 = function (base, focusConfig) {
+      var mod = focusConfig.ignore ? {} : { attributes: { tabindex: '-1' } };
+      return nu$5(mod);
+    };
+    var events$3 = function (focusConfig) {
+      return derive([run(focus(), function (component, simulatedEvent) {
+          focus$2(component, focusConfig);
+          simulatedEvent.stop();
+        })].concat(focusConfig.stopMousedown ? [run(mousedown(), function (_, simulatedEvent) {
+          simulatedEvent.event().prevent();
+        })] : []));
+    };
+
+    var ActiveFocus = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        exhibit: exhibit$1,
+        events: events$3
+    });
+
+    var FocusSchema = [
+      onHandler('onFocus'),
+      defaulted$1('stopMousedown', false),
+      defaulted$1('ignore', false)
+    ];
+
+    var Focusing = create$1({
+      fields: FocusSchema,
+      name: 'focusing',
+      active: ActiveFocus,
+      apis: FocusApis
+    });
+
+    var isSupported = function (dom) {
+      return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
+    };
+
+    var internalSet = function (dom, property, value) {
+      if (!isString(value)) {
+        domGlobals.console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);
+        throw new Error('CSS value must be a string: ' + value);
+      }
+      if (isSupported(dom)) {
+        dom.style.setProperty(property, value);
+      }
+    };
+    var internalRemove = function (dom, property) {
+      if (isSupported(dom)) {
+        dom.style.removeProperty(property);
+      }
+    };
+    var set$3 = function (element, property, value) {
+      var dom = element.dom();
+      internalSet(dom, property, value);
+    };
+    var setAll$1 = function (element, css) {
+      var dom = element.dom();
+      each(css, function (v, k) {
+        internalSet(dom, k, v);
+      });
+    };
+    var get$4 = function (element, property) {
+      var dom = element.dom();
+      var styles = domGlobals.window.getComputedStyle(dom);
+      var r = styles.getPropertyValue(property);
+      return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
+    };
+    var getUnsafeProperty = function (dom, property) {
+      return isSupported(dom) ? dom.style.getPropertyValue(property) : '';
+    };
+    var getRaw = function (element, property) {
+      var dom = element.dom();
+      var raw = getUnsafeProperty(dom, property);
+      return Option.from(raw).filter(function (r) {
+        return r.length > 0;
+      });
+    };
+    var remove$5 = function (element, property) {
+      var dom = element.dom();
+      internalRemove(dom, property);
+      if (getOpt(element, 'style').map(trim).is('')) {
+        remove$1(element, 'style');
+      }
+    };
+    var reflow = function (e) {
+      return e.dom().offsetWidth;
+    };
+
+    function Dimension (name, getOffset) {
+      var set = function (element, h) {
+        if (!isNumber(h) && !h.match(/^[0-9]+$/)) {
+          throw new Error(name + '.set accepts only positive integer values. Value was ' + h);
+        }
+        var dom = element.dom();
+        if (isSupported(dom)) {
+          dom.style[name] = h + 'px';
+        }
+      };
+      var get = function (element) {
+        var r = getOffset(element);
+        if (r <= 0 || r === null) {
+          var css = get$4(element, name);
+          return parseFloat(css) || 0;
+        }
+        return r;
+      };
+      var getOuter = get;
+      var aggregate = function (element, properties) {
+        return foldl(properties, function (acc, property) {
+          var val = get$4(element, property);
+          var value = val === undefined ? 0 : parseInt(val, 10);
+          return isNaN(value) ? acc : acc + value;
+        }, 0);
+      };
+      var max = function (element, value, properties) {
+        var cumulativeInclusions = aggregate(element, properties);
+        var absoluteMax = value > cumulativeInclusions ? value - cumulativeInclusions : 0;
+        return absoluteMax;
+      };
+      return {
+        set: set,
+        get: get,
+        getOuter: getOuter,
+        aggregate: aggregate,
+        max: max
+      };
+    }
+
+    var api = Dimension('height', function (element) {
+      var dom = element.dom();
+      return inBody(element) ? dom.getBoundingClientRect().height : dom.offsetHeight;
+    });
+    var get$5 = function (element) {
+      return api.get(element);
+    };
+
+    var ancestors = function (scope, predicate, isRoot) {
+      return filter$1(parents(scope, isRoot), predicate);
+    };
+    var siblings$1 = function (scope, predicate) {
+      return filter$1(siblings(scope), predicate);
+    };
+
+    var all$2 = function (selector) {
+      return all(selector);
+    };
+    var ancestors$1 = function (scope, selector, isRoot) {
+      return ancestors(scope, function (e) {
+        return is(e, selector);
+      }, isRoot);
+    };
+    var siblings$2 = function (scope, selector) {
+      return siblings$1(scope, function (e) {
+        return is(e, selector);
+      });
+    };
+    var descendants = function (scope, selector) {
+      return all(selector, scope);
+    };
+
+    var first = function (selector) {
+      return one(selector);
+    };
+    var ancestor$2 = function (scope, selector, isRoot) {
+      return ancestor$1(scope, function (e) {
+        return is(e, selector);
+      }, isRoot);
+    };
+    var descendant$1 = function (scope, selector) {
+      return one(selector, scope);
+    };
+    var closest$2 = function (scope, selector, isRoot) {
+      var is$1 = function (element, selector) {
+        return is(element, selector);
+      };
+      return ClosestOrAncestor(is$1, ancestor$2, scope, selector, isRoot);
+    };
+
+    var BACKSPACE = function () {
+      return [8];
+    };
+    var TAB = function () {
+      return [9];
+    };
+    var ENTER = function () {
+      return [13];
+    };
+    var ESCAPE = function () {
+      return [27];
+    };
+    var SPACE = function () {
+      return [32];
+    };
+    var LEFT = function () {
+      return [37];
+    };
+    var UP = function () {
+      return [38];
+    };
+    var RIGHT = function () {
+      return [39];
+    };
+    var DOWN = function () {
+      return [40];
+    };
+
+    var cyclePrev = function (values, index, predicate) {
+      var before = reverse(values.slice(0, index));
+      var after = reverse(values.slice(index + 1));
+      return find$2(before.concat(after), predicate);
+    };
+    var tryPrev = function (values, index, predicate) {
+      var before = reverse(values.slice(0, index));
+      return find$2(before, predicate);
+    };
+    var cycleNext = function (values, index, predicate) {
+      var before = values.slice(0, index);
+      var after = values.slice(index + 1);
+      return find$2(after.concat(before), predicate);
+    };
+    var tryNext = function (values, index, predicate) {
+      var after = values.slice(index + 1);
+      return find$2(after, predicate);
+    };
+
+    var inSet = function (keys) {
+      return function (event) {
+        var raw = event.raw();
+        return contains(keys, raw.which);
+      };
+    };
+    var and = function (preds) {
+      return function (event) {
+        return forall(preds, function (pred) {
+          return pred(event);
+        });
+      };
+    };
+    var isShift = function (event) {
+      var raw = event.raw();
+      return raw.shiftKey === true;
+    };
+    var isControl = function (event) {
+      var raw = event.raw();
+      return raw.ctrlKey === true;
+    };
+    var isNotShift = not(isShift);
+
+    var rule = function (matches, action) {
+      return {
+        matches: matches,
+        classification: action
+      };
+    };
+    var choose$2 = function (transitions, event) {
+      var transition = find$2(transitions, function (t) {
+        return t.matches(event);
+      });
+      return transition.map(function (t) {
+        return t.classification;
+      });
+    };
+
+    var cat = function (arr) {
+      var r = [];
+      var push = function (x) {
+        r.push(x);
+      };
+      for (var i = 0; i < arr.length; i++) {
+        arr[i].each(push);
+      }
+      return r;
+    };
+    var sequence = function (arr) {
+      var r = [];
+      for (var i = 0; i < arr.length; i++) {
+        var x = arr[i];
+        if (x.isSome()) {
+          r.push(x.getOrDie());
+        } else {
+          return Option.none();
+        }
+      }
+      return Option.some(r);
+    };
+    var someIf = function (b, a) {
+      return b ? Option.some(a) : Option.none();
+    };
+
+    var cycleBy = function (value, delta, min, max) {
+      var r = value + delta;
+      return r > max ? min : r < min ? max : r;
+    };
+    var clamp = function (value, min, max) {
+      return Math.min(Math.max(value, min), max);
+    };
+
+    var dehighlightAllExcept = function (component, hConfig, hState, skip) {
+      var highlighted = descendants(component.element(), '.' + hConfig.highlightClass);
+      each$1(highlighted, function (h) {
+        if (!exists(skip, function (skipComp) {
+            return skipComp.element() === h;
+          })) {
+          remove$4(h, hConfig.highlightClass);
+          component.getSystem().getByDom(h).each(function (target) {
+            hConfig.onDehighlight(component, target);
+            emit(target, dehighlight());
+          });
+        }
+      });
+    };
+    var dehighlightAll = function (component, hConfig, hState) {
+      return dehighlightAllExcept(component, hConfig, hState, []);
+    };
+    var dehighlight$1 = function (component, hConfig, hState, target) {
+      if (isHighlighted(component, hConfig, hState, target)) {
+        remove$4(target.element(), hConfig.highlightClass);
+        hConfig.onDehighlight(component, target);
+        emit(target, dehighlight());
+      }
+    };
+    var highlight$1 = function (component, hConfig, hState, target) {
+      dehighlightAllExcept(component, hConfig, hState, [target]);
+      if (!isHighlighted(component, hConfig, hState, target)) {
+        add$2(target.element(), hConfig.highlightClass);
+        hConfig.onHighlight(component, target);
+        emit(target, highlight());
+      }
+    };
+    var highlightFirst = function (component, hConfig, hState) {
+      getFirst(component, hConfig).each(function (firstComp) {
+        highlight$1(component, hConfig, hState, firstComp);
+      });
+    };
+    var highlightLast = function (component, hConfig, hState) {
+      getLast(component, hConfig).each(function (lastComp) {
+        highlight$1(component, hConfig, hState, lastComp);
+      });
+    };
+    var highlightAt = function (component, hConfig, hState, index) {
+      getByIndex(component, hConfig, hState, index).fold(function (err) {
+        throw new Error(err);
+      }, function (firstComp) {
+        highlight$1(component, hConfig, hState, firstComp);
+      });
+    };
+    var highlightBy = function (component, hConfig, hState, predicate) {
+      var candidates = getCandidates(component, hConfig);
+      var targetComp = find$2(candidates, predicate);
+      targetComp.each(function (c) {
+        highlight$1(component, hConfig, hState, c);
+      });
+    };
+    var isHighlighted = function (component, hConfig, hState, queryTarget) {
+      return has$2(queryTarget.element(), hConfig.highlightClass);
+    };
+    var getHighlighted = function (component, hConfig, _hState) {
+      return descendant$1(component.element(), '.' + hConfig.highlightClass).bind(function (e) {
+        return component.getSystem().getByDom(e).toOption();
+      });
+    };
+    var getByIndex = function (component, hConfig, hState, index) {
+      var items = descendants(component.element(), '.' + hConfig.itemClass);
+      return Option.from(items[index]).fold(function () {
+        return Result.error('No element found with index ' + index);
+      }, component.getSystem().getByDom);
+    };
+    var getFirst = function (component, hConfig, _hState) {
+      return descendant$1(component.element(), '.' + hConfig.itemClass).bind(function (e) {
+        return component.getSystem().getByDom(e).toOption();
+      });
+    };
+    var getLast = function (component, hConfig, _hState) {
+      var items = descendants(component.element(), '.' + hConfig.itemClass);
+      var last = items.length > 0 ? Option.some(items[items.length - 1]) : Option.none();
+      return last.bind(function (c) {
+        return component.getSystem().getByDom(c).toOption();
+      });
+    };
+    var getDelta = function (component, hConfig, hState, delta) {
+      var items = descendants(component.element(), '.' + hConfig.itemClass);
+      var current = findIndex(items, function (item) {
+        return has$2(item, hConfig.highlightClass);
+      });
+      return current.bind(function (selected) {
+        var dest = cycleBy(selected, delta, 0, items.length - 1);
+        return component.getSystem().getByDom(items[dest]).toOption();
+      });
+    };
+    var getPrevious = function (component, hConfig, hState) {
+      return getDelta(component, hConfig, hState, -1);
+    };
+    var getNext = function (component, hConfig, hState) {
+      return getDelta(component, hConfig, hState, +1);
+    };
+    var getCandidates = function (component, hConfig, _hState) {
+      var items = descendants(component.element(), '.' + hConfig.itemClass);
+      return cat(map$1(items, function (i) {
+        return component.getSystem().getByDom(i).toOption();
+      }));
+    };
+
+    var HighlightApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        dehighlightAll: dehighlightAll,
+        dehighlight: dehighlight$1,
+        highlight: highlight$1,
+        highlightFirst: highlightFirst,
+        highlightLast: highlightLast,
+        highlightAt: highlightAt,
+        highlightBy: highlightBy,
+        isHighlighted: isHighlighted,
+        getHighlighted: getHighlighted,
+        getFirst: getFirst,
+        getLast: getLast,
+        getPrevious: getPrevious,
+        getNext: getNext,
+        getCandidates: getCandidates
+    });
+
+    var HighlightSchema = [
+      strict$1('highlightClass'),
+      strict$1('itemClass'),
+      onHandler('onHighlight'),
+      onHandler('onDehighlight')
+    ];
+
+    var Highlighting = create$1({
+      fields: HighlightSchema,
+      name: 'highlighting',
+      apis: HighlightApis
+    });
+
+    var reportFocusShifting = function (component, prevFocus, newFocus) {
+      var noChange = prevFocus.exists(function (p) {
+        return newFocus.exists(function (n) {
+          return eq(n, p);
+        });
+      });
+      if (!noChange) {
+        emitWith(component, focusShifted(), {
+          prevFocus: prevFocus,
+          newFocus: newFocus
+        });
+      }
+    };
+    var dom = function () {
+      var get = function (component) {
+        return search(component.element());
+      };
+      var set = function (component, focusee) {
+        var prevFocus = get(component);
+        component.getSystem().triggerFocus(focusee, component.element());
+        var newFocus = get(component);
+        reportFocusShifting(component, prevFocus, newFocus);
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+    var highlights = function () {
+      var get = function (component) {
+        return Highlighting.getHighlighted(component).map(function (item) {
+          return item.element();
+        });
+      };
+      var set = function (component, element) {
+        var prevFocus = get(component);
+        component.getSystem().getByDom(element).fold(noop, function (item) {
+          Highlighting.highlight(component, item);
+        });
+        var newFocus = get(component);
+        reportFocusShifting(component, prevFocus, newFocus);
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var FocusInsideModes;
+    (function (FocusInsideModes) {
+      FocusInsideModes['OnFocusMode'] = 'onFocus';
+      FocusInsideModes['OnEnterOrSpaceMode'] = 'onEnterOrSpace';
+      FocusInsideModes['OnApiMode'] = 'onApi';
+    }(FocusInsideModes || (FocusInsideModes = {})));
+
+    var typical = function (infoSchema, stateInit, getKeydownRules, getKeyupRules, optFocusIn) {
+      var schema = function () {
+        return infoSchema.concat([
+          defaulted$1('focusManager', dom()),
+          defaultedOf('focusInside', 'onFocus', valueOf(function (val) {
+            return contains([
+              'onFocus',
+              'onEnterOrSpace',
+              'onApi'
+            ], val) ? Result.value(val) : Result.error('Invalid value for focusInside');
+          })),
+          output('handler', me),
+          output('state', stateInit),
+          output('sendFocusIn', optFocusIn)
+        ]);
+      };
+      var processKey = function (component, simulatedEvent, getRules, keyingConfig, keyingState) {
+        var rules = getRules(component, simulatedEvent, keyingConfig, keyingState);
+        return choose$2(rules, simulatedEvent.event()).bind(function (rule) {
+          return rule(component, simulatedEvent, keyingConfig, keyingState);
+        });
+      };
+      var toEvents = function (keyingConfig, keyingState) {
+        var onFocusHandler = keyingConfig.focusInside !== FocusInsideModes.OnFocusMode ? Option.none() : optFocusIn(keyingConfig).map(function (focusIn) {
+          return run(focus(), function (component, simulatedEvent) {
+            focusIn(component, keyingConfig, keyingState);
+            simulatedEvent.stop();
+          });
+        });
+        var tryGoInsideComponent = function (component, simulatedEvent) {
+          var isEnterOrSpace = inSet(SPACE().concat(ENTER()))(simulatedEvent.event());
+          if (keyingConfig.focusInside === FocusInsideModes.OnEnterOrSpaceMode && isEnterOrSpace && isSource(component, simulatedEvent)) {
+            optFocusIn(keyingConfig).each(function (focusIn) {
+              focusIn(component, keyingConfig, keyingState);
+              simulatedEvent.stop();
+            });
+          }
+        };
+        var keyboardEvents = [
+          run(keydown(), function (component, simulatedEvent) {
+            processKey(component, simulatedEvent, getKeydownRules, keyingConfig, keyingState).fold(function () {
+              tryGoInsideComponent(component, simulatedEvent);
+            }, function (_) {
+              simulatedEvent.stop();
+            });
+          }),
+          run(keyup(), function (component, simulatedEvent) {
+            processKey(component, simulatedEvent, getKeyupRules, keyingConfig, keyingState).each(function (_) {
+              simulatedEvent.stop();
+            });
+          })
+        ];
+        return derive(onFocusHandler.toArray().concat(keyboardEvents));
+      };
+      var me = {
+        schema: schema,
+        processKey: processKey,
+        toEvents: toEvents
+      };
+      return me;
+    };
+
+    var create$2 = function (cyclicField) {
+      var schema = [
+        option('onEscape'),
+        option('onEnter'),
+        defaulted$1('selector', '[data-alloy-tabstop="true"]:not(:disabled)'),
+        defaulted$1('firstTabstop', 0),
+        defaulted$1('useTabstopAt', constant(true)),
+        option('visibilitySelector')
+      ].concat([cyclicField]);
+      var isVisible = function (tabbingConfig, element) {
+        var target = tabbingConfig.visibilitySelector.bind(function (sel) {
+          return closest$2(element, sel);
+        }).getOr(element);
+        return get$5(target) > 0;
+      };
+      var findInitial = function (component, tabbingConfig) {
+        var tabstops = descendants(component.element(), tabbingConfig.selector);
+        var visibles = filter$1(tabstops, function (elem) {
+          return isVisible(tabbingConfig, elem);
+        });
+        return Option.from(visibles[tabbingConfig.firstTabstop]);
+      };
+      var findCurrent = function (component, tabbingConfig) {
+        return tabbingConfig.focusManager.get(component).bind(function (elem) {
+          return closest$2(elem, tabbingConfig.selector);
+        });
+      };
+      var isTabstop = function (tabbingConfig, element) {
+        return isVisible(tabbingConfig, element) && tabbingConfig.useTabstopAt(element);
+      };
+      var focusIn = function (component, tabbingConfig, _tabbingState) {
+        findInitial(component, tabbingConfig).each(function (target) {
+          tabbingConfig.focusManager.set(component, target);
+        });
+      };
+      var goFromTabstop = function (component, tabstops, stopIndex, tabbingConfig, cycle) {
+        return cycle(tabstops, stopIndex, function (elem) {
+          return isTabstop(tabbingConfig, elem);
+        }).fold(function () {
+          return tabbingConfig.cyclic ? Option.some(true) : Option.none();
+        }, function (target) {
+          tabbingConfig.focusManager.set(component, target);
+          return Option.some(true);
+        });
+      };
+      var go = function (component, _simulatedEvent, tabbingConfig, cycle) {
+        var tabstops = descendants(component.element(), tabbingConfig.selector);
+        return findCurrent(component, tabbingConfig).bind(function (tabstop) {
+          var optStopIndex = findIndex(tabstops, curry(eq, tabstop));
+          return optStopIndex.bind(function (stopIndex) {
+            return goFromTabstop(component, tabstops, stopIndex, tabbingConfig, cycle);
+          });
+        });
+      };
+      var goBackwards = function (component, simulatedEvent, tabbingConfig) {
+        var navigate = tabbingConfig.cyclic ? cyclePrev : tryPrev;
+        return go(component, simulatedEvent, tabbingConfig, navigate);
+      };
+      var goForwards = function (component, simulatedEvent, tabbingConfig) {
+        var navigate = tabbingConfig.cyclic ? cycleNext : tryNext;
+        return go(component, simulatedEvent, tabbingConfig, navigate);
+      };
+      var execute = function (component, simulatedEvent, tabbingConfig) {
+        return tabbingConfig.onEnter.bind(function (f) {
+          return f(component, simulatedEvent);
+        });
+      };
+      var exit = function (component, simulatedEvent, tabbingConfig) {
+        return tabbingConfig.onEscape.bind(function (f) {
+          return f(component, simulatedEvent);
+        });
+      };
+      var getKeydownRules = constant([
+        rule(and([
+          isShift,
+          inSet(TAB())
+        ]), goBackwards),
+        rule(inSet(TAB()), goForwards),
+        rule(inSet(ESCAPE()), exit),
+        rule(and([
+          isNotShift,
+          inSet(ENTER())
+        ]), execute)
+      ]);
+      var getKeyupRules = constant([]);
+      return typical(schema, NoState.init, getKeydownRules, getKeyupRules, function () {
+        return Option.some(focusIn);
+      });
+    };
+
+    var AcyclicType = create$2(state$1('cyclic', constant(false)));
+
+    var CyclicType = create$2(state$1('cyclic', constant(true)));
+
+    var inside = function (target) {
+      return name(target) === 'input' && get$1(target, 'type') !== 'radio' || name(target) === 'textarea';
+    };
+
+    var doDefaultExecute = function (component, _simulatedEvent, focused) {
+      dispatch(component, focused, execute());
+      return Option.some(true);
+    };
+    var defaultExecute = function (component, simulatedEvent, focused) {
+      var isComplex = inside(focused) && inSet(SPACE())(simulatedEvent.event());
+      return isComplex ? Option.none() : doDefaultExecute(component, simulatedEvent, focused);
+    };
+    var stopEventForFirefox = function (_component, _simulatedEvent) {
+      return Option.some(true);
+    };
+
+    var schema$1 = [
+      defaulted$1('execute', defaultExecute),
+      defaulted$1('useSpace', false),
+      defaulted$1('useEnter', true),
+      defaulted$1('useControlEnter', false),
+      defaulted$1('useDown', false)
+    ];
+    var execute$1 = function (component, simulatedEvent, executeConfig) {
+      return executeConfig.execute(component, simulatedEvent, component.element());
+    };
+    var getKeydownRules = function (component, _simulatedEvent, executeConfig, _executeState) {
+      var spaceExec = executeConfig.useSpace && !inside(component.element()) ? SPACE() : [];
+      var enterExec = executeConfig.useEnter ? ENTER() : [];
+      var downExec = executeConfig.useDown ? DOWN() : [];
+      var execKeys = spaceExec.concat(enterExec).concat(downExec);
+      return [rule(inSet(execKeys), execute$1)].concat(executeConfig.useControlEnter ? [rule(and([
+          isControl,
+          inSet(ENTER())
+        ]), execute$1)] : []);
+    };
+    var getKeyupRules = function (component, _simulatedEvent, executeConfig, _executeState) {
+      return executeConfig.useSpace && !inside(component.element()) ? [rule(inSet(SPACE()), stopEventForFirefox)] : [];
+    };
+    var ExecutionType = typical(schema$1, NoState.init, getKeydownRules, getKeyupRules, function () {
+      return Option.none();
+    });
+
+    var flatgrid = function () {
+      var dimensions = Cell(Option.none());
+      var setGridSize = function (numRows, numColumns) {
+        dimensions.set(Option.some({
+          numRows: numRows,
+          numColumns: numColumns
+        }));
+      };
+      var getNumRows = function () {
+        return dimensions.get().map(function (d) {
+          return d.numRows;
+        });
+      };
+      var getNumColumns = function () {
+        return dimensions.get().map(function (d) {
+          return d.numColumns;
+        });
+      };
+      return nu$6({
+        readState: function () {
+          return dimensions.get().map(function (d) {
+            return {
+              numRows: String(d.numRows),
+              numColumns: String(d.numColumns)
+            };
+          }).getOr({
+            numRows: '?',
+            numColumns: '?'
+          });
+        },
+        setGridSize: setGridSize,
+        getNumRows: getNumRows,
+        getNumColumns: getNumColumns
+      });
+    };
+    var init = function (spec) {
+      return spec.state(spec);
+    };
+
+    var KeyingState = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        flatgrid: flatgrid,
+        init: init
+    });
+
+    var onDirection = function (isLtr, isRtl) {
+      return function (element) {
+        return getDirection(element) === 'rtl' ? isRtl : isLtr;
+      };
+    };
+    var getDirection = function (element) {
+      return get$4(element, 'direction') === 'rtl' ? 'rtl' : 'ltr';
+    };
+
+    var useH = function (movement) {
+      return function (component, simulatedEvent, config, state) {
+        var move = movement(component.element());
+        return use(move, component, simulatedEvent, config, state);
+      };
+    };
+    var west = function (moveLeft, moveRight) {
+      var movement = onDirection(moveLeft, moveRight);
+      return useH(movement);
+    };
+    var east = function (moveLeft, moveRight) {
+      var movement = onDirection(moveRight, moveLeft);
+      return useH(movement);
+    };
+    var useV = function (move) {
+      return function (component, simulatedEvent, config, state) {
+        return use(move, component, simulatedEvent, config, state);
+      };
+    };
+    var use = function (move, component, simulatedEvent, config, state) {
+      var outcome = config.focusManager.get(component).bind(function (focused) {
+        return move(component.element(), focused, config, state);
+      });
+      return outcome.map(function (newFocus) {
+        config.focusManager.set(component, newFocus);
+        return true;
+      });
+    };
+    var north = useV;
+    var south = useV;
+    var move = useV;
+
+    var isHidden = function (dom) {
+      return dom.offsetWidth <= 0 && dom.offsetHeight <= 0;
+    };
+    var isVisible = function (element) {
+      return !isHidden(element.dom());
+    };
+
+    var locate = function (candidates, predicate) {
+      return findIndex(candidates, predicate).map(function (index) {
+        return {
+          index: constant(index),
+          candidates: constant(candidates)
+        };
+      });
+    };
+
+    var locateVisible = function (container, current, selector) {
+      var predicate = function (x) {
+        return eq(x, current);
+      };
+      var candidates = descendants(container, selector);
+      var visible = filter$1(candidates, isVisible);
+      return locate(visible, predicate);
+    };
+    var findIndex$1 = function (elements, target) {
+      return findIndex(elements, function (elem) {
+        return eq(target, elem);
+      });
+    };
+
+    var withGrid = function (values, index, numCols, f) {
+      var oldRow = Math.floor(index / numCols);
+      var oldColumn = index % numCols;
+      return f(oldRow, oldColumn).bind(function (address) {
+        var newIndex = address.row() * numCols + address.column();
+        return newIndex >= 0 && newIndex < values.length ? Option.some(values[newIndex]) : Option.none();
+      });
+    };
+    var cycleHorizontal = function (values, index, numRows, numCols, delta) {
+      return withGrid(values, index, numCols, function (oldRow, oldColumn) {
+        var onLastRow = oldRow === numRows - 1;
+        var colsInRow = onLastRow ? values.length - oldRow * numCols : numCols;
+        var newColumn = cycleBy(oldColumn, delta, 0, colsInRow - 1);
+        return Option.some({
+          row: constant(oldRow),
+          column: constant(newColumn)
+        });
+      });
+    };
+    var cycleVertical = function (values, index, numRows, numCols, delta) {
+      return withGrid(values, index, numCols, function (oldRow, oldColumn) {
+        var newRow = cycleBy(oldRow, delta, 0, numRows - 1);
+        var onLastRow = newRow === numRows - 1;
+        var colsInRow = onLastRow ? values.length - newRow * numCols : numCols;
+        var newCol = clamp(oldColumn, 0, colsInRow - 1);
+        return Option.some({
+          row: constant(newRow),
+          column: constant(newCol)
+        });
+      });
+    };
+    var cycleRight = function (values, index, numRows, numCols) {
+      return cycleHorizontal(values, index, numRows, numCols, +1);
+    };
+    var cycleLeft = function (values, index, numRows, numCols) {
+      return cycleHorizontal(values, index, numRows, numCols, -1);
+    };
+    var cycleUp = function (values, index, numRows, numCols) {
+      return cycleVertical(values, index, numRows, numCols, -1);
+    };
+    var cycleDown = function (values, index, numRows, numCols) {
+      return cycleVertical(values, index, numRows, numCols, +1);
+    };
+
+    var schema$2 = [
+      strict$1('selector'),
+      defaulted$1('execute', defaultExecute),
+      onKeyboardHandler('onEscape'),
+      defaulted$1('captureTab', false),
+      initSize()
+    ];
+    var focusIn = function (component, gridConfig, _gridState) {
+      descendant$1(component.element(), gridConfig.selector).each(function (first) {
+        gridConfig.focusManager.set(component, first);
+      });
+    };
+    var findCurrent = function (component, gridConfig) {
+      return gridConfig.focusManager.get(component).bind(function (elem) {
+        return closest$2(elem, gridConfig.selector);
+      });
+    };
+    var execute$2 = function (component, simulatedEvent, gridConfig, _gridState) {
+      return findCurrent(component, gridConfig).bind(function (focused) {
+        return gridConfig.execute(component, simulatedEvent, focused);
+      });
+    };
+    var doMove = function (cycle) {
+      return function (element, focused, gridConfig, gridState) {
+        return locateVisible(element, focused, gridConfig.selector).bind(function (identified) {
+          return cycle(identified.candidates(), identified.index(), gridState.getNumRows().getOr(gridConfig.initSize.numRows), gridState.getNumColumns().getOr(gridConfig.initSize.numColumns));
+        });
+      };
+    };
+    var handleTab = function (_component, _simulatedEvent, gridConfig) {
+      return gridConfig.captureTab ? Option.some(true) : Option.none();
+    };
+    var doEscape = function (component, simulatedEvent, gridConfig) {
+      return gridConfig.onEscape(component, simulatedEvent);
+    };
+    var moveLeft = doMove(cycleLeft);
+    var moveRight = doMove(cycleRight);
+    var moveNorth = doMove(cycleUp);
+    var moveSouth = doMove(cycleDown);
+    var getKeydownRules$1 = constant([
+      rule(inSet(LEFT()), west(moveLeft, moveRight)),
+      rule(inSet(RIGHT()), east(moveLeft, moveRight)),
+      rule(inSet(UP()), north(moveNorth)),
+      rule(inSet(DOWN()), south(moveSouth)),
+      rule(and([
+        isShift,
+        inSet(TAB())
+      ]), handleTab),
+      rule(and([
+        isNotShift,
+        inSet(TAB())
+      ]), handleTab),
+      rule(inSet(ESCAPE()), doEscape),
+      rule(inSet(SPACE().concat(ENTER())), execute$2)
+    ]);
+    var getKeyupRules$1 = constant([rule(inSet(SPACE()), stopEventForFirefox)]);
+    var FlatgridType = typical(schema$2, flatgrid, getKeydownRules$1, getKeyupRules$1, function () {
+      return Option.some(focusIn);
+    });
+
+    var horizontal = function (container, selector, current, delta) {
+      var isDisabledButton = function (candidate) {
+        return name(candidate) === 'button' && get$1(candidate, 'disabled') === 'disabled';
+      };
+      var tryCycle = function (initial, index, candidates) {
+        var newIndex = cycleBy(index, delta, 0, candidates.length - 1);
+        if (newIndex === initial) {
+          return Option.none();
+        } else {
+          return isDisabledButton(candidates[newIndex]) ? tryCycle(initial, newIndex, candidates) : Option.from(candidates[newIndex]);
+        }
+      };
+      return locateVisible(container, current, selector).bind(function (identified) {
+        var index = identified.index();
+        var candidates = identified.candidates();
+        return tryCycle(index, index, candidates);
+      });
+    };
+
+    var schema$3 = [
+      strict$1('selector'),
+      defaulted$1('getInitial', Option.none),
+      defaulted$1('execute', defaultExecute),
+      onKeyboardHandler('onEscape'),
+      defaulted$1('executeOnMove', false),
+      defaulted$1('allowVertical', true)
+    ];
+    var findCurrent$1 = function (component, flowConfig) {
+      return flowConfig.focusManager.get(component).bind(function (elem) {
+        return closest$2(elem, flowConfig.selector);
+      });
+    };
+    var execute$3 = function (component, simulatedEvent, flowConfig) {
+      return findCurrent$1(component, flowConfig).bind(function (focused) {
+        return flowConfig.execute(component, simulatedEvent, focused);
+      });
+    };
+    var focusIn$1 = function (component, flowConfig, _state) {
+      flowConfig.getInitial(component).orThunk(function () {
+        return descendant$1(component.element(), flowConfig.selector);
+      }).each(function (first) {
+        flowConfig.focusManager.set(component, first);
+      });
+    };
+    var moveLeft$1 = function (element, focused, info) {
+      return horizontal(element, info.selector, focused, -1);
+    };
+    var moveRight$1 = function (element, focused, info) {
+      return horizontal(element, info.selector, focused, +1);
+    };
+    var doMove$1 = function (movement) {
+      return function (component, simulatedEvent, flowConfig, flowState) {
+        return movement(component, simulatedEvent, flowConfig, flowState).bind(function () {
+          return flowConfig.executeOnMove ? execute$3(component, simulatedEvent, flowConfig) : Option.some(true);
+        });
+      };
+    };
+    var doEscape$1 = function (component, simulatedEvent, flowConfig) {
+      return flowConfig.onEscape(component, simulatedEvent);
+    };
+    var getKeydownRules$2 = function (_component, _se, flowConfig, _flowState) {
+      var westMovers = LEFT().concat(flowConfig.allowVertical ? UP() : []);
+      var eastMovers = RIGHT().concat(flowConfig.allowVertical ? DOWN() : []);
+      return [
+        rule(inSet(westMovers), doMove$1(west(moveLeft$1, moveRight$1))),
+        rule(inSet(eastMovers), doMove$1(east(moveLeft$1, moveRight$1))),
+        rule(inSet(ENTER()), execute$3),
+        rule(inSet(SPACE()), execute$3),
+        rule(inSet(ESCAPE()), doEscape$1)
+      ];
+    };
+    var getKeyupRules$2 = constant([rule(inSet(SPACE()), stopEventForFirefox)]);
+    var FlowType = typical(schema$3, NoState.init, getKeydownRules$2, getKeyupRules$2, function () {
+      return Option.some(focusIn$1);
+    });
+
+    var toCell = function (matrix, rowIndex, columnIndex) {
+      return Option.from(matrix[rowIndex]).bind(function (row) {
+        return Option.from(row[columnIndex]).map(function (cell) {
+          return {
+            rowIndex: rowIndex,
+            columnIndex: columnIndex,
+            cell: cell
+          };
+        });
+      });
+    };
+    var cycleHorizontal$1 = function (matrix, rowIndex, startCol, deltaCol) {
+      var row = matrix[rowIndex];
+      var colsInRow = row.length;
+      var newColIndex = cycleBy(startCol, deltaCol, 0, colsInRow - 1);
+      return toCell(matrix, rowIndex, newColIndex);
+    };
+    var cycleVertical$1 = function (matrix, colIndex, startRow, deltaRow) {
+      var nextRowIndex = cycleBy(startRow, deltaRow, 0, matrix.length - 1);
+      var colsInNextRow = matrix[nextRowIndex].length;
+      var nextColIndex = clamp(colIndex, 0, colsInNextRow - 1);
+      return toCell(matrix, nextRowIndex, nextColIndex);
+    };
+    var moveHorizontal = function (matrix, rowIndex, startCol, deltaCol) {
+      var row = matrix[rowIndex];
+      var colsInRow = row.length;
+      var newColIndex = clamp(startCol + deltaCol, 0, colsInRow - 1);
+      return toCell(matrix, rowIndex, newColIndex);
+    };
+    var moveVertical = function (matrix, colIndex, startRow, deltaRow) {
+      var nextRowIndex = clamp(startRow + deltaRow, 0, matrix.length - 1);
+      var colsInNextRow = matrix[nextRowIndex].length;
+      var nextColIndex = clamp(colIndex, 0, colsInNextRow - 1);
+      return toCell(matrix, nextRowIndex, nextColIndex);
+    };
+    var cycleRight$1 = function (matrix, startRow, startCol) {
+      return cycleHorizontal$1(matrix, startRow, startCol, +1);
+    };
+    var cycleLeft$1 = function (matrix, startRow, startCol) {
+      return cycleHorizontal$1(matrix, startRow, startCol, -1);
+    };
+    var cycleUp$1 = function (matrix, startRow, startCol) {
+      return cycleVertical$1(matrix, startCol, startRow, -1);
+    };
+    var cycleDown$1 = function (matrix, startRow, startCol) {
+      return cycleVertical$1(matrix, startCol, startRow, +1);
+    };
+    var moveLeft$2 = function (matrix, startRow, startCol) {
+      return moveHorizontal(matrix, startRow, startCol, -1);
+    };
+    var moveRight$2 = function (matrix, startRow, startCol) {
+      return moveHorizontal(matrix, startRow, startCol, +1);
+    };
+    var moveUp = function (matrix, startRow, startCol) {
+      return moveVertical(matrix, startCol, startRow, -1);
+    };
+    var moveDown = function (matrix, startRow, startCol) {
+      return moveVertical(matrix, startCol, startRow, +1);
+    };
+
+    var schema$4 = [
+      strictObjOf('selectors', [
+        strict$1('row'),
+        strict$1('cell')
+      ]),
+      defaulted$1('cycles', true),
+      defaulted$1('previousSelector', Option.none),
+      defaulted$1('execute', defaultExecute)
+    ];
+    var focusIn$2 = function (component, matrixConfig, _state) {
+      var focused = matrixConfig.previousSelector(component).orThunk(function () {
+        var selectors = matrixConfig.selectors;
+        return descendant$1(component.element(), selectors.cell);
+      });
+      focused.each(function (cell) {
+        matrixConfig.focusManager.set(component, cell);
+      });
+    };
+    var execute$4 = function (component, simulatedEvent, matrixConfig) {
+      return search(component.element()).bind(function (focused) {
+        return matrixConfig.execute(component, simulatedEvent, focused);
+      });
+    };
+    var toMatrix = function (rows, matrixConfig) {
+      return map$1(rows, function (row) {
+        return descendants(row, matrixConfig.selectors.cell);
+      });
+    };
+    var doMove$2 = function (ifCycle, ifMove) {
+      return function (element, focused, matrixConfig) {
+        var move = matrixConfig.cycles ? ifCycle : ifMove;
+        return closest$2(focused, matrixConfig.selectors.row).bind(function (inRow) {
+          var cellsInRow = descendants(inRow, matrixConfig.selectors.cell);
+          return findIndex$1(cellsInRow, focused).bind(function (colIndex) {
+            var allRows = descendants(element, matrixConfig.selectors.row);
+            return findIndex$1(allRows, inRow).bind(function (rowIndex) {
+              var matrix = toMatrix(allRows, matrixConfig);
+              return move(matrix, rowIndex, colIndex).map(function (next) {
+                return next.cell;
+              });
+            });
+          });
+        });
+      };
+    };
+    var moveLeft$3 = doMove$2(cycleLeft$1, moveLeft$2);
+    var moveRight$3 = doMove$2(cycleRight$1, moveRight$2);
+    var moveNorth$1 = doMove$2(cycleUp$1, moveUp);
+    var moveSouth$1 = doMove$2(cycleDown$1, moveDown);
+    var getKeydownRules$3 = constant([
+      rule(inSet(LEFT()), west(moveLeft$3, moveRight$3)),
+      rule(inSet(RIGHT()), east(moveLeft$3, moveRight$3)),
+      rule(inSet(UP()), north(moveNorth$1)),
+      rule(inSet(DOWN()), south(moveSouth$1)),
+      rule(inSet(SPACE().concat(ENTER())), execute$4)
+    ]);
+    var getKeyupRules$3 = constant([rule(inSet(SPACE()), stopEventForFirefox)]);
+    var MatrixType = typical(schema$4, NoState.init, getKeydownRules$3, getKeyupRules$3, function () {
+      return Option.some(focusIn$2);
+    });
+
+    var schema$5 = [
+      strict$1('selector'),
+      defaulted$1('execute', defaultExecute),
+      defaulted$1('moveOnTab', false)
+    ];
+    var execute$5 = function (component, simulatedEvent, menuConfig) {
+      return menuConfig.focusManager.get(component).bind(function (focused) {
+        return menuConfig.execute(component, simulatedEvent, focused);
+      });
+    };
+    var focusIn$3 = function (component, menuConfig, _state) {
+      descendant$1(component.element(), menuConfig.selector).each(function (first) {
+        menuConfig.focusManager.set(component, first);
+      });
+    };
+    var moveUp$1 = function (element, focused, info) {
+      return horizontal(element, info.selector, focused, -1);
+    };
+    var moveDown$1 = function (element, focused, info) {
+      return horizontal(element, info.selector, focused, +1);
+    };
+    var fireShiftTab = function (component, simulatedEvent, menuConfig, menuState) {
+      return menuConfig.moveOnTab ? move(moveUp$1)(component, simulatedEvent, menuConfig, menuState) : Option.none();
+    };
+    var fireTab = function (component, simulatedEvent, menuConfig, menuState) {
+      return menuConfig.moveOnTab ? move(moveDown$1)(component, simulatedEvent, menuConfig, menuState) : Option.none();
+    };
+    var getKeydownRules$4 = constant([
+      rule(inSet(UP()), move(moveUp$1)),
+      rule(inSet(DOWN()), move(moveDown$1)),
+      rule(and([
+        isShift,
+        inSet(TAB())
+      ]), fireShiftTab),
+      rule(and([
+        isNotShift,
+        inSet(TAB())
+      ]), fireTab),
+      rule(inSet(ENTER()), execute$5),
+      rule(inSet(SPACE()), execute$5)
+    ]);
+    var getKeyupRules$4 = constant([rule(inSet(SPACE()), stopEventForFirefox)]);
+    var MenuType = typical(schema$5, NoState.init, getKeydownRules$4, getKeyupRules$4, function () {
+      return Option.some(focusIn$3);
+    });
+
+    var schema$6 = [
+      onKeyboardHandler('onSpace'),
+      onKeyboardHandler('onEnter'),
+      onKeyboardHandler('onShiftEnter'),
+      onKeyboardHandler('onLeft'),
+      onKeyboardHandler('onRight'),
+      onKeyboardHandler('onTab'),
+      onKeyboardHandler('onShiftTab'),
+      onKeyboardHandler('onUp'),
+      onKeyboardHandler('onDown'),
+      onKeyboardHandler('onEscape'),
+      defaulted$1('stopSpaceKeyup', false),
+      option('focusIn')
+    ];
+    var getKeydownRules$5 = function (component, simulatedEvent, specialInfo) {
+      return [
+        rule(inSet(SPACE()), specialInfo.onSpace),
+        rule(and([
+          isNotShift,
+          inSet(ENTER())
+        ]), specialInfo.onEnter),
+        rule(and([
+          isShift,
+          inSet(ENTER())
+        ]), specialInfo.onShiftEnter),
+        rule(and([
+          isShift,
+          inSet(TAB())
+        ]), specialInfo.onShiftTab),
+        rule(and([
+          isNotShift,
+          inSet(TAB())
+        ]), specialInfo.onTab),
+        rule(inSet(UP()), specialInfo.onUp),
+        rule(inSet(DOWN()), specialInfo.onDown),
+        rule(inSet(LEFT()), specialInfo.onLeft),
+        rule(inSet(RIGHT()), specialInfo.onRight),
+        rule(inSet(SPACE()), specialInfo.onSpace),
+        rule(inSet(ESCAPE()), specialInfo.onEscape)
+      ];
+    };
+    var getKeyupRules$5 = function (component, simulatedEvent, specialInfo) {
+      return specialInfo.stopSpaceKeyup ? [rule(inSet(SPACE()), stopEventForFirefox)] : [];
+    };
+    var SpecialType = typical(schema$6, NoState.init, getKeydownRules$5, getKeyupRules$5, function (specialInfo) {
+      return specialInfo.focusIn;
+    });
+
+    var acyclic = AcyclicType.schema();
+    var cyclic = CyclicType.schema();
+    var flow = FlowType.schema();
+    var flatgrid$1 = FlatgridType.schema();
+    var matrix = MatrixType.schema();
+    var execution = ExecutionType.schema();
+    var menu = MenuType.schema();
+    var special = SpecialType.schema();
+
+    var KeyboardBranches = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        acyclic: acyclic,
+        cyclic: cyclic,
+        flow: flow,
+        flatgrid: flatgrid$1,
+        matrix: matrix,
+        execution: execution,
+        menu: menu,
+        special: special
+    });
+
+    var isFlatgridState = function (keyState) {
+      return hasNonNullableKey(keyState, 'setGridSize');
+    };
+    var Keying = createModes$1({
+      branchKey: 'mode',
+      branches: KeyboardBranches,
+      name: 'keying',
+      active: {
+        events: function (keyingConfig, keyingState) {
+          var handler = keyingConfig.handler;
+          return handler.toEvents(keyingConfig, keyingState);
+        }
+      },
+      apis: {
+        focusIn: function (component, keyConfig, keyState) {
+          keyConfig.sendFocusIn(keyConfig).fold(function () {
+            component.getSystem().triggerFocus(component.element(), component.element());
+          }, function (sendFocusIn) {
+            sendFocusIn(component, keyConfig, keyState);
+          });
+        },
+        setGridSize: function (component, keyConfig, keyState, numRows, numColumns) {
+          if (!isFlatgridState(keyState)) {
+            domGlobals.console.error('Layout does not support setGridSize');
+          } else {
+            keyState.setGridSize(numRows, numColumns);
+          }
+        }
+      },
+      state: KeyingState
+    });
+
+    var field$1 = function (name, forbidden) {
+      return defaultedObjOf(name, {}, map$1(forbidden, function (f) {
+        return forbid(f.name(), 'Cannot configure ' + f.name() + ' for ' + name);
+      }).concat([state$1('dump', identity)]));
+    };
+    var get$6 = function (data) {
+      return data.dump;
+    };
+    var augment = function (data, original) {
+      return __assign(__assign({}, data.dump), derive$1(original));
+    };
+    var SketchBehaviours = {
+      field: field$1,
+      augment: augment,
+      get: get$6
+    };
+
+    var _placeholder = 'placeholder';
+    var adt$2 = Adt.generate([
+      {
+        single: [
+          'required',
+          'valueThunk'
+        ]
+      },
+      {
+        multiple: [
+          'required',
+          'valueThunks'
+        ]
+      }
+    ]);
+    var isSubstituted = function (spec) {
+      return has(spec, 'uiType');
+    };
+    var subPlaceholder = function (owner, detail, compSpec, placeholders) {
+      if (owner.exists(function (o) {
+          return o !== compSpec.owner;
+        })) {
+        return adt$2.single(true, constant(compSpec));
+      }
+      return get(placeholders, compSpec.name).fold(function () {
+        throw new Error('Unknown placeholder component: ' + compSpec.name + '\nKnown: [' + keys(placeholders) + ']\nNamespace: ' + owner.getOr('none') + '\nSpec: ' + JSON.stringify(compSpec, null, 2));
+      }, function (newSpec) {
+        return newSpec.replace();
+      });
+    };
+    var scan = function (owner, detail, compSpec, placeholders) {
+      if (isSubstituted(compSpec) && compSpec.uiType === _placeholder) {
+        return subPlaceholder(owner, detail, compSpec, placeholders);
+      } else {
+        return adt$2.single(false, constant(compSpec));
+      }
+    };
+    var substitute = function (owner, detail, compSpec, placeholders) {
+      var base = scan(owner, detail, compSpec, placeholders);
+      return base.fold(function (req, valueThunk) {
+        var value = isSubstituted(compSpec) ? valueThunk(detail, compSpec.config, compSpec.validated) : valueThunk(detail);
+        var childSpecs = get(value, 'components').getOr([]);
+        var substituted = bind(childSpecs, function (c) {
+          return substitute(owner, detail, c, placeholders);
+        });
+        return [__assign(__assign({}, value), { components: substituted })];
+      }, function (req, valuesThunk) {
+        if (isSubstituted(compSpec)) {
+          var values = valuesThunk(detail, compSpec.config, compSpec.validated);
+          var preprocessor = compSpec.validated.preprocess.getOr(identity);
+          return preprocessor(values);
+        } else {
+          return valuesThunk(detail);
+        }
+      });
+    };
+    var substituteAll = function (owner, detail, components, placeholders) {
+      return bind(components, function (c) {
+        return substitute(owner, detail, c, placeholders);
+      });
+    };
+    var oneReplace = function (label, replacements) {
+      var called = false;
+      var used = function () {
+        return called;
+      };
+      var replace = function () {
+        if (called) {
+          throw new Error('Trying to use the same placeholder more than once: ' + label);
+        }
+        called = true;
+        return replacements;
+      };
+      var required = function () {
+        return replacements.fold(function (req, _) {
+          return req;
+        }, function (req, _) {
+          return req;
+        });
+      };
+      return {
+        name: constant(label),
+        required: required,
+        used: used,
+        replace: replace
+      };
+    };
+    var substitutePlaces = function (owner, detail, components, placeholders) {
+      var ps = map(placeholders, function (ph, name) {
+        return oneReplace(name, ph);
+      });
+      var outcome = substituteAll(owner, detail, components, ps);
+      each(ps, function (p) {
+        if (p.used() === false && p.required()) {
+          throw new Error('Placeholder: ' + p.name() + ' was not found in components list\nNamespace: ' + owner.getOr('none') + '\nComponents: ' + JSON.stringify(detail.components, null, 2));
+        }
+      });
+      return outcome;
+    };
+    var single = adt$2.single;
+    var multiple = adt$2.multiple;
+    var placeholder = constant(_placeholder);
+
+    var unique = 0;
+    var generate$1 = function (prefix) {
+      var date = new Date();
+      var time = date.getTime();
+      var random = Math.floor(Math.random() * 1000000000);
+      unique++;
+      return prefix + '_' + random + unique + String(time);
+    };
+
+    var adt$3 = Adt.generate([
+      { required: ['data'] },
+      { external: ['data'] },
+      { optional: ['data'] },
+      { group: ['data'] }
+    ]);
+    var fFactory = defaulted$1('factory', { sketch: identity });
+    var fSchema = defaulted$1('schema', []);
+    var fName = strict$1('name');
+    var fPname = field('pname', 'pname', defaultedThunk(function (typeSpec) {
+      return '<alloy.' + generate$1(typeSpec.name) + '>';
+    }), anyValue$1());
+    var fGroupSchema = state$1('schema', function () {
+      return [option('preprocess')];
+    });
+    var fDefaults = defaulted$1('defaults', constant({}));
+    var fOverrides = defaulted$1('overrides', constant({}));
+    var requiredSpec = objOf([
+      fFactory,
+      fSchema,
+      fName,
+      fPname,
+      fDefaults,
+      fOverrides
+    ]);
+    var externalSpec = objOf([
+      fFactory,
+      fSchema,
+      fName,
+      fDefaults,
+      fOverrides
+    ]);
+    var optionalSpec = objOf([
+      fFactory,
+      fSchema,
+      fName,
+      fPname,
+      fDefaults,
+      fOverrides
+    ]);
+    var groupSpec = objOf([
+      fFactory,
+      fGroupSchema,
+      fName,
+      strict$1('unit'),
+      fPname,
+      fDefaults,
+      fOverrides
+    ]);
+    var asNamedPart = function (part) {
+      return part.fold(Option.some, Option.none, Option.some, Option.some);
+    };
+    var name$1 = function (part) {
+      var get = function (data) {
+        return data.name;
+      };
+      return part.fold(get, get, get, get);
+    };
+    var convert = function (adtConstructor, partSchema) {
+      return function (spec) {
+        var data = asRawOrDie('Converting part type', partSchema, spec);
+        return adtConstructor(data);
+      };
+    };
+    var required = convert(adt$3.required, requiredSpec);
+    var external = convert(adt$3.external, externalSpec);
+    var optional = convert(adt$3.optional, optionalSpec);
+    var group = convert(adt$3.group, groupSpec);
+    var original = constant('entirety');
+
+    var combine = function (detail, data, partSpec, partValidated) {
+      return deepMerge(data.defaults(detail, partSpec, partValidated), partSpec, { uid: detail.partUids[data.name] }, data.overrides(detail, partSpec, partValidated));
+    };
+    var subs = function (owner, detail, parts) {
+      var internals = {};
+      var externals = {};
+      each$1(parts, function (part) {
+        part.fold(function (data) {
+          internals[data.pname] = single(true, function (detail, partSpec, partValidated) {
+            return data.factory.sketch(combine(detail, data, partSpec, partValidated));
+          });
+        }, function (data) {
+          var partSpec = detail.parts[data.name];
+          externals[data.name] = constant(data.factory.sketch(combine(detail, data, partSpec[original()]), partSpec));
+        }, function (data) {
+          internals[data.pname] = single(false, function (detail, partSpec, partValidated) {
+            return data.factory.sketch(combine(detail, data, partSpec, partValidated));
+          });
+        }, function (data) {
+          internals[data.pname] = multiple(true, function (detail, _partSpec, _partValidated) {
+            var units = detail[data.name];
+            return map$1(units, function (u) {
+              return data.factory.sketch(deepMerge(data.defaults(detail, u, _partValidated), u, data.overrides(detail, u)));
+            });
+          });
+        });
+      });
+      return {
+        internals: constant(internals),
+        externals: constant(externals)
+      };
+    };
+
+    var generate$2 = function (owner, parts) {
+      var r = {};
+      each$1(parts, function (part) {
+        asNamedPart(part).each(function (np) {
+          var g = doGenerateOne(owner, np.pname);
+          r[np.name] = function (config) {
+            var validated = asRawOrDie('Part: ' + np.name + ' in ' + owner, objOf(np.schema), config);
+            return __assign(__assign({}, g), {
+              config: config,
+              validated: validated
+            });
+          };
+        });
+      });
+      return r;
+    };
+    var doGenerateOne = function (owner, pname) {
+      return {
+        uiType: placeholder(),
+        owner: owner,
+        name: pname
+      };
+    };
+    var generateOne = function (owner, pname, config) {
+      return {
+        uiType: placeholder(),
+        owner: owner,
+        name: pname,
+        config: config,
+        validated: {}
+      };
+    };
+    var schemas = function (parts) {
+      return bind(parts, function (part) {
+        return part.fold(Option.none, Option.some, Option.none, Option.none).map(function (data) {
+          return strictObjOf(data.name, data.schema.concat([snapshot(original())]));
+        }).toArray();
+      });
+    };
+    var names = function (parts) {
+      return map$1(parts, name$1);
+    };
+    var substitutes = function (owner, detail, parts) {
+      return subs(owner, detail, parts);
+    };
+    var components = function (owner, detail, internals) {
+      return substitutePlaces(Option.some(owner), detail, detail.components, internals);
+    };
+    var getPart = function (component, detail, partKey) {
+      var uid = detail.partUids[partKey];
+      return component.getSystem().getByUid(uid).toOption();
+    };
+    var getPartOrDie = function (component, detail, partKey) {
+      return getPart(component, detail, partKey).getOrDie('Could not find part: ' + partKey);
+    };
+    var getAllParts = function (component, detail) {
+      var system = component.getSystem();
+      return map(detail.partUids, function (pUid, _k) {
+        return constant(system.getByUid(pUid));
+      });
+    };
+    var defaultUids = function (baseUid, partTypes) {
+      var partNames = names(partTypes);
+      return wrapAll$1(map$1(partNames, function (pn) {
+        return {
+          key: pn,
+          value: baseUid + '-' + pn
+        };
+      }));
+    };
+    var defaultUidsSchema = function (partTypes) {
+      return field('partUids', 'partUids', mergeWithThunk(function (spec) {
+        return defaultUids(spec.uid, partTypes);
+      }), anyValue$1());
+    };
+
+    var premadeTag = generate$1('alloy-premade');
+    var premade = function (comp) {
+      return wrap$1(premadeTag, comp);
+    };
+    var getPremade = function (spec) {
+      return get(spec, premadeTag);
+    };
+    var makeApi = function (f) {
+      return markAsSketchApi(function (component) {
+        var rest = [];
+        for (var _i = 1; _i < arguments.length; _i++) {
+          rest[_i - 1] = arguments[_i];
+        }
+        return f.apply(void 0, __spreadArrays([
+          component.getApis(),
+          component
+        ], rest));
+      }, f);
+    };
+
+    var prefix$1 = constant('alloy-id-');
+    var idAttr = constant('data-alloy-id');
+
+    var prefix$2 = prefix$1();
+    var idAttr$1 = idAttr();
+    var write = function (label, elem) {
+      var id = generate$1(prefix$2 + label);
+      writeOnly(elem, id);
+      return id;
+    };
+    var writeOnly = function (elem, uid) {
+      Object.defineProperty(elem.dom(), idAttr$1, {
+        value: uid,
+        writable: true
+      });
+    };
+    var read$2 = function (elem) {
+      var id = isElement(elem) ? elem.dom()[idAttr$1] : null;
+      return Option.from(id);
+    };
+    var generate$3 = function (prefix) {
+      return generate$1(prefix);
+    };
+
+    var base = function (partSchemas, partUidsSchemas) {
+      var ps = partSchemas.length > 0 ? [strictObjOf('parts', partSchemas)] : [];
+      return ps.concat([
+        strict$1('uid'),
+        defaulted$1('dom', {}),
+        defaulted$1('components', []),
+        snapshot('originalSpec'),
+        defaulted$1('debug.sketcher', {})
+      ]).concat(partUidsSchemas);
+    };
+    var asRawOrDie$1 = function (label, schema, spec, partSchemas, partUidsSchemas) {
+      var baseS = base(partSchemas, partUidsSchemas);
+      return asRawOrDie(label + ' [SpecSchema]', objOfOnly(baseS.concat(schema)), spec);
+    };
+
+    var single$1 = function (owner, schema, factory, spec) {
+      var specWithUid = supplyUid(spec);
+      var detail = asRawOrDie$1(owner, schema, specWithUid, [], []);
+      return factory(detail, specWithUid);
+    };
+    var composite = function (owner, schema, partTypes, factory, spec) {
+      var specWithUid = supplyUid(spec);
+      var partSchemas = schemas(partTypes);
+      var partUidsSchema = defaultUidsSchema(partTypes);
+      var detail = asRawOrDie$1(owner, schema, specWithUid, partSchemas, [partUidsSchema]);
+      var subs = substitutes(owner, detail, partTypes);
+      var components$1 = components(owner, detail, subs.internals());
+      return factory(detail, components$1, specWithUid, subs.externals());
+    };
+    var hasUid = function (spec) {
+      return has(spec, 'uid');
+    };
+    var supplyUid = function (spec) {
+      return hasUid(spec) ? spec : __assign(__assign({}, spec), { uid: generate$3('uid') });
+    };
+
+    function isSketchSpec(spec) {
+      return spec.uid !== undefined;
+    }
+    var singleSchema = objOfOnly([
+      strict$1('name'),
+      strict$1('factory'),
+      strict$1('configFields'),
+      defaulted$1('apis', {}),
+      defaulted$1('extraApis', {})
+    ]);
+    var compositeSchema = objOfOnly([
+      strict$1('name'),
+      strict$1('factory'),
+      strict$1('configFields'),
+      strict$1('partFields'),
+      defaulted$1('apis', {}),
+      defaulted$1('extraApis', {})
+    ]);
+    var single$2 = function (rawConfig) {
+      var config = asRawOrDie('Sketcher for ' + rawConfig.name, singleSchema, rawConfig);
+      var sketch = function (spec) {
+        return single$1(config.name, config.configFields, config.factory, spec);
+      };
+      var apis = map(config.apis, makeApi);
+      var extraApis = map(config.extraApis, function (f, k) {
+        return markAsExtraApi(f, k);
+      });
+      return __assign(__assign({
+        name: constant(config.name),
+        configFields: constant(config.configFields),
+        sketch: sketch
+      }, apis), extraApis);
+    };
+    var composite$1 = function (rawConfig) {
+      var config = asRawOrDie('Sketcher for ' + rawConfig.name, compositeSchema, rawConfig);
+      var sketch = function (spec) {
+        return composite(config.name, config.configFields, config.partFields, config.factory, spec);
+      };
+      var parts = generate$2(config.name, config.partFields);
+      var apis = map(config.apis, makeApi);
+      var extraApis = map(config.extraApis, function (f, k) {
+        return markAsExtraApi(f, k);
+      });
+      return __assign(__assign({
+        name: constant(config.name),
+        partFields: constant(config.partFields),
+        configFields: constant(config.configFields),
+        sketch: sketch,
+        parts: constant(parts)
+      }, apis), extraApis);
+    };
+
+    var factory = function (detail) {
+      var events = events$2(detail.action);
+      var tag = detail.dom.tag;
+      var lookupAttr = function (attr) {
+        return get(detail.dom, 'attributes').bind(function (attrs) {
+          return get(attrs, attr);
+        });
+      };
+      var getModAttributes = function () {
+        if (tag === 'button') {
+          var type = lookupAttr('type').getOr('button');
+          var roleAttrs = lookupAttr('role').map(function (role) {
+            return { role: role };
+          }).getOr({});
+          return __assign({ type: type }, roleAttrs);
+        } else {
+          var role = lookupAttr('role').getOr('button');
+          return { role: role };
+        }
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: detail.components,
+        events: events,
+        behaviours: SketchBehaviours.augment(detail.buttonBehaviours, [
+          Focusing.config({}),
+          Keying.config({
+            mode: 'execution',
+            useSpace: true,
+            useEnter: true
+          })
+        ]),
+        domModification: { attributes: getModAttributes() },
+        eventOrder: detail.eventOrder
+      };
+    };
+    var Button = single$2({
+      name: 'Button',
+      factory: factory,
+      configFields: [
+        defaulted$1('uid', undefined),
+        strict$1('dom'),
+        defaulted$1('components', []),
+        SketchBehaviours.field('buttonBehaviours', [
+          Focusing,
+          Keying
+        ]),
+        option('action'),
+        option('role'),
+        defaulted$1('eventOrder', {})
+      ]
+    });
+
+    var exhibit$2 = function () {
+      return nu$5({
+        styles: {
+          '-webkit-user-select': 'none',
+          'user-select': 'none',
+          '-ms-user-select': 'none',
+          '-moz-user-select': '-moz-none'
+        },
+        attributes: { unselectable: 'on' }
+      });
+    };
+    var events$4 = function () {
+      return derive([abort(selectstart(), constant(true))]);
+    };
+
+    var ActiveUnselecting = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events$4,
+        exhibit: exhibit$2
+    });
+
+    var Unselecting = create$1({
+      fields: [],
+      name: 'unselecting',
+      active: ActiveUnselecting
+    });
+
+    var getAttrs = function (elem) {
+      var attributes = elem.dom().attributes !== undefined ? elem.dom().attributes : [];
+      return foldl(attributes, function (b, attr) {
+        var _a;
+        if (attr.name === 'class') {
+          return b;
+        } else {
+          return __assign(__assign({}, b), (_a = {}, _a[attr.name] = attr.value, _a));
+        }
+      }, {});
+    };
+    var getClasses = function (elem) {
+      return Array.prototype.slice.call(elem.dom().classList, 0);
+    };
+    var fromHtml$2 = function (html) {
+      var elem = Element.fromHtml(html);
+      var children$1 = children(elem);
+      var attrs = getAttrs(elem);
+      var classes = getClasses(elem);
+      var contents = children$1.length === 0 ? {} : { innerHtml: get$3(elem) };
+      return __assign({
+        tag: name(elem),
+        classes: classes,
+        attributes: attrs
+      }, contents);
+    };
+
+    var dom$1 = function (rawHtml) {
+      var html = supplant(rawHtml, { prefix: prefix });
+      return fromHtml$2(html);
+    };
+    var spec = function (rawHtml) {
+      return { dom: dom$1(rawHtml) };
+    };
+
+    var forToolbarCommand = function (editor, command) {
+      return forToolbar(command, function () {
+        editor.execCommand(command);
+      }, {}, editor);
+    };
+    var getToggleBehaviours = function (command) {
+      return derive$1([
+        Toggling.config({
+          toggleClass: resolve('toolbar-button-selected'),
+          toggleOnExecute: false,
+          aria: { mode: 'pressed' }
+        }),
+        format(command, function (button, status) {
+          var toggle = status ? Toggling.on : Toggling.off;
+          toggle(button);
+        })
+      ]);
+    };
+    var forToolbarStateCommand = function (editor, command) {
+      var extraBehaviours = getToggleBehaviours(command);
+      return forToolbar(command, function () {
+        editor.execCommand(command);
+      }, extraBehaviours, editor);
+    };
+    var forToolbarStateAction = function (editor, clazz, command, action) {
+      var extraBehaviours = getToggleBehaviours(command);
+      return forToolbar(clazz, action, extraBehaviours, editor);
+    };
+    var getToolbarIconButton = function (clazz, editor) {
+      var icons = editor.ui.registry.getAll().icons;
+      var optOxideIcon = Option.from(icons[clazz]);
+      return optOxideIcon.fold(function () {
+        return dom$1('<span class="${prefix}-toolbar-button ${prefix}-toolbar-group-item ${prefix}-icon-' + clazz + ' ${prefix}-icon"></span>');
+      }, function (icon) {
+        return dom$1('<span class="${prefix}-toolbar-button ${prefix}-toolbar-group-item">' + icon + '</span>');
+      });
+    };
+    var forToolbar = function (clazz, action, extraBehaviours, editor) {
+      return Button.sketch({
+        dom: getToolbarIconButton(clazz, editor),
+        action: action,
+        buttonBehaviours: deepMerge(derive$1([Unselecting.config({})]), extraBehaviours)
+      });
+    };
+
+    var labelPart = optional({
+      schema: [strict$1('dom')],
+      name: 'label'
+    });
+    var edgePart = function (name) {
+      return optional({
+        name: '' + name + '-edge',
+        overrides: function (detail) {
+          var action = detail.model.manager.edgeActions[name];
+          return action.fold(function () {
+            return {};
+          }, function (a) {
+            return {
+              events: derive([
+                runActionExtra(touchstart(), function (comp, se, d) {
+                  return a(comp, d);
+                }, [detail]),
+                runActionExtra(mousedown(), function (comp, se, d) {
+                  return a(comp, d);
+                }, [detail]),
+                runActionExtra(mousemove(), function (comp, se, det) {
+                  if (det.mouseIsDown.get()) {
+                    a(comp, det);
+                  }
+                }, [detail])
+              ])
+            };
+          });
+        }
+      });
+    };
+    var tlEdgePart = edgePart('top-left');
+    var tedgePart = edgePart('top');
+    var trEdgePart = edgePart('top-right');
+    var redgePart = edgePart('right');
+    var brEdgePart = edgePart('bottom-right');
+    var bedgePart = edgePart('bottom');
+    var blEdgePart = edgePart('bottom-left');
+    var ledgePart = edgePart('left');
+    var thumbPart = required({
+      name: 'thumb',
+      defaults: constant({ dom: { styles: { position: 'absolute' } } }),
+      overrides: function (detail) {
+        return {
+          events: derive([
+            redirectToPart(touchstart(), detail, 'spectrum'),
+            redirectToPart(touchmove(), detail, 'spectrum'),
+            redirectToPart(touchend(), detail, 'spectrum'),
+            redirectToPart(mousedown(), detail, 'spectrum'),
+            redirectToPart(mousemove(), detail, 'spectrum'),
+            redirectToPart(mouseup(), detail, 'spectrum')
+          ])
+        };
+      }
+    });
+    var spectrumPart = required({
+      schema: [state$1('mouseIsDown', function () {
+          return Cell(false);
+        })],
+      name: 'spectrum',
+      overrides: function (detail) {
+        var modelDetail = detail.model;
+        var model = modelDetail.manager;
+        var setValueFrom = function (component, simulatedEvent) {
+          return model.getValueFromEvent(simulatedEvent).map(function (value) {
+            return model.setValueFrom(component, detail, value);
+          });
+        };
+        return {
+          behaviours: derive$1([
+            Keying.config({
+              mode: 'special',
+              onLeft: function (spectrum) {
+                return model.onLeft(spectrum, detail);
+              },
+              onRight: function (spectrum) {
+                return model.onRight(spectrum, detail);
+              },
+              onUp: function (spectrum) {
+                return model.onUp(spectrum, detail);
+              },
+              onDown: function (spectrum) {
+                return model.onDown(spectrum, detail);
+              }
+            }),
+            Focusing.config({})
+          ]),
+          events: derive([
+            run(touchstart(), setValueFrom),
+            run(touchmove(), setValueFrom),
+            run(mousedown(), setValueFrom),
+            run(mousemove(), function (spectrum, se) {
+              if (detail.mouseIsDown.get()) {
+                setValueFrom(spectrum, se);
+              }
+            })
+          ])
+        };
+      }
+    });
+    var SliderParts = [
+      labelPart,
+      ledgePart,
+      redgePart,
+      tedgePart,
+      bedgePart,
+      tlEdgePart,
+      trEdgePart,
+      blEdgePart,
+      brEdgePart,
+      thumbPart,
+      spectrumPart
+    ];
+
+    var onLoad$1 = function (component, repConfig, repState) {
+      repConfig.store.manager.onLoad(component, repConfig, repState);
+    };
+    var onUnload = function (component, repConfig, repState) {
+      repConfig.store.manager.onUnload(component, repConfig, repState);
+    };
+    var setValue = function (component, repConfig, repState, data) {
+      repConfig.store.manager.setValue(component, repConfig, repState, data);
+    };
+    var getValue = function (component, repConfig, repState) {
+      return repConfig.store.manager.getValue(component, repConfig, repState);
+    };
+    var getState = function (component, repConfig, repState) {
+      return repState;
+    };
+
+    var RepresentApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        onLoad: onLoad$1,
+        onUnload: onUnload,
+        setValue: setValue,
+        getValue: getValue,
+        getState: getState
+    });
+
+    var events$5 = function (repConfig, repState) {
+      var es = repConfig.resetOnDom ? [
+        runOnAttached(function (comp, _se) {
+          onLoad$1(comp, repConfig, repState);
+        }),
+        runOnDetached(function (comp, _se) {
+          onUnload(comp, repConfig, repState);
+        })
+      ] : [loadEvent(repConfig, repState, onLoad$1)];
+      return derive(es);
+    };
+
+    var ActiveRepresenting = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events$5
+    });
+
+    var memory = function () {
+      var data = Cell(null);
+      var readState = function () {
+        return {
+          mode: 'memory',
+          value: data.get()
+        };
+      };
+      var isNotSet = function () {
+        return data.get() === null;
+      };
+      var clear = function () {
+        data.set(null);
+      };
+      return nu$6({
+        set: data.set,
+        get: data.get,
+        isNotSet: isNotSet,
+        clear: clear,
+        readState: readState
+      });
+    };
+    var manual = function () {
+      var readState = function () {
+      };
+      return nu$6({ readState: readState });
+    };
+    var dataset = function () {
+      var dataByValue = Cell({});
+      var dataByText = Cell({});
+      var readState = function () {
+        return {
+          mode: 'dataset',
+          dataByValue: dataByValue.get(),
+          dataByText: dataByText.get()
+        };
+      };
+      var clear = function () {
+        dataByValue.set({});
+        dataByText.set({});
+      };
+      var lookup = function (itemString) {
+        return get(dataByValue.get(), itemString).orThunk(function () {
+          return get(dataByText.get(), itemString);
+        });
+      };
+      var update = function (items) {
+        var currentDataByValue = dataByValue.get();
+        var currentDataByText = dataByText.get();
+        var newDataByValue = {};
+        var newDataByText = {};
+        each$1(items, function (item) {
+          newDataByValue[item.value] = item;
+          get(item, 'meta').each(function (meta) {
+            get(meta, 'text').each(function (text) {
+              newDataByText[text] = item;
+            });
+          });
+        });
+        dataByValue.set(__assign(__assign({}, currentDataByValue), newDataByValue));
+        dataByText.set(__assign(__assign({}, currentDataByText), newDataByText));
+      };
+      return nu$6({
+        readState: readState,
+        lookup: lookup,
+        update: update,
+        clear: clear
+      });
+    };
+    var init$1 = function (spec) {
+      return spec.store.manager.state(spec);
+    };
+
+    var RepresentState = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        memory: memory,
+        dataset: dataset,
+        manual: manual,
+        init: init$1
+    });
+
+    var setValue$1 = function (component, repConfig, repState, data) {
+      var store = repConfig.store;
+      repState.update([data]);
+      store.setValue(component, data);
+      repConfig.onSetValue(component, data);
+    };
+    var getValue$1 = function (component, repConfig, repState) {
+      var store = repConfig.store;
+      var key = store.getDataKey(component);
+      return repState.lookup(key).fold(function () {
+        return store.getFallbackEntry(key);
+      }, function (data) {
+        return data;
+      });
+    };
+    var onLoad$2 = function (component, repConfig, repState) {
+      var store = repConfig.store;
+      store.initialValue.each(function (data) {
+        setValue$1(component, repConfig, repState, data);
+      });
+    };
+    var onUnload$1 = function (component, repConfig, repState) {
+      repState.clear();
+    };
+    var DatasetStore = [
+      option('initialValue'),
+      strict$1('getFallbackEntry'),
+      strict$1('getDataKey'),
+      strict$1('setValue'),
+      output('manager', {
+        setValue: setValue$1,
+        getValue: getValue$1,
+        onLoad: onLoad$2,
+        onUnload: onUnload$1,
+        state: dataset
+      })
+    ];
+
+    var getValue$2 = function (component, repConfig, _repState) {
+      return repConfig.store.getValue(component);
+    };
+    var setValue$2 = function (component, repConfig, _repState, data) {
+      repConfig.store.setValue(component, data);
+      repConfig.onSetValue(component, data);
+    };
+    var onLoad$3 = function (component, repConfig, _repState) {
+      repConfig.store.initialValue.each(function (data) {
+        repConfig.store.setValue(component, data);
+      });
+    };
+    var ManualStore = [
+      strict$1('getValue'),
+      defaulted$1('setValue', noop),
+      option('initialValue'),
+      output('manager', {
+        setValue: setValue$2,
+        getValue: getValue$2,
+        onLoad: onLoad$3,
+        onUnload: noop,
+        state: NoState.init
+      })
+    ];
+
+    var setValue$3 = function (component, repConfig, repState, data) {
+      repState.set(data);
+      repConfig.onSetValue(component, data);
+    };
+    var getValue$3 = function (component, repConfig, repState) {
+      return repState.get();
+    };
+    var onLoad$4 = function (component, repConfig, repState) {
+      repConfig.store.initialValue.each(function (initVal) {
+        if (repState.isNotSet()) {
+          repState.set(initVal);
+        }
+      });
+    };
+    var onUnload$2 = function (component, repConfig, repState) {
+      repState.clear();
+    };
+    var MemoryStore = [
+      option('initialValue'),
+      output('manager', {
+        setValue: setValue$3,
+        getValue: getValue$3,
+        onLoad: onLoad$4,
+        onUnload: onUnload$2,
+        state: memory
+      })
+    ];
+
+    var RepresentSchema = [
+      defaultedOf('store', { mode: 'memory' }, choose$1('mode', {
+        memory: MemoryStore,
+        manual: ManualStore,
+        dataset: DatasetStore
+      })),
+      onHandler('onSetValue'),
+      defaulted$1('resetOnDom', false)
+    ];
+
+    var Representing = create$1({
+      fields: RepresentSchema,
+      name: 'representing',
+      active: ActiveRepresenting,
+      apis: RepresentApis,
+      extra: {
+        setValueFrom: function (component, source) {
+          var value = Representing.getValue(source);
+          Representing.setValue(component, value);
+        }
+      },
+      state: RepresentState
+    });
+
+    var api$1 = Dimension('width', function (element) {
+      return element.dom().offsetWidth;
+    });
+    var set$4 = function (element, h) {
+      return api$1.set(element, h);
+    };
+    var get$7 = function (element) {
+      return api$1.get(element);
+    };
+
+    var r = function (left, top) {
+      var translate = function (x, y) {
+        return r(left + x, top + y);
+      };
+      return {
+        left: constant(left),
+        top: constant(top),
+        translate: translate
+      };
+    };
+    var Position = r;
+
+    var _sliderChangeEvent = 'slider.change.value';
+    var sliderChangeEvent = constant(_sliderChangeEvent);
+    var isTouchEvent = function (evt) {
+      return evt.type.indexOf('touch') !== -1;
+    };
+    var getEventSource = function (simulatedEvent) {
+      var evt = simulatedEvent.event().raw();
+      if (isTouchEvent(evt)) {
+        var touchEvent = evt;
+        return touchEvent.touches !== undefined && touchEvent.touches.length === 1 ? Option.some(touchEvent.touches[0]).map(function (t) {
+          return Position(t.clientX, t.clientY);
+        }) : Option.none();
+      } else {
+        var mouseEvent = evt;
+        return mouseEvent.clientX !== undefined ? Option.some(mouseEvent).map(function (me) {
+          return Position(me.clientX, me.clientY);
+        }) : Option.none();
+      }
+    };
+
+    var t = 'top', r$1 = 'right', b = 'bottom', l = 'left';
+    var minX = function (detail) {
+      return detail.model.minX;
+    };
+    var minY = function (detail) {
+      return detail.model.minY;
+    };
+    var min1X = function (detail) {
+      return detail.model.minX - 1;
+    };
+    var min1Y = function (detail) {
+      return detail.model.minY - 1;
+    };
+    var maxX = function (detail) {
+      return detail.model.maxX;
+    };
+    var maxY = function (detail) {
+      return detail.model.maxY;
+    };
+    var max1X = function (detail) {
+      return detail.model.maxX + 1;
+    };
+    var max1Y = function (detail) {
+      return detail.model.maxY + 1;
+    };
+    var range = function (detail, max, min) {
+      return max(detail) - min(detail);
+    };
+    var xRange = function (detail) {
+      return range(detail, maxX, minX);
+    };
+    var yRange = function (detail) {
+      return range(detail, maxY, minY);
+    };
+    var halfX = function (detail) {
+      return xRange(detail) / 2;
+    };
+    var halfY = function (detail) {
+      return yRange(detail) / 2;
+    };
+    var step = function (detail) {
+      return detail.stepSize;
+    };
+    var snap = function (detail) {
+      return detail.snapToGrid;
+    };
+    var snapStart = function (detail) {
+      return detail.snapStart;
+    };
+    var rounded = function (detail) {
+      return detail.rounded;
+    };
+    var hasEdge = function (detail, edgeName) {
+      return detail[edgeName + '-edge'] !== undefined;
+    };
+    var hasLEdge = function (detail) {
+      return hasEdge(detail, l);
+    };
+    var hasREdge = function (detail) {
+      return hasEdge(detail, r$1);
+    };
+    var hasTEdge = function (detail) {
+      return hasEdge(detail, t);
+    };
+    var hasBEdge = function (detail) {
+      return hasEdge(detail, b);
+    };
+    var currentValue = function (detail) {
+      return detail.model.value.get();
+    };
+
+    var xValue = function (x) {
+      return { x: constant(x) };
+    };
+    var yValue = function (y) {
+      return { y: constant(y) };
+    };
+    var xyValue = function (x, y) {
+      return {
+        x: constant(x),
+        y: constant(y)
+      };
+    };
+    var fireSliderChange = function (component, value) {
+      emitWith(component, sliderChangeEvent(), { value: value });
+    };
+    var setToTLEdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(min1X(detail), min1Y(detail)));
+    };
+    var setToTEdge = function (edge, detail) {
+      fireSliderChange(edge, yValue(min1Y(detail)));
+    };
+    var setToTEdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(halfX(detail), min1Y(detail)));
+    };
+    var setToTREdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(max1X(detail), min1Y(detail)));
+    };
+    var setToREdge = function (edge, detail) {
+      fireSliderChange(edge, xValue(max1X(detail)));
+    };
+    var setToREdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(max1X(detail), halfY(detail)));
+    };
+    var setToBREdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(max1X(detail), max1Y(detail)));
+    };
+    var setToBEdge = function (edge, detail) {
+      fireSliderChange(edge, yValue(max1Y(detail)));
+    };
+    var setToBEdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(halfX(detail), max1Y(detail)));
+    };
+    var setToBLEdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(min1X(detail), max1Y(detail)));
+    };
+    var setToLEdge = function (edge, detail) {
+      fireSliderChange(edge, xValue(min1X(detail)));
+    };
+    var setToLEdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(min1X(detail), halfY(detail)));
+    };
+
+    var reduceBy = function (value, min, max, step) {
+      if (value < min) {
+        return value;
+      } else if (value > max) {
+        return max;
+      } else if (value === min) {
+        return min - 1;
+      } else {
+        return Math.max(min, value - step);
+      }
+    };
+    var increaseBy = function (value, min, max, step) {
+      if (value > max) {
+        return value;
+      } else if (value < min) {
+        return min;
+      } else if (value === max) {
+        return max + 1;
+      } else {
+        return Math.min(max, value + step);
+      }
+    };
+    var capValue = function (value, min, max) {
+      return Math.max(min, Math.min(max, value));
+    };
+    var snapValueOf = function (value, min, max, step, snapStart) {
+      return snapStart.fold(function () {
+        var initValue = value - min;
+        var extraValue = Math.round(initValue / step) * step;
+        return capValue(min + extraValue, min - 1, max + 1);
+      }, function (start) {
+        var remainder = (value - start) % step;
+        var adjustment = Math.round(remainder / step);
+        var rawSteps = Math.floor((value - start) / step);
+        var maxSteps = Math.floor((max - start) / step);
+        var numSteps = Math.min(maxSteps, rawSteps + adjustment);
+        var r = start + numSteps * step;
+        return Math.max(start, r);
+      });
+    };
+    var findOffsetOf = function (value, min, max) {
+      return Math.min(max, Math.max(value, min)) - min;
+    };
+    var findValueOf = function (args) {
+      var min = args.min, max = args.max, range = args.range, value = args.value, step = args.step, snap = args.snap, snapStart = args.snapStart, rounded = args.rounded, hasMinEdge = args.hasMinEdge, hasMaxEdge = args.hasMaxEdge, minBound = args.minBound, maxBound = args.maxBound, screenRange = args.screenRange;
+      var capMin = hasMinEdge ? min - 1 : min;
+      var capMax = hasMaxEdge ? max + 1 : max;
+      if (value < minBound) {
+        return capMin;
+      } else if (value > maxBound) {
+        return capMax;
+      } else {
+        var offset = findOffsetOf(value, minBound, maxBound);
+        var newValue = capValue(offset / screenRange * range + min, capMin, capMax);
+        if (snap && newValue >= min && newValue <= max) {
+          return snapValueOf(newValue, min, max, step, snapStart);
+        } else if (rounded) {
+          return Math.round(newValue);
+        } else {
+          return newValue;
+        }
+      }
+    };
+    var findOffsetOfValue = function (args) {
+      var min = args.min, max = args.max, range = args.range, value = args.value, hasMinEdge = args.hasMinEdge, hasMaxEdge = args.hasMaxEdge, maxBound = args.maxBound, maxOffset = args.maxOffset, centerMinEdge = args.centerMinEdge, centerMaxEdge = args.centerMaxEdge;
+      if (value < min) {
+        return hasMinEdge ? 0 : centerMinEdge;
+      } else if (value > max) {
+        return hasMaxEdge ? maxBound : centerMaxEdge;
+      } else {
+        return (value - min) / range * maxOffset;
+      }
+    };
+
+    var top = 'top', right = 'right', bottom = 'bottom', left = 'left', width = 'width', height = 'height';
+    var getBounds = function (component) {
+      return component.element().dom().getBoundingClientRect();
+    };
+    var getBoundsProperty = function (bounds, property) {
+      return bounds[property];
+    };
+    var getMinXBounds = function (component) {
+      var bounds = getBounds(component);
+      return getBoundsProperty(bounds, left);
+    };
+    var getMaxXBounds = function (component) {
+      var bounds = getBounds(component);
+      return getBoundsProperty(bounds, right);
+    };
+    var getMinYBounds = function (component) {
+      var bounds = getBounds(component);
+      return getBoundsProperty(bounds, top);
+    };
+    var getMaxYBounds = function (component) {
+      var bounds = getBounds(component);
+      return getBoundsProperty(bounds, bottom);
+    };
+    var getXScreenRange = function (component) {
+      var bounds = getBounds(component);
+      return getBoundsProperty(bounds, width);
+    };
+    var getYScreenRange = function (component) {
+      var bounds = getBounds(component);
+      return getBoundsProperty(bounds, height);
+    };
+    var getCenterOffsetOf = function (componentMinEdge, componentMaxEdge, spectrumMinEdge) {
+      return (componentMinEdge + componentMaxEdge) / 2 - spectrumMinEdge;
+    };
+    var getXCenterOffSetOf = function (component, spectrum) {
+      var componentBounds = getBounds(component);
+      var spectrumBounds = getBounds(spectrum);
+      var componentMinEdge = getBoundsProperty(componentBounds, left);
+      var componentMaxEdge = getBoundsProperty(componentBounds, right);
+      var spectrumMinEdge = getBoundsProperty(spectrumBounds, left);
+      return getCenterOffsetOf(componentMinEdge, componentMaxEdge, spectrumMinEdge);
+    };
+    var getYCenterOffSetOf = function (component, spectrum) {
+      var componentBounds = getBounds(component);
+      var spectrumBounds = getBounds(spectrum);
+      var componentMinEdge = getBoundsProperty(componentBounds, top);
+      var componentMaxEdge = getBoundsProperty(componentBounds, bottom);
+      var spectrumMinEdge = getBoundsProperty(spectrumBounds, top);
+      return getCenterOffsetOf(componentMinEdge, componentMaxEdge, spectrumMinEdge);
+    };
+
+    var fireSliderChange$1 = function (spectrum, value) {
+      emitWith(spectrum, sliderChangeEvent(), { value: value });
+    };
+    var sliderValue = function (x) {
+      return { x: constant(x) };
+    };
+    var findValueOfOffset = function (spectrum, detail, left) {
+      var args = {
+        min: minX(detail),
+        max: maxX(detail),
+        range: xRange(detail),
+        value: left,
+        step: step(detail),
+        snap: snap(detail),
+        snapStart: snapStart(detail),
+        rounded: rounded(detail),
+        hasMinEdge: hasLEdge(detail),
+        hasMaxEdge: hasREdge(detail),
+        minBound: getMinXBounds(spectrum),
+        maxBound: getMaxXBounds(spectrum),
+        screenRange: getXScreenRange(spectrum)
+      };
+      return findValueOf(args);
+    };
+    var setValueFrom = function (spectrum, detail, value) {
+      var xValue = findValueOfOffset(spectrum, detail, value);
+      var sliderVal = sliderValue(xValue);
+      fireSliderChange$1(spectrum, sliderVal);
+      return xValue;
+    };
+    var setToMin = function (spectrum, detail) {
+      var min = minX(detail);
+      fireSliderChange$1(spectrum, sliderValue(min));
+    };
+    var setToMax = function (spectrum, detail) {
+      var max = maxX(detail);
+      fireSliderChange$1(spectrum, sliderValue(max));
+    };
+    var moveBy = function (direction, spectrum, detail) {
+      var f = direction > 0 ? increaseBy : reduceBy;
+      var xValue = f(currentValue(detail).x(), minX(detail), maxX(detail), step(detail));
+      fireSliderChange$1(spectrum, sliderValue(xValue));
+      return Option.some(xValue);
+    };
+    var handleMovement = function (direction) {
+      return function (spectrum, detail) {
+        return moveBy(direction, spectrum, detail).map(function () {
+          return true;
+        });
+      };
+    };
+    var getValueFromEvent = function (simulatedEvent) {
+      var pos = getEventSource(simulatedEvent);
+      return pos.map(function (p) {
+        return p.left();
+      });
+    };
+    var findOffsetOfValue$1 = function (spectrum, detail, value, minEdge, maxEdge) {
+      var minOffset = 0;
+      var maxOffset = getXScreenRange(spectrum);
+      var centerMinEdge = minEdge.bind(function (edge) {
+        return Option.some(getXCenterOffSetOf(edge, spectrum));
+      }).getOr(minOffset);
+      var centerMaxEdge = maxEdge.bind(function (edge) {
+        return Option.some(getXCenterOffSetOf(edge, spectrum));
+      }).getOr(maxOffset);
+      var args = {
+        min: minX(detail),
+        max: maxX(detail),
+        range: xRange(detail),
+        value: value,
+        hasMinEdge: hasLEdge(detail),
+        hasMaxEdge: hasREdge(detail),
+        minBound: getMinXBounds(spectrum),
+        minOffset: minOffset,
+        maxBound: getMaxXBounds(spectrum),
+        maxOffset: maxOffset,
+        centerMinEdge: centerMinEdge,
+        centerMaxEdge: centerMaxEdge
+      };
+      return findOffsetOfValue(args);
+    };
+    var findPositionOfValue = function (slider, spectrum, value, minEdge, maxEdge, detail) {
+      var offset = findOffsetOfValue$1(spectrum, detail, value, minEdge, maxEdge);
+      return getMinXBounds(spectrum) - getMinXBounds(slider) + offset;
+    };
+    var setPositionFromValue = function (slider, thumb, detail, edges) {
+      var value = currentValue(detail);
+      var pos = findPositionOfValue(slider, edges.getSpectrum(slider), value.x(), edges.getLeftEdge(slider), edges.getRightEdge(slider), detail);
+      var thumbRadius = get$7(thumb.element()) / 2;
+      set$3(thumb.element(), 'left', pos - thumbRadius + 'px');
+    };
+    var onLeft = handleMovement(-1);
+    var onRight = handleMovement(1);
+    var onUp = Option.none;
+    var onDown = Option.none;
+    var edgeActions = {
+      'top-left': Option.none(),
+      'top': Option.none(),
+      'top-right': Option.none(),
+      'right': Option.some(setToREdge),
+      'bottom-right': Option.none(),
+      'bottom': Option.none(),
+      'bottom-left': Option.none(),
+      'left': Option.some(setToLEdge)
+    };
+
+    var HorizontalModel = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        setValueFrom: setValueFrom,
+        setToMin: setToMin,
+        setToMax: setToMax,
+        findValueOfOffset: findValueOfOffset,
+        getValueFromEvent: getValueFromEvent,
+        findPositionOfValue: findPositionOfValue,
+        setPositionFromValue: setPositionFromValue,
+        onLeft: onLeft,
+        onRight: onRight,
+        onUp: onUp,
+        onDown: onDown,
+        edgeActions: edgeActions
+    });
+
+    var fireSliderChange$2 = function (spectrum, value) {
+      emitWith(spectrum, sliderChangeEvent(), { value: value });
+    };
+    var sliderValue$1 = function (y) {
+      return { y: constant(y) };
+    };
+    var findValueOfOffset$1 = function (spectrum, detail, top) {
+      var args = {
+        min: minY(detail),
+        max: maxY(detail),
+        range: yRange(detail),
+        value: top,
+        step: step(detail),
+        snap: snap(detail),
+        snapStart: snapStart(detail),
+        rounded: rounded(detail),
+        hasMinEdge: hasTEdge(detail),
+        hasMaxEdge: hasBEdge(detail),
+        minBound: getMinYBounds(spectrum),
+        maxBound: getMaxYBounds(spectrum),
+        screenRange: getYScreenRange(spectrum)
+      };
+      return findValueOf(args);
+    };
+    var setValueFrom$1 = function (spectrum, detail, value) {
+      var yValue = findValueOfOffset$1(spectrum, detail, value);
+      var sliderVal = sliderValue$1(yValue);
+      fireSliderChange$2(spectrum, sliderVal);
+      return yValue;
+    };
+    var setToMin$1 = function (spectrum, detail) {
+      var min = minY(detail);
+      fireSliderChange$2(spectrum, sliderValue$1(min));
+    };
+    var setToMax$1 = function (spectrum, detail) {
+      var max = maxY(detail);
+      fireSliderChange$2(spectrum, sliderValue$1(max));
+    };
+    var moveBy$1 = function (direction, spectrum, detail) {
+      var f = direction > 0 ? increaseBy : reduceBy;
+      var yValue = f(currentValue(detail).y(), minY(detail), maxY(detail), step(detail));
+      fireSliderChange$2(spectrum, sliderValue$1(yValue));
+      return Option.some(yValue);
+    };
+    var handleMovement$1 = function (direction) {
+      return function (spectrum, detail) {
+        return moveBy$1(direction, spectrum, detail).map(function () {
+          return true;
+        });
+      };
+    };
+    var getValueFromEvent$1 = function (simulatedEvent) {
+      var pos = getEventSource(simulatedEvent);
+      return pos.map(function (p) {
+        return p.top();
+      });
+    };
+    var findOffsetOfValue$2 = function (spectrum, detail, value, minEdge, maxEdge) {
+      var minOffset = 0;
+      var maxOffset = getYScreenRange(spectrum);
+      var centerMinEdge = minEdge.bind(function (edge) {
+        return Option.some(getYCenterOffSetOf(edge, spectrum));
+      }).getOr(minOffset);
+      var centerMaxEdge = maxEdge.bind(function (edge) {
+        return Option.some(getYCenterOffSetOf(edge, spectrum));
+      }).getOr(maxOffset);
+      var args = {
+        min: minY(detail),
+        max: maxY(detail),
+        range: yRange(detail),
+        value: value,
+        hasMinEdge: hasTEdge(detail),
+        hasMaxEdge: hasBEdge(detail),
+        minBound: getMinYBounds(spectrum),
+        minOffset: minOffset,
+        maxBound: getMaxYBounds(spectrum),
+        maxOffset: maxOffset,
+        centerMinEdge: centerMinEdge,
+        centerMaxEdge: centerMaxEdge
+      };
+      return findOffsetOfValue(args);
+    };
+    var findPositionOfValue$1 = function (slider, spectrum, value, minEdge, maxEdge, detail) {
+      var offset = findOffsetOfValue$2(spectrum, detail, value, minEdge, maxEdge);
+      return getMinYBounds(spectrum) - getMinYBounds(slider) + offset;
+    };
+    var setPositionFromValue$1 = function (slider, thumb, detail, edges) {
+      var value = currentValue(detail);
+      var pos = findPositionOfValue$1(slider, edges.getSpectrum(slider), value.y(), edges.getTopEdge(slider), edges.getBottomEdge(slider), detail);
+      var thumbRadius = get$5(thumb.element()) / 2;
+      set$3(thumb.element(), 'top', pos - thumbRadius + 'px');
+    };
+    var onLeft$1 = Option.none;
+    var onRight$1 = Option.none;
+    var onUp$1 = handleMovement$1(-1);
+    var onDown$1 = handleMovement$1(1);
+    var edgeActions$1 = {
+      'top-left': Option.none(),
+      'top': Option.some(setToTEdge),
+      'top-right': Option.none(),
+      'right': Option.none(),
+      'bottom-right': Option.none(),
+      'bottom': Option.some(setToBEdge),
+      'bottom-left': Option.none(),
+      'left': Option.none()
+    };
+
+    var VerticalModel = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        setValueFrom: setValueFrom$1,
+        setToMin: setToMin$1,
+        setToMax: setToMax$1,
+        findValueOfOffset: findValueOfOffset$1,
+        getValueFromEvent: getValueFromEvent$1,
+        findPositionOfValue: findPositionOfValue$1,
+        setPositionFromValue: setPositionFromValue$1,
+        onLeft: onLeft$1,
+        onRight: onRight$1,
+        onUp: onUp$1,
+        onDown: onDown$1,
+        edgeActions: edgeActions$1
+    });
+
+    var fireSliderChange$3 = function (spectrum, value) {
+      emitWith(spectrum, sliderChangeEvent(), { value: value });
+    };
+    var sliderValue$2 = function (x, y) {
+      return {
+        x: constant(x),
+        y: constant(y)
+      };
+    };
+    var setValueFrom$2 = function (spectrum, detail, value) {
+      var xValue = findValueOfOffset(spectrum, detail, value.left());
+      var yValue = findValueOfOffset$1(spectrum, detail, value.top());
+      var val = sliderValue$2(xValue, yValue);
+      fireSliderChange$3(spectrum, val);
+      return val;
+    };
+    var moveBy$2 = function (direction, isVerticalMovement, spectrum, detail) {
+      var f = direction > 0 ? increaseBy : reduceBy;
+      var xValue = isVerticalMovement ? currentValue(detail).x() : f(currentValue(detail).x(), minX(detail), maxX(detail), step(detail));
+      var yValue = !isVerticalMovement ? currentValue(detail).y() : f(currentValue(detail).y(), minY(detail), maxY(detail), step(detail));
+      fireSliderChange$3(spectrum, sliderValue$2(xValue, yValue));
+      return Option.some(xValue);
+    };
+    var handleMovement$2 = function (direction, isVerticalMovement) {
+      return function (spectrum, detail) {
+        return moveBy$2(direction, isVerticalMovement, spectrum, detail).map(function () {
+          return true;
+        });
+      };
+    };
+    var setToMin$2 = function (spectrum, detail) {
+      var mX = minX(detail);
+      var mY = minY(detail);
+      fireSliderChange$3(spectrum, sliderValue$2(mX, mY));
+    };
+    var setToMax$2 = function (spectrum, detail) {
+      var mX = maxX(detail);
+      var mY = maxY(detail);
+      fireSliderChange$3(spectrum, sliderValue$2(mX, mY));
+    };
+    var getValueFromEvent$2 = function (simulatedEvent) {
+      return getEventSource(simulatedEvent);
+    };
+    var setPositionFromValue$2 = function (slider, thumb, detail, edges) {
+      var value = currentValue(detail);
+      var xPos = findPositionOfValue(slider, edges.getSpectrum(slider), value.x(), edges.getLeftEdge(slider), edges.getRightEdge(slider), detail);
+      var yPos = findPositionOfValue$1(slider, edges.getSpectrum(slider), value.y(), edges.getTopEdge(slider), edges.getBottomEdge(slider), detail);
+      var thumbXRadius = get$7(thumb.element()) / 2;
+      var thumbYRadius = get$5(thumb.element()) / 2;
+      set$3(thumb.element(), 'left', xPos - thumbXRadius + 'px');
+      set$3(thumb.element(), 'top', yPos - thumbYRadius + 'px');
+    };
+    var onLeft$2 = handleMovement$2(-1, false);
+    var onRight$2 = handleMovement$2(1, false);
+    var onUp$2 = handleMovement$2(-1, true);
+    var onDown$2 = handleMovement$2(1, true);
+    var edgeActions$2 = {
+      'top-left': Option.some(setToTLEdgeXY),
+      'top': Option.some(setToTEdgeXY),
+      'top-right': Option.some(setToTREdgeXY),
+      'right': Option.some(setToREdgeXY),
+      'bottom-right': Option.some(setToBREdgeXY),
+      'bottom': Option.some(setToBEdgeXY),
+      'bottom-left': Option.some(setToBLEdgeXY),
+      'left': Option.some(setToLEdgeXY)
+    };
+
+    var TwoDModel = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        setValueFrom: setValueFrom$2,
+        setToMin: setToMin$2,
+        setToMax: setToMax$2,
+        getValueFromEvent: getValueFromEvent$2,
+        setPositionFromValue: setPositionFromValue$2,
+        onLeft: onLeft$2,
+        onRight: onRight$2,
+        onUp: onUp$2,
+        onDown: onDown$2,
+        edgeActions: edgeActions$2
+    });
+
+    var SliderSchema = [
+      defaulted$1('stepSize', 1),
+      defaulted$1('onChange', noop),
+      defaulted$1('onChoose', noop),
+      defaulted$1('onInit', noop),
+      defaulted$1('onDragStart', noop),
+      defaulted$1('onDragEnd', noop),
+      defaulted$1('snapToGrid', false),
+      defaulted$1('rounded', true),
+      option('snapStart'),
+      strictOf('model', choose$1('mode', {
+        x: [
+          defaulted$1('minX', 0),
+          defaulted$1('maxX', 100),
+          state$1('value', function (spec) {
+            return Cell(spec.mode.minX);
+          }),
+          strict$1('getInitialValue'),
+          output('manager', HorizontalModel)
+        ],
+        y: [
+          defaulted$1('minY', 0),
+          defaulted$1('maxY', 100),
+          state$1('value', function (spec) {
+            return Cell(spec.mode.minY);
+          }),
+          strict$1('getInitialValue'),
+          output('manager', VerticalModel)
+        ],
+        xy: [
+          defaulted$1('minX', 0),
+          defaulted$1('maxX', 100),
+          defaulted$1('minY', 0),
+          defaulted$1('maxY', 100),
+          state$1('value', function (spec) {
+            return Cell({
+              x: constant(spec.mode.minX),
+              y: constant(spec.mode.minY)
+            });
+          }),
+          strict$1('getInitialValue'),
+          output('manager', TwoDModel)
+        ]
+      })),
+      field$1('sliderBehaviours', [
+        Keying,
+        Representing
+      ]),
+      state$1('mouseIsDown', function () {
+        return Cell(false);
+      })
+    ];
+
+    var mouseReleased = constant('mouse.released');
+
+    var sketch = function (detail, components, _spec, _externals) {
+      var _a;
+      var getThumb = function (component) {
+        return getPartOrDie(component, detail, 'thumb');
+      };
+      var getSpectrum = function (component) {
+        return getPartOrDie(component, detail, 'spectrum');
+      };
+      var getLeftEdge = function (component) {
+        return getPart(component, detail, 'left-edge');
+      };
+      var getRightEdge = function (component) {
+        return getPart(component, detail, 'right-edge');
+      };
+      var getTopEdge = function (component) {
+        return getPart(component, detail, 'top-edge');
+      };
+      var getBottomEdge = function (component) {
+        return getPart(component, detail, 'bottom-edge');
+      };
+      var modelDetail = detail.model;
+      var model = modelDetail.manager;
+      var refresh = function (slider, thumb) {
+        model.setPositionFromValue(slider, thumb, detail, {
+          getLeftEdge: getLeftEdge,
+          getRightEdge: getRightEdge,
+          getTopEdge: getTopEdge,
+          getBottomEdge: getBottomEdge,
+          getSpectrum: getSpectrum
+        });
+      };
+      var changeValue = function (slider, newValue) {
+        modelDetail.value.set(newValue);
+        var thumb = getThumb(slider);
+        refresh(slider, thumb);
+        detail.onChange(slider, thumb, newValue);
+        return Option.some(true);
+      };
+      var resetToMin = function (slider) {
+        model.setToMin(slider, detail);
+      };
+      var resetToMax = function (slider) {
+        model.setToMax(slider, detail);
+      };
+      var choose = function (slider) {
+        var fireOnChoose = function () {
+          getPart(slider, detail, 'thumb').each(function (thumb) {
+            var value = modelDetail.value.get();
+            detail.onChoose(slider, thumb, value);
+          });
+        };
+        var wasDown = detail.mouseIsDown.get();
+        detail.mouseIsDown.set(false);
+        if (wasDown) {
+          fireOnChoose();
+        }
+      };
+      var onDragStart = function (slider, simulatedEvent) {
+        simulatedEvent.stop();
+        detail.mouseIsDown.set(true);
+        detail.onDragStart(slider, getThumb(slider));
+      };
+      var onDragEnd = function (slider, simulatedEvent) {
+        simulatedEvent.stop();
+        detail.onDragEnd(slider, getThumb(slider));
+        choose(slider);
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        behaviours: augment(detail.sliderBehaviours, [
+          Keying.config({
+            mode: 'special',
+            focusIn: function (slider) {
+              return getPart(slider, detail, 'spectrum').map(Keying.focusIn).map(constant(true));
+            }
+          }),
+          Representing.config({
+            store: {
+              mode: 'manual',
+              getValue: function (_) {
+                return modelDetail.value.get();
+              }
+            }
+          }),
+          Receiving.config({ channels: (_a = {}, _a[mouseReleased()] = { onReceive: choose }, _a) })
+        ]),
+        events: derive([
+          run(sliderChangeEvent(), function (slider, simulatedEvent) {
+            changeValue(slider, simulatedEvent.event().value());
+          }),
+          runOnAttached(function (slider, _simulatedEvent) {
+            var getInitial = modelDetail.getInitialValue();
+            modelDetail.value.set(getInitial);
+            var thumb = getThumb(slider);
+            refresh(slider, thumb);
+            var spectrum = getSpectrum(slider);
+            detail.onInit(slider, thumb, spectrum, modelDetail.value.get());
+          }),
+          run(touchstart(), onDragStart),
+          run(touchend(), onDragEnd),
+          run(mousedown(), onDragStart),
+          run(mouseup(), onDragEnd)
+        ]),
+        apis: {
+          resetToMin: resetToMin,
+          resetToMax: resetToMax,
+          changeValue: changeValue,
+          refresh: refresh
+        },
+        domModification: { styles: { position: 'relative' } }
+      };
+    };
+
+    var Slider = composite$1({
+      name: 'Slider',
+      configFields: SliderSchema,
+      partFields: SliderParts,
+      factory: sketch,
+      apis: {
+        resetToMin: function (apis, slider) {
+          apis.resetToMin(slider);
+        },
+        resetToMax: function (apis, slider) {
+          apis.resetToMax(slider);
+        },
+        refresh: function (apis, slider) {
+          apis.refresh(slider);
+        }
+      }
+    });
+
+    var button = function (realm, clazz, makeItems, editor) {
+      return forToolbar(clazz, function () {
+        var items = makeItems();
+        realm.setContextToolbar([{
+            label: clazz + ' group',
+            items: items
+          }]);
+      }, {}, editor);
+    };
+
+    var BLACK = -1;
+    var makeSlider = function (spec$1) {
+      var getColor = function (hue) {
+        if (hue < 0) {
+          return 'black';
+        } else if (hue > 360) {
+          return 'white';
+        } else {
+          return 'hsl(' + hue + ', 100%, 50%)';
+        }
+      };
+      var onInit = function (slider, thumb, spectrum, value) {
+        var color = getColor(value.x());
+        set$3(thumb.element(), 'background-color', color);
+      };
+      var onChange = function (slider, thumb, value) {
+        var color = getColor(value.x());
+        set$3(thumb.element(), 'background-color', color);
+        spec$1.onChange(slider, thumb, color);
+      };
+      return Slider.sketch({
+        dom: dom$1('<div class="${prefix}-slider ${prefix}-hue-slider-container"></div>'),
+        components: [
+          Slider.parts()['left-edge'](spec('<div class="${prefix}-hue-slider-black"></div>')),
+          Slider.parts().spectrum({
+            dom: dom$1('<div class="${prefix}-slider-gradient-container"></div>'),
+            components: [spec('<div class="${prefix}-slider-gradient"></div>')],
+            behaviours: derive$1([Toggling.config({ toggleClass: resolve('thumb-active') })])
+          }),
+          Slider.parts()['right-edge'](spec('<div class="${prefix}-hue-slider-white"></div>')),
+          Slider.parts().thumb({
+            dom: dom$1('<div class="${prefix}-slider-thumb"></div>'),
+            behaviours: derive$1([Toggling.config({ toggleClass: resolve('thumb-active') })])
+          })
+        ],
+        onChange: onChange,
+        onDragStart: function (slider, thumb) {
+          Toggling.on(thumb);
+        },
+        onDragEnd: function (slider, thumb) {
+          Toggling.off(thumb);
+        },
+        onInit: onInit,
+        stepSize: 10,
+        model: {
+          mode: 'x',
+          minX: 0,
+          maxX: 360,
+          getInitialValue: function () {
+            return {
+              x: function () {
+                return spec$1.getInitialValue();
+              }
+            };
+          }
+        },
+        sliderBehaviours: derive$1([orientation(Slider.refresh)])
+      });
+    };
+    var makeItems = function (spec) {
+      return [makeSlider(spec)];
+    };
+    var sketch$1 = function (realm, editor) {
+      var spec = {
+        onChange: function (slider, thumb, color) {
+          editor.undoManager.transact(function () {
+            editor.formatter.apply('forecolor', { value: color });
+            editor.nodeChanged();
+          });
+        },
+        getInitialValue: function () {
+          return BLACK;
+        }
+      };
+      return button(realm, 'color-levels', function () {
+        return makeItems(spec);
+      }, editor);
+    };
+
+    var schema$7 = objOfOnly([
+      strict$1('getInitialValue'),
+      strict$1('onChange'),
+      strict$1('category'),
+      strict$1('sizes')
+    ]);
+    var sketch$2 = function (rawSpec) {
+      var spec$1 = asRawOrDie('SizeSlider', schema$7, rawSpec);
+      var isValidValue = function (valueIndex) {
+        return valueIndex >= 0 && valueIndex < spec$1.sizes.length;
+      };
+      var onChange = function (slider, thumb, valueIndex) {
+        var index = valueIndex.x();
+        if (isValidValue(index)) {
+          spec$1.onChange(index);
+        }
+      };
+      return Slider.sketch({
+        dom: {
+          tag: 'div',
+          classes: [
+            resolve('slider-' + spec$1.category + '-size-container'),
+            resolve('slider'),
+            resolve('slider-size-container')
+          ]
+        },
+        onChange: onChange,
+        onDragStart: function (slider, thumb) {
+          Toggling.on(thumb);
+        },
+        onDragEnd: function (slider, thumb) {
+          Toggling.off(thumb);
+        },
+        model: {
+          mode: 'x',
+          minX: 0,
+          maxX: spec$1.sizes.length - 1,
+          getInitialValue: function () {
+            return {
+              x: function () {
+                return spec$1.getInitialValue();
+              }
+            };
+          }
+        },
+        stepSize: 1,
+        snapToGrid: true,
+        sliderBehaviours: derive$1([orientation(Slider.refresh)]),
+        components: [
+          Slider.parts().spectrum({
+            dom: dom$1('<div class="${prefix}-slider-size-container"></div>'),
+            components: [spec('<div class="${prefix}-slider-size-line"></div>')]
+          }),
+          Slider.parts().thumb({
+            dom: dom$1('<div class="${prefix}-slider-thumb"></div>'),
+            behaviours: derive$1([Toggling.config({ toggleClass: resolve('thumb-active') })])
+          })
+        ]
+      });
+    };
+
+    var candidatesArray = [
+      '9px',
+      '10px',
+      '11px',
+      '12px',
+      '14px',
+      '16px',
+      '18px',
+      '20px',
+      '24px',
+      '32px',
+      '36px'
+    ];
+    var defaultSize = 'medium';
+    var defaultIndex = 2;
+    var indexToSize = function (index) {
+      return Option.from(candidatesArray[index]);
+    };
+    var sizeToIndex = function (size) {
+      return findIndex(candidatesArray, function (v) {
+        return v === size;
+      });
+    };
+    var getRawOrComputed = function (isRoot, rawStart) {
+      var optStart = isElement(rawStart) ? Option.some(rawStart) : parent(rawStart).filter(isElement);
+      return optStart.map(function (start) {
+        var inline = closest$1(start, function (elem) {
+          return getRaw(elem, 'font-size').isSome();
+        }, isRoot).bind(function (elem) {
+          return getRaw(elem, 'font-size');
+        });
+        return inline.getOrThunk(function () {
+          return get$4(start, 'font-size');
+        });
+      }).getOr('');
+    };
+    var getSize = function (editor) {
+      var node = editor.selection.getStart();
+      var elem = Element.fromDom(node);
+      var root = Element.fromDom(editor.getBody());
+      var isRoot = function (e) {
+        return eq(root, e);
+      };
+      var elemSize = getRawOrComputed(isRoot, elem);
+      return find$2(candidatesArray, function (size) {
+        return elemSize === size;
+      }).getOr(defaultSize);
+    };
+    var applySize = function (editor, value) {
+      var currentValue = getSize(editor);
+      if (currentValue !== value) {
+        editor.execCommand('fontSize', false, value);
+      }
+    };
+    var get$8 = function (editor) {
+      var size = getSize(editor);
+      return sizeToIndex(size).getOr(defaultIndex);
+    };
+    var apply$1 = function (editor, index) {
+      indexToSize(index).each(function (size) {
+        applySize(editor, size);
+      });
+    };
+    var candidates = constant(candidatesArray);
+
+    var sizes = candidates();
+    var makeSlider$1 = function (spec) {
+      return sketch$2({
+        onChange: spec.onChange,
+        sizes: sizes,
+        category: 'font',
+        getInitialValue: spec.getInitialValue
+      });
+    };
+    var makeItems$1 = function (spec$1) {
+      return [
+        spec('<span class="${prefix}-toolbar-button ${prefix}-icon-small-font ${prefix}-icon"></span>'),
+        makeSlider$1(spec$1),
+        spec('<span class="${prefix}-toolbar-button ${prefix}-icon-large-font ${prefix}-icon"></span>')
+      ];
+    };
+    var sketch$3 = function (realm, editor) {
+      var spec = {
+        onChange: function (value) {
+          apply$1(editor, value);
+        },
+        getInitialValue: function () {
+          return get$8(editor);
+        }
+      };
+      return button(realm, 'font-size', function () {
+        return makeItems$1(spec);
+      }, editor);
+    };
+
+    var record = function (spec) {
+      var uid = isSketchSpec(spec) && hasNonNullableKey(spec, 'uid') ? spec.uid : generate$3('memento');
+      var get = function (anyInSystem) {
+        return anyInSystem.getSystem().getByUid(uid).getOrDie();
+      };
+      var getOpt = function (anyInSystem) {
+        return anyInSystem.getSystem().getByUid(uid).toOption();
+      };
+      var asSpec = function () {
+        return __assign(__assign({}, spec), { uid: uid });
+      };
+      return {
+        get: get,
+        getOpt: getOpt,
+        asSpec: asSpec
+      };
+    };
+
+    var promise = function () {
+      var Promise = function (fn) {
+        if (typeof this !== 'object') {
+          throw new TypeError('Promises must be constructed via new');
+        }
+        if (typeof fn !== 'function') {
+          throw new TypeError('not a function');
+        }
+        this._state = null;
+        this._value = null;
+        this._deferreds = [];
+        doResolve(fn, bind(resolve, this), bind(reject, this));
+      };
+      var asap = Promise.immediateFn || typeof window.setImmediate === 'function' && window.setImmediate || function (fn) {
+        domGlobals.setTimeout(fn, 1);
+      };
+      function bind(fn, thisArg) {
+        return function () {
+          return fn.apply(thisArg, arguments);
+        };
+      }
+      var isArray = Array.isArray || function (value) {
+        return Object.prototype.toString.call(value) === '[object Array]';
+      };
+      function handle(deferred) {
+        var me = this;
+        if (this._state === null) {
+          this._deferreds.push(deferred);
+          return;
+        }
+        asap(function () {
+          var cb = me._state ? deferred.onFulfilled : deferred.onRejected;
+          if (cb === null) {
+            (me._state ? deferred.resolve : deferred.reject)(me._value);
+            return;
+          }
+          var ret;
+          try {
+            ret = cb(me._value);
+          } catch (e) {
+            deferred.reject(e);
+            return;
+          }
+          deferred.resolve(ret);
+        });
+      }
+      function resolve(newValue) {
+        try {
+          if (newValue === this) {
+            throw new TypeError('A promise cannot be resolved with itself.');
+          }
+          if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
+            var then = newValue.then;
+            if (typeof then === 'function') {
+              doResolve(bind(then, newValue), bind(resolve, this), bind(reject, this));
+              return;
+            }
+          }
+          this._state = true;
+          this._value = newValue;
+          finale.call(this);
+        } catch (e) {
+          reject.call(this, e);
+        }
+      }
+      function reject(newValue) {
+        this._state = false;
+        this._value = newValue;
+        finale.call(this);
+      }
+      function finale() {
+        for (var _i = 0, _a = this._deferreds; _i < _a.length; _i++) {
+          var deferred = _a[_i];
+          handle.call(this, deferred);
+        }
+        this._deferreds = [];
+      }
+      function Handler(onFulfilled, onRejected, resolve, reject) {
+        this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
+        this.onRejected = typeof onRejected === 'function' ? onRejected : null;
+        this.resolve = resolve;
+        this.reject = reject;
+      }
+      function doResolve(fn, onFulfilled, onRejected) {
+        var done = false;
+        try {
+          fn(function (value) {
+            if (done) {
+              return;
+            }
+            done = true;
+            onFulfilled(value);
+          }, function (reason) {
+            if (done) {
+              return;
+            }
+            done = true;
+            onRejected(reason);
+          });
+        } catch (ex) {
+          if (done) {
+            return;
+          }
+          done = true;
+          onRejected(ex);
+        }
+      }
+      Promise.prototype.catch = function (onRejected) {
+        return this.then(null, onRejected);
+      };
+      Promise.prototype.then = function (onFulfilled, onRejected) {
+        var me = this;
+        return new Promise(function (resolve, reject) {
+          handle.call(me, new Handler(onFulfilled, onRejected, resolve, reject));
+        });
+      };
+      Promise.all = function () {
+        var values = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          values[_i] = arguments[_i];
+        }
+        var args = Array.prototype.slice.call(values.length === 1 && isArray(values[0]) ? values[0] : values);
+        return new Promise(function (resolve, reject) {
+          if (args.length === 0) {
+            return resolve([]);
+          }
+          var remaining = args.length;
+          function res(i, val) {
+            try {
+              if (val && (typeof val === 'object' || typeof val === 'function')) {
+                var then = val.then;
+                if (typeof then === 'function') {
+                  then.call(val, function (val) {
+                    res(i, val);
+                  }, reject);
+                  return;
+                }
+              }
+              args[i] = val;
+              if (--remaining === 0) {
+                resolve(args);
+              }
+            } catch (ex) {
+              reject(ex);
+            }
+          }
+          for (var i = 0; i < args.length; i++) {
+            res(i, args[i]);
+          }
+        });
+      };
+      Promise.resolve = function (value) {
+        if (value && typeof value === 'object' && value.constructor === Promise) {
+          return value;
+        }
+        return new Promise(function (resolve) {
+          resolve(value);
+        });
+      };
+      Promise.reject = function (reason) {
+        return new Promise(function (resolve, reject) {
+          reject(reason);
+        });
+      };
+      Promise.race = function (values) {
+        return new Promise(function (resolve, reject) {
+          for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {
+            var value = values_1[_i];
+            value.then(resolve, reject);
+          }
+        });
+      };
+      return Promise;
+    };
+    var Promise = window.Promise ? window.Promise : promise();
+
+    function blobToDataUri(blob) {
+      return new Promise(function (resolve) {
+        var reader = new domGlobals.FileReader();
+        reader.onloadend = function () {
+          resolve(reader.result);
+        };
+        reader.readAsDataURL(blob);
+      });
+    }
+    function blobToBase64(blob) {
+      return blobToDataUri(blob).then(function (dataUri) {
+        return dataUri.split(',')[1];
+      });
+    }
+
+    var blobToBase64$1 = function (blob) {
+      return blobToBase64(blob);
+    };
+
+    var addImage = function (editor, blob) {
+      blobToBase64$1(blob).then(function (base64) {
+        editor.undoManager.transact(function () {
+          var cache = editor.editorUpload.blobCache;
+          var info = cache.create(generate$1('mceu'), blob, base64);
+          cache.add(info);
+          var img = editor.dom.createHTML('img', { src: info.blobUri() });
+          editor.insertContent(img);
+        });
+      });
+    };
+    var extractBlob = function (simulatedEvent) {
+      var event = simulatedEvent.event();
+      var files = event.raw().target.files || event.raw().dataTransfer.files;
+      return Option.from(files[0]);
+    };
+    var sketch$4 = function (editor) {
+      var pickerDom = {
+        tag: 'input',
+        attributes: {
+          accept: 'image/*',
+          type: 'file',
+          title: ''
+        },
+        styles: {
+          visibility: 'hidden',
+          position: 'absolute'
+        }
+      };
+      var memPicker = record({
+        dom: pickerDom,
+        events: derive([
+          cutter(click()),
+          run(change(), function (picker, simulatedEvent) {
+            extractBlob(simulatedEvent).each(function (blob) {
+              addImage(editor, blob);
+            });
+          })
+        ])
+      });
+      return Button.sketch({
+        dom: getToolbarIconButton('image', editor),
+        components: [memPicker.asSpec()],
+        action: function (button) {
+          var picker = memPicker.get(button);
+          picker.element().dom().click();
+        }
+      });
+    };
+
+    var get$9 = function (element) {
+      return element.dom().textContent;
+    };
+    var set$5 = function (element, value) {
+      return element.dom().textContent = value;
+    };
+
+    var isNotEmpty = function (val) {
+      return val.length > 0;
+    };
+    var defaultToEmpty = function (str) {
+      return str === undefined || str === null ? '' : str;
+    };
+    var noLink = function (editor) {
+      var text = editor.selection.getContent({ format: 'text' });
+      return {
+        url: '',
+        text: text,
+        title: '',
+        target: '',
+        link: Option.none()
+      };
+    };
+    var fromLink = function (link) {
+      var text = get$9(link);
+      var url = get$1(link, 'href');
+      var title = get$1(link, 'title');
+      var target = get$1(link, 'target');
+      return {
+        url: defaultToEmpty(url),
+        text: text !== url ? defaultToEmpty(text) : '',
+        title: defaultToEmpty(title),
+        target: defaultToEmpty(target),
+        link: Option.some(link)
+      };
+    };
+    var getInfo = function (editor) {
+      return query(editor).fold(function () {
+        return noLink(editor);
+      }, function (link) {
+        return fromLink(link);
+      });
+    };
+    var wasSimple = function (link) {
+      var prevHref = get$1(link, 'href');
+      var prevText = get$9(link);
+      return prevHref === prevText;
+    };
+    var getTextToApply = function (link, url, info) {
+      return info.text.toOption().filter(isNotEmpty).fold(function () {
+        return wasSimple(link) ? Option.some(url) : Option.none();
+      }, Option.some);
+    };
+    var unlinkIfRequired = function (editor, info) {
+      var activeLink = info.link.bind(identity);
+      activeLink.each(function (_link) {
+        editor.execCommand('unlink');
+      });
+    };
+    var getAttrs$1 = function (url, info) {
+      var attrs = {};
+      attrs.href = url;
+      info.title.toOption().filter(isNotEmpty).each(function (title) {
+        attrs.title = title;
+      });
+      info.target.toOption().filter(isNotEmpty).each(function (target) {
+        attrs.target = target;
+      });
+      return attrs;
+    };
+    var applyInfo = function (editor, info) {
+      info.url.toOption().filter(isNotEmpty).fold(function () {
+        unlinkIfRequired(editor, info);
+      }, function (url) {
+        var attrs = getAttrs$1(url, info);
+        var activeLink = info.link.bind(identity);
+        activeLink.fold(function () {
+          var text = info.text.toOption().filter(isNotEmpty).getOr(url);
+          editor.insertContent(editor.dom.createHTML('a', attrs, editor.dom.encode(text)));
+        }, function (link) {
+          var text = getTextToApply(link, url, info);
+          setAll(link, attrs);
+          text.each(function (newText) {
+            set$5(link, newText);
+          });
+        });
+      });
+    };
+    var query = function (editor) {
+      var start = Element.fromDom(editor.selection.getStart());
+      return closest$2(start, 'a');
+    };
+
+    var platform$1 = detect$3();
+    var preserve = function (f, editor) {
+      var rng = editor.selection.getRng();
+      f();
+      editor.selection.setRng(rng);
+    };
+    var forAndroid = function (editor, f) {
+      var wrapper = platform$1.os.isAndroid() ? preserve : apply;
+      wrapper(f, editor);
+    };
+
+    var events$6 = function (name, eventHandlers) {
+      var events = derive(eventHandlers);
+      return create$1({
+        fields: [strict$1('enabled')],
+        name: name,
+        active: { events: constant(events) }
+      });
+    };
+    var config = function (name, eventHandlers) {
+      var me = events$6(name, eventHandlers);
+      return {
+        key: name,
+        value: {
+          config: {},
+          me: me,
+          configAsRaw: constant({}),
+          initialConfig: {},
+          state: NoState
+        }
+      };
+    };
+
+    var getCurrent = function (component, composeConfig, _composeState) {
+      return composeConfig.find(component);
+    };
+
+    var ComposeApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        getCurrent: getCurrent
+    });
+
+    var ComposeSchema = [strict$1('find')];
+
+    var Composing = create$1({
+      fields: ComposeSchema,
+      name: 'composing',
+      apis: ComposeApis
+    });
+
+    var factory$1 = function (detail) {
+      var _a = detail.dom, attributes = _a.attributes, domWithoutAttributes = __rest(_a, ['attributes']);
+      return {
+        uid: detail.uid,
+        dom: __assign({
+          tag: 'div',
+          attributes: __assign({ role: 'presentation' }, attributes)
+        }, domWithoutAttributes),
+        components: detail.components,
+        behaviours: get$6(detail.containerBehaviours),
+        events: detail.events,
+        domModification: detail.domModification,
+        eventOrder: detail.eventOrder
+      };
+    };
+    var Container = single$2({
+      name: 'Container',
+      factory: factory$1,
+      configFields: [
+        defaulted$1('components', []),
+        field$1('containerBehaviours', []),
+        defaulted$1('events', {}),
+        defaulted$1('domModification', {}),
+        defaulted$1('eventOrder', {})
+      ]
+    });
+
+    var factory$2 = function (detail) {
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        behaviours: SketchBehaviours.augment(detail.dataBehaviours, [
+          Representing.config({
+            store: {
+              mode: 'memory',
+              initialValue: detail.getInitialValue()
+            }
+          }),
+          Composing.config({ find: Option.some })
+        ]),
+        events: derive([runOnAttached(function (component, _simulatedEvent) {
+            Representing.setValue(component, detail.getInitialValue());
+          })])
+      };
+    };
+    var DataField = single$2({
+      name: 'DataField',
+      factory: factory$2,
+      configFields: [
+        strict$1('uid'),
+        strict$1('dom'),
+        strict$1('getInitialValue'),
+        SketchBehaviours.field('dataBehaviours', [
+          Representing,
+          Composing
+        ])
+      ]
+    });
+
+    var get$a = function (element) {
+      return element.dom().value;
+    };
+    var set$6 = function (element, value) {
+      if (value === undefined) {
+        throw new Error('Value.set was undefined');
+      }
+      element.dom().value = value;
+    };
+
+    var schema$8 = constant([
+      option('data'),
+      defaulted$1('inputAttributes', {}),
+      defaulted$1('inputStyles', {}),
+      defaulted$1('tag', 'input'),
+      defaulted$1('inputClasses', []),
+      onHandler('onSetValue'),
+      defaulted$1('styles', {}),
+      defaulted$1('eventOrder', {}),
+      field$1('inputBehaviours', [
+        Representing,
+        Focusing
+      ]),
+      defaulted$1('selectOnFocus', true)
+    ]);
+    var focusBehaviours = function (detail) {
+      return derive$1([Focusing.config({
+          onFocus: !detail.selectOnFocus ? noop : function (component) {
+            var input = component.element();
+            var value = get$a(input);
+            input.dom().setSelectionRange(0, value.length);
+          }
+        })]);
+    };
+    var behaviours = function (detail) {
+      return __assign(__assign({}, focusBehaviours(detail)), augment(detail.inputBehaviours, [Representing.config({
+          store: __assign(__assign({ mode: 'manual' }, detail.data.map(function (data) {
+            return { initialValue: data };
+          }).getOr({})), {
+            getValue: function (input) {
+              return get$a(input.element());
+            },
+            setValue: function (input, data) {
+              var current = get$a(input.element());
+              if (current !== data) {
+                set$6(input.element(), data);
+              }
+            }
+          }),
+          onSetValue: detail.onSetValue
+        })]));
+    };
+    var dom$2 = function (detail) {
+      return {
+        tag: detail.tag,
+        attributes: __assign({ type: 'text' }, detail.inputAttributes),
+        styles: detail.inputStyles,
+        classes: detail.inputClasses
+      };
+    };
+
+    var factory$3 = function (detail, _spec) {
+      return {
+        uid: detail.uid,
+        dom: dom$2(detail),
+        components: [],
+        behaviours: behaviours(detail),
+        eventOrder: detail.eventOrder
+      };
+    };
+    var Input = single$2({
+      name: 'Input',
+      configFields: schema$8(),
+      factory: factory$3
+    });
+
+    var exhibit$3 = function (base, tabConfig) {
+      return nu$5({
+        attributes: wrapAll$1([{
+            key: tabConfig.tabAttr,
+            value: 'true'
+          }])
+      });
+    };
+
+    var ActiveTabstopping = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        exhibit: exhibit$3
+    });
+
+    var TabstopSchema = [defaulted$1('tabAttr', 'data-alloy-tabstop')];
+
+    var Tabstopping = create$1({
+      fields: TabstopSchema,
+      name: 'tabstopping',
+      active: ActiveTabstopping
+    });
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.util.I18n');
+
+    var clearInputBehaviour = 'input-clearing';
+    var field$2 = function (name, placeholder) {
+      var inputSpec = record(Input.sketch({
+        inputAttributes: { placeholder: global$3.translate(placeholder) },
+        onSetValue: function (input$1, _data) {
+          emit(input$1, input());
+        },
+        inputBehaviours: derive$1([
+          Composing.config({ find: Option.some }),
+          Tabstopping.config({}),
+          Keying.config({ mode: 'execution' })
+        ]),
+        selectOnFocus: false
+      }));
+      var buttonSpec = record(Button.sketch({
+        dom: dom$1('<button class="${prefix}-input-container-x ${prefix}-icon-cancel-circle ${prefix}-icon"></button>'),
+        action: function (button) {
+          var input = inputSpec.get(button);
+          Representing.setValue(input, '');
+        }
+      }));
+      return {
+        name: name,
+        spec: Container.sketch({
+          dom: dom$1('<div class="${prefix}-input-container"></div>'),
+          components: [
+            inputSpec.asSpec(),
+            buttonSpec.asSpec()
+          ],
+          containerBehaviours: derive$1([
+            Toggling.config({ toggleClass: resolve('input-container-empty') }),
+            Composing.config({
+              find: function (comp) {
+                return Option.some(inputSpec.get(comp));
+              }
+            }),
+            config(clearInputBehaviour, [run(input(), function (iContainer) {
+                var input = inputSpec.get(iContainer);
+                var val = Representing.getValue(input);
+                var f = val.length > 0 ? Toggling.off : Toggling.on;
+                f(iContainer);
+              })])
+          ])
+        })
+      };
+    };
+    var hidden = function (name) {
+      return {
+        name: name,
+        spec: DataField.sketch({
+          dom: {
+            tag: 'span',
+            styles: { display: 'none' }
+          },
+          getInitialValue: function () {
+            return Option.none();
+          }
+        })
+      };
+    };
+
+    var nativeDisabled = [
+      'input',
+      'button',
+      'textarea',
+      'select'
+    ];
+    var onLoad$5 = function (component, disableConfig, disableState) {
+      var f = disableConfig.disabled() ? disable : enable;
+      f(component, disableConfig, disableState);
+    };
+    var hasNative = function (component, config) {
+      return config.useNative === true && contains(nativeDisabled, name(component.element()));
+    };
+    var nativeIsDisabled = function (component) {
+      return has$1(component.element(), 'disabled');
+    };
+    var nativeDisable = function (component) {
+      set(component.element(), 'disabled', 'disabled');
+    };
+    var nativeEnable = function (component) {
+      remove$1(component.element(), 'disabled');
+    };
+    var ariaIsDisabled = function (component) {
+      return get$1(component.element(), 'aria-disabled') === 'true';
+    };
+    var ariaDisable = function (component) {
+      set(component.element(), 'aria-disabled', 'true');
+    };
+    var ariaEnable = function (component) {
+      set(component.element(), 'aria-disabled', 'false');
+    };
+    var disable = function (component, disableConfig, _disableState) {
+      disableConfig.disableClass.each(function (disableClass) {
+        add$2(component.element(), disableClass);
+      });
+      var f = hasNative(component, disableConfig) ? nativeDisable : ariaDisable;
+      f(component);
+      disableConfig.onDisabled(component);
+    };
+    var enable = function (component, disableConfig, _disableState) {
+      disableConfig.disableClass.each(function (disableClass) {
+        remove$4(component.element(), disableClass);
+      });
+      var f = hasNative(component, disableConfig) ? nativeEnable : ariaEnable;
+      f(component);
+      disableConfig.onEnabled(component);
+    };
+    var isDisabled = function (component, disableConfig) {
+      return hasNative(component, disableConfig) ? nativeIsDisabled(component) : ariaIsDisabled(component);
+    };
+    var set$7 = function (component, disableConfig, disableState, disabled) {
+      var f = disabled ? disable : enable;
+      f(component, disableConfig, disableState);
+    };
+
+    var DisableApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        enable: enable,
+        disable: disable,
+        isDisabled: isDisabled,
+        onLoad: onLoad$5,
+        set: set$7
+    });
+
+    var exhibit$4 = function (base, disableConfig) {
+      return nu$5({ classes: disableConfig.disabled ? disableConfig.disableClass.map(pure).getOr([]) : [] });
+    };
+    var events$7 = function (disableConfig, disableState) {
+      return derive([
+        abort(execute(), function (component, _simulatedEvent) {
+          return isDisabled(component, disableConfig);
+        }),
+        loadEvent(disableConfig, disableState, onLoad$5)
+      ]);
+    };
+
+    var ActiveDisable = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        exhibit: exhibit$4,
+        events: events$7
+    });
+
+    var DisableSchema = [
+      defaultedFunction('disabled', never),
+      defaulted$1('useNative', true),
+      option('disableClass'),
+      onHandler('onDisabled'),
+      onHandler('onEnabled')
+    ];
+
+    var Disabling = create$1({
+      fields: DisableSchema,
+      name: 'disabling',
+      active: ActiveDisable,
+      apis: DisableApis
+    });
+
+    var owner$1 = 'form';
+    var schema$9 = [field$1('formBehaviours', [Representing])];
+    var getPartName = function (name) {
+      return '<alloy.field.' + name + '>';
+    };
+    var sketch$5 = function (fSpec) {
+      var parts = function () {
+        var record = [];
+        var field = function (name, config) {
+          record.push(name);
+          return generateOne(owner$1, getPartName(name), config);
+        };
+        return {
+          field: field,
+          record: function () {
+            return record;
+          }
+        };
+      }();
+      var spec = fSpec(parts);
+      var partNames = parts.record();
+      var fieldParts = map$1(partNames, function (n) {
+        return required({
+          name: n,
+          pname: getPartName(n)
+        });
+      });
+      return composite(owner$1, schema$9, fieldParts, make, spec);
+    };
+    var toResult$1 = function (o, e) {
+      return o.fold(function () {
+        return Result.error(e);
+      }, Result.value);
+    };
+    var make = function (detail, components) {
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        behaviours: augment(detail.formBehaviours, [Representing.config({
+            store: {
+              mode: 'manual',
+              getValue: function (form) {
+                var resPs = getAllParts(form, detail);
+                return map(resPs, function (resPThunk, pName) {
+                  return resPThunk().bind(function (v) {
+                    var opt = Composing.getCurrent(v);
+                    return toResult$1(opt, new Error('Cannot find a current component to extract the value from for form part \'' + pName + '\': ' + element(v.element())));
+                  }).map(Representing.getValue);
+                });
+              },
+              setValue: function (form, values) {
+                each(values, function (newValue, key) {
+                  getPart(form, detail, key).each(function (wrapper) {
+                    Composing.getCurrent(wrapper).each(function (field) {
+                      Representing.setValue(field, newValue);
+                    });
+                  });
+                });
+              }
+            }
+          })]),
+        apis: {
+          getField: function (form, key) {
+            return getPart(form, detail, key).bind(Composing.getCurrent);
+          }
+        }
+      };
+    };
+    var Form = {
+      getField: makeApi(function (apis, component, key) {
+        return apis.getField(component, key);
+      }),
+      sketch: sketch$5
+    };
+
+    var api$2 = function () {
+      var subject = Cell(Option.none());
+      var revoke = function () {
+        subject.get().each(function (s) {
+          s.destroy();
+        });
+      };
+      var clear = function () {
+        revoke();
+        subject.set(Option.none());
+      };
+      var set = function (s) {
+        revoke();
+        subject.set(Option.some(s));
+      };
+      var run = function (f) {
+        subject.get().each(f);
+      };
+      var isSet = function () {
+        return subject.get().isSome();
+      };
+      return {
+        clear: clear,
+        isSet: isSet,
+        set: set,
+        run: run
+      };
+    };
+    var value$2 = function () {
+      var subject = Cell(Option.none());
+      var clear = function () {
+        subject.set(Option.none());
+      };
+      var set = function (s) {
+        subject.set(Option.some(s));
+      };
+      var on = function (f) {
+        subject.get().each(f);
+      };
+      var isSet = function () {
+        return subject.get().isSome();
+      };
+      return {
+        clear: clear,
+        set: set,
+        isSet: isSet,
+        on: on
+      };
+    };
+
+    var SWIPING_LEFT = 1;
+    var SWIPING_RIGHT = -1;
+    var SWIPING_NONE = 0;
+    var init$2 = function (xValue) {
+      return {
+        xValue: xValue,
+        points: []
+      };
+    };
+    var move$1 = function (model, xValue) {
+      if (xValue === model.xValue) {
+        return model;
+      }
+      var currentDirection = xValue - model.xValue > 0 ? SWIPING_LEFT : SWIPING_RIGHT;
+      var newPoint = {
+        direction: currentDirection,
+        xValue: xValue
+      };
+      var priorPoints = function () {
+        if (model.points.length === 0) {
+          return [];
+        } else {
+          var prev = model.points[model.points.length - 1];
+          return prev.direction === currentDirection ? model.points.slice(0, model.points.length - 1) : model.points;
+        }
+      }();
+      return {
+        xValue: xValue,
+        points: priorPoints.concat([newPoint])
+      };
+    };
+    var complete = function (model) {
+      if (model.points.length === 0) {
+        return SWIPING_NONE;
+      } else {
+        var firstDirection = model.points[0].direction;
+        var lastDirection = model.points[model.points.length - 1].direction;
+        return firstDirection === SWIPING_RIGHT && lastDirection === SWIPING_RIGHT ? SWIPING_RIGHT : firstDirection === SWIPING_LEFT && lastDirection === SWIPING_LEFT ? SWIPING_LEFT : SWIPING_NONE;
+      }
+    };
+
+    var sketch$6 = function (rawSpec) {
+      var navigateEvent = 'navigateEvent';
+      var wrapperAdhocEvents = 'serializer-wrapper-events';
+      var formAdhocEvents = 'form-events';
+      var schema = objOf([
+        strict$1('fields'),
+        defaulted$1('maxFieldIndex', rawSpec.fields.length - 1),
+        strict$1('onExecute'),
+        strict$1('getInitialValue'),
+        state$1('state', function () {
+          return {
+            dialogSwipeState: value$2(),
+            currentScreen: Cell(0)
+          };
+        })
+      ]);
+      var spec$1 = asRawOrDie('SerialisedDialog', schema, rawSpec);
+      var navigationButton = function (direction, directionName, enabled) {
+        return Button.sketch({
+          dom: dom$1('<span class="${prefix}-icon-' + directionName + ' ${prefix}-icon"></span>'),
+          action: function (button) {
+            emitWith(button, navigateEvent, { direction: direction });
+          },
+          buttonBehaviours: derive$1([Disabling.config({
+              disableClass: resolve('toolbar-navigation-disabled'),
+              disabled: function () {
+                return !enabled;
+              }
+            })])
+        });
+      };
+      var reposition = function (dialog, message) {
+        descendant$1(dialog.element(), '.' + resolve('serialised-dialog-chain')).each(function (parent) {
+          set$3(parent, 'left', -spec$1.state.currentScreen.get() * message.width + 'px');
+        });
+      };
+      var navigate = function (dialog, direction) {
+        var screens = descendants(dialog.element(), '.' + resolve('serialised-dialog-screen'));
+        descendant$1(dialog.element(), '.' + resolve('serialised-dialog-chain')).each(function (parent) {
+          if (spec$1.state.currentScreen.get() + direction >= 0 && spec$1.state.currentScreen.get() + direction < screens.length) {
+            getRaw(parent, 'left').each(function (left) {
+              var currentLeft = parseInt(left, 10);
+              var w = get$7(screens[0]);
+              set$3(parent, 'left', currentLeft - direction * w + 'px');
+            });
+            spec$1.state.currentScreen.set(spec$1.state.currentScreen.get() + direction);
+          }
+        });
+      };
+      var focusInput = function (dialog) {
+        var inputs = descendants(dialog.element(), 'input');
+        var optInput = Option.from(inputs[spec$1.state.currentScreen.get()]);
+        optInput.each(function (input) {
+          dialog.getSystem().getByDom(input).each(function (inputComp) {
+            dispatchFocus(dialog, inputComp.element());
+          });
+        });
+        var dotitems = memDots.get(dialog);
+        Highlighting.highlightAt(dotitems, spec$1.state.currentScreen.get());
+      };
+      var resetState = function () {
+        spec$1.state.currentScreen.set(0);
+        spec$1.state.dialogSwipeState.clear();
+      };
+      var memForm = record(Form.sketch(function (parts) {
+        return {
+          dom: dom$1('<div class="${prefix}-serialised-dialog"></div>'),
+          components: [Container.sketch({
+              dom: dom$1('<div class="${prefix}-serialised-dialog-chain" style="left: 0px; position: absolute;"></div>'),
+              components: map$1(spec$1.fields, function (field, i) {
+                return i <= spec$1.maxFieldIndex ? Container.sketch({
+                  dom: dom$1('<div class="${prefix}-serialised-dialog-screen"></div>'),
+                  components: [
+                    navigationButton(-1, 'previous', i > 0),
+                    parts.field(field.name, field.spec),
+                    navigationButton(+1, 'next', i < spec$1.maxFieldIndex)
+                  ]
+                }) : parts.field(field.name, field.spec);
+              })
+            })],
+          formBehaviours: derive$1([
+            orientation(function (dialog, message) {
+              reposition(dialog, message);
+            }),
+            Keying.config({
+              mode: 'special',
+              focusIn: function (dialog, _specialInfo) {
+                focusInput(dialog);
+              },
+              onTab: function (dialog, _specialInfo) {
+                navigate(dialog, +1);
+                return Option.some(true);
+              },
+              onShiftTab: function (dialog, _specialInfo) {
+                navigate(dialog, -1);
+                return Option.some(true);
+              }
+            }),
+            config(formAdhocEvents, [
+              runOnAttached(function (dialog, _simulatedEvent) {
+                resetState();
+                var dotitems = memDots.get(dialog);
+                Highlighting.highlightFirst(dotitems);
+                spec$1.getInitialValue(dialog).each(function (v) {
+                  Representing.setValue(dialog, v);
+                });
+              }),
+              runOnExecute(spec$1.onExecute),
+              run(transitionend(), function (dialog, simulatedEvent) {
+                var event = simulatedEvent.event();
+                if (event.raw().propertyName === 'left') {
+                  focusInput(dialog);
+                }
+              }),
+              run(navigateEvent, function (dialog, simulatedEvent) {
+                var event = simulatedEvent.event();
+                var direction = event.direction();
+                navigate(dialog, direction);
+              })
+            ])
+          ])
+        };
+      }));
+      var memDots = record({
+        dom: dom$1('<div class="${prefix}-dot-container"></div>'),
+        behaviours: derive$1([Highlighting.config({
+            highlightClass: resolve('dot-active'),
+            itemClass: resolve('dot-item')
+          })]),
+        components: bind(spec$1.fields, function (_f, i) {
+          return i <= spec$1.maxFieldIndex ? [spec('<div class="${prefix}-dot-item ${prefix}-icon-full-dot ${prefix}-icon"></div>')] : [];
+        })
+      });
+      return {
+        dom: dom$1('<div class="${prefix}-serializer-wrapper"></div>'),
+        components: [
+          memForm.asSpec(),
+          memDots.asSpec()
+        ],
+        behaviours: derive$1([
+          Keying.config({
+            mode: 'special',
+            focusIn: function (wrapper) {
+              var form = memForm.get(wrapper);
+              Keying.focusIn(form);
+            }
+          }),
+          config(wrapperAdhocEvents, [
+            run(touchstart(), function (_wrapper, simulatedEvent) {
+              var event = simulatedEvent.event();
+              spec$1.state.dialogSwipeState.set(init$2(event.raw().touches[0].clientX));
+            }),
+            run(touchmove(), function (_wrapper, simulatedEvent) {
+              var event = simulatedEvent.event();
+              spec$1.state.dialogSwipeState.on(function (state) {
+                simulatedEvent.event().prevent();
+                spec$1.state.dialogSwipeState.set(move$1(state, event.raw().touches[0].clientX));
+              });
+            }),
+            run(touchend(), function (wrapper, _simulatedEvent) {
+              spec$1.state.dialogSwipeState.on(function (state) {
+                var dialog = memForm.get(wrapper);
+                var direction = -1 * complete(state);
+                navigate(dialog, direction);
+              });
+            })
+          ])
+        ])
+      };
+    };
+
+    var getGroups = cached(function (realm, editor) {
+      return [{
+          label: 'the link group',
+          items: [sketch$6({
+              fields: [
+                field$2('url', 'Type or paste URL'),
+                field$2('text', 'Link text'),
+                field$2('title', 'Link title'),
+                field$2('target', 'Link target'),
+                hidden('link')
+              ],
+              maxFieldIndex: [
+                'url',
+                'text',
+                'title',
+                'target'
+              ].length - 1,
+              getInitialValue: function () {
+                return Option.some(getInfo(editor));
+              },
+              onExecute: function (dialog, _simulatedEvent) {
+                var info = Representing.getValue(dialog);
+                applyInfo(editor, info);
+                realm.restoreToolbar();
+                editor.focus();
+              }
+            })]
+        }];
+    });
+    var sketch$7 = function (realm, editor) {
+      return forToolbarStateAction(editor, 'link', 'link', function () {
+        var groups = getGroups(realm, editor);
+        realm.setContextToolbar(groups);
+        forAndroid(editor, function () {
+          realm.focusToolbar();
+        });
+        query(editor).each(function (link) {
+          editor.selection.select(link.dom());
+        });
+      });
+    };
+
+    var DefaultStyleFormats = [
+      {
+        title: 'Headings',
+        items: [
+          {
+            title: 'Heading 1',
+            format: 'h1'
+          },
+          {
+            title: 'Heading 2',
+            format: 'h2'
+          },
+          {
+            title: 'Heading 3',
+            format: 'h3'
+          },
+          {
+            title: 'Heading 4',
+            format: 'h4'
+          },
+          {
+            title: 'Heading 5',
+            format: 'h5'
+          },
+          {
+            title: 'Heading 6',
+            format: 'h6'
+          }
+        ]
+      },
+      {
+        title: 'Inline',
+        items: [
+          {
+            title: 'Bold',
+            icon: 'bold',
+            format: 'bold'
+          },
+          {
+            title: 'Italic',
+            icon: 'italic',
+            format: 'italic'
+          },
+          {
+            title: 'Underline',
+            icon: 'underline',
+            format: 'underline'
+          },
+          {
+            title: 'Strikethrough',
+            icon: 'strikethrough',
+            format: 'strikethrough'
+          },
+          {
+            title: 'Superscript',
+            icon: 'superscript',
+            format: 'superscript'
+          },
+          {
+            title: 'Subscript',
+            icon: 'subscript',
+            format: 'subscript'
+          },
+          {
+            title: 'Code',
+            icon: 'code',
+            format: 'code'
+          }
+        ]
+      },
+      {
+        title: 'Blocks',
+        items: [
+          {
+            title: 'Paragraph',
+            format: 'p'
+          },
+          {
+            title: 'Blockquote',
+            format: 'blockquote'
+          },
+          {
+            title: 'Div',
+            format: 'div'
+          },
+          {
+            title: 'Pre',
+            format: 'pre'
+          }
+        ]
+      },
+      {
+        title: 'Alignment',
+        items: [
+          {
+            title: 'Left',
+            icon: 'alignleft',
+            format: 'alignleft'
+          },
+          {
+            title: 'Center',
+            icon: 'aligncenter',
+            format: 'aligncenter'
+          },
+          {
+            title: 'Right',
+            icon: 'alignright',
+            format: 'alignright'
+          },
+          {
+            title: 'Justify',
+            icon: 'alignjustify',
+            format: 'alignjustify'
+          }
+        ]
+      }
+    ];
+
+    var isRecursive = function (component, originator, target) {
+      return eq(originator, component.element()) && !eq(originator, target);
+    };
+    var events$8 = derive([can(focus(), function (component, simulatedEvent) {
+        var originator = simulatedEvent.event().originator();
+        var target = simulatedEvent.event().target();
+        if (isRecursive(component, originator, target)) {
+          domGlobals.console.warn(focus() + ' did not get interpreted by the desired target. ' + '\nOriginator: ' + element(originator) + '\nTarget: ' + element(target) + '\nCheck the ' + focus() + ' event handlers');
+          return false;
+        } else {
+          return true;
+        }
+      })]);
+
+    var DefaultEvents = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events$8
+    });
+
+    var make$1 = identity;
+
+    var NoContextApi = function (getComp) {
+      var fail = function (event) {
+        return function () {
+          throw new Error('The component must be in a context to send: ' + event + (getComp ? '\n' + element(getComp().element()) + ' is not in context.' : ''));
+        };
+      };
+      return {
+        debugInfo: constant('fake'),
+        triggerEvent: fail('triggerEvent'),
+        triggerFocus: fail('triggerFocus'),
+        triggerEscape: fail('triggerEscape'),
+        build: fail('build'),
+        addToWorld: fail('addToWorld'),
+        removeFromWorld: fail('removeFromWorld'),
+        addToGui: fail('addToGui'),
+        removeFromGui: fail('removeFromGui'),
+        getByUid: fail('getByUid'),
+        getByDom: fail('getByDom'),
+        broadcast: fail('broadcast'),
+        broadcastOn: fail('broadcastOn'),
+        broadcastEvent: fail('broadcastEvent'),
+        isConnected: constant(false)
+      };
+    };
+    var singleton = NoContextApi();
+
+    var generateFrom = function (spec, all) {
+      var schema = map$1(all, function (a) {
+        return optionObjOf(a.name(), [
+          strict$1('config'),
+          defaulted$1('state', NoState)
+        ]);
+      });
+      var validated = asRaw('component.behaviours', objOf(schema), spec.behaviours).fold(function (errInfo) {
+        throw new Error(formatError(errInfo) + '\nComplete spec:\n' + JSON.stringify(spec, null, 2));
+      }, function (v) {
+        return v;
+      });
+      return {
+        list: all,
+        data: map(validated, function (optBlobThunk) {
+          var output = optBlobThunk.map(function (blob) {
+            return {
+              config: blob.config,
+              state: blob.state.init(blob.config)
+            };
+          });
+          return function () {
+            return output;
+          };
+        })
+      };
+    };
+    var getBehaviours = function (bData) {
+      return bData.list;
+    };
+    var getData = function (bData) {
+      return bData.data;
+    };
+
+    var byInnerKey = function (data, tuple) {
+      var r = {};
+      each(data, function (detail, key) {
+        each(detail, function (value, indexKey) {
+          var chain = get(r, indexKey).getOr([]);
+          r[indexKey] = chain.concat([tuple(key, value)]);
+        });
+      });
+      return r;
+    };
+
+    var combine$1 = function (info, baseMod, behaviours, base) {
+      var modsByBehaviour = __assign({}, baseMod);
+      each$1(behaviours, function (behaviour) {
+        modsByBehaviour[behaviour.name()] = behaviour.exhibit(info, base);
+      });
+      var byAspect = byInnerKey(modsByBehaviour, function (name, modification) {
+        return {
+          name: name,
+          modification: modification
+        };
+      });
+      var combineObjects = function (objects) {
+        return foldr(objects, function (b, a) {
+          return __assign(__assign({}, a.modification), b);
+        }, {});
+      };
+      var combinedClasses = foldr(byAspect.classes, function (b, a) {
+        return a.modification.concat(b);
+      }, []);
+      var combinedAttributes = combineObjects(byAspect.attributes);
+      var combinedStyles = combineObjects(byAspect.styles);
+      return nu$5({
+        classes: combinedClasses,
+        attributes: combinedAttributes,
+        styles: combinedStyles
+      });
+    };
+
+    var sortKeys = function (label, keyName, array, order) {
+      try {
+        var sorted = sort(array, function (a, b) {
+          var aKey = a[keyName]();
+          var bKey = b[keyName]();
+          var aIndex = order.indexOf(aKey);
+          var bIndex = order.indexOf(bKey);
+          if (aIndex === -1) {
+            throw new Error('The ordering for ' + label + ' does not have an entry for ' + aKey + '.\nOrder specified: ' + JSON.stringify(order, null, 2));
+          }
+          if (bIndex === -1) {
+            throw new Error('The ordering for ' + label + ' does not have an entry for ' + bKey + '.\nOrder specified: ' + JSON.stringify(order, null, 2));
+          }
+          if (aIndex < bIndex) {
+            return -1;
+          } else if (bIndex < aIndex) {
+            return 1;
+          } else {
+            return 0;
+          }
+        });
+        return Result.value(sorted);
+      } catch (err) {
+        return Result.error([err]);
+      }
+    };
+
+    var uncurried = function (handler, purpose) {
+      return {
+        handler: handler,
+        purpose: constant(purpose)
+      };
+    };
+    var curried = function (handler, purpose) {
+      return {
+        cHandler: handler,
+        purpose: constant(purpose)
+      };
+    };
+    var curryArgs = function (descHandler, extraArgs) {
+      return curried(curry.apply(undefined, [descHandler.handler].concat(extraArgs)), descHandler.purpose());
+    };
+    var getCurried = function (descHandler) {
+      return descHandler.cHandler;
+    };
+
+    var behaviourTuple = function (name, handler) {
+      return {
+        name: constant(name),
+        handler: constant(handler)
+      };
+    };
+    var nameToHandlers = function (behaviours, info) {
+      var r = {};
+      each$1(behaviours, function (behaviour) {
+        r[behaviour.name()] = behaviour.handlers(info);
+      });
+      return r;
+    };
+    var groupByEvents = function (info, behaviours, base) {
+      var behaviourEvents = __assign(__assign({}, base), nameToHandlers(behaviours, info));
+      return byInnerKey(behaviourEvents, behaviourTuple);
+    };
+    var combine$2 = function (info, eventOrder, behaviours, base) {
+      var byEventName = groupByEvents(info, behaviours, base);
+      return combineGroups(byEventName, eventOrder);
+    };
+    var assemble = function (rawHandler) {
+      var handler = read(rawHandler);
+      return function (component, simulatedEvent) {
+        var rest = [];
+        for (var _i = 2; _i < arguments.length; _i++) {
+          rest[_i - 2] = arguments[_i];
+        }
+        var args = [
+          component,
+          simulatedEvent
+        ].concat(rest);
+        if (handler.abort.apply(undefined, args)) {
+          simulatedEvent.stop();
+        } else if (handler.can.apply(undefined, args)) {
+          handler.run.apply(undefined, args);
+        }
+      };
+    };
+    var missingOrderError = function (eventName, tuples) {
+      return Result.error(['The event (' + eventName + ') has more than one behaviour that listens to it.\nWhen this occurs, you must ' + 'specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that ' + 'can trigger it are: ' + JSON.stringify(map$1(tuples, function (c) {
+          return c.name();
+        }), null, 2)]);
+    };
+    var fuse$1 = function (tuples, eventOrder, eventName) {
+      var order = eventOrder[eventName];
+      if (!order) {
+        return missingOrderError(eventName, tuples);
+      } else {
+        return sortKeys('Event: ' + eventName, 'name', tuples, order).map(function (sortedTuples) {
+          var handlers = map$1(sortedTuples, function (tuple) {
+            return tuple.handler();
+          });
+          return fuse(handlers);
+        });
+      }
+    };
+    var combineGroups = function (byEventName, eventOrder) {
+      var r = mapToArray(byEventName, function (tuples, eventName) {
+        var combined = tuples.length === 1 ? Result.value(tuples[0].handler()) : fuse$1(tuples, eventOrder, eventName);
+        return combined.map(function (handler) {
+          var assembled = assemble(handler);
+          var purpose = tuples.length > 1 ? filter$1(eventOrder[eventName], function (o) {
+            return exists(tuples, function (t) {
+              return t.name() === o;
+            });
+          }).join(' > ') : tuples[0].name();
+          return wrap$1(eventName, uncurried(assembled, purpose));
+        });
+      });
+      return consolidate(r, {});
+    };
+
+    var toInfo = function (spec) {
+      return asRaw('custom.definition', objOf([
+        field('dom', 'dom', strict(), objOf([
+          strict$1('tag'),
+          defaulted$1('styles', {}),
+          defaulted$1('classes', []),
+          defaulted$1('attributes', {}),
+          option('value'),
+          option('innerHtml')
+        ])),
+        strict$1('components'),
+        strict$1('uid'),
+        defaulted$1('events', {}),
+        defaulted$1('apis', {}),
+        field('eventOrder', 'eventOrder', mergeWith({
+          'alloy.execute': [
+            'disabling',
+            'alloy.base.behaviour',
+            'toggling',
+            'typeaheadevents'
+          ],
+          'alloy.focus': [
+            'alloy.base.behaviour',
+            'focusing',
+            'keying'
+          ],
+          'alloy.system.init': [
+            'alloy.base.behaviour',
+            'disabling',
+            'toggling',
+            'representing'
+          ],
+          'input': [
+            'alloy.base.behaviour',
+            'representing',
+            'streaming',
+            'invalidating'
+          ],
+          'alloy.system.detached': [
+            'alloy.base.behaviour',
+            'representing',
+            'item-events',
+            'tooltipping'
+          ],
+          'mousedown': [
+            'focusing',
+            'alloy.base.behaviour',
+            'item-type-events'
+          ],
+          'touchstart': [
+            'focusing',
+            'alloy.base.behaviour',
+            'item-type-events'
+          ],
+          'mouseover': [
+            'item-type-events',
+            'tooltipping'
+          ],
+          'alloy.receive': [
+            'receiving',
+            'reflecting',
+            'tooltipping'
+          ]
+        }), anyValue$1()),
+        option('domModification')
+      ]), spec);
+    };
+    var toDefinition = function (detail) {
+      return __assign(__assign({}, detail.dom), {
+        uid: detail.uid,
+        domChildren: map$1(detail.components, function (comp) {
+          return comp.element();
+        })
+      });
+    };
+    var toModification = function (detail) {
+      return detail.domModification.fold(function () {
+        return nu$5({});
+      }, nu$5);
+    };
+    var toEvents = function (info) {
+      return info.events;
+    };
+
+    var add$3 = function (element, classes) {
+      each$1(classes, function (x) {
+        add$2(element, x);
+      });
+    };
+    var remove$6 = function (element, classes) {
+      each$1(classes, function (x) {
+        remove$4(element, x);
+      });
+    };
+
+    var renderToDom = function (definition) {
+      var subject = Element.fromTag(definition.tag);
+      setAll(subject, definition.attributes);
+      add$3(subject, definition.classes);
+      setAll$1(subject, definition.styles);
+      definition.innerHtml.each(function (html) {
+        return set$1(subject, html);
+      });
+      var children = definition.domChildren;
+      append$1(subject, children);
+      definition.value.each(function (value) {
+        set$6(subject, value);
+      });
+      if (!definition.uid) {
+        debugger;
+      }
+      writeOnly(subject, definition.uid);
+      return subject;
+    };
+
+    var getBehaviours$1 = function (spec) {
+      var behaviours = get(spec, 'behaviours').getOr({});
+      var keys$1 = filter$1(keys(behaviours), function (k) {
+        return behaviours[k] !== undefined;
+      });
+      return map$1(keys$1, function (k) {
+        return behaviours[k].me;
+      });
+    };
+    var generateFrom$1 = function (spec, all) {
+      return generateFrom(spec, all);
+    };
+    var generate$4 = function (spec) {
+      var all = getBehaviours$1(spec);
+      return generateFrom$1(spec, all);
+    };
+
+    var getDomDefinition = function (info, bList, bData) {
+      var definition = toDefinition(info);
+      var infoModification = toModification(info);
+      var baseModification = { 'alloy.base.modification': infoModification };
+      var modification = bList.length > 0 ? combine$1(bData, baseModification, bList, definition) : infoModification;
+      return merge$1(definition, modification);
+    };
+    var getEvents = function (info, bList, bData) {
+      var baseEvents = { 'alloy.base.behaviour': toEvents(info) };
+      return combine$2(bData, info.eventOrder, bList, baseEvents).getOrDie();
+    };
+    var build = function (spec) {
+      var getMe = function () {
+        return me;
+      };
+      var systemApi = Cell(singleton);
+      var info = getOrDie(toInfo(spec));
+      var bBlob = generate$4(spec);
+      var bList = getBehaviours(bBlob);
+      var bData = getData(bBlob);
+      var modDefinition = getDomDefinition(info, bList, bData);
+      var item = renderToDom(modDefinition);
+      var events = getEvents(info, bList, bData);
+      var subcomponents = Cell(info.components);
+      var connect = function (newApi) {
+        systemApi.set(newApi);
+      };
+      var disconnect = function () {
+        systemApi.set(NoContextApi(getMe));
+      };
+      var syncComponents = function () {
+        var children$1 = children(item);
+        var subs = bind(children$1, function (child) {
+          return systemApi.get().getByDom(child).fold(function () {
+            return [];
+          }, function (c) {
+            return [c];
+          });
+        });
+        subcomponents.set(subs);
+      };
+      var config = function (behaviour) {
+        var b = bData;
+        var f = isFunction(b[behaviour.name()]) ? b[behaviour.name()] : function () {
+          throw new Error('Could not find ' + behaviour.name() + ' in ' + JSON.stringify(spec, null, 2));
+        };
+        return f();
+      };
+      var hasConfigured = function (behaviour) {
+        return isFunction(bData[behaviour.name()]);
+      };
+      var getApis = function () {
+        return info.apis;
+      };
+      var readState = function (behaviourName) {
+        return bData[behaviourName]().map(function (b) {
+          return b.state.readState();
+        }).getOr('not enabled');
+      };
+      var me = {
+        getSystem: systemApi.get,
+        config: config,
+        hasConfigured: hasConfigured,
+        spec: constant(spec),
+        readState: readState,
+        getApis: getApis,
+        connect: connect,
+        disconnect: disconnect,
+        element: constant(item),
+        syncComponents: syncComponents,
+        components: subcomponents.get,
+        events: constant(events)
+      };
+      return me;
+    };
+
+    var buildSubcomponents = function (spec) {
+      var components = get(spec, 'components').getOr([]);
+      return map$1(components, build$1);
+    };
+    var buildFromSpec = function (userSpec) {
+      var _a = make$1(userSpec), specEvents = _a.events, spec = __rest(_a, ['events']);
+      var components = buildSubcomponents(spec);
+      var completeSpec = __assign(__assign({}, spec), {
+        events: __assign(__assign({}, DefaultEvents), specEvents),
+        components: components
+      });
+      return Result.value(build(completeSpec));
+    };
+    var text = function (textContent) {
+      var element = Element.fromText(textContent);
+      return external$1({ element: element });
+    };
+    var external$1 = function (spec) {
+      var extSpec = asRawOrDie('external.component', objOfOnly([
+        strict$1('element'),
+        option('uid')
+      ]), spec);
+      var systemApi = Cell(NoContextApi());
+      var connect = function (newApi) {
+        systemApi.set(newApi);
+      };
+      var disconnect = function () {
+        systemApi.set(NoContextApi(function () {
+          return me;
+        }));
+      };
+      extSpec.uid.each(function (uid) {
+        writeOnly(extSpec.element, uid);
+      });
+      var me = {
+        getSystem: systemApi.get,
+        config: Option.none,
+        hasConfigured: constant(false),
+        connect: connect,
+        disconnect: disconnect,
+        getApis: function () {
+          return {};
+        },
+        element: constant(extSpec.element),
+        spec: constant(spec),
+        readState: constant('No state'),
+        syncComponents: noop,
+        components: constant([]),
+        events: constant({})
+      };
+      return premade(me);
+    };
+    var uids = generate$3;
+    var build$1 = function (spec) {
+      return getPremade(spec).fold(function () {
+        var userSpecWithUid = spec.hasOwnProperty('uid') ? spec : __assign({ uid: uids('') }, spec);
+        return buildFromSpec(userSpecWithUid).getOrDie();
+      }, function (prebuilt) {
+        return prebuilt;
+      });
+    };
+    var premade$1 = premade;
+
+    var hoverEvent = 'alloy.item-hover';
+    var focusEvent = 'alloy.item-focus';
+    var onHover = function (item) {
+      if (search(item.element()).isNone() || Focusing.isFocused(item)) {
+        if (!Focusing.isFocused(item)) {
+          Focusing.focus(item);
+        }
+        emitWith(item, hoverEvent, { item: item });
+      }
+    };
+    var onFocus = function (item) {
+      emitWith(item, focusEvent, { item: item });
+    };
+    var hover = constant(hoverEvent);
+    var focus$3 = constant(focusEvent);
+
+    var builder = function (detail) {
+      return {
+        dom: detail.dom,
+        domModification: __assign(__assign({}, detail.domModification), { attributes: __assign(__assign(__assign({ 'role': detail.toggling.isSome() ? 'menuitemcheckbox' : 'menuitem' }, detail.domModification.attributes), { 'aria-haspopup': detail.hasSubmenu }), detail.hasSubmenu ? { 'aria-expanded': false } : {}) }),
+        behaviours: SketchBehaviours.augment(detail.itemBehaviours, [
+          detail.toggling.fold(Toggling.revoke, function (tConfig) {
+            return Toggling.config(__assign({ aria: { mode: 'checked' } }, tConfig));
+          }),
+          Focusing.config({
+            ignore: detail.ignoreFocus,
+            stopMousedown: detail.ignoreFocus,
+            onFocus: function (component) {
+              onFocus(component);
+            }
+          }),
+          Keying.config({ mode: 'execution' }),
+          Representing.config({
+            store: {
+              mode: 'memory',
+              initialValue: detail.data
+            }
+          }),
+          config('item-type-events', __spreadArrays(pointerEvents(), [
+            run(mouseover(), onHover),
+            run(focusItem(), Focusing.focus)
+          ]))
+        ]),
+        components: detail.components,
+        eventOrder: detail.eventOrder
+      };
+    };
+    var schema$a = [
+      strict$1('data'),
+      strict$1('components'),
+      strict$1('dom'),
+      defaulted$1('hasSubmenu', false),
+      option('toggling'),
+      SketchBehaviours.field('itemBehaviours', [
+        Toggling,
+        Focusing,
+        Keying,
+        Representing
+      ]),
+      defaulted$1('ignoreFocus', false),
+      defaulted$1('domModification', {}),
+      output('builder', builder),
+      defaulted$1('eventOrder', {})
+    ];
+
+    var builder$1 = function (detail) {
+      return {
+        dom: detail.dom,
+        components: detail.components,
+        events: derive([stopper(focusItem())])
+      };
+    };
+    var schema$b = [
+      strict$1('dom'),
+      strict$1('components'),
+      output('builder', builder$1)
+    ];
+
+    var owner$2 = function () {
+      return 'item-widget';
+    };
+    var parts = constant([required({
+        name: 'widget',
+        overrides: function (detail) {
+          return {
+            behaviours: derive$1([Representing.config({
+                store: {
+                  mode: 'manual',
+                  getValue: function (_component) {
+                    return detail.data;
+                  },
+                  setValue: function () {
+                  }
+                }
+              })])
+          };
+        }
+      })]);
+
+    var builder$2 = function (detail) {
+      var subs = substitutes(owner$2(), detail, parts());
+      var components$1 = components(owner$2(), detail, subs.internals());
+      var focusWidget = function (component) {
+        return getPart(component, detail, 'widget').map(function (widget) {
+          Keying.focusIn(widget);
+          return widget;
+        });
+      };
+      var onHorizontalArrow = function (component, simulatedEvent) {
+        return inside(simulatedEvent.event().target()) ? Option.none() : function () {
+          if (detail.autofocus) {
+            simulatedEvent.setSource(component.element());
+            return Option.none();
+          } else {
+            return Option.none();
+          }
+        }();
+      };
+      return {
+        dom: detail.dom,
+        components: components$1,
+        domModification: detail.domModification,
+        events: derive([
+          runOnExecute(function (component, simulatedEvent) {
+            focusWidget(component).each(function (_widget) {
+              simulatedEvent.stop();
+            });
+          }),
+          run(mouseover(), onHover),
+          run(focusItem(), function (component, _simulatedEvent) {
+            if (detail.autofocus) {
+              focusWidget(component);
+            } else {
+              Focusing.focus(component);
+            }
+          })
+        ]),
+        behaviours: SketchBehaviours.augment(detail.widgetBehaviours, [
+          Representing.config({
+            store: {
+              mode: 'memory',
+              initialValue: detail.data
+            }
+          }),
+          Focusing.config({
+            ignore: detail.ignoreFocus,
+            onFocus: function (component) {
+              onFocus(component);
+            }
+          }),
+          Keying.config({
+            mode: 'special',
+            focusIn: detail.autofocus ? function (component) {
+              focusWidget(component);
+            } : revoke(),
+            onLeft: onHorizontalArrow,
+            onRight: onHorizontalArrow,
+            onEscape: function (component, simulatedEvent) {
+              if (!Focusing.isFocused(component) && !detail.autofocus) {
+                Focusing.focus(component);
+                return Option.some(true);
+              } else if (detail.autofocus) {
+                simulatedEvent.setSource(component.element());
+                return Option.none();
+              } else {
+                return Option.none();
+              }
+            }
+          })
+        ])
+      };
+    };
+    var schema$c = [
+      strict$1('uid'),
+      strict$1('data'),
+      strict$1('components'),
+      strict$1('dom'),
+      defaulted$1('autofocus', false),
+      defaulted$1('ignoreFocus', false),
+      SketchBehaviours.field('widgetBehaviours', [
+        Representing,
+        Focusing,
+        Keying
+      ]),
+      defaulted$1('domModification', {}),
+      defaultUidsSchema(parts()),
+      output('builder', builder$2)
+    ];
+
+    var itemSchema$1 = choose$1('type', {
+      widget: schema$c,
+      item: schema$a,
+      separator: schema$b
+    });
+    var configureGrid = function (detail, movementInfo) {
+      return {
+        mode: 'flatgrid',
+        selector: '.' + detail.markers.item,
+        initSize: {
+          numColumns: movementInfo.initSize.numColumns,
+          numRows: movementInfo.initSize.numRows
+        },
+        focusManager: detail.focusManager
+      };
+    };
+    var configureMatrix = function (detail, movementInfo) {
+      return {
+        mode: 'matrix',
+        selectors: {
+          row: movementInfo.rowSelector,
+          cell: '.' + detail.markers.item
+        },
+        focusManager: detail.focusManager
+      };
+    };
+    var configureMenu = function (detail, movementInfo) {
+      return {
+        mode: 'menu',
+        selector: '.' + detail.markers.item,
+        moveOnTab: movementInfo.moveOnTab,
+        focusManager: detail.focusManager
+      };
+    };
+    var parts$1 = constant([group({
+        factory: {
+          sketch: function (spec) {
+            var itemInfo = asRawOrDie('menu.spec item', itemSchema$1, spec);
+            return itemInfo.builder(itemInfo);
+          }
+        },
+        name: 'items',
+        unit: 'item',
+        defaults: function (detail, u) {
+          return u.hasOwnProperty('uid') ? u : __assign(__assign({}, u), { uid: generate$3('item') });
+        },
+        overrides: function (detail, u) {
+          return {
+            type: u.type,
+            ignoreFocus: detail.fakeFocus,
+            domModification: { classes: [detail.markers.item] }
+          };
+        }
+      })]);
+    var schema$d = constant([
+      strict$1('value'),
+      strict$1('items'),
+      strict$1('dom'),
+      strict$1('components'),
+      defaulted$1('eventOrder', {}),
+      field$1('menuBehaviours', [
+        Highlighting,
+        Representing,
+        Composing,
+        Keying
+      ]),
+      defaultedOf('movement', {
+        mode: 'menu',
+        moveOnTab: true
+      }, choose$1('mode', {
+        grid: [
+          initSize(),
+          output('config', configureGrid)
+        ],
+        matrix: [
+          output('config', configureMatrix),
+          strict$1('rowSelector')
+        ],
+        menu: [
+          defaulted$1('moveOnTab', true),
+          output('config', configureMenu)
+        ]
+      })),
+      itemMarkers(),
+      defaulted$1('fakeFocus', false),
+      defaulted$1('focusManager', dom()),
+      onHandler('onHighlight')
+    ]);
+
+    var focus$4 = constant('alloy.menu-focus');
+
+    var make$2 = function (detail, components, _spec, _externals) {
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        markers: detail.markers,
+        behaviours: augment(detail.menuBehaviours, [
+          Highlighting.config({
+            highlightClass: detail.markers.selectedItem,
+            itemClass: detail.markers.item,
+            onHighlight: detail.onHighlight
+          }),
+          Representing.config({
+            store: {
+              mode: 'memory',
+              initialValue: detail.value
+            }
+          }),
+          Composing.config({ find: Option.some }),
+          Keying.config(detail.movement.config(detail, detail.movement))
+        ]),
+        events: derive([
+          run(focus$3(), function (menu, simulatedEvent) {
+            var event = simulatedEvent.event();
+            menu.getSystem().getByDom(event.target()).each(function (item) {
+              Highlighting.highlight(menu, item);
+              simulatedEvent.stop();
+              emitWith(menu, focus$4(), {
+                menu: menu,
+                item: item
+              });
+            });
+          }),
+          run(hover(), function (menu, simulatedEvent) {
+            var item = simulatedEvent.event().item();
+            Highlighting.highlight(menu, item);
+          })
+        ]),
+        components: components,
+        eventOrder: detail.eventOrder,
+        domModification: { attributes: { role: 'menu' } }
+      };
+    };
+
+    var Menu = composite$1({
+      name: 'Menu',
+      configFields: schema$d(),
+      partFields: parts$1(),
+      factory: make$2
+    });
+
+    var preserve$1 = function (f, container) {
+      var ownerDoc = owner(container);
+      var refocus = active(ownerDoc).bind(function (focused) {
+        var hasFocus = function (elem) {
+          return eq(focused, elem);
+        };
+        return hasFocus(container) ? Option.some(container) : descendant(container, hasFocus);
+      });
+      var result = f(container);
+      refocus.each(function (oldFocus) {
+        active(ownerDoc).filter(function (newFocus) {
+          return eq(newFocus, oldFocus);
+        }).fold(function () {
+          focus$1(oldFocus);
+        }, noop);
+      });
+      return result;
+    };
+
+    var set$8 = function (component, replaceConfig, replaceState, data) {
+      preserve$1(function () {
+        var newChildren = map$1(data, component.getSystem().build);
+        replaceChildren(component, newChildren);
+      }, component.element());
+    };
+    var insert = function (component, replaceConfig, insertion, childSpec) {
+      var child = component.getSystem().build(childSpec);
+      attachWith(component, child, insertion);
+    };
+    var append$2 = function (component, replaceConfig, replaceState, appendee) {
+      insert(component, replaceConfig, append, appendee);
+    };
+    var prepend$1 = function (component, replaceConfig, replaceState, prependee) {
+      insert(component, replaceConfig, prepend, prependee);
+    };
+    var remove$7 = function (component, replaceConfig, replaceState, removee) {
+      var children = contents(component);
+      var foundChild = find$2(children, function (child) {
+        return eq(removee.element(), child.element());
+      });
+      foundChild.each(detach);
+    };
+    var contents = function (component, _replaceConfig) {
+      return component.components();
+    };
+    var replaceAt = function (component, replaceConfig, replaceState, replaceeIndex, replacer) {
+      var children = contents(component);
+      return Option.from(children[replaceeIndex]).map(function (replacee) {
+        remove$7(component, replaceConfig, replaceState, replacee);
+        replacer.each(function (r) {
+          insert(component, replaceConfig, function (p, c) {
+            appendAt(p, c, replaceeIndex);
+          }, r);
+        });
+        return replacee;
+      });
+    };
+    var replaceBy = function (component, replaceConfig, replaceState, replaceePred, replacer) {
+      var children = contents(component);
+      return findIndex(children, replaceePred).bind(function (replaceeIndex) {
+        return replaceAt(component, replaceConfig, replaceState, replaceeIndex, replacer);
+      });
+    };
+
+    var ReplaceApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        append: append$2,
+        prepend: prepend$1,
+        remove: remove$7,
+        replaceAt: replaceAt,
+        replaceBy: replaceBy,
+        set: set$8,
+        contents: contents
+    });
+
+    var Replacing = create$1({
+      fields: [],
+      name: 'replacing',
+      apis: ReplaceApis
+    });
+
+    var transpose = function (obj) {
+      return tupleMap(obj, function (v, k) {
+        return {
+          k: v,
+          v: k
+        };
+      });
+    };
+    var trace = function (items, byItem, byMenu, finish) {
+      return get(byMenu, finish).bind(function (triggerItem) {
+        return get(items, triggerItem).bind(function (triggerMenu) {
+          var rest = trace(items, byItem, byMenu, triggerMenu);
+          return Option.some([triggerMenu].concat(rest));
+        });
+      }).getOr([]);
+    };
+    var generate$5 = function (menus, expansions) {
+      var items = {};
+      each(menus, function (menuItems, menu) {
+        each$1(menuItems, function (item) {
+          items[item] = menu;
+        });
+      });
+      var byItem = expansions;
+      var byMenu = transpose(expansions);
+      var menuPaths = map(byMenu, function (_triggerItem, submenu) {
+        return [submenu].concat(trace(items, byItem, byMenu, submenu));
+      });
+      return map(items, function (menu) {
+        return get(menuPaths, menu).getOr([menu]);
+      });
+    };
+
+    var init$3 = function () {
+      var expansions = Cell({});
+      var menus = Cell({});
+      var paths = Cell({});
+      var primary = Cell(Option.none());
+      var directory = Cell({});
+      var clear = function () {
+        expansions.set({});
+        menus.set({});
+        paths.set({});
+        primary.set(Option.none());
+      };
+      var isClear = function () {
+        return primary.get().isNone();
+      };
+      var setMenuBuilt = function (menuName, built) {
+        var _a;
+        menus.set(__assign(__assign({}, menus.get()), (_a = {}, _a[menuName] = {
+          type: 'prepared',
+          menu: built
+        }, _a)));
+      };
+      var setContents = function (sPrimary, sMenus, sExpansions, dir) {
+        primary.set(Option.some(sPrimary));
+        expansions.set(sExpansions);
+        menus.set(sMenus);
+        directory.set(dir);
+        var sPaths = generate$5(dir, sExpansions);
+        paths.set(sPaths);
+      };
+      var getTriggeringItem = function (menuValue) {
+        return find(expansions.get(), function (v, _k) {
+          return v === menuValue;
+        });
+      };
+      var getTriggerData = function (menuValue, getItemByValue, path) {
+        return getPreparedMenu(menuValue).bind(function (menu) {
+          return getTriggeringItem(menuValue).bind(function (triggeringItemValue) {
+            return getItemByValue(triggeringItemValue).map(function (triggeredItem) {
+              return {
+                triggeredMenu: menu,
+                triggeringItem: triggeredItem,
+                triggeringPath: path
+              };
+            });
+          });
+        });
+      };
+      var getTriggeringPath = function (itemValue, getItemByValue) {
+        var extraPath = filter$1(lookupItem(itemValue).toArray(), function (menuValue) {
+          return getPreparedMenu(menuValue).isSome();
+        });
+        return get(paths.get(), itemValue).bind(function (path) {
+          var revPath = reverse(extraPath.concat(path));
+          var triggers = bind(revPath, function (menuValue, menuIndex) {
+            return getTriggerData(menuValue, getItemByValue, revPath.slice(0, menuIndex + 1)).fold(function () {
+              return primary.get().is(menuValue) ? [] : [Option.none()];
+            }, function (data) {
+              return [Option.some(data)];
+            });
+          });
+          return sequence(triggers);
+        });
+      };
+      var expand = function (itemValue) {
+        return get(expansions.get(), itemValue).map(function (menu) {
+          var current = get(paths.get(), itemValue).getOr([]);
+          return [menu].concat(current);
+        });
+      };
+      var collapse = function (itemValue) {
+        return get(paths.get(), itemValue).bind(function (path) {
+          return path.length > 1 ? Option.some(path.slice(1)) : Option.none();
+        });
+      };
+      var refresh = function (itemValue) {
+        return get(paths.get(), itemValue);
+      };
+      var getPreparedMenu = function (menuValue) {
+        return lookupMenu(menuValue).bind(extractPreparedMenu);
+      };
+      var lookupMenu = function (menuValue) {
+        return get(menus.get(), menuValue);
+      };
+      var lookupItem = function (itemValue) {
+        return get(expansions.get(), itemValue);
+      };
+      var otherMenus = function (path) {
+        var menuValues = directory.get();
+        return difference(keys(menuValues), path);
+      };
+      var getPrimary = function () {
+        return primary.get().bind(getPreparedMenu);
+      };
+      var getMenus = function () {
+        return menus.get();
+      };
+      return {
+        setMenuBuilt: setMenuBuilt,
+        setContents: setContents,
+        expand: expand,
+        refresh: refresh,
+        collapse: collapse,
+        lookupMenu: lookupMenu,
+        lookupItem: lookupItem,
+        otherMenus: otherMenus,
+        getPrimary: getPrimary,
+        getMenus: getMenus,
+        clear: clear,
+        isClear: isClear,
+        getTriggeringPath: getTriggeringPath
+      };
+    };
+    var extractPreparedMenu = function (prep) {
+      return prep.type === 'prepared' ? Option.some(prep.menu) : Option.none();
+    };
+    var LayeredState = {
+      init: init$3,
+      extractPreparedMenu: extractPreparedMenu
+    };
+
+    var make$3 = function (detail, _rawUiSpec) {
+      var submenuParentItems = Cell(Option.none());
+      var buildMenus = function (container, primaryName, menus) {
+        return map(menus, function (spec, name) {
+          var makeSketch = function () {
+            return Menu.sketch(__assign(__assign({ dom: spec.dom }, spec), {
+              value: name,
+              items: spec.items,
+              markers: detail.markers,
+              fakeFocus: detail.fakeFocus,
+              onHighlight: detail.onHighlight,
+              focusManager: detail.fakeFocus ? highlights() : dom()
+            }));
+          };
+          return name === primaryName ? {
+            type: 'prepared',
+            menu: container.getSystem().build(makeSketch())
+          } : {
+            type: 'notbuilt',
+            nbMenu: makeSketch
+          };
+        });
+      };
+      var layeredState = LayeredState.init();
+      var setup = function (container) {
+        var componentMap = buildMenus(container, detail.data.primary, detail.data.menus);
+        var directory = toDirectory();
+        layeredState.setContents(detail.data.primary, componentMap, detail.data.expansions, directory);
+        return layeredState.getPrimary();
+      };
+      var getItemValue = function (item) {
+        return Representing.getValue(item).value;
+      };
+      var getItemByValue = function (_container, menus, itemValue) {
+        return findMap(menus, function (menu) {
+          if (!menu.getSystem().isConnected()) {
+            return Option.none();
+          }
+          var candidates = Highlighting.getCandidates(menu);
+          return find$2(candidates, function (c) {
+            return getItemValue(c) === itemValue;
+          });
+        });
+      };
+      var toDirectory = function (_container) {
+        return map(detail.data.menus, function (data, _menuName) {
+          return bind(data.items, function (item) {
+            return item.type === 'separator' ? [] : [item.data.value];
+          });
+        });
+      };
+      var setActiveMenu = function (container, menu) {
+        Highlighting.highlight(container, menu);
+        Highlighting.getHighlighted(menu).orThunk(function () {
+          return Highlighting.getFirst(menu);
+        }).each(function (item) {
+          dispatch(container, item.element(), focusItem());
+        });
+      };
+      var getMenus = function (state, menuValues) {
+        return cat(map$1(menuValues, function (mv) {
+          return state.lookupMenu(mv).bind(function (prep) {
+            return prep.type === 'prepared' ? Option.some(prep.menu) : Option.none();
+          });
+        }));
+      };
+      var closeOthers = function (container, state, path) {
+        var others = getMenus(state, state.otherMenus(path));
+        each$1(others, function (o) {
+          remove$6(o.element(), [detail.markers.backgroundMenu]);
+          if (!detail.stayInDom) {
+            Replacing.remove(container, o);
+          }
+        });
+      };
+      var getSubmenuParents = function (container) {
+        return submenuParentItems.get().getOrThunk(function () {
+          var r = {};
+          var items = descendants(container.element(), '.' + detail.markers.item);
+          var parentItems = filter$1(items, function (i) {
+            return get$1(i, 'aria-haspopup') === 'true';
+          });
+          each$1(parentItems, function (i) {
+            container.getSystem().getByDom(i).each(function (itemComp) {
+              var key = getItemValue(itemComp);
+              r[key] = itemComp;
+            });
+          });
+          submenuParentItems.set(Option.some(r));
+          return r;
+        });
+      };
+      var updateAriaExpansions = function (container, path) {
+        var parentItems = getSubmenuParents(container);
+        each(parentItems, function (v, k) {
+          var expanded = contains(path, k);
+          set(v.element(), 'aria-expanded', expanded);
+        });
+      };
+      var updateMenuPath = function (container, state, path) {
+        return Option.from(path[0]).bind(function (latestMenuName) {
+          return state.lookupMenu(latestMenuName).bind(function (menuPrep) {
+            if (menuPrep.type === 'notbuilt') {
+              return Option.none();
+            } else {
+              var activeMenu = menuPrep.menu;
+              var rest = getMenus(state, path.slice(1));
+              each$1(rest, function (r) {
+                add$2(r.element(), detail.markers.backgroundMenu);
+              });
+              if (!inBody(activeMenu.element())) {
+                Replacing.append(container, premade$1(activeMenu));
+              }
+              remove$6(activeMenu.element(), [detail.markers.backgroundMenu]);
+              setActiveMenu(container, activeMenu);
+              closeOthers(container, state, path);
+              return Option.some(activeMenu);
+            }
+          });
+        });
+      };
+      var ExpandHighlightDecision;
+      (function (ExpandHighlightDecision) {
+        ExpandHighlightDecision[ExpandHighlightDecision['HighlightSubmenu'] = 0] = 'HighlightSubmenu';
+        ExpandHighlightDecision[ExpandHighlightDecision['HighlightParent'] = 1] = 'HighlightParent';
+      }(ExpandHighlightDecision || (ExpandHighlightDecision = {})));
+      var buildIfRequired = function (container, menuName, menuPrep) {
+        if (menuPrep.type === 'notbuilt') {
+          var menu = container.getSystem().build(menuPrep.nbMenu());
+          layeredState.setMenuBuilt(menuName, menu);
+          return menu;
+        } else {
+          return menuPrep.menu;
+        }
+      };
+      var expandRight = function (container, item, decision) {
+        if (decision === void 0) {
+          decision = ExpandHighlightDecision.HighlightSubmenu;
+        }
+        var value = getItemValue(item);
+        return layeredState.expand(value).bind(function (path) {
+          updateAriaExpansions(container, path);
+          return Option.from(path[0]).bind(function (menuName) {
+            return layeredState.lookupMenu(menuName).bind(function (activeMenuPrep) {
+              var activeMenu = buildIfRequired(container, menuName, activeMenuPrep);
+              if (!inBody(activeMenu.element())) {
+                Replacing.append(container, premade$1(activeMenu));
+              }
+              detail.onOpenSubmenu(container, item, activeMenu, reverse(path));
+              if (decision === ExpandHighlightDecision.HighlightSubmenu) {
+                Highlighting.highlightFirst(activeMenu);
+                return updateMenuPath(container, layeredState, path);
+              } else {
+                Highlighting.dehighlightAll(activeMenu);
+                return Option.some(item);
+              }
+            });
+          });
+        });
+      };
+      var collapseLeft = function (container, item) {
+        var value = getItemValue(item);
+        return layeredState.collapse(value).bind(function (path) {
+          updateAriaExpansions(container, path);
+          return updateMenuPath(container, layeredState, path).map(function (activeMenu) {
+            detail.onCollapseMenu(container, item, activeMenu);
+            return activeMenu;
+          });
+        });
+      };
+      var updateView = function (container, item) {
+        var value = getItemValue(item);
+        return layeredState.refresh(value).bind(function (path) {
+          updateAriaExpansions(container, path);
+          return updateMenuPath(container, layeredState, path);
+        });
+      };
+      var onRight = function (container, item) {
+        return inside(item.element()) ? Option.none() : expandRight(container, item, ExpandHighlightDecision.HighlightSubmenu);
+      };
+      var onLeft = function (container, item) {
+        return inside(item.element()) ? Option.none() : collapseLeft(container, item);
+      };
+      var onEscape = function (container, item) {
+        return collapseLeft(container, item).orThunk(function () {
+          return detail.onEscape(container, item).map(function () {
+            return container;
+          });
+        });
+      };
+      var keyOnItem = function (f) {
+        return function (container, simulatedEvent) {
+          return closest$2(simulatedEvent.getSource(), '.' + detail.markers.item).bind(function (target) {
+            return container.getSystem().getByDom(target).toOption().bind(function (item) {
+              return f(container, item).map(function () {
+                return true;
+              });
+            });
+          });
+        };
+      };
+      var events = derive([
+        run(focus$4(), function (sandbox, simulatedEvent) {
+          var item = simulatedEvent.event().item();
+          layeredState.lookupItem(getItemValue(item)).each(function () {
+            var menu = simulatedEvent.event().menu();
+            Highlighting.highlight(sandbox, menu);
+            var value = getItemValue(simulatedEvent.event().item());
+            layeredState.refresh(value).each(function (path) {
+              return closeOthers(sandbox, layeredState, path);
+            });
+          });
+        }),
+        runOnExecute(function (component, simulatedEvent) {
+          var target = simulatedEvent.event().target();
+          component.getSystem().getByDom(target).each(function (item) {
+            var itemValue = getItemValue(item);
+            if (itemValue.indexOf('collapse-item') === 0) {
+              collapseLeft(component, item);
+            }
+            expandRight(component, item, ExpandHighlightDecision.HighlightSubmenu).fold(function () {
+              detail.onExecute(component, item);
+            }, function () {
+            });
+          });
+        }),
+        runOnAttached(function (container, _simulatedEvent) {
+          setup(container).each(function (primary) {
+            Replacing.append(container, premade$1(primary));
+            detail.onOpenMenu(container, primary);
+            if (detail.highlightImmediately) {
+              setActiveMenu(container, primary);
+            }
+          });
+        })
+      ].concat(detail.navigateOnHover ? [run(hover(), function (sandbox, simulatedEvent) {
+          var item = simulatedEvent.event().item();
+          updateView(sandbox, item);
+          expandRight(sandbox, item, ExpandHighlightDecision.HighlightParent);
+          detail.onHover(sandbox, item);
+        })] : []));
+      var getActiveItem = function (container) {
+        return Highlighting.getHighlighted(container).bind(Highlighting.getHighlighted);
+      };
+      var collapseMenuApi = function (container) {
+        getActiveItem(container).each(function (currentItem) {
+          collapseLeft(container, currentItem);
+        });
+      };
+      var highlightPrimary = function (container) {
+        layeredState.getPrimary().each(function (primary) {
+          setActiveMenu(container, primary);
+        });
+      };
+      var extractMenuFromContainer = function (container) {
+        return Option.from(container.components()[0]).filter(function (comp) {
+          return get$1(comp.element(), 'role') === 'menu';
+        });
+      };
+      var repositionMenus = function (container) {
+        var maybeActivePrimary = layeredState.getPrimary().bind(function (primary) {
+          return getActiveItem(container).bind(function (currentItem) {
+            var itemValue = getItemValue(currentItem);
+            var allMenus = values(layeredState.getMenus());
+            var preparedMenus = cat(map$1(allMenus, LayeredState.extractPreparedMenu));
+            return layeredState.getTriggeringPath(itemValue, function (v) {
+              return getItemByValue(container, preparedMenus, v);
+            });
+          }).map(function (triggeringPath) {
+            return {
+              primary: primary,
+              triggeringPath: triggeringPath
+            };
+          });
+        });
+        maybeActivePrimary.fold(function () {
+          extractMenuFromContainer(container).each(function (primaryMenu) {
+            detail.onRepositionMenu(container, primaryMenu, []);
+          });
+        }, function (_a) {
+          var primary = _a.primary, triggeringPath = _a.triggeringPath;
+          detail.onRepositionMenu(container, primary, triggeringPath);
+        });
+      };
+      var apis = {
+        collapseMenu: collapseMenuApi,
+        highlightPrimary: highlightPrimary,
+        repositionMenus: repositionMenus
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        markers: detail.markers,
+        behaviours: augment(detail.tmenuBehaviours, [
+          Keying.config({
+            mode: 'special',
+            onRight: keyOnItem(onRight),
+            onLeft: keyOnItem(onLeft),
+            onEscape: keyOnItem(onEscape),
+            focusIn: function (container, _keyInfo) {
+              layeredState.getPrimary().each(function (primary) {
+                dispatch(container, primary.element(), focusItem());
+              });
+            }
+          }),
+          Highlighting.config({
+            highlightClass: detail.markers.selectedMenu,
+            itemClass: detail.markers.menu
+          }),
+          Composing.config({
+            find: function (container) {
+              return Highlighting.getHighlighted(container);
+            }
+          }),
+          Replacing.config({})
+        ]),
+        eventOrder: detail.eventOrder,
+        apis: apis,
+        events: events
+      };
+    };
+    var collapseItem = constant('collapse-item');
+
+    var tieredData = function (primary, menus, expansions) {
+      return {
+        primary: primary,
+        menus: menus,
+        expansions: expansions
+      };
+    };
+    var singleData = function (name, menu) {
+      return {
+        primary: name,
+        menus: wrap$1(name, menu),
+        expansions: {}
+      };
+    };
+    var collapseItem$1 = function (text) {
+      return {
+        value: generate$1(collapseItem()),
+        meta: { text: text }
+      };
+    };
+    var tieredMenu = single$2({
+      name: 'TieredMenu',
+      configFields: [
+        onStrictKeyboardHandler('onExecute'),
+        onStrictKeyboardHandler('onEscape'),
+        onStrictHandler('onOpenMenu'),
+        onStrictHandler('onOpenSubmenu'),
+        onHandler('onRepositionMenu'),
+        onHandler('onCollapseMenu'),
+        defaulted$1('highlightImmediately', true),
+        strictObjOf('data', [
+          strict$1('primary'),
+          strict$1('menus'),
+          strict$1('expansions')
+        ]),
+        defaulted$1('fakeFocus', false),
+        onHandler('onHighlight'),
+        onHandler('onHover'),
+        tieredMenuMarkers(),
+        strict$1('dom'),
+        defaulted$1('navigateOnHover', true),
+        defaulted$1('stayInDom', false),
+        field$1('tmenuBehaviours', [
+          Keying,
+          Highlighting,
+          Composing,
+          Replacing
+        ]),
+        defaulted$1('eventOrder', {})
+      ],
+      apis: {
+        collapseMenu: function (apis, tmenu) {
+          apis.collapseMenu(tmenu);
+        },
+        highlightPrimary: function (apis, tmenu) {
+          apis.highlightPrimary(tmenu);
+        },
+        repositionMenus: function (apis, tmenu) {
+          apis.repositionMenus(tmenu);
+        }
+      },
+      factory: make$3,
+      extraApis: {
+        tieredData: tieredData,
+        singleData: singleData,
+        collapseItem: collapseItem$1
+      }
+    });
+
+    var findRoute = function (component, transConfig, transState, route) {
+      return get(transConfig.routes, route.start).bind(function (sConfig) {
+        return get(sConfig, route.destination);
+      });
+    };
+    var getTransition = function (comp, transConfig, transState) {
+      var route = getCurrentRoute(comp, transConfig);
+      return route.bind(function (r) {
+        return getTransitionOf(comp, transConfig, transState, r);
+      });
+    };
+    var getTransitionOf = function (comp, transConfig, transState, route) {
+      return findRoute(comp, transConfig, transState, route).bind(function (r) {
+        return r.transition.map(function (t) {
+          return {
+            transition: t,
+            route: r
+          };
+        });
+      });
+    };
+    var disableTransition = function (comp, transConfig, transState) {
+      getTransition(comp, transConfig, transState).each(function (routeTransition) {
+        var t = routeTransition.transition;
+        remove$4(comp.element(), t.transitionClass);
+        remove$1(comp.element(), transConfig.destinationAttr);
+      });
+    };
+    var getNewRoute = function (comp, transConfig, transState, destination) {
+      return {
+        start: get$1(comp.element(), transConfig.stateAttr),
+        destination: destination
+      };
+    };
+    var getCurrentRoute = function (comp, transConfig, _transState) {
+      var el = comp.element();
+      return getOpt(el, transConfig.destinationAttr).map(function (destination) {
+        return {
+          start: get$1(comp.element(), transConfig.stateAttr),
+          destination: destination
+        };
+      });
+    };
+    var jumpTo = function (comp, transConfig, transState, destination) {
+      disableTransition(comp, transConfig, transState);
+      if (has$1(comp.element(), transConfig.stateAttr) && get$1(comp.element(), transConfig.stateAttr) !== destination) {
+        transConfig.onFinish(comp, destination);
+      }
+      set(comp.element(), transConfig.stateAttr, destination);
+    };
+    var fasttrack = function (comp, transConfig, _transState, _destination) {
+      if (has$1(comp.element(), transConfig.destinationAttr)) {
+        getOpt(comp.element(), transConfig.destinationAttr).each(function (destination) {
+          set(comp.element(), transConfig.stateAttr, destination);
+        });
+        remove$1(comp.element(), transConfig.destinationAttr);
+      }
+    };
+    var progressTo = function (comp, transConfig, transState, destination) {
+      fasttrack(comp, transConfig);
+      var route = getNewRoute(comp, transConfig, transState, destination);
+      getTransitionOf(comp, transConfig, transState, route).fold(function () {
+        jumpTo(comp, transConfig, transState, destination);
+      }, function (routeTransition) {
+        disableTransition(comp, transConfig, transState);
+        var t = routeTransition.transition;
+        add$2(comp.element(), t.transitionClass);
+        set(comp.element(), transConfig.destinationAttr, destination);
+      });
+    };
+    var getState$1 = function (comp, transConfig, _transState) {
+      return getOpt(comp.element(), transConfig.stateAttr);
+    };
+
+    var TransitionApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        findRoute: findRoute,
+        disableTransition: disableTransition,
+        getCurrentRoute: getCurrentRoute,
+        jumpTo: jumpTo,
+        progressTo: progressTo,
+        getState: getState$1
+    });
+
+    var events$9 = function (transConfig, transState) {
+      return derive([
+        run(transitionend(), function (component, simulatedEvent) {
+          var raw = simulatedEvent.event().raw();
+          getCurrentRoute(component, transConfig).each(function (route) {
+            findRoute(component, transConfig, transState, route).each(function (rInfo) {
+              rInfo.transition.each(function (rTransition) {
+                if (raw.propertyName === rTransition.property) {
+                  jumpTo(component, transConfig, transState, route.destination);
+                  transConfig.onTransition(component, route);
+                }
+              });
+            });
+          });
+        }),
+        runOnAttached(function (comp, _se) {
+          jumpTo(comp, transConfig, transState, transConfig.initialState);
+        })
+      ]);
+    };
+
+    var ActiveTransitioning = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events$9
+    });
+
+    var TransitionSchema = [
+      defaulted$1('destinationAttr', 'data-transitioning-destination'),
+      defaulted$1('stateAttr', 'data-transitioning-state'),
+      strict$1('initialState'),
+      onHandler('onTransition'),
+      onHandler('onFinish'),
+      strictOf('routes', setOf$1(Result.value, setOf$1(Result.value, objOfOnly([optionObjOfOnly('transition', [
+          strict$1('property'),
+          strict$1('transitionClass')
+        ])]))))
+    ];
+
+    var createRoutes = function (routes) {
+      var r = {};
+      each(routes, function (v, k) {
+        var waypoints = k.split('<->');
+        r[waypoints[0]] = wrap$1(waypoints[1], v);
+        r[waypoints[1]] = wrap$1(waypoints[0], v);
+      });
+      return r;
+    };
+    var createBistate = function (first, second, transitions) {
+      return wrapAll$1([
+        {
+          key: first,
+          value: wrap$1(second, transitions)
+        },
+        {
+          key: second,
+          value: wrap$1(first, transitions)
+        }
+      ]);
+    };
+    var createTristate = function (first, second, third, transitions) {
+      return wrapAll$1([
+        {
+          key: first,
+          value: wrapAll$1([
+            {
+              key: second,
+              value: transitions
+            },
+            {
+              key: third,
+              value: transitions
+            }
+          ])
+        },
+        {
+          key: second,
+          value: wrapAll$1([
+            {
+              key: first,
+              value: transitions
+            },
+            {
+              key: third,
+              value: transitions
+            }
+          ])
+        },
+        {
+          key: third,
+          value: wrapAll$1([
+            {
+              key: first,
+              value: transitions
+            },
+            {
+              key: second,
+              value: transitions
+            }
+          ])
+        }
+      ]);
+    };
+    var Transitioning = create$1({
+      fields: TransitionSchema,
+      name: 'transitioning',
+      active: ActiveTransitioning,
+      apis: TransitionApis,
+      extra: {
+        createRoutes: createRoutes,
+        createBistate: createBistate,
+        createTristate: createTristate
+      }
+    });
+
+    var scrollableStyle = resolve('scrollable');
+    var register = function (element) {
+      add$2(element, scrollableStyle);
+    };
+    var deregister = function (element) {
+      remove$4(element, scrollableStyle);
+    };
+    var scrollable = scrollableStyle;
+
+    var getValue$4 = function (item) {
+      return get(item, 'format').getOr(item.title);
+    };
+    var convert$1 = function (formats, memMenuThunk) {
+      var mainMenu = makeMenu('Styles', [].concat(map$1(formats.items, function (k) {
+        return makeItem(getValue$4(k), k.title, k.isSelected(), k.getPreview(), hasNonNullableKey(formats.expansions, getValue$4(k)));
+      })), memMenuThunk, false);
+      var submenus = map(formats.menus, function (menuItems, menuName) {
+        var items = map$1(menuItems, function (item) {
+          return makeItem(getValue$4(item), item.title, item.isSelected !== undefined ? item.isSelected() : false, item.getPreview !== undefined ? item.getPreview() : '', hasNonNullableKey(formats.expansions, getValue$4(item)));
+        });
+        return makeMenu(menuName, items, memMenuThunk, true);
+      });
+      var menus = deepMerge(submenus, wrap$1('styles', mainMenu));
+      var tmenu = tieredMenu.tieredData('styles', menus, formats.expansions);
+      return { tmenu: tmenu };
+    };
+    var makeItem = function (value, text, selected, preview, isMenu) {
+      return {
+        data: {
+          value: value,
+          text: text
+        },
+        type: 'item',
+        dom: {
+          tag: 'div',
+          classes: isMenu ? [resolve('styles-item-is-menu')] : []
+        },
+        toggling: {
+          toggleOnExecute: false,
+          toggleClass: resolve('format-matches'),
+          selected: selected
+        },
+        itemBehaviours: derive$1(isMenu ? [] : [format(value, function (comp, status) {
+            var toggle = status ? Toggling.on : Toggling.off;
+            toggle(comp);
+          })]),
+        components: [{
+            dom: {
+              tag: 'div',
+              attributes: { style: preview },
+              innerHtml: text
+            }
+          }]
+      };
+    };
+    var makeMenu = function (value, items, memMenuThunk, collapsable) {
+      return {
+        value: value,
+        dom: { tag: 'div' },
+        components: [
+          Button.sketch({
+            dom: {
+              tag: 'div',
+              classes: [resolve('styles-collapser')]
+            },
+            components: collapsable ? [
+              {
+                dom: {
+                  tag: 'span',
+                  classes: [resolve('styles-collapse-icon')]
+                }
+              },
+              text(value)
+            ] : [text(value)],
+            action: function (item) {
+              if (collapsable) {
+                var comp = memMenuThunk().get(item);
+                tieredMenu.collapseMenu(comp);
+              }
+            }
+          }),
+          {
+            dom: {
+              tag: 'div',
+              classes: [resolve('styles-menu-items-container')]
+            },
+            components: [Menu.parts().items({})],
+            behaviours: derive$1([config('adhoc-scrollable-menu', [
+                runOnAttached(function (component, _simulatedEvent) {
+                  set$3(component.element(), 'overflow-y', 'auto');
+                  set$3(component.element(), '-webkit-overflow-scrolling', 'touch');
+                  register(component.element());
+                }),
+                runOnDetached(function (component) {
+                  remove$5(component.element(), 'overflow-y');
+                  remove$5(component.element(), '-webkit-overflow-scrolling');
+                  deregister(component.element());
+                })
+              ])])
+          }
+        ],
+        items: items,
+        menuBehaviours: derive$1([Transitioning.config({
+            initialState: 'after',
+            routes: Transitioning.createTristate('before', 'current', 'after', {
+              transition: {
+                property: 'transform',
+                transitionClass: 'transitioning'
+              }
+            })
+          })])
+      };
+    };
+    var sketch$8 = function (settings) {
+      var dataset = convert$1(settings.formats, function () {
+        return memMenu;
+      });
+      var memMenu = record(tieredMenu.sketch({
+        dom: {
+          tag: 'div',
+          classes: [resolve('styles-menu')]
+        },
+        components: [],
+        fakeFocus: true,
+        stayInDom: true,
+        onExecute: function (_tmenu, item) {
+          var v = Representing.getValue(item);
+          settings.handle(item, v.value);
+          return Option.none();
+        },
+        onEscape: function () {
+          return Option.none();
+        },
+        onOpenMenu: function (container, menu) {
+          var w = get$7(container.element());
+          set$4(menu.element(), w);
+          Transitioning.jumpTo(menu, 'current');
+        },
+        onOpenSubmenu: function (container, item, submenu) {
+          var w = get$7(container.element());
+          var menu = ancestor$2(item.element(), '[role="menu"]').getOrDie('hacky');
+          var menuComp = container.getSystem().getByDom(menu).getOrDie();
+          set$4(submenu.element(), w);
+          Transitioning.progressTo(menuComp, 'before');
+          Transitioning.jumpTo(submenu, 'after');
+          Transitioning.progressTo(submenu, 'current');
+        },
+        onCollapseMenu: function (container, item, menu) {
+          var submenu = ancestor$2(item.element(), '[role="menu"]').getOrDie('hacky');
+          var submenuComp = container.getSystem().getByDom(submenu).getOrDie();
+          Transitioning.progressTo(submenuComp, 'after');
+          Transitioning.progressTo(menu, 'current');
+        },
+        navigateOnHover: false,
+        highlightImmediately: true,
+        data: dataset.tmenu,
+        markers: {
+          backgroundMenu: resolve('styles-background-menu'),
+          menu: resolve('styles-menu'),
+          selectedMenu: resolve('styles-selected-menu'),
+          item: resolve('styles-item'),
+          selectedItem: resolve('styles-selected-item')
+        }
+      }));
+      return memMenu.asSpec();
+    };
+
+    var getFromExpandingItem = function (item) {
+      var newItem = deepMerge(exclude$1(item, ['items']), { menu: true });
+      var rest = expand(item.items);
+      var newMenus = deepMerge(rest.menus, wrap$1(item.title, rest.items));
+      var newExpansions = deepMerge(rest.expansions, wrap$1(item.title, item.title));
+      return {
+        item: newItem,
+        menus: newMenus,
+        expansions: newExpansions
+      };
+    };
+    var getFromItem = function (item) {
+      return hasNonNullableKey(item, 'items') ? getFromExpandingItem(item) : {
+        item: item,
+        menus: {},
+        expansions: {}
+      };
+    };
+    var expand = function (items) {
+      return foldr(items, function (acc, item) {
+        var newData = getFromItem(item);
+        return {
+          menus: deepMerge(acc.menus, newData.menus),
+          items: [newData.item].concat(acc.items),
+          expansions: deepMerge(acc.expansions, newData.expansions)
+        };
+      }, {
+        menus: {},
+        expansions: {},
+        items: []
+      });
+    };
+
+    var register$1 = function (editor, settings) {
+      var isSelectedFor = function (format) {
+        return function () {
+          return editor.formatter.match(format);
+        };
+      };
+      var getPreview = function (format) {
+        return function () {
+          return editor.formatter.getCssText(format);
+        };
+      };
+      var enrichSupported = function (item) {
+        return deepMerge(item, {
+          isSelected: isSelectedFor(item.format),
+          getPreview: getPreview(item.format)
+        });
+      };
+      var enrichMenu = function (item) {
+        return deepMerge(item, {
+          isSelected: constant(false),
+          getPreview: constant('')
+        });
+      };
+      var enrichCustom = function (item) {
+        var formatName = generate$1(item.title);
+        var newItem = deepMerge(item, {
+          format: formatName,
+          isSelected: isSelectedFor(formatName),
+          getPreview: getPreview(formatName)
+        });
+        editor.formatter.register(formatName, newItem);
+        return newItem;
+      };
+      var formats = get(settings, 'style_formats').getOr(DefaultStyleFormats);
+      var doEnrich = function (items) {
+        return map$1(items, function (item) {
+          if (hasNonNullableKey(item, 'items')) {
+            var newItems = doEnrich(item.items);
+            return deepMerge(enrichMenu(item), { items: newItems });
+          } else if (hasNonNullableKey(item, 'format')) {
+            return enrichSupported(item);
+          } else {
+            return enrichCustom(item);
+          }
+        });
+      };
+      return doEnrich(formats);
+    };
+    var prune = function (editor, formats) {
+      var doPrune = function (items) {
+        return bind(items, function (item) {
+          if (item.items !== undefined) {
+            var newItems = doPrune(item.items);
+            return newItems.length > 0 ? [item] : [];
+          } else {
+            var keep = hasNonNullableKey(item, 'format') ? editor.formatter.canApply(item.format) : true;
+            return keep ? [item] : [];
+          }
+        });
+      };
+      var prunedItems = doPrune(formats);
+      return expand(prunedItems);
+    };
+    var ui = function (editor, formats, onDone) {
+      var pruned = prune(editor, formats);
+      return sketch$8({
+        formats: pruned,
+        handle: function (item, value) {
+          editor.undoManager.transact(function () {
+            if (Toggling.isOn(item)) {
+              editor.formatter.remove(value);
+            } else {
+              editor.formatter.apply(value);
+            }
+          });
+          onDone();
+        }
+      });
+    };
+
+    var defaults = [
+      'undo',
+      'bold',
+      'italic',
+      'link',
+      'image',
+      'bullist',
+      'styleselect'
+    ];
+    var extract$1 = function (rawToolbar) {
+      var toolbar = rawToolbar.replace(/\|/g, ' ').trim();
+      return toolbar.length > 0 ? toolbar.split(/\s+/) : [];
+    };
+    var identifyFromArray = function (toolbar) {
+      return bind(toolbar, function (item) {
+        return isArray(item) ? identifyFromArray(item) : extract$1(item);
+      });
+    };
+    var identify = function (settings) {
+      var toolbar = settings.toolbar !== undefined ? settings.toolbar : defaults;
+      return isArray(toolbar) ? identifyFromArray(toolbar) : extract$1(toolbar);
+    };
+    var setup = function (realm, editor) {
+      var commandSketch = function (name) {
+        return function () {
+          return forToolbarCommand(editor, name);
+        };
+      };
+      var stateCommandSketch = function (name) {
+        return function () {
+          return forToolbarStateCommand(editor, name);
+        };
+      };
+      var actionSketch = function (name, query, action) {
+        return function () {
+          return forToolbarStateAction(editor, name, query, action);
+        };
+      };
+      var undo = commandSketch('undo');
+      var redo = commandSketch('redo');
+      var bold = stateCommandSketch('bold');
+      var italic = stateCommandSketch('italic');
+      var underline = stateCommandSketch('underline');
+      var removeformat = commandSketch('removeformat');
+      var link = function () {
+        return sketch$7(realm, editor);
+      };
+      var unlink = actionSketch('unlink', 'link', function () {
+        editor.execCommand('unlink', null, false);
+      });
+      var image = function () {
+        return sketch$4(editor);
+      };
+      var bullist = actionSketch('unordered-list', 'ul', function () {
+        editor.execCommand('InsertUnorderedList', null, false);
+      });
+      var numlist = actionSketch('ordered-list', 'ol', function () {
+        editor.execCommand('InsertOrderedList', null, false);
+      });
+      var fontsizeselect = function () {
+        return sketch$3(realm, editor);
+      };
+      var forecolor = function () {
+        return sketch$1(realm, editor);
+      };
+      var styleFormats = register$1(editor, editor.settings);
+      var styleFormatsMenu = function () {
+        return ui(editor, styleFormats, function () {
+          editor.fire('scrollIntoView');
+        });
+      };
+      var styleselect = function () {
+        return forToolbar('style-formats', function (button) {
+          editor.fire('toReading');
+          realm.dropup().appear(styleFormatsMenu, Toggling.on, button);
+        }, derive$1([
+          Toggling.config({
+            toggleClass: resolve('toolbar-button-selected'),
+            toggleOnExecute: false,
+            aria: { mode: 'pressed' }
+          }),
+          Receiving.config({
+            channels: wrapAll$1([
+              receive$1(orientationChanged, Toggling.off),
+              receive$1(dropupDismissed, Toggling.off)
+            ])
+          })
+        ]), editor);
+      };
+      var feature = function (prereq, sketch) {
+        return {
+          isSupported: function () {
+            var buttons = editor.ui.registry.getAll().buttons;
+            return prereq.forall(function (p) {
+              return hasNonNullableKey(buttons, p);
+            });
+          },
+          sketch: sketch
+        };
+      };
+      return {
+        undo: feature(Option.none(), undo),
+        redo: feature(Option.none(), redo),
+        bold: feature(Option.none(), bold),
+        italic: feature(Option.none(), italic),
+        underline: feature(Option.none(), underline),
+        removeformat: feature(Option.none(), removeformat),
+        link: feature(Option.none(), link),
+        unlink: feature(Option.none(), unlink),
+        image: feature(Option.none(), image),
+        bullist: feature(Option.some('bullist'), bullist),
+        numlist: feature(Option.some('numlist'), numlist),
+        fontsizeselect: feature(Option.none(), fontsizeselect),
+        forecolor: feature(Option.none(), forecolor),
+        styleselect: feature(Option.none(), styleselect)
+      };
+    };
+    var detect$4 = function (settings, features) {
+      var itemNames = identify(settings);
+      var present = {};
+      return bind(itemNames, function (iName) {
+        var r = !hasNonNullableKey(present, iName) && hasNonNullableKey(features, iName) && features[iName].isSupported() ? [features[iName].sketch()] : [];
+        present[iName] = true;
+        return r;
+      });
+    };
+
+    var mkEvent = function (target, x, y, stop, prevent, kill, raw) {
+      return {
+        target: constant(target),
+        x: constant(x),
+        y: constant(y),
+        stop: stop,
+        prevent: prevent,
+        kill: kill,
+        raw: constant(raw)
+      };
+    };
+    var fromRawEvent = function (rawEvent) {
+      var target = Element.fromDom(rawEvent.target);
+      var stop = function () {
+        return rawEvent.stopPropagation();
+      };
+      var prevent = function () {
+        return rawEvent.preventDefault();
+      };
+      var kill = compose(prevent, stop);
+      return mkEvent(target, rawEvent.clientX, rawEvent.clientY, stop, prevent, kill, rawEvent);
+    };
+    var handle = function (filter, handler) {
+      return function (rawEvent) {
+        if (filter(rawEvent)) {
+          handler(fromRawEvent(rawEvent));
+        }
+      };
+    };
+    var binder = function (element, event, filter, handler, useCapture) {
+      var wrapped = handle(filter, handler);
+      element.dom().addEventListener(event, wrapped, useCapture);
+      return { unbind: curry(unbind, element, event, wrapped, useCapture) };
+    };
+    var bind$2 = function (element, event, filter, handler) {
+      return binder(element, event, filter, handler, false);
+    };
+    var capture = function (element, event, filter, handler) {
+      return binder(element, event, filter, handler, true);
+    };
+    var unbind = function (element, event, handler, useCapture) {
+      element.dom().removeEventListener(event, handler, useCapture);
+    };
+
+    var filter$2 = constant(true);
+    var bind$3 = function (element, event, handler) {
+      return bind$2(element, event, filter$2, handler);
+    };
+    var capture$1 = function (element, event, handler) {
+      return capture(element, event, filter$2, handler);
+    };
+
+    var global$4 = tinymce.util.Tools.resolve('tinymce.util.Delay');
+
+    var INTERVAL = 50;
+    var INSURANCE = 1000 / INTERVAL;
+    var get$b = function (outerWindow) {
+      var isPortrait = outerWindow.matchMedia('(orientation: portrait)').matches;
+      return { isPortrait: constant(isPortrait) };
+    };
+    var getActualWidth = function (outerWindow) {
+      var isIos = detect$3().os.isiOS();
+      var isPortrait = get$b(outerWindow).isPortrait();
+      return isIos && !isPortrait ? outerWindow.screen.height : outerWindow.screen.width;
+    };
+    var onChange = function (outerWindow, listeners) {
+      var win = Element.fromDom(outerWindow);
+      var poller = null;
+      var change = function () {
+        global$4.clearInterval(poller);
+        var orientation = get$b(outerWindow);
+        listeners.onChange(orientation);
+        onAdjustment(function () {
+          listeners.onReady(orientation);
+        });
+      };
+      var orientationHandle = bind$3(win, 'orientationchange', change);
+      var onAdjustment = function (f) {
+        global$4.clearInterval(poller);
+        var flag = outerWindow.innerHeight;
+        var insurance = 0;
+        poller = global$4.setInterval(function () {
+          if (flag !== outerWindow.innerHeight) {
+            global$4.clearInterval(poller);
+            f(Option.some(outerWindow.innerHeight));
+          } else if (insurance > INSURANCE) {
+            global$4.clearInterval(poller);
+            f(Option.none());
+          }
+          insurance++;
+        }, INTERVAL);
+      };
+      var destroy = function () {
+        orientationHandle.unbind();
+      };
+      return {
+        onAdjustment: onAdjustment,
+        destroy: destroy
+      };
+    };
+
+    function DelayedFunction (fun, delay) {
+      var ref = null;
+      var schedule = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        ref = domGlobals.setTimeout(function () {
+          fun.apply(null, args);
+          ref = null;
+        }, delay);
+      };
+      var cancel = function () {
+        if (ref !== null) {
+          domGlobals.clearTimeout(ref);
+          ref = null;
+        }
+      };
+      return {
+        cancel: cancel,
+        schedule: schedule
+      };
+    }
+
+    var SIGNIFICANT_MOVE = 5;
+    var LONGPRESS_DELAY = 400;
+    var getTouch = function (event) {
+      var raw = event.raw();
+      if (raw.touches === undefined || raw.touches.length !== 1) {
+        return Option.none();
+      }
+      return Option.some(raw.touches[0]);
+    };
+    var isFarEnough = function (touch, data) {
+      var distX = Math.abs(touch.clientX - data.x);
+      var distY = Math.abs(touch.clientY - data.y);
+      return distX > SIGNIFICANT_MOVE || distY > SIGNIFICANT_MOVE;
+    };
+    var monitor = function (settings) {
+      var startData = Cell(Option.none());
+      var longpressFired = Cell(false);
+      var longpress$1 = DelayedFunction(function (event) {
+        settings.triggerEvent(longpress(), event);
+        longpressFired.set(true);
+      }, LONGPRESS_DELAY);
+      var handleTouchstart = function (event) {
+        getTouch(event).each(function (touch) {
+          longpress$1.cancel();
+          var data = {
+            x: touch.clientX,
+            y: touch.clientY,
+            target: event.target()
+          };
+          longpress$1.schedule(event);
+          longpressFired.set(false);
+          startData.set(Option.some(data));
+        });
+        return Option.none();
+      };
+      var handleTouchmove = function (event) {
+        longpress$1.cancel();
+        getTouch(event).each(function (touch) {
+          startData.get().each(function (data) {
+            if (isFarEnough(touch, data)) {
+              startData.set(Option.none());
+            }
+          });
+        });
+        return Option.none();
+      };
+      var handleTouchend = function (event) {
+        longpress$1.cancel();
+        var isSame = function (data) {
+          return eq(data.target, event.target());
+        };
+        return startData.get().filter(isSame).map(function (_data) {
+          if (longpressFired.get()) {
+            event.prevent();
+            return false;
+          } else {
+            return settings.triggerEvent(tap(), event);
+          }
+        });
+      };
+      var handlers = wrapAll$1([
+        {
+          key: touchstart(),
+          value: handleTouchstart
+        },
+        {
+          key: touchmove(),
+          value: handleTouchmove
+        },
+        {
+          key: touchend(),
+          value: handleTouchend
+        }
+      ]);
+      var fireIfReady = function (event, type) {
+        return get(handlers, type).bind(function (handler) {
+          return handler(event);
+        });
+      };
+      return { fireIfReady: fireIfReady };
+    };
+
+    var monitor$1 = function (editorApi) {
+      var tapEvent = monitor({
+        triggerEvent: function (type, evt) {
+          editorApi.onTapContent(evt);
+        }
+      });
+      var onTouchend = function () {
+        return bind$3(editorApi.body(), 'touchend', function (evt) {
+          tapEvent.fireIfReady(evt, 'touchend');
+        });
+      };
+      var onTouchmove = function () {
+        return bind$3(editorApi.body(), 'touchmove', function (evt) {
+          tapEvent.fireIfReady(evt, 'touchmove');
+        });
+      };
+      var fireTouchstart = function (evt) {
+        tapEvent.fireIfReady(evt, 'touchstart');
+      };
+      return {
+        fireTouchstart: fireTouchstart,
+        onTouchend: onTouchend,
+        onTouchmove: onTouchmove
+      };
+    };
+
+    var isAndroid6 = detect$3().os.version.major >= 6;
+    var initEvents = function (editorApi, toolstrip, alloy) {
+      var tapping = monitor$1(editorApi);
+      var outerDoc = owner(toolstrip);
+      var isRanged = function (sel) {
+        return !eq(sel.start(), sel.finish()) || sel.soffset() !== sel.foffset();
+      };
+      var hasRangeInUi = function () {
+        return active(outerDoc).filter(function (input) {
+          return name(input) === 'input';
+        }).exists(function (input) {
+          return input.dom().selectionStart !== input.dom().selectionEnd;
+        });
+      };
+      var updateMargin = function () {
+        var rangeInContent = editorApi.doc().dom().hasFocus() && editorApi.getSelection().exists(isRanged);
+        alloy.getByDom(toolstrip).each((rangeInContent || hasRangeInUi()) === true ? Toggling.on : Toggling.off);
+      };
+      var listeners = [
+        bind$3(editorApi.body(), 'touchstart', function (evt) {
+          editorApi.onTouchContent();
+          tapping.fireTouchstart(evt);
+        }),
+        tapping.onTouchmove(),
+        tapping.onTouchend(),
+        bind$3(toolstrip, 'touchstart', function (_evt) {
+          editorApi.onTouchToolstrip();
+        }),
+        editorApi.onToReading(function () {
+          blur(editorApi.body());
+        }),
+        editorApi.onToEditing(noop),
+        editorApi.onScrollToCursor(function (tinyEvent) {
+          tinyEvent.preventDefault();
+          editorApi.getCursorBox().each(function (bounds) {
+            var cWin = editorApi.win();
+            var isOutside = bounds.top() > cWin.innerHeight || bounds.bottom() > cWin.innerHeight;
+            var cScrollBy = isOutside ? bounds.bottom() - cWin.innerHeight + 50 : 0;
+            if (cScrollBy !== 0) {
+              cWin.scrollTo(cWin.pageXOffset, cWin.pageYOffset + cScrollBy);
+            }
+          });
+        })
+      ].concat(isAndroid6 === true ? [] : [
+        bind$3(Element.fromDom(editorApi.win()), 'blur', function () {
+          alloy.getByDom(toolstrip).each(Toggling.off);
+        }),
+        bind$3(outerDoc, 'select', updateMargin),
+        bind$3(editorApi.doc(), 'selectionchange', updateMargin)
+      ]);
+      var destroy = function () {
+        each$1(listeners, function (l) {
+          l.unbind();
+        });
+      };
+      return { destroy: destroy };
+    };
+
+    var safeParse = function (element, attribute) {
+      var parsed = parseInt(get$1(element, attribute), 10);
+      return isNaN(parsed) ? 0 : parsed;
+    };
+
+    function NodeValue (is, name) {
+      var get = function (element) {
+        if (!is(element)) {
+          throw new Error('Can only get ' + name + ' value of a ' + name + ' node');
+        }
+        return getOption(element).getOr('');
+      };
+      var getOption = function (element) {
+        return is(element) ? Option.from(element.dom().nodeValue) : Option.none();
+      };
+      var set = function (element, value) {
+        if (!is(element)) {
+          throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');
+        }
+        element.dom().nodeValue = value;
+      };
+      return {
+        get: get,
+        getOption: getOption,
+        set: set
+      };
+    }
+
+    var api$3 = NodeValue(isText, 'text');
+    var getOption = function (element) {
+      return api$3.getOption(element);
+    };
+
+    var getEnd = function (element) {
+      return name(element) === 'img' ? 1 : getOption(element).fold(function () {
+        return children(element).length;
+      }, function (v) {
+        return v.length;
+      });
+    };
+
+    var create$3 = function (start, soffset, finish, foffset) {
+      return {
+        start: constant(start),
+        soffset: constant(soffset),
+        finish: constant(finish),
+        foffset: constant(foffset)
+      };
+    };
+    var SimRange = { create: create$3 };
+
+    var adt$4 = Adt.generate([
+      { before: ['element'] },
+      {
+        on: [
+          'element',
+          'offset'
+        ]
+      },
+      { after: ['element'] }
+    ]);
+    var cata = function (subject, onBefore, onOn, onAfter) {
+      return subject.fold(onBefore, onOn, onAfter);
+    };
+    var getStart = function (situ) {
+      return situ.fold(identity, identity, identity);
+    };
+    var before$1 = adt$4.before;
+    var on$1 = adt$4.on;
+    var after$1 = adt$4.after;
+    var Situ = {
+      before: before$1,
+      on: on$1,
+      after: after$1,
+      cata: cata,
+      getStart: getStart
+    };
+
+    var adt$5 = Adt.generate([
+      { domRange: ['rng'] },
+      {
+        relative: [
+          'startSitu',
+          'finishSitu'
+        ]
+      },
+      {
+        exact: [
+          'start',
+          'soffset',
+          'finish',
+          'foffset'
+        ]
+      }
+    ]);
+    var exactFromRange = function (simRange) {
+      return adt$5.exact(simRange.start(), simRange.soffset(), simRange.finish(), simRange.foffset());
+    };
+    var getStart$1 = function (selection) {
+      return selection.match({
+        domRange: function (rng) {
+          return Element.fromDom(rng.startContainer);
+        },
+        relative: function (startSitu, _finishSitu) {
+          return Situ.getStart(startSitu);
+        },
+        exact: function (start, _soffset, _finish, _foffset) {
+          return start;
+        }
+      });
+    };
+    var domRange = adt$5.domRange;
+    var relative = adt$5.relative;
+    var exact = adt$5.exact;
+    var getWin = function (selection) {
+      var start = getStart$1(selection);
+      return defaultView(start);
+    };
+    var range$1 = SimRange.create;
+    var Selection = {
+      domRange: domRange,
+      relative: relative,
+      exact: exact,
+      exactFromRange: exactFromRange,
+      getWin: getWin,
+      range: range$1
+    };
+
+    var setStart = function (rng, situ) {
+      situ.fold(function (e) {
+        rng.setStartBefore(e.dom());
+      }, function (e, o) {
+        rng.setStart(e.dom(), o);
+      }, function (e) {
+        rng.setStartAfter(e.dom());
+      });
+    };
+    var setFinish = function (rng, situ) {
+      situ.fold(function (e) {
+        rng.setEndBefore(e.dom());
+      }, function (e, o) {
+        rng.setEnd(e.dom(), o);
+      }, function (e) {
+        rng.setEndAfter(e.dom());
+      });
+    };
+    var relativeToNative = function (win, startSitu, finishSitu) {
+      var range = win.document.createRange();
+      setStart(range, startSitu);
+      setFinish(range, finishSitu);
+      return range;
+    };
+    var exactToNative = function (win, start, soffset, finish, foffset) {
+      var rng = win.document.createRange();
+      rng.setStart(start.dom(), soffset);
+      rng.setEnd(finish.dom(), foffset);
+      return rng;
+    };
+    var toRect = function (rect) {
+      return {
+        left: constant(rect.left),
+        top: constant(rect.top),
+        right: constant(rect.right),
+        bottom: constant(rect.bottom),
+        width: constant(rect.width),
+        height: constant(rect.height)
+      };
+    };
+    var getFirstRect = function (rng) {
+      var rects = rng.getClientRects();
+      var rect = rects.length > 0 ? rects[0] : rng.getBoundingClientRect();
+      return rect.width > 0 || rect.height > 0 ? Option.some(rect).map(toRect) : Option.none();
+    };
+
+    var adt$6 = Adt.generate([
+      {
+        ltr: [
+          'start',
+          'soffset',
+          'finish',
+          'foffset'
+        ]
+      },
+      {
+        rtl: [
+          'start',
+          'soffset',
+          'finish',
+          'foffset'
+        ]
+      }
+    ]);
+    var fromRange = function (win, type, range) {
+      return type(Element.fromDom(range.startContainer), range.startOffset, Element.fromDom(range.endContainer), range.endOffset);
+    };
+    var getRanges = function (win, selection) {
+      return selection.match({
+        domRange: function (rng) {
+          return {
+            ltr: constant(rng),
+            rtl: Option.none
+          };
+        },
+        relative: function (startSitu, finishSitu) {
+          return {
+            ltr: cached(function () {
+              return relativeToNative(win, startSitu, finishSitu);
+            }),
+            rtl: cached(function () {
+              return Option.some(relativeToNative(win, finishSitu, startSitu));
+            })
+          };
+        },
+        exact: function (start, soffset, finish, foffset) {
+          return {
+            ltr: cached(function () {
+              return exactToNative(win, start, soffset, finish, foffset);
+            }),
+            rtl: cached(function () {
+              return Option.some(exactToNative(win, finish, foffset, start, soffset));
+            })
+          };
+        }
+      });
+    };
+    var doDiagnose = function (win, ranges) {
+      var rng = ranges.ltr();
+      if (rng.collapsed) {
+        var reversed = ranges.rtl().filter(function (rev) {
+          return rev.collapsed === false;
+        });
+        return reversed.map(function (rev) {
+          return adt$6.rtl(Element.fromDom(rev.endContainer), rev.endOffset, Element.fromDom(rev.startContainer), rev.startOffset);
+        }).getOrThunk(function () {
+          return fromRange(win, adt$6.ltr, rng);
+        });
+      } else {
+        return fromRange(win, adt$6.ltr, rng);
+      }
+    };
+    var diagnose = function (win, selection) {
+      var ranges = getRanges(win, selection);
+      return doDiagnose(win, ranges);
+    };
+    var asLtrRange = function (win, selection) {
+      var diagnosis = diagnose(win, selection);
+      return diagnosis.match({
+        ltr: function (start, soffset, finish, foffset) {
+          var rng = win.document.createRange();
+          rng.setStart(start.dom(), soffset);
+          rng.setEnd(finish.dom(), foffset);
+          return rng;
+        },
+        rtl: function (start, soffset, finish, foffset) {
+          var rng = win.document.createRange();
+          rng.setStart(finish.dom(), foffset);
+          rng.setEnd(start.dom(), soffset);
+          return rng;
+        }
+      });
+    };
+    var ltr = adt$6.ltr;
+    var rtl = adt$6.rtl;
+
+    var beforeSpecial = function (element, offset) {
+      var name$1 = name(element);
+      if ('input' === name$1) {
+        return Situ.after(element);
+      } else if (!contains([
+          'br',
+          'img'
+        ], name$1)) {
+        return Situ.on(element, offset);
+      } else {
+        return offset === 0 ? Situ.before(element) : Situ.after(element);
+      }
+    };
+    var preprocessExact = function (start, soffset, finish, foffset) {
+      var startSitu = beforeSpecial(start, soffset);
+      var finishSitu = beforeSpecial(finish, foffset);
+      return Selection.relative(startSitu, finishSitu);
+    };
+
+    var makeRange = function (start, soffset, finish, foffset) {
+      var doc = owner(start);
+      var rng = doc.dom().createRange();
+      rng.setStart(start.dom(), soffset);
+      rng.setEnd(finish.dom(), foffset);
+      return rng;
+    };
+    var after$2 = function (start, soffset, finish, foffset) {
+      var r = makeRange(start, soffset, finish, foffset);
+      var same = eq(start, finish) && soffset === foffset;
+      return r.collapsed && !same;
+    };
+
+    var doSetNativeRange = function (win, rng) {
+      Option.from(win.getSelection()).each(function (selection) {
+        selection.removeAllRanges();
+        selection.addRange(rng);
+      });
+    };
+    var doSetRange = function (win, start, soffset, finish, foffset) {
+      var rng = exactToNative(win, start, soffset, finish, foffset);
+      doSetNativeRange(win, rng);
+    };
+    var setLegacyRtlRange = function (win, selection, start, soffset, finish, foffset) {
+      selection.collapse(start.dom(), soffset);
+      selection.extend(finish.dom(), foffset);
+    };
+    var setRangeFromRelative = function (win, relative) {
+      return diagnose(win, relative).match({
+        ltr: function (start, soffset, finish, foffset) {
+          doSetRange(win, start, soffset, finish, foffset);
+        },
+        rtl: function (start, soffset, finish, foffset) {
+          var selection = win.getSelection();
+          if (selection.setBaseAndExtent) {
+            selection.setBaseAndExtent(start.dom(), soffset, finish.dom(), foffset);
+          } else if (selection.extend) {
+            try {
+              setLegacyRtlRange(win, selection, start, soffset, finish, foffset);
+            } catch (e) {
+              doSetRange(win, finish, foffset, start, soffset);
+            }
+          } else {
+            doSetRange(win, finish, foffset, start, soffset);
+          }
+        }
+      });
+    };
+    var setExact = function (win, start, soffset, finish, foffset) {
+      var relative = preprocessExact(start, soffset, finish, foffset);
+      setRangeFromRelative(win, relative);
+    };
+    var readRange = function (selection) {
+      if (selection.rangeCount > 0) {
+        var firstRng = selection.getRangeAt(0);
+        var lastRng = selection.getRangeAt(selection.rangeCount - 1);
+        return Option.some(SimRange.create(Element.fromDom(firstRng.startContainer), firstRng.startOffset, Element.fromDom(lastRng.endContainer), lastRng.endOffset));
+      } else {
+        return Option.none();
+      }
+    };
+    var doGetExact = function (selection) {
+      var anchor = Element.fromDom(selection.anchorNode);
+      var focus = Element.fromDom(selection.focusNode);
+      return after$2(anchor, selection.anchorOffset, focus, selection.focusOffset) ? Option.some(SimRange.create(anchor, selection.anchorOffset, focus, selection.focusOffset)) : readRange(selection);
+    };
+    var getExact = function (win) {
+      return Option.from(win.getSelection()).filter(function (sel) {
+        return sel.rangeCount > 0;
+      }).bind(doGetExact);
+    };
+    var get$c = function (win) {
+      return getExact(win).map(function (range) {
+        return Selection.exact(range.start(), range.soffset(), range.finish(), range.foffset());
+      });
+    };
+    var getFirstRect$1 = function (win, selection) {
+      var rng = asLtrRange(win, selection);
+      return getFirstRect(rng);
+    };
+    var clear$1 = function (win) {
+      var selection = win.getSelection();
+      selection.removeAllRanges();
+    };
+
+    var COLLAPSED_WIDTH = 2;
+    var collapsedRect = function (rect) {
+      return {
+        left: rect.left,
+        top: rect.top,
+        right: rect.right,
+        bottom: rect.bottom,
+        width: constant(COLLAPSED_WIDTH),
+        height: rect.height
+      };
+    };
+    var toRect$1 = function (rawRect) {
+      return {
+        left: constant(rawRect.left),
+        top: constant(rawRect.top),
+        right: constant(rawRect.right),
+        bottom: constant(rawRect.bottom),
+        width: constant(rawRect.width),
+        height: constant(rawRect.height)
+      };
+    };
+    var getRectsFromRange = function (range) {
+      if (!range.collapsed) {
+        return map$1(range.getClientRects(), toRect$1);
+      } else {
+        var start_1 = Element.fromDom(range.startContainer);
+        return parent(start_1).bind(function (parent) {
+          var selection = Selection.exact(start_1, range.startOffset, parent, getEnd(parent));
+          var optRect = getFirstRect$1(range.startContainer.ownerDocument.defaultView, selection);
+          return optRect.map(collapsedRect).map(pure);
+        }).getOr([]);
+      }
+    };
+    var getRectangles = function (cWin) {
+      var sel = cWin.getSelection();
+      return sel !== undefined && sel.rangeCount > 0 ? getRectsFromRange(sel.getRangeAt(0)) : [];
+    };
+
+    var autocompleteHack = function () {
+      return function (f) {
+        global$4.setTimeout(function () {
+          f();
+        }, 0);
+      };
+    };
+    var resume = function (cWin) {
+      cWin.focus();
+      var iBody = Element.fromDom(cWin.document.body);
+      var inInput = active().exists(function (elem) {
+        return contains([
+          'input',
+          'textarea'
+        ], name(elem));
+      });
+      var transaction = inInput ? autocompleteHack() : apply;
+      transaction(function () {
+        active().each(blur);
+        focus$1(iBody);
+      });
+    };
+
+    var EXTRA_SPACING = 50;
+    var data = 'data-' + resolve('last-outer-height');
+    var setLastHeight = function (cBody, value) {
+      set(cBody, data, value);
+    };
+    var getLastHeight = function (cBody) {
+      return safeParse(cBody, data);
+    };
+    var getBoundsFrom = function (rect) {
+      return {
+        top: constant(rect.top()),
+        bottom: constant(rect.top() + rect.height())
+      };
+    };
+    var getBounds$1 = function (cWin) {
+      var rects = getRectangles(cWin);
+      return rects.length > 0 ? Option.some(rects[0]).map(getBoundsFrom) : Option.none();
+    };
+    var findDelta = function (outerWindow, cBody) {
+      var last = getLastHeight(cBody);
+      var current = outerWindow.innerHeight;
+      return last > current ? Option.some(last - current) : Option.none();
+    };
+    var calculate = function (cWin, bounds, delta) {
+      var isOutside = bounds.top() > cWin.innerHeight || bounds.bottom() > cWin.innerHeight;
+      return isOutside ? Math.min(delta, bounds.bottom() - cWin.innerHeight + EXTRA_SPACING) : 0;
+    };
+    var setup$1 = function (outerWindow, cWin) {
+      var cBody = Element.fromDom(cWin.document.body);
+      var toEditing = function () {
+        resume(cWin);
+      };
+      var onResize = bind$3(Element.fromDom(outerWindow), 'resize', function () {
+        findDelta(outerWindow, cBody).each(function (delta) {
+          getBounds$1(cWin).each(function (bounds) {
+            var cScrollBy = calculate(cWin, bounds, delta);
+            if (cScrollBy !== 0) {
+              cWin.scrollTo(cWin.pageXOffset, cWin.pageYOffset + cScrollBy);
+            }
+          });
+        });
+        setLastHeight(cBody, outerWindow.innerHeight);
+      });
+      setLastHeight(cBody, outerWindow.innerHeight);
+      var destroy = function () {
+        onResize.unbind();
+      };
+      return {
+        toEditing: toEditing,
+        destroy: destroy
+      };
+    };
+
+    var getBodyFromFrame = function (frame) {
+      return Option.some(Element.fromDom(frame.dom().contentWindow.document.body));
+    };
+    var getDocFromFrame = function (frame) {
+      return Option.some(Element.fromDom(frame.dom().contentWindow.document));
+    };
+    var getWinFromFrame = function (frame) {
+      return Option.from(frame.dom().contentWindow);
+    };
+    var getSelectionFromFrame = function (frame) {
+      var optWin = getWinFromFrame(frame);
+      return optWin.bind(getExact);
+    };
+    var getFrame = function (editor) {
+      return editor.getFrame();
+    };
+    var getOrDerive = function (name, f) {
+      return function (editor) {
+        var g = editor[name].getOrThunk(function () {
+          var frame = getFrame(editor);
+          return function () {
+            return f(frame);
+          };
+        });
+        return g();
+      };
+    };
+    var getOrListen = function (editor, doc, name, type) {
+      return editor[name].getOrThunk(function () {
+        return function (handler) {
+          return bind$3(doc, type, handler);
+        };
+      });
+    };
+    var toRect$2 = function (rect) {
+      return {
+        left: constant(rect.left),
+        top: constant(rect.top),
+        right: constant(rect.right),
+        bottom: constant(rect.bottom),
+        width: constant(rect.width),
+        height: constant(rect.height)
+      };
+    };
+    var getActiveApi = function (editor) {
+      var frame = getFrame(editor);
+      var tryFallbackBox = function (win) {
+        var isCollapsed = function (sel) {
+          return eq(sel.start(), sel.finish()) && sel.soffset() === sel.foffset();
+        };
+        var toStartRect = function (sel) {
+          var rect = sel.start().dom().getBoundingClientRect();
+          return rect.width > 0 || rect.height > 0 ? Option.some(rect).map(toRect$2) : Option.none();
+        };
+        return getExact(win).filter(isCollapsed).bind(toStartRect);
+      };
+      return getBodyFromFrame(frame).bind(function (body) {
+        return getDocFromFrame(frame).bind(function (doc) {
+          return getWinFromFrame(frame).map(function (win) {
+            var html = Element.fromDom(doc.dom().documentElement);
+            var getCursorBox = editor.getCursorBox.getOrThunk(function () {
+              return function () {
+                return get$c(win).bind(function (sel) {
+                  return getFirstRect$1(win, sel).orThunk(function () {
+                    return tryFallbackBox(win);
+                  });
+                });
+              };
+            });
+            var setSelection = editor.setSelection.getOrThunk(function () {
+              return function (start, soffset, finish, foffset) {
+                setExact(win, start, soffset, finish, foffset);
+              };
+            });
+            var clearSelection = editor.clearSelection.getOrThunk(function () {
+              return function () {
+                clear$1(win);
+              };
+            });
+            return {
+              body: constant(body),
+              doc: constant(doc),
+              win: constant(win),
+              html: constant(html),
+              getSelection: curry(getSelectionFromFrame, frame),
+              setSelection: setSelection,
+              clearSelection: clearSelection,
+              frame: constant(frame),
+              onKeyup: getOrListen(editor, doc, 'onKeyup', 'keyup'),
+              onNodeChanged: getOrListen(editor, doc, 'onNodeChanged', 'SelectionChange'),
+              onDomChanged: editor.onDomChanged,
+              onScrollToCursor: editor.onScrollToCursor,
+              onScrollToElement: editor.onScrollToElement,
+              onToReading: editor.onToReading,
+              onToEditing: editor.onToEditing,
+              onToolbarScrollStart: editor.onToolbarScrollStart,
+              onTouchContent: editor.onTouchContent,
+              onTapContent: editor.onTapContent,
+              onTouchToolstrip: editor.onTouchToolstrip,
+              getCursorBox: getCursorBox
+            };
+          });
+        });
+      });
+    };
+    var getWin$1 = getOrDerive('getWin', getWinFromFrame);
+
+    var attr = 'data-ephox-mobile-fullscreen-style';
+    var siblingStyles = 'display:none!important;';
+    var ancestorPosition = 'position:absolute!important;';
+    var ancestorStyles = 'top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;';
+    var bgFallback = 'background-color:rgb(255,255,255)!important;';
+    var isAndroid = detect$3().os.isAndroid();
+    var matchColor = function (editorBody) {
+      var color = get$4(editorBody, 'background-color');
+      return color !== undefined && color !== '' ? 'background-color:' + color + '!important' : bgFallback;
+    };
+    var clobberStyles = function (container, editorBody) {
+      var gatherSibilings = function (element) {
+        return siblings$2(element, '*');
+      };
+      var clobber = function (clobberStyle) {
+        return function (element) {
+          var styles = get$1(element, 'style');
+          var backup = styles === undefined ? 'no-styles' : styles.trim();
+          if (backup === clobberStyle) {
+            return;
+          } else {
+            set(element, attr, backup);
+            set(element, 'style', clobberStyle);
+          }
+        };
+      };
+      var ancestors = ancestors$1(container, '*');
+      var siblings = bind(ancestors, gatherSibilings);
+      var bgColor = matchColor(editorBody);
+      each$1(siblings, clobber(siblingStyles));
+      each$1(ancestors, clobber(ancestorPosition + ancestorStyles + bgColor));
+      var containerStyles = isAndroid === true ? '' : ancestorPosition;
+      clobber(containerStyles + ancestorStyles + bgColor)(container);
+    };
+    var restoreStyles = function () {
+      var clobberedEls = all$2('[' + attr + ']');
+      each$1(clobberedEls, function (element) {
+        var restore = get$1(element, attr);
+        if (restore !== 'no-styles') {
+          set(element, 'style', restore);
+        } else {
+          remove$1(element, 'style');
+        }
+        remove$1(element, attr);
+      });
+    };
+
+    var tag = function () {
+      var head = first('head').getOrDie();
+      var nu = function () {
+        var meta = Element.fromTag('meta');
+        set(meta, 'name', 'viewport');
+        append(head, meta);
+        return meta;
+      };
+      var element = first('meta[name="viewport"]').getOrThunk(nu);
+      var backup = get$1(element, 'content');
+      var maximize = function () {
+        set(element, 'content', 'width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0');
+      };
+      var restore = function () {
+        if (backup !== undefined && backup !== null && backup.length > 0) {
+          set(element, 'content', backup);
+        } else {
+          set(element, 'content', 'user-scalable=yes');
+        }
+      };
+      return {
+        maximize: maximize,
+        restore: restore
+      };
+    };
+
+    var create$4 = function (platform, mask) {
+      var meta = tag();
+      var androidApi = api$2();
+      var androidEvents = api$2();
+      var enter = function () {
+        mask.hide();
+        add$2(platform.container, resolve('fullscreen-maximized'));
+        add$2(platform.container, resolve('android-maximized'));
+        meta.maximize();
+        add$2(platform.body, resolve('android-scroll-reload'));
+        androidApi.set(setup$1(platform.win, getWin$1(platform.editor).getOrDie('no')));
+        getActiveApi(platform.editor).each(function (editorApi) {
+          clobberStyles(platform.container, editorApi.body());
+          androidEvents.set(initEvents(editorApi, platform.toolstrip, platform.alloy));
+        });
+      };
+      var exit = function () {
+        meta.restore();
+        mask.show();
+        remove$4(platform.container, resolve('fullscreen-maximized'));
+        remove$4(platform.container, resolve('android-maximized'));
+        restoreStyles();
+        remove$4(platform.body, resolve('android-scroll-reload'));
+        androidEvents.clear();
+        androidApi.clear();
+      };
+      return {
+        enter: enter,
+        exit: exit
+      };
+    };
+
+    var first$1 = function (fn, rate) {
+      var timer = null;
+      var cancel = function () {
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+          timer = null;
+        }
+      };
+      var throttle = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (timer === null) {
+          timer = domGlobals.setTimeout(function () {
+            fn.apply(null, args);
+            timer = null;
+          }, rate);
+        }
+      };
+      return {
+        cancel: cancel,
+        throttle: throttle
+      };
+    };
+    var last = function (fn, rate) {
+      var timer = null;
+      var cancel = function () {
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+          timer = null;
+        }
+      };
+      var throttle = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+        }
+        timer = domGlobals.setTimeout(function () {
+          fn.apply(null, args);
+          timer = null;
+        }, rate);
+      };
+      return {
+        cancel: cancel,
+        throttle: throttle
+      };
+    };
+
+    var sketch$9 = function (onView, _translate) {
+      var memIcon = record(Container.sketch({
+        dom: dom$1('<div aria-hidden="true" class="${prefix}-mask-tap-icon"></div>'),
+        containerBehaviours: derive$1([Toggling.config({
+            toggleClass: resolve('mask-tap-icon-selected'),
+            toggleOnExecute: false
+          })])
+      }));
+      var onViewThrottle = first$1(onView, 200);
+      return Container.sketch({
+        dom: dom$1('<div class="${prefix}-disabled-mask"></div>'),
+        components: [Container.sketch({
+            dom: dom$1('<div class="${prefix}-content-container"></div>'),
+            components: [Button.sketch({
+                dom: dom$1('<div class="${prefix}-content-tap-section"></div>'),
+                components: [memIcon.asSpec()],
+                action: function (_button) {
+                  onViewThrottle.throttle();
+                },
+                buttonBehaviours: derive$1([Toggling.config({ toggleClass: resolve('mask-tap-icon-selected') })])
+              })]
+          })]
+      });
+    };
+
+    var MobileSchema = objOf([
+      strictObjOf('editor', [
+        strict$1('getFrame'),
+        option('getBody'),
+        option('getDoc'),
+        option('getWin'),
+        option('getSelection'),
+        option('setSelection'),
+        option('clearSelection'),
+        option('cursorSaver'),
+        option('onKeyup'),
+        option('onNodeChanged'),
+        option('getCursorBox'),
+        strict$1('onDomChanged'),
+        defaulted$1('onTouchContent', noop),
+        defaulted$1('onTapContent', noop),
+        defaulted$1('onTouchToolstrip', noop),
+        defaulted$1('onScrollToCursor', constant({ unbind: noop })),
+        defaulted$1('onScrollToElement', constant({ unbind: noop })),
+        defaulted$1('onToEditing', constant({ unbind: noop })),
+        defaulted$1('onToReading', constant({ unbind: noop })),
+        defaulted$1('onToolbarScrollStart', identity)
+      ]),
+      strict$1('socket'),
+      strict$1('toolstrip'),
+      strict$1('dropup'),
+      strict$1('toolbar'),
+      strict$1('container'),
+      strict$1('alloy'),
+      state$1('win', function (spec) {
+        return owner(spec.socket).dom().defaultView;
+      }),
+      state$1('body', function (spec) {
+        return Element.fromDom(spec.socket.dom().ownerDocument.body);
+      }),
+      defaulted$1('translate', identity),
+      defaulted$1('setReadOnly', noop),
+      defaulted$1('readOnlyOnInit', constant(true))
+    ]);
+
+    var produce = function (raw) {
+      var mobile = asRawOrDie('Getting AndroidWebapp schema', MobileSchema, raw);
+      set$3(mobile.toolstrip, 'width', '100%');
+      var onTap = function () {
+        mobile.setReadOnly(mobile.readOnlyOnInit());
+        mode.enter();
+      };
+      var mask = build$1(sketch$9(onTap, mobile.translate));
+      mobile.alloy.add(mask);
+      var maskApi = {
+        show: function () {
+          mobile.alloy.add(mask);
+        },
+        hide: function () {
+          mobile.alloy.remove(mask);
+        }
+      };
+      append(mobile.container, mask.element());
+      var mode = create$4(mobile, maskApi);
+      return {
+        setReadOnly: mobile.setReadOnly,
+        refreshStructure: noop,
+        enter: mode.enter,
+        exit: mode.exit,
+        destroy: noop
+      };
+    };
+
+    var schema$e = constant([
+      strict$1('dom'),
+      defaulted$1('shell', true),
+      field$1('toolbarBehaviours', [Replacing])
+    ]);
+    var enhanceGroups = function () {
+      return { behaviours: derive$1([Replacing.config({})]) };
+    };
+    var parts$2 = constant([optional({
+        name: 'groups',
+        overrides: enhanceGroups
+      })]);
+
+    var factory$4 = function (detail, components, _spec, _externals) {
+      var setGroups = function (toolbar, groups) {
+        getGroupContainer(toolbar).fold(function () {
+          domGlobals.console.error('Toolbar was defined to not be a shell, but no groups container was specified in components');
+          throw new Error('Toolbar was defined to not be a shell, but no groups container was specified in components');
+        }, function (container) {
+          Replacing.set(container, groups);
+        });
+      };
+      var getGroupContainer = function (component) {
+        return detail.shell ? Option.some(component) : getPart(component, detail, 'groups');
+      };
+      var extra = detail.shell ? {
+        behaviours: [Replacing.config({})],
+        components: []
+      } : {
+        behaviours: [],
+        components: components
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: extra.components,
+        behaviours: augment(detail.toolbarBehaviours, extra.behaviours),
+        apis: { setGroups: setGroups },
+        domModification: { attributes: { role: 'group' } }
+      };
+    };
+    var Toolbar = composite$1({
+      name: 'Toolbar',
+      configFields: schema$e(),
+      partFields: parts$2(),
+      factory: factory$4,
+      apis: {
+        setGroups: function (apis, toolbar, groups) {
+          apis.setGroups(toolbar, groups);
+        }
+      }
+    });
+
+    var schema$f = constant([
+      strict$1('items'),
+      markers(['itemSelector']),
+      field$1('tgroupBehaviours', [Keying])
+    ]);
+    var parts$3 = constant([group({
+        name: 'items',
+        unit: 'item'
+      })]);
+
+    var factory$5 = function (detail, components, _spec, _externals) {
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        behaviours: augment(detail.tgroupBehaviours, [Keying.config({
+            mode: 'flow',
+            selector: detail.markers.itemSelector
+          })]),
+        domModification: { attributes: { role: 'toolbar' } }
+      };
+    };
+    var ToolbarGroup = composite$1({
+      name: 'ToolbarGroup',
+      configFields: schema$f(),
+      partFields: parts$3(),
+      factory: factory$5
+    });
+
+    var dataHorizontal = 'data-' + resolve('horizontal-scroll');
+    var canScrollVertically = function (container) {
+      container.dom().scrollTop = 1;
+      var result = container.dom().scrollTop !== 0;
+      container.dom().scrollTop = 0;
+      return result;
+    };
+    var canScrollHorizontally = function (container) {
+      container.dom().scrollLeft = 1;
+      var result = container.dom().scrollLeft !== 0;
+      container.dom().scrollLeft = 0;
+      return result;
+    };
+    var hasVerticalScroll = function (container) {
+      return container.dom().scrollTop > 0 || canScrollVertically(container);
+    };
+    var hasHorizontalScroll = function (container) {
+      return container.dom().scrollLeft > 0 || canScrollHorizontally(container);
+    };
+    var markAsHorizontal = function (container) {
+      set(container, dataHorizontal, 'true');
+    };
+    var hasScroll = function (container) {
+      return get$1(container, dataHorizontal) === 'true' ? hasHorizontalScroll(container) : hasVerticalScroll(container);
+    };
+    var exclusive = function (scope, selector) {
+      return bind$3(scope, 'touchmove', function (event) {
+        closest$2(event.target(), selector).filter(hasScroll).fold(function () {
+          event.raw().preventDefault();
+        }, noop);
+      });
+    };
+
+    function ScrollingToolbar () {
+      var makeGroup = function (gSpec) {
+        var scrollClass = gSpec.scrollable === true ? '${prefix}-toolbar-scrollable-group' : '';
+        return {
+          dom: dom$1('<div aria-label="' + gSpec.label + '" class="${prefix}-toolbar-group ' + scrollClass + '"></div>'),
+          tgroupBehaviours: derive$1([config('adhoc-scrollable-toolbar', gSpec.scrollable === true ? [runOnInit(function (component, _simulatedEvent) {
+                set$3(component.element(), 'overflow-x', 'auto');
+                markAsHorizontal(component.element());
+                register(component.element());
+              })] : [])]),
+          components: [Container.sketch({ components: [ToolbarGroup.parts().items({})] })],
+          markers: { itemSelector: '.' + resolve('toolbar-group-item') },
+          items: gSpec.items
+        };
+      };
+      var toolbar = build$1(Toolbar.sketch({
+        dom: dom$1('<div class="${prefix}-toolbar"></div>'),
+        components: [Toolbar.parts().groups({})],
+        toolbarBehaviours: derive$1([
+          Toggling.config({
+            toggleClass: resolve('context-toolbar'),
+            toggleOnExecute: false,
+            aria: { mode: 'none' }
+          }),
+          Keying.config({ mode: 'cyclic' })
+        ]),
+        shell: true
+      }));
+      var wrapper = build$1(Container.sketch({
+        dom: { classes: [resolve('toolstrip')] },
+        components: [premade$1(toolbar)],
+        containerBehaviours: derive$1([Toggling.config({
+            toggleClass: resolve('android-selection-context-toolbar'),
+            toggleOnExecute: false
+          })])
+      }));
+      var resetGroups = function () {
+        Toolbar.setGroups(toolbar, initGroups.get());
+        Toggling.off(toolbar);
+      };
+      var initGroups = Cell([]);
+      var setGroups = function (gs) {
+        initGroups.set(gs);
+        resetGroups();
+      };
+      var createGroups = function (gs) {
+        return map$1(gs, compose(ToolbarGroup.sketch, makeGroup));
+      };
+      var refresh = function () {
+      };
+      var setContextToolbar = function (gs) {
+        Toggling.on(toolbar);
+        Toolbar.setGroups(toolbar, gs);
+      };
+      var restoreToolbar = function () {
+        if (Toggling.isOn(toolbar)) {
+          resetGroups();
+        }
+      };
+      var focus = function () {
+        Keying.focusIn(toolbar);
+      };
+      return {
+        wrapper: constant(wrapper),
+        toolbar: constant(toolbar),
+        createGroups: createGroups,
+        setGroups: setGroups,
+        setContextToolbar: setContextToolbar,
+        restoreToolbar: restoreToolbar,
+        refresh: refresh,
+        focus: focus
+      };
+    }
+
+    var makeEditSwitch = function (webapp) {
+      return build$1(Button.sketch({
+        dom: dom$1('<div class="${prefix}-mask-edit-icon ${prefix}-icon"></div>'),
+        action: function () {
+          webapp.run(function (w) {
+            w.setReadOnly(false);
+          });
+        }
+      }));
+    };
+    var makeSocket = function () {
+      return build$1(Container.sketch({
+        dom: dom$1('<div class="${prefix}-editor-socket"></div>'),
+        components: [],
+        containerBehaviours: derive$1([Replacing.config({})])
+      }));
+    };
+    var showEdit = function (socket, switchToEdit) {
+      Replacing.append(socket, premade$1(switchToEdit));
+    };
+    var hideEdit = function (socket, switchToEdit) {
+      Replacing.remove(socket, switchToEdit);
+    };
+    var updateMode = function (socket, switchToEdit, readOnly, root) {
+      var swap = readOnly === true ? Swapping.toAlpha : Swapping.toOmega;
+      swap(root);
+      var f = readOnly ? showEdit : hideEdit;
+      f(socket, switchToEdit);
+    };
+
+    var getAnimationRoot = function (component, slideConfig) {
+      return slideConfig.getAnimationRoot.fold(function () {
+        return component.element();
+      }, function (get) {
+        return get(component);
+      });
+    };
+
+    var getDimensionProperty = function (slideConfig) {
+      return slideConfig.dimension.property;
+    };
+    var getDimension = function (slideConfig, elem) {
+      return slideConfig.dimension.getDimension(elem);
+    };
+    var disableTransitions = function (component, slideConfig) {
+      var root = getAnimationRoot(component, slideConfig);
+      remove$6(root, [
+        slideConfig.shrinkingClass,
+        slideConfig.growingClass
+      ]);
+    };
+    var setShrunk = function (component, slideConfig) {
+      remove$4(component.element(), slideConfig.openClass);
+      add$2(component.element(), slideConfig.closedClass);
+      set$3(component.element(), getDimensionProperty(slideConfig), '0px');
+      reflow(component.element());
+    };
+    var setGrown = function (component, slideConfig) {
+      remove$4(component.element(), slideConfig.closedClass);
+      add$2(component.element(), slideConfig.openClass);
+      remove$5(component.element(), getDimensionProperty(slideConfig));
+    };
+    var doImmediateShrink = function (component, slideConfig, slideState, _calculatedSize) {
+      slideState.setCollapsed();
+      set$3(component.element(), getDimensionProperty(slideConfig), getDimension(slideConfig, component.element()));
+      reflow(component.element());
+      disableTransitions(component, slideConfig);
+      setShrunk(component, slideConfig);
+      slideConfig.onStartShrink(component);
+      slideConfig.onShrunk(component);
+    };
+    var doStartShrink = function (component, slideConfig, slideState, calculatedSize) {
+      var size = calculatedSize.getOrThunk(function () {
+        return getDimension(slideConfig, component.element());
+      });
+      slideState.setCollapsed();
+      set$3(component.element(), getDimensionProperty(slideConfig), size);
+      reflow(component.element());
+      var root = getAnimationRoot(component, slideConfig);
+      remove$4(root, slideConfig.growingClass);
+      add$2(root, slideConfig.shrinkingClass);
+      setShrunk(component, slideConfig);
+      slideConfig.onStartShrink(component);
+    };
+    var doStartSmartShrink = function (component, slideConfig, slideState) {
+      var size = getDimension(slideConfig, component.element());
+      var shrinker = size === '0px' ? doImmediateShrink : doStartShrink;
+      shrinker(component, slideConfig, slideState, Option.some(size));
+    };
+    var doStartGrow = function (component, slideConfig, slideState) {
+      var root = getAnimationRoot(component, slideConfig);
+      var wasShrinking = has$2(root, slideConfig.shrinkingClass);
+      var beforeSize = getDimension(slideConfig, component.element());
+      setGrown(component, slideConfig);
+      var fullSize = getDimension(slideConfig, component.element());
+      var startPartialGrow = function () {
+        set$3(component.element(), getDimensionProperty(slideConfig), beforeSize);
+        reflow(component.element());
+      };
+      var startCompleteGrow = function () {
+        setShrunk(component, slideConfig);
+      };
+      var setStartSize = wasShrinking ? startPartialGrow : startCompleteGrow;
+      setStartSize();
+      remove$4(root, slideConfig.shrinkingClass);
+      add$2(root, slideConfig.growingClass);
+      setGrown(component, slideConfig);
+      set$3(component.element(), getDimensionProperty(slideConfig), fullSize);
+      slideState.setExpanded();
+      slideConfig.onStartGrow(component);
+    };
+    var refresh = function (component, slideConfig, slideState) {
+      if (slideState.isExpanded()) {
+        remove$5(component.element(), getDimensionProperty(slideConfig));
+        var fullSize = getDimension(slideConfig, component.element());
+        set$3(component.element(), getDimensionProperty(slideConfig), fullSize);
+      }
+    };
+    var grow = function (component, slideConfig, slideState) {
+      if (!slideState.isExpanded()) {
+        doStartGrow(component, slideConfig, slideState);
+      }
+    };
+    var shrink = function (component, slideConfig, slideState) {
+      if (slideState.isExpanded()) {
+        doStartSmartShrink(component, slideConfig, slideState);
+      }
+    };
+    var immediateShrink = function (component, slideConfig, slideState) {
+      if (slideState.isExpanded()) {
+        doImmediateShrink(component, slideConfig, slideState, Option.none());
+      }
+    };
+    var hasGrown = function (component, slideConfig, slideState) {
+      return slideState.isExpanded();
+    };
+    var hasShrunk = function (component, slideConfig, slideState) {
+      return slideState.isCollapsed();
+    };
+    var isGrowing = function (component, slideConfig, _slideState) {
+      var root = getAnimationRoot(component, slideConfig);
+      return has$2(root, slideConfig.growingClass) === true;
+    };
+    var isShrinking = function (component, slideConfig, _slideState) {
+      var root = getAnimationRoot(component, slideConfig);
+      return has$2(root, slideConfig.shrinkingClass) === true;
+    };
+    var isTransitioning = function (component, slideConfig, slideState) {
+      return isGrowing(component, slideConfig) === true || isShrinking(component, slideConfig) === true;
+    };
+    var toggleGrow = function (component, slideConfig, slideState) {
+      var f = slideState.isExpanded() ? doStartSmartShrink : doStartGrow;
+      f(component, slideConfig, slideState);
+    };
+
+    var SlidingApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        refresh: refresh,
+        grow: grow,
+        shrink: shrink,
+        immediateShrink: immediateShrink,
+        hasGrown: hasGrown,
+        hasShrunk: hasShrunk,
+        isGrowing: isGrowing,
+        isShrinking: isShrinking,
+        isTransitioning: isTransitioning,
+        toggleGrow: toggleGrow,
+        disableTransitions: disableTransitions
+    });
+
+    var exhibit$5 = function (base, slideConfig, _slideState) {
+      var expanded = slideConfig.expanded;
+      return expanded ? nu$5({
+        classes: [slideConfig.openClass],
+        styles: {}
+      }) : nu$5({
+        classes: [slideConfig.closedClass],
+        styles: wrap$1(slideConfig.dimension.property, '0px')
+      });
+    };
+    var events$a = function (slideConfig, slideState) {
+      return derive([runOnSource(transitionend(), function (component, simulatedEvent) {
+          var raw = simulatedEvent.event().raw();
+          if (raw.propertyName === slideConfig.dimension.property) {
+            disableTransitions(component, slideConfig);
+            if (slideState.isExpanded()) {
+              remove$5(component.element(), slideConfig.dimension.property);
+            }
+            var notify = slideState.isExpanded() ? slideConfig.onGrown : slideConfig.onShrunk;
+            notify(component);
+          }
+        })]);
+    };
+
+    var ActiveSliding = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        exhibit: exhibit$5,
+        events: events$a
+    });
+
+    var SlidingSchema = [
+      strict$1('closedClass'),
+      strict$1('openClass'),
+      strict$1('shrinkingClass'),
+      strict$1('growingClass'),
+      option('getAnimationRoot'),
+      onHandler('onShrunk'),
+      onHandler('onStartShrink'),
+      onHandler('onGrown'),
+      onHandler('onStartGrow'),
+      defaulted$1('expanded', false),
+      strictOf('dimension', choose$1('property', {
+        width: [
+          output('property', 'width'),
+          output('getDimension', function (elem) {
+            return get$7(elem) + 'px';
+          })
+        ],
+        height: [
+          output('property', 'height'),
+          output('getDimension', function (elem) {
+            return get$5(elem) + 'px';
+          })
+        ]
+      }))
+    ];
+
+    var init$4 = function (spec) {
+      var state = Cell(spec.expanded);
+      var readState = function () {
+        return 'expanded: ' + state.get();
+      };
+      return nu$6({
+        isExpanded: function () {
+          return state.get() === true;
+        },
+        isCollapsed: function () {
+          return state.get() === false;
+        },
+        setCollapsed: curry(state.set, false),
+        setExpanded: curry(state.set, true),
+        readState: readState
+      });
+    };
+
+    var SlidingState = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        init: init$4
+    });
+
+    var Sliding = create$1({
+      fields: SlidingSchema,
+      name: 'sliding',
+      active: ActiveSliding,
+      apis: SlidingApis,
+      state: SlidingState
+    });
+
+    var build$2 = function (refresh, scrollIntoView) {
+      var dropup = build$1(Container.sketch({
+        dom: {
+          tag: 'div',
+          classes: [resolve('dropup')]
+        },
+        components: [],
+        containerBehaviours: derive$1([
+          Replacing.config({}),
+          Sliding.config({
+            closedClass: resolve('dropup-closed'),
+            openClass: resolve('dropup-open'),
+            shrinkingClass: resolve('dropup-shrinking'),
+            growingClass: resolve('dropup-growing'),
+            dimension: { property: 'height' },
+            onShrunk: function (component) {
+              refresh();
+              scrollIntoView();
+              Replacing.set(component, []);
+            },
+            onGrown: function (_component) {
+              refresh();
+              scrollIntoView();
+            }
+          }),
+          orientation(function (_component, _data) {
+            disappear(noop);
+          })
+        ])
+      }));
+      var appear = function (menu, update, component) {
+        if (Sliding.hasShrunk(dropup) === true && Sliding.isTransitioning(dropup) === false) {
+          domGlobals.window.requestAnimationFrame(function () {
+            update(component);
+            Replacing.set(dropup, [menu()]);
+            Sliding.grow(dropup);
+          });
+        }
+      };
+      var disappear = function (onReadyToShrink) {
+        domGlobals.window.requestAnimationFrame(function () {
+          onReadyToShrink();
+          Sliding.shrink(dropup);
+        });
+      };
+      return {
+        appear: appear,
+        disappear: disappear,
+        component: constant(dropup),
+        element: dropup.element
+      };
+    };
+
+    var closest$3 = function (scope, selector, isRoot) {
+      return closest$2(scope, selector, isRoot).isSome();
+    };
+
+    var isDangerous = function (event) {
+      var keyEv = event.raw();
+      return keyEv.which === BACKSPACE()[0] && !contains([
+        'input',
+        'textarea'
+      ], name(event.target())) && !closest$3(event.target(), '[contenteditable="true"]');
+    };
+    var isFirefox = function () {
+      return detect$3().browser.isFirefox();
+    };
+    var settingsSchema = objOfOnly([
+      strictFunction('triggerEvent'),
+      defaulted$1('stopBackspace', true)
+    ]);
+    var bindFocus = function (container, handler) {
+      if (isFirefox()) {
+        return capture$1(container, 'focus', handler);
+      } else {
+        return bind$3(container, 'focusin', handler);
+      }
+    };
+    var bindBlur = function (container, handler) {
+      if (isFirefox()) {
+        return capture$1(container, 'blur', handler);
+      } else {
+        return bind$3(container, 'focusout', handler);
+      }
+    };
+    var setup$2 = function (container, rawSettings) {
+      var settings = asRawOrDie('Getting GUI events settings', settingsSchema, rawSettings);
+      var pointerEvents = [
+        'touchstart',
+        'touchmove',
+        'touchend',
+        'touchcancel',
+        'gesturestart',
+        'mousedown',
+        'mouseup',
+        'mouseover',
+        'mousemove',
+        'mouseout',
+        'click'
+      ];
+      var tapEvent = monitor(settings);
+      var simpleEvents = map$1(pointerEvents.concat([
+        'selectstart',
+        'input',
+        'contextmenu',
+        'change',
+        'transitionend',
+        'drag',
+        'dragstart',
+        'dragend',
+        'dragenter',
+        'dragleave',
+        'dragover',
+        'drop',
+        'keyup'
+      ]), function (type) {
+        return bind$3(container, type, function (event) {
+          tapEvent.fireIfReady(event, type).each(function (tapStopped) {
+            if (tapStopped) {
+              event.kill();
+            }
+          });
+          var stopped = settings.triggerEvent(type, event);
+          if (stopped) {
+            event.kill();
+          }
+        });
+      });
+      var pasteTimeout = Cell(Option.none());
+      var onPaste = bind$3(container, 'paste', function (event) {
+        tapEvent.fireIfReady(event, 'paste').each(function (tapStopped) {
+          if (tapStopped) {
+            event.kill();
+          }
+        });
+        var stopped = settings.triggerEvent('paste', event);
+        if (stopped) {
+          event.kill();
+        }
+        pasteTimeout.set(Option.some(domGlobals.setTimeout(function () {
+          settings.triggerEvent(postPaste(), event);
+        }, 0)));
+      });
+      var onKeydown = bind$3(container, 'keydown', function (event) {
+        var stopped = settings.triggerEvent('keydown', event);
+        if (stopped) {
+          event.kill();
+        } else if (settings.stopBackspace === true && isDangerous(event)) {
+          event.prevent();
+        }
+      });
+      var onFocusIn = bindFocus(container, function (event) {
+        var stopped = settings.triggerEvent('focusin', event);
+        if (stopped) {
+          event.kill();
+        }
+      });
+      var focusoutTimeout = Cell(Option.none());
+      var onFocusOut = bindBlur(container, function (event) {
+        var stopped = settings.triggerEvent('focusout', event);
+        if (stopped) {
+          event.kill();
+        }
+        focusoutTimeout.set(Option.some(domGlobals.setTimeout(function () {
+          settings.triggerEvent(postBlur(), event);
+        }, 0)));
+      });
+      var unbind = function () {
+        each$1(simpleEvents, function (e) {
+          e.unbind();
+        });
+        onKeydown.unbind();
+        onFocusIn.unbind();
+        onFocusOut.unbind();
+        onPaste.unbind();
+        pasteTimeout.get().each(domGlobals.clearTimeout);
+        focusoutTimeout.get().each(domGlobals.clearTimeout);
+      };
+      return { unbind: unbind };
+    };
+
+    var derive$2 = function (rawEvent, rawTarget) {
+      var source = get(rawEvent, 'target').map(function (getTarget) {
+        return getTarget();
+      }).getOr(rawTarget);
+      return Cell(source);
+    };
+
+    var fromSource = function (event, source) {
+      var stopper = Cell(false);
+      var cutter = Cell(false);
+      var stop = function () {
+        stopper.set(true);
+      };
+      var cut = function () {
+        cutter.set(true);
+      };
+      return {
+        stop: stop,
+        cut: cut,
+        isStopped: stopper.get,
+        isCut: cutter.get,
+        event: constant(event),
+        setSource: source.set,
+        getSource: source.get
+      };
+    };
+    var fromExternal = function (event) {
+      var stopper = Cell(false);
+      var stop = function () {
+        stopper.set(true);
+      };
+      return {
+        stop: stop,
+        cut: noop,
+        isStopped: stopper.get,
+        isCut: constant(false),
+        event: constant(event),
+        setSource: die('Cannot set source of a broadcasted event'),
+        getSource: die('Cannot get source of a broadcasted event')
+      };
+    };
+
+    var adt$7 = Adt.generate([
+      { stopped: [] },
+      { resume: ['element'] },
+      { complete: [] }
+    ]);
+    var doTriggerHandler = function (lookup, eventType, rawEvent, target, source, logger) {
+      var handler = lookup(eventType, target);
+      var simulatedEvent = fromSource(rawEvent, source);
+      return handler.fold(function () {
+        logger.logEventNoHandlers(eventType, target);
+        return adt$7.complete();
+      }, function (handlerInfo) {
+        var descHandler = handlerInfo.descHandler;
+        var eventHandler = getCurried(descHandler);
+        eventHandler(simulatedEvent);
+        if (simulatedEvent.isStopped()) {
+          logger.logEventStopped(eventType, handlerInfo.element, descHandler.purpose());
+          return adt$7.stopped();
+        } else if (simulatedEvent.isCut()) {
+          logger.logEventCut(eventType, handlerInfo.element, descHandler.purpose());
+          return adt$7.complete();
+        } else {
+          return parent(handlerInfo.element).fold(function () {
+            logger.logNoParent(eventType, handlerInfo.element, descHandler.purpose());
+            return adt$7.complete();
+          }, function (parent) {
+            logger.logEventResponse(eventType, handlerInfo.element, descHandler.purpose());
+            return adt$7.resume(parent);
+          });
+        }
+      });
+    };
+    var doTriggerOnUntilStopped = function (lookup, eventType, rawEvent, rawTarget, source, logger) {
+      return doTriggerHandler(lookup, eventType, rawEvent, rawTarget, source, logger).fold(function () {
+        return true;
+      }, function (parent) {
+        return doTriggerOnUntilStopped(lookup, eventType, rawEvent, parent, source, logger);
+      }, function () {
+        return false;
+      });
+    };
+    var triggerHandler = function (lookup, eventType, rawEvent, target, logger) {
+      var source = derive$2(rawEvent, target);
+      return doTriggerHandler(lookup, eventType, rawEvent, target, source, logger);
+    };
+    var broadcast = function (listeners, rawEvent, _logger) {
+      var simulatedEvent = fromExternal(rawEvent);
+      each$1(listeners, function (listener) {
+        var descHandler = listener.descHandler();
+        var handler = getCurried(descHandler);
+        handler(simulatedEvent);
+      });
+      return simulatedEvent.isStopped();
+    };
+    var triggerUntilStopped = function (lookup, eventType, rawEvent, logger) {
+      var rawTarget = rawEvent.target();
+      return triggerOnUntilStopped(lookup, eventType, rawEvent, rawTarget, logger);
+    };
+    var triggerOnUntilStopped = function (lookup, eventType, rawEvent, rawTarget, logger) {
+      var source = derive$2(rawEvent, rawTarget);
+      return doTriggerOnUntilStopped(lookup, eventType, rawEvent, rawTarget, source, logger);
+    };
+
+    var eventHandler = function (element, descHandler) {
+      return {
+        element: element,
+        descHandler: descHandler
+      };
+    };
+    var broadcastHandler = function (id, handler) {
+      return {
+        id: constant(id),
+        descHandler: constant(handler)
+      };
+    };
+    function EventRegistry () {
+      var registry = {};
+      var registerId = function (extraArgs, id, events) {
+        each(events, function (v, k) {
+          var handlers = registry[k] !== undefined ? registry[k] : {};
+          handlers[id] = curryArgs(v, extraArgs);
+          registry[k] = handlers;
+        });
+      };
+      var findHandler = function (handlers, elem) {
+        return read$2(elem).fold(function () {
+          return Option.none();
+        }, function (id) {
+          return handlers.bind(function (h) {
+            return get(h, id);
+          }).map(function (descHandler) {
+            return eventHandler(elem, descHandler);
+          });
+        });
+      };
+      var filterByType = function (type) {
+        return get(registry, type).map(function (handlers) {
+          return mapToArray(handlers, function (f, id) {
+            return broadcastHandler(id, f);
+          });
+        }).getOr([]);
+      };
+      var find = function (isAboveRoot, type, target) {
+        var handlers = get(registry, type);
+        return closest(target, function (elem) {
+          return findHandler(handlers, elem);
+        }, isAboveRoot);
+      };
+      var unregisterId = function (id) {
+        each(registry, function (handlersById, _eventName) {
+          if (handlersById.hasOwnProperty(id)) {
+            delete handlersById[id];
+          }
+        });
+      };
+      return {
+        registerId: registerId,
+        unregisterId: unregisterId,
+        filterByType: filterByType,
+        find: find
+      };
+    }
+
+    function Registry () {
+      var events = EventRegistry();
+      var components = {};
+      var readOrTag = function (component) {
+        var elem = component.element();
+        return read$2(elem).fold(function () {
+          return write('uid-', component.element());
+        }, function (uid) {
+          return uid;
+        });
+      };
+      var failOnDuplicate = function (component, tagId) {
+        var conflict = components[tagId];
+        if (conflict === component) {
+          unregister(component);
+        } else {
+          throw new Error('The tagId "' + tagId + '" is already used by: ' + element(conflict.element()) + '\nCannot use it for: ' + element(component.element()) + '\n' + 'The conflicting element is' + (inBody(conflict.element()) ? ' ' : ' not ') + 'already in the DOM');
+        }
+      };
+      var register = function (component) {
+        var tagId = readOrTag(component);
+        if (hasNonNullableKey(components, tagId)) {
+          failOnDuplicate(component, tagId);
+        }
+        var extraArgs = [component];
+        events.registerId(extraArgs, tagId, component.events());
+        components[tagId] = component;
+      };
+      var unregister = function (component) {
+        read$2(component.element()).each(function (tagId) {
+          delete components[tagId];
+          events.unregisterId(tagId);
+        });
+      };
+      var filter = function (type) {
+        return events.filterByType(type);
+      };
+      var find = function (isAboveRoot, type, target) {
+        return events.find(isAboveRoot, type, target);
+      };
+      var getById = function (id) {
+        return get(components, id);
+      };
+      return {
+        find: find,
+        filter: filter,
+        register: register,
+        unregister: unregister,
+        getById: getById
+      };
+    }
+
+    var takeover = function (root) {
+      var isAboveRoot = function (el) {
+        return parent(root.element()).fold(function () {
+          return true;
+        }, function (parent) {
+          return eq(el, parent);
+        });
+      };
+      var registry = Registry();
+      var lookup = function (eventName, target) {
+        return registry.find(isAboveRoot, eventName, target);
+      };
+      var domEvents = setup$2(root.element(), {
+        triggerEvent: function (eventName, event) {
+          return monitorEvent(eventName, event.target(), function (logger) {
+            return triggerUntilStopped(lookup, eventName, event, logger);
+          });
+        }
+      });
+      var systemApi = {
+        debugInfo: constant('real'),
+        triggerEvent: function (eventName, target, data) {
+          monitorEvent(eventName, target, function (logger) {
+            return triggerOnUntilStopped(lookup, eventName, data, target, logger);
+          });
+        },
+        triggerFocus: function (target, originator) {
+          read$2(target).fold(function () {
+            focus$1(target);
+          }, function (_alloyId) {
+            monitorEvent(focus(), target, function (logger) {
+              triggerHandler(lookup, focus(), {
+                originator: constant(originator),
+                kill: noop,
+                prevent: noop,
+                target: constant(target)
+              }, target, logger);
+              return false;
+            });
+          });
+        },
+        triggerEscape: function (comp, simulatedEvent) {
+          systemApi.triggerEvent('keydown', comp.element(), simulatedEvent.event());
+        },
+        getByUid: function (uid) {
+          return getByUid(uid);
+        },
+        getByDom: function (elem) {
+          return getByDom(elem);
+        },
+        build: build$1,
+        addToGui: function (c) {
+          add(c);
+        },
+        removeFromGui: function (c) {
+          remove$1(c);
+        },
+        addToWorld: function (c) {
+          addToWorld(c);
+        },
+        removeFromWorld: function (c) {
+          removeFromWorld(c);
+        },
+        broadcast: function (message) {
+          broadcast$1(message);
+        },
+        broadcastOn: function (channels, message) {
+          broadcastOn(channels, message);
+        },
+        broadcastEvent: function (eventName, event) {
+          broadcastEvent(eventName, event);
+        },
+        isConnected: constant(true)
+      };
+      var addToWorld = function (component) {
+        component.connect(systemApi);
+        if (!isText(component.element())) {
+          registry.register(component);
+          each$1(component.components(), addToWorld);
+          systemApi.triggerEvent(systemInit(), component.element(), { target: constant(component.element()) });
+        }
+      };
+      var removeFromWorld = function (component) {
+        if (!isText(component.element())) {
+          each$1(component.components(), removeFromWorld);
+          registry.unregister(component);
+        }
+        component.disconnect();
+      };
+      var add = function (component) {
+        attach$1(root, component);
+      };
+      var remove$1 = function (component) {
+        detach(component);
+      };
+      var destroy = function () {
+        domEvents.unbind();
+        remove(root.element());
+      };
+      var broadcastData = function (data) {
+        var receivers = registry.filter(receive());
+        each$1(receivers, function (receiver) {
+          var descHandler = receiver.descHandler();
+          var handler = getCurried(descHandler);
+          handler(data);
+        });
+      };
+      var broadcast$1 = function (message) {
+        broadcastData({
+          universal: constant(true),
+          data: constant(message)
+        });
+      };
+      var broadcastOn = function (channels, message) {
+        broadcastData({
+          universal: constant(false),
+          channels: constant(channels),
+          data: constant(message)
+        });
+      };
+      var broadcastEvent = function (eventName, event) {
+        var listeners = registry.filter(eventName);
+        return broadcast(listeners, event);
+      };
+      var getByUid = function (uid) {
+        return registry.getById(uid).fold(function () {
+          return Result.error(new Error('Could not find component with uid: "' + uid + '" in system.'));
+        }, Result.value);
+      };
+      var getByDom = function (elem) {
+        var uid = read$2(elem).getOr('not found');
+        return getByUid(uid);
+      };
+      addToWorld(root);
+      return {
+        root: constant(root),
+        element: root.element,
+        destroy: destroy,
+        add: add,
+        remove: remove$1,
+        getByUid: getByUid,
+        getByDom: getByDom,
+        addToWorld: addToWorld,
+        removeFromWorld: removeFromWorld,
+        broadcast: broadcast$1,
+        broadcastOn: broadcastOn,
+        broadcastEvent: broadcastEvent
+      };
+    };
+
+    var READ_ONLY_MODE_CLASS = resolve('readonly-mode');
+    var EDIT_MODE_CLASS = resolve('edit-mode');
+    function OuterContainer (spec) {
+      var root = build$1(Container.sketch({
+        dom: { classes: [resolve('outer-container')].concat(spec.classes) },
+        containerBehaviours: derive$1([Swapping.config({
+            alpha: READ_ONLY_MODE_CLASS,
+            omega: EDIT_MODE_CLASS
+          })])
+      }));
+      return takeover(root);
+    }
+
+    function AndroidRealm (scrollIntoView) {
+      var alloy = OuterContainer({ classes: [resolve('android-container')] });
+      var toolbar = ScrollingToolbar();
+      var webapp = api$2();
+      var switchToEdit = makeEditSwitch(webapp);
+      var socket = makeSocket();
+      var dropup = build$2(noop, scrollIntoView);
+      alloy.add(toolbar.wrapper());
+      alloy.add(socket);
+      alloy.add(dropup.component());
+      var setToolbarGroups = function (rawGroups) {
+        var groups = toolbar.createGroups(rawGroups);
+        toolbar.setGroups(groups);
+      };
+      var setContextToolbar = function (rawGroups) {
+        var groups = toolbar.createGroups(rawGroups);
+        toolbar.setContextToolbar(groups);
+      };
+      var focusToolbar = function () {
+        toolbar.focus();
+      };
+      var restoreToolbar = function () {
+        toolbar.restoreToolbar();
+      };
+      var init = function (spec) {
+        webapp.set(produce(spec));
+      };
+      var exit = function () {
+        webapp.run(function (w) {
+          w.exit();
+          Replacing.remove(socket, switchToEdit);
+        });
+      };
+      var updateMode$1 = function (readOnly) {
+        updateMode(socket, switchToEdit, readOnly, alloy.root());
+      };
+      return {
+        system: constant(alloy),
+        element: alloy.element,
+        init: init,
+        exit: exit,
+        setToolbarGroups: setToolbarGroups,
+        setContextToolbar: setContextToolbar,
+        focusToolbar: focusToolbar,
+        restoreToolbar: restoreToolbar,
+        updateMode: updateMode$1,
+        socket: constant(socket),
+        dropup: constant(dropup)
+      };
+    }
+
+    var input$1 = function (parent, operation) {
+      var input = Element.fromTag('input');
+      setAll$1(input, {
+        opacity: '0',
+        position: 'absolute',
+        top: '-1000px',
+        left: '-1000px'
+      });
+      append(parent, input);
+      focus$1(input);
+      operation(input);
+      remove(input);
+    };
+
+    var refresh$1 = function (winScope) {
+      var sel = winScope.getSelection();
+      if (sel.rangeCount > 0) {
+        var br = sel.getRangeAt(0);
+        var r = winScope.document.createRange();
+        r.setStart(br.startContainer, br.startOffset);
+        r.setEnd(br.endContainer, br.endOffset);
+        sel.removeAllRanges();
+        sel.addRange(r);
+      }
+    };
+
+    var resume$1 = function (cWin, frame) {
+      active().each(function (active) {
+        if (!eq(active, frame)) {
+          blur(active);
+        }
+      });
+      cWin.focus();
+      focus$1(Element.fromDom(cWin.document.body));
+      refresh$1(cWin);
+    };
+
+    var stubborn = function (outerBody, cWin, page, frame) {
+      var toEditing = function () {
+        resume$1(cWin, frame);
+      };
+      var toReading = function () {
+        input$1(outerBody, blur);
+      };
+      var captureInput = bind$3(page, 'keydown', function (evt) {
+        if (!contains([
+            'input',
+            'textarea'
+          ], name(evt.target()))) {
+          toEditing();
+        }
+      });
+      var onToolbarTouch = function () {
+      };
+      var destroy = function () {
+        captureInput.unbind();
+      };
+      return {
+        toReading: toReading,
+        toEditing: toEditing,
+        onToolbarTouch: onToolbarTouch,
+        destroy: destroy
+      };
+    };
+
+    var initEvents$1 = function (editorApi, iosApi, toolstrip, socket, _dropup) {
+      var saveSelectionFirst = function () {
+        iosApi.run(function (api) {
+          api.highlightSelection();
+        });
+      };
+      var refreshIosSelection = function () {
+        iosApi.run(function (api) {
+          api.refreshSelection();
+        });
+      };
+      var scrollToY = function (yTop, height) {
+        var y = yTop - socket.dom().scrollTop;
+        iosApi.run(function (api) {
+          api.scrollIntoView(y, y + height);
+        });
+      };
+      var scrollToElement = function (_target) {
+        scrollToY(iosApi, socket);
+      };
+      var scrollToCursor = function () {
+        editorApi.getCursorBox().each(function (box) {
+          scrollToY(box.top(), box.height());
+        });
+      };
+      var clearSelection = function () {
+        iosApi.run(function (api) {
+          api.clearSelection();
+        });
+      };
+      var clearAndRefresh = function () {
+        clearSelection();
+        refreshThrottle.throttle();
+      };
+      var refreshView = function () {
+        scrollToCursor();
+        iosApi.run(function (api) {
+          api.syncHeight();
+        });
+      };
+      var reposition = function () {
+        var toolbarHeight = get$5(toolstrip);
+        iosApi.run(function (api) {
+          api.setViewportOffset(toolbarHeight);
+        });
+        refreshIosSelection();
+        refreshView();
+      };
+      var toEditing = function () {
+        iosApi.run(function (api) {
+          api.toEditing();
+        });
+      };
+      var toReading = function () {
+        iosApi.run(function (api) {
+          api.toReading();
+        });
+      };
+      var onToolbarTouch = function (event) {
+        iosApi.run(function (api) {
+          api.onToolbarTouch(event);
+        });
+      };
+      var tapping = monitor$1(editorApi);
+      var refreshThrottle = last(refreshView, 300);
+      var listeners = [
+        editorApi.onKeyup(clearAndRefresh),
+        editorApi.onNodeChanged(refreshIosSelection),
+        editorApi.onDomChanged(refreshThrottle.throttle),
+        editorApi.onDomChanged(refreshIosSelection),
+        editorApi.onScrollToCursor(function (tinyEvent) {
+          tinyEvent.preventDefault();
+          refreshThrottle.throttle();
+        }),
+        editorApi.onScrollToElement(function (event) {
+          scrollToElement(event.element());
+        }),
+        editorApi.onToEditing(toEditing),
+        editorApi.onToReading(toReading),
+        bind$3(editorApi.doc(), 'touchend', function (touchEvent) {
+          if (eq(editorApi.html(), touchEvent.target()) || eq(editorApi.body(), touchEvent.target())) ;
+        }),
+        bind$3(toolstrip, 'transitionend', function (transitionEvent) {
+          if (transitionEvent.raw().propertyName === 'height') {
+            reposition();
+          }
+        }),
+        capture$1(toolstrip, 'touchstart', function (touchEvent) {
+          saveSelectionFirst();
+          onToolbarTouch(touchEvent);
+          editorApi.onTouchToolstrip();
+        }),
+        bind$3(editorApi.body(), 'touchstart', function (evt) {
+          clearSelection();
+          editorApi.onTouchContent();
+          tapping.fireTouchstart(evt);
+        }),
+        tapping.onTouchmove(),
+        tapping.onTouchend(),
+        bind$3(editorApi.body(), 'click', function (event) {
+          event.kill();
+        }),
+        bind$3(toolstrip, 'touchmove', function () {
+          editorApi.onToolbarScrollStart();
+        })
+      ];
+      var destroy = function () {
+        each$1(listeners, function (l) {
+          l.unbind();
+        });
+      };
+      return { destroy: destroy };
+    };
+
+    function FakeSelection (win, frame) {
+      var doc = win.document;
+      var container = Element.fromTag('div');
+      add$2(container, resolve('unfocused-selections'));
+      append(Element.fromDom(doc.documentElement), container);
+      var onTouch = bind$3(container, 'touchstart', function (event) {
+        event.prevent();
+        resume$1(win, frame);
+        clear();
+      });
+      var make = function (rectangle) {
+        var span = Element.fromTag('span');
+        add$3(span, [
+          resolve('layer-editor'),
+          resolve('unfocused-selection')
+        ]);
+        setAll$1(span, {
+          left: rectangle.left() + 'px',
+          top: rectangle.top() + 'px',
+          width: rectangle.width() + 'px',
+          height: rectangle.height() + 'px'
+        });
+        return span;
+      };
+      var update = function () {
+        clear();
+        var rectangles = getRectangles(win);
+        var spans = map$1(rectangles, make);
+        append$1(container, spans);
+      };
+      var clear = function () {
+        empty(container);
+      };
+      var destroy = function () {
+        onTouch.unbind();
+        remove(container);
+      };
+      var isActive = function () {
+        return children(container).length > 0;
+      };
+      return {
+        update: update,
+        isActive: isActive,
+        destroy: destroy,
+        clear: clear
+      };
+    }
+
+    var exports$1 = {}, module = { exports: exports$1 };
+    (function (define, exports, module, require) {
+      (function (f) {
+        if (typeof exports === 'object' && typeof module !== 'undefined') {
+          module.exports = f();
+        } else if (typeof define === 'function' && define.amd) {
+          define([], f);
+        } else {
+          var g;
+          if (typeof window !== 'undefined') {
+            g = window;
+          } else if (typeof global !== 'undefined') {
+            g = global;
+          } else if (typeof self !== 'undefined') {
+            g = self;
+          } else {
+            g = this;
+          }
+          g.EphoxContactWrapper = f();
+        }
+      }(function () {
+        return function () {
+          function r(e, n, t) {
+            function o(i, f) {
+              if (!n[i]) {
+                if (!e[i]) {
+                  var c = 'function' == typeof require && require;
+                  if (!f && c)
+                    return c(i, !0);
+                  if (u)
+                    return u(i, !0);
+                  var a = new Error('Cannot find module \'' + i + '\'');
+                  throw a.code = 'MODULE_NOT_FOUND', a;
+                }
+                var p = n[i] = { exports: {} };
+                e[i][0].call(p.exports, function (r) {
+                  var n = e[i][1][r];
+                  return o(n || r);
+                }, p, p.exports, r, e, n, t);
+              }
+              return n[i].exports;
+            }
+            for (var u = 'function' == typeof require && require, i = 0; i < t.length; i++)
+              o(t[i]);
+            return o;
+          }
+          return r;
+        }()({
+          1: [
+            function (require, module, exports) {
+              var process = module.exports = {};
+              var cachedSetTimeout;
+              var cachedClearTimeout;
+              function defaultSetTimout() {
+                throw new Error('setTimeout has not been defined');
+              }
+              function defaultClearTimeout() {
+                throw new Error('clearTimeout has not been defined');
+              }
+              (function () {
+                try {
+                  if (typeof setTimeout === 'function') {
+                    cachedSetTimeout = setTimeout;
+                  } else {
+                    cachedSetTimeout = defaultSetTimout;
+                  }
+                } catch (e) {
+                  cachedSetTimeout = defaultSetTimout;
+                }
+                try {
+                  if (typeof clearTimeout === 'function') {
+                    cachedClearTimeout = clearTimeout;
+                  } else {
+                    cachedClearTimeout = defaultClearTimeout;
+                  }
+                } catch (e) {
+                  cachedClearTimeout = defaultClearTimeout;
+                }
+              }());
+              function runTimeout(fun) {
+                if (cachedSetTimeout === setTimeout) {
+                  return setTimeout(fun, 0);
+                }
+                if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+                  cachedSetTimeout = setTimeout;
+                  return setTimeout(fun, 0);
+                }
+                try {
+                  return cachedSetTimeout(fun, 0);
+                } catch (e) {
+                  try {
+                    return cachedSetTimeout.call(null, fun, 0);
+                  } catch (e) {
+                    return cachedSetTimeout.call(this, fun, 0);
+                  }
+                }
+              }
+              function runClearTimeout(marker) {
+                if (cachedClearTimeout === clearTimeout) {
+                  return clearTimeout(marker);
+                }
+                if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+                  cachedClearTimeout = clearTimeout;
+                  return clearTimeout(marker);
+                }
+                try {
+                  return cachedClearTimeout(marker);
+                } catch (e) {
+                  try {
+                    return cachedClearTimeout.call(null, marker);
+                  } catch (e) {
+                    return cachedClearTimeout.call(this, marker);
+                  }
+                }
+              }
+              var queue = [];
+              var draining = false;
+              var currentQueue;
+              var queueIndex = -1;
+              function cleanUpNextTick() {
+                if (!draining || !currentQueue) {
+                  return;
+                }
+                draining = false;
+                if (currentQueue.length) {
+                  queue = currentQueue.concat(queue);
+                } else {
+                  queueIndex = -1;
+                }
+                if (queue.length) {
+                  drainQueue();
+                }
+              }
+              function drainQueue() {
+                if (draining) {
+                  return;
+                }
+                var timeout = runTimeout(cleanUpNextTick);
+                draining = true;
+                var len = queue.length;
+                while (len) {
+                  currentQueue = queue;
+                  queue = [];
+                  while (++queueIndex < len) {
+                    if (currentQueue) {
+                      currentQueue[queueIndex].run();
+                    }
+                  }
+                  queueIndex = -1;
+                  len = queue.length;
+                }
+                currentQueue = null;
+                draining = false;
+                runClearTimeout(timeout);
+              }
+              process.nextTick = function (fun) {
+                var args = new Array(arguments.length - 1);
+                if (arguments.length > 1) {
+                  for (var i = 1; i < arguments.length; i++) {
+                    args[i - 1] = arguments[i];
+                  }
+                }
+                queue.push(new Item(fun, args));
+                if (queue.length === 1 && !draining) {
+                  runTimeout(drainQueue);
+                }
+              };
+              function Item(fun, array) {
+                this.fun = fun;
+                this.array = array;
+              }
+              Item.prototype.run = function () {
+                this.fun.apply(null, this.array);
+              };
+              process.title = 'browser';
+              process.browser = true;
+              process.env = {};
+              process.argv = [];
+              process.version = '';
+              process.versions = {};
+              function noop() {
+              }
+              process.on = noop;
+              process.addListener = noop;
+              process.once = noop;
+              process.off = noop;
+              process.removeListener = noop;
+              process.removeAllListeners = noop;
+              process.emit = noop;
+              process.prependListener = noop;
+              process.prependOnceListener = noop;
+              process.listeners = function (name) {
+                return [];
+              };
+              process.binding = function (name) {
+                throw new Error('process.binding is not supported');
+              };
+              process.cwd = function () {
+                return '/';
+              };
+              process.chdir = function (dir) {
+                throw new Error('process.chdir is not supported');
+              };
+              process.umask = function () {
+                return 0;
+              };
+            },
+            {}
+          ],
+          2: [
+            function (require, module, exports) {
+              (function (setImmediate) {
+                (function (root) {
+                  var setTimeoutFunc = setTimeout;
+                  function noop() {
+                  }
+                  function bind(fn, thisArg) {
+                    return function () {
+                      fn.apply(thisArg, arguments);
+                    };
+                  }
+                  function Promise(fn) {
+                    if (typeof this !== 'object')
+                      throw new TypeError('Promises must be constructed via new');
+                    if (typeof fn !== 'function')
+                      throw new TypeError('not a function');
+                    this._state = 0;
+                    this._handled = false;
+                    this._value = undefined;
+                    this._deferreds = [];
+                    doResolve(fn, this);
+                  }
+                  function handle(self, deferred) {
+                    while (self._state === 3) {
+                      self = self._value;
+                    }
+                    if (self._state === 0) {
+                      self._deferreds.push(deferred);
+                      return;
+                    }
+                    self._handled = true;
+                    Promise._immediateFn(function () {
+                      var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
+                      if (cb === null) {
+                        (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
+                        return;
+                      }
+                      var ret;
+                      try {
+                        ret = cb(self._value);
+                      } catch (e) {
+                        reject(deferred.promise, e);
+                        return;
+                      }
+                      resolve(deferred.promise, ret);
+                    });
+                  }
+                  function resolve(self, newValue) {
+                    try {
+                      if (newValue === self)
+                        throw new TypeError('A promise cannot be resolved with itself.');
+                      if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
+                        var then = newValue.then;
+                        if (newValue instanceof Promise) {
+                          self._state = 3;
+                          self._value = newValue;
+                          finale(self);
+                          return;
+                        } else if (typeof then === 'function') {
+                          doResolve(bind(then, newValue), self);
+                          return;
+                        }
+                      }
+                      self._state = 1;
+                      self._value = newValue;
+                      finale(self);
+                    } catch (e) {
+                      reject(self, e);
+                    }
+                  }
+                  function reject(self, newValue) {
+                    self._state = 2;
+                    self._value = newValue;
+                    finale(self);
+                  }
+                  function finale(self) {
+                    if (self._state === 2 && self._deferreds.length === 0) {
+                      Promise._immediateFn(function () {
+                        if (!self._handled) {
+                          Promise._unhandledRejectionFn(self._value);
+                        }
+                      });
+                    }
+                    for (var i = 0, len = self._deferreds.length; i < len; i++) {
+                      handle(self, self._deferreds[i]);
+                    }
+                    self._deferreds = null;
+                  }
+                  function Handler(onFulfilled, onRejected, promise) {
+                    this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
+                    this.onRejected = typeof onRejected === 'function' ? onRejected : null;
+                    this.promise = promise;
+                  }
+                  function doResolve(fn, self) {
+                    var done = false;
+                    try {
+                      fn(function (value) {
+                        if (done)
+                          return;
+                        done = true;
+                        resolve(self, value);
+                      }, function (reason) {
+                        if (done)
+                          return;
+                        done = true;
+                        reject(self, reason);
+                      });
+                    } catch (ex) {
+                      if (done)
+                        return;
+                      done = true;
+                      reject(self, ex);
+                    }
+                  }
+                  Promise.prototype['catch'] = function (onRejected) {
+                    return this.then(null, onRejected);
+                  };
+                  Promise.prototype.then = function (onFulfilled, onRejected) {
+                    var prom = new this.constructor(noop);
+                    handle(this, new Handler(onFulfilled, onRejected, prom));
+                    return prom;
+                  };
+                  Promise.all = function (arr) {
+                    var args = Array.prototype.slice.call(arr);
+                    return new Promise(function (resolve, reject) {
+                      if (args.length === 0)
+                        return resolve([]);
+                      var remaining = args.length;
+                      function res(i, val) {
+                        try {
+                          if (val && (typeof val === 'object' || typeof val === 'function')) {
+                            var then = val.then;
+                            if (typeof then === 'function') {
+                              then.call(val, function (val) {
+                                res(i, val);
+                              }, reject);
+                              return;
+                            }
+                          }
+                          args[i] = val;
+                          if (--remaining === 0) {
+                            resolve(args);
+                          }
+                        } catch (ex) {
+                          reject(ex);
+                        }
+                      }
+                      for (var i = 0; i < args.length; i++) {
+                        res(i, args[i]);
+                      }
+                    });
+                  };
+                  Promise.resolve = function (value) {
+                    if (value && typeof value === 'object' && value.constructor === Promise) {
+                      return value;
+                    }
+                    return new Promise(function (resolve) {
+                      resolve(value);
+                    });
+                  };
+                  Promise.reject = function (value) {
+                    return new Promise(function (resolve, reject) {
+                      reject(value);
+                    });
+                  };
+                  Promise.race = function (values) {
+                    return new Promise(function (resolve, reject) {
+                      for (var i = 0, len = values.length; i < len; i++) {
+                        values[i].then(resolve, reject);
+                      }
+                    });
+                  };
+                  Promise._immediateFn = typeof setImmediate === 'function' ? function (fn) {
+                    setImmediate(fn);
+                  } : function (fn) {
+                    setTimeoutFunc(fn, 0);
+                  };
+                  Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
+                    if (typeof console !== 'undefined' && console) {
+                      console.warn('Possible Unhandled Promise Rejection:', err);
+                    }
+                  };
+                  Promise._setImmediateFn = function _setImmediateFn(fn) {
+                    Promise._immediateFn = fn;
+                  };
+                  Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {
+                    Promise._unhandledRejectionFn = fn;
+                  };
+                  if (typeof module !== 'undefined' && module.exports) {
+                    module.exports = Promise;
+                  } else if (!root.Promise) {
+                    root.Promise = Promise;
+                  }
+                }(this));
+              }.call(this, require('timers').setImmediate));
+            },
+            { 'timers': 3 }
+          ],
+          3: [
+            function (require, module, exports) {
+              (function (setImmediate, clearImmediate) {
+                var nextTick = require('process/browser.js').nextTick;
+                var apply = Function.prototype.apply;
+                var slice = Array.prototype.slice;
+                var immediateIds = {};
+                var nextImmediateId = 0;
+                exports.setTimeout = function () {
+                  return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);
+                };
+                exports.setInterval = function () {
+                  return new Timeout(apply.call(setInterval, window, arguments), clearInterval);
+                };
+                exports.clearTimeout = exports.clearInterval = function (timeout) {
+                  timeout.close();
+                };
+                function Timeout(id, clearFn) {
+                  this._id = id;
+                  this._clearFn = clearFn;
+                }
+                Timeout.prototype.unref = Timeout.prototype.ref = function () {
+                };
+                Timeout.prototype.close = function () {
+                  this._clearFn.call(window, this._id);
+                };
+                exports.enroll = function (item, msecs) {
+                  clearTimeout(item._idleTimeoutId);
+                  item._idleTimeout = msecs;
+                };
+                exports.unenroll = function (item) {
+                  clearTimeout(item._idleTimeoutId);
+                  item._idleTimeout = -1;
+                };
+                exports._unrefActive = exports.active = function (item) {
+                  clearTimeout(item._idleTimeoutId);
+                  var msecs = item._idleTimeout;
+                  if (msecs >= 0) {
+                    item._idleTimeoutId = setTimeout(function onTimeout() {
+                      if (item._onTimeout)
+                        item._onTimeout();
+                    }, msecs);
+                  }
+                };
+                exports.setImmediate = typeof setImmediate === 'function' ? setImmediate : function (fn) {
+                  var id = nextImmediateId++;
+                  var args = arguments.length < 2 ? false : slice.call(arguments, 1);
+                  immediateIds[id] = true;
+                  nextTick(function onNextTick() {
+                    if (immediateIds[id]) {
+                      if (args) {
+                        fn.apply(null, args);
+                      } else {
+                        fn.call(null);
+                      }
+                      exports.clearImmediate(id);
+                    }
+                  });
+                  return id;
+                };
+                exports.clearImmediate = typeof clearImmediate === 'function' ? clearImmediate : function (id) {
+                  delete immediateIds[id];
+                };
+              }.call(this, require('timers').setImmediate, require('timers').clearImmediate));
+            },
+            {
+              'process/browser.js': 1,
+              'timers': 3
+            }
+          ],
+          4: [
+            function (require, module, exports) {
+              var promisePolyfill = require('promise-polyfill');
+              var Global = function () {
+                if (typeof window !== 'undefined') {
+                  return window;
+                } else {
+                  return Function('return this;')();
+                }
+              }();
+              module.exports = { boltExport: Global.Promise || promisePolyfill };
+            },
+            { 'promise-polyfill': 2 }
+          ]
+        }, {}, [4])(4);
+      }));
+    }(undefined, exports$1, module, undefined));
+    var Promise$1 = module.exports.boltExport;
+
+    var nu$7 = function (baseFn) {
+      var data = Option.none();
+      var callbacks = [];
+      var map = function (f) {
+        return nu$7(function (nCallback) {
+          get(function (data) {
+            nCallback(f(data));
+          });
+        });
+      };
+      var get = function (nCallback) {
+        if (isReady()) {
+          call(nCallback);
+        } else {
+          callbacks.push(nCallback);
+        }
+      };
+      var set = function (x) {
+        data = Option.some(x);
+        run(callbacks);
+        callbacks = [];
+      };
+      var isReady = function () {
+        return data.isSome();
+      };
+      var run = function (cbs) {
+        each$1(cbs, call);
+      };
+      var call = function (cb) {
+        data.each(function (x) {
+          domGlobals.setTimeout(function () {
+            cb(x);
+          }, 0);
+        });
+      };
+      baseFn(set);
+      return {
+        get: get,
+        map: map,
+        isReady: isReady
+      };
+    };
+    var pure$1 = function (a) {
+      return nu$7(function (callback) {
+        callback(a);
+      });
+    };
+    var LazyValue = {
+      nu: nu$7,
+      pure: pure$1
+    };
+
+    var errorReporter = function (err) {
+      domGlobals.setTimeout(function () {
+        throw err;
+      }, 0);
+    };
+    var make$4 = function (run) {
+      var get = function (callback) {
+        run().then(callback, errorReporter);
+      };
+      var map = function (fab) {
+        return make$4(function () {
+          return run().then(fab);
+        });
+      };
+      var bind = function (aFutureB) {
+        return make$4(function () {
+          return run().then(function (v) {
+            return aFutureB(v).toPromise();
+          });
+        });
+      };
+      var anonBind = function (futureB) {
+        return make$4(function () {
+          return run().then(function () {
+            return futureB.toPromise();
+          });
+        });
+      };
+      var toLazy = function () {
+        return LazyValue.nu(get);
+      };
+      var toCached = function () {
+        var cache = null;
+        return make$4(function () {
+          if (cache === null) {
+            cache = run();
+          }
+          return cache;
+        });
+      };
+      var toPromise = run;
+      return {
+        map: map,
+        bind: bind,
+        anonBind: anonBind,
+        toLazy: toLazy,
+        toCached: toCached,
+        toPromise: toPromise,
+        get: get
+      };
+    };
+    var nu$8 = function (baseFn) {
+      return make$4(function () {
+        return new Promise$1(baseFn);
+      });
+    };
+    var pure$2 = function (a) {
+      return make$4(function () {
+        return Promise$1.resolve(a);
+      });
+    };
+    var Future = {
+      nu: nu$8,
+      pure: pure$2
+    };
+
+    var adjust = function (value, destination, amount) {
+      if (Math.abs(value - destination) <= amount) {
+        return Option.none();
+      } else if (value < destination) {
+        return Option.some(value + amount);
+      } else {
+        return Option.some(value - amount);
+      }
+    };
+    var create$5 = function () {
+      var interval = null;
+      var animate = function (getCurrent, destination, amount, increment, doFinish, rate) {
+        var finished = false;
+        var finish = function (v) {
+          finished = true;
+          doFinish(v);
+        };
+        global$4.clearInterval(interval);
+        var abort = function (v) {
+          global$4.clearInterval(interval);
+          finish(v);
+        };
+        interval = global$4.setInterval(function () {
+          var value = getCurrent();
+          adjust(value, destination, amount).fold(function () {
+            global$4.clearInterval(interval);
+            finish(destination);
+          }, function (s) {
+            increment(s, abort);
+            if (!finished) {
+              var newValue = getCurrent();
+              if (newValue !== s || Math.abs(newValue - destination) > Math.abs(value - destination)) {
+                global$4.clearInterval(interval);
+                finish(destination);
+              }
+            }
+          });
+        }, rate);
+      };
+      return { animate: animate };
+    };
+
+    var findDevice = function (deviceWidth, deviceHeight) {
+      var devices = [
+        {
+          width: 320,
+          height: 480,
+          keyboard: {
+            portrait: 300,
+            landscape: 240
+          }
+        },
+        {
+          width: 320,
+          height: 568,
+          keyboard: {
+            portrait: 300,
+            landscape: 240
+          }
+        },
+        {
+          width: 375,
+          height: 667,
+          keyboard: {
+            portrait: 305,
+            landscape: 240
+          }
+        },
+        {
+          width: 414,
+          height: 736,
+          keyboard: {
+            portrait: 320,
+            landscape: 240
+          }
+        },
+        {
+          width: 768,
+          height: 1024,
+          keyboard: {
+            portrait: 320,
+            landscape: 400
+          }
+        },
+        {
+          width: 1024,
+          height: 1366,
+          keyboard: {
+            portrait: 380,
+            landscape: 460
+          }
+        }
+      ];
+      return findMap(devices, function (device) {
+        return someIf(deviceWidth <= device.width && deviceHeight <= device.height, device.keyboard);
+      }).getOr({
+        portrait: deviceHeight / 5,
+        landscape: deviceWidth / 4
+      });
+    };
+
+    var softKeyboardLimits = function (outerWindow) {
+      return findDevice(outerWindow.screen.width, outerWindow.screen.height);
+    };
+    var accountableKeyboardHeight = function (outerWindow) {
+      var portrait = get$b(outerWindow).isPortrait();
+      var limits = softKeyboardLimits(outerWindow);
+      var keyboard = portrait ? limits.portrait : limits.landscape;
+      var visualScreenHeight = portrait ? outerWindow.screen.height : outerWindow.screen.width;
+      return visualScreenHeight - outerWindow.innerHeight > keyboard ? 0 : keyboard;
+    };
+    var getGreenzone = function (socket, dropup) {
+      var outerWindow = owner(socket).dom().defaultView;
+      var viewportHeight = get$5(socket) + get$5(dropup);
+      var acc = accountableKeyboardHeight(outerWindow);
+      return viewportHeight - acc;
+    };
+    var updatePadding = function (contentBody, socket, dropup) {
+      var greenzoneHeight = getGreenzone(socket, dropup);
+      var deltaHeight = get$5(socket) + get$5(dropup) - greenzoneHeight;
+      set$3(contentBody, 'padding-bottom', deltaHeight + 'px');
+    };
+
+    var fixture = Adt.generate([
+      {
+        fixed: [
+          'element',
+          'property',
+          'offsetY'
+        ]
+      },
+      {
+        scroller: [
+          'element',
+          'offsetY'
+        ]
+      }
+    ]);
+    var yFixedData = 'data-' + resolve('position-y-fixed');
+    var yFixedProperty = 'data-' + resolve('y-property');
+    var yScrollingData = 'data-' + resolve('scrolling');
+    var windowSizeData = 'data-' + resolve('last-window-height');
+    var getYFixedData = function (element) {
+      return safeParse(element, yFixedData);
+    };
+    var getYFixedProperty = function (element) {
+      return get$1(element, yFixedProperty);
+    };
+    var getLastWindowSize = function (element) {
+      return safeParse(element, windowSizeData);
+    };
+    var classifyFixed = function (element, offsetY) {
+      var prop = getYFixedProperty(element);
+      return fixture.fixed(element, prop, offsetY);
+    };
+    var classifyScrolling = function (element, offsetY) {
+      return fixture.scroller(element, offsetY);
+    };
+    var classify = function (element) {
+      var offsetY = getYFixedData(element);
+      var classifier = get$1(element, yScrollingData) === 'true' ? classifyScrolling : classifyFixed;
+      return classifier(element, offsetY);
+    };
+    var findFixtures = function (container) {
+      var candidates = descendants(container, '[' + yFixedData + ']');
+      return map$1(candidates, classify);
+    };
+    var takeoverToolbar = function (toolbar) {
+      var oldToolbarStyle = get$1(toolbar, 'style');
+      setAll$1(toolbar, {
+        position: 'absolute',
+        top: '0px'
+      });
+      set(toolbar, yFixedData, '0px');
+      set(toolbar, yFixedProperty, 'top');
+      var restore = function () {
+        set(toolbar, 'style', oldToolbarStyle || '');
+        remove$1(toolbar, yFixedData);
+        remove$1(toolbar, yFixedProperty);
+      };
+      return { restore: restore };
+    };
+    var takeoverViewport = function (toolbarHeight, height, viewport) {
+      var oldViewportStyle = get$1(viewport, 'style');
+      register(viewport);
+      setAll$1(viewport, {
+        position: 'absolute',
+        height: height + 'px',
+        width: '100%',
+        top: toolbarHeight + 'px'
+      });
+      set(viewport, yFixedData, toolbarHeight + 'px');
+      set(viewport, yScrollingData, 'true');
+      set(viewport, yFixedProperty, 'top');
+      var restore = function () {
+        deregister(viewport);
+        set(viewport, 'style', oldViewportStyle || '');
+        remove$1(viewport, yFixedData);
+        remove$1(viewport, yScrollingData);
+        remove$1(viewport, yFixedProperty);
+      };
+      return { restore: restore };
+    };
+    var takeoverDropup = function (dropup) {
+      var oldDropupStyle = get$1(dropup, 'style');
+      setAll$1(dropup, {
+        position: 'absolute',
+        bottom: '0px'
+      });
+      set(dropup, yFixedData, '0px');
+      set(dropup, yFixedProperty, 'bottom');
+      var restore = function () {
+        set(dropup, 'style', oldDropupStyle || '');
+        remove$1(dropup, yFixedData);
+        remove$1(dropup, yFixedProperty);
+      };
+      return { restore: restore };
+    };
+    var deriveViewportHeight = function (viewport, toolbarHeight, dropupHeight) {
+      var outerWindow = owner(viewport).dom().defaultView;
+      var winH = outerWindow.innerHeight;
+      set(viewport, windowSizeData, winH + 'px');
+      return winH - toolbarHeight - dropupHeight;
+    };
+    var takeover$1 = function (viewport, contentBody, toolbar, dropup) {
+      var outerWindow = owner(viewport).dom().defaultView;
+      var toolbarSetup = takeoverToolbar(toolbar);
+      var toolbarHeight = get$5(toolbar);
+      var dropupHeight = get$5(dropup);
+      var viewportHeight = deriveViewportHeight(viewport, toolbarHeight, dropupHeight);
+      var viewportSetup = takeoverViewport(toolbarHeight, viewportHeight, viewport);
+      var dropupSetup = takeoverDropup(dropup);
+      var isActive = true;
+      var restore = function () {
+        isActive = false;
+        toolbarSetup.restore();
+        viewportSetup.restore();
+        dropupSetup.restore();
+      };
+      var isExpanding = function () {
+        var currentWinHeight = outerWindow.innerHeight;
+        var lastWinHeight = getLastWindowSize(viewport);
+        return currentWinHeight > lastWinHeight;
+      };
+      var refresh = function () {
+        if (isActive) {
+          var newToolbarHeight = get$5(toolbar);
+          var dropupHeight_1 = get$5(dropup);
+          var newHeight = deriveViewportHeight(viewport, newToolbarHeight, dropupHeight_1);
+          set(viewport, yFixedData, newToolbarHeight + 'px');
+          set$3(viewport, 'height', newHeight + 'px');
+          updatePadding(contentBody, viewport, dropup);
+        }
+      };
+      var setViewportOffset = function (newYOffset) {
+        var offsetPx = newYOffset + 'px';
+        set(viewport, yFixedData, offsetPx);
+        refresh();
+      };
+      updatePadding(contentBody, viewport, dropup);
+      return {
+        setViewportOffset: setViewportOffset,
+        isExpanding: isExpanding,
+        isShrinking: not(isExpanding),
+        refresh: refresh,
+        restore: restore
+      };
+    };
+
+    var animator = create$5();
+    var ANIMATION_STEP = 15;
+    var NUM_TOP_ANIMATION_FRAMES = 10;
+    var ANIMATION_RATE = 10;
+    var lastScroll = 'data-' + resolve('last-scroll-top');
+    var getTop = function (element) {
+      var raw = getRaw(element, 'top').getOr('0');
+      return parseInt(raw, 10);
+    };
+    var getScrollTop = function (element) {
+      return parseInt(element.dom().scrollTop, 10);
+    };
+    var moveScrollAndTop = function (element, destination, finalTop) {
+      return Future.nu(function (callback) {
+        var getCurrent = curry(getScrollTop, element);
+        var update = function (newScroll) {
+          element.dom().scrollTop = newScroll;
+          set$3(element, 'top', getTop(element) + ANIMATION_STEP + 'px');
+        };
+        var finish = function () {
+          element.dom().scrollTop = destination;
+          set$3(element, 'top', finalTop + 'px');
+          callback(destination);
+        };
+        animator.animate(getCurrent, destination, ANIMATION_STEP, update, finish, ANIMATION_RATE);
+      });
+    };
+    var moveOnlyScroll = function (element, destination) {
+      return Future.nu(function (callback) {
+        var getCurrent = curry(getScrollTop, element);
+        set(element, lastScroll, getCurrent());
+        var update = function (newScroll, abort) {
+          var previous = safeParse(element, lastScroll);
+          if (previous !== element.dom().scrollTop) {
+            abort(element.dom().scrollTop);
+          } else {
+            element.dom().scrollTop = newScroll;
+            set(element, lastScroll, newScroll);
+          }
+        };
+        var finish = function () {
+          element.dom().scrollTop = destination;
+          set(element, lastScroll, destination);
+          callback(destination);
+        };
+        var distance = Math.abs(destination - getCurrent());
+        var step = Math.ceil(distance / NUM_TOP_ANIMATION_FRAMES);
+        animator.animate(getCurrent, destination, step, update, finish, ANIMATION_RATE);
+      });
+    };
+    var moveOnlyTop = function (element, destination) {
+      return Future.nu(function (callback) {
+        var getCurrent = curry(getTop, element);
+        var update = function (newTop) {
+          set$3(element, 'top', newTop + 'px');
+        };
+        var finish = function () {
+          update(destination);
+          callback(destination);
+        };
+        var distance = Math.abs(destination - getCurrent());
+        var step = Math.ceil(distance / NUM_TOP_ANIMATION_FRAMES);
+        animator.animate(getCurrent, destination, step, update, finish, ANIMATION_RATE);
+      });
+    };
+    var updateTop = function (element, amount) {
+      var newTop = amount + getYFixedData(element) + 'px';
+      set$3(element, 'top', newTop);
+    };
+    var moveWindowScroll = function (toolbar, viewport, destY) {
+      var outerWindow = owner(toolbar).dom().defaultView;
+      return Future.nu(function (callback) {
+        updateTop(toolbar, destY);
+        updateTop(viewport, destY);
+        outerWindow.scrollTo(0, destY);
+        callback(destY);
+      });
+    };
+
+    function BackgroundActivity (doAction) {
+      var action = Cell(LazyValue.pure({}));
+      var start = function (value) {
+        var future = LazyValue.nu(function (callback) {
+          return doAction(value).get(callback);
+        });
+        action.set(future);
+      };
+      var idle = function (g) {
+        action.get().get(function () {
+          g();
+        });
+      };
+      return {
+        start: start,
+        idle: idle
+      };
+    }
+
+    var scrollIntoView = function (cWin, socket, dropup, top, bottom) {
+      var greenzone = getGreenzone(socket, dropup);
+      var refreshCursor = curry(refresh$1, cWin);
+      if (top > greenzone || bottom > greenzone) {
+        moveOnlyScroll(socket, socket.dom().scrollTop - greenzone + bottom).get(refreshCursor);
+      } else if (top < 0) {
+        moveOnlyScroll(socket, socket.dom().scrollTop + top).get(refreshCursor);
+      }
+    };
+
+    var par = function (asyncValues, nu) {
+      return nu(function (callback) {
+        var r = [];
+        var count = 0;
+        var cb = function (i) {
+          return function (value) {
+            r[i] = value;
+            count++;
+            if (count >= asyncValues.length) {
+              callback(r);
+            }
+          };
+        };
+        if (asyncValues.length === 0) {
+          callback([]);
+        } else {
+          each$1(asyncValues, function (asyncValue, i) {
+            asyncValue.get(cb(i));
+          });
+        }
+      });
+    };
+
+    var par$1 = function (futures) {
+      return par(futures, Future.nu);
+    };
+
+    var updateFixed = function (element, property, winY, offsetY) {
+      var destination = winY + offsetY;
+      set$3(element, property, destination + 'px');
+      return Future.pure(offsetY);
+    };
+    var updateScrollingFixed = function (element, winY, offsetY) {
+      var destTop = winY + offsetY;
+      var oldProp = getRaw(element, 'top').getOr(offsetY);
+      var delta = destTop - parseInt(oldProp, 10);
+      var destScroll = element.dom().scrollTop + delta;
+      return moveScrollAndTop(element, destScroll, destTop);
+    };
+    var updateFixture = function (fixture, winY) {
+      return fixture.fold(function (element, property, offsetY) {
+        return updateFixed(element, property, winY, offsetY);
+      }, function (element, offsetY) {
+        return updateScrollingFixed(element, winY, offsetY);
+      });
+    };
+    var updatePositions = function (container, winY) {
+      var fixtures = findFixtures(container);
+      var updates = map$1(fixtures, function (fixture) {
+        return updateFixture(fixture, winY);
+      });
+      return par$1(updates);
+    };
+
+    var VIEW_MARGIN = 5;
+    var register$2 = function (toolstrip, socket, container, outerWindow, structure, cWin) {
+      var scroller = BackgroundActivity(function (y) {
+        return moveWindowScroll(toolstrip, socket, y);
+      });
+      var scrollBounds = function () {
+        var rects = getRectangles(cWin);
+        return Option.from(rects[0]).bind(function (rect) {
+          var viewTop = rect.top() - socket.dom().scrollTop;
+          var outside = viewTop > outerWindow.innerHeight + VIEW_MARGIN || viewTop < -VIEW_MARGIN;
+          return outside ? Option.some({
+            top: constant(viewTop),
+            bottom: constant(viewTop + rect.height())
+          }) : Option.none();
+        });
+      };
+      var scrollThrottle = last(function () {
+        scroller.idle(function () {
+          updatePositions(container, outerWindow.pageYOffset).get(function () {
+            var extraScroll = scrollBounds();
+            extraScroll.each(function (extra) {
+              socket.dom().scrollTop = socket.dom().scrollTop + extra.top();
+            });
+            scroller.start(0);
+            structure.refresh();
+          });
+        });
+      }, 1000);
+      var onScroll = bind$3(Element.fromDom(outerWindow), 'scroll', function () {
+        if (outerWindow.pageYOffset < 0) {
+          return;
+        }
+        scrollThrottle.throttle();
+      });
+      updatePositions(container, outerWindow.pageYOffset).get(identity);
+      return { unbind: onScroll.unbind };
+    };
+    var setup$3 = function (bag) {
+      var cWin = bag.cWin;
+      var ceBody = bag.ceBody;
+      var socket = bag.socket;
+      var toolstrip = bag.toolstrip;
+      var contentElement = bag.contentElement;
+      var keyboardType = bag.keyboardType;
+      var outerWindow = bag.outerWindow;
+      var dropup = bag.dropup;
+      var outerBody = bag.outerBody;
+      var structure = takeover$1(socket, ceBody, toolstrip, dropup);
+      var keyboardModel = keyboardType(outerBody, cWin, body(), contentElement);
+      var toEditing = function () {
+        keyboardModel.toEditing();
+        clearSelection();
+      };
+      var toReading = function () {
+        keyboardModel.toReading();
+      };
+      var onToolbarTouch = function (_event) {
+        keyboardModel.onToolbarTouch();
+      };
+      var onOrientation = onChange(outerWindow, {
+        onChange: noop,
+        onReady: structure.refresh
+      });
+      onOrientation.onAdjustment(function () {
+        structure.refresh();
+      });
+      var onResize = bind$3(Element.fromDom(outerWindow), 'resize', function () {
+        if (structure.isExpanding()) {
+          structure.refresh();
+        }
+      });
+      var onScroll = register$2(toolstrip, socket, outerBody, outerWindow, structure, cWin);
+      var unfocusedSelection = FakeSelection(cWin, contentElement);
+      var refreshSelection = function () {
+        if (unfocusedSelection.isActive()) {
+          unfocusedSelection.update();
+        }
+      };
+      var highlightSelection = function () {
+        unfocusedSelection.update();
+      };
+      var clearSelection = function () {
+        unfocusedSelection.clear();
+      };
+      var scrollIntoView$1 = function (top, bottom) {
+        scrollIntoView(cWin, socket, dropup, top, bottom);
+      };
+      var syncHeight = function () {
+        set$3(contentElement, 'height', contentElement.dom().contentWindow.document.body.scrollHeight + 'px');
+      };
+      var setViewportOffset = function (newYOffset) {
+        structure.setViewportOffset(newYOffset);
+        moveOnlyTop(socket, newYOffset).get(identity);
+      };
+      var destroy = function () {
+        structure.restore();
+        onOrientation.destroy();
+        onScroll.unbind();
+        onResize.unbind();
+        keyboardModel.destroy();
+        unfocusedSelection.destroy();
+        input$1(body(), blur);
+      };
+      return {
+        toEditing: toEditing,
+        toReading: toReading,
+        onToolbarTouch: onToolbarTouch,
+        refreshSelection: refreshSelection,
+        clearSelection: clearSelection,
+        highlightSelection: highlightSelection,
+        scrollIntoView: scrollIntoView$1,
+        updateToolbarPadding: noop,
+        setViewportOffset: setViewportOffset,
+        syncHeight: syncHeight,
+        refreshStructure: structure.refresh,
+        destroy: destroy
+      };
+    };
+
+    var create$6 = function (platform, mask) {
+      var meta = tag();
+      var priorState = value$2();
+      var scrollEvents = value$2();
+      var iosApi = api$2();
+      var iosEvents = api$2();
+      var enter = function () {
+        mask.hide();
+        var doc = Element.fromDom(domGlobals.document);
+        getActiveApi(platform.editor).each(function (editorApi) {
+          priorState.set({
+            socketHeight: getRaw(platform.socket, 'height'),
+            iframeHeight: getRaw(editorApi.frame(), 'height'),
+            outerScroll: domGlobals.document.body.scrollTop
+          });
+          scrollEvents.set({ exclusives: exclusive(doc, '.' + scrollable) });
+          add$2(platform.container, resolve('fullscreen-maximized'));
+          clobberStyles(platform.container, editorApi.body());
+          meta.maximize();
+          set$3(platform.socket, 'overflow', 'scroll');
+          set$3(platform.socket, '-webkit-overflow-scrolling', 'touch');
+          focus$1(editorApi.body());
+          iosApi.set(setup$3({
+            cWin: editorApi.win(),
+            ceBody: editorApi.body(),
+            socket: platform.socket,
+            toolstrip: platform.toolstrip,
+            dropup: platform.dropup.element(),
+            contentElement: editorApi.frame(),
+            outerBody: platform.body,
+            outerWindow: platform.win,
+            keyboardType: stubborn
+          }));
+          iosApi.run(function (api) {
+            api.syncHeight();
+          });
+          iosEvents.set(initEvents$1(editorApi, iosApi, platform.toolstrip, platform.socket, platform.dropup));
+        });
+      };
+      var exit = function () {
+        meta.restore();
+        iosEvents.clear();
+        iosApi.clear();
+        mask.show();
+        priorState.on(function (s) {
+          s.socketHeight.each(function (h) {
+            set$3(platform.socket, 'height', h);
+          });
+          s.iframeHeight.each(function (h) {
+            set$3(platform.editor.getFrame(), 'height', h);
+          });
+          domGlobals.document.body.scrollTop = s.scrollTop;
+        });
+        priorState.clear();
+        scrollEvents.on(function (s) {
+          s.exclusives.unbind();
+        });
+        scrollEvents.clear();
+        remove$4(platform.container, resolve('fullscreen-maximized'));
+        restoreStyles();
+        deregister(platform.toolbar);
+        remove$5(platform.socket, 'overflow');
+        remove$5(platform.socket, '-webkit-overflow-scrolling');
+        blur(platform.editor.getFrame());
+        getActiveApi(platform.editor).each(function (editorApi) {
+          editorApi.clearSelection();
+        });
+      };
+      var refreshStructure = function () {
+        iosApi.run(function (api) {
+          api.refreshStructure();
+        });
+      };
+      return {
+        enter: enter,
+        refreshStructure: refreshStructure,
+        exit: exit
+      };
+    };
+
+    var produce$1 = function (raw) {
+      var mobile = asRawOrDie('Getting IosWebapp schema', MobileSchema, raw);
+      set$3(mobile.toolstrip, 'width', '100%');
+      set$3(mobile.container, 'position', 'relative');
+      var onView = function () {
+        mobile.setReadOnly(mobile.readOnlyOnInit());
+        mode.enter();
+      };
+      var mask = build$1(sketch$9(onView, mobile.translate));
+      mobile.alloy.add(mask);
+      var maskApi = {
+        show: function () {
+          mobile.alloy.add(mask);
+        },
+        hide: function () {
+          mobile.alloy.remove(mask);
+        }
+      };
+      var mode = create$6(mobile, maskApi);
+      return {
+        setReadOnly: mobile.setReadOnly,
+        refreshStructure: mode.refreshStructure,
+        enter: mode.enter,
+        exit: mode.exit,
+        destroy: noop
+      };
+    };
+
+    function IosRealm (scrollIntoView) {
+      var alloy = OuterContainer({ classes: [resolve('ios-container')] });
+      var toolbar = ScrollingToolbar();
+      var webapp = api$2();
+      var switchToEdit = makeEditSwitch(webapp);
+      var socket = makeSocket();
+      var dropup = build$2(function () {
+        webapp.run(function (w) {
+          w.refreshStructure();
+        });
+      }, scrollIntoView);
+      alloy.add(toolbar.wrapper());
+      alloy.add(socket);
+      alloy.add(dropup.component());
+      var setToolbarGroups = function (rawGroups) {
+        var groups = toolbar.createGroups(rawGroups);
+        toolbar.setGroups(groups);
+      };
+      var setContextToolbar = function (rawGroups) {
+        var groups = toolbar.createGroups(rawGroups);
+        toolbar.setContextToolbar(groups);
+      };
+      var focusToolbar = function () {
+        toolbar.focus();
+      };
+      var restoreToolbar = function () {
+        toolbar.restoreToolbar();
+      };
+      var init = function (spec) {
+        webapp.set(produce$1(spec));
+      };
+      var exit = function () {
+        webapp.run(function (w) {
+          Replacing.remove(socket, switchToEdit);
+          w.exit();
+        });
+      };
+      var updateMode$1 = function (readOnly) {
+        updateMode(socket, switchToEdit, readOnly, alloy.root());
+      };
+      return {
+        system: constant(alloy),
+        element: alloy.element,
+        init: init,
+        exit: exit,
+        setToolbarGroups: setToolbarGroups,
+        setContextToolbar: setContextToolbar,
+        focusToolbar: focusToolbar,
+        restoreToolbar: restoreToolbar,
+        updateMode: updateMode$1,
+        socket: constant(socket),
+        dropup: constant(dropup)
+      };
+    }
+
+    var global$5 = tinymce.util.Tools.resolve('tinymce.EditorManager');
+
+    var derive$3 = function (editor) {
+      var base = get(editor.settings, 'skin_url').fold(function () {
+        return global$5.baseURL + '/skins/ui/oxide';
+      }, function (url) {
+        return url;
+      });
+      return {
+        content: base + '/content.mobile.min.css',
+        ui: base + '/skin.mobile.min.css'
+      };
+    };
+
+    var fireChange = function (realm, command, state) {
+      realm.system().broadcastOn([formatChanged], {
+        command: command,
+        state: state
+      });
+    };
+    var init$5 = function (realm, editor) {
+      var allFormats = keys(editor.formatter.get());
+      each$1(allFormats, function (command) {
+        editor.formatter.formatChanged(command, function (state) {
+          fireChange(realm, command, state);
+        });
+      });
+      each$1([
+        'ul',
+        'ol'
+      ], function (command) {
+        editor.selection.selectorChanged(command, function (state, _data) {
+          fireChange(realm, command, state);
+        });
+      });
+    };
+
+    var fireSkinLoaded = function (editor) {
+      return function () {
+        var done = function () {
+          editor._skinLoaded = true;
+          editor.fire('SkinLoaded');
+        };
+        if (editor.initialized) {
+          done();
+        } else {
+          editor.on('init', done);
+        }
+      };
+    };
+
+    var READING = 'toReading';
+    var EDITING = 'toEditing';
+    var renderMobileTheme = function (editor) {
+      var renderUI = function () {
+        var targetNode = editor.getElement();
+        var cssUrls = derive$3(editor);
+        if (isSkinDisabled(editor) === false) {
+          editor.contentCSS.push(cssUrls.content);
+          global$1.DOM.styleSheetLoader.load(cssUrls.ui, fireSkinLoaded(editor));
+        } else {
+          fireSkinLoaded(editor)();
+        }
+        var doScrollIntoView = function () {
+          editor.fire('ScrollIntoView');
+        };
+        var realm = detect$3().os.isAndroid() ? AndroidRealm(doScrollIntoView) : IosRealm(doScrollIntoView);
+        var original = Element.fromDom(targetNode);
+        attachSystemAfter(original, realm.system());
+        var findFocusIn = function (elem) {
+          return search(elem).bind(function (focused) {
+            return realm.system().getByDom(focused).toOption();
+          });
+        };
+        var outerWindow = targetNode.ownerDocument.defaultView;
+        var orientation = onChange(outerWindow, {
+          onChange: function () {
+            var alloy = realm.system();
+            alloy.broadcastOn([orientationChanged], { width: getActualWidth(outerWindow) });
+          },
+          onReady: noop
+        });
+        var setReadOnly = function (dynamicGroup, readOnlyGroups, mainGroups, ro) {
+          if (ro === false) {
+            editor.selection.collapse();
+          }
+          var toolbars = configureToolbar(dynamicGroup, readOnlyGroups, mainGroups);
+          realm.setToolbarGroups(ro === true ? toolbars.readOnly : toolbars.main);
+          editor.setMode(ro === true ? 'readonly' : 'design');
+          editor.fire(ro === true ? READING : EDITING);
+          realm.updateMode(ro);
+        };
+        var configureToolbar = function (dynamicGroup, readOnlyGroups, mainGroups) {
+          var dynamic = dynamicGroup.get();
+          var toolbars = {
+            readOnly: dynamic.backToMask.concat(readOnlyGroups.get()),
+            main: dynamic.backToMask.concat(mainGroups.get())
+          };
+          return toolbars;
+        };
+        var bindHandler = function (label, handler) {
+          editor.on(label, handler);
+          return {
+            unbind: function () {
+              editor.off(label);
+            }
+          };
+        };
+        editor.on('init', function () {
+          realm.init({
+            editor: {
+              getFrame: function () {
+                return Element.fromDom(editor.contentAreaContainer.querySelector('iframe'));
+              },
+              onDomChanged: function () {
+                return { unbind: noop };
+              },
+              onToReading: function (handler) {
+                return bindHandler(READING, handler);
+              },
+              onToEditing: function (handler) {
+                return bindHandler(EDITING, handler);
+              },
+              onScrollToCursor: function (handler) {
+                editor.on('ScrollIntoView', function (tinyEvent) {
+                  handler(tinyEvent);
+                });
+                var unbind = function () {
+                  editor.off('ScrollIntoView');
+                  orientation.destroy();
+                };
+                return { unbind: unbind };
+              },
+              onTouchToolstrip: function () {
+                hideDropup();
+              },
+              onTouchContent: function () {
+                var toolbar = Element.fromDom(editor.editorContainer.querySelector('.' + resolve('toolbar')));
+                findFocusIn(toolbar).each(emitExecute);
+                realm.restoreToolbar();
+                hideDropup();
+              },
+              onTapContent: function (evt) {
+                var target = evt.target();
+                if (name(target) === 'img') {
+                  editor.selection.select(target.dom());
+                  evt.kill();
+                } else if (name(target) === 'a') {
+                  var component = realm.system().getByDom(Element.fromDom(editor.editorContainer));
+                  component.each(function (container) {
+                    if (Swapping.isAlpha(container)) {
+                      openLink(target.dom());
+                    }
+                  });
+                }
+              }
+            },
+            container: Element.fromDom(editor.editorContainer),
+            socket: Element.fromDom(editor.contentAreaContainer),
+            toolstrip: Element.fromDom(editor.editorContainer.querySelector('.' + resolve('toolstrip'))),
+            toolbar: Element.fromDom(editor.editorContainer.querySelector('.' + resolve('toolbar'))),
+            dropup: realm.dropup(),
+            alloy: realm.system(),
+            translate: noop,
+            setReadOnly: function (ro) {
+              setReadOnly(dynamicGroup, readOnlyGroups, mainGroups, ro);
+            },
+            readOnlyOnInit: function () {
+              return readOnlyOnInit();
+            }
+          });
+          var hideDropup = function () {
+            realm.dropup().disappear(function () {
+              realm.system().broadcastOn([dropupDismissed], {});
+            });
+          };
+          var backToMaskGroup = {
+            label: 'The first group',
+            scrollable: false,
+            items: [forToolbar('back', function () {
+                editor.selection.collapse();
+                realm.exit();
+              }, {}, editor)]
+          };
+          var backToReadOnlyGroup = {
+            label: 'Back to read only',
+            scrollable: false,
+            items: [forToolbar('readonly-back', function () {
+                setReadOnly(dynamicGroup, readOnlyGroups, mainGroups, true);
+              }, {}, editor)]
+          };
+          var readOnlyGroup = {
+            label: 'The read only mode group',
+            scrollable: true,
+            items: []
+          };
+          var features = setup(realm, editor);
+          var items = detect$4(editor.settings, features);
+          var actionGroup = {
+            label: 'the action group',
+            scrollable: true,
+            items: items
+          };
+          var extraGroup = {
+            label: 'The extra group',
+            scrollable: false,
+            items: []
+          };
+          var mainGroups = Cell([
+            actionGroup,
+            extraGroup
+          ]);
+          var readOnlyGroups = Cell([
+            readOnlyGroup,
+            extraGroup
+          ]);
+          var dynamicGroup = Cell({
+            backToMask: [backToMaskGroup],
+            backToReadOnly: [backToReadOnlyGroup]
+          });
+          init$5(realm, editor);
+        });
+        editor.on('remove', function () {
+          realm.exit();
+        });
+        editor.on('detach', function () {
+          detachSystem(realm.system());
+          realm.system().destroy();
+        });
+        return {
+          iframeContainer: realm.socket().element().dom(),
+          editorContainer: realm.element().dom()
+        };
+      };
+      return {
+        getNotificationManagerImpl: function () {
+          return {
+            open: constant({
+              progressBar: { value: noop },
+              close: noop,
+              text: noop,
+              getEl: constant(null),
+              moveTo: noop,
+              moveRel: noop,
+              settings: {}
+            }),
+            close: noop,
+            reposition: noop,
+            getArgs: constant({})
+          };
+        },
+        renderUI: renderUI
+      };
+    };
+    function Theme () {
+      global$2.add('mobile', renderMobileTheme);
+    }
+
+    Theme();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/themes/mobile/theme.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(v){"use strict";var x=function(){return(x=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}).apply(this,arguments)};function c(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(n);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(n,r[o])&&(t[r[o]]=n[r[o]])}return t}function u(){for(var n=0,e=0,t=arguments.length;e<t;e++)n+=arguments[e].length;var r=Array(n),o=0;for(e=0;e<t;e++)for(var i=arguments[e],u=0,c=i.length;u<c;u++,o++)r[o]=i[u];return r}var w=function(){},d=function(t,r){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t(r.apply(null,n))}},y=function(n){return function(){return n}},b=function(n){return n};function S(r){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=o.concat(n);return r.apply(null,t)}}var n,e,t,r,o,i,m=function(e){return function(n){return!e(n)}},a=function(n){return function(){throw new Error(n)}},f=function(n){return n()},s=y(!1),l=y(!0),g=function(){return p},p=(n=function(n){return n.isNone()},{fold:function(n,e){return n()},is:s,isSome:s,isNone:l,getOr:t=function(n){return n},getOrThunk:e=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:y(null),getOrUndefined:y(undefined),or:t,orThunk:e,map:g,each:w,bind:g,exists:s,forall:l,filter:g,equals:n,equals_:n,toArray:function(){return[]},toString:y("none()")}),h=function(t){var n=y(t),e=function(){return o},r=function(n){return n(t)},o={fold:function(n,e){return e(t)},is:function(n){return t===n},isSome:l,isNone:s,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){return h(n(t))},each:function(n){n(t)},bind:r,exists:r,forall:r,filter:function(n){return n(t)?o:p},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(n){return n.is(t)},equals_:function(n,e){return n.fold(s,function(n){return e(t,n)})}};return o},O={some:h,none:g,from:function(n){return null===n||n===undefined?p:h(n)}},T=Object.keys,k=Object.hasOwnProperty,E=function(n,e){for(var t=T(n),r=0,o=t.length;r<o;r++){var i=t[r];e(n[i],i)}},C=function(n,t){return M(n,function(n,e){return{k:e,v:t(n,e)}})},M=function(n,r){var o={};return E(n,function(n,e){var t=r(n,e);o[t.k]=t.v}),o},_=function(n,e){var t,r,o,i,u={};return t=e,i=u,r=function(n,e){i[e]=n},o=w,E(n,function(n,e){(t(n,e)?r:o)(n,e)}),u},D=function(n,t){var r=[];return E(n,function(n,e){r.push(t(n,e))}),r},I=function(n,e){return F(n,e)?O.from(n[e]):O.none()},F=function(n,e){return k.call(n,e)},R=function(n,e){return F(n,e)&&n[e]!==undefined&&null!==n[e]},V=function(t){var r,o=!1;return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return o||(o=!0,r=t.apply(null,n)),r}},B=function(n,e){var t=function(n,e){for(var t=0;t<n.length;t++){var r=n[t];if(r.test(e))return r}return undefined}(n,e);if(!t)return{major:0,minor:0};var r=function(n){return Number(e.replace(t,"$"+n))};return j(r(1),r(2))},A=function(){return j(0,0)},j=function(n,e){return{major:n,minor:e}},H={nu:j,detect:function(n,e){var t=String(e).toLowerCase();return 0===n.length?A():B(n,t)},unknown:A},N="Edge",P="Chrome",z="Opera",L="Firefox",G="Safari",$=function(n){var e=n.current,t=n.version,r=function(n){return function(){return e===n}};return{current:e,version:t,isEdge:r(N),isChrome:r(P),isIE:r("IE"),isOpera:r(z),isFirefox:r(L),isSafari:r(G)}},U={unknown:function(){return $({current:undefined,version:H.unknown()})},nu:$,edge:y(N),chrome:y(P),ie:y("IE"),opera:y(z),firefox:y(L),safari:y(G)},W="Windows",X="Android",q="Linux",Y="Solaris",K="FreeBSD",J="ChromeOS",Q=function(n){var e=n.current,t=n.version,r=function(n){return function(){return e===n}};return{current:e,version:t,isWindows:r(W),isiOS:r("iOS"),isAndroid:r(X),isOSX:r("OSX"),isLinux:r(q),isSolaris:r(Y),isFreeBSD:r(K),isChromeOS:r(J)}},Z={unknown:function(){return Q({current:undefined,version:H.unknown()})},nu:Q,windows:y(W),ios:y("iOS"),android:y(X),linux:y(q),osx:y("OSX"),solaris:y(Y),freebsd:y(K),chromeos:y(J)},nn=function(r){return function(n){return t=typeof(e=n),(null===e?"null":"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t)===r;var e,t}},en=function(e){return function(n){return typeof n===e}},tn=nn("string"),rn=nn("object"),on=nn("array"),un=en("boolean"),cn=en("function"),an=en("number"),fn=Array.prototype.slice,sn=Array.prototype.indexOf,ln=Array.prototype.push,dn=function(n,e){return t=n,r=e,-1<sn.call(t,r);var t,r},mn=function(n,e){for(var t=0,r=n.length;t<r;t++){if(e(n[t],t))return!0}return!1},gn=function(n,e){for(var t=n.length,r=new Array(t),o=0;o<t;o++){var i=n[o];r[o]=e(i,o)}return r},pn=function(n,e){for(var t=0,r=n.length;t<r;t++){e(n[t],t)}},hn=function(n,e){for(var t=[],r=0,o=n.length;r<o;r++){var i=n[r];e(i,r)&&t.push(i)}return t},vn=function(n,e,t){return function(n,e){for(var t=n.length-1;0<=t;t--){e(n[t],t)}}(n,function(n){t=e(t,n)}),t},yn=function(n,e,t){return pn(n,function(n){t=e(t,n)}),t},bn=function(n,e){return function(n,e,t){for(var r=0,o=n.length;r<o;r++){var i=n[r];if(e(i,r))return O.some(i);if(t(i,r))break}return O.none()}(n,e,s)},xn=function(n,e){for(var t=0,r=n.length;t<r;t++){if(e(n[t],t))return O.some(t)}return O.none()},wn=function(n){for(var e=[],t=0,r=n.length;t<r;++t){if(!on(n[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+n);ln.apply(e,n[t])}return e},Sn=function(n,e){return wn(gn(n,e))},On=function(n,e){for(var t=0,r=n.length;t<r;++t){if(!0!==e(n[t],t))return!1}return!0},Tn=function(n){var e=fn.call(n,0);return e.reverse(),e},kn=function(n,e){return hn(n,function(n){return!dn(e,n)})},En=function(n){return[n]},Cn=function(n,e){for(var t=0;t<n.length;t++){var r=e(n[t],t);if(r.isSome())return r}return O.none()},Mn=function(n,e){var t=String(e).toLowerCase();return bn(n,function(n){return n.search(t)})},_n=function(n,t){return Mn(n,t).map(function(n){var e=H.detect(n.versionRegexes,t);return{current:n.name,version:e}})},Dn=function(n,t){return Mn(n,t).map(function(n){var e=H.detect(n.versionRegexes,t);return{current:n.name,version:e}})},In=function(n,o){return n.replace(/\$\{([^{}]*)\}/g,function(n,e){var t,r=o[e];return"string"==(t=typeof r)||"number"==t?r.toString():n})},Fn=function(n,e){return-1!==n.indexOf(e)},Rn=(r=/^\s+|\s+$/g,function(n){return n.replace(r,"")}),Vn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Bn=function(e){return function(n){return Fn(n,e)}},An=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(n){return Fn(n,"edge/")&&Fn(n,"chrome")&&Fn(n,"safari")&&Fn(n,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Vn],search:function(n){return Fn(n,"chrome")&&!Fn(n,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(n){return Fn(n,"msie")||Fn(n,"trident")}},{name:"Opera",versionRegexes:[Vn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Bn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Bn("firefox")},{name:"Safari",versionRegexes:[Vn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(n){return(Fn(n,"safari")||Fn(n,"mobile/"))&&Fn(n,"applewebkit")}}],jn=[{name:"Windows",search:Bn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(n){return Fn(n,"iphone")||Fn(n,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Bn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Bn("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Bn("linux"),versionRegexes:[]},{name:"Solaris",search:Bn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Bn("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Bn("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Hn={browsers:y(An),oses:y(jn)},Nn=function(n,e){var t,r,o,i,u,c,a,f,s,l,d,m,g=Hn.browsers(),p=Hn.oses(),h=_n(g,n).fold(U.unknown,U.nu),v=Dn(p,n).fold(Z.unknown,Z.nu);return{browser:h,os:v,deviceType:(r=h,o=n,i=e,u=(t=v).isiOS()&&!0===/ipad/i.test(o),c=t.isiOS()&&!u,a=t.isiOS()||t.isAndroid(),f=a||i("(pointer:coarse)"),s=u||!c&&a&&i("(min-device-width:768px)"),l=c||a&&!s,d=r.isSafari()&&t.isiOS()&&!1===/safari/i.test(o),m=!l&&!s&&!d,{isiPad:y(u),isiPhone:y(c),isTablet:y(s),isPhone:y(l),isTouch:y(f),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:y(d),isDesktop:y(m)})}},Pn=function(n){return v.window.matchMedia(n).matches},zn=V(function(){return Nn(v.navigator.userAgent,Pn)}),Ln=function(){return zn()},Gn=y("touchstart"),$n=y("touchmove"),Un=y("touchend"),Wn=y("mousedown"),Xn=y("mousemove"),qn=y("mouseup"),Yn=y("mouseover"),Kn=y("keydown"),Jn=y("keyup"),Qn=y("input"),Zn=y("change"),ne=y("click"),ee=y("transitionend"),te=y("selectstart"),re={tap:y("alloy.tap")},oe=y("alloy.focus"),ie=y("alloy.blur.post"),ue=y("alloy.paste.post"),ce=y("alloy.receive"),ae=y("alloy.execute"),fe=y("alloy.focus.item"),se=re.tap,le=y("alloy.longpress"),de=y("alloy.system.init"),me=y("alloy.system.attached"),ge=y("alloy.system.detached"),pe=y("alloy.focusmanager.shifted"),he=y("alloy.highlight"),ve=y("alloy.dehighlight"),ye=function(n,e){Se(n,n.element(),e,{})},be=function(n,e,t){Se(n,n.element(),e,t)},xe=function(n){ye(n,ae())},we=function(n,e,t){Se(n,e,t,{})},Se=function(n,e,t,r){var o=x({target:e},r);n.getSystem().triggerEvent(t,e,C(o,y))},Oe=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:y(n)}},Te={fromHtml:function(n,e){var t=(e||v.document).createElement("div");if(t.innerHTML=n,!t.hasChildNodes()||1<t.childNodes.length)throw v.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return Oe(t.childNodes[0])},fromTag:function(n,e){var t=(e||v.document).createElement(n);return Oe(t)},fromText:function(n,e){var t=(e||v.document).createTextNode(n);return Oe(t)},fromDom:Oe,fromPoint:function(n,e,t){var r=n.dom();return O.from(r.elementFromPoint(e,t)).map(Oe)}},ke=("undefined"!=typeof v.window?v.window:Function("return this;")(),function(n){return n.dom().nodeName.toLowerCase()}),Ee=function(e){return function(n){return n.dom().nodeType===e}},Ce=Ee(1),Me=Ee(3),_e=function(n){var e=Me(n)?n.dom().parentNode:n.dom();return e!==undefined&&null!==e&&e.ownerDocument.body.contains(e)},De=function(){return Ie(Te.fromDom(v.document))},Ie=function(n){var e=n.dom().body;if(null===e||e===undefined)throw new Error("Body is not available yet");return Te.fromDom(e)},Fe=function(n,e){var t=n.dom();if(1!==t.nodeType)return!1;var r=t;if(r.matches!==undefined)return r.matches(e);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(e);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(e);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},Re=function(n){return 1!==n.nodeType&&9!==n.nodeType||0===n.childElementCount},Ve=function(n,e){var t=e===undefined?v.document:e.dom();return Re(t)?[]:gn(t.querySelectorAll(n),Te.fromDom)},Be=function(n,e){var t=e===undefined?v.document:e.dom();return Re(t)?O.none():O.from(t.querySelector(n)).map(Te.fromDom)},Ae=function(n,e){return n.dom()===e.dom()},je=function(n){return Te.fromDom(n.dom().ownerDocument)},He=function(n){return O.from(n.dom().parentNode).map(Te.fromDom)},Ne=function(n){return gn(n.dom().childNodes,Te.fromDom)},Pe=function(n,e){var t=n.dom().childNodes;return O.from(t[e]).map(Te.fromDom)},ze=function(e,t){He(e).each(function(n){n.dom().insertBefore(t.dom(),e.dom())})},Le=function(n,e){var t;(t=n,O.from(t.dom().nextSibling).map(Te.fromDom)).fold(function(){He(n).each(function(n){$e(n,e)})},function(n){ze(n,e)})},Ge=function(e,t){Pe(e,0).fold(function(){$e(e,t)},function(n){e.dom().insertBefore(t.dom(),n.dom())})},$e=function(n,e){n.dom().appendChild(e.dom())},Ue=function(e,n){pn(n,function(n){$e(e,n)})},We=function(n){n.dom().textContent="",pn(Ne(n),function(n){Xe(n)})},Xe=function(n){var e=n.dom();null!==e.parentNode&&e.parentNode.removeChild(e)},qe=function(n){ye(n,ge());var e=n.components();pn(e,qe)},Ye=function(n){var e=n.components();pn(e,Ye),ye(n,me())},Ke=function(n,e){$e(n.element(),e.element())},Je=function(e,n){var t,r=e.components();pn((t=e).components(),function(n){return Xe(n.element())}),We(t.element()),t.syncComponents();var o=kn(r,n);pn(o,function(n){qe(n),e.getSystem().removeFromWorld(n)}),pn(n,function(n){n.getSystem().isConnected()?Ke(e,n):(e.getSystem().addToWorld(n),Ke(e,n),_e(e.element())&&Ye(n)),e.syncComponents()})},Qe=function(n,e,t){n.getSystem().addToWorld(e),t(n.element(),e.element()),_e(n.element())&&Ye(e),n.syncComponents()},Ze=function(e){var n,t=He(e.element()).bind(function(n){return e.getSystem().getByDom(n).toOption()});qe(n=e),Xe(n.element()),n.getSystem().removeFromWorld(n),t.each(function(n){n.syncComponents()})},nt=function(n,e,t){t(n,e.element());var r=Ne(e.element());pn(r,function(n){e.getByDom(n).each(Ye)})},et=function(t){return{is:function(n){return t===n},isValue:l,isError:s,getOr:y(t),getOrThunk:y(t),getOrDie:y(t),or:function(n){return et(t)},orThunk:function(n){return et(t)},fold:function(n,e){return e(t)},map:function(n){return et(n(t))},mapError:function(n){return et(t)},each:function(n){n(t)},bind:function(n){return n(t)},exists:function(n){return n(t)},forall:function(n){return n(t)},toOption:function(){return O.some(t)}}},tt=function(t){return{is:s,isValue:s,isError:l,getOr:b,getOrThunk:function(n){return n()},getOrDie:function(){return a(String(t))()},or:function(n){return n},orThunk:function(n){return n()},fold:function(n,e){return n(t)},map:function(n){return tt(t)},mapError:function(n){return tt(n(t))},each:w,bind:function(n){return tt(t)},exists:s,forall:l,toOption:O.none}},rt={value:et,error:tt,fromOption:function(n,e){return n.fold(function(){return tt(e)},et)}},ot=function(u){if(!on(u))throw new Error("cases must be an array");if(0===u.length)throw new Error("there must be at least one case");var c=[],t={};return pn(u,function(n,r){var e=T(n);if(1!==e.length)throw new Error("one and only one name per case");var o=e[0],i=n[o];if(t[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!on(i))throw new Error("case arguments must be an array");c.push(o),t[o]=function(){var n=arguments.length;if(n!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+n);for(var t=new Array(n),e=0;e<t.length;e++)t[e]=arguments[e];return{fold:function(){if(arguments.length!==u.length)throw new Error("Wrong number of arguments to fold. Expected "+u.length+", got "+arguments.length);return arguments[r].apply(null,t)},match:function(n){var e=T(n);if(c.length!==e.length)throw new Error("Wrong number of arguments to match. Expected: "+c.join(",")+"\nActual: "+e.join(","));if(!On(c,function(n){return dn(e,n)}))throw new Error("Not all branches were specified when using match. Specified: "+e.join(", ")+"\nRequired: "+c.join(", "));return n[o].apply(null,t)},log:function(n){v.console.log(n,{constructors:c,constructor:o,params:t})}}}}),t},it=Object.prototype.hasOwnProperty,ut=function(u){return function(){for(var n=new Array(arguments.length),e=0;e<n.length;e++)n[e]=arguments[e];if(0===n.length)throw new Error("Can't merge zero objects");for(var t={},r=0;r<n.length;r++){var o=n[r];for(var i in o)it.call(o,i)&&(t[i]=u(t[i],o[i]))}return t}},ct=ut(function(n,e){return rn(n)&&rn(e)?ct(n,e):e}),at=ut(function(n,e){return e});(i=o=o||{})[i.Error=0]="Error",i[i.Value=1]="Value";var ft,st,lt,dt=function(n,e,t){return n.stype===o.Error?e(n.serror):t(n.svalue)},mt=function(n){return{stype:o.Value,svalue:n}},gt=function(n){return{stype:o.Error,serror:n}},pt=function(n){return n.fold(gt,mt)},ht=function(n){return dt(n,rt.error,rt.value)},vt=mt,yt=function(n){var e=[],t=[];return pn(n,function(n){dt(n,function(n){return t.push(n)},function(n){return e.push(n)})}),{values:e,errors:t}},bt=gt,xt=function(n,e){return n.stype===o.Value?e(n.svalue):n},wt=function(n,e){return n.stype===o.Error?e(n.serror):n},St=function(n,e){return n.stype===o.Value?{stype:o.Value,svalue:e(n.svalue)}:n},Ot=function(n,e){return n.stype===o.Error?{stype:o.Error,serror:e(n.serror)}:n},Tt=ot([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),kt=function(n){return Tt.defaultedThunk(y(n))},Et=Tt.strict,Ct=Tt.asOption,Mt=Tt.defaultedThunk,_t=(Tt.asDefaultedOptionThunk,Tt.mergeWithThunk),Dt=function(n,e){var t;return(t={})[n]=e,t},It=(ot([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(n,e){return t=e,r={},E(n,function(n,e){dn(t,e)||(r[e]=n)}),r;var t,r}),Ft=function(n,e){return Dt(n,e)},Rt=function(n){return e={},pn(n,function(n){e[n.key]=n.value}),e;var e},Vt=function(n,e){var t,r,o,i,u,c=(t=[],r=[],pn(n,function(n){n.fold(function(n){t.push(n)},function(n){r.push(n)})}),{errors:t,values:r});return 0<c.errors.length?(u=c.errors,rt.error(wn(u))):(i=e,0===(o=c.values).length?rt.value(i):rt.value(ct(i,at.apply(undefined,o))))},Bt=function(n){return d(bt,wn)(n)},At=function(n,e){var t,r,o=yt(n);return 0<o.errors.length?Bt(o.errors):(t=o.values,r=e,0<t.length?vt(ct(r,at.apply(undefined,t))):vt(r))},jt=function(n){var e=yt(n);return 0<e.errors.length?Bt(e.errors):vt(e.values)},Ht=function(n){return rn(n)&&100<T(n).length?" removed due to size":JSON.stringify(n,null,2)},Nt=function(n,e){return bt([{path:n,getErrorInfo:e}])},Pt=ot([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),zt=function(t,r,o){return I(r,o).fold(function(){return n=o,e=r,Nt(t,function(){return'Could not find valid *strict* value for "'+n+'" in '+Ht(e)});var n,e},vt)},Lt=function(n,e,t){var r=I(n,e).fold(function(){return t(n)},b);return vt(r)},Gt=function(c,a,n,f){return n.fold(function(o,t,n,r){var i=function(n){var e=r.extract(c.concat([o]),f,n);return St(e,function(n){return Dt(t,f(n))})},u=function(n){return n.fold(function(){var n=Dt(t,f(O.none()));return vt(n)},function(n){var e=r.extract(c.concat([o]),f,n);return St(e,function(n){return Dt(t,f(O.some(n)))})})};return n.fold(function(){return xt(zt(c,a,o),i)},function(n){return xt(Lt(a,o,n),i)},function(){return xt(vt(I(a,o)),u)},function(n){return xt((t=n,r=I(e=a,o).map(function(n){return!0===n?t(e):n}),vt(r)),u);var e,t,r},function(n){var e=n(a),t=St(Lt(a,o,y({})),function(n){return ct(e,n)});return xt(t,i)})},function(n,e){var t=e(a);return vt(Dt(n,f(t)))})},$t=function(r){return{extract:function(t,n,e){return wt(r(e,n),function(n){return e=n,Nt(t,function(){return e});var e})},toString:function(){return"val"}}},Ut=function(n){var u=Wt(n),c=vn(n,function(e,n){return n.fold(function(n){return ct(e,Ft(n,!0))},y(e))},{});return{extract:function(n,e,t){var r,o=un(t)?[]:T(_(t,function(n){return n!==undefined&&null!==n})),i=hn(o,function(n){return!R(c,n)});return 0===i.length?u.extract(n,e,t):(r=i,Nt(n,function(){return"There are unsupported fields: ["+r.join(", ")+"] specified"}))},toString:u.toString}},Wt=function(c){return{extract:function(n,e,t){return r=n,o=t,i=e,u=gn(c,function(n){return Gt(r,o,n,i)}),At(u,{});var r,o,i,u},toString:function(){return"obj{\n"+gn(c,function(n){return n.fold(function(n,e,t,r){return n+" -> "+r.toString()},function(n,e){return"state("+n+")"})}).join("\n")+"}"}}},Xt=function(t,i){var u=function(n,e){return o=$t(t),function(t,r,n){var e=gn(n,function(n,e){return o.extract(t.concat(["["+e+"]"]),r,n)});return jt(e)}(n,b,e);var o};return{extract:function(t,r,o){var n=T(o),e=u(t,n);return xt(e,function(n){var e=gn(n,function(n){return Pt.field(n,n,Et(),i)});return Wt(e).extract(t,r,o)})},toString:function(){return"setOf("+i.toString()+")"}}},qt=y($t(vt)),Yt=Pt.state,Kt=Pt.field,Jt=function(t,e,r,o,i){return I(o,i).fold(function(){return n=o,e=i,Nt(t,function(){return'The chosen schema: "'+e+'" did not exist in branches: '+Ht(n)});var n,e},function(n){return n.extract(t.concat(["branch: "+i]),e,r)})},Qt=function(o,i){return{extract:function(e,t,r){return I(r,o).fold(function(){return n=o,Nt(e,function(){return'Choice schema did not contain choice key: "'+n+'"'});var n},function(n){return Jt(e,t,r,i,n)})},toString:function(){return"chooseOn("+o+"). Possible values: "+T(i)}}},Zt=$t(vt),nr=function(e){return $t(function(n){return e(n).fold(bt,vt)})},er=function(e,n){return Xt(function(n){return pt(e(n))},n)},tr=function(n,e,t){return ht((r=n,o=b,i=t,u=e.extract([r],o,i),Ot(u,function(n){return{input:i,errors:n}})));var r,o,i,u},rr=function(n){return n.fold(function(n){throw new Error(ir(n))},b)},or=function(n,e,t){return rr(tr(n,e,t))},ir=function(n){return"Errors: \n"+(e=n.errors,t=10<e.length?e.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):e,gn(t,function(n){return"Failed path: ("+n.path.join(" > ")+")\n"+n.getErrorInfo()}).join("\n"))+"\n\nInput object: "+Ht(n.input);var e,t},ur=function(n,e){return Qt(n,C(e,Wt))},cr=y(Zt),ar=(ft=cn,st="function",$t(function(n){var e=typeof n;return ft(n)?vt(n):bt("Expected type: "+st+" but got: "+e)})),fr=function(n){return Kt(n,n,Et(),qt())},sr=function(n,e){return Kt(n,n,Et(),e)},lr=function(n,e){return Kt(n,n,Et(),Wt(e))},dr=function(n){return Kt(n,n,Ct(),qt())},mr=function(n,e){return Kt(n,n,Ct(),e)},gr=function(n,e){return mr(n,Wt(e))},pr=function(n,e){return mr(n,Ut(e))},hr=function(n,e){return Kt(n,n,kt(e),qt())},vr=function(n,e,t){return Kt(n,n,kt(e),t)},yr=function(n,e){return Yt(n,e)},br=function(n){return cn(n)?n:y(!1)},xr=function(n,e,t){var r=e(n),o=br(t);return r.orThunk(function(){return o(n)?O.none():function(n,e,t){for(var r=n.dom(),o=br(t);r.parentNode;){r=r.parentNode;var i=Te.fromDom(r),u=e(i);if(u.isSome())return u;if(o(i))break}return O.none()}(n,e,o)})},wr=function(n,e){return Ae(n.element(),e.event().target())},Sr=function(n){if(!R(n,"can")&&!R(n,"abort")&&!R(n,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(n,null,2)+" does not have can, abort, or run!");return or("Extracting event.handler",Ut([hr("can",y(!0)),hr("abort",y(!1)),hr("run",w)]),n)},Or=function(t){var e,r,o,i,n=(r=function(n){return n.can},function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return yn(e,function(n,e){return n&&r(e).apply(undefined,t)},!0)}),u=(o=e=t,i=function(n){return n.abort},function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return yn(o,function(n,e){return n||i(e).apply(undefined,t)},!1)});return Sr({can:n,abort:u,run:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];pn(t,function(n){n.run.apply(undefined,e)})}})},Tr=function(n){return Rt(n)},kr=function(n,e){return{key:n,value:Sr({abort:e})}},Er=function(n,e){return{key:n,value:Sr({run:e})}},Cr=function(n,t,r){return{key:n,value:Sr({run:function(n,e){t.apply(undefined,[n,e].concat(r))}})}},Mr=function(n){return function(t){return{key:n,value:Sr({run:function(n,e){wr(n,e)&&t(n,e)}})}}},_r=function(u,e){return Er(u,function(n,i){n.getSystem().getByUid(e).each(function(n){var e,t,r,o;t=(e=n).element(),r=u,o=i,e.getSystem().triggerEvent(r,t,o.event())})})},Dr=function(n,e,t){var r=e.partUids[t];return _r(n,r)},Ir=function(n){return Er(n,function(n,e){e.cut()})},Fr=Mr(me()),Rr=Mr(ge()),Vr=Mr(de()),Br=(lt=ae(),function(n){return Er(lt,n)}),Ar=function(n){return gn(n,function(n){return r=e="/*",o=(t=n).length-e.length,""===r||t.length>=r.length&&t.substr(o,o+r.length)===r?n.substring(0,n.length-"/*".length):n;var e,t,r,o})},jr=function(n,e){var t=n.toString(),r=t.indexOf(")")+1,o=t.indexOf("("),i=t.substring(o+1,r-1).split(/,\s*/);return n.toFunctionAnnotation=function(){return{name:e,parameters:Ar(i)}},n},Hr=function(n){return{classes:n.classes!==undefined?n.classes:[],attributes:n.attributes!==undefined?n.attributes:{},styles:n.styles!==undefined?n.styles:{}}},Nr=function(t,r,o){return Vr(function(n,e){o(n,t,r)})},Pr=function(o,i,u){var n,e,t,r,c,a;return n=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var r=[t].concat(n);return t.config({name:y(o)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+o+". Using API: "+u)},function(n){var e=Array.prototype.slice.call(r,1);return i.apply(undefined,[t,n.config,n.state].concat(e))})},e=u,t=i.toString(),r=t.indexOf(")")+1,c=t.indexOf("("),a=t.substring(c+1,r-1).split(/,\s*/),n.toFunctionAnnotation=function(){return{name:e,parameters:Ar(a.slice(0,1).concat(a.slice(3)))}},n},zr=function(n){return{key:n,value:undefined}},Lr=function(t,n,r,o,e,i,u){var c=function(n){return R(n,r)?n[r]():O.none()},a=C(e,function(n,e){return Pr(r,n,e)}),f=C(i,function(n,e){return jr(n,e)}),s=x(x(x({},f),a),{revoke:S(zr,r),config:function(n){var e=or(r+"-config",t,n);return{key:r,value:{config:e,me:s,configAsRaw:V(function(){return or(r+"-config",t,n)}),initialConfig:n,state:u}}},schema:function(){return n},exhibit:function(n,t){return c(n).bind(function(e){return I(o,"exhibit").map(function(n){return n(t,e.config,e.state)})}).getOr(Hr({}))},name:function(){return r},handlers:function(n){return c(n).map(function(n){return I(o,"events").getOr(function(){return{}})(n.config,n.state)}).getOr({})}});return s},Gr={init:function(){return $r({readState:function(){return"No State required"}})}},$r=function(n){return n},Ur=function(n){return Rt(n)},Wr=Ut([fr("fields"),fr("name"),hr("active",{}),hr("apis",{}),hr("state",Gr),hr("extra",{})]),Xr=function(n){var e,t,r,o,i,u,c,a,f=or("Creating behaviour: "+n.name,Wr,n);return e=f.fields,t=f.name,r=f.active,o=f.apis,i=f.extra,u=f.state,c=Ut(e),a=gr(t,[pr("config",e)]),Lr(c,a,t,r,o,i,u)},qr=Ut([fr("branchKey"),fr("branches"),fr("name"),hr("active",{}),hr("apis",{}),hr("state",Gr),hr("extra",{})]),Yr=y(undefined),Kr=function(n,e,t){if(!(tn(t)||un(t)||an(t)))throw v.console.error("Invalid call to Attr.set. Key ",e,":: Value ",t,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(e,t+"")},Jr=function(n,e,t){Kr(n.dom(),e,t)},Qr=function(n,e){var t=n.dom();E(e,function(n,e){Kr(t,e,n)})},Zr=function(n,e){var t=n.dom().getAttribute(e);return null===t?undefined:t},no=function(n,e){return O.from(Zr(n,e))},eo=function(n,e){var t=n.dom();return!(!t||!t.hasAttribute)&&t.hasAttribute(e)},to=function(n,e){n.dom().removeAttribute(e)},ro=function(n,e){var t=Zr(n,e);return t===undefined||""===t?[]:t.split(" ")},oo=function(n){return n.dom().classList!==undefined},io=function(n,e){return o=e,i=ro(t=n,r="class").concat([o]),Jr(t,r,i.join(" ")),!0;var t,r,o,i},uo=function(n,e){return o=e,0<(i=hn(ro(t=n,r="class"),function(n){return n!==o})).length?Jr(t,r,i.join(" ")):to(t,r),!1;var t,r,o,i},co=function(n,e){oo(n)?n.dom().classList.add(e):io(n,e)},ao=function(n){0===(oo(n)?n.dom().classList:ro(n,"class")).length&&to(n,"class")},fo=function(n,e){oo(n)?n.dom().classList.remove(e):uo(n,e);ao(n)},so=function(n,e){return oo(n)&&n.dom().classList.contains(e)},lo=function(n,e,t){fo(n,t),co(n,e)},mo=/* */Object.freeze({__proto__:null,toAlpha:function(n,e,t){lo(n.element(),e.alpha,e.omega)},toOmega:function(n,e,t){lo(n.element(),e.omega,e.alpha)},isAlpha:function(n,e,t){return so(n.element(),e.alpha)},isOmega:function(n,e,t){return so(n.element(),e.omega)},clear:function(n,e,t){fo(n.element(),e.alpha),fo(n.element(),e.omega)}}),go=[fr("alpha"),fr("omega")],po=Xr({fields:go,name:"swapping",apis:mo}),ho=function(n){var e=n;return{get:function(){return e},set:function(n){e=n}}};function vo(n,e,t,r,o){return n(t,r)?O.some(t):cn(o)&&o(t)?O.none():e(t,r,o)}var yo,bo,xo=function(n,e,t){for(var r=n.dom(),o=cn(t)?t:y(!1);r.parentNode;){r=r.parentNode;var i=Te.fromDom(r);if(e(i))return O.some(i);if(o(i))break}return O.none()},wo=function(n){return n.dom().focus()},So=function(n){return n.dom().blur()},Oo=function(n){var e=n!==undefined?n.dom():v.document;return O.from(e.activeElement).map(Te.fromDom)},To=function(e){return Oo(je(e)).filter(function(n){return e.dom().contains(n.dom())})},ko=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Eo=tinymce.util.Tools.resolve("tinymce.ThemeManager"),Co="formatChanged",Mo="orientationChanged",_o="dropupDismissed",Do=function(n){return n.dom().innerHTML},Io=function(n,e){var t,r,o=je(n).dom(),i=Te.fromDom(o.createDocumentFragment()),u=(t=e,(r=(o||v.document).createElement("div")).innerHTML=t,Ne(Te.fromDom(r)));Ue(i,u),We(n),$e(n,i)},Fo=function(n){return e=n,t=!1,Te.fromDom(e.dom().cloneNode(t));var e,t},Ro=function(n){var e,t,r,o=Fo(n);return e=o,t=Te.fromTag("div"),r=Te.fromDom(e.dom().cloneNode(!0)),$e(t,r),Do(t)},Vo=function(n){return Ro(n)},Bo=/* */Object.freeze({__proto__:null,events:function(a){return Tr([Er(ce(),function(o,n){var e,t,i=a.channels,r=T(i),u=n,c=(e=r,(t=u).universal()?e:hn(e,function(n){return dn(t.channels(),n)}));pn(c,function(n){var e=i[n],t=e.schema,r=or("channel["+n+"] data\nReceiver: "+Vo(o.element()),t,u.data());e.onReceive(o,r)})})])}}),Ao="unknown";(bo=yo=yo||{})[bo.STOP=0]="STOP",bo[bo.NORMAL=1]="NORMAL",bo[bo.LOGGING=2]="LOGGING";var jo,Ho=ho({}),No=function(e,n,t){var r,o,i,u;switch(I(Ho.get(),e).orThunk(function(){var n=T(Ho.get());return Cn(n,function(n){return-1<e.indexOf(n)?O.some(Ho.get()[n]):O.none()})}).getOr(yo.NORMAL)){case yo.NORMAL:return t(Lo());case yo.LOGGING:var c=(r=e,o=n,i=[],u=(new Date).getTime(),{logEventCut:function(n,e,t){i.push({outcome:"cut",target:e,purpose:t})},logEventStopped:function(n,e,t){i.push({outcome:"stopped",target:e,purpose:t})},logNoParent:function(n,e,t){i.push({outcome:"no-parent",target:e,purpose:t})},logEventNoHandlers:function(n,e){i.push({outcome:"no-handlers-left",target:e})},logEventResponse:function(n,e,t){i.push({outcome:"response",purpose:t,target:e})},write:function(){var n=(new Date).getTime();dn(["mousemove","mouseover","mouseout",de()],r)||v.console.log(r,{event:r,time:n-u,target:o.dom(),sequence:gn(i,function(n){return dn(["cut","stopped","response"],n.outcome)?"{"+n.purpose+"} "+n.outcome+" at ("+Vo(n.target)+")":n.outcome})})}}),a=t(c);return c.write(),a;case yo.STOP:return!0}},Po=["alloy/data/Fields","alloy/debugging/Debugging"],zo=function(n,e,t){return No(n,e,t)},Lo=y({logEventCut:w,logEventStopped:w,logNoParent:w,logEventNoHandlers:w,logEventResponse:w,write:w}),Go=y([fr("menu"),fr("selectedMenu")]),$o=y([fr("item"),fr("selectedItem")]),Uo=(y(Wt($o().concat(Go()))),y(Wt($o()))),Wo=lr("initSize",[fr("numColumns"),fr("numRows")]),Xo=function(n,e,t){!function(){var n=new Error;if(n.stack===undefined)return;var e=n.stack.split("\n");bn(e,function(e){return 0<e.indexOf("alloy")&&!mn(Po,function(n){return-1<e.indexOf(n)})}).getOr(Ao)}();return Kt(e,e,t,nr(function(t){return rt.value(function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t.apply(undefined,n)})}))},qo=function(n){return Xo(0,n,kt(w))},Yo=function(n){return Xo(0,n,kt(O.none))},Ko=function(n){return Xo(0,n,Et())},Jo=function(n){return Xo(0,n,Et())},Qo=function(n,e){return yr(n,y(e))},Zo=function(n){return yr(n,b)},ni=y(Wo),ei=[sr("channels",er(rt.value,Ut([Ko("onReceive"),hr("schema",cr())])))],ti=Xr({fields:ei,name:"receiving",active:Bo}),ri=function(n,e,t){var r=e.aria;r.update(n,r,t.get())},oi=function(e,n,t){n.toggleClass.each(function(n){(t.get()?co:fo)(e.element(),n)})},ii=function(n,e,t){ai(n,e,t,!t.get())},ui=function(n,e,t){t.set(!0),oi(n,e,t),ri(n,e,t)},ci=function(n,e,t){t.set(!1),oi(n,e,t),ri(n,e,t)},ai=function(n,e,t,r){(r?ui:ci)(n,e,t)},fi=function(n,e,t){ai(n,e,t,e.selected)},si=/* */Object.freeze({__proto__:null,onLoad:fi,toggle:ii,isOn:function(n,e,t){return t.get()},on:ui,off:ci,set:ai}),li=/* */Object.freeze({__proto__:null,exhibit:function(){return Hr({})},events:function(n,e){var t,r,o,i=(t=n,r=e,o=ii,Br(function(n){o(n,t,r)})),u=Nr(n,e,fi);return Tr(wn([n.toggleOnExecute?[i]:[],[u]]))}}),di=function(n,e,t){Jr(n.element(),"aria-expanded",t)},mi=[hr("selected",!1),dr("toggleClass"),hr("toggleOnExecute",!0),vr("aria",{mode:"none"},ur("mode",{pressed:[hr("syncWithExpanded",!1),Qo("update",function(n,e,t){Jr(n.element(),"aria-pressed",t),e.syncWithExpanded&&di(n,e,t)})],checked:[Qo("update",function(n,e,t){Jr(n.element(),"aria-checked",t)})],expanded:[Qo("update",di)],selected:[Qo("update",function(n,e,t){Jr(n.element(),"aria-selected",t)})],none:[Qo("update",w)]}))],gi=Xr({fields:mi,name:"toggling",active:li,apis:si,state:(jo=!1,{init:function(){var e=ho(jo);return{get:function(){return e.get()},set:function(n){return e.set(n)},clear:function(){return e.set(jo)},readState:function(){return e.get()}}}})}),pi=function(t,r){return ti.config({channels:Ft(Co,{onReceive:function(n,e){e.command===t&&r(n,e.state)}})})},hi=function(n){return ti.config({channels:Ft(Mo,{onReceive:n})})},vi=function(n,e){return{key:n,value:{onReceive:e}}},yi="tinymce-mobile",bi=function(n){return yi+"-"+n},xi=function(){var n=function(n,e){e.stop(),xe(n)};return[Er(ne(),n),Er(se(),n),Ir(Gn()),Ir(Wn())]},wi=function(n,e){e.ignore||(wo(n.element()),e.onFocus(n))},Si=/* */Object.freeze({__proto__:null,focus:wi,blur:function(n,e){e.ignore||So(n.element())},isFocused:function(n){return e=n.element(),t=je(e).dom(),e.dom()===t.activeElement;var e,t}}),Oi=/* */Object.freeze({__proto__:null,exhibit:function(n,e){var t=e.ignore?{}:{attributes:{tabindex:"-1"}};return Hr(t)},events:function(t){return Tr([Er(oe(),function(n,e){wi(n,t),e.stop()})].concat(t.stopMousedown?[Er(Wn(),function(n,e){e.event().prevent()})]:[]))}}),Ti=[qo("onFocus"),hr("stopMousedown",!1),hr("ignore",!1)],ki=Xr({fields:Ti,name:"focusing",active:Oi,apis:Si}),Ei=function(n){return n.style!==undefined&&cn(n.style.getPropertyValue)},Ci=function(n,e,t){if(!tn(t))throw v.console.error("Invalid call to CSS.set. Property ",e,":: Value ",t,":: Element ",n),new Error("CSS value must be a string: "+t);Ei(n)&&n.style.setProperty(e,t)},Mi=function(n,e,t){var r=n.dom();Ci(r,e,t)},_i=function(n,e){var t=n.dom();E(e,function(n,e){Ci(t,e,n)})},Di=function(n,e){var t=n.dom(),r=v.window.getComputedStyle(t).getPropertyValue(e);return""!==r||_e(n)?r:Ii(t,e)},Ii=function(n,e){return Ei(n)?n.style.getPropertyValue(e):""},Fi=function(n,e){var t=n.dom(),r=Ii(t,e);return O.from(r).filter(function(n){return 0<n.length})},Ri=function(n,e){var t,r,o=n.dom();r=e,Ei(t=o)&&t.style.removeProperty(r),no(n,"style").map(Rn).is("")&&to(n,"style")},Vi=function(n){return n.dom().offsetWidth};function Bi(r,o){var n=function(n){var e=o(n);if(e<=0||null===e){var t=Di(n,r);return parseFloat(t)||0}return e},i=function(o,n){return yn(n,function(n,e){var t=Di(o,e),r=t===undefined?0:parseInt(t,10);return isNaN(r)?n:n+r},0)};return{set:function(n,e){if(!an(e)&&!e.match(/^[0-9]+$/))throw new Error(r+".set accepts only positive integer values. Value was "+e);var t=n.dom();Ei(t)&&(t.style[r]=e+"px")},get:n,getOuter:n,aggregate:i,max:function(n,e,t){var r=i(n,t);return r<e?e-r:0}}}var Ai,ji,Hi=Bi("height",function(n){var e=n.dom();return _e(n)?e.getBoundingClientRect().height:e.offsetHeight}),Ni=function(n){return Hi.get(n)},Pi=function(n,e,t){return hn(function(n,e){for(var t=cn(e)?e:s,r=n.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,u=Te.fromDom(i);if(o.push(u),!0===t(u))break;r=i}return o}(n,t),e)},zi=function(n,e){return hn(He(t=n).map(Ne).map(function(n){return hn(n,function(n){return!Ae(t,n)})}).getOr([]),e);var t},Li=function(n,e){return Ve(e,n)},Gi=function(n){return Be(n)},$i=function(n,e,t){return xo(n,function(n){return Fe(n,e)},t)},Ui=function(n,e){return Be(e,n)},Wi=function(n,e,t){return vo(function(n,e){return Fe(n,e)},$i,n,e,t)},Xi=function(){return[13]},qi=function(){return[27]},Yi=function(){return[32]},Ki=function(){return[37]},Ji=function(){return[38]},Qi=function(){return[39]},Zi=function(){return[40]},nu=function(n,e,t){var r=Tn(n.slice(0,e)),o=Tn(n.slice(e+1));return bn(r.concat(o),t)},eu=function(n,e,t){var r=Tn(n.slice(0,e));return bn(r,t)},tu=function(n,e,t){var r=n.slice(0,e),o=n.slice(e+1);return bn(o.concat(r),t)},ru=function(n,e,t){var r=n.slice(e+1);return bn(r,t)},ou=function(t){return function(n){var e=n.raw();return dn(t,e.which)}},iu=function(n){return function(e){return On(n,function(n){return n(e)})}},uu=function(n){return!0===n.raw().shiftKey},cu=function(n){return!0===n.raw().ctrlKey},au=m(uu),fu=function(n,e){return{matches:n,classification:e}},su=function(n){for(var e=[],t=function(n){e.push(n)},r=0;r<n.length;r++)n[r].each(t);return e},lu=function(n,e,t,r){var o=n+e;return r<o?t:o<t?r:o},du=function(n,e,t){return Math.min(Math.max(n,e),t)},mu=function(t,r,n,o){var e=Li(t.element(),"."+r.highlightClass);pn(e,function(e){mn(o,function(n){return n.element()===e})||(fo(e,r.highlightClass),t.getSystem().getByDom(e).each(function(n){r.onDehighlight(t,n),ye(n,ve())}))})},gu=function(n,e,t,r){mu(n,e,0,[r]),pu(n,e,t,r)||(co(r.element(),e.highlightClass),e.onHighlight(n,r),ye(r,he()))},pu=function(n,e,t,r){return so(r.element(),e.highlightClass)},hu=function(n,e,t,r){var o=Li(n.element(),"."+e.itemClass);return O.from(o[r]).fold(function(){return rt.error("No element found with index "+r)},n.getSystem().getByDom)},vu=function(e,n,t){return Ui(e.element(),"."+n.itemClass).bind(function(n){return e.getSystem().getByDom(n).toOption()})},yu=function(e,n,t){var r=Li(e.element(),"."+n.itemClass);return(0<r.length?O.some(r[r.length-1]):O.none()).bind(function(n){return e.getSystem().getByDom(n).toOption()})},bu=function(t,e,n,r){var o=Li(t.element(),"."+e.itemClass);return xn(o,function(n){return so(n,e.highlightClass)}).bind(function(n){var e=lu(n,r,0,o.length-1);return t.getSystem().getByDom(o[e]).toOption()})},xu=function(e,n,t){var r=Li(e.element(),"."+n.itemClass);return su(gn(r,function(n){return e.getSystem().getByDom(n).toOption()}))},wu=/* */Object.freeze({__proto__:null,dehighlightAll:function(n,e,t){return mu(n,e,0,[])},dehighlight:function(n,e,t,r){pu(n,e,t,r)&&(fo(r.element(),e.highlightClass),e.onDehighlight(n,r),ye(r,ve()))},highlight:gu,highlightFirst:function(e,t,r){vu(e,t).each(function(n){gu(e,t,r,n)})},highlightLast:function(e,t,r){yu(e,t).each(function(n){gu(e,t,r,n)})},highlightAt:function(e,t,r,n){hu(e,t,r,n).fold(function(n){throw new Error(n)},function(n){gu(e,t,r,n)})},highlightBy:function(e,t,r,n){var o=xu(e,t);bn(o,n).each(function(n){gu(e,t,r,n)})},isHighlighted:pu,getHighlighted:function(e,n,t){return Ui(e.element(),"."+n.highlightClass).bind(function(n){return e.getSystem().getByDom(n).toOption()})},getFirst:vu,getLast:yu,getPrevious:function(n,e,t){return bu(n,e,0,-1)},getNext:function(n,e,t){return bu(n,e,0,1)},getCandidates:xu}),Su=[fr("highlightClass"),fr("itemClass"),qo("onHighlight"),qo("onDehighlight")],Ou=Xr({fields:Su,name:"highlighting",apis:wu}),Tu=function(n,e,t){e.exists(function(e){return t.exists(function(n){return Ae(n,e)})})||be(n,pe(),{prevFocus:e,newFocus:t})},ku=function(){var o=function(n){return To(n.element())};return{get:o,set:function(n,e){var t=o(n);n.getSystem().triggerFocus(e,n.element());var r=o(n);Tu(n,t,r)}}};(ji=Ai=Ai||{}).OnFocusMode="onFocus",ji.OnEnterOrSpaceMode="onEnterOrSpace",ji.OnApiMode="onApi";var Eu,Cu,Mu,_u,Du,Iu,Fu,Ru,Vu,Bu,Au=function(n,e,t,r,c){var a=function(e,t,n,r,o){var i,u,c=n(e,t,r,o);return i=c,u=t.event(),bn(i,function(n){return n.matches(u)}).map(function(n){return n.classification}).bind(function(n){return n(e,t,r,o)})},o={schema:function(){return n.concat([hr("focusManager",ku()),vr("focusInside","onFocus",nr(function(n){return dn(["onFocus","onEnterOrSpace","onApi"],n)?rt.value(n):rt.error("Invalid value for focusInside")})),Qo("handler",o),Qo("state",e),Qo("sendFocusIn",c)])},processKey:a,toEvents:function(i,u){var n=i.focusInside!==Ai.OnFocusMode?O.none():c(i).map(function(t){return Er(oe(),function(n,e){t(n,i,u),e.stop()})}),e=[Er(Kn(),function(r,o){a(r,o,t,i,u).fold(function(){var e,t,n;e=r,t=o,n=ou(Yi().concat(Xi()))(t.event()),i.focusInside===Ai.OnEnterOrSpaceMode&&n&&wr(e,t)&&c(i).each(function(n){n(e,i,u),t.stop()})},function(n){o.stop()})}),Er(Jn(),function(n,e){a(n,e,r,i,u).each(function(n){e.stop()})})];return Tr(n.toArray().concat(e))}};return o},ju=function(n){var e=[dr("onEscape"),dr("onEnter"),hr("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),hr("firstTabstop",0),hr("useTabstopAt",y(!0)),dr("visibilitySelector")].concat([n]),u=function(n,e){var t=n.visibilitySelector.bind(function(n){return Wi(e,n)}).getOr(e);return 0<Ni(t)},t=function(e,t,n){var r,o,i;r=t,o=Li(e.element(),r.selector),i=hn(o,function(n){return u(r,n)}),O.from(i[r.firstTabstop]).each(function(n){t.focusManager.set(e,n)})},c=function(e,n,t,r,o){return o(n,t,function(n){return u(e=r,t=n)&&e.useTabstopAt(t);var e,t}).fold(function(){return r.cyclic?O.some(!0):O.none()},function(n){return r.focusManager.set(e,n),O.some(!0)})},o=function(e,n,t,r){var o,i,u=Li(e.element(),t.selector);return o=e,(i=t).focusManager.get(o).bind(function(n){return Wi(n,i.selector)}).bind(function(n){return xn(u,S(Ae,n)).bind(function(n){return c(e,u,n,t,r)})})},r=y([fu(iu([uu,ou([9])]),function(n,e,t){var r=t.cyclic?nu:eu;return o(n,0,t,r)}),fu(ou([9]),function(n,e,t){var r=t.cyclic?tu:ru;return o(n,0,t,r)}),fu(ou(qi()),function(e,t,n){return n.onEscape.bind(function(n){return n(e,t)})}),fu(iu([au,ou(Xi())]),function(e,t,n){return n.onEnter.bind(function(n){return n(e,t)})})]),i=y([]);return Au(e,Gr.init,r,i,function(){return O.some(t)})},Hu=ju(yr("cyclic",y(!1))),Nu=ju(yr("cyclic",y(!0))),Pu=function(n){return"input"===ke(n)&&"radio"!==Zr(n,"type")||"textarea"===ke(n)},zu=function(n,e,t){return Pu(t)&&ou(Yi())(e.event())?O.none():(we(n,t,ae()),O.some(!0))},Lu=function(n,e){return O.some(!0)},Gu=[hr("execute",zu),hr("useSpace",!1),hr("useEnter",!0),hr("useControlEnter",!1),hr("useDown",!1)],$u=function(n,e,t){return t.execute(n,e,n.element())},Uu=Au(Gu,Gr.init,function(n,e,t,r){var o=t.useSpace&&!Pu(n.element())?Yi():[],i=t.useEnter?Xi():[],u=t.useDown?Zi():[],c=o.concat(i).concat(u);return[fu(ou(c),$u)].concat(t.useControlEnter?[fu(iu([cu,ou(Xi())]),$u)]:[])},function(n,e,t,r){return t.useSpace&&!Pu(n.element())?[fu(ou(Yi()),Lu)]:[]},function(){return O.none()}),Wu=function(){var t=ho(O.none());return $r({readState:function(){return t.get().map(function(n){return{numRows:String(n.numRows),numColumns:String(n.numColumns)}}).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(n,e){t.set(O.some({numRows:n,numColumns:e}))},getNumRows:function(){return t.get().map(function(n){return n.numRows})},getNumColumns:function(){return t.get().map(function(n){return n.numColumns})}})},Xu=/* */Object.freeze({__proto__:null,flatgrid:Wu,init:function(n){return n.state(n)}}),qu=function(e,t){return function(n){return"rtl"===Yu(n)?t:e}},Yu=function(n){return"rtl"===Di(n,"direction")?"rtl":"ltr"},Ku=function(i){return function(n,e,t,r){var o=i(n.element());return nc(o,n,e,t,r)}},Ju=function(n,e){var t=qu(n,e);return Ku(t)},Qu=function(n,e){var t=qu(e,n);return Ku(t)},Zu=function(o){return function(n,e,t,r){return nc(o,n,e,t,r)}},nc=function(e,t,n,r,o){return r.focusManager.get(t).bind(function(n){return e(t.element(),n,r,o)}).map(function(n){return r.focusManager.set(t,n),!0})},ec=Zu,tc=Zu,rc=Zu,oc=function(n){return!((e=n.dom()).offsetWidth<=0&&e.offsetHeight<=0);var e},ic=function(n,e,t){var r,o=Li(n,t),i=hn(o,oc);return xn(r=i,function(n){return Ae(n,e)}).map(function(n){return{index:y(n),candidates:y(r)}})},uc=function(n,e){return xn(n,function(n){return Ae(e,n)})},cc=function(t,n,r,e){return e(Math.floor(n/r),n%r).bind(function(n){var e=n.row()*r+n.column();return 0<=e&&e<t.length?O.some(t[e]):O.none()})},ac=function(o,n,i,u,c){return cc(o,n,u,function(n,e){var t=n===i-1?o.length-n*u:u,r=lu(e,c,0,t-1);return O.some({row:y(n),column:y(r)})})},fc=function(i,n,u,c,a){return cc(i,n,c,function(n,e){var t=lu(n,a,0,u-1),r=t===u-1?i.length-t*c:c,o=du(e,0,r-1);return O.some({row:y(t),column:y(o)})})},sc=[fr("selector"),hr("execute",zu),Yo("onEscape"),hr("captureTab",!1),ni()],lc=function(e,t,n){Ui(e.element(),t.selector).each(function(n){t.focusManager.set(e,n)})},dc=function(o){return function(n,e,t,r){return ic(n,e,t.selector).bind(function(n){return o(n.candidates(),n.index(),r.getNumRows().getOr(t.initSize.numRows),r.getNumColumns().getOr(t.initSize.numColumns))})}},mc=function(n,e,t){return t.captureTab?O.some(!0):O.none()},gc=dc(function(n,e,t,r){return ac(n,e,t,r,-1)}),pc=dc(function(n,e,t,r){return ac(n,e,t,r,1)}),hc=dc(function(n,e,t,r){return fc(n,e,t,r,-1)}),vc=dc(function(n,e,t,r){return fc(n,e,t,r,1)}),yc=y([fu(ou(Ki()),Ju(gc,pc)),fu(ou(Qi()),Qu(gc,pc)),fu(ou(Ji()),ec(hc)),fu(ou(Zi()),tc(vc)),fu(iu([uu,ou([9])]),mc),fu(iu([au,ou([9])]),mc),fu(ou(qi()),function(n,e,t){return t.onEscape(n,e)}),fu(ou(Yi().concat(Xi())),function(e,t,r,n){return o=e,(i=r).focusManager.get(o).bind(function(n){return Wi(n,i.selector)}).bind(function(n){return r.execute(e,t,n)});var o,i})]),bc=y([fu(ou(Yi()),Lu)]),xc=Au(sc,Wu,yc,bc,function(){return O.some(lc)}),wc=function(n,e,t,i){var u=function(n,e,t){var r,o=lu(e,i,0,t.length-1);return o===n?O.none():(r=t[o],"button"===ke(r)&&"disabled"===Zr(r,"disabled")?u(n,o,t):O.from(t[o]))};return ic(n,t,e).bind(function(n){var e=n.index(),t=n.candidates();return u(e,e,t)})},Sc=[fr("selector"),hr("getInitial",O.none),hr("execute",zu),Yo("onEscape"),hr("executeOnMove",!1),hr("allowVertical",!0)],Oc=function(e,t,r){return n=e,(o=r).focusManager.get(n).bind(function(n){return Wi(n,o.selector)}).bind(function(n){return r.execute(e,t,n)});var n,o},Tc=function(e,t,n){t.getInitial(e).orThunk(function(){return Ui(e.element(),t.selector)}).each(function(n){t.focusManager.set(e,n)})},kc=function(n,e,t){return wc(n,t.selector,e,-1)},Ec=function(n,e,t){return wc(n,t.selector,e,1)},Cc=function(o){return function(n,e,t,r){return o(n,e,t,r).bind(function(){return t.executeOnMove?Oc(n,e,t):O.some(!0)})}},Mc=function(n,e,t){return t.onEscape(n,e)},_c=y([fu(ou(Yi()),Lu)]),Dc=Au(Sc,Gr.init,function(n,e,t,r){var o=Ki().concat(t.allowVertical?Ji():[]),i=Qi().concat(t.allowVertical?Zi():[]);return[fu(ou(o),Cc(Ju(kc,Ec))),fu(ou(i),Cc(Qu(kc,Ec))),fu(ou(Xi()),Oc),fu(ou(Yi()),Oc),fu(ou(qi()),Mc)]},_c,function(){return O.some(Tc)}),Ic=function(n,e,t){return O.from(n[e]).bind(function(n){return O.from(n[t]).map(function(n){return{rowIndex:e,columnIndex:t,cell:n}})})},Fc=function(n,e,t,r){var o=n[e].length,i=lu(t,r,0,o-1);return Ic(n,e,i)},Rc=function(n,e,t,r){var o=lu(t,r,0,n.length-1),i=n[o].length,u=du(e,0,i-1);return Ic(n,o,u)},Vc=function(n,e,t,r){var o=n[e].length,i=du(t+r,0,o-1);return Ic(n,e,i)},Bc=function(n,e,t,r){var o=du(t+r,0,n.length-1),i=n[o].length,u=du(e,0,i-1);return Ic(n,o,u)},Ac=[lr("selectors",[fr("row"),fr("cell")]),hr("cycles",!0),hr("previousSelector",O.none),hr("execute",zu)],jc=function(e,t,n){t.previousSelector(e).orThunk(function(){var n=t.selectors;return Ui(e.element(),n.cell)}).each(function(n){t.focusManager.set(e,n)})},Hc=function(n,e){return function(t,r,i){var u=i.cycles?n:e;return Wi(r,i.selectors.row).bind(function(n){var e=Li(n,i.selectors.cell);return uc(e,r).bind(function(r){var o=Li(t,i.selectors.row);return uc(o,n).bind(function(n){var e,t=(e=i,gn(o,function(n){return Li(n,e.selectors.cell)}));return u(t,n,r).map(function(n){return n.cell})})})})}},Nc=Hc(function(n,e,t){return Fc(n,e,t,-1)},function(n,e,t){return Vc(n,e,t,-1)}),Pc=Hc(function(n,e,t){return Fc(n,e,t,1)},function(n,e,t){return Vc(n,e,t,1)}),zc=Hc(function(n,e,t){return Rc(n,t,e,-1)},function(n,e,t){return Bc(n,t,e,-1)}),Lc=Hc(function(n,e,t){return Rc(n,t,e,1)},function(n,e,t){return Bc(n,t,e,1)}),Gc=y([fu(ou(Ki()),Ju(Nc,Pc)),fu(ou(Qi()),Qu(Nc,Pc)),fu(ou(Ji()),ec(zc)),fu(ou(Zi()),tc(Lc)),fu(ou(Yi().concat(Xi())),function(e,t,r){return To(e.element()).bind(function(n){return r.execute(e,t,n)})})]),$c=y([fu(ou(Yi()),Lu)]),Uc=Au(Ac,Gr.init,Gc,$c,function(){return O.some(jc)}),Wc=[fr("selector"),hr("execute",zu),hr("moveOnTab",!1)],Xc=function(e,t,r){return r.focusManager.get(e).bind(function(n){return r.execute(e,t,n)})},qc=function(e,t,n){Ui(e.element(),t.selector).each(function(n){t.focusManager.set(e,n)})},Yc=function(n,e,t){return wc(n,t.selector,e,-1)},Kc=function(n,e,t){return wc(n,t.selector,e,1)},Jc=y([fu(ou(Ji()),rc(Yc)),fu(ou(Zi()),rc(Kc)),fu(iu([uu,ou([9])]),function(n,e,t,r){return t.moveOnTab?rc(Yc)(n,e,t,r):O.none()}),fu(iu([au,ou([9])]),function(n,e,t,r){return t.moveOnTab?rc(Kc)(n,e,t,r):O.none()}),fu(ou(Xi()),Xc),fu(ou(Yi()),Xc)]),Qc=y([fu(ou(Yi()),Lu)]),Zc=Au(Wc,Gr.init,Jc,Qc,function(){return O.some(qc)}),na=[Yo("onSpace"),Yo("onEnter"),Yo("onShiftEnter"),Yo("onLeft"),Yo("onRight"),Yo("onTab"),Yo("onShiftTab"),Yo("onUp"),Yo("onDown"),Yo("onEscape"),hr("stopSpaceKeyup",!1),dr("focusIn")],ea=Au(na,Gr.init,function(n,e,t){return[fu(ou(Yi()),t.onSpace),fu(iu([au,ou(Xi())]),t.onEnter),fu(iu([uu,ou(Xi())]),t.onShiftEnter),fu(iu([uu,ou([9])]),t.onShiftTab),fu(iu([au,ou([9])]),t.onTab),fu(ou(Ji()),t.onUp),fu(ou(Zi()),t.onDown),fu(ou(Ki()),t.onLeft),fu(ou(Qi()),t.onRight),fu(ou(Yi()),t.onSpace),fu(ou(qi()),t.onEscape)]},function(n,e,t){return t.stopSpaceKeyup?[fu(ou(Yi()),Lu)]:[]},function(n){return n.focusIn}),ta=Hu.schema(),ra=Nu.schema(),oa=Dc.schema(),ia=xc.schema(),ua=Uc.schema(),ca=Uu.schema(),aa=Zc.schema(),fa=ea.schema(),sa=(Bu=or("Creating behaviour: "+(Eu={branchKey:"mode",branches:/* */Object.freeze({__proto__:null,acyclic:ta,cyclic:ra,flow:oa,flatgrid:ia,matrix:ua,execution:ca,menu:aa,special:fa}),name:"keying",active:{events:function(n,e){return n.handler.toEvents(n,e)}},apis:{focusIn:function(e,t,r){t.sendFocusIn(t).fold(function(){e.getSystem().triggerFocus(e.element(),e.element())},function(n){n(e,t,r)})},setGridSize:function(n,e,t,r,o){R(t,"setGridSize")?t.setGridSize(r,o):v.console.error("Layout does not support setGridSize")}},state:Xu}).name,qr,Eu),Cu=ur(Bu.branchKey,Bu.branches),Mu=Bu.name,_u=Bu.active,Du=Bu.apis,Iu=Bu.extra,Fu=Bu.state,Vu=gr(Mu,[mr("config",Ru=Cu)]),Lr(Ru,Vu,Mu,_u,Du,Iu,Fu)),la=function(r,n){return e=r,t={},o=gn(n,function(n){return e=n.name(),t="Cannot configure "+n.name()+" for "+r,Kt(e,e,Ct(),$t(function(n){return bt("The field: "+e+" is forbidden. "+t)}));var e,t}).concat([yr("dump",b)]),vr(e,t,Wt(o));var e,t,o},da=function(n){return n.dump},ma=function(n,e){return x(x({},n.dump),Ur(e))},ga=la,pa=ma,ha="placeholder",va=ot([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),ya=function(n){return F(n,"uiType")},ba=function(n,e,t,r){return ya(t)&&t.uiType===ha?(i=t,u=r,(o=n).exists(function(n){return n!==i.owner})?va.single(!0,y(i)):I(u,i.name).fold(function(){throw new Error("Unknown placeholder component: "+i.name+"\nKnown: ["+T(u)+"]\nNamespace: "+o.getOr("none")+"\nSpec: "+JSON.stringify(i,null,2))},function(n){return n.replace()})):va.single(!1,y(t));var o,i,u},xa=function(i,u,c,a){return ba(i,0,c,a).fold(function(n,e){var t=ya(c)?e(u,c.config,c.validated):e(u),r=I(t,"components").getOr([]),o=Sn(r,function(n){return xa(i,u,n,a)});return[x(x({},t),{components:o})]},function(n,e){if(ya(c)){var t=e(u,c.config,c.validated);return c.validated.preprocess.getOr(b)(t)}return e(u)})},wa=function(e,t,n,r){var o,i,u,c=C(r,function(n,e){return r=n,o=!1,{name:y(t=e),required:function(){return r.fold(function(n,e){return n},function(n,e){return n})},used:function(){return o},replace:function(){if(o)throw new Error("Trying to use the same placeholder more than once: "+t);return o=!0,r}};var t,r,o}),a=(o=e,i=t,u=c,Sn(n,function(n){return xa(o,i,n,u)}));return E(c,function(n){if(!1===n.used()&&n.required())throw new Error("Placeholder: "+n.name()+" was not found in components list\nNamespace: "+e.getOr("none")+"\nComponents: "+JSON.stringify(t.components,null,2))}),a},Sa=va.single,Oa=va.multiple,Ta=y(ha),ka=0,Ea=function(n){var e=(new Date).getTime();return n+"_"+Math.floor(1e9*Math.random())+ ++ka+String(e)},Ca=ot([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),Ma=hr("factory",{sketch:b}),_a=hr("schema",[]),Da=fr("name"),Ia=Kt("pname","pname",Mt(function(n){return"<alloy."+Ea(n.name)+">"}),cr()),Fa=yr("schema",function(){return[dr("preprocess")]}),Ra=hr("defaults",y({})),Va=hr("overrides",y({})),Ba=Wt([Ma,_a,Da,Ia,Ra,Va]),Aa=Wt([Ma,_a,Da,Ra,Va]),ja=Wt([Ma,_a,Da,Ia,Ra,Va]),Ha=Wt([Ma,Fa,Da,fr("unit"),Ia,Ra,Va]),Na=function(n){var e=function(n){return n.name};return n.fold(e,e,e,e)},Pa=function(t,r){return function(n){var e=or("Converting part type",r,n);return t(e)}},za=Pa(Ca.required,Ba),La=(Pa(Ca.external,Aa),Pa(Ca.optional,ja)),Ga=Pa(Ca.group,Ha),$a=y("entirety"),Ua=function(n,e,t,r){return ct(e.defaults(n,t,r),t,{uid:n.partUids[e.name]},e.overrides(n,t,r))},Wa=function(o,n){var e={};return pn(n,function(n){n.fold(O.some,O.none,O.some,O.some).each(function(t){var r=Xa(o,t.pname);e[t.name]=function(n){var e=or("Part: "+t.name+" in "+o,Wt(t.schema),n);return x(x({},r),{config:n,validated:e})}})}),e},Xa=function(n,e){return{uiType:Ta(),owner:n,name:e}},qa=function(n,e,t){return r=e,i={},o={},pn(t,function(n){n.fold(function(r){i[r.pname]=Sa(!0,function(n,e,t){return r.factory.sketch(Ua(n,r,e,t))})},function(n){var e=r.parts[n.name];o[n.name]=y(n.factory.sketch(Ua(r,n,e[$a()]),e))},function(r){i[r.pname]=Sa(!1,function(n,e,t){return r.factory.sketch(Ua(n,r,e,t))})},function(o){i[o.pname]=Oa(!0,function(e,n,t){var r=e[o.name];return gn(r,function(n){return o.factory.sketch(ct(o.defaults(e,n,t),n,o.overrides(e,n)))})})})}),{internals:y(i),externals:y(o)};var r,i,o},Ya=function(n,e,t){return wa(O.some(n),e,e.components,t)},Ka=function(n,e,t){var r=e.partUids[t];return n.getSystem().getByUid(r).toOption()},Ja=function(n,e,t){return Ka(n,e,t).getOrDie("Could not find part: "+t)},Qa=function(e,n){var t=gn(n,Na);return Rt(gn(t,function(n){return{key:n,value:e+"-"+n}}))},Za=function(e){return Kt("partUids","partUids",_t(function(n){return Qa(n.uid,e)}),cr())},nf=Ea("alloy-premade"),ef=function(n){return Ft(nf,n)},tf=function(r){return n=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return r.apply(void 0,u([n.getApis(),n],e))},e=r.toString(),t=e.indexOf(")")+1,o=e.indexOf("("),i=e.substring(o+1,t-1).split(/,\s*/),n.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:Ar(i.slice(1))}},n;var n,e,t,o,i},rf=y("alloy-id-"),of=y("data-alloy-id"),uf=rf(),cf=of(),af=function(n,e){Object.defineProperty(n.dom(),cf,{value:e,writable:!0})},ff=function(n){var e=Ce(n)?n.dom()[cf]:null;return O.from(e)},sf=function(n){return Ea(n)},lf=function(n,e,t,r,o){var i,u,c=(u=o,(0<(i=r).length?[lr("parts",i)]:[]).concat([fr("uid"),hr("dom",{}),hr("components",[]),Zo("originalSpec"),hr("debug.sketcher",{})]).concat(u));return or(n+" [SpecSchema]",Ut(c.concat(e)),t)},df=function(n,e,t,r,o){var i=mf(o),u=Sn(t,function(n){return n.fold(O.none,O.some,O.none,O.none).map(function(n){return lr(n.name,n.schema.concat([Zo($a())]))}).toArray()}),c=Za(t),a=lf(n,e,i,u,[c]),f=qa(0,a,t);return r(a,Ya(n,a,f.internals()),i,f.externals())},mf=function(n){return F(n,"uid")?n:x(x({},n),{uid:sf("uid")})};var gf,pf,hf,vf=Ut([fr("name"),fr("factory"),fr("configFields"),hr("apis",{}),hr("extraApis",{})]),yf=Ut([fr("name"),fr("factory"),fr("configFields"),fr("partFields"),hr("apis",{}),hr("extraApis",{})]),bf=function(n){var i=or("Sketcher for "+n.name,vf,n),e=C(i.apis,tf),t=C(i.extraApis,function(n,e){return jr(n,e)});return x(x({name:y(i.name),configFields:y(i.configFields),sketch:function(n){return e=i.name,t=i.configFields,r=i.factory,o=mf(n),r(lf(e,t,o,[],[]),o);var e,t,r,o}},e),t)},xf=function(n){var e=or("Sketcher for "+n.name,yf,n),t=Wa(e.name,e.partFields),r=C(e.apis,tf),o=C(e.extraApis,function(n,e){return jr(n,e)});return x(x({name:y(e.name),partFields:y(e.partFields),configFields:y(e.configFields),sketch:function(n){return df(e.name,e.configFields,e.partFields,e.factory,n)},parts:y(t)},r),o)},wf=bf({name:"Button",factory:function(n){var e,t=(e=n.action,Tr(wn([e.map(function(t){return Br(function(n,e){t(n),e.stop()})}).toArray(),xi()]))),r=n.dom.tag,o=function(e){return I(n.dom,"attributes").bind(function(n){return I(n,e)})};return{uid:n.uid,dom:n.dom,components:n.components,events:t,behaviours:pa(n.buttonBehaviours,[ki.config({}),sa.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"!==r)return{role:o("role").getOr("button")};var n=o("type").getOr("button"),e=o("role").map(function(n){return{role:n}}).getOr({});return x({type:n},e)}()},eventOrder:n.eventOrder}},configFields:[hr("uid",undefined),fr("dom"),hr("components",[]),ga("buttonBehaviours",[ki,sa]),dr("action"),dr("role"),hr("eventOrder",{})]}),Sf=Xr({fields:[],name:"unselecting",active:/* */Object.freeze({__proto__:null,events:function(){return Tr([kr(te(),y(!0))])},exhibit:function(){return Hr({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}})}),Of=function(n){var e,t,r,o=Te.fromHtml(n),i=Ne(o),u=(t=(e=o).dom().attributes!==undefined?e.dom().attributes:[],yn(t,function(n,e){var t;return"class"===e.name?n:x(x({},n),((t={})[e.name]=e.value,t))},{})),c=(r=o,Array.prototype.slice.call(r.dom().classList,0)),a=0===i.length?{}:{innerHtml:Do(o)};return x({tag:ke(o),classes:c,attributes:u},a)},Tf=function(n){var e=In(n,{prefix:yi});return Of(e)},kf=function(n){return{dom:Tf(n)}},Ef=function(n){return Ur([gi.config({toggleClass:bi("toolbar-button-selected"),toggleOnExecute:!1,aria:{mode:"pressed"}}),pi(n,function(n,e){(e?gi.on:gi.off)(n)})])},Cf=function(n,e,t,r){var o=Ef(t);return _f(e,r,o,n)},Mf=function(n,e){var t=e.ui.registry.getAll().icons;return O.from(t[n]).fold(function(){return Tf('<span class="${prefix}-toolbar-button ${prefix}-toolbar-group-item ${prefix}-icon-'+n+' ${prefix}-icon"></span>')},function(n){return Tf('<span class="${prefix}-toolbar-button ${prefix}-toolbar-group-item">'+n+"</span>")})},_f=function(n,e,t,r){return wf.sketch({dom:Mf(n,r),action:e,buttonBehaviours:ct(Ur([Sf.config({})]),t)})},Df=La({schema:[fr("dom")],name:"label"}),If=function(e){return La({name:e+"-edge",overrides:function(n){return n.model.manager.edgeActions[e].fold(function(){return{}},function(r){return{events:Tr([Cr(Gn(),function(n,e,t){return r(n,t)},[n]),Cr(Wn(),function(n,e,t){return r(n,t)},[n]),Cr(Xn(),function(n,e,t){t.mouseIsDown.get()&&r(n,t)},[n])])}})}})},Ff=If("top-left"),Rf=If("top"),Vf=If("top-right"),Bf=If("right"),Af=If("bottom-right"),jf=If("bottom"),Hf=If("bottom-left"),Nf=[Df,If("left"),Bf,Rf,jf,Ff,Vf,Hf,Af,za({name:"thumb",defaults:y({dom:{styles:{position:"absolute"}}}),overrides:function(n){return{events:Tr([Dr(Gn(),n,"spectrum"),Dr($n(),n,"spectrum"),Dr(Un(),n,"spectrum"),Dr(Wn(),n,"spectrum"),Dr(Xn(),n,"spectrum"),Dr(qn(),n,"spectrum")])}}}),za({schema:[yr("mouseIsDown",function(){return ho(!1)})],name:"spectrum",overrides:function(t){var r=t.model.manager,o=function(e,n){return r.getValueFromEvent(n).map(function(n){return r.setValueFrom(e,t,n)})};return{behaviours:Ur([sa.config({mode:"special",onLeft:function(n){return r.onLeft(n,t)},onRight:function(n){return r.onRight(n,t)},onUp:function(n){return r.onUp(n,t)},onDown:function(n){return r.onDown(n,t)}}),ki.config({})]),events:Tr([Er(Gn(),o),Er($n(),o),Er(Wn(),o),Er(Xn(),function(n,e){t.mouseIsDown.get()&&o(n,e)})])}}})],Pf=function(n,e,t){e.store.manager.onLoad(n,e,t)},zf=function(n,e,t){e.store.manager.onUnload(n,e,t)},Lf=/* */Object.freeze({__proto__:null,onLoad:Pf,onUnload:zf,setValue:function(n,e,t,r){e.store.manager.setValue(n,e,t,r)},getValue:function(n,e,t){return e.store.manager.getValue(n,e,t)},getState:function(n,e,t){return t}}),Gf=/* */Object.freeze({__proto__:null,events:function(t,r){var n=t.resetOnDom?[Fr(function(n,e){Pf(n,t,r)}),Rr(function(n,e){zf(n,t,r)})]:[Nr(t,r,Pf)];return Tr(n)}}),$f=function(){var n=ho(null);return $r({set:n.set,get:n.get,isNotSet:function(){return null===n.get()},clear:function(){n.set(null)},readState:function(){return{mode:"memory",value:n.get()}}})},Uf=function(){var i=ho({}),u=ho({});return $r({readState:function(){return{mode:"dataset",dataByValue:i.get(),dataByText:u.get()}},lookup:function(n){return I(i.get(),n).orThunk(function(){return I(u.get(),n)})},update:function(n){var e=i.get(),t=u.get(),r={},o={};pn(n,function(e){r[e.value]=e,I(e,"meta").each(function(n){I(n,"text").each(function(n){o[n]=e})})}),i.set(x(x({},e),r)),u.set(x(x({},t),o))},clear:function(){i.set({}),u.set({})}})},Wf=/* */Object.freeze({__proto__:null,memory:$f,dataset:Uf,manual:function(){return $r({readState:function(){}})},init:function(n){return n.store.manager.state(n)}}),Xf=function(n,e,t,r){var o=e.store;t.update([r]),o.setValue(n,r),e.onSetValue(n,r)},qf=[dr("initialValue"),fr("getFallbackEntry"),fr("getDataKey"),fr("setValue"),Qo("manager",{setValue:Xf,getValue:function(n,e,t){var r=e.store,o=r.getDataKey(n);return t.lookup(o).fold(function(){return r.getFallbackEntry(o)},function(n){return n})},onLoad:function(e,t,r){t.store.initialValue.each(function(n){Xf(e,t,r,n)})},onUnload:function(n,e,t){t.clear()},state:Uf})],Yf=[fr("getValue"),hr("setValue",w),dr("initialValue"),Qo("manager",{setValue:function(n,e,t,r){e.store.setValue(n,r),e.onSetValue(n,r)},getValue:function(n,e,t){return e.store.getValue(n)},onLoad:function(e,t,n){t.store.initialValue.each(function(n){t.store.setValue(e,n)})},onUnload:w,state:Gr.init})],Kf=[dr("initialValue"),Qo("manager",{setValue:function(n,e,t,r){t.set(r),e.onSetValue(n,r)},getValue:function(n,e,t){return t.get()},onLoad:function(n,e,t){e.store.initialValue.each(function(n){t.isNotSet()&&t.set(n)})},onUnload:function(n,e,t){t.clear()},state:$f})],Jf=[vr("store",{mode:"memory"},ur("mode",{memory:Kf,manual:Yf,dataset:qf})),qo("onSetValue"),hr("resetOnDom",!1)],Qf=Xr({fields:Jf,name:"representing",active:Gf,apis:Lf,extra:{setValueFrom:function(n,e){var t=Qf.getValue(e);Qf.setValue(n,t)}},state:Wf}),Zf=Bi("width",function(n){return n.dom().offsetWidth}),ns=function(n,e){return Zf.set(n,e)},es=function(n){return Zf.get(n)},ts=function(t,r){return{left:y(t),top:y(r),translate:function(n,e){return ts(t+n,r+e)}}},rs=ts,os=y("slider.change.value"),is=function(n){var e=n.event().raw();if(-1!==e.type.indexOf("touch")){return e.touches!==undefined&&1===e.touches.length?O.some(e.touches[0]).map(function(n){return rs(n.clientX,n.clientY)}):O.none()}return e.clientX!==undefined?O.some(e).map(function(n){return rs(n.clientX,n.clientY)}):O.none()},us=function(n){return n.model.minX},cs=function(n){return n.model.minY},as=function(n){return n.model.minX-1},fs=function(n){return n.model.minY-1},ss=function(n){return n.model.maxX},ls=function(n){return n.model.maxY},ds=function(n){return n.model.maxX+1},ms=function(n){return n.model.maxY+1},gs=function(n,e,t){return e(n)-t(n)},ps=function(n){return gs(n,ss,us)},hs=function(n){return gs(n,ls,cs)},vs=function(n){return ps(n)/2},ys=function(n){return hs(n)/2},bs=function(n){return n.stepSize},xs=function(n){return n.snapToGrid},ws=function(n){return n.snapStart},Ss=function(n){return n.rounded},Os=function(n,e){return n[e+"-edge"]!==undefined},Ts=function(n){return Os(n,"left")},ks=function(n){return Os(n,"right")},Es=function(n){return Os(n,"top")},Cs=function(n){return Os(n,"bottom")},Ms=function(n){return n.model.value.get()},_s=function(n){return{x:y(n)}},Ds=function(n){return{y:y(n)}},Is=function(n,e){return{x:y(n),y:y(e)}},Fs=function(n,e){be(n,os(),{value:e})},Rs=function(n,e,t,r){return n<e?n:t<n?t:n===e?e-1:Math.max(e,n-r)},Vs=function(n,e,t,r){return t<n?n:n<e?e:n===t?t+1:Math.min(t,n+r)},Bs=function(n,e,t){return Math.max(e,Math.min(t,n))},As=function(n){var e=n.min,t=n.max,r=n.range,o=n.value,i=n.step,u=n.snap,c=n.snapStart,a=n.rounded,f=n.hasMinEdge,s=n.hasMaxEdge,l=n.minBound,d=n.maxBound,m=n.screenRange,g=f?e-1:e,p=s?t+1:t;if(o<l)return g;if(d<o)return p;var h,v,y,b,x,w,S,O=(x=o,w=l,S=d,Math.min(S,Math.max(x,w))-w),T=Bs(O/m*r+e,g,p);return u&&e<=T&&T<=t?(h=T,v=e,y=t,b=i,c.fold(function(){var n=h-v,e=Math.round(n/b)*b;return Bs(v+e,v-1,y+1)},function(n){var e=(h-n)%b,t=Math.round(e/b),r=Math.floor((h-n)/b),o=Math.floor((y-n)/b),i=n+Math.min(o,r+t)*b;return Math.max(n,i)})):a?Math.round(T):T},js=function(n){var e=n.min,t=n.max,r=n.range,o=n.value,i=n.hasMinEdge,u=n.hasMaxEdge,c=n.maxBound,a=n.maxOffset,f=n.centerMinEdge,s=n.centerMaxEdge;return o<e?i?0:f:t<o?u?c:s:(o-e)/r*a},Hs="left",Ns=function(n){return n.element().dom().getBoundingClientRect()},Ps=function(n,e){return n[e]},zs=function(n){var e=Ns(n);return Ps(e,Hs)},Ls=function(n){var e=Ns(n);return Ps(e,"right")},Gs=function(n){var e=Ns(n);return Ps(e,"top")},$s=function(n){var e=Ns(n);return Ps(e,"bottom")},Us=function(n){var e=Ns(n);return Ps(e,"width")},Ws=function(n){var e=Ns(n);return Ps(e,"height")},Xs=function(n,e,t){return(n+e)/2-t},qs=function(n,e){var t=Ns(n),r=Ns(e),o=Ps(t,Hs),i=Ps(t,"right"),u=Ps(r,Hs);return Xs(o,i,u)},Ys=function(n,e){var t=Ns(n),r=Ns(e),o=Ps(t,"top"),i=Ps(t,"bottom"),u=Ps(r,"top");return Xs(o,i,u)},Ks=function(n,e){be(n,os(),{value:e})},Js=function(n){return{x:y(n)}},Qs=function(n,e,t){var r={min:us(e),max:ss(e),range:ps(e),value:t,step:bs(e),snap:xs(e),snapStart:ws(e),rounded:Ss(e),hasMinEdge:Ts(e),hasMaxEdge:ks(e),minBound:zs(n),maxBound:Ls(n),screenRange:Us(n)};return As(r)},Zs=function(i){return function(n,e){return t=n,o=(0<i?Vs:Rs)(Ms(r=e).x(),us(r),ss(r),bs(r)),Ks(t,Js(o)),O.some(o).map(function(){return!0});var t,r,o}},nl=function(n,e,t,r,o,i){var u,c,a,f,s,l,d,m,g,p=(c=i,a=t,f=r,s=o,l=Us(u=e),d=f.bind(function(n){return O.some(qs(n,u))}).getOr(0),m=s.bind(function(n){return O.some(qs(n,u))}).getOr(l),g={min:us(c),max:ss(c),range:ps(c),value:a,hasMinEdge:Ts(c),hasMaxEdge:ks(c),minBound:zs(u),minOffset:0,maxBound:Ls(u),maxOffset:l,centerMinEdge:d,centerMaxEdge:m},js(g));return zs(e)-zs(n)+p},el=Zs(-1),tl=Zs(1),rl=O.none,ol=O.none,il={"top-left":O.none(),top:O.none(),"top-right":O.none(),right:O.some(function(n,e){Fs(n,_s(ds(e)))}),"bottom-right":O.none(),bottom:O.none(),"bottom-left":O.none(),left:O.some(function(n,e){Fs(n,_s(as(e)))})},ul=/* */Object.freeze({__proto__:null,setValueFrom:function(n,e,t){var r=Qs(n,e,t),o=Js(r);return Ks(n,o),r},setToMin:function(n,e){var t=us(e);Ks(n,Js(t))},setToMax:function(n,e){var t=ss(e);Ks(n,Js(t))},findValueOfOffset:Qs,getValueFromEvent:function(n){return is(n).map(function(n){return n.left()})},findPositionOfValue:nl,setPositionFromValue:function(n,e,t,r){var o=Ms(t),i=nl(n,r.getSpectrum(n),o.x(),r.getLeftEdge(n),r.getRightEdge(n),t),u=es(e.element())/2;Mi(e.element(),"left",i-u+"px")},onLeft:el,onRight:tl,onUp:rl,onDown:ol,edgeActions:il}),cl=function(n,e){be(n,os(),{value:e})},al=function(n){return{y:y(n)}},fl=function(n,e,t){var r={min:cs(e),max:ls(e),range:hs(e),value:t,step:bs(e),snap:xs(e),snapStart:ws(e),rounded:Ss(e),hasMinEdge:Es(e),hasMaxEdge:Cs(e),minBound:Gs(n),maxBound:$s(n),screenRange:Ws(n)};return As(r)},sl=function(i){return function(n,e){return t=n,o=(0<i?Vs:Rs)(Ms(r=e).y(),cs(r),ls(r),bs(r)),cl(t,al(o)),O.some(o).map(function(){return!0});var t,r,o}},ll=function(n,e,t,r,o,i){var u,c,a,f,s,l,d,m,g,p=(c=i,a=t,f=r,s=o,l=Ws(u=e),d=f.bind(function(n){return O.some(Ys(n,u))}).getOr(0),m=s.bind(function(n){return O.some(Ys(n,u))}).getOr(l),g={min:cs(c),max:ls(c),range:hs(c),value:a,hasMinEdge:Es(c),hasMaxEdge:Cs(c),minBound:Gs(u),minOffset:0,maxBound:$s(u),maxOffset:l,centerMinEdge:d,centerMaxEdge:m},js(g));return Gs(e)-Gs(n)+p},dl=O.none,ml=O.none,gl=sl(-1),pl=sl(1),hl={"top-left":O.none(),top:O.some(function(n,e){Fs(n,Ds(fs(e)))}),"top-right":O.none(),right:O.none(),"bottom-right":O.none(),bottom:O.some(function(n,e){Fs(n,Ds(ms(e)))}),"bottom-left":O.none(),left:O.none()},vl=/* */Object.freeze({__proto__:null,setValueFrom:function(n,e,t){var r=fl(n,e,t),o=al(r);return cl(n,o),r},setToMin:function(n,e){var t=cs(e);cl(n,al(t))},setToMax:function(n,e){var t=ls(e);cl(n,al(t))},findValueOfOffset:fl,getValueFromEvent:function(n){return is(n).map(function(n){return n.top()})},findPositionOfValue:ll,setPositionFromValue:function(n,e,t,r){var o=Ms(t),i=ll(n,r.getSpectrum(n),o.y(),r.getTopEdge(n),r.getBottomEdge(n),t),u=Ni(e.element())/2;Mi(e.element(),"top",i-u+"px")},onLeft:dl,onRight:ml,onUp:gl,onDown:pl,edgeActions:hl}),yl=function(n,e){be(n,os(),{value:e})},bl=function(n,e){return{x:y(n),y:y(e)}},xl=function(a,f){return function(n,e){return r=n,o=e,i=0<a?Vs:Rs,u=(t=f)?Ms(o).x():i(Ms(o).x(),us(o),ss(o),bs(o)),c=t?i(Ms(o).y(),cs(o),ls(o),bs(o)):Ms(o).y(),yl(r,bl(u,c)),O.some(u).map(function(){return!0});var t,r,o,i,u,c}},wl=xl(-1,!1),Sl=xl(1,!1),Ol=xl(-1,!0),Tl=xl(1,!0),kl={"top-left":O.some(function(n,e){Fs(n,Is(as(e),fs(e)))}),top:O.some(function(n,e){Fs(n,Is(vs(e),fs(e)))}),"top-right":O.some(function(n,e){Fs(n,Is(ds(e),fs(e)))}),right:O.some(function(n,e){Fs(n,Is(ds(e),ys(e)))}),"bottom-right":O.some(function(n,e){Fs(n,Is(ds(e),ms(e)))}),bottom:O.some(function(n,e){Fs(n,Is(vs(e),ms(e)))}),"bottom-left":O.some(function(n,e){Fs(n,Is(as(e),ms(e)))}),left:O.some(function(n,e){Fs(n,Is(as(e),ys(e)))})},El=/* */Object.freeze({__proto__:null,setValueFrom:function(n,e,t){var r=Qs(n,e,t.left()),o=fl(n,e,t.top()),i=bl(r,o);return yl(n,i),i},setToMin:function(n,e){var t=us(e),r=cs(e);yl(n,bl(t,r))},setToMax:function(n,e){var t=ss(e),r=ls(e);yl(n,bl(t,r))},getValueFromEvent:function(n){return is(n)},setPositionFromValue:function(n,e,t,r){var o=Ms(t),i=nl(n,r.getSpectrum(n),o.x(),r.getLeftEdge(n),r.getRightEdge(n),t),u=ll(n,r.getSpectrum(n),o.y(),r.getTopEdge(n),r.getBottomEdge(n),t),c=es(e.element())/2,a=Ni(e.element())/2;Mi(e.element(),"left",i-c+"px"),Mi(e.element(),"top",u-a+"px")},onLeft:wl,onRight:Sl,onUp:Ol,onDown:Tl,edgeActions:kl}),Cl=[hr("stepSize",1),hr("onChange",w),hr("onChoose",w),hr("onInit",w),hr("onDragStart",w),hr("onDragEnd",w),hr("snapToGrid",!1),hr("rounded",!0),dr("snapStart"),sr("model",ur("mode",{x:[hr("minX",0),hr("maxX",100),yr("value",function(n){return ho(n.mode.minX)}),fr("getInitialValue"),Qo("manager",ul)],y:[hr("minY",0),hr("maxY",100),yr("value",function(n){return ho(n.mode.minY)}),fr("getInitialValue"),Qo("manager",vl)],xy:[hr("minX",0),hr("maxX",100),hr("minY",0),hr("maxY",100),yr("value",function(n){return ho({x:y(n.mode.minX),y:y(n.mode.minY)})}),fr("getInitialValue"),Qo("manager",El)]})),la("sliderBehaviours",[sa,Qf]),yr("mouseIsDown",function(){return ho(!1)})],Ml=y("mouse.released"),_l=xf({name:"Slider",configFields:Cl,partFields:Nf,factory:function(i,n,e,t){var r,u=function(n){return Ja(n,i,"thumb")},c=function(n){return Ja(n,i,"spectrum")},o=function(n){return Ka(n,i,"left-edge")},a=function(n){return Ka(n,i,"right-edge")},f=function(n){return Ka(n,i,"top-edge")},s=function(n){return Ka(n,i,"bottom-edge")},l=i.model,d=l.manager,m=function(n,e){d.setPositionFromValue(n,e,i,{getLeftEdge:o,getRightEdge:a,getTopEdge:f,getBottomEdge:s,getSpectrum:c})},g=function(n,e){l.value.set(e);var t=u(n);return m(n,t),i.onChange(n,t,e),O.some(!0)},p=function(t){var n=i.mouseIsDown.get();i.mouseIsDown.set(!1),n&&Ka(t,i,"thumb").each(function(n){var e=l.value.get();i.onChoose(t,n,e)})},h=function(n,e){e.stop(),i.mouseIsDown.set(!0),i.onDragStart(n,u(n))},v=function(n,e){e.stop(),i.onDragEnd(n,u(n)),p(n)};return{uid:i.uid,dom:i.dom,components:n,behaviours:ma(i.sliderBehaviours,[sa.config({mode:"special",focusIn:function(n){return Ka(n,i,"spectrum").map(sa.focusIn).map(y(!0))}}),Qf.config({store:{mode:"manual",getValue:function(n){return l.value.get()}}}),ti.config({channels:((r={})[Ml()]={onReceive:p},r)})]),events:Tr([Er(os(),function(n,e){g(n,e.event().value())}),Fr(function(n,e){var t=l.getInitialValue();l.value.set(t);var r=u(n);m(n,r);var o=c(n);i.onInit(n,r,o,l.value.get())}),Er(Gn(),h),Er(Un(),v),Er(Wn(),h),Er(qn(),v)]),apis:{resetToMin:function(n){d.setToMin(n,i)},resetToMax:function(n){d.setToMax(n,i)},changeValue:g,refresh:m},domModification:{styles:{position:"relative"}}}},apis:{resetToMin:function(n,e){n.resetToMin(e)},resetToMax:function(n,e){n.resetToMax(e)},refresh:function(n,e){n.refresh(e)}}}),Dl=function(e,t,r,n){return _f(t,function(){var n=r();e.setContextToolbar([{label:t+" group",items:n}])},{},n)},Il=function(n){return[(o=n,i=function(n){return n<0?"black":360<n?"white":"hsl("+n+", 100%, 50%)"},_l.sketch({dom:Tf('<div class="${prefix}-slider ${prefix}-hue-slider-container"></div>'),components:[_l.parts()["left-edge"](kf('<div class="${prefix}-hue-slider-black"></div>')),_l.parts().spectrum({dom:Tf('<div class="${prefix}-slider-gradient-container"></div>'),components:[kf('<div class="${prefix}-slider-gradient"></div>')],behaviours:Ur([gi.config({toggleClass:bi("thumb-active")})])}),_l.parts()["right-edge"](kf('<div class="${prefix}-hue-slider-white"></div>')),_l.parts().thumb({dom:Tf('<div class="${prefix}-slider-thumb"></div>'),behaviours:Ur([gi.config({toggleClass:bi("thumb-active")})])})],onChange:function(n,e,t){var r=i(t.x());Mi(e.element(),"background-color",r),o.onChange(n,e,r)},onDragStart:function(n,e){gi.on(e)},onDragEnd:function(n,e){gi.off(e)},onInit:function(n,e,t,r){var o=i(r.x());Mi(e.element(),"background-color",o)},stepSize:10,model:{mode:"x",minX:0,maxX:360,getInitialValue:function(){return{x:function(){return o.getInitialValue()}}}},sliderBehaviours:Ur([hi(_l.refresh)])}))];var o,i},Fl=Ut([fr("getInitialValue"),fr("onChange"),fr("category"),fr("sizes")]),Rl=function(n){var i=or("SizeSlider",Fl,n);return _l.sketch({dom:{tag:"div",classes:[bi("slider-"+i.category+"-size-container"),bi("slider"),bi("slider-size-container")]},onChange:function(n,e,t){var r,o=t.x();0<=(r=o)&&r<i.sizes.length&&i.onChange(o)},onDragStart:function(n,e){gi.on(e)},onDragEnd:function(n,e){gi.off(e)},model:{mode:"x",minX:0,maxX:i.sizes.length-1,getInitialValue:function(){return{x:function(){return i.getInitialValue()}}}},stepSize:1,snapToGrid:!0,sliderBehaviours:Ur([hi(_l.refresh)]),components:[_l.parts().spectrum({dom:Tf('<div class="${prefix}-slider-size-container"></div>'),components:[kf('<div class="${prefix}-slider-size-line"></div>')]}),_l.parts().thumb({dom:Tf('<div class="${prefix}-slider-thumb"></div>'),behaviours:Ur([gi.config({toggleClass:bi("thumb-active")})])})]})},Vl=["9px","10px","11px","12px","14px","16px","18px","20px","24px","32px","36px"],Bl=function(e,n){return(Ce(n)?O.some(n):He(n).filter(Ce)).map(function(n){return vo(function(n,e){return e(n)},xo,n,function(n){return Fi(n,"font-size").isSome()},e).bind(function(n){return Fi(n,"font-size")}).getOrThunk(function(){return Di(n,"font-size")})}).getOr("")},Al=function(n){var e=n.selection.getStart(),t=Te.fromDom(e),r=Te.fromDom(n.getBody()),o=Bl(function(n){return Ae(r,n)},t);return bn(Vl,function(n){return o===n}).getOr("medium")},jl=function(n){var e,t=Al(n);return e=t,xn(Vl,function(n){return n===e}).getOr(2)},Hl=function(r,n){var e;e=n,O.from(Vl[e]).each(function(n){var e,t;t=n,Al(e=r)!==t&&e.execCommand("fontSize",!1,t)})},Nl=y(Vl)(),Pl=function(n){return[kf('<span class="${prefix}-toolbar-button ${prefix}-icon-small-font ${prefix}-icon"></span>'),Rl({onChange:(e=n).onChange,sizes:Nl,category:"font",getInitialValue:e.getInitialValue}),kf('<span class="${prefix}-toolbar-button ${prefix}-icon-large-font ${prefix}-icon"></span>')];var e},zl=function(n){var e=function t(n){return n.uid!==undefined}(n)&&R(n,"uid")?n.uid:sf("memento");return{get:function(n){return n.getSystem().getByUid(e).getOrDie()},getOpt:function(n){return n.getSystem().getByUid(e).toOption()},asSpec:function(){return x(x({},n),{uid:e})}}},Ll=window.Promise?window.Promise:(pf=(gf=function(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],Yl(n,Gl(Ul,this),Gl(Wl,this))}).immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(n){v.setTimeout(n,1)},hf=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)},gf.prototype["catch"]=function(n){return this.then(null,n)},gf.prototype.then=function(t,r){var o=this;return new gf(function(n,e){$l.call(o,new ql(t,r,n,e))})},gf.all=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var a=Array.prototype.slice.call(1===n.length&&hf(n[0])?n[0]:n);return new gf(function(o,i){if(0===a.length)return o([]);var u=a.length;function c(e,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var t=n.then;if("function"==typeof t)return void t.call(n,function(n){c(e,n)},i)}a[e]=n,0==--u&&o(a)}catch(r){i(r)}}for(var n=0;n<a.length;n++)c(n,a[n])})},gf.resolve=function(e){return e&&"object"==typeof e&&e.constructor===gf?e:new gf(function(n){n(e)})},gf.reject=function(t){return new gf(function(n,e){e(t)})},gf.race=function(o){return new gf(function(n,e){for(var t=0,r=o;t<r.length;t++)r[t].then(n,e)})},gf);function Gl(n,e){return function(){return n.apply(e,arguments)}}function $l(r){var o=this;null!==this._state?pf(function(){var n=o._state?r.onFulfilled:r.onRejected;if(null!==n){var e;try{e=n(o._value)}catch(t){return void r.reject(t)}r.resolve(e)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function Ul(n){try{if(n===this)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var e=n.then;if("function"==typeof e)return void Yl(Gl(e,n),Gl(Ul,this),Gl(Wl,this))}this._state=!0,this._value=n,Xl.call(this)}catch(t){Wl.call(this,t)}}function Wl(n){this._state=!1,this._value=n,Xl.call(this)}function Xl(){for(var n=0,e=this._deferreds;n<e.length;n++){var t=e[n];$l.call(this,t)}this._deferreds=[]}function ql(n,e,t,r){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof e?e:null,this.resolve=t,this.reject=r}function Yl(n,e,t){var r=!1;try{n(function(n){r||(r=!0,e(n))},function(n){r||(r=!0,t(n))})}catch(o){if(r)return;r=!0,t(o)}}function Kl(n){return function e(t){return new Ll(function(n){var e=new v.FileReader;e.onloadend=function(){n(e.result)},e.readAsDataURL(t)})}(n).then(function(n){return n.split(",")[1]})}var Jl=function(o,i){Kl(i).then(function(r){o.undoManager.transact(function(){var n=o.editorUpload.blobCache,e=n.create(Ea("mceu"),i,r);n.add(e);var t=o.dom.createHTML("img",{src:e.blobUri()});o.insertContent(t)})})},Ql=function(o){var e=zl({dom:{tag:"input",attributes:{accept:"image/*",type:"file",title:""},styles:{visibility:"hidden",position:"absolute"}},events:Tr([Ir(ne()),Er(Zn(),function(n,e){var t,r;t=e.event(),r=t.raw().target.files||t.raw().dataTransfer.files,O.from(r[0]).each(function(n){Jl(o,n)})})])});return wf.sketch({dom:Mf("image",o),components:[e.asSpec()],action:function(n){e.get(n).element().dom().click()}})},Zl=function(n){return n.dom().textContent},nd=function(n){return 0<n.length},ed=function(n){return n===undefined||null===n?"":n},td=function(n){return id(n).fold(function(){return{url:"",text:n.selection.getContent({format:"text"}),title:"",target:"",link:O.none()}},function(n){return t=Zl(e=n),r=Zr(e,"href"),o=Zr(e,"title"),i=Zr(e,"target"),{url:ed(r),text:t!==r?ed(t):"",title:ed(o),target:ed(i),link:O.some(e)};var e,t,r,o,i})},rd=function(e,t,n){return n.text.toOption().filter(nd).fold(function(){return Zr(n=e,"href")===Zl(n)?O.some(t):O.none();var n},O.some)},od=function(o,i){i.url.toOption().filter(nd).fold(function(){var e;e=o,i.link.bind(b).each(function(n){e.execCommand("unlink")})},function(e){var n,t,r=(n=i,(t={}).href=e,n.title.toOption().filter(nd).each(function(n){t.title=n}),n.target.toOption().filter(nd).each(function(n){t.target=n}),t);i.link.bind(b).fold(function(){var n=i.text.toOption().filter(nd).getOr(e);o.insertContent(o.dom.createHTML("a",r,o.dom.encode(n)))},function(t){var n=rd(t,e,i);Qr(t,r),n.each(function(n){var e;e=n,t.dom().textContent=e})})})},id=function(n){var e=Te.fromDom(n.selection.getStart());return Wi(e,"a")},ud=Ln(),cd=function(n,e){var t=e.selection.getRng();n(),e.selection.setRng(t)},ad=function(n,e){var t,r;return{key:n,value:{config:{},me:(t=n,r=Tr(e),Xr({fields:[fr("enabled")],name:t,active:{events:y(r)}})),configAsRaw:y({}),initialConfig:{},state:Gr}}},fd=/* */Object.freeze({__proto__:null,getCurrent:function(n,e,t){return e.find(n)}}),sd=[fr("find")],ld=Xr({fields:sd,name:"composing",apis:fd}),dd=bf({name:"Container",factory:function(n){var e=n.dom,t=e.attributes,r=c(e,["attributes"]);return{uid:n.uid,dom:x({tag:"div",attributes:x({role:"presentation"},t)},r),components:n.components,behaviours:da(n.containerBehaviours),events:n.events,domModification:n.domModification,eventOrder:n.eventOrder}},configFields:[hr("components",[]),la("containerBehaviours",[]),hr("events",{}),hr("domModification",{}),hr("eventOrder",{})]}),md=bf({name:"DataField",factory:function(t){return{uid:t.uid,dom:t.dom,behaviours:pa(t.dataBehaviours,[Qf.config({store:{mode:"memory",initialValue:t.getInitialValue()}}),ld.config({find:O.some})]),events:Tr([Fr(function(n,e){Qf.setValue(n,t.getInitialValue())})])}},configFields:[fr("uid"),fr("dom"),fr("getInitialValue"),ga("dataBehaviours",[Qf,ld])]}),gd=function(n){return n.dom().value},pd=function(n,e){if(e===undefined)throw new Error("Value.set was undefined");n.dom().value=e},hd=y([dr("data"),hr("inputAttributes",{}),hr("inputStyles",{}),hr("tag","input"),hr("inputClasses",[]),qo("onSetValue"),hr("styles",{}),hr("eventOrder",{}),la("inputBehaviours",[Qf,ki]),hr("selectOnFocus",!0)]),vd=function(n){return x(x({},(e=n,Ur([ki.config({onFocus:e.selectOnFocus?function(n){var e=n.element(),t=gd(e);e.dom().setSelectionRange(0,t.length)}:w})]))),ma(n.inputBehaviours,[Qf.config({store:x(x({mode:"manual"},n.data.map(function(n){return{initialValue:n}}).getOr({})),{getValue:function(n){return gd(n.element())},setValue:function(n,e){gd(n.element())!==e&&pd(n.element(),e)}}),onSetValue:n.onSetValue})]));var e},yd=bf({name:"Input",configFields:hd(),factory:function(n,e){return{uid:n.uid,dom:{tag:(t=n).tag,attributes:x({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses},components:[],behaviours:vd(n),eventOrder:n.eventOrder};var t}}),bd=/* */Object.freeze({__proto__:null,exhibit:function(n,e){return Hr({attributes:Rt([{key:e.tabAttr,value:"true"}])})}}),xd=[hr("tabAttr","data-alloy-tabstop")],wd=Xr({fields:xd,name:"tabstopping",active:bd}),Sd=tinymce.util.Tools.resolve("tinymce.util.I18n"),Od=function(n,e){var t=zl(yd.sketch({inputAttributes:{placeholder:Sd.translate(e)},onSetValue:function(n,e){ye(n,Qn())},inputBehaviours:Ur([ld.config({find:O.some}),wd.config({}),sa.config({mode:"execution"})]),selectOnFocus:!1})),r=zl(wf.sketch({dom:Tf('<button class="${prefix}-input-container-x ${prefix}-icon-cancel-circle ${prefix}-icon"></button>'),action:function(n){var e=t.get(n);Qf.setValue(e,"")}}));return{name:n,spec:dd.sketch({dom:Tf('<div class="${prefix}-input-container"></div>'),components:[t.asSpec(),r.asSpec()],containerBehaviours:Ur([gi.config({toggleClass:bi("input-container-empty")}),ld.config({find:function(n){return O.some(t.get(n))}}),ad("input-clearing",[Er(Qn(),function(n){var e=t.get(n);(0<Qf.getValue(e).length?gi.off:gi.on)(n)})])])})}},Td=["input","button","textarea","select"],kd=function(n,e,t){(e.disabled()?Id:Fd)(n,e,t)},Ed=function(n,e){return!0===e.useNative&&dn(Td,ke(n.element()))},Cd=function(n){Jr(n.element(),"disabled","disabled")},Md=function(n){to(n.element(),"disabled")},_d=function(n){Jr(n.element(),"aria-disabled","true")},Dd=function(n){Jr(n.element(),"aria-disabled","false")},Id=function(e,n,t){n.disableClass.each(function(n){co(e.element(),n)}),(Ed(e,n)?Cd:_d)(e),n.onDisabled(e)},Fd=function(e,n,t){n.disableClass.each(function(n){fo(e.element(),n)}),(Ed(e,n)?Md:Dd)(e),n.onEnabled(e)},Rd=function(n,e){return Ed(n,e)?eo(n.element(),"disabled"):"true"===Zr(n.element(),"aria-disabled")},Vd=/* */Object.freeze({__proto__:null,enable:Fd,disable:Id,isDisabled:Rd,onLoad:kd,set:function(n,e,t,r){(r?Id:Fd)(n,e,t)}}),Bd=/* */Object.freeze({__proto__:null,exhibit:function(n,e){return Hr({classes:e.disabled?e.disableClass.map(En).getOr([]):[]})},events:function(t,n){return Tr([kr(ae(),function(n,e){return Rd(n,t)}),Nr(t,n,kd)])}}),Ad=[vr("disabled",s,ar),hr("useNative",!0),dr("disableClass"),qo("onDisabled"),qo("onEnabled")],jd=Xr({fields:Ad,name:"disabling",active:Bd,apis:Vd}),Hd=[la("formBehaviours",[Qf])],Nd=function(n){return"<alloy.field."+n+">"},Pd=function(o,n){return{uid:o.uid,dom:o.dom,components:n,behaviours:ma(o.formBehaviours,[Qf.config({store:{mode:"manual",getValue:function(n){var e,t,r=(e=o,t=n.getSystem(),C(e.partUids,function(n,e){return y(t.getByUid(n))}));return C(r,function(n,o){return n().bind(function(n){var e,t,r=ld.getCurrent(n);return e=r,t=new Error("Cannot find a current component to extract the value from for form part '"+o+"': "+Vo(n.element())),e.fold(function(){return rt.error(t)},rt.value)}).map(Qf.getValue)})},setValue:function(t,n){E(n,function(e,n){Ka(t,o,n).each(function(n){ld.getCurrent(n).each(function(n){Qf.setValue(n,e)})})})}}})]),apis:{getField:function(n,e){return Ka(n,o,e).bind(ld.getCurrent)}}}},zd=(tf(function(n,e,t){return n.getField(e,t)}),function(n){var i,e=(i=[],{field:function(n,e){return i.push(n),t="form",r=Nd(n),o=e,{uiType:Ta(),owner:t,name:r,config:o,validated:{}};var t,r,o},record:function(){return i}}),t=n(e),r=e.record(),o=gn(r,function(n){return za({name:n,pname:Nd(n)})});return df("form",Hd,o,Pd,t)}),Ld=function(){var e=ho(O.none()),t=function(){e.get().each(function(n){n.destroy()})};return{clear:function(){t(),e.set(O.none())},isSet:function(){return e.get().isSome()},set:function(n){t(),e.set(O.some(n))},run:function(n){e.get().each(n)}}},Gd=function(){var e=ho(O.none());return{clear:function(){e.set(O.none())},set:function(n){e.set(O.some(n))},isSet:function(){return e.get().isSome()},on:function(n){e.get().each(n)}}},$d=function(n){var r="navigateEvent",e=Wt([fr("fields"),hr("maxFieldIndex",n.fields.length-1),fr("onExecute"),fr("getInitialValue"),yr("state",function(){return{dialogSwipeState:Gd(),currentScreen:ho(0)}})]),u=or("SerialisedDialog",e,n),o=function(e,n,t){return wf.sketch({dom:Tf('<span class="${prefix}-icon-'+n+' ${prefix}-icon"></span>'),action:function(n){be(n,r,{direction:e})},buttonBehaviours:Ur([jd.config({disableClass:bi("toolbar-navigation-disabled"),disabled:function(){return!t}})])})},i=function(n,o){var i=Li(n.element(),"."+bi("serialised-dialog-screen"));Ui(n.element(),"."+bi("serialised-dialog-chain")).each(function(r){0<=u.state.currentScreen.get()+o&&u.state.currentScreen.get()+o<i.length&&(Fi(r,"left").each(function(n){var e=parseInt(n,10),t=es(i[0]);Mi(r,"left",e-o*t+"px")}),u.state.currentScreen.set(u.state.currentScreen.get()+o))})},c=function(r){var n=Li(r.element(),"input");O.from(n[u.state.currentScreen.get()]).each(function(n){r.getSystem().getByDom(n).each(function(n){var e,t;e=r,t=n.element(),e.getSystem().triggerFocus(t,e.element())})});var e=f.get(r);Ou.highlightAt(e,u.state.currentScreen.get())},a=zl(zd(function(t){return{dom:Tf('<div class="${prefix}-serialised-dialog"></div>'),components:[dd.sketch({dom:Tf('<div class="${prefix}-serialised-dialog-chain" style="left: 0px; position: absolute;"></div>'),components:gn(u.fields,function(n,e){return e<=u.maxFieldIndex?dd.sketch({dom:Tf('<div class="${prefix}-serialised-dialog-screen"></div>'),components:[o(-1,"previous",0<e),t.field(n.name,n.spec),o(1,"next",e<u.maxFieldIndex)]}):t.field(n.name,n.spec)})})],formBehaviours:Ur([hi(function(n,e){var t;t=e,Ui(n.element(),"."+bi("serialised-dialog-chain")).each(function(n){Mi(n,"left",-u.state.currentScreen.get()*t.width+"px")})}),sa.config({mode:"special",focusIn:function(n,e){c(n)},onTab:function(n,e){return i(n,1),O.some(!0)},onShiftTab:function(n,e){return i(n,-1),O.some(!0)}}),ad("form-events",[Fr(function(e,n){u.state.currentScreen.set(0),u.state.dialogSwipeState.clear();var t=f.get(e);Ou.highlightFirst(t),u.getInitialValue(e).each(function(n){Qf.setValue(e,n)})}),Br(u.onExecute),Er(ee(),function(n,e){"left"===e.event().raw().propertyName&&c(n)}),Er(r,function(n,e){var t=e.event().direction();i(n,t)})])])}})),f=zl({dom:Tf('<div class="${prefix}-dot-container"></div>'),behaviours:Ur([Ou.config({highlightClass:bi("dot-active"),itemClass:bi("dot-item")})]),components:Sn(u.fields,function(n,e){return e<=u.maxFieldIndex?[kf('<div class="${prefix}-dot-item ${prefix}-icon-full-dot ${prefix}-icon"></div>')]:[]})});return{dom:Tf('<div class="${prefix}-serializer-wrapper"></div>'),components:[a.asSpec(),f.asSpec()],behaviours:Ur([sa.config({mode:"special",focusIn:function(n){var e=a.get(n);sa.focusIn(e)}}),ad("serializer-wrapper-events",[Er(Gn(),function(n,e){var t=e.event();u.state.dialogSwipeState.set({xValue:t.raw().touches[0].clientX,points:[]})}),Er($n(),function(n,e){var t=e.event();u.state.dialogSwipeState.on(function(n){e.event().prevent(),u.state.dialogSwipeState.set(function(n,e){if(e===n.xValue)return n;var t=0<e-n.xValue?1:-1,r={direction:t,xValue:e};return{xValue:e,points:(0===n.points.length?[]:n.points[n.points.length-1].direction===t?n.points.slice(0,n.points.length-1):n.points).concat([r])}}(n,t.raw().touches[0].clientX))})}),Er(Un(),function(r,n){u.state.dialogSwipeState.on(function(n){var e=a.get(r),t=-1*function(n){if(0===n.points.length)return 0;var e=n.points[0].direction,t=n.points[n.points.length-1].direction;return-1===e&&-1===t?-1:1===e&&1===t?1:0}(n);i(e,t)})})])])}},Ud=V(function(r,o){return[{label:"the link group",items:[$d({fields:[Od("url","Type or paste URL"),Od("text","Link text"),Od("title","Link title"),Od("target","Link target"),{name:"link",spec:md.sketch({dom:{tag:"span",styles:{display:"none"}},getInitialValue:function(){return O.none()}})}],maxFieldIndex:["url","text","title","target"].length-1,getInitialValue:function(){return O.some(td(o))},onExecute:function(n,e){var t=Qf.getValue(n);od(o,t),r.restoreToolbar(),o.focus()}})]}]}),Wd=function(r,o){return Cf(o,"link","link",function(){var n,e,t=Ud(r,o);r.setContextToolbar(t),n=o,e=function(){r.focusToolbar()},(ud.os.isAndroid()?cd:f)(e,n),id(o).each(function(n){o.selection.select(n.dom())})})},Xd=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}],qd=Tr([{key:oe(),value:Sr({can:function(n,e){var t,r,o=e.event().originator(),i=e.event().target();return r=i,!(Ae(t=o,n.element())&&!Ae(t,r))||(v.console.warn(oe()+" did not get interpreted by the desired target. \nOriginator: "+Vo(o)+"\nTarget: "+Vo(i)+"\nCheck the "+oe()+" event handlers"),!1)}})}]),Yd=/* */Object.freeze({__proto__:null,events:qd}),Kd=b,Jd=function(e){var n=function(n){return function(){throw new Error("The component must be in a context to send: "+n+(e?"\n"+Vo(e().element())+" is not in context.":""))}};return{debugInfo:y("fake"),triggerEvent:n("triggerEvent"),triggerFocus:n("triggerFocus"),triggerEscape:n("triggerEscape"),build:n("build"),addToWorld:n("addToWorld"),removeFromWorld:n("removeFromWorld"),addToGui:n("addToGui"),removeFromGui:n("removeFromGui"),getByUid:n("getByUid"),getByDom:n("getByDom"),broadcast:n("broadcast"),broadcastOn:n("broadcastOn"),broadcastEvent:n("broadcastEvent"),isConnected:y(!1)}},Qd=Jd(),Zd=function(n,o){var i={};return E(n,function(n,r){E(n,function(n,e){var t=I(i,e).getOr([]);i[e]=t.concat([o(r,n)])})}),i},nm=function(u,c,n,a){try{var e=(t=n,r=function(n,e){var t=n[c](),r=e[c](),o=a.indexOf(t),i=a.indexOf(r);if(-1===o)throw new Error("The ordering for "+u+" does not have an entry for "+t+".\nOrder specified: "+JSON.stringify(a,null,2));if(-1===i)throw new Error("The ordering for "+u+" does not have an entry for "+r+".\nOrder specified: "+JSON.stringify(a,null,2));return o<i?-1:i<o?1:0},(o=fn.call(t,0)).sort(r),o);return rt.value(e)}catch(i){return rt.error([i])}var t,r,o},em=function(n,e){return t=S.apply(undefined,[n.handler].concat(e)),r=n.purpose(),{cHandler:t,purpose:y(r)};var t,r},tm=function(n){return n.cHandler},rm=function(n,e){return{name:y(n),handler:y(e)}},om=function(n,e,t){var r,o,i=x(x({},t),(r=n,o={},pn(e,function(n){o[n.name()]=n.handlers(r)}),o));return Zd(i,rm)},im=function(n){var e,i=cn(e=n)?{can:y(!0),abort:y(!1),run:e}:e;return function(n,e){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];var o=[n,e].concat(t);i.abort.apply(undefined,o)?e.stop():i.can.apply(undefined,o)&&i.run.apply(undefined,o)}},um=function(n,e,t){var r,o,i=e[t];return i?nm("Event: "+t,"name",n,i).map(function(n){var e=gn(n,function(n){return n.handler()});return Or(e)}):(r=t,o=n,rt.error(["The event ("+r+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(gn(o,function(n){return n.name()}),null,2)]))},cm=function(n,i){var e=D(n,function(r,o){return(1===r.length?rt.value(r[0].handler()):um(r,i,o)).map(function(n){var e=im(n),t=1<r.length?hn(i[o],function(e){return mn(r,function(n){return n.name()===e})}).join(" > "):r[0].name();return Ft(o,{handler:e,purpose:y(t)})})});return Vt(e,{})},am=function(n){return tr("custom.definition",Wt([Kt("dom","dom",Et(),Wt([fr("tag"),hr("styles",{}),hr("classes",[]),hr("attributes",{}),dr("value"),dr("innerHtml")])),fr("components"),fr("uid"),hr("events",{}),hr("apis",{}),Kt("eventOrder","eventOrder",Tt.mergeWithThunk(y({"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],touchstart:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"],"alloy.receive":["receiving","reflecting","tooltipping"]})),cr()),dr("domModification")]),n)},fm=function(e,n){pn(n,function(n){co(e,n)})},sm=function(e,n){pn(n,function(n){fo(e,n)})},lm=function(n,e){return t=n,o=gn(r=e,function(n){return gr(n.name(),[fr("config"),hr("state",Gr)])}),i=tr("component.behaviours",Wt(o),t.behaviours).fold(function(n){throw new Error(ir(n)+"\nComplete spec:\n"+JSON.stringify(t,null,2))},function(n){return n}),{list:r,data:C(i,function(n){var e=n.map(function(n){return{config:n.config,state:n.state.init(n.config)}});return function(){return e}})};var t,r,o,i},dm=function(n){var e,t,r=(e=I(n,"behaviours").getOr({}),t=hn(T(e),function(n){return e[n]!==undefined}),gn(t,function(n){return e[n].me}));return lm(n,r)},mm=function(n,e,t){var r,o,i,u=x(x({},(r=n).dom),{uid:r.uid,domChildren:gn(r.components,function(n){return n.element()})}),c=n.domModification.fold(function(){return Hr({})},Hr),a={"alloy.base.modification":c},f=0<e.length?function(e,n,t,r){var o=x({},n);pn(t,function(n){o[n.name()]=n.exhibit(e,r)});var i=Zd(o,function(n,e){return{name:n,modification:e}}),u=function(n){return vn(n,function(n,e){return x(x({},e.modification),n)},{})},c=vn(i.classes,function(n,e){return e.modification.concat(n)},[]),a=u(i.attributes),f=u(i.styles);return Hr({classes:c,attributes:a,styles:f})}(t,a,e,u):c;return i=f,x(x({},o=u),{attributes:x(x({},o.attributes),i.attributes),styles:x(x({},o.styles),i.styles),classes:o.classes.concat(i.classes)})},gm=function(n,e,t){var r,o,i,u={"alloy.base.behaviour":n.events};return r=t,o=n.eventOrder,i=om(r,e,u),cm(i,o).getOrDie()},pm=function(t){var n=function(){return s},r=ho(Qd),e=rr(am(t)),o=dm(t),i=o.list,u=o.data,c=function(n){var e=Te.fromTag(n.tag);Qr(e,n.attributes),fm(e,n.classes),_i(e,n.styles),n.innerHtml.each(function(n){return Io(e,n)});var t=n.domChildren;return Ue(e,t),n.value.each(function(n){pd(e,n)}),n.uid,af(e,n.uid),e}(mm(e,i,u)),a=gm(e,i,u),f=ho(e.components),s={getSystem:r.get,config:function(n){var e=u;return(cn(e[n.name()])?e[n.name()]:function(){throw new Error("Could not find "+n.name()+" in "+JSON.stringify(t,null,2))})()},hasConfigured:function(n){return cn(u[n.name()])},spec:y(t),readState:function(n){return u[n]().map(function(n){return n.state.readState()}).getOr("not enabled")},getApis:function(){return e.apis},connect:function(n){r.set(n)},disconnect:function(){r.set(Jd(n))},element:y(c),syncComponents:function(){var n=Ne(c),e=Sn(n,function(n){return r.get().getByDom(n).fold(function(){return[]},function(n){return[n]})});f.set(e)},components:f.get,events:y(a)};return s},hm=function(n){var e,t=Kd(n),r=t.events,o=c(t,["events"]),i=(e=I(o,"components").getOr([]),gn(e,xm)),u=x(x({},o),{events:x(x({},Yd),r),components:i});return rt.value(pm(u))},vm=function(n){var e=Te.fromText(n);return ym({element:e})},ym=function(n){var e=or("external.component",Ut([fr("element"),dr("uid")]),n),t=ho(Jd());e.uid.each(function(n){af(e.element,n)});var r={getSystem:t.get,config:O.none,hasConfigured:y(!1),connect:function(n){t.set(n)},disconnect:function(){t.set(Jd(function(){return r}))},getApis:function(){return{}},element:y(e.element),spec:y(n),readState:y("No state"),syncComponents:w,components:y([]),events:y({})};return ef(r)},bm=sf,xm=function(e){return I(e,nf).fold(function(){var n=e.hasOwnProperty("uid")?e:x({uid:bm("")},e);return hm(n).getOrDie()},function(n){return n})},wm=ef,Sm="alloy.item-hover",Om="alloy.item-focus",Tm=function(n){(To(n.element()).isNone()||ki.isFocused(n))&&(ki.isFocused(n)||ki.focus(n),be(n,Sm,{item:n}))},km=function(n){be(n,Om,{item:n})},Em=y(Sm),Cm=y(Om),Mm=[fr("data"),fr("components"),fr("dom"),hr("hasSubmenu",!1),dr("toggling"),ga("itemBehaviours",[gi,ki,sa,Qf]),hr("ignoreFocus",!1),hr("domModification",{}),Qo("builder",function(n){return{dom:n.dom,domModification:x(x({},n.domModification),{attributes:x(x(x({role:n.toggling.isSome()?"menuitemcheckbox":"menuitem"},n.domModification.attributes),{"aria-haspopup":n.hasSubmenu}),n.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:pa(n.itemBehaviours,[n.toggling.fold(gi.revoke,function(n){return gi.config(x({aria:{mode:"checked"}},n))}),ki.config({ignore:n.ignoreFocus,stopMousedown:n.ignoreFocus,onFocus:function(n){km(n)}}),sa.config({mode:"execution"}),Qf.config({store:{mode:"memory",initialValue:n.data}}),ad("item-type-events",u(xi(),[Er(Yn(),Tm),Er(fe(),ki.focus)]))]),components:n.components,eventOrder:n.eventOrder}}),hr("eventOrder",{})],_m=[fr("dom"),fr("components"),Qo("builder",function(n){return{dom:n.dom,components:n.components,events:Tr([(e=fe(),Er(e,function(n,e){e.stop()}))])};var e})],Dm=function(){return"item-widget"},Im=y([za({name:"widget",overrides:function(e){return{behaviours:Ur([Qf.config({store:{mode:"manual",getValue:function(n){return e.data},setValue:function(){}}})])}}})]),Fm=[fr("uid"),fr("data"),fr("components"),fr("dom"),hr("autofocus",!1),hr("ignoreFocus",!1),ga("widgetBehaviours",[Qf,ki,sa]),hr("domModification",{}),Za(Im()),Qo("builder",function(t){var n=qa(Dm(),t,Im()),e=Ya(Dm(),t,n.internals()),r=function(n){return Ka(n,t,"widget").map(function(n){return sa.focusIn(n),n})},o=function(n,e){return Pu(e.event().target())||t.autofocus&&e.setSource(n.element()),O.none()};return{dom:t.dom,components:e,domModification:t.domModification,events:Tr([Br(function(n,e){r(n).each(function(n){e.stop()})}),Er(Yn(),Tm),Er(fe(),function(n,e){t.autofocus?r(n):ki.focus(n)})]),behaviours:pa(t.widgetBehaviours,[Qf.config({store:{mode:"memory",initialValue:t.data}}),ki.config({ignore:t.ignoreFocus,onFocus:function(n){km(n)}}),sa.config({mode:"special",focusIn:t.autofocus?function(n){r(n)}:Yr(),onLeft:o,onRight:o,onEscape:function(n,e){return ki.isFocused(n)||t.autofocus?(t.autofocus&&e.setSource(n.element()),O.none()):(ki.focus(n),O.some(!0))}})])}})],Rm=ur("type",{widget:Fm,item:Mm,separator:_m}),Vm=y([Ga({factory:{sketch:function(n){var e=or("menu.spec item",Rm,n);return e.builder(e)}},name:"items",unit:"item",defaults:function(n,e){return e.hasOwnProperty("uid")?e:x(x({},e),{uid:sf("item")})},overrides:function(n,e){return{type:e.type,ignoreFocus:n.fakeFocus,domModification:{classes:[n.markers.item]}}}})]),Bm=y([fr("value"),fr("items"),fr("dom"),fr("components"),hr("eventOrder",{}),la("menuBehaviours",[Ou,Qf,ld,sa]),vr("movement",{mode:"menu",moveOnTab:!0},ur("mode",{grid:[ni(),Qo("config",function(n,e){return{mode:"flatgrid",selector:"."+n.markers.item,initSize:{numColumns:e.initSize.numColumns,numRows:e.initSize.numRows},focusManager:n.focusManager}})],matrix:[Qo("config",function(n,e){return{mode:"matrix",selectors:{row:e.rowSelector,cell:"."+n.markers.item},focusManager:n.focusManager}}),fr("rowSelector")],menu:[hr("moveOnTab",!0),Qo("config",function(n,e){return{mode:"menu",selector:"."+n.markers.item,moveOnTab:e.moveOnTab,focusManager:n.focusManager}})]})),sr("markers",Uo()),hr("fakeFocus",!1),hr("focusManager",ku()),qo("onHighlight")]),Am=y("alloy.menu-focus"),jm=xf({name:"Menu",configFields:Bm(),partFields:Vm(),factory:function(n,e,t,r){return{uid:n.uid,dom:n.dom,markers:n.markers,behaviours:ma(n.menuBehaviours,[Ou.config({highlightClass:n.markers.selectedItem,itemClass:n.markers.item,onHighlight:n.onHighlight}),Qf.config({store:{mode:"memory",initialValue:n.value}}),ld.config({find:O.some}),sa.config(n.movement.config(n,n.movement))]),events:Tr([Er(Cm(),function(e,t){var n=t.event();e.getSystem().getByDom(n.target()).each(function(n){Ou.highlight(e,n),t.stop(),be(e,Am(),{menu:e,item:n})})}),Er(Em(),function(n,e){var t=e.event().item();Ou.highlight(n,t)})]),components:e,eventOrder:n.eventOrder,domModification:{attributes:{role:"menu"}}}}}),Hm=function(n,t){var r=je(t),e=Oo(r).bind(function(e){var o,i,n=function(n){return Ae(e,n)};return n(t)?O.some(t):(o=n,(i=function(n){for(var e=0;e<n.childNodes.length;e++){var t=Te.fromDom(n.childNodes[e]);if(o(t))return O.some(t);var r=i(n.childNodes[e]);if(r.isSome())return r}return O.none()})(t.dom()))}),o=n(t);return e.each(function(e){Oo(r).filter(function(n){return Ae(n,e)}).fold(function(){wo(e)},w)}),o},Nm=function(n,e,t,r){var o=n.getSystem().build(r);Qe(n,o,t)},Pm=function(n,e,t,r){var o=zm(n);bn(o,function(n){return Ae(r.element(),n.element())}).each(Ze)},zm=function(n,e){return n.components()},Lm=function(e,n,t,o,r){var i=zm(e);return O.from(i[o]).map(function(n){return Pm(e,0,0,n),r.each(function(n){Nm(e,0,function(n,e){var t,r;r=e,Pe(t=n,o).fold(function(){$e(t,r)},function(n){ze(n,r)})},n)}),n})},Gm=Xr({fields:[],name:"replacing",apis:/* */Object.freeze({__proto__:null,append:function(n,e,t,r){Nm(n,0,$e,r)},prepend:function(n,e,t,r){Nm(n,0,Ge,r)},remove:Pm,replaceAt:Lm,replaceBy:function(e,n,t,r,o){var i=zm(e);return xn(i,r).bind(function(n){return Lm(e,0,0,n,o)})},set:function(e,n,t,r){Hm(function(){var n=gn(r,e.getSystem().build);Je(e,n)},e.element())},contents:zm})}),$m=function(t,r,o,n){return I(o,n).bind(function(n){return I(t,n).bind(function(n){var e=$m(t,r,o,n);return O.some([n].concat(e))})}).getOr([])},Um=function(n,e){var t={};E(n,function(n,e){pn(n,function(n){t[n]=e})});var r=e,o=M(e,function(n,e){return{k:n,v:e}}),i=C(o,function(n,e){return[e].concat($m(t,r,o,e))});return C(t,function(n){return I(i,n).getOr([n])})},Wm=function(n){return"prepared"===n.type?O.some(n.menu):O.none()},Xm={init:function(){var i=ho({}),u=ho({}),c=ho({}),a=ho(O.none()),f=ho({}),s=function(t){return function(n,e){for(var t=T(n),r=0,o=t.length;r<o;r++){var i=t[r],u=n[i];if(e(u,i,n))return O.some(u)}return O.none()}(i.get(),function(n,e){return n===t})},l=function(n){return e(n).bind(Wm)},e=function(n){return I(u.get(),n)},t=function(n){return I(i.get(),n)};return{setMenuBuilt:function(n,e){var t;u.set(x(x({},u.get()),((t={})[n]={type:"prepared",menu:e},t)))},setContents:function(n,e,t,r){a.set(O.some(n)),i.set(t),u.set(e),f.set(r);var o=Um(r,t);c.set(o)},expand:function(t){return I(i.get(),t).map(function(n){var e=I(c.get(),t).getOr([]);return[n].concat(e)})},refresh:function(n){return I(c.get(),n)},collapse:function(n){return I(c.get(),n).bind(function(n){return 1<n.length?O.some(n.slice(1)):O.none()})},lookupMenu:e,lookupItem:t,otherMenus:function(n){var e=f.get();return kn(T(e),n)},getPrimary:function(){return a.get().bind(l)},getMenus:function(){return u.get()},clear:function(){i.set({}),u.set({}),c.set({}),a.set(O.none())},isClear:function(){return a.get().isNone()},getTriggeringPath:function(n,u){var e=hn(t(n).toArray(),function(n){return l(n).isSome()});return I(c.get(),n).bind(function(n){var i=Tn(e.concat(n));return function(n){for(var e=[],t=0;t<n.length;t++){var r=n[t];if(!r.isSome())return O.none();e.push(r.getOrDie())}return O.some(e)}(Sn(i,function(n,e){return t=n,r=u,o=i.slice(0,e+1),l(t).bind(function(e){return s(t).bind(function(n){return r(n).map(function(n){return{triggeredMenu:e,triggeringItem:n,triggeringPath:o}})})}).fold(function(){return a.get().is(n)?[]:[O.none()]},function(n){return[O.some(n)]});var t,r,o}))})}}},extractPreparedMenu:Wm},qm=y("collapse-item"),Ym=bf({name:"TieredMenu",configFields:[Jo("onExecute"),Jo("onEscape"),Ko("onOpenMenu"),Ko("onOpenSubmenu"),qo("onRepositionMenu"),qo("onCollapseMenu"),hr("highlightImmediately",!0),lr("data",[fr("primary"),fr("menus"),fr("expansions")]),hr("fakeFocus",!1),qo("onHighlight"),qo("onHover"),lr("markers",[fr("backgroundMenu")].concat(Go()).concat($o())),fr("dom"),hr("navigateOnHover",!0),hr("stayInDom",!1),la("tmenuBehaviours",[sa,Ou,ld,Gm]),hr("eventOrder",{})],apis:{collapseMenu:function(n,e){n.collapseMenu(e)},highlightPrimary:function(n,e){n.highlightPrimary(e)},repositionMenus:function(n,e){n.repositionMenus(e)}},factory:function(c,n){var a,e,i=ho(O.none()),o=function(r,o,n){return C(n,function(n,e){var t=function(){return jm.sketch(x(x({dom:n.dom},n),{value:e,items:n.items,markers:c.markers,fakeFocus:c.fakeFocus,onHighlight:c.onHighlight,focusManager:c.fakeFocus?{get:o=function(n){return Ou.getHighlighted(n).map(function(n){return n.element()})},set:function(e,n){var t=o(e);e.getSystem().getByDom(n).fold(w,function(n){Ou.highlight(e,n)});var r=o(e);Tu(e,t,r)}}:ku()}));var o};return e===o?{type:"prepared",menu:r.getSystem().build(t())}:{type:"notbuilt",nbMenu:t}})},f=Xm.init(),s=function(n){return Qf.getValue(n).value},u=function(n){return C(c.data.menus,function(n,e){return Sn(n.items,function(n){return"separator"===n.type?[]:[n.data.value]})})},l=function(e,n){Ou.highlight(e,n),Ou.getHighlighted(n).orThunk(function(){return Ou.getFirst(n)}).each(function(n){we(e,n.element(),fe())})},d=function(e,n){return su(gn(n,function(n){return e.lookupMenu(n).bind(function(n){return"prepared"===n.type?O.some(n.menu):O.none()})}))},m=function(e,n,t){var r=d(n,n.otherMenus(t));pn(r,function(n){sm(n.element(),[c.markers.backgroundMenu]),c.stayInDom||Gm.remove(e,n)})},g=function(n,r){var o,e=(o=n,i.get().getOrThunk(function(){var t={},n=Li(o.element(),"."+c.markers.item),e=hn(n,function(n){return"true"===Zr(n,"aria-haspopup")});return pn(e,function(n){o.getSystem().getByDom(n).each(function(n){var e=s(n);t[e]=n})}),i.set(O.some(t)),t}));E(e,function(n,e){var t=dn(r,e);Jr(n.element(),"aria-expanded",t)})},p=function(r,o,i){return O.from(i[0]).bind(function(n){return o.lookupMenu(n).bind(function(n){if("notbuilt"===n.type)return O.none();var e=n.menu,t=d(o,i.slice(1));return pn(t,function(n){co(n.element(),c.markers.backgroundMenu)}),_e(e.element())||Gm.append(r,wm(e)),sm(e.element(),[c.markers.backgroundMenu]),l(r,e),m(r,o,i),O.some(e)})})};(e=a=a||{})[e.HighlightSubmenu=0]="HighlightSubmenu",e[e.HighlightParent=1]="HighlightParent";var h=function(o,i,u){void 0===u&&(u=a.HighlightSubmenu);var n=s(i);return f.expand(n).bind(function(r){return g(o,r),O.from(r[0]).bind(function(t){return f.lookupMenu(t).bind(function(n){var e=function(n,e,t){if("notbuilt"!==t.type)return t.menu;var r=n.getSystem().build(t.nbMenu());return f.setMenuBuilt(e,r),r}(o,t,n);return _e(e.element())||Gm.append(o,wm(e)),c.onOpenSubmenu(o,i,e,Tn(r)),u===a.HighlightSubmenu?(Ou.highlightFirst(e),p(o,f,r)):(Ou.dehighlightAll(e),O.some(i))})})})},r=function(e,t){var n=s(t);return f.collapse(n).bind(function(n){return g(e,n),p(e,f,n).map(function(n){return c.onCollapseMenu(e,t,n),n})})},t=function(t){return function(e,n){return Wi(n.getSource(),"."+c.markers.item).bind(function(n){return e.getSystem().getByDom(n).toOption().bind(function(n){return t(e,n).map(function(){return!0})})})}},v=Tr([Er(Am(),function(t,r){var n=r.event().item();f.lookupItem(s(n)).each(function(){var n=r.event().menu();Ou.highlight(t,n);var e=s(r.event().item());f.refresh(e).each(function(n){return m(t,f,n)})})}),Br(function(e,n){var t=n.event().target();e.getSystem().getByDom(t).each(function(n){0===s(n).indexOf("collapse-item")&&r(e,n),h(e,n,a.HighlightSubmenu).fold(function(){c.onExecute(e,n)},function(){})})}),Fr(function(e,n){var t,r;t=o(e,c.data.primary,c.data.menus),r=u(),f.setContents(c.data.primary,t,c.data.expansions,r),f.getPrimary().each(function(n){Gm.append(e,wm(n)),c.onOpenMenu(e,n),c.highlightImmediately&&l(e,n)})})].concat(c.navigateOnHover?[Er(Em(),function(n,e){var t,r,o=e.event().item();t=n,r=s(o),f.refresh(r).bind(function(n){return g(t,n),p(t,f,n)}),h(n,o,a.HighlightParent),c.onHover(n,o)})]:[])),y=function(n){return Ou.getHighlighted(n).bind(Ou.getHighlighted)},b={collapseMenu:function(e){y(e).each(function(n){r(e,n)})},highlightPrimary:function(e){f.getPrimary().each(function(n){l(e,n)})},repositionMenus:function(r){f.getPrimary().bind(function(e){return y(r).bind(function(n){var e,t=s(n),r=(e=f.getMenus(),D(e,function(n){return n})),o=su(gn(r,Xm.extractPreparedMenu));return f.getTriggeringPath(t,function(n){return t=n,Cn(o,function(n){if(!n.getSystem().isConnected())return O.none();var e=Ou.getCandidates(n);return bn(e,function(n){return s(n)===t})});var t})}).map(function(n){return{primary:e,triggeringPath:n}})}).fold(function(){var n;n=r,O.from(n.components()[0]).filter(function(n){return"menu"===Zr(n.element(),"role")}).each(function(n){c.onRepositionMenu(r,n,[])})},function(n){var e=n.primary,t=n.triggeringPath;c.onRepositionMenu(r,e,t)})}};return{uid:c.uid,dom:c.dom,markers:c.markers,behaviours:ma(c.tmenuBehaviours,[sa.config({mode:"special",onRight:t(function(n,e){return Pu(e.element())?O.none():h(n,e,a.HighlightSubmenu)}),onLeft:t(function(n,e){return Pu(e.element())?O.none():r(n,e)}),onEscape:t(function(n,e){return r(n,e).orThunk(function(){return c.onEscape(n,e).map(function(){return n})})}),focusIn:function(e,n){f.getPrimary().each(function(n){we(e,n.element(),fe())})}}),Ou.config({highlightClass:c.markers.selectedMenu,itemClass:c.markers.menu}),ld.config({find:function(n){return Ou.getHighlighted(n)}}),Gm.config({})]),eventOrder:c.eventOrder,apis:b,events:v}},extraApis:{tieredData:function(n,e,t){return{primary:n,menus:e,expansions:t}},singleData:function(n,e){return{primary:n,menus:Ft(n,e),expansions:{}}},collapseItem:function(n){return{value:Ea(qm()),meta:{text:n}}}}}),Km=function(n,e,t,r){return I(e.routes,r.start).bind(function(n){return I(n,r.destination)})},Jm=function(n,e,t,r){return Km(0,e,0,r).bind(function(e){return e.transition.map(function(n){return{transition:n,route:e}})})},Qm=function(t,r,n){var e,o,i;i=n,Zm(e=t,o=r).bind(function(n){return Jm(e,o,i,n)}).each(function(n){var e=n.transition;fo(t.element(),e.transitionClass),to(t.element(),r.destinationAttr)})},Zm=function(e,t,n){var r=e.element();return no(r,t.destinationAttr).map(function(n){return{start:Zr(e.element(),t.stateAttr),destination:n}})},ng=function(n,e,t,r){Qm(n,e,t),eo(n.element(),e.stateAttr)&&Zr(n.element(),e.stateAttr)!==r&&e.onFinish(n,r),Jr(n.element(),e.stateAttr,r)},eg=/* */Object.freeze({__proto__:null,findRoute:Km,disableTransition:Qm,getCurrentRoute:Zm,jumpTo:ng,progressTo:function(t,r,o,i){var e,u;u=r,eo((e=t).element(),u.destinationAttr)&&(no(e.element(),u.destinationAttr).each(function(n){Jr(e.element(),u.stateAttr,n)}),to(e.element(),u.destinationAttr));var n,c,a=(n=r,c=i,{start:Zr(t.element(),n.stateAttr),destination:c});Jm(t,r,o,a).fold(function(){ng(t,r,o,i)},function(n){Qm(t,r,o);var e=n.transition;co(t.element(),e.transitionClass),Jr(t.element(),r.destinationAttr,i)})},getState:function(n,e,t){return no(n.element(),e.stateAttr)}}),tg=/* */Object.freeze({__proto__:null,events:function(o,i){return Tr([Er(ee(),function(t,n){var r=n.event().raw();Zm(t,o).each(function(e){Km(0,o,0,e).each(function(n){n.transition.each(function(n){r.propertyName===n.property&&(ng(t,o,i,e.destination),o.onTransition(t,e))})})})}),Fr(function(n,e){ng(n,o,i,o.initialState)})])}}),rg=[hr("destinationAttr","data-transitioning-destination"),hr("stateAttr","data-transitioning-state"),fr("initialState"),qo("onTransition"),qo("onFinish"),sr("routes",er(rt.value,er(rt.value,Ut([pr("transition",[fr("property"),fr("transitionClass")])]))))],og=Xr({fields:rg,name:"transitioning",active:tg,apis:eg,extra:{createRoutes:function(n){var r={};return E(n,function(n,e){var t=e.split("<->");r[t[0]]=Ft(t[1],n),r[t[1]]=Ft(t[0],n)}),r},createBistate:function(n,e,t){return Rt([{key:n,value:Ft(e,t)},{key:e,value:Ft(n,t)}])},createTristate:function(n,e,t,r){return Rt([{key:n,value:Rt([{key:e,value:r},{key:t,value:r}])},{key:e,value:Rt([{key:n,value:r},{key:t,value:r}])},{key:t,value:Rt([{key:n,value:r},{key:e,value:r}])}])}}}),ig=bi("scrollable"),ug=function(n){co(n,ig)},cg=function(n){fo(n,ig)},ag=ig,fg=function(n){return I(n,"format").getOr(n.title)},sg=function(n,e,t,r,o){return{data:{value:n,text:e},type:"item",dom:{tag:"div",classes:o?[bi("styles-item-is-menu")]:[]},toggling:{toggleOnExecute:!1,toggleClass:bi("format-matches"),selected:t},itemBehaviours:Ur(o?[]:[pi(n,function(n,e){(e?gi.on:gi.off)(n)})]),components:[{dom:{tag:"div",attributes:{style:r},innerHtml:e}}]}},lg=function(n,e,t,r){return{value:n,dom:{tag:"div"},components:[wf.sketch({dom:{tag:"div",classes:[bi("styles-collapser")]},components:r?[{dom:{tag:"span",classes:[bi("styles-collapse-icon")]}},vm(n)]:[vm(n)],action:function(n){if(r){var e=t().get(n);Ym.collapseMenu(e)}}}),{dom:{tag:"div",classes:[bi("styles-menu-items-container")]},components:[jm.parts().items({})],behaviours:Ur([ad("adhoc-scrollable-menu",[Fr(function(n,e){Mi(n.element(),"overflow-y","auto"),Mi(n.element(),"-webkit-overflow-scrolling","touch"),ug(n.element())}),Rr(function(n){Ri(n.element(),"overflow-y"),Ri(n.element(),"-webkit-overflow-scrolling"),cg(n.element())})])])}],items:e,menuBehaviours:Ur([og.config({initialState:"after",routes:og.createTristate("before","current","after",{transition:{property:"transform",transitionClass:"transitioning"}})})])}},dg=function(r){var o,i,n,e,t,u=(o=r.formats,i=function(){return c},n=lg("Styles",[].concat(gn(o.items,function(n){return sg(fg(n),n.title,n.isSelected(),n.getPreview(),R(o.expansions,fg(n)))})),i,!1),e=C(o.menus,function(n,e){var t=gn(n,function(n){return sg(fg(n),n.title,n.isSelected!==undefined&&n.isSelected(),n.getPreview!==undefined?n.getPreview():"",R(o.expansions,fg(n)))});return lg(e,t,i,!0)}),t=ct(e,Ft("styles",n)),{tmenu:Ym.tieredData("styles",t,o.expansions)}),c=zl(Ym.sketch({dom:{tag:"div",classes:[bi("styles-menu")]},components:[],fakeFocus:!0,stayInDom:!0,onExecute:function(n,e){var t=Qf.getValue(e);return r.handle(e,t.value),O.none()},onEscape:function(){return O.none()},onOpenMenu:function(n,e){var t=es(n.element());ns(e.element(),t),og.jumpTo(e,"current")},onOpenSubmenu:function(n,e,t){var r=es(n.element()),o=$i(e.element(),'[role="menu"]').getOrDie("hacky"),i=n.getSystem().getByDom(o).getOrDie();ns(t.element(),r),og.progressTo(i,"before"),og.jumpTo(t,"after"),og.progressTo(t,"current")},onCollapseMenu:function(n,e,t){var r=$i(e.element(),'[role="menu"]').getOrDie("hacky"),o=n.getSystem().getByDom(r).getOrDie();og.progressTo(o,"after"),og.progressTo(t,"current")},navigateOnHover:!1,highlightImmediately:!0,data:u.tmenu,markers:{backgroundMenu:bi("styles-background-menu"),menu:bi("styles-menu"),selectedMenu:bi("styles-selected-menu"),item:bi("styles-item"),selectedItem:bi("styles-selected-item")}}));return c.asSpec()},mg=function(n){return R(n,"items")?(t=ct(It(e=n,["items"]),{menu:!0}),r=gg(e.items),{item:t,menus:ct(r.menus,Ft(e.title,r.items)),expansions:ct(r.expansions,Ft(e.title,e.title))}):{item:n,menus:{},expansions:{}};var e,t,r},gg=function(n){return vn(n,function(n,e){var t=mg(e);return{menus:ct(n.menus,t.menus),items:[t.item].concat(n.items),expansions:ct(n.expansions,t.expansions)}},{menus:{},expansions:{},items:[]})},pg=function(u,n){var c=function(n){return function(){return u.formatter.match(n)}},a=function(n){return function(){return u.formatter.getCssText(n)}},e=I(n,"style_formats").getOr(Xd),f=function(n){return gn(n,function(n){if(R(n,"items")){var e=f(n.items);return ct(ct(n,{isSelected:y(!1),getPreview:y("")}),{items:e})}return R(n,"format")?ct(i=n,{isSelected:c(i.format),getPreview:a(i.format)}):(r=Ea((t=n).title),o=ct(t,{format:r,isSelected:c(r),getPreview:a(r)}),u.formatter.register(r,o),o);var t,r,o,i})};return f(e)},hg=function(t,n,r){var e,o,i,u=(e=t,i=(o=function(n){return Sn(n,function(n){return n.items===undefined?!R(n,"format")||e.formatter.canApply(n.format)?[n]:[]:0<o(n.items).length?[n]:[]})})(n),gg(i));return dg({formats:u,handle:function(n,e){t.undoManager.transact(function(){gi.isOn(n)?t.formatter.remove(e):t.formatter.apply(e)}),r()}})},vg=["undo","bold","italic","link","image","bullist","styleselect"],yg=function(n){var e=n.replace(/\|/g," ").trim();return 0<e.length?e.split(/\s+/):[]},bg=function(n){return Sn(n,function(n){return(on(n)?bg:yg)(n)})},xg=function(t,o){var n=function(t){return function(){return _f(e=t,function(){n.execCommand(e)},{},n=o);var n,e}},e=function(r){return function(){return n=o,t=Ef(e=r),_f(e,function(){n.execCommand(e)},t,n);var n,e,t}},r=function(n,e,t){return function(){return Cf(o,n,e,t)}},i=n("undo"),u=n("redo"),c=e("bold"),a=e("italic"),f=e("underline"),s=n("removeformat"),l=r("unlink","link",function(){o.execCommand("unlink",null,!1)}),d=r("unordered-list","ul",function(){o.execCommand("InsertUnorderedList",null,!1)}),m=r("ordered-list","ol",function(){o.execCommand("InsertOrderedList",null,!1)}),g=pg(o,o.settings),p=function(){return hg(o,g,function(){o.fire("scrollIntoView")})},h=function(n,e){return{isSupported:function(){var e=o.ui.registry.getAll().buttons;return n.forall(function(n){return R(e,n)})},sketch:e}};return{undo:h(O.none(),i),redo:h(O.none(),u),bold:h(O.none(),c),italic:h(O.none(),a),underline:h(O.none(),f),removeformat:h(O.none(),s),link:h(O.none(),function(){return Wd(t,o)}),unlink:h(O.none(),l),image:h(O.none(),function(){return Ql(o)}),bullist:h(O.some("bullist"),d),numlist:h(O.some("numlist"),m),fontsizeselect:h(O.none(),function(){return n={onChange:function(n){Hl(e,n)},getInitialValue:function(){return jl(e)}},Dl(t,"font-size",function(){return Pl(n)},e=o);var e,n}),forecolor:h(O.none(),function(){return n={onChange:function(n,e,t){r.undoManager.transact(function(){r.formatter.apply("forecolor",{value:t}),r.nodeChanged()})},getInitialValue:function(){return-1}},Dl(t,"color-levels",function(){return Il(n)},r=o);var r,n}),styleselect:h(O.none(),function(){return _f("style-formats",function(n){o.fire("toReading"),t.dropup().appear(p,gi.on,n)},Ur([gi.config({toggleClass:bi("toolbar-button-selected"),toggleOnExecute:!1,aria:{mode:"pressed"}}),ti.config({channels:Rt([vi(Mo,gi.off),vi(_o,gi.off)])})]),o)})}},wg=function(n,t){var e,r,o=(r=(e=n).toolbar!==undefined?e.toolbar:vg,(on(r)?bg:yg)(r)),i={};return Sn(o,function(n){var e=!R(i,n)&&R(t,n)&&t[n].isSupported()?[t[n].sketch()]:[];return i[n]=!0,e})},Sg=function(n){var e,t,r,o,i,u,c,a=Te.fromDom(n.target),f=function(){return n.stopPropagation()},s=function(){return n.preventDefault()},l=d(s,f);return e=a,t=n.clientX,r=n.clientY,o=f,i=s,u=l,c=n,{target:y(e),x:y(t),y:y(r),stop:o,prevent:i,kill:u,raw:y(c)}},Og=function(n,e,t,r,o){var i,u,c=(i=t,u=r,function(n){i(n)&&u(Sg(n))});return n.dom().addEventListener(e,c,o),{unbind:S(Tg,n,e,c,o)}},Tg=function(n,e,t,r){n.dom().removeEventListener(e,t,r)},kg=y(!0),Eg=function(n,e,t){return Og(n,e,kg,t,!1)},Cg=function(n,e,t){return Og(n,e,kg,t,!0)},Mg=tinymce.util.Tools.resolve("tinymce.util.Delay"),_g=function(n){var e=n.matchMedia("(orientation: portrait)").matches;return{isPortrait:y(e)}},Dg=function(r,e){var n=Te.fromDom(r),o=null,t=Eg(n,"orientationchange",function(){Mg.clearInterval(o);var n=_g(r);e.onChange(n),i(function(){e.onReady(n)})}),i=function(n){Mg.clearInterval(o);var e=r.innerHeight,t=0;o=Mg.setInterval(function(){e!==r.innerHeight?(Mg.clearInterval(o),n(O.some(r.innerHeight))):20<t&&(Mg.clearInterval(o),n(O.none())),t++},50)};return{onAdjustment:i,destroy:function(){t.unbind()}}};var Ig=function(n){var e=n.raw();return e.touches===undefined||1!==e.touches.length?O.none():O.some(e.touches[0])},Fg=function(t){var u=ho(O.none()),r=ho(!1),o=function n(t,r){var o=null;return{cancel:function(){null!==o&&(v.clearTimeout(o),o=null)},schedule:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];o=v.setTimeout(function(){t.apply(null,n),o=null},r)}}}(function(n){t.triggerEvent(le(),n),r.set(!0)},400),i=Rt([{key:Gn(),value:function(t){return Ig(t).each(function(n){o.cancel();var e={x:n.clientX,y:n.clientY,target:t.target()};o.schedule(t),r.set(!1),u.set(O.some(e))}),O.none()}},{key:$n(),value:function(n){return o.cancel(),Ig(n).each(function(i){u.get().each(function(n){var e,t,r,o;e=i,t=n,r=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y),(5<r||5<o)&&u.set(O.none())})}),O.none()}},{key:Un(),value:function(e){o.cancel();return u.get().filter(function(n){return Ae(n.target,e.target())}).map(function(n){return r.get()?(e.prevent(),!1):t.triggerEvent(se(),e)})}}]);return{fireIfReady:function(e,n){return I(i,n).bind(function(n){return n(e)})}}},Rg=function(t){var e=Fg({triggerEvent:function(n,e){t.onTapContent(e)}});return{fireTouchstart:function(n){e.fireIfReady(n,"touchstart")},onTouchend:function(){return Eg(t.body(),"touchend",function(n){e.fireIfReady(n,"touchend")})},onTouchmove:function(){return Eg(t.body(),"touchmove",function(n){e.fireIfReady(n,"touchmove")})}}},Vg=6<=Ln().os.version.major,Bg=function(r,e,t){var o=Rg(r),i=je(e),u=function(n){return!Ae(n.start(),n.finish())||n.soffset()!==n.foffset()},n=function(){var n=r.doc().dom().hasFocus()&&r.getSelection().exists(u);t.getByDom(e).each(!0===(n||Oo(i).filter(function(n){return"input"===ke(n)}).exists(function(n){return n.dom().selectionStart!==n.dom().selectionEnd}))?gi.on:gi.off)},c=[Eg(r.body(),"touchstart",function(n){r.onTouchContent(),o.fireTouchstart(n)}),o.onTouchmove(),o.onTouchend(),Eg(e,"touchstart",function(n){r.onTouchToolstrip()}),r.onToReading(function(){So(r.body())}),r.onToEditing(w),r.onScrollToCursor(function(n){n.preventDefault(),r.getCursorBox().each(function(n){var e=r.win(),t=n.top()>e.innerHeight||n.bottom()>e.innerHeight?n.bottom()-e.innerHeight+50:0;0!=t&&e.scrollTo(e.pageXOffset,e.pageYOffset+t)})})].concat(!0==Vg?[]:[Eg(Te.fromDom(r.win()),"blur",function(){t.getByDom(e).each(gi.off)}),Eg(i,"select",n),Eg(r.doc(),"selectionchange",n)]);return{destroy:function(){pn(c,function(n){n.unbind()})}}},Ag=function(n,e){var t=parseInt(Zr(n,e),10);return isNaN(t)?0:t};var jg,Hg,Ng=function _v(t,r){var e=function(n){return t(n)?O.from(n.dom().nodeValue):O.none()};return{get:function(n){if(!t(n))throw new Error("Can only get "+r+" value of a "+r+" node");return e(n).getOr("")},getOption:e,set:function(n,e){if(!t(n))throw new Error("Can only set raw "+r+" value of a "+r+" node");n.dom().nodeValue=e}}}(Me,"text"),Pg=function(n){return"img"===ke(n)?1:(e=n,Ng.getOption(e).fold(function(){return Ne(n).length},function(n){return n.length}));var e},zg=function(n,e,t,r){return{start:y(n),soffset:y(e),finish:y(t),foffset:y(r)}},Lg=ot([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Gg={before:Lg.before,on:Lg.on,after:Lg.after,cata:function(n,e,t,r){return n.fold(e,t,r)},getStart:function(n){return n.fold(b,b,b)}},$g=ot([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Ug={domRange:$g.domRange,relative:$g.relative,exact:$g.exact,exactFromRange:function(n){return $g.exact(n.start(),n.soffset(),n.finish(),n.foffset())},getWin:function(n){var e,t=n.match({domRange:function(n){return Te.fromDom(n.startContainer)},relative:function(n,e){return Gg.getStart(n)},exact:function(n,e,t,r){return n}});return e=t,Te.fromDom(e.dom().ownerDocument.defaultView)},range:zg},Wg=function(n,e,t){var r,o,i=n.document.createRange();return r=i,e.fold(function(n){r.setStartBefore(n.dom())},function(n,e){r.setStart(n.dom(),e)},function(n){r.setStartAfter(n.dom())}),o=i,t.fold(function(n){o.setEndBefore(n.dom())},function(n,e){o.setEnd(n.dom(),e)},function(n){o.setEndAfter(n.dom())}),i},Xg=function(n,e,t,r,o){var i=n.document.createRange();return i.setStart(e.dom(),t),i.setEnd(r.dom(),o),i},qg=function(n){return{left:y(n.left),top:y(n.top),right:y(n.right),bottom:y(n.bottom),width:y(n.width),height:y(n.height)}},Yg=ot([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Kg=function(n,e,t){return e(Te.fromDom(t.startContainer),t.startOffset,Te.fromDom(t.endContainer),t.endOffset)},Jg=function(n,e){var o,t,r,i=(o=n,e.match({domRange:function(n){return{ltr:y(n),rtl:O.none}},relative:function(n,e){return{ltr:V(function(){return Wg(o,n,e)}),rtl:V(function(){return O.some(Wg(o,e,n))})}},exact:function(n,e,t,r){return{ltr:V(function(){return Xg(o,n,e,t,r)}),rtl:V(function(){return O.some(Xg(o,t,r,n,e))})}}}));return(r=(t=i).ltr()).collapsed?t.rtl().filter(function(n){return!1===n.collapsed}).map(function(n){return Yg.rtl(Te.fromDom(n.endContainer),n.endOffset,Te.fromDom(n.startContainer),n.startOffset)}).getOrThunk(function(){return Kg(0,Yg.ltr,r)}):Kg(0,Yg.ltr,r)},Qg=(Yg.ltr,Yg.rtl,function(n,e){var t=ke(n);return"input"===t?Gg.after(n):dn(["br","img"],t)?0===e?Gg.before(n):Gg.after(n):Gg.on(n,e)}),Zg=function(n,e,t,r){var o,i,u,c,a,f=(i=e,u=t,c=r,(a=je(o=n).dom().createRange()).setStart(o.dom(),i),a.setEnd(u.dom(),c),a),s=Ae(n,t)&&e===r;return f.collapsed&&!s},np=function(n,e,t,r,o){var i,u,c=Xg(n,e,t,r,o);i=n,u=c,O.from(i.getSelection()).each(function(n){n.removeAllRanges(),n.addRange(u)})},ep=function(l,n){return Jg(l,n).match({ltr:function(n,e,t,r){np(l,n,e,t,r)},rtl:function(n,e,t,r){var o,i,u,c,a,f=l.getSelection();if(f.setBaseAndExtent)f.setBaseAndExtent(n.dom(),e,t.dom(),r);else if(f.extend)try{i=n,u=e,c=t,a=r,(o=f).collapse(i.dom(),u),o.extend(c.dom(),a)}catch(s){np(l,t,r,n,e)}else np(l,t,r,n,e)}})},tp=function(n,e,t,r,o){var i,u,c,a,f=(i=r,u=o,c=Qg(e,t),a=Qg(i,u),Ug.relative(c,a));ep(n,f)},rp=function(n){var e=Te.fromDom(n.anchorNode),t=Te.fromDom(n.focusNode);return Zg(e,n.anchorOffset,t,n.focusOffset)?O.some(zg(e,n.anchorOffset,t,n.focusOffset)):function(n){if(0<n.rangeCount){var e=n.getRangeAt(0),t=n.getRangeAt(n.rangeCount-1);return O.some(zg(Te.fromDom(e.startContainer),e.startOffset,Te.fromDom(t.endContainer),t.endOffset))}return O.none()}(n)},op=function(n){return O.from(n.getSelection()).filter(function(n){return 0<n.rangeCount}).bind(rp)},ip=function(n,e){var i,t,r,o,u=Jg(i=n,e).match({ltr:function(n,e,t,r){var o=i.document.createRange();return o.setStart(n.dom(),e),o.setEnd(t.dom(),r),o},rtl:function(n,e,t,r){var o=i.document.createRange();return o.setStart(t.dom(),r),o.setEnd(n.dom(),e),o}});return r=(t=u).getClientRects(),0<(o=0<r.length?r[0]:t.getBoundingClientRect()).width||0<o.height?O.some(o).map(qg):O.none()},up=function(n){return{left:n.left,top:n.top,right:n.right,bottom:n.bottom,width:y(2),height:n.height}},cp=function(n){return{left:y(n.left),top:y(n.top),right:y(n.right),bottom:y(n.bottom),width:y(n.width),height:y(n.height)}},ap=function(n){var e=n.getSelection();return e!==undefined&&0<e.rangeCount?function(t){if(t.collapsed){var r=Te.fromDom(t.startContainer);return He(r).bind(function(n){var e=Ug.exact(r,t.startOffset,n,Pg(n));return ip(t.startContainer.ownerDocument.defaultView,e).map(up).map(En)}).getOr([])}return gn(t.getClientRects(),cp)}(e.getRangeAt(0)):[]},fp=function(n){n.focus();var e=Te.fromDom(n.document.body);(Oo().exists(function(n){return dn(["input","textarea"],ke(n))})?function(n){Mg.setTimeout(function(){n()},0)}:f)(function(){Oo().each(So),wo(e)})},sp="data-"+bi("last-outer-height"),lp=function(n,e){Jr(n,sp,e)},dp=function(n){return{top:y(n.top()),bottom:y(n.top()+n.height())}},mp=function(n,e){var t=Ag(e,sp),r=n.innerHeight;return r<t?O.some(t-r):O.none()},gp=function(n,u){var e=Te.fromDom(u.document.body),t=Eg(Te.fromDom(n),"resize",function(){mp(n,e).each(function(i){var n;(0<(n=ap(u)).length?O.some(n[0]).map(dp):O.none()).each(function(n){var e,t,r,o=(e=u,r=i,(t=n).top()>e.innerHeight||t.bottom()>e.innerHeight?Math.min(r,t.bottom()-e.innerHeight+50):0);0!==o&&u.scrollTo(u.pageXOffset,u.pageYOffset+o)})}),lp(e,n.innerHeight)});lp(e,n.innerHeight);return{toEditing:function(){fp(u)},destroy:function(){t.unbind()}}},pp=function(n){return O.from(n.dom().contentWindow)},hp=function(n){return pp(n).bind(op)},vp=function(n){return n.getFrame()},yp=function(n,e,t,r){return n[t].getOrThunk(function(){return function(n){return Eg(e,r,n)}})},bp=function(n){return{left:y(n.left),top:y(n.top),right:y(n.right),bottom:y(n.bottom),width:y(n.width),height:y(n.height)}},xp=function(c){var n,a=vp(c);return n=a,O.some(Te.fromDom(n.dom().contentWindow.document.body)).bind(function(u){return n=a,O.some(Te.fromDom(n.dom().contentWindow.document)).bind(function(i){return pp(a).map(function(o){var n=Te.fromDom(i.dom().documentElement),e=c.getCursorBox.getOrThunk(function(){return function(){return op(o).map(function(n){return Ug.exact(n.start(),n.soffset(),n.finish(),n.foffset())}).bind(function(n){return ip(o,n).orThunk(function(){return op(o).filter(function(n){return Ae(n.start(),n.finish())&&n.soffset()===n.foffset()}).bind(function(n){var e=n.start().dom().getBoundingClientRect();return 0<e.width||0<e.height?O.some(e).map(bp):O.none()})})})}}),t=c.setSelection.getOrThunk(function(){return function(n,e,t,r){tp(o,n,e,t,r)}}),r=c.clearSelection.getOrThunk(function(){return function(){o.getSelection().removeAllRanges()}});return{body:y(u),doc:y(i),win:y(o),html:y(n),getSelection:S(hp,a),setSelection:t,clearSelection:r,frame:y(a),onKeyup:yp(c,i,"onKeyup","keyup"),onNodeChanged:yp(c,i,"onNodeChanged","SelectionChange"),onDomChanged:c.onDomChanged,onScrollToCursor:c.onScrollToCursor,onScrollToElement:c.onScrollToElement,onToReading:c.onToReading,onToEditing:c.onToEditing,onToolbarScrollStart:c.onToolbarScrollStart,onTouchContent:c.onTouchContent,onTapContent:c.onTapContent,onTouchToolstrip:c.onTouchToolstrip,getCursorBox:e}})});var n})},wp=(jg="getWin",Hg=pp,function(e){return e[jg].getOrThunk(function(){var n=vp(e);return function(){return Hg(n)}})()}),Sp="data-ephox-mobile-fullscreen-style",Op="position:absolute!important;",Tp="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",kp=Ln().os.isAndroid(),Ep=function(n,e){var t,r,o,i=function(r){return function(n){var e=Zr(n,"style"),t=e===undefined?"no-styles":e.trim();t!==r&&(Jr(n,Sp,t),Jr(n,"style",r))}},u=(t="*",Pi(n,function(n){return Fe(n,t)},r)),c=Sn(u,function(n){return e="*",zi(n,function(n){return Fe(n,e)});var e}),a=(o=Di(e,"background-color"))!==undefined&&""!==o?"background-color:"+o+"!important":"background-color:rgb(255,255,255)!important;";pn(c,i("display:none!important;")),pn(u,i(Op+Tp+a)),i((!0===kp?"":Op)+Tp+a)(n)},Cp=function(){var n=Ve("["+Sp+"]");pn(n,function(n){var e=Zr(n,Sp);"no-styles"!==e?Jr(n,"style",e):to(n,"style"),to(n,Sp)})},Mp=function(){var e=Gi("head").getOrDie(),n=Gi('meta[name="viewport"]').getOrThunk(function(){var n=Te.fromTag("meta");return Jr(n,"name","viewport"),$e(e,n),n}),t=Zr(n,"content");return{maximize:function(){Jr(n,"content","width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0")},restore:function(){t!==undefined&&null!==t&&0<t.length?Jr(n,"content",t):Jr(n,"content","user-scalable=yes")}}},_p=function(t,r){var o=null;return{cancel:function(){null!==o&&(v.clearTimeout(o),o=null)},throttle:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];null!==o&&v.clearTimeout(o),o=v.setTimeout(function(){t.apply(null,n),o=null},r)}}},Dp=function(n,e){var t,r,o,i=zl(dd.sketch({dom:Tf('<div aria-hidden="true" class="${prefix}-mask-tap-icon"></div>'),containerBehaviours:Ur([gi.config({toggleClass:bi("mask-tap-icon-selected"),toggleOnExecute:!1})])})),u=(t=n,r=200,o=null,{cancel:function(){null!==o&&(v.clearTimeout(o),o=null)},throttle:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];null===o&&(o=v.setTimeout(function(){t.apply(null,n),o=null},r))}});return dd.sketch({dom:Tf('<div class="${prefix}-disabled-mask"></div>'),components:[dd.sketch({dom:Tf('<div class="${prefix}-content-container"></div>'),components:[wf.sketch({dom:Tf('<div class="${prefix}-content-tap-section"></div>'),components:[i.asSpec()],action:function(n){u.throttle()},buttonBehaviours:Ur([gi.config({toggleClass:bi("mask-tap-icon-selected")})])})]})]})},Ip=Wt([lr("editor",[fr("getFrame"),dr("getBody"),dr("getDoc"),dr("getWin"),dr("getSelection"),dr("setSelection"),dr("clearSelection"),dr("cursorSaver"),dr("onKeyup"),dr("onNodeChanged"),dr("getCursorBox"),fr("onDomChanged"),hr("onTouchContent",w),hr("onTapContent",w),hr("onTouchToolstrip",w),hr("onScrollToCursor",y({unbind:w})),hr("onScrollToElement",y({unbind:w})),hr("onToEditing",y({unbind:w})),hr("onToReading",y({unbind:w})),hr("onToolbarScrollStart",b)]),fr("socket"),fr("toolstrip"),fr("dropup"),fr("toolbar"),fr("container"),fr("alloy"),yr("win",function(n){return je(n.socket).dom().defaultView}),yr("body",function(n){return Te.fromDom(n.socket.dom().ownerDocument.body)}),hr("translate",b),hr("setReadOnly",w),hr("readOnlyOnInit",y(!0))]),Fp=function(n){var e=or("Getting AndroidWebapp schema",Ip,n);Mi(e.toolstrip,"width","100%");var t=xm(Dp(function(){e.setReadOnly(e.readOnlyOnInit()),f.enter()},e.translate));e.alloy.add(t);var r={show:function(){e.alloy.add(t)},hide:function(){e.alloy.remove(t)}};$e(e.container,t.element());var o,i,u,c,a,f=(o=e,i=r,u=Mp(),c=Ld(),a=Ld(),{enter:function(){i.hide(),co(o.container,bi("fullscreen-maximized")),co(o.container,bi("android-maximized")),u.maximize(),co(o.body,bi("android-scroll-reload")),c.set(gp(o.win,wp(o.editor).getOrDie("no"))),xp(o.editor).each(function(n){Ep(o.container,n.body()),a.set(Bg(n,o.toolstrip,o.alloy))})},exit:function(){u.restore(),i.show(),fo(o.container,bi("fullscreen-maximized")),fo(o.container,bi("android-maximized")),Cp(),fo(o.body,bi("android-scroll-reload")),a.clear(),c.clear()}});return{setReadOnly:e.setReadOnly,refreshStructure:w,enter:f.enter,exit:f.exit,destroy:w}},Rp=y([fr("dom"),hr("shell",!0),la("toolbarBehaviours",[Gm])]),Vp=y([La({name:"groups",overrides:function(){return{behaviours:Ur([Gm.config({})])}}})]),Bp=xf({name:"Toolbar",configFields:Rp(),partFields:Vp(),factory:function(e,n,t,r){var o=function(n){return e.shell?O.some(n):Ka(n,e,"groups")},i=e.shell?{behaviours:[Gm.config({})],components:[]}:{behaviours:[],components:n};return{uid:e.uid,dom:e.dom,components:i.components,behaviours:ma(e.toolbarBehaviours,i.behaviours),apis:{setGroups:function(n,e){o(n).fold(function(){throw v.console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")},function(n){Gm.set(n,e)})}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(n,e,t){n.setGroups(e,t)}}}),Ap=y([fr("items"),lr("markers",gn(["itemSelector"],fr)),la("tgroupBehaviours",[sa])]),jp=y([Ga({name:"items",unit:"item"})]),Hp=xf({name:"ToolbarGroup",configFields:Ap(),partFields:jp(),factory:function(n,e,t,r){return{uid:n.uid,dom:n.dom,components:e,behaviours:ma(n.tgroupBehaviours,[sa.config({mode:"flow",selector:n.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),Np="data-"+bi("horizontal-scroll"),Pp=function(n){Jr(n,Np,"true")},zp=function(n){return"true"===Zr(n,Np)?0<(t=n).dom().scrollLeft||function(n){n.dom().scrollLeft=1;var e=0!==n.dom().scrollLeft;return n.dom().scrollLeft=0,e}(t):0<(e=n).dom().scrollTop||function(n){n.dom().scrollTop=1;var e=0!==n.dom().scrollTop;return n.dom().scrollTop=0,e}(e);var e,t};function Lp(){var e=function(n){var e=!0===n.scrollable?"${prefix}-toolbar-scrollable-group":"";return{dom:Tf('<div aria-label="'+n.label+'" class="${prefix}-toolbar-group '+e+'"></div>'),tgroupBehaviours:Ur([ad("adhoc-scrollable-toolbar",!0===n.scrollable?[Vr(function(n,e){Mi(n.element(),"overflow-x","auto"),Pp(n.element()),ug(n.element())})]:[])]),components:[dd.sketch({components:[Hp.parts().items({})]})],markers:{itemSelector:"."+bi("toolbar-group-item")},items:n.items}},t=xm(Bp.sketch({dom:Tf('<div class="${prefix}-toolbar"></div>'),components:[Bp.parts().groups({})],toolbarBehaviours:Ur([gi.config({toggleClass:bi("context-toolbar"),toggleOnExecute:!1,aria:{mode:"none"}}),sa.config({mode:"cyclic"})]),shell:!0})),n=xm(dd.sketch({dom:{classes:[bi("toolstrip")]},components:[wm(t)],containerBehaviours:Ur([gi.config({toggleClass:bi("android-selection-context-toolbar"),toggleOnExecute:!1})])})),r=function(){Bp.setGroups(t,o.get()),gi.off(t)},o=ho([]);return{wrapper:y(n),toolbar:y(t),createGroups:function(n){return gn(n,d(Hp.sketch,e))},setGroups:function(n){o.set(n),r()},setContextToolbar:function(n){gi.on(t),Bp.setGroups(t,n)},restoreToolbar:function(){gi.isOn(t)&&r()},refresh:function(){},focus:function(){sa.focusIn(t)}}}var Gp=function(n){return xm(wf.sketch({dom:Tf('<div class="${prefix}-mask-edit-icon ${prefix}-icon"></div>'),action:function(){n.run(function(n){n.setReadOnly(!1)})}}))},$p=function(){return xm(dd.sketch({dom:Tf('<div class="${prefix}-editor-socket"></div>'),components:[],containerBehaviours:Ur([Gm.config({})])}))},Up=function(n,e){Gm.append(n,wm(e))},Wp=function(n,e){Gm.remove(n,e)},Xp=function(n,e,t,r){(!0===t?po.toAlpha:po.toOmega)(r),(t?Up:Wp)(n,e)},qp=function(e,n){return n.getAnimationRoot.fold(function(){return e.element()},function(n){return n(e)})},Yp=function(n){return n.dimension.property},Kp=function(n,e){return n.dimension.getDimension(e)},Jp=function(n,e){var t=qp(n,e);sm(t,[e.shrinkingClass,e.growingClass])},Qp=function(n,e){fo(n.element(),e.openClass),co(n.element(),e.closedClass),Mi(n.element(),Yp(e),"0px"),Vi(n.element())},Zp=function(n,e){fo(n.element(),e.closedClass),co(n.element(),e.openClass),Ri(n.element(),Yp(e))},nh=function(n,e,t,r){t.setCollapsed(),Mi(n.element(),Yp(e),Kp(e,n.element())),Vi(n.element()),Jp(n,e),Qp(n,e),e.onStartShrink(n),e.onShrunk(n)},eh=function(n,e,t,r){var o=r.getOrThunk(function(){return Kp(e,n.element())});t.setCollapsed(),Mi(n.element(),Yp(e),o),Vi(n.element());var i=qp(n,e);fo(i,e.growingClass),co(i,e.shrinkingClass),Qp(n,e),e.onStartShrink(n)},th=function(n,e,t){var r=Kp(e,n.element());("0px"===r?nh:eh)(n,e,t,O.some(r))},rh=function(n,e,t){var r=qp(n,e),o=so(r,e.shrinkingClass),i=Kp(e,n.element());Zp(n,e);var u=Kp(e,n.element());(o?function(){Mi(n.element(),Yp(e),i),Vi(n.element())}:function(){Qp(n,e)})(),fo(r,e.shrinkingClass),co(r,e.growingClass),Zp(n,e),Mi(n.element(),Yp(e),u),t.setExpanded(),e.onStartGrow(n)},oh=function(n,e,t){var r=qp(n,e);return!0===so(r,e.growingClass)},ih=function(n,e,t){var r=qp(n,e);return!0===so(r,e.shrinkingClass)},uh=/* */Object.freeze({__proto__:null,refresh:function(n,e,t){if(t.isExpanded()){Ri(n.element(),Yp(e));var r=Kp(e,n.element());Mi(n.element(),Yp(e),r)}},grow:function(n,e,t){t.isExpanded()||rh(n,e,t)},shrink:function(n,e,t){t.isExpanded()&&th(n,e,t)},immediateShrink:function(n,e,t){t.isExpanded()&&nh(n,e,t,O.none())},hasGrown:function(n,e,t){return t.isExpanded()},hasShrunk:function(n,e,t){return t.isCollapsed()},isGrowing:oh,isShrinking:ih,isTransitioning:function(n,e,t){return!0===oh(n,e)||!0===ih(n,e)},toggleGrow:function(n,e,t){(t.isExpanded()?th:rh)(n,e,t)},disableTransitions:Jp}),ch=/* */Object.freeze({__proto__:null,exhibit:function(n,e,t){var r=e.expanded;return Hr(r?{classes:[e.openClass],styles:{}}:{classes:[e.closedClass],styles:Ft(e.dimension.property,"0px")})},events:function(t,r){return Tr([(n=ee(),Mr(n)(function(n,e){e.event().raw().propertyName===t.dimension.property&&(Jp(n,t),r.isExpanded()&&Ri(n.element(),t.dimension.property),(r.isExpanded()?t.onGrown:t.onShrunk)(n))}))]);var n}}),ah=[fr("closedClass"),fr("openClass"),fr("shrinkingClass"),fr("growingClass"),dr("getAnimationRoot"),qo("onShrunk"),qo("onStartShrink"),qo("onGrown"),qo("onStartGrow"),hr("expanded",!1),sr("dimension",ur("property",{width:[Qo("property","width"),Qo("getDimension",function(n){return es(n)+"px"})],height:[Qo("property","height"),Qo("getDimension",function(n){return Ni(n)+"px"})]}))],fh=Xr({fields:ah,name:"sliding",active:ch,apis:uh,state:/* */Object.freeze({__proto__:null,init:function(n){var e=ho(n.expanded);return $r({isExpanded:function(){return!0===e.get()},isCollapsed:function(){return!1===e.get()},setCollapsed:S(e.set,!1),setExpanded:S(e.set,!0),readState:function(){return"expanded: "+e.get()}})}})}),sh=function(e,t){var r=xm(dd.sketch({dom:{tag:"div",classes:[bi("dropup")]},components:[],containerBehaviours:Ur([Gm.config({}),fh.config({closedClass:bi("dropup-closed"),openClass:bi("dropup-open"),shrinkingClass:bi("dropup-shrinking"),growingClass:bi("dropup-growing"),dimension:{property:"height"},onShrunk:function(n){e(),t(),Gm.set(n,[])},onGrown:function(n){e(),t()}}),hi(function(n,e){o(w)})])})),o=function(n){v.window.requestAnimationFrame(function(){n(),fh.shrink(r)})};return{appear:function(n,e,t){!0===fh.hasShrunk(r)&&!1===fh.isTransitioning(r)&&v.window.requestAnimationFrame(function(){e(t),Gm.set(r,[n()]),fh.grow(r)})},disappear:o,component:y(r),element:r.element}},lh=function(n){var e,t;return 8===n.raw().which&&!dn(["input","textarea"],ke(n.target()))&&(e=n.target(),!Wi(e,'[contenteditable="true"]',t).isSome())},dh=function(){return Ln().browser.isFirefox()},mh=Ut([sr("triggerEvent",ar),hr("stopBackspace",!0)]),gh=function(e,n){var t,r,o,i,u=or("Getting GUI events settings",mh,n),c=Fg(u),a=gn(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),function(n){return Eg(e,n,function(e){c.fireIfReady(e,n).each(function(n){n&&e.kill()}),u.triggerEvent(n,e)&&e.kill()})}),f=ho(O.none()),s=Eg(e,"paste",function(e){c.fireIfReady(e,"paste").each(function(n){n&&e.kill()}),u.triggerEvent("paste",e)&&e.kill(),f.set(O.some(v.setTimeout(function(){u.triggerEvent(ue(),e)},0)))}),l=Eg(e,"keydown",function(n){u.triggerEvent("keydown",n)?n.kill():!0===u.stopBackspace&&lh(n)&&n.prevent()}),d=(t=e,r=function(n){u.triggerEvent("focusin",n)&&n.kill()},dh()?Cg(t,"focus",r):Eg(t,"focusin",r)),m=ho(O.none()),g=(o=e,i=function(n){u.triggerEvent("focusout",n)&&n.kill(),m.set(O.some(v.setTimeout(function(){u.triggerEvent(ie(),n)},0)))},dh()?Cg(o,"blur",i):Eg(o,"focusout",i));return{unbind:function(){pn(a,function(n){n.unbind()}),l.unbind(),d.unbind(),g.unbind(),s.unbind(),f.get().each(v.clearTimeout),m.get().each(v.clearTimeout)}}},ph=function(n,e){var t=I(n,"target").map(function(n){return n()}).getOr(e);return ho(t)},hh=ot([{stopped:[]},{resume:["element"]},{complete:[]}]),vh=function(n,r,e,t,o,i){var u,c,a,f,s=n(r,t),l=(u=e,c=o,a=ho(!1),f=ho(!1),{stop:function(){a.set(!0)},cut:function(){f.set(!0)},isStopped:a.get,isCut:f.get,event:y(u),setSource:c.set,getSource:c.get});return s.fold(function(){return i.logEventNoHandlers(r,t),hh.complete()},function(e){var t=e.descHandler;return tm(t)(l),l.isStopped()?(i.logEventStopped(r,e.element,t.purpose()),hh.stopped()):l.isCut()?(i.logEventCut(r,e.element,t.purpose()),hh.complete()):He(e.element).fold(function(){return i.logNoParent(r,e.element,t.purpose()),hh.complete()},function(n){return i.logEventResponse(r,e.element,t.purpose()),hh.resume(n)})})},yh=function(e,t,r,n,o,i){return vh(e,t,r,n,o,i).fold(function(){return!0},function(n){return yh(e,t,r,n,o,i)},function(){return!1})},bh=function(n,e,t){var r,o,i=(r=e,o=ho(!1),{stop:function(){o.set(!0)},cut:w,isStopped:o.get,isCut:y(!1),event:y(r),setSource:a("Cannot set source of a broadcasted event"),getSource:a("Cannot get source of a broadcasted event")});return pn(n,function(n){var e=n.descHandler();tm(e)(i)}),i.isStopped()},xh=function(n,e,t,r,o){var i=ph(t,r);return yh(n,e,t,r,i,o)},wh=function(n,e){return{element:n,descHandler:e}},Sh=function(n,e){return{id:y(n),descHandler:y(e)}};function Oh(){var i={};return{registerId:function(r,o,n){E(n,function(n,e){var t=i[e]!==undefined?i[e]:{};t[o]=em(n,r),i[e]=t})},unregisterId:function(t){E(i,function(n,e){n.hasOwnProperty(t)&&delete n[t]})},filterByType:function(n){return I(i,n).map(function(n){return D(n,function(n,e){return Sh(e,n)})}).getOr([])},find:function(n,e,t){var o=I(i,e);return xr(t,function(n){return t=o,ff(r=n).fold(function(){return O.none()},function(e){return t.bind(function(n){return I(n,e)}).map(function(n){return wh(r,n)})});var t,r},n)}}}function Th(){var r=Oh(),o={},i=function(r){var n=r.element();return ff(n).fold(function(){return n="uid-",e=r.element(),t=Ea(uf+n),af(e,t),t;var n,e,t},function(n){return n})},u=function(n){ff(n.element()).each(function(n){delete o[n],r.unregisterId(n)})};return{find:function(n,e,t){return r.find(n,e,t)},filter:function(n){return r.filterByType(n)},register:function(n){var e=i(n);R(o,e)&&function(n,e){var t=o[e];if(t!==n)throw new Error('The tagId "'+e+'" is already used by: '+Vo(t.element())+"\nCannot use it for: "+Vo(n.element())+"\nThe conflicting element is"+(_e(t.element())?" ":" not ")+"already in the DOM");u(n)}(n,e);var t=[n];r.registerId(t,e,n.events()),o[e]=n},unregister:u,getById:function(n){return I(o,n)}}}var kh=function(t){var r=function(e){return He(t.element()).fold(function(){return!0},function(n){return Ae(e,n)})},o=Th(),f=function(n,e){return o.find(r,n,e)},n=gh(t.element(),{triggerEvent:function(u,c){return zo(u,c.target(),function(n){return e=f,t=u,o=n,i=(r=c).target(),xh(e,t,r,i,o);var e,t,r,o,i})}}),i={debugInfo:y("real"),triggerEvent:function(e,t,r){zo(e,t,function(n){return xh(f,e,r,t,n)})},triggerFocus:function(c,a){ff(c).fold(function(){wo(c)},function(n){zo(oe(),c,function(n){var e,t,r,o,i,u;return e=f,t=oe(),r={originator:y(a),kill:w,prevent:w,target:y(c)},i=n,u=ph(r,o=c),vh(e,t,r,o,u,i),!1})})},triggerEscape:function(n,e){i.triggerEvent("keydown",n.element(),e.event())},getByUid:function(n){return g(n)},getByDom:function(n){return p(n)},build:xm,addToGui:function(n){c(n)},removeFromGui:function(n){a(n)},addToWorld:function(n){e(n)},removeFromWorld:function(n){u(n)},broadcast:function(n){l(n)},broadcastOn:function(n,e){d(n,e)},broadcastEvent:function(n,e){m(n,e)},isConnected:y(!0)},e=function(n){n.connect(i),Me(n.element())||(o.register(n),pn(n.components(),e),i.triggerEvent(de(),n.element(),{target:y(n.element())}))},u=function(n){Me(n.element())||(pn(n.components(),u),o.unregister(n)),n.disconnect()},c=function(n){Qe(t,n,$e)},a=function(n){Ze(n)},s=function(t){var n=o.filter(ce());pn(n,function(n){var e=n.descHandler();tm(e)(t)})},l=function(n){s({universal:y(!0),data:y(n)})},d=function(n,e){s({universal:y(!1),channels:y(n),data:y(e)})},m=function(n,e){var t=o.filter(n);return bh(t,e)},g=function(n){return o.getById(n).fold(function(){return rt.error(new Error('Could not find component with uid: "'+n+'" in system.'))},rt.value)},p=function(n){var e=ff(n).getOr("not found");return g(e)};return e(t),{root:y(t),element:t.element,destroy:function(){n.unbind(),Xe(t.element())},add:c,remove:a,getByUid:g,getByDom:p,addToWorld:e,removeFromWorld:u,broadcast:l,broadcastOn:d,broadcastEvent:m}},Eh=bi("readonly-mode"),Ch=bi("edit-mode");function Mh(n){var e=xm(dd.sketch({dom:{classes:[bi("outer-container")].concat(n.classes)},containerBehaviours:Ur([po.config({alpha:Eh,omega:Ch})])}));return kh(e)}var _h=function(n,e){var t=Te.fromTag("input");_i(t,{opacity:"0",position:"absolute",top:"-1000px",left:"-1000px"}),$e(n,t),wo(t),e(t),Xe(t)},Dh=function(n){var e=n.getSelection();if(0<e.rangeCount){var t=e.getRangeAt(0),r=n.document.createRange();r.setStart(t.startContainer,t.startOffset),r.setEnd(t.endContainer,t.endOffset),e.removeAllRanges(),e.addRange(r)}},Ih=function(n,e){Oo().each(function(n){Ae(n,e)||So(n)}),n.focus(),wo(Te.fromDom(n.document.body)),Dh(n)},Fh=function(n,e,t,r){var o=function(){Ih(e,r)},i=Eg(t,"keydown",function(n){dn(["input","textarea"],ke(n.target()))||o()});return{toReading:function(){_h(n,So)},toEditing:o,onToolbarTouch:function(){},destroy:function(){i.unbind()}}},Rh=function(t,r,o,i,n){var u=function(){r.run(function(n){n.refreshSelection()})},e=function(n,e){var t=n-i.dom().scrollTop;r.run(function(n){n.scrollIntoView(t,t+e)})},c=function(){r.run(function(n){n.clearSelection()})},a=function(){t.getCursorBox().each(function(n){e(n.top(),n.height())}),r.run(function(n){n.syncHeight()})},f=Rg(t),s=_p(a,300),l=[t.onKeyup(function(){c(),s.throttle()}),t.onNodeChanged(u),t.onDomChanged(s.throttle),t.onDomChanged(u),t.onScrollToCursor(function(n){n.preventDefault(),s.throttle()}),t.onScrollToElement(function(n){n.element(),e(r,i)}),t.onToEditing(function(){r.run(function(n){n.toEditing()})}),t.onToReading(function(){r.run(function(n){n.toReading()})}),Eg(t.doc(),"touchend",function(n){Ae(t.html(),n.target())||Ae(t.body(),n.target())}),Eg(o,"transitionend",function(n){var e;"height"===n.raw().propertyName&&(e=Ni(o),r.run(function(n){n.setViewportOffset(e)}),u(),a())}),Cg(o,"touchstart",function(n){var e;r.run(function(n){n.highlightSelection()}),e=n,r.run(function(n){n.onToolbarTouch(e)}),t.onTouchToolstrip()}),Eg(t.body(),"touchstart",function(n){c(),t.onTouchContent(),f.fireTouchstart(n)}),f.onTouchmove(),f.onTouchend(),Eg(t.body(),"click",function(n){n.kill()}),Eg(o,"touchmove",function(){t.onToolbarScrollStart()})];return{destroy:function(){pn(l,function(n){n.unbind()})}}};var Vh,Bh,Ah,jh,Hh={},Nh={exports:Hh};Vh=undefined,Bh=Hh,Ah=Nh,jh=undefined,function(n){if("object"==typeof Bh&&void 0!==Ah)Ah.exports=n();else if("function"==typeof Vh&&Vh.amd)Vh([],n);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=n()}}(function(){return function s(i,u,c){function a(e,n){if(!u[e]){if(!i[e]){var t="function"==typeof jh&&jh;if(!n&&t)return t(e,!0);if(f)return f(e,!0);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[e]={exports:{}};i[e][0].call(o.exports,function(n){return a(i[e][1][n]||n)},o,o.exports,s,i,u,c)}return u[e].exports}for(var f="function"==typeof jh&&jh,n=0;n<c.length;n++)a(c[n]);return a}({1:[function(n,e,t){var r,o,i=e.exports={};function u(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function a(n){if(r===setTimeout)return setTimeout(n,0);if((r===u||!r)&&setTimeout)return r=setTimeout,setTimeout(n,0);try{return r(n,0)}catch(e){try{return r.call(null,n,0)}catch(e){return r.call(this,n,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:u}catch(n){r=u}try{o="function"==typeof clearTimeout?clearTimeout:c}catch(n){o=c}}();var f,s=[],l=!1,d=-1;function m(){l&&f&&(l=!1,f.length?s=f.concat(s):d=-1,s.length&&g())}function g(){if(!l){var n=a(m);l=!0;for(var e=s.length;e;){for(f=s,s=[];++d<e;)f&&f[d].run();d=-1,e=s.length}f=null,l=!1,function t(n){if(o===clearTimeout)return clearTimeout(n);if((o===c||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(n);try{return o(n)}catch(e){try{return o.call(null,n)}catch(e){return o.call(this,n)}}}(n)}}function p(n,e){this.fun=n,this.array=e}function h(){}i.nextTick=function(n){var e=new Array(arguments.length-1);if(1<arguments.length)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];s.push(new p(n,e)),1!==s.length||l||a(g)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(n){return[]},i.binding=function(n){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(n){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(n,l,e){(function(e){function r(){}function i(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],s(n,this)}function o(r,o){for(;3===r._state;)r=r._value;0!==r._state?(r._handled=!0,i._immediateFn(function(){var n=1===r._state?o.onFulfilled:o.onRejected;if(null!==n){var e;try{e=n(r._value)}catch(t){return void c(o.promise,t)}u(o.promise,e)}else(1===r._state?u:c)(o.promise,r._value)})):r._deferreds.push(o)}function u(n,e){try{if(e===n)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if(e instanceof i)return n._state=3,n._value=e,void a(n);if("function"==typeof t)return void s(function r(n,e){return function(){n.apply(e,arguments)}}(t,e),n)}n._state=1,n._value=e,a(n)}catch(o){c(n,o)}}function c(n,e){n._state=2,n._value=e,a(n)}function a(n){2===n._state&&0===n._deferreds.length&&i._immediateFn(function(){n._handled||i._unhandledRejectionFn(n._value)});for(var e=0,t=n._deferreds.length;e<t;e++)o(n,n._deferreds[e]);n._deferreds=null}function f(n,e,t){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof e?e:null,this.promise=t}function s(n,e){var t=!1;try{n(function(n){t||(t=!0,u(e,n))},function(n){t||(t=!0,c(e,n))})}catch(r){if(t)return;t=!0,c(e,r)}}var n,t;n=this,t=setTimeout,i.prototype["catch"]=function(n){return this.then(null,n)},i.prototype.then=function(n,e){var t=new this.constructor(r);return o(this,new f(n,e,t)),t},i.all=function(n){var a=Array.prototype.slice.call(n);return new i(function(o,i){if(0===a.length)return o([]);var u=a.length;function c(e,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var t=n.then;if("function"==typeof t)return void t.call(n,function(n){c(e,n)},i)}a[e]=n,0==--u&&o(a)}catch(r){i(r)}}for(var n=0;n<a.length;n++)c(n,a[n])})},i.resolve=function(e){return e&&"object"==typeof e&&e.constructor===i?e:new i(function(n){n(e)})},i.reject=function(t){return new i(function(n,e){e(t)})},i.race=function(o){return new i(function(n,e){for(var t=0,r=o.length;t<r;t++)o[t].then(n,e)})},i._immediateFn="function"==typeof e?function(n){e(n)}:function(n){t(n,0)},i._unhandledRejectionFn=function(n){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",n)},i._setImmediateFn=function(n){i._immediateFn=n},i._setUnhandledRejectionFn=function(n){i._unhandledRejectionFn=n},void 0!==l&&l.exports?l.exports=i:n.Promise||(n.Promise=i)}).call(this,n("timers").setImmediate)},{timers:3}],3:[function(a,n,f){(function(n,e){var r=a("process/browser.js").nextTick,t=Function.prototype.apply,o=Array.prototype.slice,i={},u=0;function c(n,e){this._id=n,this._clearFn=e}f.setTimeout=function(){return new c(t.call(setTimeout,window,arguments),clearTimeout)},f.setInterval=function(){return new c(t.call(setInterval,window,arguments),clearInterval)},f.clearTimeout=f.clearInterval=function(n){n.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},f.enroll=function(n,e){clearTimeout(n._idleTimeoutId),n._idleTimeout=e},f.unenroll=function(n){clearTimeout(n._idleTimeoutId),n._idleTimeout=-1},f._unrefActive=f.active=function(n){clearTimeout(n._idleTimeoutId);var e=n._idleTimeout;0<=e&&(n._idleTimeoutId=setTimeout(function(){n._onTimeout&&n._onTimeout()},e))},f.setImmediate="function"==typeof n?n:function(n){var e=u++,t=!(arguments.length<2)&&o.call(arguments,1);return i[e]=!0,r(function(){i[e]&&(t?n.apply(null,t):n.call(null),f.clearImmediate(e))}),e},f.clearImmediate="function"==typeof e?e:function(n){delete i[n]}}).call(this,a("timers").setImmediate,a("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(n,e,t){var r=n("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();e.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});var Ph,zh=Nh.exports.boltExport,Lh=function(n){var t=O.none(),e=[],r=function(n){o()?u(n):e.push(n)},o=function(){return t.isSome()},i=function(n){pn(n,u)},u=function(e){t.each(function(n){v.setTimeout(function(){e(n)},0)})};return n(function(n){t=O.some(n),i(e),e=[]}),{get:r,map:function(t){return Lh(function(e){r(function(n){e(t(n))})})},isReady:o}},Gh={nu:Lh,pure:function(e){return Lh(function(n){n(e)})}},$h=function(n){v.setTimeout(function(){throw n},0)},Uh=function(t){var n=function(n){t().then(n,$h)};return{map:function(n){return Uh(function(){return t().then(n)})},bind:function(e){return Uh(function(){return t().then(function(n){return e(n).toPromise()})})},anonBind:function(n){return Uh(function(){return t().then(function(){return n.toPromise()})})},toLazy:function(){return Gh.nu(n)},toCached:function(){var n=null;return Uh(function(){return null===n&&(n=t()),n})},toPromise:t,get:n}},Wh=function(n){return Uh(function(){return new zh(n)})},Xh=function(n){return Uh(function(){return zh.resolve(n)})},qh=function(r,o){return Cn([{width:320,height:480,keyboard:{portrait:300,landscape:240}},{width:320,height:568,keyboard:{portrait:300,landscape:240}},{width:375,height:667,keyboard:{portrait:305,landscape:240}},{width:414,height:736,keyboard:{portrait:320,landscape:240}},{width:768,height:1024,keyboard:{portrait:320,landscape:400}},{width:1024,height:1366,keyboard:{portrait:380,landscape:460}}],function(n){return e=r<=n.width&&o<=n.height,t=n.keyboard,e?O.some(t):O.none();var e,t}).getOr({portrait:o/5,landscape:r/4})},Yh=function(n){var e,t=_g(n).isPortrait(),r=qh((e=n).screen.width,e.screen.height),o=t?r.portrait:r.landscape;return(t?n.screen.height:n.screen.width)-n.innerHeight>o?0:o},Kh=function(n,e){var t=je(n).dom().defaultView;return Ni(n)+Ni(e)-Yh(t)},Jh=function(n,e,t){var r=Kh(e,t),o=Ni(e)+Ni(t)-r;Mi(n,"padding-bottom",o+"px")},Qh=ot([{fixed:["element","property","offsetY"]},{scroller:["element","offsetY"]}]),Zh="data-"+bi("position-y-fixed"),nv="data-"+bi("y-property"),ev="data-"+bi("scrolling"),tv="data-"+bi("last-window-height"),rv=function(n){return Ag(n,Zh)},ov=function(n,e){var t=Zr(n,nv);return Qh.fixed(n,t,e)},iv=function(n,e){return Qh.scroller(n,e)},uv=function(n){var e=rv(n);return("true"===Zr(n,ev)?iv:ov)(n,e)},cv=function(n,e,t){var r=je(n).dom().defaultView.innerHeight;return Jr(n,tv,r+"px"),r-e-t},av=function(r,o,i,u){var e=je(r).dom().defaultView,n=function(n){var e=Zr(n,"style");_i(n,{position:"absolute",top:"0px"}),Jr(n,Zh,"0px"),Jr(n,nv,"top");return{restore:function(){Jr(n,"style",e||""),to(n,Zh),to(n,nv)}}}(i),t=Ni(i),c=Ni(u),a=function(n,e,t){var r=Zr(t,"style");ug(t),_i(t,{position:"absolute",height:e+"px",width:"100%",top:n+"px"}),Jr(t,Zh,n+"px"),Jr(t,ev,"true"),Jr(t,nv,"top");return{restore:function(){cg(t),Jr(t,"style",r||""),to(t,Zh),to(t,ev),to(t,nv)}}}(t,cv(r,t,c),r),f=function(n){var e=Zr(n,"style");_i(n,{position:"absolute",bottom:"0px"}),Jr(n,Zh,"0px"),Jr(n,nv,"bottom");return{restore:function(){Jr(n,"style",e||""),to(n,Zh),to(n,nv)}}}(u),s=!0,l=function(){var n=e.innerHeight;return Ag(r,tv)<n},d=function(){if(s){var n=Ni(i),e=Ni(u),t=cv(r,n,e);Jr(r,Zh,n+"px"),Mi(r,"height",t+"px"),Jh(o,r,u)}};return Jh(o,r,u),{setViewportOffset:function(n){Jr(r,Zh,n+"px"),d()},isExpanding:l,isShrinking:m(l),refresh:d,restore:function(){s=!1,n.restore(),a.restore(),f.restore()}}},fv=(Ph=null,{animate:function(o,i,u,c,e,n){var a=!1,f=function(n){a=!0,e(n)};Mg.clearInterval(Ph);var s=function(n){Mg.clearInterval(Ph),f(n)};Ph=Mg.setInterval(function(){var n,e,t,r=o();n=r,e=i,t=u,(Math.abs(n-e)<=t?O.none():n<e?O.some(n+t):O.some(n-t)).fold(function(){Mg.clearInterval(Ph),f(i)},function(n){if(c(n,s),!a){var e=o();(e!==n||Math.abs(e-i)>Math.abs(r-i))&&(Mg.clearInterval(Ph),f(i))}})},n)}}),sv="data-"+bi("last-scroll-top"),lv=function(n){var e=Fi(n,"top").getOr("0");return parseInt(e,10)},dv=function(n){return parseInt(n.dom().scrollTop,10)},mv=function(o,i){return Wh(function(n){var e=S(dv,o);Jr(o,sv,e());var t=Math.abs(i-e()),r=Math.ceil(t/10);fv.animate(e,i,r,function(n,e){Ag(o,sv)!==o.dom().scrollTop?e(o.dom().scrollTop):(o.dom().scrollTop=n,Jr(o,sv,n))},function(){o.dom().scrollTop=i,Jr(o,sv,i),n(i)},10)})},gv=function(n,e){var t=e+rv(n)+"px";Mi(n,"top",t)};var pv=function(u,n){return n(function(r){var o=[],i=0;0===u.length?r([]):pn(u,function(n,e){var t;n.get((t=e,function(n){o[t]=n,++i>=u.length&&r(o)}))})})},hv=function(n,e,t){var r,o,i,u=e+t,c=Fi(n,"top").getOr(t),a=u-parseInt(c,10),f=n.dom().scrollTop+a;return r=n,o=f,i=u,Wh(function(n){var e=S(dv,r);fv.animate(e,o,15,function(n){r.dom().scrollTop=n,Mi(r,"top",lv(r)+15+"px")},function(){r.dom().scrollTop=o,Mi(r,"top",i+"px"),n(o)},10)})},vv=function(n,o){return n.fold(function(n,e,t){return Mi(n,e,o+(r=t)+"px"),Xh(r);var r},function(n,e){return hv(n,o,e)})},yv=function(n,e){var t,r=(t=Li(n,"["+Zh+"]"),gn(t,uv)),o=gn(r,function(n){return vv(n,e)});return pv(o,Wh)},bv=function(i,u,n,t,e,r){var o=function f(t){var r=ho(Gh.pure({}));return{start:function(e){var n=Gh.nu(function(n){return t(e).get(n)});r.set(n)},idle:function(n){r.get().get(function(){n()})}}}(function(n){return t=u,r=n,o=je(e=i).dom().defaultView,Wh(function(n){gv(e,r),gv(t,r),o.scrollTo(0,r),n(r)});var e,t,r,o}),c=_p(function(){o.idle(function(){yv(n,t.pageYOffset).get(function(){var n;(n=ap(r),O.from(n[0]).bind(function(n){var e=n.top()-u.dom().scrollTop;return e>t.innerHeight+5||e<-5?O.some({top:y(e),bottom:y(e+n.height())}):O.none()})).each(function(n){u.dom().scrollTop=u.dom().scrollTop+n.top()}),o.start(0),e.refresh()})})},1e3),a=Eg(Te.fromDom(t),"scroll",function(){t.pageYOffset<0||c.throttle()});return yv(n,t.pageYOffset).get(b),{unbind:a.unbind}},xv=function(n){var a=n.cWin,e=n.ceBody,f=n.socket,t=n.toolstrip,r=n.contentElement,o=n.keyboardType,i=n.outerWindow,s=n.dropup,u=n.outerBody,c=av(f,e,t,s),l=o(u,a,De(),r),d=Dg(i,{onChange:w,onReady:c.refresh});d.onAdjustment(function(){c.refresh()});var m=Eg(Te.fromDom(i),"resize",function(){c.isExpanding()&&c.refresh()}),g=bv(t,f,u,i,c,a),p=function v(t,e){var n=t.document,r=Te.fromTag("div");co(r,bi("unfocused-selections")),$e(Te.fromDom(n.documentElement),r);var o=Eg(r,"touchstart",function(n){n.prevent(),Ih(t,e),u()}),i=function(n){var e=Te.fromTag("span");return fm(e,[bi("layer-editor"),bi("unfocused-selection")]),_i(e,{left:n.left()+"px",top:n.top()+"px",width:n.width()+"px",height:n.height()+"px"}),e},u=function(){We(r)};return{update:function(){u();var n=ap(t),e=gn(n,i);Ue(r,e)},isActive:function(){return 0<Ne(r).length},destroy:function(){o.unbind(),Xe(r)},clear:u}}(a,r),h=function(){p.clear()};return{toEditing:function(){l.toEditing(),h()},toReading:function(){l.toReading()},onToolbarTouch:function(n){l.onToolbarTouch()},refreshSelection:function(){p.isActive()&&p.update()},clearSelection:h,highlightSelection:function(){p.update()},scrollIntoView:function(n,e){var t,r,o,i,u,c;t=a,o=n,i=e,u=Kh(r=f,s),c=S(Dh,t),u<o||u<i?mv(r,r.dom().scrollTop-u+i).get(c):o<0&&mv(r,r.dom().scrollTop+o).get(c)},updateToolbarPadding:w,setViewportOffset:function(n){var i,u;c.setViewportOffset(n),i=f,u=n,Wh(function(n){var e=S(lv,i),t=function(n){Mi(i,"top",n+"px")},r=Math.abs(u-e()),o=Math.ceil(r/10);fv.animate(e,u,o,t,function(){t(u),n(u)},10)}).get(b)},syncHeight:function(){Mi(r,"height",r.dom().contentWindow.document.body.scrollHeight+"px")},refreshStructure:c.refresh,destroy:function(){c.restore(),d.destroy(),g.unbind(),m.unbind(),l.destroy(),p.destroy(),_h(De(),So)}}},wv=function(r,n){var o=Mp(),i=Gd(),u=Gd(),c=Ld(),a=Ld();return{enter:function(){n.hide();var t=Te.fromDom(v.document);xp(r.editor).each(function(n){var e;i.set({socketHeight:Fi(r.socket,"height"),iframeHeight:Fi(n.frame(),"height"),outerScroll:v.document.body.scrollTop}),u.set({exclusives:(e="."+ag,Eg(t,"touchmove",function(n){Wi(n.target(),e).filter(zp).fold(function(){n.raw().preventDefault()},w)}))}),co(r.container,bi("fullscreen-maximized")),Ep(r.container,n.body()),o.maximize(),Mi(r.socket,"overflow","scroll"),Mi(r.socket,"-webkit-overflow-scrolling","touch"),wo(n.body()),c.set(xv({cWin:n.win(),ceBody:n.body(),socket:r.socket,toolstrip:r.toolstrip,dropup:r.dropup.element(),contentElement:n.frame(),outerBody:r.body,outerWindow:r.win,keyboardType:Fh})),c.run(function(n){n.syncHeight()}),a.set(Rh(n,c,r.toolstrip,r.socket,r.dropup))})},refreshStructure:function(){c.run(function(n){n.refreshStructure()})},exit:function(){o.restore(),a.clear(),c.clear(),n.show(),i.on(function(n){n.socketHeight.each(function(n){Mi(r.socket,"height",n)}),n.iframeHeight.each(function(n){Mi(r.editor.getFrame(),"height",n)}),v.document.body.scrollTop=n.scrollTop}),i.clear(),u.on(function(n){n.exclusives.unbind()}),u.clear(),fo(r.container,bi("fullscreen-maximized")),Cp(),cg(r.toolbar),Ri(r.socket,"overflow"),Ri(r.socket,"-webkit-overflow-scrolling"),So(r.editor.getFrame()),xp(r.editor).each(function(n){n.clearSelection()})}}};function Sv(n){var e=Mh({classes:[bi("ios-container")]}),t=Lp(),r=Ld(),o=Gp(r),i=$p(),u=sh(function(){r.run(function(n){n.refreshStructure()})},n);e.add(t.wrapper()),e.add(i),e.add(u.component());return{system:y(e),element:e.element,init:function(n){r.set(function(n){var e=or("Getting IosWebapp schema",Ip,n);Mi(e.toolstrip,"width","100%"),Mi(e.container,"position","relative");var t=xm(Dp(function(){e.setReadOnly(e.readOnlyOnInit()),o.enter()},e.translate));e.alloy.add(t);var r={show:function(){e.alloy.add(t)},hide:function(){e.alloy.remove(t)}},o=wv(e,r);return{setReadOnly:e.setReadOnly,refreshStructure:o.refreshStructure,enter:o.enter,exit:o.exit,destroy:w}}(n))},exit:function(){r.run(function(n){Gm.remove(i,o),n.exit()})},setToolbarGroups:function(n){var e=t.createGroups(n);t.setGroups(e)},setContextToolbar:function(n){var e=t.createGroups(n);t.setContextToolbar(e)},focusToolbar:function(){t.focus()},restoreToolbar:function(){t.restoreToolbar()},updateMode:function(n){Xp(i,o,n,e.root())},socket:y(i),dropup:y(u)}}var Ov=tinymce.util.Tools.resolve("tinymce.EditorManager"),Tv=function(n,e,t){n.system().broadcastOn([Co],{command:e,state:t})},kv=function(e){return function(){var n=function(){e._skinLoaded=!0,e.fire("SkinLoaded")};e.initialized?n():e.on("init",n)}},Ev="toReading",Cv="toEditing",Mv=function(h){return{getNotificationManagerImpl:function(){return{open:y({progressBar:{value:w},close:w,text:w,getEl:y(null),moveTo:w,moveRel:w,settings:{}}),close:w,reposition:w,getArgs:y({})}},renderUI:function(){var n,e=h.getElement(),t={content:(n=I(h.settings,"skin_url").fold(function(){return Ov.baseURL+"/skins/ui/oxide"},function(n){return n}))+"/content.mobile.min.css",ui:n+"/skin.mobile.min.css"};!1==(!1===h.settings.skin)?(h.contentCSS.push(t.content),ko.DOM.styleSheetLoader.load(t.ui,kv(h))):kv(h)();var r,o,i=function(){h.fire("ScrollIntoView")},d=(Ln().os.isAndroid()?function f(n){var e=Mh({classes:[bi("android-container")]}),t=Lp(),r=Ld(),o=Gp(r),i=$p(),u=sh(w,n);return e.add(t.wrapper()),e.add(i),e.add(u.component()),{system:y(e),element:e.element,init:function(n){r.set(Fp(n))},exit:function(){r.run(function(n){n.exit(),Gm.remove(i,o)})},setToolbarGroups:function(n){var e=t.createGroups(n);t.setGroups(e)},setContextToolbar:function(n){var e=t.createGroups(n);t.setContextToolbar(e)},focusToolbar:function(){t.focus()},restoreToolbar:function(){t.restoreToolbar()},updateMode:function(n){Xp(i,o,n,e.root())},socket:y(i),dropup:y(u)}}:Sv)(i),u=Te.fromDom(e);r=u,o=d.system(),nt(r,o,Le);var c=e.ownerDocument.defaultView,m=Dg(c,{onChange:function(){var n,e,t;d.system().broadcastOn([Mo],{width:(n=c,e=Ln().os.isiOS(),t=_g(n).isPortrait(),e&&!t?n.screen.height:n.screen.width)})},onReady:w}),g=function(n,e,t,r){!1===r&&h.selection.collapse();var o=a(n,e,t);d.setToolbarGroups(!0===r?o.readOnly:o.main),h.setMode(!0===r?"readonly":"design"),h.fire(!0===r?Ev:Cv),d.updateMode(r)},a=function(n,e,t){var r=n.get();return{readOnly:r.backToMask.concat(e.get()),main:r.backToMask.concat(t.get())}},p=function(n,e){return h.on(n,e),{unbind:function(){h.off(n)}}};return h.on("init",function(){d.init({editor:{getFrame:function(){return Te.fromDom(h.contentAreaContainer.querySelector("iframe"))},onDomChanged:function(){return{unbind:w}},onToReading:function(n){return p(Ev,n)},onToEditing:function(n){return p(Cv,n)},onScrollToCursor:function(e){h.on("ScrollIntoView",function(n){e(n)});return{unbind:function(){h.off("ScrollIntoView"),m.destroy()}}},onTouchToolstrip:function(){t()},onTouchContent:function(){var n=Te.fromDom(h.editorContainer.querySelector("."+bi("toolbar")));To(n).bind(function(n){return d.system().getByDom(n).toOption()}).each(xe),d.restoreToolbar(),t()},onTapContent:function(n){var e=n.target();if("img"===ke(e))h.selection.select(e.dom()),n.kill();else if("a"===ke(e)){d.system().getByDom(Te.fromDom(h.editorContainer)).each(function(n){po.isAlpha(n)&&function(n){var e=v.document.createElement("a");e.target="_blank",e.href=n.href,e.rel="noreferrer noopener";var t=v.document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,v.window,0,0,0,0,0,!1,!1,!1,!1,0,null),v.document.body.appendChild(e),e.dispatchEvent(t),v.document.body.removeChild(e)}(e.dom())})}}},container:Te.fromDom(h.editorContainer),socket:Te.fromDom(h.contentAreaContainer),toolstrip:Te.fromDom(h.editorContainer.querySelector("."+bi("toolstrip"))),toolbar:Te.fromDom(h.editorContainer.querySelector("."+bi("toolbar"))),dropup:d.dropup(),alloy:d.system(),translate:w,setReadOnly:function(n){g(l,s,f,n)},readOnlyOnInit:function(){return!1}});var r,n,e,t=function(){d.dropup().disappear(function(){d.system().broadcastOn([_o],{})})},o={label:"The first group",scrollable:!1,items:[_f("back",function(){h.selection.collapse(),d.exit()},{},h)]},i={label:"Back to read only",scrollable:!1,items:[_f("readonly-back",function(){g(l,s,f,!0)},{},h)]},u=xg(d,h),c=wg(h.settings,u),a={label:"The extra group",scrollable:!1,items:[]},f=ho([{label:"the action group",scrollable:!0,items:c},a]),s=ho([{label:"The read only mode group",scrollable:!0,items:[]},a]),l=ho({backToMask:[o],backToReadOnly:[i]});r=d,e=T((n=h).formatter.get()),pn(e,function(e){n.formatter.formatChanged(e,function(n){Tv(r,e,n)})}),pn(["ul","ol"],function(t){n.selection.selectorChanged(t,function(n,e){Tv(r,t,n)})})}),h.on("remove",function(){d.exit()}),h.on("detach",function(){var e,n;e=d.system(),n=Ne(e.element()),pn(n,function(n){e.getByDom(n).each(qe)}),Xe(e.element()),d.system().destroy()}),{iframeContainer:d.socket().element().dom(),editorContainer:d.element().dom()}}}};!function Dv(){Eo.add("mobile",Mv)}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/themes/silver/index.js
@@ -1,1 +1,7 @@
-
+// Exports the "silver" theme for usage with module loaders
+// Usage:
+//   CommonJS:
+//     require('tinymce/themes/silver')
+//   ES2015:
+//     import 'tinymce/themes/silver'
+require('./theme.js');

--- /dev/null
+++ b/tinymce/5/js/tinymce/themes/silver/theme.js
@@ -1,1 +1,31669 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var noop = function () {
+    };
+    var noarg = function (f) {
+      return function () {
+        return f();
+      };
+    };
+    var compose = function (fa, fb) {
+      return function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        return fa(fb.apply(null, args));
+      };
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var identity = function (x) {
+      return x;
+    };
+    function curry(fn) {
+      var initialArgs = [];
+      for (var _i = 1; _i < arguments.length; _i++) {
+        initialArgs[_i - 1] = arguments[_i];
+      }
+      return function () {
+        var restArgs = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          restArgs[_i] = arguments[_i];
+        }
+        var all = initialArgs.concat(restArgs);
+        return fn.apply(null, all);
+      };
+    }
+    var not = function (f) {
+      return function (t) {
+        return !f(t);
+      };
+    };
+    var die = function (msg) {
+      return function () {
+        throw new Error(msg);
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var global$1 = tinymce.util.Tools.resolve('tinymce.ThemeManager');
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+    function __rest(s, e) {
+      var t = {};
+      for (var p in s)
+        if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+          t[p] = s[p];
+      if (s != null && typeof Object.getOwnPropertySymbols === 'function')
+        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+          if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+            t[p[i]] = s[p[i]];
+        }
+      return t;
+    }
+    function __spreadArrays() {
+      for (var s = 0, i = 0, il = arguments.length; i < il; i++)
+        s += arguments[i].length;
+      for (var r = Array(s), k = 0, i = 0; i < il; i++)
+        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
+          r[k] = a[j];
+      return r;
+    }
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var value = function (o) {
+      var is = function (v) {
+        return o === v;
+      };
+      var or = function (_opt) {
+        return value(o);
+      };
+      var orThunk = function (_f) {
+        return value(o);
+      };
+      var map = function (f) {
+        return value(f(o));
+      };
+      var mapError = function (_f) {
+        return value(o);
+      };
+      var each = function (f) {
+        f(o);
+      };
+      var bind = function (f) {
+        return f(o);
+      };
+      var fold = function (_, onValue) {
+        return onValue(o);
+      };
+      var exists = function (f) {
+        return f(o);
+      };
+      var forall = function (f) {
+        return f(o);
+      };
+      var toOption = function () {
+        return Option.some(o);
+      };
+      return {
+        is: is,
+        isValue: always,
+        isError: never,
+        getOr: constant(o),
+        getOrThunk: constant(o),
+        getOrDie: constant(o),
+        or: or,
+        orThunk: orThunk,
+        fold: fold,
+        map: map,
+        mapError: mapError,
+        each: each,
+        bind: bind,
+        exists: exists,
+        forall: forall,
+        toOption: toOption
+      };
+    };
+    var error = function (message) {
+      var getOrThunk = function (f) {
+        return f();
+      };
+      var getOrDie = function () {
+        return die(String(message))();
+      };
+      var or = function (opt) {
+        return opt;
+      };
+      var orThunk = function (f) {
+        return f();
+      };
+      var map = function (_f) {
+        return error(message);
+      };
+      var mapError = function (f) {
+        return error(f(message));
+      };
+      var bind = function (_f) {
+        return error(message);
+      };
+      var fold = function (onError, _) {
+        return onError(message);
+      };
+      return {
+        is: never,
+        isValue: never,
+        isError: always,
+        getOr: identity,
+        getOrThunk: getOrThunk,
+        getOrDie: getOrDie,
+        or: or,
+        orThunk: orThunk,
+        fold: fold,
+        map: map,
+        mapError: mapError,
+        each: noop,
+        bind: bind,
+        exists: never,
+        forall: always,
+        toOption: Option.none
+      };
+    };
+    var fromOption = function (opt, err) {
+      return opt.fold(function () {
+        return error(err);
+      }, value);
+    };
+    var Result = {
+      value: value,
+      error: error,
+      fromOption: fromOption
+    };
+
+    var typeOf = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf(value) === type;
+      };
+    };
+    var isSimpleType = function (type) {
+      return function (value) {
+        return typeof value === type;
+      };
+    };
+    var eq = function (t) {
+      return function (a) {
+        return t === a;
+      };
+    };
+    var isString = isType('string');
+    var isObject = isType('object');
+    var isArray = isType('array');
+    var isBoolean = isSimpleType('boolean');
+    var isUndefined = eq(undefined);
+    var isFunction = isSimpleType('function');
+    var isNumber = isSimpleType('number');
+    var isArrayOf = function (value, pred) {
+      if (isArray(value)) {
+        for (var i = 0, len = value.length; i < len; ++i) {
+          if (!pred(value[i])) {
+            return false;
+          }
+        }
+        return true;
+      }
+      return false;
+    };
+
+    var nativeSlice = Array.prototype.slice;
+    var nativeIndexOf = Array.prototype.indexOf;
+    var nativePush = Array.prototype.push;
+    var rawIndexOf = function (ts, t) {
+      return nativeIndexOf.call(ts, t);
+    };
+    var indexOf = function (xs, x) {
+      var r = rawIndexOf(xs, x);
+      return r === -1 ? Option.none() : Option.some(r);
+    };
+    var contains = function (xs, x) {
+      return rawIndexOf(xs, x) > -1;
+    };
+    var exists = function (xs, pred) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return true;
+        }
+      }
+      return false;
+    };
+    var range = function (num, f) {
+      var r = [];
+      for (var i = 0; i < num; i++) {
+        r.push(f(i));
+      }
+      return r;
+    };
+    var chunk = function (array, size) {
+      var r = [];
+      for (var i = 0; i < array.length; i += size) {
+        var s = nativeSlice.call(array, i, i + size);
+        r.push(s);
+      }
+      return r;
+    };
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var each = function (xs, f) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var eachr = function (xs, f) {
+      for (var i = xs.length - 1; i >= 0; i--) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var partition = function (xs, pred) {
+      var pass = [];
+      var fail = [];
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        var arr = pred(x, i) ? pass : fail;
+        arr.push(x);
+      }
+      return {
+        pass: pass,
+        fail: fail
+      };
+    };
+    var filter = function (xs, pred) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          r.push(x);
+        }
+      }
+      return r;
+    };
+    var foldr = function (xs, f, acc) {
+      eachr(xs, function (x) {
+        acc = f(acc, x);
+      });
+      return acc;
+    };
+    var foldl = function (xs, f, acc) {
+      each(xs, function (x) {
+        acc = f(acc, x);
+      });
+      return acc;
+    };
+    var findUntil = function (xs, pred, until) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return Option.some(x);
+        } else if (until(x, i)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var find = function (xs, pred) {
+      return findUntil(xs, pred, never);
+    };
+    var findIndex = function (xs, pred) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return Option.some(i);
+        }
+      }
+      return Option.none();
+    };
+    var flatten = function (xs) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        if (!isArray(xs[i])) {
+          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
+        }
+        nativePush.apply(r, xs[i]);
+      }
+      return r;
+    };
+    var bind = function (xs, f) {
+      return flatten(map(xs, f));
+    };
+    var forall = function (xs, pred) {
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        var x = xs[i];
+        if (pred(x, i) !== true) {
+          return false;
+        }
+      }
+      return true;
+    };
+    var reverse = function (xs) {
+      var r = nativeSlice.call(xs, 0);
+      r.reverse();
+      return r;
+    };
+    var difference = function (a1, a2) {
+      return filter(a1, function (x) {
+        return !contains(a2, x);
+      });
+    };
+    var mapToObject = function (xs, f) {
+      var r = {};
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        r[String(x)] = f(x, i);
+      }
+      return r;
+    };
+    var pure = function (x) {
+      return [x];
+    };
+    var sort = function (xs, comparator) {
+      var copy = nativeSlice.call(xs, 0);
+      copy.sort(comparator);
+      return copy;
+    };
+    var head = function (xs) {
+      return xs.length === 0 ? Option.none() : Option.some(xs[0]);
+    };
+    var last = function (xs) {
+      return xs.length === 0 ? Option.none() : Option.some(xs[xs.length - 1]);
+    };
+    var from$1 = isFunction(Array.from) ? Array.from : function (x) {
+      return nativeSlice.call(x);
+    };
+    var findMap = function (arr, f) {
+      for (var i = 0; i < arr.length; i++) {
+        var r = f(arr[i], i);
+        if (r.isSome()) {
+          return r;
+        }
+      }
+      return Option.none();
+    };
+
+    var keys = Object.keys;
+    var hasOwnProperty = Object.hasOwnProperty;
+    var each$1 = function (obj, f) {
+      var props = keys(obj);
+      for (var k = 0, len = props.length; k < len; k++) {
+        var i = props[k];
+        var x = obj[i];
+        f(x, i);
+      }
+    };
+    var map$1 = function (obj, f) {
+      return tupleMap(obj, function (x, i) {
+        return {
+          k: i,
+          v: f(x, i)
+        };
+      });
+    };
+    var tupleMap = function (obj, f) {
+      var r = {};
+      each$1(obj, function (x, i) {
+        var tuple = f(x, i);
+        r[tuple.k] = tuple.v;
+      });
+      return r;
+    };
+    var objAcc = function (r) {
+      return function (x, i) {
+        r[i] = x;
+      };
+    };
+    var internalFilter = function (obj, pred, onTrue, onFalse) {
+      var r = {};
+      each$1(obj, function (x, i) {
+        (pred(x, i) ? onTrue : onFalse)(x, i);
+      });
+      return r;
+    };
+    var filter$1 = function (obj, pred) {
+      var t = {};
+      internalFilter(obj, pred, objAcc(t), noop);
+      return t;
+    };
+    var mapToArray = function (obj, f) {
+      var r = [];
+      each$1(obj, function (value, name) {
+        r.push(f(value, name));
+      });
+      return r;
+    };
+    var find$1 = function (obj, pred) {
+      var props = keys(obj);
+      for (var k = 0, len = props.length; k < len; k++) {
+        var i = props[k];
+        var x = obj[i];
+        if (pred(x, i, obj)) {
+          return Option.some(x);
+        }
+      }
+      return Option.none();
+    };
+    var values = function (obj) {
+      return mapToArray(obj, function (v) {
+        return v;
+      });
+    };
+    var get = function (obj, key) {
+      return has(obj, key) ? Option.from(obj[key]) : Option.none();
+    };
+    var has = function (obj, key) {
+      return hasOwnProperty.call(obj, key);
+    };
+    var hasNonNullableKey = function (obj, key) {
+      return has(obj, key) && obj[key] !== undefined && obj[key] !== null;
+    };
+
+    var generate = function (cases) {
+      if (!isArray(cases)) {
+        throw new Error('cases must be an array');
+      }
+      if (cases.length === 0) {
+        throw new Error('there must be at least one case');
+      }
+      var constructors = [];
+      var adt = {};
+      each(cases, function (acase, count) {
+        var keys$1 = keys(acase);
+        if (keys$1.length !== 1) {
+          throw new Error('one and only one name per case');
+        }
+        var key = keys$1[0];
+        var value = acase[key];
+        if (adt[key] !== undefined) {
+          throw new Error('duplicate key detected:' + key);
+        } else if (key === 'cata') {
+          throw new Error('cannot have a case named cata (sorry)');
+        } else if (!isArray(value)) {
+          throw new Error('case arguments must be an array');
+        }
+        constructors.push(key);
+        adt[key] = function () {
+          var argLength = arguments.length;
+          if (argLength !== value.length) {
+            throw new Error('Wrong number of arguments to case ' + key + '. Expected ' + value.length + ' (' + value + '), got ' + argLength);
+          }
+          var args = new Array(argLength);
+          for (var i = 0; i < args.length; i++) {
+            args[i] = arguments[i];
+          }
+          var match = function (branches) {
+            var branchKeys = keys(branches);
+            if (constructors.length !== branchKeys.length) {
+              throw new Error('Wrong number of arguments to match. Expected: ' + constructors.join(',') + '\nActual: ' + branchKeys.join(','));
+            }
+            var allReqd = forall(constructors, function (reqKey) {
+              return contains(branchKeys, reqKey);
+            });
+            if (!allReqd) {
+              throw new Error('Not all branches were specified when using match. Specified: ' + branchKeys.join(', ') + '\nRequired: ' + constructors.join(', '));
+            }
+            return branches[key].apply(null, args);
+          };
+          return {
+            fold: function () {
+              if (arguments.length !== cases.length) {
+                throw new Error('Wrong number of arguments to fold. Expected ' + cases.length + ', got ' + arguments.length);
+              }
+              var target = arguments[count];
+              return target.apply(null, args);
+            },
+            match: match,
+            log: function (label) {
+              domGlobals.console.log(label, {
+                constructors: constructors,
+                constructor: key,
+                params: args
+              });
+            }
+          };
+        };
+      });
+      return adt;
+    };
+    var Adt = { generate: generate };
+
+    var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
+    var shallow = function (old, nu) {
+      return nu;
+    };
+    var deep = function (old, nu) {
+      var bothObjects = isObject(old) && isObject(nu);
+      return bothObjects ? deepMerge(old, nu) : nu;
+    };
+    var baseMerge = function (merger) {
+      return function () {
+        var objects = new Array(arguments.length);
+        for (var i = 0; i < objects.length; i++) {
+          objects[i] = arguments[i];
+        }
+        if (objects.length === 0) {
+          throw new Error('Can\'t merge zero objects');
+        }
+        var ret = {};
+        for (var j = 0; j < objects.length; j++) {
+          var curObject = objects[j];
+          for (var key in curObject) {
+            if (hasOwnProperty$1.call(curObject, key)) {
+              ret[key] = merger(ret[key], curObject[key]);
+            }
+          }
+        }
+        return ret;
+      };
+    };
+    var deepMerge = baseMerge(deep);
+    var merge = baseMerge(shallow);
+
+    var cached = function (f) {
+      var called = false;
+      var r;
+      return function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (!called) {
+          called = true;
+          r = f.apply(null, args);
+        }
+        return r;
+      };
+    };
+
+    var SimpleResultType;
+    (function (SimpleResultType) {
+      SimpleResultType[SimpleResultType['Error'] = 0] = 'Error';
+      SimpleResultType[SimpleResultType['Value'] = 1] = 'Value';
+    }(SimpleResultType || (SimpleResultType = {})));
+    var fold = function (res, onError, onValue) {
+      return res.stype === SimpleResultType.Error ? onError(res.serror) : onValue(res.svalue);
+    };
+    var partition$1 = function (results) {
+      var values = [];
+      var errors = [];
+      each(results, function (obj) {
+        fold(obj, function (err) {
+          return errors.push(err);
+        }, function (val) {
+          return values.push(val);
+        });
+      });
+      return {
+        values: values,
+        errors: errors
+      };
+    };
+    var mapError = function (res, f) {
+      if (res.stype === SimpleResultType.Error) {
+        return {
+          stype: SimpleResultType.Error,
+          serror: f(res.serror)
+        };
+      } else {
+        return res;
+      }
+    };
+    var map$2 = function (res, f) {
+      if (res.stype === SimpleResultType.Value) {
+        return {
+          stype: SimpleResultType.Value,
+          svalue: f(res.svalue)
+        };
+      } else {
+        return res;
+      }
+    };
+    var bind$1 = function (res, f) {
+      if (res.stype === SimpleResultType.Value) {
+        return f(res.svalue);
+      } else {
+        return res;
+      }
+    };
+    var bindError = function (res, f) {
+      if (res.stype === SimpleResultType.Error) {
+        return f(res.serror);
+      } else {
+        return res;
+      }
+    };
+    var svalue = function (v) {
+      return {
+        stype: SimpleResultType.Value,
+        svalue: v
+      };
+    };
+    var serror = function (e) {
+      return {
+        stype: SimpleResultType.Error,
+        serror: e
+      };
+    };
+    var toResult = function (res) {
+      return fold(res, Result.error, Result.value);
+    };
+    var fromResult = function (res) {
+      return res.fold(serror, svalue);
+    };
+    var SimpleResult = {
+      fromResult: fromResult,
+      toResult: toResult,
+      svalue: svalue,
+      partition: partition$1,
+      serror: serror,
+      bind: bind$1,
+      bindError: bindError,
+      map: map$2,
+      mapError: mapError,
+      fold: fold
+    };
+
+    var adt = Adt.generate([
+      { strict: [] },
+      { defaultedThunk: ['fallbackThunk'] },
+      { asOption: [] },
+      { asDefaultedOptionThunk: ['fallbackThunk'] },
+      { mergeWithThunk: ['baseThunk'] }
+    ]);
+    var defaulted = function (fallback) {
+      return adt.defaultedThunk(constant(fallback));
+    };
+    var mergeWith = function (base) {
+      return adt.mergeWithThunk(constant(base));
+    };
+    var strict = adt.strict;
+    var asOption = adt.asOption;
+    var defaultedThunk = adt.defaultedThunk;
+    var asDefaultedOptionThunk = adt.asDefaultedOptionThunk;
+    var mergeWithThunk = adt.mergeWithThunk;
+
+    var exclude = function (obj, fields) {
+      var r = {};
+      each$1(obj, function (v, k) {
+        if (!contains(fields, k)) {
+          r[k] = v;
+        }
+      });
+      return r;
+    };
+
+    var wrap = function (key, value) {
+      var _a;
+      return _a = {}, _a[key] = value, _a;
+    };
+    var wrapAll = function (keyvalues) {
+      var r = {};
+      each(keyvalues, function (kv) {
+        r[kv.key] = kv.value;
+      });
+      return r;
+    };
+
+    var comparison = Adt.generate([
+      {
+        bothErrors: [
+          'error1',
+          'error2'
+        ]
+      },
+      {
+        firstError: [
+          'error1',
+          'value2'
+        ]
+      },
+      {
+        secondError: [
+          'value1',
+          'error2'
+        ]
+      },
+      {
+        bothValues: [
+          'value1',
+          'value2'
+        ]
+      }
+    ]);
+    var partition$2 = function (results) {
+      var errors = [];
+      var values = [];
+      each(results, function (result) {
+        result.fold(function (err) {
+          errors.push(err);
+        }, function (value) {
+          values.push(value);
+        });
+      });
+      return {
+        errors: errors,
+        values: values
+      };
+    };
+
+    var exclude$1 = function (obj, fields) {
+      return exclude(obj, fields);
+    };
+    var wrap$1 = function (key, value) {
+      return wrap(key, value);
+    };
+    var wrapAll$1 = function (keyvalues) {
+      return wrapAll(keyvalues);
+    };
+    var mergeValues = function (values, base) {
+      return values.length === 0 ? Result.value(base) : Result.value(deepMerge(base, merge.apply(undefined, values)));
+    };
+    var mergeErrors = function (errors) {
+      return Result.error(flatten(errors));
+    };
+    var consolidate = function (objs, base) {
+      var partitions = partition$2(objs);
+      return partitions.errors.length > 0 ? mergeErrors(partitions.errors) : mergeValues(partitions.values, base);
+    };
+
+    var mergeValues$1 = function (values, base) {
+      return values.length > 0 ? SimpleResult.svalue(deepMerge(base, merge.apply(undefined, values))) : SimpleResult.svalue(base);
+    };
+    var mergeErrors$1 = function (errors) {
+      return compose(SimpleResult.serror, flatten)(errors);
+    };
+    var consolidateObj = function (objects, base) {
+      var partition = SimpleResult.partition(objects);
+      return partition.errors.length > 0 ? mergeErrors$1(partition.errors) : mergeValues$1(partition.values, base);
+    };
+    var consolidateArr = function (objects) {
+      var partitions = SimpleResult.partition(objects);
+      return partitions.errors.length > 0 ? mergeErrors$1(partitions.errors) : SimpleResult.svalue(partitions.values);
+    };
+    var ResultCombine = {
+      consolidateObj: consolidateObj,
+      consolidateArr: consolidateArr
+    };
+
+    var formatObj = function (input) {
+      return isObject(input) && keys(input).length > 100 ? ' removed due to size' : JSON.stringify(input, null, 2);
+    };
+    var formatErrors = function (errors) {
+      var es = errors.length > 10 ? errors.slice(0, 10).concat([{
+          path: [],
+          getErrorInfo: function () {
+            return '... (only showing first ten failures)';
+          }
+        }]) : errors;
+      return map(es, function (e) {
+        return 'Failed path: (' + e.path.join(' > ') + ')\n' + e.getErrorInfo();
+      });
+    };
+
+    var nu = function (path, getErrorInfo) {
+      return SimpleResult.serror([{
+          path: path,
+          getErrorInfo: getErrorInfo
+        }]);
+    };
+    var missingStrict = function (path, key, obj) {
+      return nu(path, function () {
+        return 'Could not find valid *strict* value for "' + key + '" in ' + formatObj(obj);
+      });
+    };
+    var missingKey = function (path, key) {
+      return nu(path, function () {
+        return 'Choice schema did not contain choice key: "' + key + '"';
+      });
+    };
+    var missingBranch = function (path, branches, branch) {
+      return nu(path, function () {
+        return 'The chosen schema: "' + branch + '" did not exist in branches: ' + formatObj(branches);
+      });
+    };
+    var unsupportedFields = function (path, unsupported) {
+      return nu(path, function () {
+        return 'There are unsupported fields: [' + unsupported.join(', ') + '] specified';
+      });
+    };
+    var custom = function (path, err) {
+      return nu(path, function () {
+        return err;
+      });
+    };
+
+    var adt$1 = Adt.generate([
+      {
+        field: [
+          'key',
+          'okey',
+          'presence',
+          'prop'
+        ]
+      },
+      {
+        state: [
+          'okey',
+          'instantiator'
+        ]
+      }
+    ]);
+    var strictAccess = function (path, obj, key) {
+      return get(obj, key).fold(function () {
+        return missingStrict(path, key, obj);
+      }, SimpleResult.svalue);
+    };
+    var fallbackAccess = function (obj, key, fallbackThunk) {
+      var v = get(obj, key).fold(function () {
+        return fallbackThunk(obj);
+      }, identity);
+      return SimpleResult.svalue(v);
+    };
+    var optionAccess = function (obj, key) {
+      return SimpleResult.svalue(get(obj, key));
+    };
+    var optionDefaultedAccess = function (obj, key, fallback) {
+      var opt = get(obj, key).map(function (val) {
+        return val === true ? fallback(obj) : val;
+      });
+      return SimpleResult.svalue(opt);
+    };
+    var cExtractOne = function (path, obj, field, strength) {
+      return field.fold(function (key, okey, presence, prop) {
+        var bundle = function (av) {
+          var result = prop.extract(path.concat([key]), strength, av);
+          return SimpleResult.map(result, function (res) {
+            return wrap(okey, strength(res));
+          });
+        };
+        var bundleAsOption = function (optValue) {
+          return optValue.fold(function () {
+            var outcome = wrap(okey, strength(Option.none()));
+            return SimpleResult.svalue(outcome);
+          }, function (ov) {
+            var result = prop.extract(path.concat([key]), strength, ov);
+            return SimpleResult.map(result, function (res) {
+              return wrap(okey, strength(Option.some(res)));
+            });
+          });
+        };
+        return function () {
+          return presence.fold(function () {
+            return SimpleResult.bind(strictAccess(path, obj, key), bundle);
+          }, function (fallbackThunk) {
+            return SimpleResult.bind(fallbackAccess(obj, key, fallbackThunk), bundle);
+          }, function () {
+            return SimpleResult.bind(optionAccess(obj, key), bundleAsOption);
+          }, function (fallbackThunk) {
+            return SimpleResult.bind(optionDefaultedAccess(obj, key, fallbackThunk), bundleAsOption);
+          }, function (baseThunk) {
+            var base = baseThunk(obj);
+            var result = SimpleResult.map(fallbackAccess(obj, key, constant({})), function (v) {
+              return deepMerge(base, v);
+            });
+            return SimpleResult.bind(result, bundle);
+          });
+        }();
+      }, function (okey, instantiator) {
+        var state = instantiator(obj);
+        return SimpleResult.svalue(wrap(okey, strength(state)));
+      });
+    };
+    var cExtract = function (path, obj, fields, strength) {
+      var results = map(fields, function (field) {
+        return cExtractOne(path, obj, field, strength);
+      });
+      return ResultCombine.consolidateObj(results, {});
+    };
+    var valueThunk = function (getDelegate) {
+      var extract = function (path, strength, val) {
+        return getDelegate().extract(path, strength, val);
+      };
+      var toString = function () {
+        return getDelegate().toString();
+      };
+      return {
+        extract: extract,
+        toString: toString
+      };
+    };
+    var value$1 = function (validator) {
+      var extract = function (path, strength, val) {
+        return SimpleResult.bindError(validator(val, strength), function (err) {
+          return custom(path, err);
+        });
+      };
+      var toString = function () {
+        return 'val';
+      };
+      return {
+        extract: extract,
+        toString: toString
+      };
+    };
+    var getSetKeys = function (obj) {
+      return keys(filter$1(obj, function (value) {
+        return value !== undefined && value !== null;
+      }));
+    };
+    var objOfOnly = function (fields) {
+      var delegate = objOf(fields);
+      var fieldNames = foldr(fields, function (acc, f) {
+        return f.fold(function (key) {
+          return deepMerge(acc, wrap$1(key, true));
+        }, constant(acc));
+      }, {});
+      var extract = function (path, strength, o) {
+        var keys = isBoolean(o) ? [] : getSetKeys(o);
+        var extra = filter(keys, function (k) {
+          return !hasNonNullableKey(fieldNames, k);
+        });
+        return extra.length === 0 ? delegate.extract(path, strength, o) : unsupportedFields(path, extra);
+      };
+      return {
+        extract: extract,
+        toString: delegate.toString
+      };
+    };
+    var objOf = function (fields) {
+      var extract = function (path, strength, o) {
+        return cExtract(path, o, fields, strength);
+      };
+      var toString = function () {
+        var fieldStrings = map(fields, function (field) {
+          return field.fold(function (key, okey, presence, prop) {
+            return key + ' -> ' + prop.toString();
+          }, function (okey, _instantiator) {
+            return 'state(' + okey + ')';
+          });
+        });
+        return 'obj{\n' + fieldStrings.join('\n') + '}';
+      };
+      return {
+        extract: extract,
+        toString: toString
+      };
+    };
+    var arrOf = function (prop) {
+      var extract = function (path, strength, array) {
+        var results = map(array, function (a, i) {
+          return prop.extract(path.concat(['[' + i + ']']), strength, a);
+        });
+        return ResultCombine.consolidateArr(results);
+      };
+      var toString = function () {
+        return 'array(' + prop.toString() + ')';
+      };
+      return {
+        extract: extract,
+        toString: toString
+      };
+    };
+    var oneOf = function (props) {
+      var extract = function (path, strength, val) {
+        var errors = [];
+        for (var _i = 0, props_1 = props; _i < props_1.length; _i++) {
+          var prop = props_1[_i];
+          var res = prop.extract(path, strength, val);
+          if (res.stype === SimpleResultType.Value) {
+            return res;
+          }
+          errors.push(res);
+        }
+        return ResultCombine.consolidateArr(errors);
+      };
+      var toString = function () {
+        return 'oneOf(' + map(props, function (prop) {
+          return prop.toString();
+        }).join(', ') + ')';
+      };
+      return {
+        extract: extract,
+        toString: toString
+      };
+    };
+    var setOf = function (validator, prop) {
+      var validateKeys = function (path, keys) {
+        return arrOf(value$1(validator)).extract(path, identity, keys);
+      };
+      var extract = function (path, strength, o) {
+        var keys$1 = keys(o);
+        var validatedKeys = validateKeys(path, keys$1);
+        return SimpleResult.bind(validatedKeys, function (validKeys) {
+          var schema = map(validKeys, function (vk) {
+            return adt$1.field(vk, vk, strict(), prop);
+          });
+          return objOf(schema).extract(path, strength, o);
+        });
+      };
+      var toString = function () {
+        return 'setOf(' + prop.toString() + ')';
+      };
+      return {
+        extract: extract,
+        toString: toString
+      };
+    };
+    var anyValue = constant(value$1(SimpleResult.svalue));
+    var arrOfObj = compose(arrOf, objOf);
+    var state = adt$1.state;
+    var field = adt$1.field;
+
+    var chooseFrom = function (path, strength, input, branches, ch) {
+      var fields = get(branches, ch);
+      return fields.fold(function () {
+        return missingBranch(path, branches, ch);
+      }, function (vp) {
+        return vp.extract(path.concat(['branch: ' + ch]), strength, input);
+      });
+    };
+    var choose = function (key, branches) {
+      var extract = function (path, strength, input) {
+        var choice = get(input, key);
+        return choice.fold(function () {
+          return missingKey(path, key);
+        }, function (chosen) {
+          return chooseFrom(path, strength, input, branches, chosen);
+        });
+      };
+      var toString = function () {
+        return 'chooseOn(' + key + '). Possible values: ' + keys(branches);
+      };
+      return {
+        extract: extract,
+        toString: toString
+      };
+    };
+
+    var _anyValue = value$1(SimpleResult.svalue);
+    var arrOfObj$1 = function (objFields) {
+      return arrOfObj(objFields);
+    };
+    var arrOfVal = function () {
+      return arrOf(_anyValue);
+    };
+    var valueThunkOf = valueThunk;
+    var valueOf = function (validator) {
+      return value$1(function (v) {
+        return validator(v).fold(SimpleResult.serror, SimpleResult.svalue);
+      });
+    };
+    var setOf$1 = function (validator, prop) {
+      return setOf(function (v) {
+        return SimpleResult.fromResult(validator(v));
+      }, prop);
+    };
+    var extract = function (label, prop, strength, obj) {
+      var res = prop.extract([label], strength, obj);
+      return SimpleResult.mapError(res, function (errs) {
+        return {
+          input: obj,
+          errors: errs
+        };
+      });
+    };
+    var asRaw = function (label, prop, obj) {
+      return SimpleResult.toResult(extract(label, prop, identity, obj));
+    };
+    var getOrDie = function (extraction) {
+      return extraction.fold(function (errInfo) {
+        throw new Error(formatError(errInfo));
+      }, identity);
+    };
+    var asRawOrDie = function (label, prop, obj) {
+      return getOrDie(asRaw(label, prop, obj));
+    };
+    var formatError = function (errInfo) {
+      return 'Errors: \n' + formatErrors(errInfo.errors).join('\n') + '\n\nInput object: ' + formatObj(errInfo.input);
+    };
+    var chooseProcessor = function (key, branches) {
+      return choose(key, branches);
+    };
+    var choose$1 = function (key, branches) {
+      return choose(key, map$1(branches, objOf));
+    };
+    var anyValue$1 = constant(_anyValue);
+    var typedValue = function (validator, expectedType) {
+      return value$1(function (a) {
+        var actualType = typeof a;
+        return validator(a) ? SimpleResult.svalue(a) : SimpleResult.serror('Expected type: ' + expectedType + ' but got: ' + actualType);
+      });
+    };
+    var number = typedValue(isNumber, 'number');
+    var string = typedValue(isString, 'string');
+    var boolean = typedValue(isBoolean, 'boolean');
+    var functionProcessor = typedValue(isFunction, 'function');
+    var isPostMessageable = function (val) {
+      var every = function (iter, callbackFn) {
+        var result = iter.next();
+        while (!result.done) {
+          if (!callbackFn(result.value)) {
+            return false;
+          }
+          result = iter.next();
+        }
+        return true;
+      };
+      if (Object(val) !== val) {
+        return true;
+      }
+      switch ({}.toString.call(val).slice(8, -1)) {
+      case 'Boolean':
+      case 'Number':
+      case 'String':
+      case 'Date':
+      case 'RegExp':
+      case 'Blob':
+      case 'FileList':
+      case 'ImageData':
+      case 'ImageBitmap':
+      case 'ArrayBuffer':
+        return true;
+      case 'Array':
+      case 'Object':
+        return Object.keys(val).every(function (prop) {
+          return isPostMessageable(val[prop]);
+        });
+      case 'Map':
+        return every(val.keys(), isPostMessageable) && every(val.values(), isPostMessageable);
+      case 'Set':
+        return every(val.keys(), isPostMessageable);
+      default:
+        return false;
+      }
+    };
+    var postMessageable = value$1(function (a) {
+      return isPostMessageable(a) ? SimpleResult.svalue(a) : SimpleResult.serror('Expected value to be acceptable for sending via postMessage');
+    });
+
+    var validateEnum = function (values) {
+      return valueOf(function (value) {
+        return contains(values, value) ? Result.value(value) : Result.error('Unsupported value: "' + value + '", choose one of "' + values.join(', ') + '".');
+      });
+    };
+    var strict$1 = function (key) {
+      return field(key, key, strict(), anyValue());
+    };
+    var strictOf = function (key, schema) {
+      return field(key, key, strict(), schema);
+    };
+    var strictNumber = function (key) {
+      return strictOf(key, number);
+    };
+    var strictString = function (key) {
+      return strictOf(key, string);
+    };
+    var strictStringEnum = function (key, values) {
+      return field(key, key, strict(), validateEnum(values));
+    };
+    var strictBoolean = function (key) {
+      return strictOf(key, boolean);
+    };
+    var strictFunction = function (key) {
+      return strictOf(key, functionProcessor);
+    };
+    var forbid = function (key, message) {
+      return field(key, key, asOption(), value$1(function (_v) {
+        return SimpleResult.serror('The field: ' + key + ' is forbidden. ' + message);
+      }));
+    };
+    var strictObjOf = function (key, objSchema) {
+      return field(key, key, strict(), objOf(objSchema));
+    };
+    var strictArrayOfObj = function (key, objFields) {
+      return field(key, key, strict(), arrOfObj(objFields));
+    };
+    var strictArrayOf = function (key, schema) {
+      return field(key, key, strict(), arrOf(schema));
+    };
+    var option = function (key) {
+      return field(key, key, asOption(), anyValue());
+    };
+    var optionOf = function (key, schema) {
+      return field(key, key, asOption(), schema);
+    };
+    var optionNumber = function (key) {
+      return optionOf(key, number);
+    };
+    var optionString = function (key) {
+      return optionOf(key, string);
+    };
+    var optionFunction = function (key) {
+      return optionOf(key, functionProcessor);
+    };
+    var optionArrayOf = function (key, schema) {
+      return optionOf(key, arrOf(schema));
+    };
+    var optionObjOf = function (key, objSchema) {
+      return optionOf(key, objOf(objSchema));
+    };
+    var optionObjOfOnly = function (key, objSchema) {
+      return optionOf(key, objOfOnly(objSchema));
+    };
+    var defaulted$1 = function (key, fallback) {
+      return field(key, key, defaulted(fallback), anyValue());
+    };
+    var defaultedOf = function (key, fallback, schema) {
+      return field(key, key, defaulted(fallback), schema);
+    };
+    var defaultedNumber = function (key, fallback) {
+      return defaultedOf(key, fallback, number);
+    };
+    var defaultedString = function (key, fallback) {
+      return defaultedOf(key, fallback, string);
+    };
+    var defaultedStringEnum = function (key, fallback, values) {
+      return defaultedOf(key, fallback, validateEnum(values));
+    };
+    var defaultedBoolean = function (key, fallback) {
+      return defaultedOf(key, fallback, boolean);
+    };
+    var defaultedFunction = function (key, fallback) {
+      return defaultedOf(key, fallback, functionProcessor);
+    };
+    var defaultedPostMsg = function (key, fallback) {
+      return defaultedOf(key, fallback, postMessageable);
+    };
+    var defaultedArrayOf = function (key, fallback, schema) {
+      return defaultedOf(key, fallback, arrOf(schema));
+    };
+    var defaultedObjOf = function (key, fallback, objSchema) {
+      return defaultedOf(key, fallback, objOf(objSchema));
+    };
+    var state$1 = function (okey, instantiator) {
+      return state(okey, instantiator);
+    };
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var fromHtml = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      if (!div.hasChildNodes() || div.childNodes.length > 1) {
+        domGlobals.console.error('HTML does not have a single root node', html);
+        throw new Error('HTML must have a single root node');
+      }
+      return fromDom(div.childNodes[0]);
+    };
+    var fromTag = function (tag, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createElement(tag);
+      return fromDom(node);
+    };
+    var fromText = function (text, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createTextNode(text);
+      return fromDom(node);
+    };
+    var fromDom = function (node) {
+      if (node === null || node === undefined) {
+        throw new Error('Node cannot be null or undefined');
+      }
+      return { dom: constant(node) };
+    };
+    var fromPoint = function (docElm, x, y) {
+      var doc = docElm.dom();
+      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
+    };
+    var Element = {
+      fromHtml: fromHtml,
+      fromTag: fromTag,
+      fromText: fromText,
+      fromDom: fromDom,
+      fromPoint: fromPoint
+    };
+
+    var compareDocumentPosition = function (a, b, match) {
+      return (a.compareDocumentPosition(b) & match) !== 0;
+    };
+    var documentPositionContainedBy = function (a, b) {
+      return compareDocumentPosition(a, b, domGlobals.Node.DOCUMENT_POSITION_CONTAINED_BY);
+    };
+
+    var firstMatch = function (regexes, s) {
+      for (var i = 0; i < regexes.length; i++) {
+        var x = regexes[i];
+        if (x.test(s)) {
+          return x;
+        }
+      }
+      return undefined;
+    };
+    var find$2 = function (regexes, agent) {
+      var r = firstMatch(regexes, agent);
+      if (!r) {
+        return {
+          major: 0,
+          minor: 0
+        };
+      }
+      var group = function (i) {
+        return Number(agent.replace(r, '$' + i));
+      };
+      return nu$1(group(1), group(2));
+    };
+    var detect = function (versionRegexes, agent) {
+      var cleanedAgent = String(agent).toLowerCase();
+      if (versionRegexes.length === 0) {
+        return unknown();
+      }
+      return find$2(versionRegexes, cleanedAgent);
+    };
+    var unknown = function () {
+      return nu$1(0, 0);
+    };
+    var nu$1 = function (major, minor) {
+      return {
+        major: major,
+        minor: minor
+      };
+    };
+    var Version = {
+      nu: nu$1,
+      detect: detect,
+      unknown: unknown
+    };
+
+    var edge = 'Edge';
+    var chrome = 'Chrome';
+    var ie = 'IE';
+    var opera = 'Opera';
+    var firefox = 'Firefox';
+    var safari = 'Safari';
+    var unknown$1 = function () {
+      return nu$2({
+        current: undefined,
+        version: Version.unknown()
+      });
+    };
+    var nu$2 = function (info) {
+      var current = info.current;
+      var version = info.version;
+      var isBrowser = function (name) {
+        return function () {
+          return current === name;
+        };
+      };
+      return {
+        current: current,
+        version: version,
+        isEdge: isBrowser(edge),
+        isChrome: isBrowser(chrome),
+        isIE: isBrowser(ie),
+        isOpera: isBrowser(opera),
+        isFirefox: isBrowser(firefox),
+        isSafari: isBrowser(safari)
+      };
+    };
+    var Browser = {
+      unknown: unknown$1,
+      nu: nu$2,
+      edge: constant(edge),
+      chrome: constant(chrome),
+      ie: constant(ie),
+      opera: constant(opera),
+      firefox: constant(firefox),
+      safari: constant(safari)
+    };
+
+    var windows = 'Windows';
+    var ios = 'iOS';
+    var android = 'Android';
+    var linux = 'Linux';
+    var osx = 'OSX';
+    var solaris = 'Solaris';
+    var freebsd = 'FreeBSD';
+    var chromeos = 'ChromeOS';
+    var unknown$2 = function () {
+      return nu$3({
+        current: undefined,
+        version: Version.unknown()
+      });
+    };
+    var nu$3 = function (info) {
+      var current = info.current;
+      var version = info.version;
+      var isOS = function (name) {
+        return function () {
+          return current === name;
+        };
+      };
+      return {
+        current: current,
+        version: version,
+        isWindows: isOS(windows),
+        isiOS: isOS(ios),
+        isAndroid: isOS(android),
+        isOSX: isOS(osx),
+        isLinux: isOS(linux),
+        isSolaris: isOS(solaris),
+        isFreeBSD: isOS(freebsd),
+        isChromeOS: isOS(chromeos)
+      };
+    };
+    var OperatingSystem = {
+      unknown: unknown$2,
+      nu: nu$3,
+      windows: constant(windows),
+      ios: constant(ios),
+      android: constant(android),
+      linux: constant(linux),
+      osx: constant(osx),
+      solaris: constant(solaris),
+      freebsd: constant(freebsd),
+      chromeos: constant(chromeos)
+    };
+
+    var DeviceType = function (os, browser, userAgent, mediaMatch) {
+      var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
+      var isiPhone = os.isiOS() && !isiPad;
+      var isMobile = os.isiOS() || os.isAndroid();
+      var isTouch = isMobile || mediaMatch('(pointer:coarse)');
+      var isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');
+      var isPhone = isiPhone || isMobile && !isTablet;
+      var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
+      var isDesktop = !isPhone && !isTablet && !iOSwebview;
+      return {
+        isiPad: constant(isiPad),
+        isiPhone: constant(isiPhone),
+        isTablet: constant(isTablet),
+        isPhone: constant(isPhone),
+        isTouch: constant(isTouch),
+        isAndroid: os.isAndroid,
+        isiOS: os.isiOS,
+        isWebView: constant(iOSwebview),
+        isDesktop: constant(isDesktop)
+      };
+    };
+
+    var detect$1 = function (candidates, userAgent) {
+      var agent = String(userAgent).toLowerCase();
+      return find(candidates, function (candidate) {
+        return candidate.search(agent);
+      });
+    };
+    var detectBrowser = function (browsers, userAgent) {
+      return detect$1(browsers, userAgent).map(function (browser) {
+        var version = Version.detect(browser.versionRegexes, userAgent);
+        return {
+          current: browser.name,
+          version: version
+        };
+      });
+    };
+    var detectOs = function (oses, userAgent) {
+      return detect$1(oses, userAgent).map(function (os) {
+        var version = Version.detect(os.versionRegexes, userAgent);
+        return {
+          current: os.name,
+          version: version
+        };
+      });
+    };
+    var UaString = {
+      detectBrowser: detectBrowser,
+      detectOs: detectOs
+    };
+
+    var checkRange = function (str, substr, start) {
+      return substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
+    };
+    var contains$1 = function (str, substr) {
+      return str.indexOf(substr) !== -1;
+    };
+    var endsWith = function (str, suffix) {
+      return checkRange(str, suffix, str.length - suffix.length);
+    };
+    var blank = function (r) {
+      return function (s) {
+        return s.replace(r, '');
+      };
+    };
+    var trim = blank(/^\s+|\s+$/g);
+
+    var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
+    var checkContains = function (target) {
+      return function (uastring) {
+        return contains$1(uastring, target);
+      };
+    };
+    var browsers = [
+      {
+        name: 'Edge',
+        versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
+        search: function (uastring) {
+          return contains$1(uastring, 'edge/') && contains$1(uastring, 'chrome') && contains$1(uastring, 'safari') && contains$1(uastring, 'applewebkit');
+        }
+      },
+      {
+        name: 'Chrome',
+        versionRegexes: [
+          /.*?chrome\/([0-9]+)\.([0-9]+).*/,
+          normalVersionRegex
+        ],
+        search: function (uastring) {
+          return contains$1(uastring, 'chrome') && !contains$1(uastring, 'chromeframe');
+        }
+      },
+      {
+        name: 'IE',
+        versionRegexes: [
+          /.*?msie\ ?([0-9]+)\.([0-9]+).*/,
+          /.*?rv:([0-9]+)\.([0-9]+).*/
+        ],
+        search: function (uastring) {
+          return contains$1(uastring, 'msie') || contains$1(uastring, 'trident');
+        }
+      },
+      {
+        name: 'Opera',
+        versionRegexes: [
+          normalVersionRegex,
+          /.*?opera\/([0-9]+)\.([0-9]+).*/
+        ],
+        search: checkContains('opera')
+      },
+      {
+        name: 'Firefox',
+        versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
+        search: checkContains('firefox')
+      },
+      {
+        name: 'Safari',
+        versionRegexes: [
+          normalVersionRegex,
+          /.*?cpu os ([0-9]+)_([0-9]+).*/
+        ],
+        search: function (uastring) {
+          return (contains$1(uastring, 'safari') || contains$1(uastring, 'mobile/')) && contains$1(uastring, 'applewebkit');
+        }
+      }
+    ];
+    var oses = [
+      {
+        name: 'Windows',
+        search: checkContains('win'),
+        versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
+      },
+      {
+        name: 'iOS',
+        search: function (uastring) {
+          return contains$1(uastring, 'iphone') || contains$1(uastring, 'ipad');
+        },
+        versionRegexes: [
+          /.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
+          /.*cpu os ([0-9]+)_([0-9]+).*/,
+          /.*cpu iphone os ([0-9]+)_([0-9]+).*/
+        ]
+      },
+      {
+        name: 'Android',
+        search: checkContains('android'),
+        versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
+      },
+      {
+        name: 'OSX',
+        search: checkContains('mac os x'),
+        versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]
+      },
+      {
+        name: 'Linux',
+        search: checkContains('linux'),
+        versionRegexes: []
+      },
+      {
+        name: 'Solaris',
+        search: checkContains('sunos'),
+        versionRegexes: []
+      },
+      {
+        name: 'FreeBSD',
+        search: checkContains('freebsd'),
+        versionRegexes: []
+      },
+      {
+        name: 'ChromeOS',
+        search: checkContains('cros'),
+        versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/]
+      }
+    ];
+    var PlatformInfo = {
+      browsers: constant(browsers),
+      oses: constant(oses)
+    };
+
+    var detect$2 = function (userAgent, mediaMatch) {
+      var browsers = PlatformInfo.browsers();
+      var oses = PlatformInfo.oses();
+      var browser = UaString.detectBrowser(browsers, userAgent).fold(Browser.unknown, Browser.nu);
+      var os = UaString.detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
+      var deviceType = DeviceType(os, browser, userAgent, mediaMatch);
+      return {
+        browser: browser,
+        os: os,
+        deviceType: deviceType
+      };
+    };
+    var PlatformDetection = { detect: detect$2 };
+
+    var mediaMatch = function (query) {
+      return domGlobals.window.matchMedia(query).matches;
+    };
+    var platform = cached(function () {
+      return PlatformDetection.detect(domGlobals.navigator.userAgent, mediaMatch);
+    });
+    var detect$3 = function () {
+      return platform();
+    };
+
+    var DOCUMENT = 9;
+    var ELEMENT = 1;
+    var TEXT = 3;
+
+    var ELEMENT$1 = ELEMENT;
+    var DOCUMENT$1 = DOCUMENT;
+    var is = function (element, selector) {
+      var dom = element.dom();
+      if (dom.nodeType !== ELEMENT$1) {
+        return false;
+      } else {
+        var elem = dom;
+        if (elem.matches !== undefined) {
+          return elem.matches(selector);
+        } else if (elem.msMatchesSelector !== undefined) {
+          return elem.msMatchesSelector(selector);
+        } else if (elem.webkitMatchesSelector !== undefined) {
+          return elem.webkitMatchesSelector(selector);
+        } else if (elem.mozMatchesSelector !== undefined) {
+          return elem.mozMatchesSelector(selector);
+        } else {
+          throw new Error('Browser lacks native selectors');
+        }
+      }
+    };
+    var bypassSelector = function (dom) {
+      return dom.nodeType !== ELEMENT$1 && dom.nodeType !== DOCUMENT$1 || dom.childElementCount === 0;
+    };
+    var all = function (selector, scope) {
+      var base = scope === undefined ? domGlobals.document : scope.dom();
+      return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), Element.fromDom);
+    };
+    var one = function (selector, scope) {
+      var base = scope === undefined ? domGlobals.document : scope.dom();
+      return bypassSelector(base) ? Option.none() : Option.from(base.querySelector(selector)).map(Element.fromDom);
+    };
+
+    var eq$1 = function (e1, e2) {
+      return e1.dom() === e2.dom();
+    };
+    var regularContains = function (e1, e2) {
+      var d1 = e1.dom();
+      var d2 = e2.dom();
+      return d1 === d2 ? false : d1.contains(d2);
+    };
+    var ieContains = function (e1, e2) {
+      return documentPositionContainedBy(e1.dom(), e2.dom());
+    };
+    var contains$2 = function (e1, e2) {
+      return detect$3().browser.isIE() ? ieContains(e1, e2) : regularContains(e1, e2);
+    };
+
+    var ensureIsRoot = function (isRoot) {
+      return isFunction(isRoot) ? isRoot : constant(false);
+    };
+    var ancestor = function (scope, transform, isRoot) {
+      var element = scope.dom();
+      var stop = ensureIsRoot(isRoot);
+      while (element.parentNode) {
+        element = element.parentNode;
+        var el = Element.fromDom(element);
+        var transformed = transform(el);
+        if (transformed.isSome()) {
+          return transformed;
+        } else if (stop(el)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var closest = function (scope, transform, isRoot) {
+      var current = transform(scope);
+      var stop = ensureIsRoot(isRoot);
+      return current.orThunk(function () {
+        return stop(scope) ? Option.none() : ancestor(scope, transform, stop);
+      });
+    };
+
+    var isSource = function (component, simulatedEvent) {
+      return eq$1(component.element(), simulatedEvent.event().target());
+    };
+
+    var nu$4 = function (parts) {
+      if (!hasNonNullableKey(parts, 'can') && !hasNonNullableKey(parts, 'abort') && !hasNonNullableKey(parts, 'run')) {
+        throw new Error('EventHandler defined by: ' + JSON.stringify(parts, null, 2) + ' does not have can, abort, or run!');
+      }
+      return asRawOrDie('Extracting event.handler', objOfOnly([
+        defaulted$1('can', constant(true)),
+        defaulted$1('abort', constant(false)),
+        defaulted$1('run', noop)
+      ]), parts);
+    };
+    var all$1 = function (handlers, f) {
+      return function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        return foldl(handlers, function (acc, handler) {
+          return acc && f(handler).apply(undefined, args);
+        }, true);
+      };
+    };
+    var any = function (handlers, f) {
+      return function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        return foldl(handlers, function (acc, handler) {
+          return acc || f(handler).apply(undefined, args);
+        }, false);
+      };
+    };
+    var read = function (handler) {
+      return isFunction(handler) ? {
+        can: constant(true),
+        abort: constant(false),
+        run: handler
+      } : handler;
+    };
+    var fuse = function (handlers) {
+      var can = all$1(handlers, function (handler) {
+        return handler.can;
+      });
+      var abort = any(handlers, function (handler) {
+        return handler.abort;
+      });
+      var run = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        each(handlers, function (handler) {
+          handler.run.apply(undefined, args);
+        });
+      };
+      return nu$4({
+        can: can,
+        abort: abort,
+        run: run
+      });
+    };
+
+    var touchstart = constant('touchstart');
+    var touchmove = constant('touchmove');
+    var touchend = constant('touchend');
+    var touchcancel = constant('touchcancel');
+    var mousedown = constant('mousedown');
+    var mousemove = constant('mousemove');
+    var mouseout = constant('mouseout');
+    var mouseup = constant('mouseup');
+    var mouseover = constant('mouseover');
+    var focusin = constant('focusin');
+    var focusout = constant('focusout');
+    var keydown = constant('keydown');
+    var keyup = constant('keyup');
+    var input = constant('input');
+    var change = constant('change');
+    var click = constant('click');
+    var transitionend = constant('transitionend');
+    var selectstart = constant('selectstart');
+
+    var alloy = { tap: constant('alloy.tap') };
+    var focus = constant('alloy.focus');
+    var postBlur = constant('alloy.blur.post');
+    var postPaste = constant('alloy.paste.post');
+    var receive = constant('alloy.receive');
+    var execute = constant('alloy.execute');
+    var focusItem = constant('alloy.focus.item');
+    var tap = alloy.tap;
+    var longpress = constant('alloy.longpress');
+    var sandboxClose = constant('alloy.sandbox.close');
+    var typeaheadCancel = constant('alloy.typeahead.cancel');
+    var systemInit = constant('alloy.system.init');
+    var documentTouchmove = constant('alloy.system.touchmove');
+    var documentTouchend = constant('alloy.system.touchend');
+    var windowScroll = constant('alloy.system.scroll');
+    var windowResize = constant('alloy.system.resize');
+    var attachedToDom = constant('alloy.system.attached');
+    var detachedFromDom = constant('alloy.system.detached');
+    var dismissRequested = constant('alloy.system.dismissRequested');
+    var repositionRequested = constant('alloy.system.repositionRequested');
+    var focusShifted = constant('alloy.focusmanager.shifted');
+    var slotVisibility = constant('alloy.slotcontainer.visibility');
+    var changeTab = constant('alloy.change.tab');
+    var dismissTab = constant('alloy.dismiss.tab');
+    var highlight = constant('alloy.highlight');
+    var dehighlight = constant('alloy.dehighlight');
+
+    var emit = function (component, event) {
+      dispatchWith(component, component.element(), event, {});
+    };
+    var emitWith = function (component, event, properties) {
+      dispatchWith(component, component.element(), event, properties);
+    };
+    var emitExecute = function (component) {
+      emit(component, execute());
+    };
+    var dispatch = function (component, target, event) {
+      dispatchWith(component, target, event, {});
+    };
+    var dispatchWith = function (component, target, event, properties) {
+      var data = __assign({ target: target }, properties);
+      component.getSystem().triggerEvent(event, target, map$1(data, constant));
+    };
+    var dispatchEvent = function (component, target, event, simulatedEvent) {
+      component.getSystem().triggerEvent(event, target, simulatedEvent.event());
+    };
+
+    var derive = function (configs) {
+      return wrapAll$1(configs);
+    };
+    var abort = function (name, predicate) {
+      return {
+        key: name,
+        value: nu$4({ abort: predicate })
+      };
+    };
+    var can = function (name, predicate) {
+      return {
+        key: name,
+        value: nu$4({ can: predicate })
+      };
+    };
+    var preventDefault = function (name) {
+      return {
+        key: name,
+        value: nu$4({
+          run: function (component, simulatedEvent) {
+            simulatedEvent.event().prevent();
+          }
+        })
+      };
+    };
+    var run = function (name, handler) {
+      return {
+        key: name,
+        value: nu$4({ run: handler })
+      };
+    };
+    var runActionExtra = function (name, action, extra) {
+      return {
+        key: name,
+        value: nu$4({
+          run: function (component, simulatedEvent) {
+            action.apply(undefined, [
+              component,
+              simulatedEvent
+            ].concat(extra));
+          }
+        })
+      };
+    };
+    var runOnName = function (name) {
+      return function (handler) {
+        return run(name, handler);
+      };
+    };
+    var runOnSourceName = function (name) {
+      return function (handler) {
+        return {
+          key: name,
+          value: nu$4({
+            run: function (component, simulatedEvent) {
+              if (isSource(component, simulatedEvent)) {
+                handler(component, simulatedEvent);
+              }
+            }
+          })
+        };
+      };
+    };
+    var redirectToUid = function (name, uid) {
+      return run(name, function (component, simulatedEvent) {
+        component.getSystem().getByUid(uid).each(function (redirectee) {
+          dispatchEvent(redirectee, redirectee.element(), name, simulatedEvent);
+        });
+      });
+    };
+    var redirectToPart = function (name, detail, partName) {
+      var uid = detail.partUids[partName];
+      return redirectToUid(name, uid);
+    };
+    var runWithTarget = function (name, f) {
+      return run(name, function (component, simulatedEvent) {
+        var ev = simulatedEvent.event();
+        var target = component.getSystem().getByDom(ev.target()).fold(function () {
+          var closest$1 = closest(ev.target(), function (el) {
+            return component.getSystem().getByDom(el).toOption();
+          }, constant(false));
+          return closest$1.getOr(component);
+        }, function (c) {
+          return c;
+        });
+        f(component, target, simulatedEvent);
+      });
+    };
+    var cutter = function (name) {
+      return run(name, function (component, simulatedEvent) {
+        simulatedEvent.cut();
+      });
+    };
+    var stopper = function (name) {
+      return run(name, function (component, simulatedEvent) {
+        simulatedEvent.stop();
+      });
+    };
+    var runOnSource = function (name, f) {
+      return runOnSourceName(name)(f);
+    };
+    var runOnAttached = runOnSourceName(attachedToDom());
+    var runOnDetached = runOnSourceName(detachedFromDom());
+    var runOnInit = runOnSourceName(systemInit());
+    var runOnExecute = runOnName(execute());
+
+    var owner = function (element) {
+      return Element.fromDom(element.dom().ownerDocument);
+    };
+    var documentElement = function (element) {
+      return Element.fromDom(element.dom().ownerDocument.documentElement);
+    };
+    var defaultView = function (element) {
+      return Element.fromDom(element.dom().ownerDocument.defaultView);
+    };
+    var parent = function (element) {
+      return Option.from(element.dom().parentNode).map(Element.fromDom);
+    };
+    var offsetParent = function (element) {
+      return Option.from(element.dom().offsetParent).map(Element.fromDom);
+    };
+    var nextSibling = function (element) {
+      return Option.from(element.dom().nextSibling).map(Element.fromDom);
+    };
+    var children = function (element) {
+      return map(element.dom().childNodes, Element.fromDom);
+    };
+    var child = function (element, index) {
+      var cs = element.dom().childNodes;
+      return Option.from(cs[index]).map(Element.fromDom);
+    };
+    var firstChild = function (element) {
+      return child(element, 0);
+    };
+
+    var before = function (marker, element) {
+      var parent$1 = parent(marker);
+      parent$1.each(function (v) {
+        v.dom().insertBefore(element.dom(), marker.dom());
+      });
+    };
+    var after = function (marker, element) {
+      var sibling = nextSibling(marker);
+      sibling.fold(function () {
+        var parent$1 = parent(marker);
+        parent$1.each(function (v) {
+          append(v, element);
+        });
+      }, function (v) {
+        before(v, element);
+      });
+    };
+    var prepend = function (parent, element) {
+      var firstChild$1 = firstChild(parent);
+      firstChild$1.fold(function () {
+        append(parent, element);
+      }, function (v) {
+        parent.dom().insertBefore(element.dom(), v.dom());
+      });
+    };
+    var append = function (parent, element) {
+      parent.dom().appendChild(element.dom());
+    };
+    var appendAt = function (parent, element, index) {
+      child(parent, index).fold(function () {
+        append(parent, element);
+      }, function (v) {
+        before(v, element);
+      });
+    };
+
+    var before$1 = function (marker, elements) {
+      each(elements, function (x) {
+        before(marker, x);
+      });
+    };
+    var append$1 = function (parent, elements) {
+      each(elements, function (x) {
+        append(parent, x);
+      });
+    };
+
+    var empty = function (element) {
+      element.dom().textContent = '';
+      each(children(element), function (rogue) {
+        remove(rogue);
+      });
+    };
+    var remove = function (element) {
+      var dom = element.dom();
+      if (dom.parentNode !== null) {
+        dom.parentNode.removeChild(dom);
+      }
+    };
+    var unwrap = function (wrapper) {
+      var children$1 = children(wrapper);
+      if (children$1.length > 0) {
+        before$1(wrapper, children$1);
+      }
+      remove(wrapper);
+    };
+
+    var fromHtml$1 = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      return children(Element.fromDom(div));
+    };
+
+    var get$1 = function (element) {
+      return element.dom().innerHTML;
+    };
+    var set = function (element, content) {
+      var owner$1 = owner(element);
+      var docDom = owner$1.dom();
+      var fragment = Element.fromDom(docDom.createDocumentFragment());
+      var contentElements = fromHtml$1(content, docDom);
+      append$1(fragment, contentElements);
+      empty(element);
+      append(element, fragment);
+    };
+    var getOuter = function (element) {
+      var container = Element.fromTag('div');
+      var clone = Element.fromDom(element.dom().cloneNode(true));
+      append(container, clone);
+      return get$1(container);
+    };
+
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
+
+    var name = function (element) {
+      var r = element.dom().nodeName;
+      return r.toLowerCase();
+    };
+    var type = function (element) {
+      return element.dom().nodeType;
+    };
+    var isType$1 = function (t) {
+      return function (element) {
+        return type(element) === t;
+      };
+    };
+    var isElement = isType$1(ELEMENT);
+    var isText = isType$1(TEXT);
+
+    var rawSet = function (dom, key, value) {
+      if (isString(value) || isBoolean(value) || isNumber(value)) {
+        dom.setAttribute(key, value + '');
+      } else {
+        domGlobals.console.error('Invalid call to Attr.set. Key ', key, ':: Value ', value, ':: Element ', dom);
+        throw new Error('Attribute value was not simple');
+      }
+    };
+    var set$1 = function (element, key, value) {
+      rawSet(element.dom(), key, value);
+    };
+    var setAll = function (element, attrs) {
+      var dom = element.dom();
+      each$1(attrs, function (v, k) {
+        rawSet(dom, k, v);
+      });
+    };
+    var get$2 = function (element, key) {
+      var v = element.dom().getAttribute(key);
+      return v === null ? undefined : v;
+    };
+    var getOpt = function (element, key) {
+      return Option.from(get$2(element, key));
+    };
+    var has$1 = function (element, key) {
+      var dom = element.dom();
+      return dom && dom.hasAttribute ? dom.hasAttribute(key) : false;
+    };
+    var remove$1 = function (element, key) {
+      element.dom().removeAttribute(key);
+    };
+
+    var clone = function (original, isDeep) {
+      return Element.fromDom(original.dom().cloneNode(isDeep));
+    };
+    var shallow$1 = function (original) {
+      return clone(original, false);
+    };
+
+    var getHtml = function (element) {
+      var clone = shallow$1(element);
+      return getOuter(clone);
+    };
+
+    var element = function (elem) {
+      return getHtml(elem);
+    };
+
+    var isRecursive = function (component, originator, target) {
+      return eq$1(originator, component.element()) && !eq$1(originator, target);
+    };
+    var events = derive([can(focus(), function (component, simulatedEvent) {
+        var originator = simulatedEvent.event().originator();
+        var target = simulatedEvent.event().target();
+        if (isRecursive(component, originator, target)) {
+          domGlobals.console.warn(focus() + ' did not get interpreted by the desired target. ' + '\nOriginator: ' + element(originator) + '\nTarget: ' + element(target) + '\nCheck the ' + focus() + ' event handlers');
+          return false;
+        } else {
+          return true;
+        }
+      })]);
+
+    var DefaultEvents = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events
+    });
+
+    var unique = 0;
+    var generate$1 = function (prefix) {
+      var date = new Date();
+      var time = date.getTime();
+      var random = Math.floor(Math.random() * 1000000000);
+      unique++;
+      return prefix + '_' + random + unique + String(time);
+    };
+
+    var prefix = constant('alloy-id-');
+    var idAttr = constant('data-alloy-id');
+
+    var prefix$1 = prefix();
+    var idAttr$1 = idAttr();
+    var write = function (label, elem) {
+      var id = generate$1(prefix$1 + label);
+      writeOnly(elem, id);
+      return id;
+    };
+    var writeOnly = function (elem, uid) {
+      Object.defineProperty(elem.dom(), idAttr$1, {
+        value: uid,
+        writable: true
+      });
+    };
+    var read$1 = function (elem) {
+      var id = isElement(elem) ? elem.dom()[idAttr$1] : null;
+      return Option.from(id);
+    };
+    var generate$2 = function (prefix) {
+      return generate$1(prefix);
+    };
+
+    var make = identity;
+
+    var NoContextApi = function (getComp) {
+      var fail = function (event) {
+        return function () {
+          throw new Error('The component must be in a context to send: ' + event + (getComp ? '\n' + element(getComp().element()) + ' is not in context.' : ''));
+        };
+      };
+      return {
+        debugInfo: constant('fake'),
+        triggerEvent: fail('triggerEvent'),
+        triggerFocus: fail('triggerFocus'),
+        triggerEscape: fail('triggerEscape'),
+        build: fail('build'),
+        addToWorld: fail('addToWorld'),
+        removeFromWorld: fail('removeFromWorld'),
+        addToGui: fail('addToGui'),
+        removeFromGui: fail('removeFromGui'),
+        getByUid: fail('getByUid'),
+        getByDom: fail('getByDom'),
+        broadcast: fail('broadcast'),
+        broadcastOn: fail('broadcastOn'),
+        broadcastEvent: fail('broadcastEvent'),
+        isConnected: constant(false)
+      };
+    };
+    var singleton = NoContextApi();
+
+    var markAsBehaviourApi = function (f, apiName, apiFunction) {
+      var delegate = apiFunction.toString();
+      var endIndex = delegate.indexOf(')') + 1;
+      var openBracketIndex = delegate.indexOf('(');
+      var parameters = delegate.substring(openBracketIndex + 1, endIndex - 1).split(/,\s*/);
+      f.toFunctionAnnotation = function () {
+        return {
+          name: apiName,
+          parameters: cleanParameters(parameters.slice(0, 1).concat(parameters.slice(3)))
+        };
+      };
+      return f;
+    };
+    var cleanParameters = function (parameters) {
+      return map(parameters, function (p) {
+        return endsWith(p, '/*') ? p.substring(0, p.length - '/*'.length) : p;
+      });
+    };
+    var markAsExtraApi = function (f, extraName) {
+      var delegate = f.toString();
+      var endIndex = delegate.indexOf(')') + 1;
+      var openBracketIndex = delegate.indexOf('(');
+      var parameters = delegate.substring(openBracketIndex + 1, endIndex - 1).split(/,\s*/);
+      f.toFunctionAnnotation = function () {
+        return {
+          name: extraName,
+          parameters: cleanParameters(parameters)
+        };
+      };
+      return f;
+    };
+    var markAsSketchApi = function (f, apiFunction) {
+      var delegate = apiFunction.toString();
+      var endIndex = delegate.indexOf(')') + 1;
+      var openBracketIndex = delegate.indexOf('(');
+      var parameters = delegate.substring(openBracketIndex + 1, endIndex - 1).split(/,\s*/);
+      f.toFunctionAnnotation = function () {
+        return {
+          name: 'OVERRIDE',
+          parameters: cleanParameters(parameters.slice(1))
+        };
+      };
+      return f;
+    };
+
+    var premadeTag = generate$1('alloy-premade');
+    var premade = function (comp) {
+      return wrap$1(premadeTag, comp);
+    };
+    var getPremade = function (spec) {
+      return get(spec, premadeTag);
+    };
+    var makeApi = function (f) {
+      return markAsSketchApi(function (component) {
+        var rest = [];
+        for (var _i = 1; _i < arguments.length; _i++) {
+          rest[_i - 1] = arguments[_i];
+        }
+        return f.apply(void 0, __spreadArrays([
+          component.getApis(),
+          component
+        ], rest));
+      }, f);
+    };
+
+    var NoState = {
+      init: function () {
+        return nu$5({
+          readState: function () {
+            return 'No State required';
+          }
+        });
+      }
+    };
+    var nu$5 = function (spec) {
+      return spec;
+    };
+
+    var generateFrom = function (spec, all) {
+      var schema = map(all, function (a) {
+        return optionObjOf(a.name(), [
+          strict$1('config'),
+          defaulted$1('state', NoState)
+        ]);
+      });
+      var validated = asRaw('component.behaviours', objOf(schema), spec.behaviours).fold(function (errInfo) {
+        throw new Error(formatError(errInfo) + '\nComplete spec:\n' + JSON.stringify(spec, null, 2));
+      }, function (v) {
+        return v;
+      });
+      return {
+        list: all,
+        data: map$1(validated, function (optBlobThunk) {
+          var output = optBlobThunk.map(function (blob) {
+            return {
+              config: blob.config,
+              state: blob.state.init(blob.config)
+            };
+          });
+          return function () {
+            return output;
+          };
+        })
+      };
+    };
+    var getBehaviours = function (bData) {
+      return bData.list;
+    };
+    var getData = function (bData) {
+      return bData.data;
+    };
+
+    var byInnerKey = function (data, tuple) {
+      var r = {};
+      each$1(data, function (detail, key) {
+        each$1(detail, function (value, indexKey) {
+          var chain = get(r, indexKey).getOr([]);
+          r[indexKey] = chain.concat([tuple(key, value)]);
+        });
+      });
+      return r;
+    };
+
+    var nu$6 = function (s) {
+      return {
+        classes: s.classes !== undefined ? s.classes : [],
+        attributes: s.attributes !== undefined ? s.attributes : {},
+        styles: s.styles !== undefined ? s.styles : {}
+      };
+    };
+    var merge$1 = function (defnA, mod) {
+      return __assign(__assign({}, defnA), {
+        attributes: __assign(__assign({}, defnA.attributes), mod.attributes),
+        styles: __assign(__assign({}, defnA.styles), mod.styles),
+        classes: defnA.classes.concat(mod.classes)
+      });
+    };
+
+    var combine = function (info, baseMod, behaviours, base) {
+      var modsByBehaviour = __assign({}, baseMod);
+      each(behaviours, function (behaviour) {
+        modsByBehaviour[behaviour.name()] = behaviour.exhibit(info, base);
+      });
+      var byAspect = byInnerKey(modsByBehaviour, function (name, modification) {
+        return {
+          name: name,
+          modification: modification
+        };
+      });
+      var combineObjects = function (objects) {
+        return foldr(objects, function (b, a) {
+          return __assign(__assign({}, a.modification), b);
+        }, {});
+      };
+      var combinedClasses = foldr(byAspect.classes, function (b, a) {
+        return a.modification.concat(b);
+      }, []);
+      var combinedAttributes = combineObjects(byAspect.attributes);
+      var combinedStyles = combineObjects(byAspect.styles);
+      return nu$6({
+        classes: combinedClasses,
+        attributes: combinedAttributes,
+        styles: combinedStyles
+      });
+    };
+
+    var sortKeys = function (label, keyName, array, order) {
+      try {
+        var sorted = sort(array, function (a, b) {
+          var aKey = a[keyName]();
+          var bKey = b[keyName]();
+          var aIndex = order.indexOf(aKey);
+          var bIndex = order.indexOf(bKey);
+          if (aIndex === -1) {
+            throw new Error('The ordering for ' + label + ' does not have an entry for ' + aKey + '.\nOrder specified: ' + JSON.stringify(order, null, 2));
+          }
+          if (bIndex === -1) {
+            throw new Error('The ordering for ' + label + ' does not have an entry for ' + bKey + '.\nOrder specified: ' + JSON.stringify(order, null, 2));
+          }
+          if (aIndex < bIndex) {
+            return -1;
+          } else if (bIndex < aIndex) {
+            return 1;
+          } else {
+            return 0;
+          }
+        });
+        return Result.value(sorted);
+      } catch (err) {
+        return Result.error([err]);
+      }
+    };
+
+    var uncurried = function (handler, purpose) {
+      return {
+        handler: handler,
+        purpose: constant(purpose)
+      };
+    };
+    var curried = function (handler, purpose) {
+      return {
+        cHandler: handler,
+        purpose: constant(purpose)
+      };
+    };
+    var curryArgs = function (descHandler, extraArgs) {
+      return curried(curry.apply(undefined, [descHandler.handler].concat(extraArgs)), descHandler.purpose());
+    };
+    var getCurried = function (descHandler) {
+      return descHandler.cHandler;
+    };
+
+    var behaviourTuple = function (name, handler) {
+      return {
+        name: constant(name),
+        handler: constant(handler)
+      };
+    };
+    var nameToHandlers = function (behaviours, info) {
+      var r = {};
+      each(behaviours, function (behaviour) {
+        r[behaviour.name()] = behaviour.handlers(info);
+      });
+      return r;
+    };
+    var groupByEvents = function (info, behaviours, base) {
+      var behaviourEvents = __assign(__assign({}, base), nameToHandlers(behaviours, info));
+      return byInnerKey(behaviourEvents, behaviourTuple);
+    };
+    var combine$1 = function (info, eventOrder, behaviours, base) {
+      var byEventName = groupByEvents(info, behaviours, base);
+      return combineGroups(byEventName, eventOrder);
+    };
+    var assemble = function (rawHandler) {
+      var handler = read(rawHandler);
+      return function (component, simulatedEvent) {
+        var rest = [];
+        for (var _i = 2; _i < arguments.length; _i++) {
+          rest[_i - 2] = arguments[_i];
+        }
+        var args = [
+          component,
+          simulatedEvent
+        ].concat(rest);
+        if (handler.abort.apply(undefined, args)) {
+          simulatedEvent.stop();
+        } else if (handler.can.apply(undefined, args)) {
+          handler.run.apply(undefined, args);
+        }
+      };
+    };
+    var missingOrderError = function (eventName, tuples) {
+      return Result.error(['The event (' + eventName + ') has more than one behaviour that listens to it.\nWhen this occurs, you must ' + 'specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that ' + 'can trigger it are: ' + JSON.stringify(map(tuples, function (c) {
+          return c.name();
+        }), null, 2)]);
+    };
+    var fuse$1 = function (tuples, eventOrder, eventName) {
+      var order = eventOrder[eventName];
+      if (!order) {
+        return missingOrderError(eventName, tuples);
+      } else {
+        return sortKeys('Event: ' + eventName, 'name', tuples, order).map(function (sortedTuples) {
+          var handlers = map(sortedTuples, function (tuple) {
+            return tuple.handler();
+          });
+          return fuse(handlers);
+        });
+      }
+    };
+    var combineGroups = function (byEventName, eventOrder) {
+      var r = mapToArray(byEventName, function (tuples, eventName) {
+        var combined = tuples.length === 1 ? Result.value(tuples[0].handler()) : fuse$1(tuples, eventOrder, eventName);
+        return combined.map(function (handler) {
+          var assembled = assemble(handler);
+          var purpose = tuples.length > 1 ? filter(eventOrder[eventName], function (o) {
+            return exists(tuples, function (t) {
+              return t.name() === o;
+            });
+          }).join(' > ') : tuples[0].name();
+          return wrap$1(eventName, uncurried(assembled, purpose));
+        });
+      });
+      return consolidate(r, {});
+    };
+
+    var toInfo = function (spec) {
+      return asRaw('custom.definition', objOf([
+        field('dom', 'dom', strict(), objOf([
+          strict$1('tag'),
+          defaulted$1('styles', {}),
+          defaulted$1('classes', []),
+          defaulted$1('attributes', {}),
+          option('value'),
+          option('innerHtml')
+        ])),
+        strict$1('components'),
+        strict$1('uid'),
+        defaulted$1('events', {}),
+        defaulted$1('apis', {}),
+        field('eventOrder', 'eventOrder', mergeWith({
+          'alloy.execute': [
+            'disabling',
+            'alloy.base.behaviour',
+            'toggling',
+            'typeaheadevents'
+          ],
+          'alloy.focus': [
+            'alloy.base.behaviour',
+            'focusing',
+            'keying'
+          ],
+          'alloy.system.init': [
+            'alloy.base.behaviour',
+            'disabling',
+            'toggling',
+            'representing'
+          ],
+          'input': [
+            'alloy.base.behaviour',
+            'representing',
+            'streaming',
+            'invalidating'
+          ],
+          'alloy.system.detached': [
+            'alloy.base.behaviour',
+            'representing',
+            'item-events',
+            'tooltipping'
+          ],
+          'mousedown': [
+            'focusing',
+            'alloy.base.behaviour',
+            'item-type-events'
+          ],
+          'touchstart': [
+            'focusing',
+            'alloy.base.behaviour',
+            'item-type-events'
+          ],
+          'mouseover': [
+            'item-type-events',
+            'tooltipping'
+          ],
+          'alloy.receive': [
+            'receiving',
+            'reflecting',
+            'tooltipping'
+          ]
+        }), anyValue$1()),
+        option('domModification')
+      ]), spec);
+    };
+    var toDefinition = function (detail) {
+      return __assign(__assign({}, detail.dom), {
+        uid: detail.uid,
+        domChildren: map(detail.components, function (comp) {
+          return comp.element();
+        })
+      });
+    };
+    var toModification = function (detail) {
+      return detail.domModification.fold(function () {
+        return nu$6({});
+      }, nu$6);
+    };
+    var toEvents = function (info) {
+      return info.events;
+    };
+
+    var read$2 = function (element, attr) {
+      var value = get$2(element, attr);
+      return value === undefined || value === '' ? [] : value.split(' ');
+    };
+    var add = function (element, attr, id) {
+      var old = read$2(element, attr);
+      var nu = old.concat([id]);
+      set$1(element, attr, nu.join(' '));
+      return true;
+    };
+    var remove$2 = function (element, attr, id) {
+      var nu = filter(read$2(element, attr), function (v) {
+        return v !== id;
+      });
+      if (nu.length > 0) {
+        set$1(element, attr, nu.join(' '));
+      } else {
+        remove$1(element, attr);
+      }
+      return false;
+    };
+
+    var supports = function (element) {
+      return element.dom().classList !== undefined;
+    };
+    var get$3 = function (element) {
+      return read$2(element, 'class');
+    };
+    var add$1 = function (element, clazz) {
+      return add(element, 'class', clazz);
+    };
+    var remove$3 = function (element, clazz) {
+      return remove$2(element, 'class', clazz);
+    };
+
+    var add$2 = function (element, clazz) {
+      if (supports(element)) {
+        element.dom().classList.add(clazz);
+      } else {
+        add$1(element, clazz);
+      }
+    };
+    var cleanClass = function (element) {
+      var classList = supports(element) ? element.dom().classList : get$3(element);
+      if (classList.length === 0) {
+        remove$1(element, 'class');
+      }
+    };
+    var remove$4 = function (element, clazz) {
+      if (supports(element)) {
+        var classList = element.dom().classList;
+        classList.remove(clazz);
+      } else {
+        remove$3(element, clazz);
+      }
+      cleanClass(element);
+    };
+    var has$2 = function (element, clazz) {
+      return supports(element) && element.dom().classList.contains(clazz);
+    };
+
+    var add$3 = function (element, classes) {
+      each(classes, function (x) {
+        add$2(element, x);
+      });
+    };
+    var remove$5 = function (element, classes) {
+      each(classes, function (x) {
+        remove$4(element, x);
+      });
+    };
+
+    var isSupported = function (dom) {
+      return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
+    };
+
+    var inBody = function (element) {
+      var dom = isText(element) ? element.dom().parentNode : element.dom();
+      return dom !== undefined && dom !== null && dom.ownerDocument.body.contains(dom);
+    };
+    var body = function () {
+      return getBody(Element.fromDom(domGlobals.document));
+    };
+    var getBody = function (doc) {
+      var b = doc.dom().body;
+      if (b === null || b === undefined) {
+        throw new Error('Body is not available yet');
+      }
+      return Element.fromDom(b);
+    };
+
+    var internalSet = function (dom, property, value) {
+      if (!isString(value)) {
+        domGlobals.console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);
+        throw new Error('CSS value must be a string: ' + value);
+      }
+      if (isSupported(dom)) {
+        dom.style.setProperty(property, value);
+      }
+    };
+    var internalRemove = function (dom, property) {
+      if (isSupported(dom)) {
+        dom.style.removeProperty(property);
+      }
+    };
+    var set$2 = function (element, property, value) {
+      var dom = element.dom();
+      internalSet(dom, property, value);
+    };
+    var setAll$1 = function (element, css) {
+      var dom = element.dom();
+      each$1(css, function (v, k) {
+        internalSet(dom, k, v);
+      });
+    };
+    var setOptions = function (element, css) {
+      var dom = element.dom();
+      each$1(css, function (v, k) {
+        v.fold(function () {
+          internalRemove(dom, k);
+        }, function (value) {
+          internalSet(dom, k, value);
+        });
+      });
+    };
+    var get$4 = function (element, property) {
+      var dom = element.dom();
+      var styles = domGlobals.window.getComputedStyle(dom);
+      var r = styles.getPropertyValue(property);
+      return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
+    };
+    var getUnsafeProperty = function (dom, property) {
+      return isSupported(dom) ? dom.style.getPropertyValue(property) : '';
+    };
+    var getRaw = function (element, property) {
+      var dom = element.dom();
+      var raw = getUnsafeProperty(dom, property);
+      return Option.from(raw).filter(function (r) {
+        return r.length > 0;
+      });
+    };
+    var getAllRaw = function (element) {
+      var css = {};
+      var dom = element.dom();
+      if (isSupported(dom)) {
+        for (var i = 0; i < dom.style.length; i++) {
+          var ruleName = dom.style.item(i);
+          css[ruleName] = dom.style[ruleName];
+        }
+      }
+      return css;
+    };
+    var isValidValue = function (tag, property, value) {
+      var element = Element.fromTag(tag);
+      set$2(element, property, value);
+      var style = getRaw(element, property);
+      return style.isSome();
+    };
+    var remove$6 = function (element, property) {
+      var dom = element.dom();
+      internalRemove(dom, property);
+      if (getOpt(element, 'style').map(trim).is('')) {
+        remove$1(element, 'style');
+      }
+    };
+    var reflow = function (e) {
+      return e.dom().offsetWidth;
+    };
+
+    var get$5 = function (element) {
+      return element.dom().value;
+    };
+    var set$3 = function (element, value) {
+      if (value === undefined) {
+        throw new Error('Value.set was undefined');
+      }
+      element.dom().value = value;
+    };
+
+    var renderToDom = function (definition) {
+      var subject = Element.fromTag(definition.tag);
+      setAll(subject, definition.attributes);
+      add$3(subject, definition.classes);
+      setAll$1(subject, definition.styles);
+      definition.innerHtml.each(function (html) {
+        return set(subject, html);
+      });
+      var children = definition.domChildren;
+      append$1(subject, children);
+      definition.value.each(function (value) {
+        set$3(subject, value);
+      });
+      if (!definition.uid) {
+        debugger;
+      }
+      writeOnly(subject, definition.uid);
+      return subject;
+    };
+
+    var getBehaviours$1 = function (spec) {
+      var behaviours = get(spec, 'behaviours').getOr({});
+      var keys$1 = filter(keys(behaviours), function (k) {
+        return behaviours[k] !== undefined;
+      });
+      return map(keys$1, function (k) {
+        return behaviours[k].me;
+      });
+    };
+    var generateFrom$1 = function (spec, all) {
+      return generateFrom(spec, all);
+    };
+    var generate$3 = function (spec) {
+      var all = getBehaviours$1(spec);
+      return generateFrom$1(spec, all);
+    };
+
+    var getDomDefinition = function (info, bList, bData) {
+      var definition = toDefinition(info);
+      var infoModification = toModification(info);
+      var baseModification = { 'alloy.base.modification': infoModification };
+      var modification = bList.length > 0 ? combine(bData, baseModification, bList, definition) : infoModification;
+      return merge$1(definition, modification);
+    };
+    var getEvents = function (info, bList, bData) {
+      var baseEvents = { 'alloy.base.behaviour': toEvents(info) };
+      return combine$1(bData, info.eventOrder, bList, baseEvents).getOrDie();
+    };
+    var build = function (spec) {
+      var getMe = function () {
+        return me;
+      };
+      var systemApi = Cell(singleton);
+      var info = getOrDie(toInfo(spec));
+      var bBlob = generate$3(spec);
+      var bList = getBehaviours(bBlob);
+      var bData = getData(bBlob);
+      var modDefinition = getDomDefinition(info, bList, bData);
+      var item = renderToDom(modDefinition);
+      var events = getEvents(info, bList, bData);
+      var subcomponents = Cell(info.components);
+      var connect = function (newApi) {
+        systemApi.set(newApi);
+      };
+      var disconnect = function () {
+        systemApi.set(NoContextApi(getMe));
+      };
+      var syncComponents = function () {
+        var children$1 = children(item);
+        var subs = bind(children$1, function (child) {
+          return systemApi.get().getByDom(child).fold(function () {
+            return [];
+          }, function (c) {
+            return [c];
+          });
+        });
+        subcomponents.set(subs);
+      };
+      var config = function (behaviour) {
+        var b = bData;
+        var f = isFunction(b[behaviour.name()]) ? b[behaviour.name()] : function () {
+          throw new Error('Could not find ' + behaviour.name() + ' in ' + JSON.stringify(spec, null, 2));
+        };
+        return f();
+      };
+      var hasConfigured = function (behaviour) {
+        return isFunction(bData[behaviour.name()]);
+      };
+      var getApis = function () {
+        return info.apis;
+      };
+      var readState = function (behaviourName) {
+        return bData[behaviourName]().map(function (b) {
+          return b.state.readState();
+        }).getOr('not enabled');
+      };
+      var me = {
+        getSystem: systemApi.get,
+        config: config,
+        hasConfigured: hasConfigured,
+        spec: constant(spec),
+        readState: readState,
+        getApis: getApis,
+        connect: connect,
+        disconnect: disconnect,
+        element: constant(item),
+        syncComponents: syncComponents,
+        components: subcomponents.get,
+        events: constant(events)
+      };
+      return me;
+    };
+
+    var buildSubcomponents = function (spec) {
+      var components = get(spec, 'components').getOr([]);
+      return map(components, build$1);
+    };
+    var buildFromSpec = function (userSpec) {
+      var _a = make(userSpec), specEvents = _a.events, spec = __rest(_a, ['events']);
+      var components = buildSubcomponents(spec);
+      var completeSpec = __assign(__assign({}, spec), {
+        events: __assign(__assign({}, DefaultEvents), specEvents),
+        components: components
+      });
+      return Result.value(build(completeSpec));
+    };
+    var text = function (textContent) {
+      var element = Element.fromText(textContent);
+      return external({ element: element });
+    };
+    var external = function (spec) {
+      var extSpec = asRawOrDie('external.component', objOfOnly([
+        strict$1('element'),
+        option('uid')
+      ]), spec);
+      var systemApi = Cell(NoContextApi());
+      var connect = function (newApi) {
+        systemApi.set(newApi);
+      };
+      var disconnect = function () {
+        systemApi.set(NoContextApi(function () {
+          return me;
+        }));
+      };
+      extSpec.uid.each(function (uid) {
+        writeOnly(extSpec.element, uid);
+      });
+      var me = {
+        getSystem: systemApi.get,
+        config: Option.none,
+        hasConfigured: constant(false),
+        connect: connect,
+        disconnect: disconnect,
+        getApis: function () {
+          return {};
+        },
+        element: constant(extSpec.element),
+        spec: constant(spec),
+        readState: constant('No state'),
+        syncComponents: noop,
+        components: constant([]),
+        events: constant({})
+      };
+      return premade(me);
+    };
+    var uids = generate$2;
+    var build$1 = function (spec) {
+      return getPremade(spec).fold(function () {
+        var userSpecWithUid = spec.hasOwnProperty('uid') ? spec : __assign({ uid: uids('') }, spec);
+        return buildFromSpec(userSpecWithUid).getOrDie();
+      }, function (prebuilt) {
+        return prebuilt;
+      });
+    };
+    var premade$1 = premade;
+
+    function Dimension (name, getOffset) {
+      var set = function (element, h) {
+        if (!isNumber(h) && !h.match(/^[0-9]+$/)) {
+          throw new Error(name + '.set accepts only positive integer values. Value was ' + h);
+        }
+        var dom = element.dom();
+        if (isSupported(dom)) {
+          dom.style[name] = h + 'px';
+        }
+      };
+      var get = function (element) {
+        var r = getOffset(element);
+        if (r <= 0 || r === null) {
+          var css = get$4(element, name);
+          return parseFloat(css) || 0;
+        }
+        return r;
+      };
+      var getOuter = get;
+      var aggregate = function (element, properties) {
+        return foldl(properties, function (acc, property) {
+          var val = get$4(element, property);
+          var value = val === undefined ? 0 : parseInt(val, 10);
+          return isNaN(value) ? acc : acc + value;
+        }, 0);
+      };
+      var max = function (element, value, properties) {
+        var cumulativeInclusions = aggregate(element, properties);
+        var absoluteMax = value > cumulativeInclusions ? value - cumulativeInclusions : 0;
+        return absoluteMax;
+      };
+      return {
+        set: set,
+        get: get,
+        getOuter: getOuter,
+        aggregate: aggregate,
+        max: max
+      };
+    }
+
+    var api = Dimension('height', function (element) {
+      var dom = element.dom();
+      return inBody(element) ? dom.getBoundingClientRect().height : dom.offsetHeight;
+    });
+    var get$6 = function (element) {
+      return api.get(element);
+    };
+    var getOuter$1 = function (element) {
+      return api.getOuter(element);
+    };
+    var setMax = function (element, value) {
+      var inclusions = [
+        'margin-top',
+        'border-top-width',
+        'padding-top',
+        'padding-bottom',
+        'border-bottom-width',
+        'margin-bottom'
+      ];
+      var absMax = api.max(element, value, inclusions);
+      set$2(element, 'max-height', absMax + 'px');
+    };
+
+    var r = function (left, top) {
+      var translate = function (x, y) {
+        return r(left + x, top + y);
+      };
+      return {
+        left: constant(left),
+        top: constant(top),
+        translate: translate
+      };
+    };
+    var Position = r;
+
+    var boxPosition = function (dom) {
+      var box = dom.getBoundingClientRect();
+      return Position(box.left, box.top);
+    };
+    var firstDefinedOrZero = function (a, b) {
+      if (a !== undefined) {
+        return a;
+      } else {
+        return b !== undefined ? b : 0;
+      }
+    };
+    var absolute = function (element) {
+      var doc = element.dom().ownerDocument;
+      var body = doc.body;
+      var win = doc.defaultView;
+      var html = doc.documentElement;
+      if (body === element.dom()) {
+        return Position(body.offsetLeft, body.offsetTop);
+      }
+      var scrollTop = firstDefinedOrZero(win.pageYOffset, html.scrollTop);
+      var scrollLeft = firstDefinedOrZero(win.pageXOffset, html.scrollLeft);
+      var clientTop = firstDefinedOrZero(html.clientTop, body.clientTop);
+      var clientLeft = firstDefinedOrZero(html.clientLeft, body.clientLeft);
+      return viewport(element).translate(scrollLeft - clientLeft, scrollTop - clientTop);
+    };
+    var viewport = function (element) {
+      var dom = element.dom();
+      var doc = dom.ownerDocument;
+      var body = doc.body;
+      if (body === dom) {
+        return Position(body.offsetLeft, body.offsetTop);
+      }
+      if (!inBody(element)) {
+        return Position(0, 0);
+      }
+      return boxPosition(dom);
+    };
+
+    var api$1 = Dimension('width', function (element) {
+      return element.dom().offsetWidth;
+    });
+    var set$4 = function (element, h) {
+      return api$1.set(element, h);
+    };
+    var get$7 = function (element) {
+      return api$1.get(element);
+    };
+    var getOuter$2 = function (element) {
+      return api$1.getOuter(element);
+    };
+    var setMax$1 = function (element, value) {
+      var inclusions = [
+        'margin-left',
+        'border-left-width',
+        'padding-left',
+        'padding-right',
+        'border-right-width',
+        'margin-right'
+      ];
+      var absMax = api$1.max(element, value, inclusions);
+      set$2(element, 'max-width', absMax + 'px');
+    };
+
+    var mkEvent = function (target, x, y, stop, prevent, kill, raw) {
+      return {
+        target: constant(target),
+        x: constant(x),
+        y: constant(y),
+        stop: stop,
+        prevent: prevent,
+        kill: kill,
+        raw: constant(raw)
+      };
+    };
+    var fromRawEvent = function (rawEvent) {
+      var target = Element.fromDom(rawEvent.target);
+      var stop = function () {
+        return rawEvent.stopPropagation();
+      };
+      var prevent = function () {
+        return rawEvent.preventDefault();
+      };
+      var kill = compose(prevent, stop);
+      return mkEvent(target, rawEvent.clientX, rawEvent.clientY, stop, prevent, kill, rawEvent);
+    };
+    var handle = function (filter, handler) {
+      return function (rawEvent) {
+        if (filter(rawEvent)) {
+          handler(fromRawEvent(rawEvent));
+        }
+      };
+    };
+    var binder = function (element, event, filter, handler, useCapture) {
+      var wrapped = handle(filter, handler);
+      element.dom().addEventListener(event, wrapped, useCapture);
+      return { unbind: curry(unbind, element, event, wrapped, useCapture) };
+    };
+    var bind$2 = function (element, event, filter, handler) {
+      return binder(element, event, filter, handler, false);
+    };
+    var capture = function (element, event, filter, handler) {
+      return binder(element, event, filter, handler, true);
+    };
+    var unbind = function (element, event, handler, useCapture) {
+      element.dom().removeEventListener(event, handler, useCapture);
+    };
+
+    var get$8 = function (_DOC) {
+      var doc = _DOC !== undefined ? _DOC.dom() : domGlobals.document;
+      var x = doc.body.scrollLeft || doc.documentElement.scrollLeft;
+      var y = doc.body.scrollTop || doc.documentElement.scrollTop;
+      return Position(x, y);
+    };
+    var to = function (x, y, _DOC) {
+      var doc = _DOC !== undefined ? _DOC.dom() : domGlobals.document;
+      var win = doc.defaultView;
+      win.scrollTo(x, y);
+    };
+
+    var get$9 = function (_win) {
+      var win = _win === undefined ? domGlobals.window : _win;
+      return Option.from(win['visualViewport']);
+    };
+    var bounds = function (x, y, width, height) {
+      return {
+        x: x,
+        y: y,
+        width: width,
+        height: height,
+        right: x + width,
+        bottom: y + height
+      };
+    };
+    var getBounds = function (_win) {
+      var win = _win === undefined ? domGlobals.window : _win;
+      var doc = win.document;
+      var scroll = get$8(Element.fromDom(doc));
+      return get$9(win).fold(function () {
+        var html = win.document.documentElement;
+        var width = html.clientWidth;
+        var height = html.clientHeight;
+        return bounds(scroll.left(), scroll.top(), width, height);
+      }, function (visualViewport) {
+        return bounds(Math.max(visualViewport.pageLeft, scroll.left()), Math.max(visualViewport.pageTop, scroll.top()), visualViewport.width, visualViewport.height);
+      });
+    };
+
+    var walkUp = function (navigation, doc) {
+      var frame = navigation.view(doc);
+      return frame.fold(constant([]), function (f) {
+        var parent = navigation.owner(f);
+        var rest = walkUp(navigation, parent);
+        return [f].concat(rest);
+      });
+    };
+    var pathTo = function (element, navigation) {
+      var d = navigation.owner(element);
+      var paths = walkUp(navigation, d);
+      return Option.some(paths);
+    };
+
+    var view = function (doc) {
+      var element = doc.dom() === domGlobals.document ? Option.none() : Option.from(doc.dom().defaultView.frameElement);
+      return element.map(Element.fromDom);
+    };
+    var owner$1 = function (element) {
+      return owner(element);
+    };
+
+    var Navigation = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        view: view,
+        owner: owner$1
+    });
+
+    var find$3 = function (element) {
+      var doc = Element.fromDom(domGlobals.document);
+      var scroll = get$8(doc);
+      var path = pathTo(element, Navigation);
+      return path.fold(curry(absolute, element), function (frames) {
+        var offset = viewport(element);
+        var r = foldr(frames, function (b, a) {
+          var loc = viewport(a);
+          return {
+            left: b.left + loc.left(),
+            top: b.top + loc.top()
+          };
+        }, {
+          left: 0,
+          top: 0
+        });
+        return Position(r.left + offset.left() + scroll.left(), r.top + offset.top() + scroll.top());
+      });
+    };
+
+    var pointed = function (point, width, height) {
+      return {
+        point: point,
+        width: width,
+        height: height
+      };
+    };
+    var rect = function (x, y, width, height) {
+      return {
+        x: x,
+        y: y,
+        width: width,
+        height: height
+      };
+    };
+    var bounds$1 = function (x, y, width, height) {
+      return {
+        x: x,
+        y: y,
+        width: width,
+        height: height,
+        right: x + width,
+        bottom: y + height
+      };
+    };
+    var box = function (element) {
+      var xy = absolute(element);
+      var w = getOuter$2(element);
+      var h = getOuter$1(element);
+      return bounds$1(xy.left(), xy.top(), w, h);
+    };
+    var absolute$1 = function (element) {
+      var position = find$3(element);
+      var width = getOuter$2(element);
+      var height = getOuter$1(element);
+      return bounds$1(position.left(), position.top(), width, height);
+    };
+    var win = function () {
+      return getBounds(domGlobals.window);
+    };
+
+    function ClosestOrAncestor (is, ancestor, scope, a, isRoot) {
+      return is(scope, a) ? Option.some(scope) : isFunction(isRoot) && isRoot(scope) ? Option.none() : ancestor(scope, a, isRoot);
+    }
+
+    var ancestor$1 = function (scope, predicate, isRoot) {
+      var element = scope.dom();
+      var stop = isFunction(isRoot) ? isRoot : constant(false);
+      while (element.parentNode) {
+        element = element.parentNode;
+        var el = Element.fromDom(element);
+        if (predicate(el)) {
+          return Option.some(el);
+        } else if (stop(el)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var closest$1 = function (scope, predicate, isRoot) {
+      var is = function (s, test) {
+        return test(s);
+      };
+      return ClosestOrAncestor(is, ancestor$1, scope, predicate, isRoot);
+    };
+    var descendant = function (scope, predicate) {
+      var descend = function (node) {
+        for (var i = 0; i < node.childNodes.length; i++) {
+          var child_1 = Element.fromDom(node.childNodes[i]);
+          if (predicate(child_1)) {
+            return Option.some(child_1);
+          }
+          var res = descend(node.childNodes[i]);
+          if (res.isSome()) {
+            return res;
+          }
+        }
+        return Option.none();
+      };
+      return descend(scope.dom());
+    };
+
+    var closest$2 = function (scope, predicate, isRoot) {
+      return closest$1(scope, predicate, isRoot).isSome();
+    };
+
+    var ancestor$2 = function (scope, selector, isRoot) {
+      return ancestor$1(scope, function (e) {
+        return is(e, selector);
+      }, isRoot);
+    };
+    var descendant$1 = function (scope, selector) {
+      return one(selector, scope);
+    };
+    var closest$3 = function (scope, selector, isRoot) {
+      var is$1 = function (element, selector) {
+        return is(element, selector);
+      };
+      return ClosestOrAncestor(is$1, ancestor$2, scope, selector, isRoot);
+    };
+
+    var find$4 = function (queryElem) {
+      var dependent = closest$1(queryElem, function (elem) {
+        if (!isElement(elem)) {
+          return false;
+        }
+        var id = get$2(elem, 'id');
+        return id !== undefined && id.indexOf('aria-owns') > -1;
+      });
+      return dependent.bind(function (dep) {
+        var id = get$2(dep, 'id');
+        var doc = owner(dep);
+        return descendant$1(doc, '[aria-owns="' + id + '"]');
+      });
+    };
+    var manager = function () {
+      var ariaId = generate$1('aria-owns');
+      var link = function (elem) {
+        set$1(elem, 'aria-owns', ariaId);
+      };
+      var unlink = function (elem) {
+        remove$1(elem, 'aria-owns');
+      };
+      return {
+        id: ariaId,
+        link: link,
+        unlink: unlink
+      };
+    };
+
+    var isAriaPartOf = function (component, queryElem) {
+      return find$4(queryElem).exists(function (owner) {
+        return isPartOf(component, owner);
+      });
+    };
+    var isPartOf = function (component, queryElem) {
+      return closest$2(queryElem, function (el) {
+        return eq$1(el, component.element());
+      }, constant(false)) || isAriaPartOf(component, queryElem);
+    };
+
+    var unknown$3 = 'unknown';
+    var EventConfiguration;
+    (function (EventConfiguration) {
+      EventConfiguration[EventConfiguration['STOP'] = 0] = 'STOP';
+      EventConfiguration[EventConfiguration['NORMAL'] = 1] = 'NORMAL';
+      EventConfiguration[EventConfiguration['LOGGING'] = 2] = 'LOGGING';
+    }(EventConfiguration || (EventConfiguration = {})));
+    var eventConfig = Cell({});
+    var makeEventLogger = function (eventName, initialTarget) {
+      var sequence = [];
+      var startTime = new Date().getTime();
+      return {
+        logEventCut: function (_name, target, purpose) {
+          sequence.push({
+            outcome: 'cut',
+            target: target,
+            purpose: purpose
+          });
+        },
+        logEventStopped: function (_name, target, purpose) {
+          sequence.push({
+            outcome: 'stopped',
+            target: target,
+            purpose: purpose
+          });
+        },
+        logNoParent: function (_name, target, purpose) {
+          sequence.push({
+            outcome: 'no-parent',
+            target: target,
+            purpose: purpose
+          });
+        },
+        logEventNoHandlers: function (_name, target) {
+          sequence.push({
+            outcome: 'no-handlers-left',
+            target: target
+          });
+        },
+        logEventResponse: function (_name, target, purpose) {
+          sequence.push({
+            outcome: 'response',
+            purpose: purpose,
+            target: target
+          });
+        },
+        write: function () {
+          var finishTime = new Date().getTime();
+          if (contains([
+              'mousemove',
+              'mouseover',
+              'mouseout',
+              systemInit()
+            ], eventName)) {
+            return;
+          }
+          domGlobals.console.log(eventName, {
+            event: eventName,
+            time: finishTime - startTime,
+            target: initialTarget.dom(),
+            sequence: map(sequence, function (s) {
+              if (!contains([
+                  'cut',
+                  'stopped',
+                  'response'
+                ], s.outcome)) {
+                return s.outcome;
+              } else {
+                return '{' + s.purpose + '} ' + s.outcome + ' at (' + element(s.target) + ')';
+              }
+            })
+          });
+        }
+      };
+    };
+    var processEvent = function (eventName, initialTarget, f) {
+      var status = get(eventConfig.get(), eventName).orThunk(function () {
+        var patterns = keys(eventConfig.get());
+        return findMap(patterns, function (p) {
+          return eventName.indexOf(p) > -1 ? Option.some(eventConfig.get()[p]) : Option.none();
+        });
+      }).getOr(EventConfiguration.NORMAL);
+      switch (status) {
+      case EventConfiguration.NORMAL:
+        return f(noLogger());
+      case EventConfiguration.LOGGING: {
+          var logger = makeEventLogger(eventName, initialTarget);
+          var output = f(logger);
+          logger.write();
+          return output;
+        }
+      case EventConfiguration.STOP:
+        return true;
+      }
+    };
+    var path = [
+      'alloy/data/Fields',
+      'alloy/debugging/Debugging'
+    ];
+    var getTrace = function () {
+      var err = new Error();
+      if (err.stack !== undefined) {
+        var lines = err.stack.split('\n');
+        return find(lines, function (line) {
+          return line.indexOf('alloy') > 0 && !exists(path, function (p) {
+            return line.indexOf(p) > -1;
+          });
+        }).getOr(unknown$3);
+      } else {
+        return unknown$3;
+      }
+    };
+    var ignoreEvent = {
+      logEventCut: noop,
+      logEventStopped: noop,
+      logNoParent: noop,
+      logEventNoHandlers: noop,
+      logEventResponse: noop,
+      write: noop
+    };
+    var monitorEvent = function (eventName, initialTarget, f) {
+      return processEvent(eventName, initialTarget, f);
+    };
+    var noLogger = constant(ignoreEvent);
+
+    var menuFields = constant([
+      strict$1('menu'),
+      strict$1('selectedMenu')
+    ]);
+    var itemFields = constant([
+      strict$1('item'),
+      strict$1('selectedItem')
+    ]);
+    var schema = constant(objOf(itemFields().concat(menuFields())));
+    var itemSchema = constant(objOf(itemFields()));
+
+    var _initSize = strictObjOf('initSize', [
+      strict$1('numColumns'),
+      strict$1('numRows')
+    ]);
+    var itemMarkers = function () {
+      return strictOf('markers', itemSchema());
+    };
+    var tieredMenuMarkers = function () {
+      return strictObjOf('markers', [strict$1('backgroundMenu')].concat(menuFields()).concat(itemFields()));
+    };
+    var markers = function (required) {
+      return strictObjOf('markers', map(required, strict$1));
+    };
+    var onPresenceHandler = function (label, fieldName, presence) {
+      var trace = getTrace();
+      return field(fieldName, fieldName, presence, valueOf(function (f) {
+        return Result.value(function () {
+          var args = [];
+          for (var _i = 0; _i < arguments.length; _i++) {
+            args[_i] = arguments[_i];
+          }
+          return f.apply(undefined, args);
+        });
+      }));
+    };
+    var onHandler = function (fieldName) {
+      return onPresenceHandler('onHandler', fieldName, defaulted(noop));
+    };
+    var onKeyboardHandler = function (fieldName) {
+      return onPresenceHandler('onKeyboardHandler', fieldName, defaulted(Option.none));
+    };
+    var onStrictHandler = function (fieldName) {
+      return onPresenceHandler('onHandler', fieldName, strict());
+    };
+    var onStrictKeyboardHandler = function (fieldName) {
+      return onPresenceHandler('onKeyboardHandler', fieldName, strict());
+    };
+    var output = function (name, value) {
+      return state$1(name, constant(value));
+    };
+    var snapshot = function (name) {
+      return state$1(name, identity);
+    };
+    var initSize = constant(_initSize);
+
+    var nu$7 = function (x, y, bubble, direction, boundsRestriction, label) {
+      return {
+        x: constant(x),
+        y: constant(y),
+        bubble: constant(bubble),
+        direction: constant(direction),
+        boundsRestriction: constant(boundsRestriction),
+        label: constant(label)
+      };
+    };
+
+    var adt$2 = Adt.generate([
+      { southeast: [] },
+      { southwest: [] },
+      { northeast: [] },
+      { northwest: [] },
+      { south: [] },
+      { north: [] },
+      { east: [] },
+      { west: [] }
+    ]);
+    var cata = function (subject, southeast, southwest, northeast, northwest, south, north, east, west) {
+      return subject.fold(southeast, southwest, northeast, northwest, south, north, east, west);
+    };
+    var cataVertical = function (subject, south, middle, north) {
+      return subject.fold(south, south, north, north, south, north, middle, middle);
+    };
+    var cataHorizontal = function (subject, east, middle, west) {
+      return subject.fold(east, west, east, west, middle, middle, east, west);
+    };
+    var southeast = adt$2.southeast;
+    var southwest = adt$2.southwest;
+    var northeast = adt$2.northeast;
+    var northwest = adt$2.northwest;
+    var south = adt$2.south;
+    var north = adt$2.north;
+    var east = adt$2.east;
+    var west = adt$2.west;
+
+    var getRestriction = function (anchor, restriction) {
+      switch (restriction) {
+      case 1:
+        return anchor.x;
+      case 0:
+        return anchor.x + anchor.width;
+      case 2:
+        return anchor.y;
+      case 3:
+        return anchor.y + anchor.height;
+      }
+    };
+    var boundsRestriction = function (anchor, restrictions) {
+      return mapToObject([
+        'left',
+        'right',
+        'top',
+        'bottom'
+      ], function (dir) {
+        return get(restrictions, dir).map(function (restriction) {
+          return getRestriction(anchor, restriction);
+        });
+      });
+    };
+    var adjustBounds = function (bounds, boundsRestrictions, bubbleOffsets) {
+      var applyRestriction = function (dir, current) {
+        var bubbleOffset = dir === 'top' || dir === 'bottom' ? bubbleOffsets.top() : bubbleOffsets.left();
+        return get(boundsRestrictions, dir).bind(identity).bind(function (restriction) {
+          if (dir === 'left' || dir === 'top') {
+            return restriction >= current ? Option.some(restriction) : Option.none();
+          } else {
+            return restriction <= current ? Option.some(restriction) : Option.none();
+          }
+        }).map(function (restriction) {
+          return restriction + bubbleOffset;
+        }).getOr(current);
+      };
+      var adjustedLeft = applyRestriction('left', bounds.x);
+      var adjustedTop = applyRestriction('top', bounds.y);
+      var adjustedRight = applyRestriction('right', bounds.right);
+      var adjustedBottom = applyRestriction('bottom', bounds.bottom);
+      return bounds$1(adjustedLeft, adjustedTop, adjustedRight - adjustedLeft, adjustedBottom - adjustedTop);
+    };
+
+    var eastX = function (anchor) {
+      return anchor.x;
+    };
+    var middleX = function (anchor, element) {
+      return anchor.x + anchor.width / 2 - element.width / 2;
+    };
+    var westX = function (anchor, element) {
+      return anchor.x + anchor.width - element.width;
+    };
+    var northY = function (anchor, element) {
+      return anchor.y - element.height;
+    };
+    var southY = function (anchor) {
+      return anchor.y + anchor.height;
+    };
+    var centreY = function (anchor, element) {
+      return anchor.y + anchor.height / 2 - element.height / 2;
+    };
+    var eastEdgeX = function (anchor) {
+      return anchor.x + anchor.width;
+    };
+    var westEdgeX = function (anchor, element) {
+      return anchor.x - element.width;
+    };
+    var southeast$1 = function (anchor, element, bubbles) {
+      return nu$7(eastX(anchor), southY(anchor), bubbles.southeast(), southeast(), boundsRestriction(anchor, {
+        left: 1,
+        top: 3
+      }), 'layout-se');
+    };
+    var southwest$1 = function (anchor, element, bubbles) {
+      return nu$7(westX(anchor, element), southY(anchor), bubbles.southwest(), southwest(), boundsRestriction(anchor, {
+        right: 0,
+        top: 3
+      }), 'layout-sw');
+    };
+    var northeast$1 = function (anchor, element, bubbles) {
+      return nu$7(eastX(anchor), northY(anchor, element), bubbles.northeast(), northeast(), boundsRestriction(anchor, {
+        left: 1,
+        bottom: 2
+      }), 'layout-ne');
+    };
+    var northwest$1 = function (anchor, element, bubbles) {
+      return nu$7(westX(anchor, element), northY(anchor, element), bubbles.northwest(), northwest(), boundsRestriction(anchor, {
+        right: 0,
+        bottom: 2
+      }), 'layout-nw');
+    };
+    var north$1 = function (anchor, element, bubbles) {
+      return nu$7(middleX(anchor, element), northY(anchor, element), bubbles.north(), north(), boundsRestriction(anchor, { bottom: 2 }), 'layout-n');
+    };
+    var south$1 = function (anchor, element, bubbles) {
+      return nu$7(middleX(anchor, element), southY(anchor), bubbles.south(), south(), boundsRestriction(anchor, { top: 3 }), 'layout-s');
+    };
+    var east$1 = function (anchor, element, bubbles) {
+      return nu$7(eastEdgeX(anchor), centreY(anchor, element), bubbles.east(), east(), boundsRestriction(anchor, { left: 0 }), 'layout-e');
+    };
+    var west$1 = function (anchor, element, bubbles) {
+      return nu$7(westEdgeX(anchor, element), centreY(anchor, element), bubbles.west(), west(), boundsRestriction(anchor, { right: 1 }), 'layout-w');
+    };
+    var all$2 = function () {
+      return [
+        southeast$1,
+        southwest$1,
+        northeast$1,
+        northwest$1,
+        south$1,
+        north$1,
+        east$1,
+        west$1
+      ];
+    };
+    var allRtl = function () {
+      return [
+        southwest$1,
+        southeast$1,
+        northwest$1,
+        northeast$1,
+        south$1,
+        north$1,
+        east$1,
+        west$1
+      ];
+    };
+    var aboveOrBelow = function () {
+      return [
+        northeast$1,
+        northwest$1,
+        southeast$1,
+        southwest$1,
+        north$1,
+        south$1
+      ];
+    };
+    var aboveOrBelowRtl = function () {
+      return [
+        northwest$1,
+        northeast$1,
+        southwest$1,
+        southeast$1,
+        north$1,
+        south$1
+      ];
+    };
+    var belowOrAbove = function () {
+      return [
+        southeast$1,
+        southwest$1,
+        northeast$1,
+        northwest$1,
+        south$1,
+        north$1
+      ];
+    };
+    var belowOrAboveRtl = function () {
+      return [
+        southwest$1,
+        southeast$1,
+        northwest$1,
+        northeast$1,
+        south$1,
+        north$1
+      ];
+    };
+
+    var executeEvent = function (bConfig, bState, executor) {
+      return runOnExecute(function (component) {
+        executor(component, bConfig, bState);
+      });
+    };
+    var loadEvent = function (bConfig, bState, f) {
+      return runOnInit(function (component, _simulatedEvent) {
+        f(component, bConfig, bState);
+      });
+    };
+    var create = function (schema, name, active, apis, extra, state) {
+      var configSchema = objOfOnly(schema);
+      var schemaSchema = optionObjOf(name, [optionObjOfOnly('config', schema)]);
+      return doCreate(configSchema, schemaSchema, name, active, apis, extra, state);
+    };
+    var createModes = function (modes, name, active, apis, extra, state) {
+      var configSchema = modes;
+      var schemaSchema = optionObjOf(name, [optionOf('config', modes)]);
+      return doCreate(configSchema, schemaSchema, name, active, apis, extra, state);
+    };
+    var wrapApi = function (bName, apiFunction, apiName) {
+      var f = function (component) {
+        var rest = [];
+        for (var _i = 1; _i < arguments.length; _i++) {
+          rest[_i - 1] = arguments[_i];
+        }
+        var args = [component].concat(rest);
+        return component.config({ name: constant(bName) }).fold(function () {
+          throw new Error('We could not find any behaviour configuration for: ' + bName + '. Using API: ' + apiName);
+        }, function (info) {
+          var rest = Array.prototype.slice.call(args, 1);
+          return apiFunction.apply(undefined, [
+            component,
+            info.config,
+            info.state
+          ].concat(rest));
+        });
+      };
+      return markAsBehaviourApi(f, apiName, apiFunction);
+    };
+    var revokeBehaviour = function (name) {
+      return {
+        key: name,
+        value: undefined
+      };
+    };
+    var doCreate = function (configSchema, schemaSchema, name, active, apis, extra, state) {
+      var getConfig = function (info) {
+        return hasNonNullableKey(info, name) ? info[name]() : Option.none();
+      };
+      var wrappedApis = map$1(apis, function (apiF, apiName) {
+        return wrapApi(name, apiF, apiName);
+      });
+      var wrappedExtra = map$1(extra, function (extraF, extraName) {
+        return markAsExtraApi(extraF, extraName);
+      });
+      var me = __assign(__assign(__assign({}, wrappedExtra), wrappedApis), {
+        revoke: curry(revokeBehaviour, name),
+        config: function (spec) {
+          var prepared = asRawOrDie(name + '-config', configSchema, spec);
+          return {
+            key: name,
+            value: {
+              config: prepared,
+              me: me,
+              configAsRaw: cached(function () {
+                return asRawOrDie(name + '-config', configSchema, spec);
+              }),
+              initialConfig: spec,
+              state: state
+            }
+          };
+        },
+        schema: function () {
+          return schemaSchema;
+        },
+        exhibit: function (info, base) {
+          return getConfig(info).bind(function (behaviourInfo) {
+            return get(active, 'exhibit').map(function (exhibitor) {
+              return exhibitor(base, behaviourInfo.config, behaviourInfo.state);
+            });
+          }).getOr(nu$6({}));
+        },
+        name: function () {
+          return name;
+        },
+        handlers: function (info) {
+          return getConfig(info).map(function (behaviourInfo) {
+            var getEvents = get(active, 'events').getOr(function () {
+              return {};
+            });
+            return getEvents(behaviourInfo.config, behaviourInfo.state);
+          }).getOr({});
+        }
+      });
+      return me;
+    };
+
+    var derive$1 = function (capabilities) {
+      return wrapAll$1(capabilities);
+    };
+    var simpleSchema = objOfOnly([
+      strict$1('fields'),
+      strict$1('name'),
+      defaulted$1('active', {}),
+      defaulted$1('apis', {}),
+      defaulted$1('state', NoState),
+      defaulted$1('extra', {})
+    ]);
+    var create$1 = function (data) {
+      var value = asRawOrDie('Creating behaviour: ' + data.name, simpleSchema, data);
+      return create(value.fields, value.name, value.active, value.apis, value.extra, value.state);
+    };
+    var modeSchema = objOfOnly([
+      strict$1('branchKey'),
+      strict$1('branches'),
+      strict$1('name'),
+      defaulted$1('active', {}),
+      defaulted$1('apis', {}),
+      defaulted$1('state', NoState),
+      defaulted$1('extra', {})
+    ]);
+    var createModes$1 = function (data) {
+      var value = asRawOrDie('Creating behaviour: ' + data.name, modeSchema, data);
+      return createModes(choose$1(value.branchKey, value.branches), value.name, value.active, value.apis, value.extra, value.state);
+    };
+    var revoke = constant(undefined);
+
+    var chooseChannels = function (channels, message) {
+      return message.universal() ? channels : filter(channels, function (ch) {
+        return contains(message.channels(), ch);
+      });
+    };
+    var events$1 = function (receiveConfig) {
+      return derive([run(receive(), function (component, message) {
+          var channelMap = receiveConfig.channels;
+          var channels = keys(channelMap);
+          var receivingData = message;
+          var targetChannels = chooseChannels(channels, receivingData);
+          each(targetChannels, function (ch) {
+            var channelInfo = channelMap[ch];
+            var channelSchema = channelInfo.schema;
+            var data = asRawOrDie('channel[' + ch + '] data\nReceiver: ' + element(component.element()), channelSchema, receivingData.data());
+            channelInfo.onReceive(component, data);
+          });
+        })]);
+    };
+
+    var ActiveReceiving = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events$1
+    });
+
+    var ReceivingSchema = [strictOf('channels', setOf$1(Result.value, objOfOnly([
+        onStrictHandler('onReceive'),
+        defaulted$1('schema', anyValue$1())
+      ])))];
+
+    var Receiving = create$1({
+      fields: ReceivingSchema,
+      name: 'receiving',
+      active: ActiveReceiving
+    });
+
+    var exhibit = function (base, posConfig) {
+      return nu$6({
+        classes: [],
+        styles: posConfig.useFixed() ? {} : { position: 'relative' }
+      });
+    };
+
+    var ActivePosition = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        exhibit: exhibit
+    });
+
+    var focus$1 = function (element) {
+      return element.dom().focus();
+    };
+    var blur = function (element) {
+      return element.dom().blur();
+    };
+    var hasFocus = function (element) {
+      var doc = owner(element).dom();
+      return element.dom() === doc.activeElement;
+    };
+    var active = function (_doc) {
+      var doc = _doc !== undefined ? _doc.dom() : domGlobals.document;
+      return Option.from(doc.activeElement).map(Element.fromDom);
+    };
+    var search = function (element) {
+      return active(owner(element)).filter(function (e) {
+        return element.dom().contains(e.dom());
+      });
+    };
+
+    var preserve = function (f, container) {
+      var ownerDoc = owner(container);
+      var refocus = active(ownerDoc).bind(function (focused) {
+        var hasFocus = function (elem) {
+          return eq$1(focused, elem);
+        };
+        return hasFocus(container) ? Option.some(container) : descendant(container, hasFocus);
+      });
+      var result = f(container);
+      refocus.each(function (oldFocus) {
+        active(ownerDoc).filter(function (newFocus) {
+          return eq$1(newFocus, oldFocus);
+        }).fold(function () {
+          focus$1(oldFocus);
+        }, noop);
+      });
+      return result;
+    };
+
+    var NuPositionCss = function (position, left, top, right, bottom) {
+      return {
+        position: constant(position),
+        left: constant(left),
+        top: constant(top),
+        right: constant(right),
+        bottom: constant(bottom)
+      };
+    };
+    var applyPositionCss = function (element, position) {
+      var addPx = function (num) {
+        return num + 'px';
+      };
+      setOptions(element, {
+        position: Option.some(position.position()),
+        left: position.left().map(addPx),
+        top: position.top().map(addPx),
+        right: position.right().map(addPx),
+        bottom: position.bottom().map(addPx)
+      });
+    };
+
+    var adt$3 = Adt.generate([
+      { none: [] },
+      {
+        relative: [
+          'x',
+          'y',
+          'width',
+          'height'
+        ]
+      },
+      {
+        fixed: [
+          'x',
+          'y',
+          'width',
+          'height'
+        ]
+      }
+    ]);
+    var positionWithDirection = function (posName, decision, x, y, width, height) {
+      var decisionX = decision.x - x;
+      var decisionY = decision.y - y;
+      var decisionWidth = decision.width;
+      var decisionHeight = decision.height;
+      var decisionRight = width - (decisionX + decisionWidth);
+      var decisionBottom = height - (decisionY + decisionHeight);
+      var left = Option.some(decisionX);
+      var top = Option.some(decisionY);
+      var right = Option.some(decisionRight);
+      var bottom = Option.some(decisionBottom);
+      var none = Option.none();
+      return cata(decision.direction, function () {
+        return NuPositionCss(posName, left, top, none, none);
+      }, function () {
+        return NuPositionCss(posName, none, top, right, none);
+      }, function () {
+        return NuPositionCss(posName, left, none, none, bottom);
+      }, function () {
+        return NuPositionCss(posName, none, none, right, bottom);
+      }, function () {
+        return NuPositionCss(posName, left, top, none, none);
+      }, function () {
+        return NuPositionCss(posName, left, none, none, bottom);
+      }, function () {
+        return NuPositionCss(posName, left, top, none, none);
+      }, function () {
+        return NuPositionCss(posName, none, top, right, none);
+      });
+    };
+    var reposition = function (origin, decision) {
+      return origin.fold(function () {
+        return NuPositionCss('absolute', Option.some(decision.x), Option.some(decision.y), Option.none(), Option.none());
+      }, function (x, y, width, height) {
+        return positionWithDirection('absolute', decision, x, y, width, height);
+      }, function (x, y, width, height) {
+        return positionWithDirection('fixed', decision, x, y, width, height);
+      });
+    };
+    var toBox = function (origin, element) {
+      var rel = curry(find$3, element);
+      var position = origin.fold(rel, rel, function () {
+        var scroll = get$8();
+        return find$3(element).translate(-scroll.left(), -scroll.top());
+      });
+      var width = getOuter$2(element);
+      var height = getOuter$1(element);
+      return bounds$1(position.left(), position.top(), width, height);
+    };
+    var viewport$1 = function (origin, getBounds) {
+      return getBounds.fold(function () {
+        return origin.fold(win, win, bounds$1);
+      }, function (b) {
+        return origin.fold(b, b, function () {
+          var bounds = b();
+          var pos = translate(origin, bounds.x, bounds.y);
+          return bounds$1(pos.left(), pos.top(), bounds.width, bounds.height);
+        });
+      });
+    };
+    var translate = function (origin, x, y) {
+      var pos = Position(x, y);
+      var removeScroll = function () {
+        var outerScroll = get$8();
+        return pos.translate(-outerScroll.left(), -outerScroll.top());
+      };
+      return origin.fold(constant(pos), constant(pos), removeScroll);
+    };
+    var cata$1 = function (subject, onNone, onRelative, onFixed) {
+      return subject.fold(onNone, onRelative, onFixed);
+    };
+    var none$1 = adt$3.none;
+    var relative = adt$3.relative;
+    var fixed = adt$3.fixed;
+
+    var anchor = function (anchorBox, origin) {
+      return {
+        anchorBox: constant(anchorBox),
+        origin: constant(origin)
+      };
+    };
+    var box$1 = function (anchorBox, origin) {
+      return anchor(anchorBox, origin);
+    };
+
+    var cycleBy = function (value, delta, min, max) {
+      var r = value + delta;
+      return r > max ? min : r < min ? max : r;
+    };
+    var clamp = function (value, min, max) {
+      return Math.min(Math.max(value, min), max);
+    };
+
+    var adt$4 = Adt.generate([
+      { fit: ['reposition'] },
+      {
+        nofit: [
+          'reposition',
+          'deltaW',
+          'deltaH'
+        ]
+      }
+    ]);
+    var calcReposition = function (newX, newY, width, height, bounds) {
+      var boundsX = bounds.x;
+      var boundsY = bounds.y;
+      var boundsWidth = bounds.width;
+      var boundsHeight = bounds.height;
+      var xInBounds = newX >= boundsX;
+      var yInBounds = newY >= boundsY;
+      var originInBounds = xInBounds && yInBounds;
+      var xFit = newX + width <= boundsX + boundsWidth;
+      var yFit = newY + height <= boundsY + boundsHeight;
+      var sizeInBounds = xFit && yFit;
+      var deltaW = Math.abs(Math.min(width, xInBounds ? boundsX + boundsWidth - newX : boundsX - (newX + width)));
+      var deltaH = Math.abs(Math.min(height, yInBounds ? boundsY + boundsHeight - newY : boundsY - (newY + height)));
+      var maxX = Math.max(bounds.x, bounds.right - width);
+      var maxY = Math.max(bounds.y, bounds.bottom - height);
+      var limitX = clamp(newX, bounds.x, maxX);
+      var limitY = clamp(newY, bounds.y, maxY);
+      return {
+        originInBounds: originInBounds,
+        sizeInBounds: sizeInBounds,
+        limitX: limitX,
+        limitY: limitY,
+        deltaW: deltaW,
+        deltaH: deltaH
+      };
+    };
+    var attempt = function (candidate, width, height, bounds) {
+      var candidateX = candidate.x();
+      var candidateY = candidate.y();
+      var bubbleOffsets = candidate.bubble().offset();
+      var bubbleLeft = bubbleOffsets.left();
+      var bubbleTop = bubbleOffsets.top();
+      var adjustedBounds = adjustBounds(bounds, candidate.boundsRestriction(), bubbleOffsets);
+      var boundsY = adjustedBounds.y;
+      var boundsBottom = adjustedBounds.bottom;
+      var boundsX = adjustedBounds.x;
+      var boundsRight = adjustedBounds.right;
+      var newX = candidateX + bubbleLeft;
+      var newY = candidateY + bubbleTop;
+      var _a = calcReposition(newX, newY, width, height, adjustedBounds), originInBounds = _a.originInBounds, sizeInBounds = _a.sizeInBounds, limitX = _a.limitX, limitY = _a.limitY, deltaW = _a.deltaW, deltaH = _a.deltaH;
+      var upAvailable = constant(limitY + deltaH - boundsY);
+      var downAvailable = constant(boundsBottom - limitY);
+      var maxHeight = cataVertical(candidate.direction(), downAvailable, downAvailable, upAvailable);
+      var westAvailable = constant(limitX + deltaW - boundsX);
+      var eastAvailable = constant(boundsRight - limitX);
+      var maxWidth = cataHorizontal(candidate.direction(), eastAvailable, eastAvailable, westAvailable);
+      var reposition = {
+        x: limitX,
+        y: limitY,
+        width: deltaW,
+        height: deltaH,
+        maxHeight: maxHeight,
+        maxWidth: maxWidth,
+        direction: candidate.direction(),
+        classes: {
+          on: candidate.bubble().classesOn(),
+          off: candidate.bubble().classesOff()
+        },
+        label: candidate.label(),
+        candidateYforTest: newY
+      };
+      return originInBounds && sizeInBounds ? adt$4.fit(reposition) : adt$4.nofit(reposition, deltaW, deltaH);
+    };
+    var attempts = function (candidates, anchorBox, elementBox, bubbles, bounds) {
+      var panelWidth = elementBox.width;
+      var panelHeight = elementBox.height;
+      var attemptBestFit = function (layout, reposition, deltaW, deltaH) {
+        var next = layout(anchorBox, elementBox, bubbles);
+        var attemptLayout = attempt(next, panelWidth, panelHeight, bounds);
+        return attemptLayout.fold(adt$4.fit, function (newReposition, newDeltaW, newDeltaH) {
+          var improved = newDeltaH > deltaH || newDeltaW > deltaW;
+          return improved ? adt$4.nofit(newReposition, newDeltaW, newDeltaH) : adt$4.nofit(reposition, deltaW, deltaH);
+        });
+      };
+      var abc = foldl(candidates, function (b, a) {
+        var bestNext = curry(attemptBestFit, a);
+        return b.fold(adt$4.fit, bestNext);
+      }, adt$4.nofit({
+        x: anchorBox.x,
+        y: anchorBox.y,
+        width: elementBox.width,
+        height: elementBox.height,
+        maxHeight: elementBox.height,
+        maxWidth: elementBox.width,
+        direction: southeast(),
+        classes: {
+          on: [],
+          off: []
+        },
+        label: 'none',
+        candidateYforTest: anchorBox.y
+      }, -1, -1));
+      return abc.fold(identity, identity);
+    };
+
+    var elementSize = function (p) {
+      return {
+        width: getOuter$2(p),
+        height: getOuter$1(p)
+      };
+    };
+    var layout = function (anchorBox, element, bubbles, options) {
+      remove$6(element, 'max-height');
+      remove$6(element, 'max-width');
+      var elementBox = elementSize(element);
+      return attempts(options.preference, anchorBox, elementBox, bubbles, options.bounds);
+    };
+    var setClasses = function (element, decision) {
+      var classInfo = decision.classes;
+      remove$5(element, classInfo.off);
+      add$3(element, classInfo.on);
+    };
+    var setHeight = function (element, decision, options) {
+      var maxHeightFunction = options.maxHeightFunction;
+      maxHeightFunction(element, decision.maxHeight);
+    };
+    var setWidth = function (element, decision, options) {
+      var maxWidthFunction = options.maxWidthFunction;
+      maxWidthFunction(element, decision.maxWidth);
+    };
+    var position = function (element, decision, options) {
+      applyPositionCss(element, reposition(options.origin, decision));
+    };
+
+    var setMaxHeight = function (element, maxHeight) {
+      setMax(element, Math.floor(maxHeight));
+    };
+    var anchored = constant(function (element, available) {
+      setMaxHeight(element, available);
+      setAll$1(element, {
+        'overflow-x': 'hidden',
+        'overflow-y': 'auto'
+      });
+    });
+    var expandable = constant(function (element, available) {
+      setMaxHeight(element, available);
+    });
+
+    var defaultOr = function (options, key, dephault) {
+      return options[key] === undefined ? dephault : options[key];
+    };
+    var simple = function (anchor, element, bubble, layouts, getBounds, overrideOptions) {
+      var maxHeightFunction = defaultOr(overrideOptions, 'maxHeightFunction', anchored());
+      var maxWidthFunction = defaultOr(overrideOptions, 'maxWidthFunction', noop);
+      var anchorBox = anchor.anchorBox();
+      var origin = anchor.origin();
+      var options = {
+        bounds: viewport$1(origin, getBounds),
+        origin: origin,
+        preference: layouts,
+        maxHeightFunction: maxHeightFunction,
+        maxWidthFunction: maxWidthFunction
+      };
+      go(anchorBox, element, bubble, options);
+    };
+    var go = function (anchorBox, element, bubble, options) {
+      var decision = layout(anchorBox, element, bubble, options);
+      position(element, decision, options);
+      setClasses(element, decision);
+      setHeight(element, decision, options);
+      setWidth(element, decision, options);
+    };
+
+    var allAlignments = [
+      'valignCentre',
+      'alignLeft',
+      'alignRight',
+      'alignCentre',
+      'top',
+      'bottom',
+      'left',
+      'right'
+    ];
+    var nu$8 = function (width, yoffset, classes) {
+      var getClasses = function (prop) {
+        return get(classes, prop).getOr([]);
+      };
+      var make = function (xDelta, yDelta, alignmentsOn) {
+        var alignmentsOff = difference(allAlignments, alignmentsOn);
+        return {
+          offset: function () {
+            return Position(xDelta, yDelta);
+          },
+          classesOn: function () {
+            return bind(alignmentsOn, getClasses);
+          },
+          classesOff: function () {
+            return bind(alignmentsOff, getClasses);
+          }
+        };
+      };
+      return {
+        southeast: function () {
+          return make(-width, yoffset, [
+            'top',
+            'alignLeft'
+          ]);
+        },
+        southwest: function () {
+          return make(width, yoffset, [
+            'top',
+            'alignRight'
+          ]);
+        },
+        south: function () {
+          return make(-width / 2, yoffset, [
+            'top',
+            'alignCentre'
+          ]);
+        },
+        northeast: function () {
+          return make(-width, -yoffset, [
+            'bottom',
+            'alignLeft'
+          ]);
+        },
+        northwest: function () {
+          return make(width, -yoffset, [
+            'bottom',
+            'alignRight'
+          ]);
+        },
+        north: function () {
+          return make(-width / 2, -yoffset, [
+            'bottom',
+            'alignCentre'
+          ]);
+        },
+        east: function () {
+          return make(width, -yoffset / 2, [
+            'valignCentre',
+            'left'
+          ]);
+        },
+        west: function () {
+          return make(-width, -yoffset / 2, [
+            'valignCentre',
+            'right'
+          ]);
+        },
+        innerNorthwest: function () {
+          return make(-width, yoffset, [
+            'top',
+            'alignRight'
+          ]);
+        },
+        innerNortheast: function () {
+          return make(width, yoffset, [
+            'top',
+            'alignLeft'
+          ]);
+        },
+        innerNorth: function () {
+          return make(-width / 2, yoffset, [
+            'top',
+            'alignCentre'
+          ]);
+        },
+        innerSouthwest: function () {
+          return make(-width, -yoffset, [
+            'bottom',
+            'alignRight'
+          ]);
+        },
+        innerSoutheast: function () {
+          return make(width, -yoffset, [
+            'bottom',
+            'alignLeft'
+          ]);
+        },
+        innerSouth: function () {
+          return make(-width / 2, -yoffset, [
+            'bottom',
+            'alignCentre'
+          ]);
+        },
+        innerWest: function () {
+          return make(width, -yoffset / 2, [
+            'valignCentre',
+            'right'
+          ]);
+        },
+        innerEast: function () {
+          return make(-width, -yoffset / 2, [
+            'valignCentre',
+            'left'
+          ]);
+        }
+      };
+    };
+    var fallback = function () {
+      return nu$8(0, 0, {});
+    };
+
+    var nu$9 = function (x) {
+      return x;
+    };
+
+    var onDirection = function (isLtr, isRtl) {
+      return function (element) {
+        return getDirection(element) === 'rtl' ? isRtl : isLtr;
+      };
+    };
+    var getDirection = function (element) {
+      return get$4(element, 'direction') === 'rtl' ? 'rtl' : 'ltr';
+    };
+
+    var AttributeValue;
+    (function (AttributeValue) {
+      AttributeValue['TopToBottom'] = 'toptobottom';
+      AttributeValue['BottomToTop'] = 'bottomtotop';
+    }(AttributeValue || (AttributeValue = {})));
+    var Attribute = 'data-alloy-vertical-dir';
+    var isBottomToTopDir = function (el) {
+      return closest$2(el, function (current) {
+        return isElement(current) && get$2(current, Attribute) === AttributeValue.BottomToTop;
+      });
+    };
+
+    var schema$1 = function () {
+      return optionObjOf('layouts', [
+        strict$1('onLtr'),
+        strict$1('onRtl'),
+        option('onBottomLtr'),
+        option('onBottomRtl')
+      ]);
+    };
+    var get$a = function (elem, info, defaultLtr, defaultRtl, defaultBottomLtr, defaultBottomRtl, dirElement) {
+      var isBottomToTop = dirElement.map(isBottomToTopDir).getOr(false);
+      var customLtr = info.layouts.map(function (ls) {
+        return ls.onLtr(elem);
+      });
+      var customRtl = info.layouts.map(function (ls) {
+        return ls.onRtl(elem);
+      });
+      var ltr = isBottomToTop ? info.layouts.bind(function (ls) {
+        return ls.onBottomLtr.map(function (f) {
+          return f(elem);
+        });
+      }).or(customLtr).getOr(defaultBottomLtr) : customLtr.getOr(defaultLtr);
+      var rtl = isBottomToTop ? info.layouts.bind(function (ls) {
+        return ls.onBottomRtl.map(function (f) {
+          return f(elem);
+        });
+      }).or(customRtl).getOr(defaultBottomRtl) : customRtl.getOr(defaultRtl);
+      var f = onDirection(ltr, rtl);
+      return f(elem);
+    };
+
+    var placement = function (component, anchorInfo, origin) {
+      var hotspot = anchorInfo.hotspot;
+      var anchorBox = toBox(origin, hotspot.element());
+      var layouts = get$a(component.element(), anchorInfo, belowOrAbove(), belowOrAboveRtl(), aboveOrBelow(), aboveOrBelowRtl(), Option.some(anchorInfo.hotspot.element()));
+      return Option.some(nu$9({
+        anchorBox: anchorBox,
+        bubble: anchorInfo.bubble.getOr(fallback()),
+        overrides: anchorInfo.overrides,
+        layouts: layouts,
+        placer: Option.none()
+      }));
+    };
+    var HotspotAnchor = [
+      strict$1('hotspot'),
+      option('bubble'),
+      defaulted$1('overrides', {}),
+      schema$1(),
+      output('placement', placement)
+    ];
+
+    var placement$1 = function (component, anchorInfo, origin) {
+      var pos = translate(origin, anchorInfo.x, anchorInfo.y);
+      var anchorBox = bounds$1(pos.left(), pos.top(), anchorInfo.width, anchorInfo.height);
+      var layouts = get$a(component.element(), anchorInfo, all$2(), allRtl(), all$2(), allRtl(), Option.none());
+      return Option.some(nu$9({
+        anchorBox: anchorBox,
+        bubble: anchorInfo.bubble,
+        overrides: anchorInfo.overrides,
+        layouts: layouts,
+        placer: Option.none()
+      }));
+    };
+    var MakeshiftAnchor = [
+      strict$1('x'),
+      strict$1('y'),
+      defaulted$1('height', 0),
+      defaulted$1('width', 0),
+      defaulted$1('bubble', fallback()),
+      defaulted$1('overrides', {}),
+      schema$1(),
+      output('placement', placement$1)
+    ];
+
+    var zeroWidth = '\uFEFF';
+    var nbsp = '\xA0';
+
+    var create$2 = function (start, soffset, finish, foffset) {
+      return {
+        start: constant(start),
+        soffset: constant(soffset),
+        finish: constant(finish),
+        foffset: constant(foffset)
+      };
+    };
+    var SimRange = { create: create$2 };
+
+    var adt$5 = Adt.generate([
+      { before: ['element'] },
+      {
+        on: [
+          'element',
+          'offset'
+        ]
+      },
+      { after: ['element'] }
+    ]);
+    var cata$2 = function (subject, onBefore, onOn, onAfter) {
+      return subject.fold(onBefore, onOn, onAfter);
+    };
+    var getStart = function (situ) {
+      return situ.fold(identity, identity, identity);
+    };
+    var before$2 = adt$5.before;
+    var on = adt$5.on;
+    var after$1 = adt$5.after;
+    var Situ = {
+      before: before$2,
+      on: on,
+      after: after$1,
+      cata: cata$2,
+      getStart: getStart
+    };
+
+    var adt$6 = Adt.generate([
+      { domRange: ['rng'] },
+      {
+        relative: [
+          'startSitu',
+          'finishSitu'
+        ]
+      },
+      {
+        exact: [
+          'start',
+          'soffset',
+          'finish',
+          'foffset'
+        ]
+      }
+    ]);
+    var exactFromRange = function (simRange) {
+      return adt$6.exact(simRange.start(), simRange.soffset(), simRange.finish(), simRange.foffset());
+    };
+    var getStart$1 = function (selection) {
+      return selection.match({
+        domRange: function (rng) {
+          return Element.fromDom(rng.startContainer);
+        },
+        relative: function (startSitu, _finishSitu) {
+          return Situ.getStart(startSitu);
+        },
+        exact: function (start, _soffset, _finish, _foffset) {
+          return start;
+        }
+      });
+    };
+    var domRange = adt$6.domRange;
+    var relative$1 = adt$6.relative;
+    var exact = adt$6.exact;
+    var getWin = function (selection) {
+      var start = getStart$1(selection);
+      return defaultView(start);
+    };
+    var range$1 = SimRange.create;
+    var Selection = {
+      domRange: domRange,
+      relative: relative$1,
+      exact: exact,
+      exactFromRange: exactFromRange,
+      getWin: getWin,
+      range: range$1
+    };
+
+    var setStart = function (rng, situ) {
+      situ.fold(function (e) {
+        rng.setStartBefore(e.dom());
+      }, function (e, o) {
+        rng.setStart(e.dom(), o);
+      }, function (e) {
+        rng.setStartAfter(e.dom());
+      });
+    };
+    var setFinish = function (rng, situ) {
+      situ.fold(function (e) {
+        rng.setEndBefore(e.dom());
+      }, function (e, o) {
+        rng.setEnd(e.dom(), o);
+      }, function (e) {
+        rng.setEndAfter(e.dom());
+      });
+    };
+    var relativeToNative = function (win, startSitu, finishSitu) {
+      var range = win.document.createRange();
+      setStart(range, startSitu);
+      setFinish(range, finishSitu);
+      return range;
+    };
+    var exactToNative = function (win, start, soffset, finish, foffset) {
+      var rng = win.document.createRange();
+      rng.setStart(start.dom(), soffset);
+      rng.setEnd(finish.dom(), foffset);
+      return rng;
+    };
+    var toRect = function (rect) {
+      return {
+        left: constant(rect.left),
+        top: constant(rect.top),
+        right: constant(rect.right),
+        bottom: constant(rect.bottom),
+        width: constant(rect.width),
+        height: constant(rect.height)
+      };
+    };
+    var getFirstRect = function (rng) {
+      var rects = rng.getClientRects();
+      var rect = rects.length > 0 ? rects[0] : rng.getBoundingClientRect();
+      return rect.width > 0 || rect.height > 0 ? Option.some(rect).map(toRect) : Option.none();
+    };
+
+    var adt$7 = Adt.generate([
+      {
+        ltr: [
+          'start',
+          'soffset',
+          'finish',
+          'foffset'
+        ]
+      },
+      {
+        rtl: [
+          'start',
+          'soffset',
+          'finish',
+          'foffset'
+        ]
+      }
+    ]);
+    var fromRange = function (win, type, range) {
+      return type(Element.fromDom(range.startContainer), range.startOffset, Element.fromDom(range.endContainer), range.endOffset);
+    };
+    var getRanges = function (win, selection) {
+      return selection.match({
+        domRange: function (rng) {
+          return {
+            ltr: constant(rng),
+            rtl: Option.none
+          };
+        },
+        relative: function (startSitu, finishSitu) {
+          return {
+            ltr: cached(function () {
+              return relativeToNative(win, startSitu, finishSitu);
+            }),
+            rtl: cached(function () {
+              return Option.some(relativeToNative(win, finishSitu, startSitu));
+            })
+          };
+        },
+        exact: function (start, soffset, finish, foffset) {
+          return {
+            ltr: cached(function () {
+              return exactToNative(win, start, soffset, finish, foffset);
+            }),
+            rtl: cached(function () {
+              return Option.some(exactToNative(win, finish, foffset, start, soffset));
+            })
+          };
+        }
+      });
+    };
+    var doDiagnose = function (win, ranges) {
+      var rng = ranges.ltr();
+      if (rng.collapsed) {
+        var reversed = ranges.rtl().filter(function (rev) {
+          return rev.collapsed === false;
+        });
+        return reversed.map(function (rev) {
+          return adt$7.rtl(Element.fromDom(rev.endContainer), rev.endOffset, Element.fromDom(rev.startContainer), rev.startOffset);
+        }).getOrThunk(function () {
+          return fromRange(win, adt$7.ltr, rng);
+        });
+      } else {
+        return fromRange(win, adt$7.ltr, rng);
+      }
+    };
+    var diagnose = function (win, selection) {
+      var ranges = getRanges(win, selection);
+      return doDiagnose(win, ranges);
+    };
+    var asLtrRange = function (win, selection) {
+      var diagnosis = diagnose(win, selection);
+      return diagnosis.match({
+        ltr: function (start, soffset, finish, foffset) {
+          var rng = win.document.createRange();
+          rng.setStart(start.dom(), soffset);
+          rng.setEnd(finish.dom(), foffset);
+          return rng;
+        },
+        rtl: function (start, soffset, finish, foffset) {
+          var rng = win.document.createRange();
+          rng.setStart(finish.dom(), foffset);
+          rng.setEnd(start.dom(), soffset);
+          return rng;
+        }
+      });
+    };
+    var ltr = adt$7.ltr;
+    var rtl = adt$7.rtl;
+
+    function NodeValue (is, name) {
+      var get = function (element) {
+        if (!is(element)) {
+          throw new Error('Can only get ' + name + ' value of a ' + name + ' node');
+        }
+        return getOption(element).getOr('');
+      };
+      var getOption = function (element) {
+        return is(element) ? Option.from(element.dom().nodeValue) : Option.none();
+      };
+      var set = function (element, value) {
+        if (!is(element)) {
+          throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');
+        }
+        element.dom().nodeValue = value;
+      };
+      return {
+        get: get,
+        getOption: getOption,
+        set: set
+      };
+    }
+
+    var api$2 = NodeValue(isText, 'text');
+    var get$b = function (element) {
+      return api$2.get(element);
+    };
+    var getOption = function (element) {
+      return api$2.getOption(element);
+    };
+
+    var getEnd = function (element) {
+      return name(element) === 'img' ? 1 : getOption(element).fold(function () {
+        return children(element).length;
+      }, function (v) {
+        return v.length;
+      });
+    };
+    var isTextNodeWithCursorPosition = function (el) {
+      return getOption(el).filter(function (text) {
+        return text.trim().length !== 0 || text.indexOf(nbsp) > -1;
+      }).isSome();
+    };
+    var elementsWithCursorPosition = [
+      'img',
+      'br'
+    ];
+    var isCursorPosition = function (elem) {
+      var hasCursorPosition = isTextNodeWithCursorPosition(elem);
+      return hasCursorPosition || contains(elementsWithCursorPosition, name(elem));
+    };
+
+    var last$1 = function (element) {
+      return descendantRtl(element, isCursorPosition);
+    };
+    var descendantRtl = function (scope, predicate) {
+      var descend = function (element) {
+        var children$1 = children(element);
+        for (var i = children$1.length - 1; i >= 0; i--) {
+          var child = children$1[i];
+          if (predicate(child)) {
+            return Option.some(child);
+          }
+          var res = descend(child);
+          if (res.isSome()) {
+            return res;
+          }
+        }
+        return Option.none();
+      };
+      return descend(scope);
+    };
+
+    var descendants = function (scope, selector) {
+      return all(selector, scope);
+    };
+
+    var makeRange = function (start, soffset, finish, foffset) {
+      var doc = owner(start);
+      var rng = doc.dom().createRange();
+      rng.setStart(start.dom(), soffset);
+      rng.setEnd(finish.dom(), foffset);
+      return rng;
+    };
+    var after$2 = function (start, soffset, finish, foffset) {
+      var r = makeRange(start, soffset, finish, foffset);
+      var same = eq$1(start, finish) && soffset === foffset;
+      return r.collapsed && !same;
+    };
+
+    var readRange = function (selection) {
+      if (selection.rangeCount > 0) {
+        var firstRng = selection.getRangeAt(0);
+        var lastRng = selection.getRangeAt(selection.rangeCount - 1);
+        return Option.some(SimRange.create(Element.fromDom(firstRng.startContainer), firstRng.startOffset, Element.fromDom(lastRng.endContainer), lastRng.endOffset));
+      } else {
+        return Option.none();
+      }
+    };
+    var doGetExact = function (selection) {
+      var anchor = Element.fromDom(selection.anchorNode);
+      var focus = Element.fromDom(selection.focusNode);
+      return after$2(anchor, selection.anchorOffset, focus, selection.focusOffset) ? Option.some(SimRange.create(anchor, selection.anchorOffset, focus, selection.focusOffset)) : readRange(selection);
+    };
+    var getExact = function (win) {
+      return Option.from(win.getSelection()).filter(function (sel) {
+        return sel.rangeCount > 0;
+      }).bind(doGetExact);
+    };
+    var getFirstRect$1 = function (win, selection) {
+      var rng = asLtrRange(win, selection);
+      return getFirstRect(rng);
+    };
+
+    var point = function (element, offset) {
+      return {
+        element: element,
+        offset: offset
+      };
+    };
+    var descendOnce = function (element, offset) {
+      var children$1 = children(element);
+      if (children$1.length === 0) {
+        return point(element, offset);
+      } else if (offset < children$1.length) {
+        return point(children$1[offset], 0);
+      } else {
+        var last = children$1[children$1.length - 1];
+        var len = isText(last) ? get$b(last).length : children(last).length;
+        return point(last, len);
+      }
+    };
+
+    var adt$8 = Adt.generate([
+      { screen: ['point'] },
+      {
+        absolute: [
+          'point',
+          'scrollLeft',
+          'scrollTop'
+        ]
+      }
+    ]);
+    var toFixed = function (pos) {
+      return pos.fold(identity, function (point, scrollLeft, scrollTop) {
+        return point.translate(-scrollLeft, -scrollTop);
+      });
+    };
+    var toAbsolute = function (pos) {
+      return pos.fold(identity, identity);
+    };
+    var sum = function (points) {
+      return foldl(points, function (b, a) {
+        return b.translate(a.left(), a.top());
+      }, Position(0, 0));
+    };
+    var sumAsFixed = function (positions) {
+      var points = map(positions, toFixed);
+      return sum(points);
+    };
+    var sumAsAbsolute = function (positions) {
+      var points = map(positions, toAbsolute);
+      return sum(points);
+    };
+    var screen = adt$8.screen;
+    var absolute$2 = adt$8.absolute;
+
+    var getOffset = function (component, origin, anchorInfo) {
+      var win = defaultView(anchorInfo.root).dom();
+      var hasSameOwner = function (frame) {
+        var frameOwner = owner(frame);
+        var compOwner = owner(component.element());
+        return eq$1(frameOwner, compOwner);
+      };
+      return Option.from(win.frameElement).map(Element.fromDom).filter(hasSameOwner).map(absolute);
+    };
+    var getRootPoint = function (component, origin, anchorInfo) {
+      var doc = owner(component.element());
+      var outerScroll = get$8(doc);
+      var offset = getOffset(component, origin, anchorInfo).getOr(outerScroll);
+      return absolute$2(offset, outerScroll.left(), outerScroll.top());
+    };
+
+    var capRect = function (left, top, width, height) {
+      var newLeft = left, newTop = top, newWidth = width, newHeight = height;
+      if (left < 0) {
+        newLeft = 0;
+        newWidth = width + left;
+      }
+      if (top < 0) {
+        newTop = 0;
+        newHeight = height + top;
+      }
+      var point = screen(Position(newLeft, newTop));
+      return Option.some(pointed(point, newWidth, newHeight));
+    };
+    var calcNewAnchor = function (optBox, rootPoint, anchorInfo, origin, elem) {
+      return optBox.map(function (box) {
+        var points = [
+          rootPoint,
+          box.point
+        ];
+        var topLeft = cata$1(origin, function () {
+          return sumAsAbsolute(points);
+        }, function () {
+          return sumAsAbsolute(points);
+        }, function () {
+          return sumAsFixed(points);
+        });
+        var anchorBox = rect(topLeft.left(), topLeft.top(), box.width, box.height);
+        var layoutsLtr = anchorInfo.showAbove ? aboveOrBelow() : belowOrAbove();
+        var layoutsRtl = anchorInfo.showAbove ? belowOrAboveRtl() : belowOrAboveRtl();
+        var layouts = get$a(elem, anchorInfo, layoutsLtr, layoutsRtl, layoutsLtr, layoutsRtl, Option.none());
+        return nu$9({
+          anchorBox: anchorBox,
+          bubble: anchorInfo.bubble.getOr(fallback()),
+          overrides: anchorInfo.overrides,
+          layouts: layouts,
+          placer: Option.none()
+        });
+      });
+    };
+
+    var point$1 = function (element, offset) {
+      return {
+        element: element,
+        offset: offset
+      };
+    };
+    var descendOnce$1 = function (element, offset) {
+      return isText(element) ? point$1(element, offset) : descendOnce(element, offset);
+    };
+    var getAnchorSelection = function (win, anchorInfo) {
+      var getSelection = anchorInfo.getSelection.getOrThunk(function () {
+        return function () {
+          return getExact(win);
+        };
+      });
+      return getSelection().map(function (sel) {
+        var modStart = descendOnce$1(sel.start(), sel.soffset());
+        var modFinish = descendOnce$1(sel.finish(), sel.foffset());
+        return Selection.range(modStart.element, modStart.offset, modFinish.element, modFinish.offset);
+      });
+    };
+    var placement$2 = function (component, anchorInfo, origin) {
+      var win = defaultView(anchorInfo.root).dom();
+      var rootPoint = getRootPoint(component, origin, anchorInfo);
+      var selectionBox = getAnchorSelection(win, anchorInfo).bind(function (sel) {
+        var optRect = getFirstRect$1(win, Selection.exactFromRange(sel)).orThunk(function () {
+          var x = Element.fromText(zeroWidth);
+          before(sel.start(), x);
+          return getFirstRect$1(win, Selection.exact(x, 0, x, 1)).map(function (rect) {
+            remove(x);
+            return rect;
+          });
+        });
+        return optRect.bind(function (rawRect) {
+          return capRect(rawRect.left(), rawRect.top(), rawRect.width(), rawRect.height());
+        });
+      });
+      var targetElement = getAnchorSelection(win, anchorInfo).bind(function (sel) {
+        return isElement(sel.start()) ? Option.some(sel.start()) : parent(sel.start());
+      });
+      var elem = targetElement.getOr(component.element());
+      return calcNewAnchor(selectionBox, rootPoint, anchorInfo, origin, elem);
+    };
+    var SelectionAnchor = [
+      option('getSelection'),
+      strict$1('root'),
+      option('bubble'),
+      schema$1(),
+      defaulted$1('overrides', {}),
+      defaulted$1('showAbove', false),
+      output('placement', placement$2)
+    ];
+
+    var placement$3 = function (component, anchorInfo, origin) {
+      var rootPoint = getRootPoint(component, origin, anchorInfo);
+      return anchorInfo.node.bind(function (target) {
+        var rect = target.dom().getBoundingClientRect();
+        var nodeBox = capRect(rect.left, rect.top, rect.width, rect.height);
+        var elem = anchorInfo.node.getOr(component.element());
+        return calcNewAnchor(nodeBox, rootPoint, anchorInfo, origin, elem);
+      });
+    };
+    var NodeAnchor = [
+      strict$1('node'),
+      strict$1('root'),
+      option('bubble'),
+      schema$1(),
+      defaulted$1('overrides', {}),
+      defaulted$1('showAbove', false),
+      output('placement', placement$3)
+    ];
+
+    var eastX$1 = function (anchor) {
+      return anchor.x + anchor.width;
+    };
+    var westX$1 = function (anchor, element) {
+      return anchor.x - element.width;
+    };
+    var northY$1 = function (anchor, element) {
+      return anchor.y - element.height + anchor.height;
+    };
+    var southY$1 = function (anchor) {
+      return anchor.y;
+    };
+    var southeast$2 = function (anchor, element, bubbles) {
+      return nu$7(eastX$1(anchor), southY$1(anchor), bubbles.southeast(), southeast(), boundsRestriction(anchor, {
+        left: 0,
+        top: 2
+      }), 'link-layout-se');
+    };
+    var southwest$2 = function (anchor, element, bubbles) {
+      return nu$7(westX$1(anchor, element), southY$1(anchor), bubbles.southwest(), southwest(), boundsRestriction(anchor, {
+        right: 1,
+        top: 2
+      }), 'link-layout-sw');
+    };
+    var northeast$2 = function (anchor, element, bubbles) {
+      return nu$7(eastX$1(anchor), northY$1(anchor, element), bubbles.northeast(), northeast(), boundsRestriction(anchor, {
+        left: 0,
+        bottom: 3
+      }), 'link-layout-ne');
+    };
+    var northwest$2 = function (anchor, element, bubbles) {
+      return nu$7(westX$1(anchor, element), northY$1(anchor, element), bubbles.northwest(), northwest(), boundsRestriction(anchor, {
+        right: 1,
+        bottom: 3
+      }), 'link-layout-nw');
+    };
+    var all$3 = function () {
+      return [
+        southeast$2,
+        southwest$2,
+        northeast$2,
+        northwest$2
+      ];
+    };
+    var allRtl$1 = function () {
+      return [
+        southwest$2,
+        southeast$2,
+        northwest$2,
+        northeast$2
+      ];
+    };
+
+    var placement$4 = function (component, submenuInfo, origin) {
+      var anchorBox = toBox(origin, submenuInfo.item.element());
+      var layouts = get$a(component.element(), submenuInfo, all$3(), allRtl$1(), all$3(), allRtl$1(), Option.none());
+      return Option.some(nu$9({
+        anchorBox: anchorBox,
+        bubble: fallback(),
+        overrides: submenuInfo.overrides,
+        layouts: layouts,
+        placer: Option.none()
+      }));
+    };
+    var SubmenuAnchor = [
+      strict$1('item'),
+      schema$1(),
+      defaulted$1('overrides', {}),
+      output('placement', placement$4)
+    ];
+
+    var AnchorSchema = choose$1('anchor', {
+      selection: SelectionAnchor,
+      node: NodeAnchor,
+      hotspot: HotspotAnchor,
+      submenu: SubmenuAnchor,
+      makeshift: MakeshiftAnchor
+    });
+
+    var getFixedOrigin = function () {
+      var html = domGlobals.document.documentElement;
+      return fixed(0, 0, html.clientWidth, html.clientHeight);
+    };
+    var getRelativeOrigin = function (component) {
+      var position = absolute(component.element());
+      var bounds = component.element().dom().getBoundingClientRect();
+      return relative(position.left(), position.top(), bounds.width, bounds.height);
+    };
+    var place = function (component, origin, anchoring, getBounds, placee) {
+      var anchor = box$1(anchoring.anchorBox, origin);
+      simple(anchor, placee.element(), anchoring.bubble, anchoring.layouts, getBounds, anchoring.overrides);
+    };
+    var position$1 = function (component, posConfig, posState, anchor, placee) {
+      positionWithin(component, posConfig, posState, anchor, placee, Option.none());
+    };
+    var positionWithin = function (component, posConfig, posState, anchor, placee, boxElement) {
+      var boundsBox = boxElement.map(box);
+      return positionWithinBounds(component, posConfig, posState, anchor, placee, boundsBox);
+    };
+    var positionWithinBounds = function (component, posConfig, posState, anchor, placee, bounds) {
+      var anchorage = asRawOrDie('positioning anchor.info', AnchorSchema, anchor);
+      preserve(function () {
+        set$2(placee.element(), 'position', 'fixed');
+        var oldVisibility = getRaw(placee.element(), 'visibility');
+        set$2(placee.element(), 'visibility', 'hidden');
+        var origin = posConfig.useFixed() ? getFixedOrigin() : getRelativeOrigin(component);
+        var placer = anchorage.placement;
+        var getBounds = bounds.map(constant).or(posConfig.getBounds);
+        placer(component, anchorage, origin).each(function (anchoring) {
+          var doPlace = anchoring.placer.getOr(place);
+          doPlace(component, origin, anchoring, getBounds, placee);
+        });
+        oldVisibility.fold(function () {
+          remove$6(placee.element(), 'visibility');
+        }, function (vis) {
+          set$2(placee.element(), 'visibility', vis);
+        });
+        if (getRaw(placee.element(), 'left').isNone() && getRaw(placee.element(), 'top').isNone() && getRaw(placee.element(), 'right').isNone() && getRaw(placee.element(), 'bottom').isNone() && getRaw(placee.element(), 'position').is('fixed')) {
+          remove$6(placee.element(), 'position');
+        }
+      }, placee.element());
+    };
+    var getMode = function (component, pConfig, _pState) {
+      return pConfig.useFixed() ? 'fixed' : 'absolute';
+    };
+
+    var PositionApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        position: position$1,
+        positionWithin: positionWithin,
+        positionWithinBounds: positionWithinBounds,
+        getMode: getMode
+    });
+
+    var PositionSchema = [
+      defaulted$1('useFixed', never),
+      option('getBounds')
+    ];
+
+    var Positioning = create$1({
+      fields: PositionSchema,
+      name: 'positioning',
+      active: ActivePosition,
+      apis: PositionApis
+    });
+
+    var fireDetaching = function (component) {
+      emit(component, detachedFromDom());
+      var children = component.components();
+      each(children, fireDetaching);
+    };
+    var fireAttaching = function (component) {
+      var children = component.components();
+      each(children, fireAttaching);
+      emit(component, attachedToDom());
+    };
+    var attach = function (parent, child) {
+      append(parent.element(), child.element());
+    };
+    var detachChildren = function (component) {
+      each(component.components(), function (childComp) {
+        return remove(childComp.element());
+      });
+      empty(component.element());
+      component.syncComponents();
+    };
+    var replaceChildren = function (component, newChildren) {
+      var subs = component.components();
+      detachChildren(component);
+      var deleted = difference(subs, newChildren);
+      each(deleted, function (comp) {
+        fireDetaching(comp);
+        component.getSystem().removeFromWorld(comp);
+      });
+      each(newChildren, function (childComp) {
+        if (!childComp.getSystem().isConnected()) {
+          component.getSystem().addToWorld(childComp);
+          attach(component, childComp);
+          if (inBody(component.element())) {
+            fireAttaching(childComp);
+          }
+        } else {
+          attach(component, childComp);
+        }
+        component.syncComponents();
+      });
+    };
+
+    var attach$1 = function (parent, child) {
+      attachWith(parent, child, append);
+    };
+    var attachWith = function (parent, child, insertion) {
+      parent.getSystem().addToWorld(child);
+      insertion(parent.element(), child.element());
+      if (inBody(parent.element())) {
+        fireAttaching(child);
+      }
+      parent.syncComponents();
+    };
+    var doDetach = function (component) {
+      fireDetaching(component);
+      remove(component.element());
+      component.getSystem().removeFromWorld(component);
+    };
+    var detach = function (component) {
+      var parent$1 = parent(component.element()).bind(function (p) {
+        return component.getSystem().getByDom(p).toOption();
+      });
+      doDetach(component);
+      parent$1.each(function (p) {
+        p.syncComponents();
+      });
+    };
+    var detachChildren$1 = function (component) {
+      var subs = component.components();
+      each(subs, doDetach);
+      empty(component.element());
+      component.syncComponents();
+    };
+    var attachSystem = function (element, guiSystem) {
+      attachSystemWith(element, guiSystem, append);
+    };
+    var attachSystemAfter = function (element, guiSystem) {
+      attachSystemWith(element, guiSystem, after);
+    };
+    var attachSystemWith = function (element, guiSystem, inserter) {
+      inserter(element, guiSystem.element());
+      var children$1 = children(guiSystem.element());
+      each(children$1, function (child) {
+        guiSystem.getByDom(child).each(fireAttaching);
+      });
+    };
+    var detachSystem = function (guiSystem) {
+      var children$1 = children(guiSystem.element());
+      each(children$1, function (child) {
+        guiSystem.getByDom(child).each(fireDetaching);
+      });
+      remove(guiSystem.element());
+    };
+
+    var rebuild = function (sandbox, sConfig, sState, data) {
+      sState.get().each(function (_data) {
+        detachChildren$1(sandbox);
+      });
+      var point = sConfig.getAttachPoint(sandbox);
+      attach$1(point, sandbox);
+      var built = sandbox.getSystem().build(data);
+      attach$1(sandbox, built);
+      sState.set(built);
+      return built;
+    };
+    var open = function (sandbox, sConfig, sState, data) {
+      var newState = rebuild(sandbox, sConfig, sState, data);
+      sConfig.onOpen(sandbox, newState);
+      return newState;
+    };
+    var setContent = function (sandbox, sConfig, sState, data) {
+      return sState.get().map(function () {
+        return rebuild(sandbox, sConfig, sState, data);
+      });
+    };
+    var openWhileCloaked = function (sandbox, sConfig, sState, data, transaction) {
+      cloak(sandbox, sConfig);
+      open(sandbox, sConfig, sState, data);
+      transaction();
+      decloak(sandbox, sConfig);
+    };
+    var close = function (sandbox, sConfig, sState) {
+      sState.get().each(function (data) {
+        detachChildren$1(sandbox);
+        detach(sandbox);
+        sConfig.onClose(sandbox, data);
+        sState.clear();
+      });
+    };
+    var isOpen = function (_sandbox, _sConfig, sState) {
+      return sState.isOpen();
+    };
+    var isPartOf$1 = function (sandbox, sConfig, sState, queryElem) {
+      return isOpen(sandbox, sConfig, sState) && sState.get().exists(function (data) {
+        return sConfig.isPartOf(sandbox, data, queryElem);
+      });
+    };
+    var getState = function (_sandbox, _sConfig, sState) {
+      return sState.get();
+    };
+    var store = function (sandbox, cssKey, attr, newValue) {
+      getRaw(sandbox.element(), cssKey).fold(function () {
+        remove$1(sandbox.element(), attr);
+      }, function (v) {
+        set$1(sandbox.element(), attr, v);
+      });
+      set$2(sandbox.element(), cssKey, newValue);
+    };
+    var restore = function (sandbox, cssKey, attr) {
+      getOpt(sandbox.element(), attr).fold(function () {
+        return remove$6(sandbox.element(), cssKey);
+      }, function (oldValue) {
+        return set$2(sandbox.element(), cssKey, oldValue);
+      });
+    };
+    var cloak = function (sandbox, sConfig, _sState) {
+      var sink = sConfig.getAttachPoint(sandbox);
+      set$2(sandbox.element(), 'position', Positioning.getMode(sink));
+      store(sandbox, 'visibility', sConfig.cloakVisibilityAttr, 'hidden');
+    };
+    var hasPosition = function (element) {
+      return exists([
+        'top',
+        'left',
+        'right',
+        'bottom'
+      ], function (pos) {
+        return getRaw(element, pos).isSome();
+      });
+    };
+    var decloak = function (sandbox, sConfig, _sState) {
+      if (!hasPosition(sandbox.element())) {
+        remove$6(sandbox.element(), 'position');
+      }
+      restore(sandbox, 'visibility', sConfig.cloakVisibilityAttr);
+    };
+
+    var SandboxApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        cloak: cloak,
+        decloak: decloak,
+        open: open,
+        openWhileCloaked: openWhileCloaked,
+        close: close,
+        isOpen: isOpen,
+        isPartOf: isPartOf$1,
+        getState: getState,
+        setContent: setContent
+    });
+
+    var events$2 = function (sandboxConfig, sandboxState) {
+      return derive([run(sandboxClose(), function (sandbox, _simulatedEvent) {
+          close(sandbox, sandboxConfig, sandboxState);
+        })]);
+    };
+
+    var ActiveSandbox = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events$2
+    });
+
+    var SandboxSchema = [
+      onHandler('onOpen'),
+      onHandler('onClose'),
+      strict$1('isPartOf'),
+      strict$1('getAttachPoint'),
+      defaulted$1('cloakVisibilityAttr', 'data-precloak-visibility')
+    ];
+
+    var init = function () {
+      var contents = Cell(Option.none());
+      var readState = constant('not-implemented');
+      var isOpen = function () {
+        return contents.get().isSome();
+      };
+      var set = function (comp) {
+        contents.set(Option.some(comp));
+      };
+      var get = function () {
+        return contents.get();
+      };
+      var clear = function () {
+        contents.set(Option.none());
+      };
+      return nu$5({
+        readState: readState,
+        isOpen: isOpen,
+        clear: clear,
+        set: set,
+        get: get
+      });
+    };
+
+    var SandboxState = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        init: init
+    });
+
+    var Sandboxing = create$1({
+      fields: SandboxSchema,
+      name: 'sandboxing',
+      active: ActiveSandbox,
+      apis: SandboxApis,
+      state: SandboxState
+    });
+
+    var dismissPopups = constant('dismiss.popups');
+    var repositionPopups = constant('reposition.popups');
+    var mouseReleased = constant('mouse.released');
+
+    var schema$2 = objOfOnly([
+      defaulted$1('isExtraPart', constant(false)),
+      optionObjOf('fireEventInstead', [defaulted$1('event', dismissRequested())])
+    ]);
+    var receivingChannel = function (rawSpec) {
+      var _a;
+      var detail = asRawOrDie('Dismissal', schema$2, rawSpec);
+      return _a = {}, _a[dismissPopups()] = {
+        schema: objOfOnly([strict$1('target')]),
+        onReceive: function (sandbox, data) {
+          if (Sandboxing.isOpen(sandbox)) {
+            var isPart = Sandboxing.isPartOf(sandbox, data.target) || detail.isExtraPart(sandbox, data.target);
+            if (!isPart) {
+              detail.fireEventInstead.fold(function () {
+                return Sandboxing.close(sandbox);
+              }, function (fe) {
+                return emit(sandbox, fe.event);
+              });
+            }
+          }
+        }
+      }, _a;
+    };
+
+    var schema$3 = objOfOnly([
+      optionObjOf('fireEventInstead', [defaulted$1('event', repositionRequested())]),
+      strictFunction('doReposition')
+    ]);
+    var receivingChannel$1 = function (rawSpec) {
+      var _a;
+      var detail = asRawOrDie('Reposition', schema$3, rawSpec);
+      return _a = {}, _a[repositionPopups()] = {
+        onReceive: function (sandbox) {
+          if (Sandboxing.isOpen(sandbox)) {
+            detail.fireEventInstead.fold(function () {
+              return detail.doReposition(sandbox);
+            }, function (fe) {
+              return emit(sandbox, fe.event);
+            });
+          }
+        }
+      }, _a;
+    };
+
+    var onLoad = function (component, repConfig, repState) {
+      repConfig.store.manager.onLoad(component, repConfig, repState);
+    };
+    var onUnload = function (component, repConfig, repState) {
+      repConfig.store.manager.onUnload(component, repConfig, repState);
+    };
+    var setValue = function (component, repConfig, repState, data) {
+      repConfig.store.manager.setValue(component, repConfig, repState, data);
+    };
+    var getValue = function (component, repConfig, repState) {
+      return repConfig.store.manager.getValue(component, repConfig, repState);
+    };
+    var getState$1 = function (component, repConfig, repState) {
+      return repState;
+    };
+
+    var RepresentApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        onLoad: onLoad,
+        onUnload: onUnload,
+        setValue: setValue,
+        getValue: getValue,
+        getState: getState$1
+    });
+
+    var events$3 = function (repConfig, repState) {
+      var es = repConfig.resetOnDom ? [
+        runOnAttached(function (comp, _se) {
+          onLoad(comp, repConfig, repState);
+        }),
+        runOnDetached(function (comp, _se) {
+          onUnload(comp, repConfig, repState);
+        })
+      ] : [loadEvent(repConfig, repState, onLoad)];
+      return derive(es);
+    };
+
+    var ActiveRepresenting = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events$3
+    });
+
+    var memory = function () {
+      var data = Cell(null);
+      var readState = function () {
+        return {
+          mode: 'memory',
+          value: data.get()
+        };
+      };
+      var isNotSet = function () {
+        return data.get() === null;
+      };
+      var clear = function () {
+        data.set(null);
+      };
+      return nu$5({
+        set: data.set,
+        get: data.get,
+        isNotSet: isNotSet,
+        clear: clear,
+        readState: readState
+      });
+    };
+    var manual = function () {
+      var readState = function () {
+      };
+      return nu$5({ readState: readState });
+    };
+    var dataset = function () {
+      var dataByValue = Cell({});
+      var dataByText = Cell({});
+      var readState = function () {
+        return {
+          mode: 'dataset',
+          dataByValue: dataByValue.get(),
+          dataByText: dataByText.get()
+        };
+      };
+      var clear = function () {
+        dataByValue.set({});
+        dataByText.set({});
+      };
+      var lookup = function (itemString) {
+        return get(dataByValue.get(), itemString).orThunk(function () {
+          return get(dataByText.get(), itemString);
+        });
+      };
+      var update = function (items) {
+        var currentDataByValue = dataByValue.get();
+        var currentDataByText = dataByText.get();
+        var newDataByValue = {};
+        var newDataByText = {};
+        each(items, function (item) {
+          newDataByValue[item.value] = item;
+          get(item, 'meta').each(function (meta) {
+            get(meta, 'text').each(function (text) {
+              newDataByText[text] = item;
+            });
+          });
+        });
+        dataByValue.set(__assign(__assign({}, currentDataByValue), newDataByValue));
+        dataByText.set(__assign(__assign({}, currentDataByText), newDataByText));
+      };
+      return nu$5({
+        readState: readState,
+        lookup: lookup,
+        update: update,
+        clear: clear
+      });
+    };
+    var init$1 = function (spec) {
+      return spec.store.manager.state(spec);
+    };
+
+    var RepresentState = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        memory: memory,
+        dataset: dataset,
+        manual: manual,
+        init: init$1
+    });
+
+    var setValue$1 = function (component, repConfig, repState, data) {
+      var store = repConfig.store;
+      repState.update([data]);
+      store.setValue(component, data);
+      repConfig.onSetValue(component, data);
+    };
+    var getValue$1 = function (component, repConfig, repState) {
+      var store = repConfig.store;
+      var key = store.getDataKey(component);
+      return repState.lookup(key).fold(function () {
+        return store.getFallbackEntry(key);
+      }, function (data) {
+        return data;
+      });
+    };
+    var onLoad$1 = function (component, repConfig, repState) {
+      var store = repConfig.store;
+      store.initialValue.each(function (data) {
+        setValue$1(component, repConfig, repState, data);
+      });
+    };
+    var onUnload$1 = function (component, repConfig, repState) {
+      repState.clear();
+    };
+    var DatasetStore = [
+      option('initialValue'),
+      strict$1('getFallbackEntry'),
+      strict$1('getDataKey'),
+      strict$1('setValue'),
+      output('manager', {
+        setValue: setValue$1,
+        getValue: getValue$1,
+        onLoad: onLoad$1,
+        onUnload: onUnload$1,
+        state: dataset
+      })
+    ];
+
+    var getValue$2 = function (component, repConfig, _repState) {
+      return repConfig.store.getValue(component);
+    };
+    var setValue$2 = function (component, repConfig, _repState, data) {
+      repConfig.store.setValue(component, data);
+      repConfig.onSetValue(component, data);
+    };
+    var onLoad$2 = function (component, repConfig, _repState) {
+      repConfig.store.initialValue.each(function (data) {
+        repConfig.store.setValue(component, data);
+      });
+    };
+    var ManualStore = [
+      strict$1('getValue'),
+      defaulted$1('setValue', noop),
+      option('initialValue'),
+      output('manager', {
+        setValue: setValue$2,
+        getValue: getValue$2,
+        onLoad: onLoad$2,
+        onUnload: noop,
+        state: NoState.init
+      })
+    ];
+
+    var setValue$3 = function (component, repConfig, repState, data) {
+      repState.set(data);
+      repConfig.onSetValue(component, data);
+    };
+    var getValue$3 = function (component, repConfig, repState) {
+      return repState.get();
+    };
+    var onLoad$3 = function (component, repConfig, repState) {
+      repConfig.store.initialValue.each(function (initVal) {
+        if (repState.isNotSet()) {
+          repState.set(initVal);
+        }
+      });
+    };
+    var onUnload$2 = function (component, repConfig, repState) {
+      repState.clear();
+    };
+    var MemoryStore = [
+      option('initialValue'),
+      output('manager', {
+        setValue: setValue$3,
+        getValue: getValue$3,
+        onLoad: onLoad$3,
+        onUnload: onUnload$2,
+        state: memory
+      })
+    ];
+
+    var RepresentSchema = [
+      defaultedOf('store', { mode: 'memory' }, choose$1('mode', {
+        memory: MemoryStore,
+        manual: ManualStore,
+        dataset: DatasetStore
+      })),
+      onHandler('onSetValue'),
+      defaulted$1('resetOnDom', false)
+    ];
+
+    var Representing = create$1({
+      fields: RepresentSchema,
+      name: 'representing',
+      active: ActiveRepresenting,
+      apis: RepresentApis,
+      extra: {
+        setValueFrom: function (component, source) {
+          var value = Representing.getValue(source);
+          Representing.setValue(component, value);
+        }
+      },
+      state: RepresentState
+    });
+
+    var field$1 = function (name, forbidden) {
+      return defaultedObjOf(name, {}, map(forbidden, function (f) {
+        return forbid(f.name(), 'Cannot configure ' + f.name() + ' for ' + name);
+      }).concat([state$1('dump', identity)]));
+    };
+    var get$c = function (data) {
+      return data.dump;
+    };
+    var augment = function (data, original) {
+      return __assign(__assign({}, data.dump), derive$1(original));
+    };
+    var SketchBehaviours = {
+      field: field$1,
+      augment: augment,
+      get: get$c
+    };
+
+    var _placeholder = 'placeholder';
+    var adt$9 = Adt.generate([
+      {
+        single: [
+          'required',
+          'valueThunk'
+        ]
+      },
+      {
+        multiple: [
+          'required',
+          'valueThunks'
+        ]
+      }
+    ]);
+    var isSubstituted = function (spec) {
+      return has(spec, 'uiType');
+    };
+    var subPlaceholder = function (owner, detail, compSpec, placeholders) {
+      if (owner.exists(function (o) {
+          return o !== compSpec.owner;
+        })) {
+        return adt$9.single(true, constant(compSpec));
+      }
+      return get(placeholders, compSpec.name).fold(function () {
+        throw new Error('Unknown placeholder component: ' + compSpec.name + '\nKnown: [' + keys(placeholders) + ']\nNamespace: ' + owner.getOr('none') + '\nSpec: ' + JSON.stringify(compSpec, null, 2));
+      }, function (newSpec) {
+        return newSpec.replace();
+      });
+    };
+    var scan = function (owner, detail, compSpec, placeholders) {
+      if (isSubstituted(compSpec) && compSpec.uiType === _placeholder) {
+        return subPlaceholder(owner, detail, compSpec, placeholders);
+      } else {
+        return adt$9.single(false, constant(compSpec));
+      }
+    };
+    var substitute = function (owner, detail, compSpec, placeholders) {
+      var base = scan(owner, detail, compSpec, placeholders);
+      return base.fold(function (req, valueThunk) {
+        var value = isSubstituted(compSpec) ? valueThunk(detail, compSpec.config, compSpec.validated) : valueThunk(detail);
+        var childSpecs = get(value, 'components').getOr([]);
+        var substituted = bind(childSpecs, function (c) {
+          return substitute(owner, detail, c, placeholders);
+        });
+        return [__assign(__assign({}, value), { components: substituted })];
+      }, function (req, valuesThunk) {
+        if (isSubstituted(compSpec)) {
+          var values = valuesThunk(detail, compSpec.config, compSpec.validated);
+          var preprocessor = compSpec.validated.preprocess.getOr(identity);
+          return preprocessor(values);
+        } else {
+          return valuesThunk(detail);
+        }
+      });
+    };
+    var substituteAll = function (owner, detail, components, placeholders) {
+      return bind(components, function (c) {
+        return substitute(owner, detail, c, placeholders);
+      });
+    };
+    var oneReplace = function (label, replacements) {
+      var called = false;
+      var used = function () {
+        return called;
+      };
+      var replace = function () {
+        if (called) {
+          throw new Error('Trying to use the same placeholder more than once: ' + label);
+        }
+        called = true;
+        return replacements;
+      };
+      var required = function () {
+        return replacements.fold(function (req, _) {
+          return req;
+        }, function (req, _) {
+          return req;
+        });
+      };
+      return {
+        name: constant(label),
+        required: required,
+        used: used,
+        replace: replace
+      };
+    };
+    var substitutePlaces = function (owner, detail, components, placeholders) {
+      var ps = map$1(placeholders, function (ph, name) {
+        return oneReplace(name, ph);
+      });
+      var outcome = substituteAll(owner, detail, components, ps);
+      each$1(ps, function (p) {
+        if (p.used() === false && p.required()) {
+          throw new Error('Placeholder: ' + p.name() + ' was not found in components list\nNamespace: ' + owner.getOr('none') + '\nComponents: ' + JSON.stringify(detail.components, null, 2));
+        }
+      });
+      return outcome;
+    };
+    var single = adt$9.single;
+    var multiple = adt$9.multiple;
+    var placeholder = constant(_placeholder);
+
+    var adt$a = Adt.generate([
+      { required: ['data'] },
+      { external: ['data'] },
+      { optional: ['data'] },
+      { group: ['data'] }
+    ]);
+    var fFactory = defaulted$1('factory', { sketch: identity });
+    var fSchema = defaulted$1('schema', []);
+    var fName = strict$1('name');
+    var fPname = field('pname', 'pname', defaultedThunk(function (typeSpec) {
+      return '<alloy.' + generate$1(typeSpec.name) + '>';
+    }), anyValue$1());
+    var fGroupSchema = state$1('schema', function () {
+      return [option('preprocess')];
+    });
+    var fDefaults = defaulted$1('defaults', constant({}));
+    var fOverrides = defaulted$1('overrides', constant({}));
+    var requiredSpec = objOf([
+      fFactory,
+      fSchema,
+      fName,
+      fPname,
+      fDefaults,
+      fOverrides
+    ]);
+    var externalSpec = objOf([
+      fFactory,
+      fSchema,
+      fName,
+      fDefaults,
+      fOverrides
+    ]);
+    var optionalSpec = objOf([
+      fFactory,
+      fSchema,
+      fName,
+      fPname,
+      fDefaults,
+      fOverrides
+    ]);
+    var groupSpec = objOf([
+      fFactory,
+      fGroupSchema,
+      fName,
+      strict$1('unit'),
+      fPname,
+      fDefaults,
+      fOverrides
+    ]);
+    var asNamedPart = function (part) {
+      return part.fold(Option.some, Option.none, Option.some, Option.some);
+    };
+    var name$1 = function (part) {
+      var get = function (data) {
+        return data.name;
+      };
+      return part.fold(get, get, get, get);
+    };
+    var asCommon = function (part) {
+      return part.fold(identity, identity, identity, identity);
+    };
+    var convert = function (adtConstructor, partSchema) {
+      return function (spec) {
+        var data = asRawOrDie('Converting part type', partSchema, spec);
+        return adtConstructor(data);
+      };
+    };
+    var required = convert(adt$a.required, requiredSpec);
+    var external$1 = convert(adt$a.external, externalSpec);
+    var optional = convert(adt$a.optional, optionalSpec);
+    var group = convert(adt$a.group, groupSpec);
+    var original = constant('entirety');
+
+    var PartType = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        required: required,
+        external: external$1,
+        optional: optional,
+        group: group,
+        asNamedPart: asNamedPart,
+        name: name$1,
+        asCommon: asCommon,
+        original: original
+    });
+
+    var combine$2 = function (detail, data, partSpec, partValidated) {
+      return deepMerge(data.defaults(detail, partSpec, partValidated), partSpec, { uid: detail.partUids[data.name] }, data.overrides(detail, partSpec, partValidated));
+    };
+    var subs = function (owner, detail, parts) {
+      var internals = {};
+      var externals = {};
+      each(parts, function (part) {
+        part.fold(function (data) {
+          internals[data.pname] = single(true, function (detail, partSpec, partValidated) {
+            return data.factory.sketch(combine$2(detail, data, partSpec, partValidated));
+          });
+        }, function (data) {
+          var partSpec = detail.parts[data.name];
+          externals[data.name] = constant(data.factory.sketch(combine$2(detail, data, partSpec[original()]), partSpec));
+        }, function (data) {
+          internals[data.pname] = single(false, function (detail, partSpec, partValidated) {
+            return data.factory.sketch(combine$2(detail, data, partSpec, partValidated));
+          });
+        }, function (data) {
+          internals[data.pname] = multiple(true, function (detail, _partSpec, _partValidated) {
+            var units = detail[data.name];
+            return map(units, function (u) {
+              return data.factory.sketch(deepMerge(data.defaults(detail, u, _partValidated), u, data.overrides(detail, u)));
+            });
+          });
+        });
+      });
+      return {
+        internals: constant(internals),
+        externals: constant(externals)
+      };
+    };
+
+    var generate$4 = function (owner, parts) {
+      var r = {};
+      each(parts, function (part) {
+        asNamedPart(part).each(function (np) {
+          var g = doGenerateOne(owner, np.pname);
+          r[np.name] = function (config) {
+            var validated = asRawOrDie('Part: ' + np.name + ' in ' + owner, objOf(np.schema), config);
+            return __assign(__assign({}, g), {
+              config: config,
+              validated: validated
+            });
+          };
+        });
+      });
+      return r;
+    };
+    var doGenerateOne = function (owner, pname) {
+      return {
+        uiType: placeholder(),
+        owner: owner,
+        name: pname
+      };
+    };
+    var generateOne = function (owner, pname, config) {
+      return {
+        uiType: placeholder(),
+        owner: owner,
+        name: pname,
+        config: config,
+        validated: {}
+      };
+    };
+    var schemas = function (parts) {
+      return bind(parts, function (part) {
+        return part.fold(Option.none, Option.some, Option.none, Option.none).map(function (data) {
+          return strictObjOf(data.name, data.schema.concat([snapshot(original())]));
+        }).toArray();
+      });
+    };
+    var names = function (parts) {
+      return map(parts, name$1);
+    };
+    var substitutes = function (owner, detail, parts) {
+      return subs(owner, detail, parts);
+    };
+    var components = function (owner, detail, internals) {
+      return substitutePlaces(Option.some(owner), detail, detail.components, internals);
+    };
+    var getPart = function (component, detail, partKey) {
+      var uid = detail.partUids[partKey];
+      return component.getSystem().getByUid(uid).toOption();
+    };
+    var getPartOrDie = function (component, detail, partKey) {
+      return getPart(component, detail, partKey).getOrDie('Could not find part: ' + partKey);
+    };
+    var getParts = function (component, detail, partKeys) {
+      var r = {};
+      var uids = detail.partUids;
+      var system = component.getSystem();
+      each(partKeys, function (pk) {
+        r[pk] = constant(system.getByUid(uids[pk]));
+      });
+      return r;
+    };
+    var getAllParts = function (component, detail) {
+      var system = component.getSystem();
+      return map$1(detail.partUids, function (pUid, _k) {
+        return constant(system.getByUid(pUid));
+      });
+    };
+    var getAllPartNames = function (detail) {
+      return keys(detail.partUids);
+    };
+    var getPartsOrDie = function (component, detail, partKeys) {
+      var r = {};
+      var uids = detail.partUids;
+      var system = component.getSystem();
+      each(partKeys, function (pk) {
+        r[pk] = constant(system.getByUid(uids[pk]).getOrDie());
+      });
+      return r;
+    };
+    var defaultUids = function (baseUid, partTypes) {
+      var partNames = names(partTypes);
+      return wrapAll$1(map(partNames, function (pn) {
+        return {
+          key: pn,
+          value: baseUid + '-' + pn
+        };
+      }));
+    };
+    var defaultUidsSchema = function (partTypes) {
+      return field('partUids', 'partUids', mergeWithThunk(function (spec) {
+        return defaultUids(spec.uid, partTypes);
+      }), anyValue$1());
+    };
+
+    var AlloyParts = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        generate: generate$4,
+        generateOne: generateOne,
+        schemas: schemas,
+        names: names,
+        substitutes: substitutes,
+        components: components,
+        defaultUids: defaultUids,
+        defaultUidsSchema: defaultUidsSchema,
+        getAllParts: getAllParts,
+        getAllPartNames: getAllPartNames,
+        getPart: getPart,
+        getPartOrDie: getPartOrDie,
+        getParts: getParts,
+        getPartsOrDie: getPartsOrDie
+    });
+
+    var base = function (partSchemas, partUidsSchemas) {
+      var ps = partSchemas.length > 0 ? [strictObjOf('parts', partSchemas)] : [];
+      return ps.concat([
+        strict$1('uid'),
+        defaulted$1('dom', {}),
+        defaulted$1('components', []),
+        snapshot('originalSpec'),
+        defaulted$1('debug.sketcher', {})
+      ]).concat(partUidsSchemas);
+    };
+    var asRawOrDie$1 = function (label, schema, spec, partSchemas, partUidsSchemas) {
+      var baseS = base(partSchemas, partUidsSchemas);
+      return asRawOrDie(label + ' [SpecSchema]', objOfOnly(baseS.concat(schema)), spec);
+    };
+
+    var single$1 = function (owner, schema, factory, spec) {
+      var specWithUid = supplyUid(spec);
+      var detail = asRawOrDie$1(owner, schema, specWithUid, [], []);
+      return factory(detail, specWithUid);
+    };
+    var composite = function (owner, schema, partTypes, factory, spec) {
+      var specWithUid = supplyUid(spec);
+      var partSchemas = schemas(partTypes);
+      var partUidsSchema = defaultUidsSchema(partTypes);
+      var detail = asRawOrDie$1(owner, schema, specWithUid, partSchemas, [partUidsSchema]);
+      var subs = substitutes(owner, detail, partTypes);
+      var components$1 = components(owner, detail, subs.internals());
+      return factory(detail, components$1, specWithUid, subs.externals());
+    };
+    var hasUid = function (spec) {
+      return has(spec, 'uid');
+    };
+    var supplyUid = function (spec) {
+      return hasUid(spec) ? spec : __assign(__assign({}, spec), { uid: generate$2('uid') });
+    };
+
+    function isSketchSpec(spec) {
+      return spec.uid !== undefined;
+    }
+    var singleSchema = objOfOnly([
+      strict$1('name'),
+      strict$1('factory'),
+      strict$1('configFields'),
+      defaulted$1('apis', {}),
+      defaulted$1('extraApis', {})
+    ]);
+    var compositeSchema = objOfOnly([
+      strict$1('name'),
+      strict$1('factory'),
+      strict$1('configFields'),
+      strict$1('partFields'),
+      defaulted$1('apis', {}),
+      defaulted$1('extraApis', {})
+    ]);
+    var single$2 = function (rawConfig) {
+      var config = asRawOrDie('Sketcher for ' + rawConfig.name, singleSchema, rawConfig);
+      var sketch = function (spec) {
+        return single$1(config.name, config.configFields, config.factory, spec);
+      };
+      var apis = map$1(config.apis, makeApi);
+      var extraApis = map$1(config.extraApis, function (f, k) {
+        return markAsExtraApi(f, k);
+      });
+      return __assign(__assign({
+        name: constant(config.name),
+        configFields: constant(config.configFields),
+        sketch: sketch
+      }, apis), extraApis);
+    };
+    var composite$1 = function (rawConfig) {
+      var config = asRawOrDie('Sketcher for ' + rawConfig.name, compositeSchema, rawConfig);
+      var sketch = function (spec) {
+        return composite(config.name, config.configFields, config.partFields, config.factory, spec);
+      };
+      var parts = generate$4(config.name, config.partFields);
+      var apis = map$1(config.apis, makeApi);
+      var extraApis = map$1(config.extraApis, function (f, k) {
+        return markAsExtraApi(f, k);
+      });
+      return __assign(__assign({
+        name: constant(config.name),
+        partFields: constant(config.partFields),
+        configFields: constant(config.configFields),
+        sketch: sketch,
+        parts: constant(parts)
+      }, apis), extraApis);
+    };
+
+    var cat = function (arr) {
+      var r = [];
+      var push = function (x) {
+        r.push(x);
+      };
+      for (var i = 0; i < arr.length; i++) {
+        arr[i].each(push);
+      }
+      return r;
+    };
+    var sequence = function (arr) {
+      var r = [];
+      for (var i = 0; i < arr.length; i++) {
+        var x = arr[i];
+        if (x.isSome()) {
+          r.push(x.getOrDie());
+        } else {
+          return Option.none();
+        }
+      }
+      return Option.some(r);
+    };
+    var lift2 = function (oa, ob, f) {
+      return oa.isSome() && ob.isSome() ? Option.some(f(oa.getOrDie(), ob.getOrDie())) : Option.none();
+    };
+    var lift3 = function (oa, ob, oc, f) {
+      return oa.isSome() && ob.isSome() && oc.isSome() ? Option.some(f(oa.getOrDie(), ob.getOrDie(), oc.getOrDie())) : Option.none();
+    };
+
+    var inside = function (target) {
+      return name(target) === 'input' && get$2(target, 'type') !== 'radio' || name(target) === 'textarea';
+    };
+
+    var getCurrent = function (component, composeConfig, _composeState) {
+      return composeConfig.find(component);
+    };
+
+    var ComposeApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        getCurrent: getCurrent
+    });
+
+    var ComposeSchema = [strict$1('find')];
+
+    var Composing = create$1({
+      fields: ComposeSchema,
+      name: 'composing',
+      apis: ComposeApis
+    });
+
+    var dehighlightAllExcept = function (component, hConfig, hState, skip) {
+      var highlighted = descendants(component.element(), '.' + hConfig.highlightClass);
+      each(highlighted, function (h) {
+        if (!exists(skip, function (skipComp) {
+            return skipComp.element() === h;
+          })) {
+          remove$4(h, hConfig.highlightClass);
+          component.getSystem().getByDom(h).each(function (target) {
+            hConfig.onDehighlight(component, target);
+            emit(target, dehighlight());
+          });
+        }
+      });
+    };
+    var dehighlightAll = function (component, hConfig, hState) {
+      return dehighlightAllExcept(component, hConfig, hState, []);
+    };
+    var dehighlight$1 = function (component, hConfig, hState, target) {
+      if (isHighlighted(component, hConfig, hState, target)) {
+        remove$4(target.element(), hConfig.highlightClass);
+        hConfig.onDehighlight(component, target);
+        emit(target, dehighlight());
+      }
+    };
+    var highlight$1 = function (component, hConfig, hState, target) {
+      dehighlightAllExcept(component, hConfig, hState, [target]);
+      if (!isHighlighted(component, hConfig, hState, target)) {
+        add$2(target.element(), hConfig.highlightClass);
+        hConfig.onHighlight(component, target);
+        emit(target, highlight());
+      }
+    };
+    var highlightFirst = function (component, hConfig, hState) {
+      getFirst(component, hConfig).each(function (firstComp) {
+        highlight$1(component, hConfig, hState, firstComp);
+      });
+    };
+    var highlightLast = function (component, hConfig, hState) {
+      getLast(component, hConfig).each(function (lastComp) {
+        highlight$1(component, hConfig, hState, lastComp);
+      });
+    };
+    var highlightAt = function (component, hConfig, hState, index) {
+      getByIndex(component, hConfig, hState, index).fold(function (err) {
+        throw new Error(err);
+      }, function (firstComp) {
+        highlight$1(component, hConfig, hState, firstComp);
+      });
+    };
+    var highlightBy = function (component, hConfig, hState, predicate) {
+      var candidates = getCandidates(component, hConfig);
+      var targetComp = find(candidates, predicate);
+      targetComp.each(function (c) {
+        highlight$1(component, hConfig, hState, c);
+      });
+    };
+    var isHighlighted = function (component, hConfig, hState, queryTarget) {
+      return has$2(queryTarget.element(), hConfig.highlightClass);
+    };
+    var getHighlighted = function (component, hConfig, _hState) {
+      return descendant$1(component.element(), '.' + hConfig.highlightClass).bind(function (e) {
+        return component.getSystem().getByDom(e).toOption();
+      });
+    };
+    var getByIndex = function (component, hConfig, hState, index) {
+      var items = descendants(component.element(), '.' + hConfig.itemClass);
+      return Option.from(items[index]).fold(function () {
+        return Result.error('No element found with index ' + index);
+      }, component.getSystem().getByDom);
+    };
+    var getFirst = function (component, hConfig, _hState) {
+      return descendant$1(component.element(), '.' + hConfig.itemClass).bind(function (e) {
+        return component.getSystem().getByDom(e).toOption();
+      });
+    };
+    var getLast = function (component, hConfig, _hState) {
+      var items = descendants(component.element(), '.' + hConfig.itemClass);
+      var last = items.length > 0 ? Option.some(items[items.length - 1]) : Option.none();
+      return last.bind(function (c) {
+        return component.getSystem().getByDom(c).toOption();
+      });
+    };
+    var getDelta = function (component, hConfig, hState, delta) {
+      var items = descendants(component.element(), '.' + hConfig.itemClass);
+      var current = findIndex(items, function (item) {
+        return has$2(item, hConfig.highlightClass);
+      });
+      return current.bind(function (selected) {
+        var dest = cycleBy(selected, delta, 0, items.length - 1);
+        return component.getSystem().getByDom(items[dest]).toOption();
+      });
+    };
+    var getPrevious = function (component, hConfig, hState) {
+      return getDelta(component, hConfig, hState, -1);
+    };
+    var getNext = function (component, hConfig, hState) {
+      return getDelta(component, hConfig, hState, +1);
+    };
+    var getCandidates = function (component, hConfig, _hState) {
+      var items = descendants(component.element(), '.' + hConfig.itemClass);
+      return cat(map(items, function (i) {
+        return component.getSystem().getByDom(i).toOption();
+      }));
+    };
+
+    var HighlightApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        dehighlightAll: dehighlightAll,
+        dehighlight: dehighlight$1,
+        highlight: highlight$1,
+        highlightFirst: highlightFirst,
+        highlightLast: highlightLast,
+        highlightAt: highlightAt,
+        highlightBy: highlightBy,
+        isHighlighted: isHighlighted,
+        getHighlighted: getHighlighted,
+        getFirst: getFirst,
+        getLast: getLast,
+        getPrevious: getPrevious,
+        getNext: getNext,
+        getCandidates: getCandidates
+    });
+
+    var HighlightSchema = [
+      strict$1('highlightClass'),
+      strict$1('itemClass'),
+      onHandler('onHighlight'),
+      onHandler('onDehighlight')
+    ];
+
+    var Highlighting = create$1({
+      fields: HighlightSchema,
+      name: 'highlighting',
+      apis: HighlightApis
+    });
+
+    var BACKSPACE = function () {
+      return [8];
+    };
+    var TAB = function () {
+      return [9];
+    };
+    var ENTER = function () {
+      return [13];
+    };
+    var ESCAPE = function () {
+      return [27];
+    };
+    var SPACE = function () {
+      return [32];
+    };
+    var LEFT = function () {
+      return [37];
+    };
+    var UP = function () {
+      return [38];
+    };
+    var RIGHT = function () {
+      return [39];
+    };
+    var DOWN = function () {
+      return [40];
+    };
+
+    var cyclePrev = function (values, index, predicate) {
+      var before = reverse(values.slice(0, index));
+      var after = reverse(values.slice(index + 1));
+      return find(before.concat(after), predicate);
+    };
+    var tryPrev = function (values, index, predicate) {
+      var before = reverse(values.slice(0, index));
+      return find(before, predicate);
+    };
+    var cycleNext = function (values, index, predicate) {
+      var before = values.slice(0, index);
+      var after = values.slice(index + 1);
+      return find(after.concat(before), predicate);
+    };
+    var tryNext = function (values, index, predicate) {
+      var after = values.slice(index + 1);
+      return find(after, predicate);
+    };
+
+    var inSet = function (keys) {
+      return function (event) {
+        var raw = event.raw();
+        return contains(keys, raw.which);
+      };
+    };
+    var and = function (preds) {
+      return function (event) {
+        return forall(preds, function (pred) {
+          return pred(event);
+        });
+      };
+    };
+    var isShift = function (event) {
+      var raw = event.raw();
+      return raw.shiftKey === true;
+    };
+    var isControl = function (event) {
+      var raw = event.raw();
+      return raw.ctrlKey === true;
+    };
+    var isNotShift = not(isShift);
+
+    var rule = function (matches, action) {
+      return {
+        matches: matches,
+        classification: action
+      };
+    };
+    var choose$2 = function (transitions, event) {
+      var transition = find(transitions, function (t) {
+        return t.matches(event);
+      });
+      return transition.map(function (t) {
+        return t.classification;
+      });
+    };
+
+    var reportFocusShifting = function (component, prevFocus, newFocus) {
+      var noChange = prevFocus.exists(function (p) {
+        return newFocus.exists(function (n) {
+          return eq$1(n, p);
+        });
+      });
+      if (!noChange) {
+        emitWith(component, focusShifted(), {
+          prevFocus: prevFocus,
+          newFocus: newFocus
+        });
+      }
+    };
+    var dom = function () {
+      var get = function (component) {
+        return search(component.element());
+      };
+      var set = function (component, focusee) {
+        var prevFocus = get(component);
+        component.getSystem().triggerFocus(focusee, component.element());
+        var newFocus = get(component);
+        reportFocusShifting(component, prevFocus, newFocus);
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+    var highlights = function () {
+      var get = function (component) {
+        return Highlighting.getHighlighted(component).map(function (item) {
+          return item.element();
+        });
+      };
+      var set = function (component, element) {
+        var prevFocus = get(component);
+        component.getSystem().getByDom(element).fold(noop, function (item) {
+          Highlighting.highlight(component, item);
+        });
+        var newFocus = get(component);
+        reportFocusShifting(component, prevFocus, newFocus);
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var FocusInsideModes;
+    (function (FocusInsideModes) {
+      FocusInsideModes['OnFocusMode'] = 'onFocus';
+      FocusInsideModes['OnEnterOrSpaceMode'] = 'onEnterOrSpace';
+      FocusInsideModes['OnApiMode'] = 'onApi';
+    }(FocusInsideModes || (FocusInsideModes = {})));
+
+    var typical = function (infoSchema, stateInit, getKeydownRules, getKeyupRules, optFocusIn) {
+      var schema = function () {
+        return infoSchema.concat([
+          defaulted$1('focusManager', dom()),
+          defaultedOf('focusInside', 'onFocus', valueOf(function (val) {
+            return contains([
+              'onFocus',
+              'onEnterOrSpace',
+              'onApi'
+            ], val) ? Result.value(val) : Result.error('Invalid value for focusInside');
+          })),
+          output('handler', me),
+          output('state', stateInit),
+          output('sendFocusIn', optFocusIn)
+        ]);
+      };
+      var processKey = function (component, simulatedEvent, getRules, keyingConfig, keyingState) {
+        var rules = getRules(component, simulatedEvent, keyingConfig, keyingState);
+        return choose$2(rules, simulatedEvent.event()).bind(function (rule) {
+          return rule(component, simulatedEvent, keyingConfig, keyingState);
+        });
+      };
+      var toEvents = function (keyingConfig, keyingState) {
+        var onFocusHandler = keyingConfig.focusInside !== FocusInsideModes.OnFocusMode ? Option.none() : optFocusIn(keyingConfig).map(function (focusIn) {
+          return run(focus(), function (component, simulatedEvent) {
+            focusIn(component, keyingConfig, keyingState);
+            simulatedEvent.stop();
+          });
+        });
+        var tryGoInsideComponent = function (component, simulatedEvent) {
+          var isEnterOrSpace = inSet(SPACE().concat(ENTER()))(simulatedEvent.event());
+          if (keyingConfig.focusInside === FocusInsideModes.OnEnterOrSpaceMode && isEnterOrSpace && isSource(component, simulatedEvent)) {
+            optFocusIn(keyingConfig).each(function (focusIn) {
+              focusIn(component, keyingConfig, keyingState);
+              simulatedEvent.stop();
+            });
+          }
+        };
+        var keyboardEvents = [
+          run(keydown(), function (component, simulatedEvent) {
+            processKey(component, simulatedEvent, getKeydownRules, keyingConfig, keyingState).fold(function () {
+              tryGoInsideComponent(component, simulatedEvent);
+            }, function (_) {
+              simulatedEvent.stop();
+            });
+          }),
+          run(keyup(), function (component, simulatedEvent) {
+            processKey(component, simulatedEvent, getKeyupRules, keyingConfig, keyingState).each(function (_) {
+              simulatedEvent.stop();
+            });
+          })
+        ];
+        return derive(onFocusHandler.toArray().concat(keyboardEvents));
+      };
+      var me = {
+        schema: schema,
+        processKey: processKey,
+        toEvents: toEvents
+      };
+      return me;
+    };
+
+    var create$3 = function (cyclicField) {
+      var schema = [
+        option('onEscape'),
+        option('onEnter'),
+        defaulted$1('selector', '[data-alloy-tabstop="true"]:not(:disabled)'),
+        defaulted$1('firstTabstop', 0),
+        defaulted$1('useTabstopAt', constant(true)),
+        option('visibilitySelector')
+      ].concat([cyclicField]);
+      var isVisible = function (tabbingConfig, element) {
+        var target = tabbingConfig.visibilitySelector.bind(function (sel) {
+          return closest$3(element, sel);
+        }).getOr(element);
+        return get$6(target) > 0;
+      };
+      var findInitial = function (component, tabbingConfig) {
+        var tabstops = descendants(component.element(), tabbingConfig.selector);
+        var visibles = filter(tabstops, function (elem) {
+          return isVisible(tabbingConfig, elem);
+        });
+        return Option.from(visibles[tabbingConfig.firstTabstop]);
+      };
+      var findCurrent = function (component, tabbingConfig) {
+        return tabbingConfig.focusManager.get(component).bind(function (elem) {
+          return closest$3(elem, tabbingConfig.selector);
+        });
+      };
+      var isTabstop = function (tabbingConfig, element) {
+        return isVisible(tabbingConfig, element) && tabbingConfig.useTabstopAt(element);
+      };
+      var focusIn = function (component, tabbingConfig, _tabbingState) {
+        findInitial(component, tabbingConfig).each(function (target) {
+          tabbingConfig.focusManager.set(component, target);
+        });
+      };
+      var goFromTabstop = function (component, tabstops, stopIndex, tabbingConfig, cycle) {
+        return cycle(tabstops, stopIndex, function (elem) {
+          return isTabstop(tabbingConfig, elem);
+        }).fold(function () {
+          return tabbingConfig.cyclic ? Option.some(true) : Option.none();
+        }, function (target) {
+          tabbingConfig.focusManager.set(component, target);
+          return Option.some(true);
+        });
+      };
+      var go = function (component, _simulatedEvent, tabbingConfig, cycle) {
+        var tabstops = descendants(component.element(), tabbingConfig.selector);
+        return findCurrent(component, tabbingConfig).bind(function (tabstop) {
+          var optStopIndex = findIndex(tabstops, curry(eq$1, tabstop));
+          return optStopIndex.bind(function (stopIndex) {
+            return goFromTabstop(component, tabstops, stopIndex, tabbingConfig, cycle);
+          });
+        });
+      };
+      var goBackwards = function (component, simulatedEvent, tabbingConfig) {
+        var navigate = tabbingConfig.cyclic ? cyclePrev : tryPrev;
+        return go(component, simulatedEvent, tabbingConfig, navigate);
+      };
+      var goForwards = function (component, simulatedEvent, tabbingConfig) {
+        var navigate = tabbingConfig.cyclic ? cycleNext : tryNext;
+        return go(component, simulatedEvent, tabbingConfig, navigate);
+      };
+      var execute = function (component, simulatedEvent, tabbingConfig) {
+        return tabbingConfig.onEnter.bind(function (f) {
+          return f(component, simulatedEvent);
+        });
+      };
+      var exit = function (component, simulatedEvent, tabbingConfig) {
+        return tabbingConfig.onEscape.bind(function (f) {
+          return f(component, simulatedEvent);
+        });
+      };
+      var getKeydownRules = constant([
+        rule(and([
+          isShift,
+          inSet(TAB())
+        ]), goBackwards),
+        rule(inSet(TAB()), goForwards),
+        rule(inSet(ESCAPE()), exit),
+        rule(and([
+          isNotShift,
+          inSet(ENTER())
+        ]), execute)
+      ]);
+      var getKeyupRules = constant([]);
+      return typical(schema, NoState.init, getKeydownRules, getKeyupRules, function () {
+        return Option.some(focusIn);
+      });
+    };
+
+    var AcyclicType = create$3(state$1('cyclic', constant(false)));
+
+    var CyclicType = create$3(state$1('cyclic', constant(true)));
+
+    var doDefaultExecute = function (component, _simulatedEvent, focused) {
+      dispatch(component, focused, execute());
+      return Option.some(true);
+    };
+    var defaultExecute = function (component, simulatedEvent, focused) {
+      var isComplex = inside(focused) && inSet(SPACE())(simulatedEvent.event());
+      return isComplex ? Option.none() : doDefaultExecute(component, simulatedEvent, focused);
+    };
+    var stopEventForFirefox = function (_component, _simulatedEvent) {
+      return Option.some(true);
+    };
+
+    var schema$4 = [
+      defaulted$1('execute', defaultExecute),
+      defaulted$1('useSpace', false),
+      defaulted$1('useEnter', true),
+      defaulted$1('useControlEnter', false),
+      defaulted$1('useDown', false)
+    ];
+    var execute$1 = function (component, simulatedEvent, executeConfig) {
+      return executeConfig.execute(component, simulatedEvent, component.element());
+    };
+    var getKeydownRules = function (component, _simulatedEvent, executeConfig, _executeState) {
+      var spaceExec = executeConfig.useSpace && !inside(component.element()) ? SPACE() : [];
+      var enterExec = executeConfig.useEnter ? ENTER() : [];
+      var downExec = executeConfig.useDown ? DOWN() : [];
+      var execKeys = spaceExec.concat(enterExec).concat(downExec);
+      return [rule(inSet(execKeys), execute$1)].concat(executeConfig.useControlEnter ? [rule(and([
+          isControl,
+          inSet(ENTER())
+        ]), execute$1)] : []);
+    };
+    var getKeyupRules = function (component, _simulatedEvent, executeConfig, _executeState) {
+      return executeConfig.useSpace && !inside(component.element()) ? [rule(inSet(SPACE()), stopEventForFirefox)] : [];
+    };
+    var ExecutionType = typical(schema$4, NoState.init, getKeydownRules, getKeyupRules, function () {
+      return Option.none();
+    });
+
+    var flatgrid = function () {
+      var dimensions = Cell(Option.none());
+      var setGridSize = function (numRows, numColumns) {
+        dimensions.set(Option.some({
+          numRows: numRows,
+          numColumns: numColumns
+        }));
+      };
+      var getNumRows = function () {
+        return dimensions.get().map(function (d) {
+          return d.numRows;
+        });
+      };
+      var getNumColumns = function () {
+        return dimensions.get().map(function (d) {
+          return d.numColumns;
+        });
+      };
+      return nu$5({
+        readState: function () {
+          return dimensions.get().map(function (d) {
+            return {
+              numRows: String(d.numRows),
+              numColumns: String(d.numColumns)
+            };
+          }).getOr({
+            numRows: '?',
+            numColumns: '?'
+          });
+        },
+        setGridSize: setGridSize,
+        getNumRows: getNumRows,
+        getNumColumns: getNumColumns
+      });
+    };
+    var init$2 = function (spec) {
+      return spec.state(spec);
+    };
+
+    var KeyingState = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        flatgrid: flatgrid,
+        init: init$2
+    });
+
+    var useH = function (movement) {
+      return function (component, simulatedEvent, config, state) {
+        var move = movement(component.element());
+        return use(move, component, simulatedEvent, config, state);
+      };
+    };
+    var west$2 = function (moveLeft, moveRight) {
+      var movement = onDirection(moveLeft, moveRight);
+      return useH(movement);
+    };
+    var east$2 = function (moveLeft, moveRight) {
+      var movement = onDirection(moveRight, moveLeft);
+      return useH(movement);
+    };
+    var useV = function (move) {
+      return function (component, simulatedEvent, config, state) {
+        return use(move, component, simulatedEvent, config, state);
+      };
+    };
+    var use = function (move, component, simulatedEvent, config, state) {
+      var outcome = config.focusManager.get(component).bind(function (focused) {
+        return move(component.element(), focused, config, state);
+      });
+      return outcome.map(function (newFocus) {
+        config.focusManager.set(component, newFocus);
+        return true;
+      });
+    };
+    var north$2 = useV;
+    var south$2 = useV;
+    var move = useV;
+
+    var isHidden = function (dom) {
+      return dom.offsetWidth <= 0 && dom.offsetHeight <= 0;
+    };
+    var isVisible = function (element) {
+      return !isHidden(element.dom());
+    };
+
+    var locate = function (candidates, predicate) {
+      return findIndex(candidates, predicate).map(function (index) {
+        return {
+          index: constant(index),
+          candidates: constant(candidates)
+        };
+      });
+    };
+
+    var locateVisible = function (container, current, selector) {
+      var predicate = function (x) {
+        return eq$1(x, current);
+      };
+      var candidates = descendants(container, selector);
+      var visible = filter(candidates, isVisible);
+      return locate(visible, predicate);
+    };
+    var findIndex$1 = function (elements, target) {
+      return findIndex(elements, function (elem) {
+        return eq$1(target, elem);
+      });
+    };
+
+    var withGrid = function (values, index, numCols, f) {
+      var oldRow = Math.floor(index / numCols);
+      var oldColumn = index % numCols;
+      return f(oldRow, oldColumn).bind(function (address) {
+        var newIndex = address.row() * numCols + address.column();
+        return newIndex >= 0 && newIndex < values.length ? Option.some(values[newIndex]) : Option.none();
+      });
+    };
+    var cycleHorizontal = function (values, index, numRows, numCols, delta) {
+      return withGrid(values, index, numCols, function (oldRow, oldColumn) {
+        var onLastRow = oldRow === numRows - 1;
+        var colsInRow = onLastRow ? values.length - oldRow * numCols : numCols;
+        var newColumn = cycleBy(oldColumn, delta, 0, colsInRow - 1);
+        return Option.some({
+          row: constant(oldRow),
+          column: constant(newColumn)
+        });
+      });
+    };
+    var cycleVertical = function (values, index, numRows, numCols, delta) {
+      return withGrid(values, index, numCols, function (oldRow, oldColumn) {
+        var newRow = cycleBy(oldRow, delta, 0, numRows - 1);
+        var onLastRow = newRow === numRows - 1;
+        var colsInRow = onLastRow ? values.length - newRow * numCols : numCols;
+        var newCol = clamp(oldColumn, 0, colsInRow - 1);
+        return Option.some({
+          row: constant(newRow),
+          column: constant(newCol)
+        });
+      });
+    };
+    var cycleRight = function (values, index, numRows, numCols) {
+      return cycleHorizontal(values, index, numRows, numCols, +1);
+    };
+    var cycleLeft = function (values, index, numRows, numCols) {
+      return cycleHorizontal(values, index, numRows, numCols, -1);
+    };
+    var cycleUp = function (values, index, numRows, numCols) {
+      return cycleVertical(values, index, numRows, numCols, -1);
+    };
+    var cycleDown = function (values, index, numRows, numCols) {
+      return cycleVertical(values, index, numRows, numCols, +1);
+    };
+
+    var schema$5 = [
+      strict$1('selector'),
+      defaulted$1('execute', defaultExecute),
+      onKeyboardHandler('onEscape'),
+      defaulted$1('captureTab', false),
+      initSize()
+    ];
+    var focusIn = function (component, gridConfig, _gridState) {
+      descendant$1(component.element(), gridConfig.selector).each(function (first) {
+        gridConfig.focusManager.set(component, first);
+      });
+    };
+    var findCurrent = function (component, gridConfig) {
+      return gridConfig.focusManager.get(component).bind(function (elem) {
+        return closest$3(elem, gridConfig.selector);
+      });
+    };
+    var execute$2 = function (component, simulatedEvent, gridConfig, _gridState) {
+      return findCurrent(component, gridConfig).bind(function (focused) {
+        return gridConfig.execute(component, simulatedEvent, focused);
+      });
+    };
+    var doMove = function (cycle) {
+      return function (element, focused, gridConfig, gridState) {
+        return locateVisible(element, focused, gridConfig.selector).bind(function (identified) {
+          return cycle(identified.candidates(), identified.index(), gridState.getNumRows().getOr(gridConfig.initSize.numRows), gridState.getNumColumns().getOr(gridConfig.initSize.numColumns));
+        });
+      };
+    };
+    var handleTab = function (_component, _simulatedEvent, gridConfig) {
+      return gridConfig.captureTab ? Option.some(true) : Option.none();
+    };
+    var doEscape = function (component, simulatedEvent, gridConfig) {
+      return gridConfig.onEscape(component, simulatedEvent);
+    };
+    var moveLeft = doMove(cycleLeft);
+    var moveRight = doMove(cycleRight);
+    var moveNorth = doMove(cycleUp);
+    var moveSouth = doMove(cycleDown);
+    var getKeydownRules$1 = constant([
+      rule(inSet(LEFT()), west$2(moveLeft, moveRight)),
+      rule(inSet(RIGHT()), east$2(moveLeft, moveRight)),
+      rule(inSet(UP()), north$2(moveNorth)),
+      rule(inSet(DOWN()), south$2(moveSouth)),
+      rule(and([
+        isShift,
+        inSet(TAB())
+      ]), handleTab),
+      rule(and([
+        isNotShift,
+        inSet(TAB())
+      ]), handleTab),
+      rule(inSet(ESCAPE()), doEscape),
+      rule(inSet(SPACE().concat(ENTER())), execute$2)
+    ]);
+    var getKeyupRules$1 = constant([rule(inSet(SPACE()), stopEventForFirefox)]);
+    var FlatgridType = typical(schema$5, flatgrid, getKeydownRules$1, getKeyupRules$1, function () {
+      return Option.some(focusIn);
+    });
+
+    var horizontal = function (container, selector, current, delta) {
+      var isDisabledButton = function (candidate) {
+        return name(candidate) === 'button' && get$2(candidate, 'disabled') === 'disabled';
+      };
+      var tryCycle = function (initial, index, candidates) {
+        var newIndex = cycleBy(index, delta, 0, candidates.length - 1);
+        if (newIndex === initial) {
+          return Option.none();
+        } else {
+          return isDisabledButton(candidates[newIndex]) ? tryCycle(initial, newIndex, candidates) : Option.from(candidates[newIndex]);
+        }
+      };
+      return locateVisible(container, current, selector).bind(function (identified) {
+        var index = identified.index();
+        var candidates = identified.candidates();
+        return tryCycle(index, index, candidates);
+      });
+    };
+
+    var schema$6 = [
+      strict$1('selector'),
+      defaulted$1('getInitial', Option.none),
+      defaulted$1('execute', defaultExecute),
+      onKeyboardHandler('onEscape'),
+      defaulted$1('executeOnMove', false),
+      defaulted$1('allowVertical', true)
+    ];
+    var findCurrent$1 = function (component, flowConfig) {
+      return flowConfig.focusManager.get(component).bind(function (elem) {
+        return closest$3(elem, flowConfig.selector);
+      });
+    };
+    var execute$3 = function (component, simulatedEvent, flowConfig) {
+      return findCurrent$1(component, flowConfig).bind(function (focused) {
+        return flowConfig.execute(component, simulatedEvent, focused);
+      });
+    };
+    var focusIn$1 = function (component, flowConfig, _state) {
+      flowConfig.getInitial(component).orThunk(function () {
+        return descendant$1(component.element(), flowConfig.selector);
+      }).each(function (first) {
+        flowConfig.focusManager.set(component, first);
+      });
+    };
+    var moveLeft$1 = function (element, focused, info) {
+      return horizontal(element, info.selector, focused, -1);
+    };
+    var moveRight$1 = function (element, focused, info) {
+      return horizontal(element, info.selector, focused, +1);
+    };
+    var doMove$1 = function (movement) {
+      return function (component, simulatedEvent, flowConfig, flowState) {
+        return movement(component, simulatedEvent, flowConfig, flowState).bind(function () {
+          return flowConfig.executeOnMove ? execute$3(component, simulatedEvent, flowConfig) : Option.some(true);
+        });
+      };
+    };
+    var doEscape$1 = function (component, simulatedEvent, flowConfig) {
+      return flowConfig.onEscape(component, simulatedEvent);
+    };
+    var getKeydownRules$2 = function (_component, _se, flowConfig, _flowState) {
+      var westMovers = LEFT().concat(flowConfig.allowVertical ? UP() : []);
+      var eastMovers = RIGHT().concat(flowConfig.allowVertical ? DOWN() : []);
+      return [
+        rule(inSet(westMovers), doMove$1(west$2(moveLeft$1, moveRight$1))),
+        rule(inSet(eastMovers), doMove$1(east$2(moveLeft$1, moveRight$1))),
+        rule(inSet(ENTER()), execute$3),
+        rule(inSet(SPACE()), execute$3),
+        rule(inSet(ESCAPE()), doEscape$1)
+      ];
+    };
+    var getKeyupRules$2 = constant([rule(inSet(SPACE()), stopEventForFirefox)]);
+    var FlowType = typical(schema$6, NoState.init, getKeydownRules$2, getKeyupRules$2, function () {
+      return Option.some(focusIn$1);
+    });
+
+    var toCell = function (matrix, rowIndex, columnIndex) {
+      return Option.from(matrix[rowIndex]).bind(function (row) {
+        return Option.from(row[columnIndex]).map(function (cell) {
+          return {
+            rowIndex: rowIndex,
+            columnIndex: columnIndex,
+            cell: cell
+          };
+        });
+      });
+    };
+    var cycleHorizontal$1 = function (matrix, rowIndex, startCol, deltaCol) {
+      var row = matrix[rowIndex];
+      var colsInRow = row.length;
+      var newColIndex = cycleBy(startCol, deltaCol, 0, colsInRow - 1);
+      return toCell(matrix, rowIndex, newColIndex);
+    };
+    var cycleVertical$1 = function (matrix, colIndex, startRow, deltaRow) {
+      var nextRowIndex = cycleBy(startRow, deltaRow, 0, matrix.length - 1);
+      var colsInNextRow = matrix[nextRowIndex].length;
+      var nextColIndex = clamp(colIndex, 0, colsInNextRow - 1);
+      return toCell(matrix, nextRowIndex, nextColIndex);
+    };
+    var moveHorizontal = function (matrix, rowIndex, startCol, deltaCol) {
+      var row = matrix[rowIndex];
+      var colsInRow = row.length;
+      var newColIndex = clamp(startCol + deltaCol, 0, colsInRow - 1);
+      return toCell(matrix, rowIndex, newColIndex);
+    };
+    var moveVertical = function (matrix, colIndex, startRow, deltaRow) {
+      var nextRowIndex = clamp(startRow + deltaRow, 0, matrix.length - 1);
+      var colsInNextRow = matrix[nextRowIndex].length;
+      var nextColIndex = clamp(colIndex, 0, colsInNextRow - 1);
+      return toCell(matrix, nextRowIndex, nextColIndex);
+    };
+    var cycleRight$1 = function (matrix, startRow, startCol) {
+      return cycleHorizontal$1(matrix, startRow, startCol, +1);
+    };
+    var cycleLeft$1 = function (matrix, startRow, startCol) {
+      return cycleHorizontal$1(matrix, startRow, startCol, -1);
+    };
+    var cycleUp$1 = function (matrix, startRow, startCol) {
+      return cycleVertical$1(matrix, startCol, startRow, -1);
+    };
+    var cycleDown$1 = function (matrix, startRow, startCol) {
+      return cycleVertical$1(matrix, startCol, startRow, +1);
+    };
+    var moveLeft$2 = function (matrix, startRow, startCol) {
+      return moveHorizontal(matrix, startRow, startCol, -1);
+    };
+    var moveRight$2 = function (matrix, startRow, startCol) {
+      return moveHorizontal(matrix, startRow, startCol, +1);
+    };
+    var moveUp = function (matrix, startRow, startCol) {
+      return moveVertical(matrix, startCol, startRow, -1);
+    };
+    var moveDown = function (matrix, startRow, startCol) {
+      return moveVertical(matrix, startCol, startRow, +1);
+    };
+
+    var schema$7 = [
+      strictObjOf('selectors', [
+        strict$1('row'),
+        strict$1('cell')
+      ]),
+      defaulted$1('cycles', true),
+      defaulted$1('previousSelector', Option.none),
+      defaulted$1('execute', defaultExecute)
+    ];
+    var focusIn$2 = function (component, matrixConfig, _state) {
+      var focused = matrixConfig.previousSelector(component).orThunk(function () {
+        var selectors = matrixConfig.selectors;
+        return descendant$1(component.element(), selectors.cell);
+      });
+      focused.each(function (cell) {
+        matrixConfig.focusManager.set(component, cell);
+      });
+    };
+    var execute$4 = function (component, simulatedEvent, matrixConfig) {
+      return search(component.element()).bind(function (focused) {
+        return matrixConfig.execute(component, simulatedEvent, focused);
+      });
+    };
+    var toMatrix = function (rows, matrixConfig) {
+      return map(rows, function (row) {
+        return descendants(row, matrixConfig.selectors.cell);
+      });
+    };
+    var doMove$2 = function (ifCycle, ifMove) {
+      return function (element, focused, matrixConfig) {
+        var move = matrixConfig.cycles ? ifCycle : ifMove;
+        return closest$3(focused, matrixConfig.selectors.row).bind(function (inRow) {
+          var cellsInRow = descendants(inRow, matrixConfig.selectors.cell);
+          return findIndex$1(cellsInRow, focused).bind(function (colIndex) {
+            var allRows = descendants(element, matrixConfig.selectors.row);
+            return findIndex$1(allRows, inRow).bind(function (rowIndex) {
+              var matrix = toMatrix(allRows, matrixConfig);
+              return move(matrix, rowIndex, colIndex).map(function (next) {
+                return next.cell;
+              });
+            });
+          });
+        });
+      };
+    };
+    var moveLeft$3 = doMove$2(cycleLeft$1, moveLeft$2);
+    var moveRight$3 = doMove$2(cycleRight$1, moveRight$2);
+    var moveNorth$1 = doMove$2(cycleUp$1, moveUp);
+    var moveSouth$1 = doMove$2(cycleDown$1, moveDown);
+    var getKeydownRules$3 = constant([
+      rule(inSet(LEFT()), west$2(moveLeft$3, moveRight$3)),
+      rule(inSet(RIGHT()), east$2(moveLeft$3, moveRight$3)),
+      rule(inSet(UP()), north$2(moveNorth$1)),
+      rule(inSet(DOWN()), south$2(moveSouth$1)),
+      rule(inSet(SPACE().concat(ENTER())), execute$4)
+    ]);
+    var getKeyupRules$3 = constant([rule(inSet(SPACE()), stopEventForFirefox)]);
+    var MatrixType = typical(schema$7, NoState.init, getKeydownRules$3, getKeyupRules$3, function () {
+      return Option.some(focusIn$2);
+    });
+
+    var schema$8 = [
+      strict$1('selector'),
+      defaulted$1('execute', defaultExecute),
+      defaulted$1('moveOnTab', false)
+    ];
+    var execute$5 = function (component, simulatedEvent, menuConfig) {
+      return menuConfig.focusManager.get(component).bind(function (focused) {
+        return menuConfig.execute(component, simulatedEvent, focused);
+      });
+    };
+    var focusIn$3 = function (component, menuConfig, _state) {
+      descendant$1(component.element(), menuConfig.selector).each(function (first) {
+        menuConfig.focusManager.set(component, first);
+      });
+    };
+    var moveUp$1 = function (element, focused, info) {
+      return horizontal(element, info.selector, focused, -1);
+    };
+    var moveDown$1 = function (element, focused, info) {
+      return horizontal(element, info.selector, focused, +1);
+    };
+    var fireShiftTab = function (component, simulatedEvent, menuConfig, menuState) {
+      return menuConfig.moveOnTab ? move(moveUp$1)(component, simulatedEvent, menuConfig, menuState) : Option.none();
+    };
+    var fireTab = function (component, simulatedEvent, menuConfig, menuState) {
+      return menuConfig.moveOnTab ? move(moveDown$1)(component, simulatedEvent, menuConfig, menuState) : Option.none();
+    };
+    var getKeydownRules$4 = constant([
+      rule(inSet(UP()), move(moveUp$1)),
+      rule(inSet(DOWN()), move(moveDown$1)),
+      rule(and([
+        isShift,
+        inSet(TAB())
+      ]), fireShiftTab),
+      rule(and([
+        isNotShift,
+        inSet(TAB())
+      ]), fireTab),
+      rule(inSet(ENTER()), execute$5),
+      rule(inSet(SPACE()), execute$5)
+    ]);
+    var getKeyupRules$4 = constant([rule(inSet(SPACE()), stopEventForFirefox)]);
+    var MenuType = typical(schema$8, NoState.init, getKeydownRules$4, getKeyupRules$4, function () {
+      return Option.some(focusIn$3);
+    });
+
+    var schema$9 = [
+      onKeyboardHandler('onSpace'),
+      onKeyboardHandler('onEnter'),
+      onKeyboardHandler('onShiftEnter'),
+      onKeyboardHandler('onLeft'),
+      onKeyboardHandler('onRight'),
+      onKeyboardHandler('onTab'),
+      onKeyboardHandler('onShiftTab'),
+      onKeyboardHandler('onUp'),
+      onKeyboardHandler('onDown'),
+      onKeyboardHandler('onEscape'),
+      defaulted$1('stopSpaceKeyup', false),
+      option('focusIn')
+    ];
+    var getKeydownRules$5 = function (component, simulatedEvent, specialInfo) {
+      return [
+        rule(inSet(SPACE()), specialInfo.onSpace),
+        rule(and([
+          isNotShift,
+          inSet(ENTER())
+        ]), specialInfo.onEnter),
+        rule(and([
+          isShift,
+          inSet(ENTER())
+        ]), specialInfo.onShiftEnter),
+        rule(and([
+          isShift,
+          inSet(TAB())
+        ]), specialInfo.onShiftTab),
+        rule(and([
+          isNotShift,
+          inSet(TAB())
+        ]), specialInfo.onTab),
+        rule(inSet(UP()), specialInfo.onUp),
+        rule(inSet(DOWN()), specialInfo.onDown),
+        rule(inSet(LEFT()), specialInfo.onLeft),
+        rule(inSet(RIGHT()), specialInfo.onRight),
+        rule(inSet(SPACE()), specialInfo.onSpace),
+        rule(inSet(ESCAPE()), specialInfo.onEscape)
+      ];
+    };
+    var getKeyupRules$5 = function (component, simulatedEvent, specialInfo) {
+      return specialInfo.stopSpaceKeyup ? [rule(inSet(SPACE()), stopEventForFirefox)] : [];
+    };
+    var SpecialType = typical(schema$9, NoState.init, getKeydownRules$5, getKeyupRules$5, function (specialInfo) {
+      return specialInfo.focusIn;
+    });
+
+    var acyclic = AcyclicType.schema();
+    var cyclic = CyclicType.schema();
+    var flow = FlowType.schema();
+    var flatgrid$1 = FlatgridType.schema();
+    var matrix = MatrixType.schema();
+    var execution = ExecutionType.schema();
+    var menu = MenuType.schema();
+    var special = SpecialType.schema();
+
+    var KeyboardBranches = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        acyclic: acyclic,
+        cyclic: cyclic,
+        flow: flow,
+        flatgrid: flatgrid$1,
+        matrix: matrix,
+        execution: execution,
+        menu: menu,
+        special: special
+    });
+
+    var isFlatgridState = function (keyState) {
+      return hasNonNullableKey(keyState, 'setGridSize');
+    };
+    var Keying = createModes$1({
+      branchKey: 'mode',
+      branches: KeyboardBranches,
+      name: 'keying',
+      active: {
+        events: function (keyingConfig, keyingState) {
+          var handler = keyingConfig.handler;
+          return handler.toEvents(keyingConfig, keyingState);
+        }
+      },
+      apis: {
+        focusIn: function (component, keyConfig, keyState) {
+          keyConfig.sendFocusIn(keyConfig).fold(function () {
+            component.getSystem().triggerFocus(component.element(), component.element());
+          }, function (sendFocusIn) {
+            sendFocusIn(component, keyConfig, keyState);
+          });
+        },
+        setGridSize: function (component, keyConfig, keyState, numRows, numColumns) {
+          if (!isFlatgridState(keyState)) {
+            domGlobals.console.error('Layout does not support setGridSize');
+          } else {
+            keyState.setGridSize(numRows, numColumns);
+          }
+        }
+      },
+      state: KeyingState
+    });
+
+    var set$5 = function (component, replaceConfig, replaceState, data) {
+      preserve(function () {
+        var newChildren = map(data, component.getSystem().build);
+        replaceChildren(component, newChildren);
+      }, component.element());
+    };
+    var insert = function (component, replaceConfig, insertion, childSpec) {
+      var child = component.getSystem().build(childSpec);
+      attachWith(component, child, insertion);
+    };
+    var append$2 = function (component, replaceConfig, replaceState, appendee) {
+      insert(component, replaceConfig, append, appendee);
+    };
+    var prepend$1 = function (component, replaceConfig, replaceState, prependee) {
+      insert(component, replaceConfig, prepend, prependee);
+    };
+    var remove$7 = function (component, replaceConfig, replaceState, removee) {
+      var children = contents(component);
+      var foundChild = find(children, function (child) {
+        return eq$1(removee.element(), child.element());
+      });
+      foundChild.each(detach);
+    };
+    var contents = function (component, _replaceConfig) {
+      return component.components();
+    };
+    var replaceAt = function (component, replaceConfig, replaceState, replaceeIndex, replacer) {
+      var children = contents(component);
+      return Option.from(children[replaceeIndex]).map(function (replacee) {
+        remove$7(component, replaceConfig, replaceState, replacee);
+        replacer.each(function (r) {
+          insert(component, replaceConfig, function (p, c) {
+            appendAt(p, c, replaceeIndex);
+          }, r);
+        });
+        return replacee;
+      });
+    };
+    var replaceBy = function (component, replaceConfig, replaceState, replaceePred, replacer) {
+      var children = contents(component);
+      return findIndex(children, replaceePred).bind(function (replaceeIndex) {
+        return replaceAt(component, replaceConfig, replaceState, replaceeIndex, replacer);
+      });
+    };
+
+    var ReplaceApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        append: append$2,
+        prepend: prepend$1,
+        remove: remove$7,
+        replaceAt: replaceAt,
+        replaceBy: replaceBy,
+        set: set$5,
+        contents: contents
+    });
+
+    var Replacing = create$1({
+      fields: [],
+      name: 'replacing',
+      apis: ReplaceApis
+    });
+
+    var events$4 = function (name, eventHandlers) {
+      var events = derive(eventHandlers);
+      return create$1({
+        fields: [strict$1('enabled')],
+        name: name,
+        active: { events: constant(events) }
+      });
+    };
+    var config = function (name, eventHandlers) {
+      var me = events$4(name, eventHandlers);
+      return {
+        key: name,
+        value: {
+          config: {},
+          me: me,
+          configAsRaw: constant({}),
+          initialConfig: {},
+          state: NoState
+        }
+      };
+    };
+
+    var focus$2 = function (component, focusConfig) {
+      if (!focusConfig.ignore) {
+        focus$1(component.element());
+        focusConfig.onFocus(component);
+      }
+    };
+    var blur$1 = function (component, focusConfig) {
+      if (!focusConfig.ignore) {
+        blur(component.element());
+      }
+    };
+    var isFocused = function (component) {
+      return hasFocus(component.element());
+    };
+
+    var FocusApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        focus: focus$2,
+        blur: blur$1,
+        isFocused: isFocused
+    });
+
+    var exhibit$1 = function (base, focusConfig) {
+      var mod = focusConfig.ignore ? {} : { attributes: { tabindex: '-1' } };
+      return nu$6(mod);
+    };
+    var events$5 = function (focusConfig) {
+      return derive([run(focus(), function (component, simulatedEvent) {
+          focus$2(component, focusConfig);
+          simulatedEvent.stop();
+        })].concat(focusConfig.stopMousedown ? [run(mousedown(), function (_, simulatedEvent) {
+          simulatedEvent.event().prevent();
+        })] : []));
+    };
+
+    var ActiveFocus = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        exhibit: exhibit$1,
+        events: events$5
+    });
+
+    var FocusSchema = [
+      onHandler('onFocus'),
+      defaulted$1('stopMousedown', false),
+      defaulted$1('ignore', false)
+    ];
+
+    var Focusing = create$1({
+      fields: FocusSchema,
+      name: 'focusing',
+      active: ActiveFocus,
+      apis: FocusApis
+    });
+
+    var updateAriaState = function (component, toggleConfig, toggleState) {
+      var ariaInfo = toggleConfig.aria;
+      ariaInfo.update(component, ariaInfo, toggleState.get());
+    };
+    var updateClass = function (component, toggleConfig, toggleState) {
+      toggleConfig.toggleClass.each(function (toggleClass) {
+        if (toggleState.get()) {
+          add$2(component.element(), toggleClass);
+        } else {
+          remove$4(component.element(), toggleClass);
+        }
+      });
+    };
+    var toggle = function (component, toggleConfig, toggleState) {
+      set$6(component, toggleConfig, toggleState, !toggleState.get());
+    };
+    var on$1 = function (component, toggleConfig, toggleState) {
+      toggleState.set(true);
+      updateClass(component, toggleConfig, toggleState);
+      updateAriaState(component, toggleConfig, toggleState);
+    };
+    var off = function (component, toggleConfig, toggleState) {
+      toggleState.set(false);
+      updateClass(component, toggleConfig, toggleState);
+      updateAriaState(component, toggleConfig, toggleState);
+    };
+    var set$6 = function (component, toggleConfig, toggleState, state) {
+      var action = state ? on$1 : off;
+      action(component, toggleConfig, toggleState);
+    };
+    var isOn = function (component, toggleConfig, toggleState) {
+      return toggleState.get();
+    };
+    var onLoad$4 = function (component, toggleConfig, toggleState) {
+      set$6(component, toggleConfig, toggleState, toggleConfig.selected);
+    };
+
+    var ToggleApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        onLoad: onLoad$4,
+        toggle: toggle,
+        isOn: isOn,
+        on: on$1,
+        off: off,
+        set: set$6
+    });
+
+    var exhibit$2 = function () {
+      return nu$6({});
+    };
+    var events$6 = function (toggleConfig, toggleState) {
+      var execute = executeEvent(toggleConfig, toggleState, toggle);
+      var load = loadEvent(toggleConfig, toggleState, onLoad$4);
+      return derive(flatten([
+        toggleConfig.toggleOnExecute ? [execute] : [],
+        [load]
+      ]));
+    };
+
+    var ActiveToggle = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        exhibit: exhibit$2,
+        events: events$6
+    });
+
+    var SetupBehaviourCellState = function (initialState) {
+      var init = function () {
+        var cell = Cell(initialState);
+        var get = function () {
+          return cell.get();
+        };
+        var set = function (newState) {
+          return cell.set(newState);
+        };
+        var clear = function () {
+          return cell.set(initialState);
+        };
+        var readState = function () {
+          return cell.get();
+        };
+        return {
+          get: get,
+          set: set,
+          clear: clear,
+          readState: readState
+        };
+      };
+      return { init: init };
+    };
+
+    var updatePressed = function (component, ariaInfo, status) {
+      set$1(component.element(), 'aria-pressed', status);
+      if (ariaInfo.syncWithExpanded) {
+        updateExpanded(component, ariaInfo, status);
+      }
+    };
+    var updateSelected = function (component, ariaInfo, status) {
+      set$1(component.element(), 'aria-selected', status);
+    };
+    var updateChecked = function (component, ariaInfo, status) {
+      set$1(component.element(), 'aria-checked', status);
+    };
+    var updateExpanded = function (component, ariaInfo, status) {
+      set$1(component.element(), 'aria-expanded', status);
+    };
+
+    var ToggleSchema = [
+      defaulted$1('selected', false),
+      option('toggleClass'),
+      defaulted$1('toggleOnExecute', true),
+      defaultedOf('aria', { mode: 'none' }, choose$1('mode', {
+        pressed: [
+          defaulted$1('syncWithExpanded', false),
+          output('update', updatePressed)
+        ],
+        checked: [output('update', updateChecked)],
+        expanded: [output('update', updateExpanded)],
+        selected: [output('update', updateSelected)],
+        none: [output('update', noop)]
+      }))
+    ];
+
+    var Toggling = create$1({
+      fields: ToggleSchema,
+      name: 'toggling',
+      active: ActiveToggle,
+      apis: ToggleApis,
+      state: SetupBehaviourCellState(false)
+    });
+
+    var pointerEvents = function () {
+      var onClick = function (component, simulatedEvent) {
+        simulatedEvent.stop();
+        emitExecute(component);
+      };
+      return [
+        run(click(), onClick),
+        run(tap(), onClick),
+        cutter(touchstart()),
+        cutter(mousedown())
+      ];
+    };
+    var events$7 = function (optAction) {
+      var executeHandler = function (action) {
+        return runOnExecute(function (component, simulatedEvent) {
+          action(component);
+          simulatedEvent.stop();
+        });
+      };
+      return derive(flatten([
+        optAction.map(executeHandler).toArray(),
+        pointerEvents()
+      ]));
+    };
+
+    var hoverEvent = 'alloy.item-hover';
+    var focusEvent = 'alloy.item-focus';
+    var onHover = function (item) {
+      if (search(item.element()).isNone() || Focusing.isFocused(item)) {
+        if (!Focusing.isFocused(item)) {
+          Focusing.focus(item);
+        }
+        emitWith(item, hoverEvent, { item: item });
+      }
+    };
+    var onFocus = function (item) {
+      emitWith(item, focusEvent, { item: item });
+    };
+    var hover = constant(hoverEvent);
+    var focus$3 = constant(focusEvent);
+
+    var builder = function (detail) {
+      return {
+        dom: detail.dom,
+        domModification: __assign(__assign({}, detail.domModification), { attributes: __assign(__assign(__assign({ 'role': detail.toggling.isSome() ? 'menuitemcheckbox' : 'menuitem' }, detail.domModification.attributes), { 'aria-haspopup': detail.hasSubmenu }), detail.hasSubmenu ? { 'aria-expanded': false } : {}) }),
+        behaviours: SketchBehaviours.augment(detail.itemBehaviours, [
+          detail.toggling.fold(Toggling.revoke, function (tConfig) {
+            return Toggling.config(__assign({ aria: { mode: 'checked' } }, tConfig));
+          }),
+          Focusing.config({
+            ignore: detail.ignoreFocus,
+            stopMousedown: detail.ignoreFocus,
+            onFocus: function (component) {
+              onFocus(component);
+            }
+          }),
+          Keying.config({ mode: 'execution' }),
+          Representing.config({
+            store: {
+              mode: 'memory',
+              initialValue: detail.data
+            }
+          }),
+          config('item-type-events', __spreadArrays(pointerEvents(), [
+            run(mouseover(), onHover),
+            run(focusItem(), Focusing.focus)
+          ]))
+        ]),
+        components: detail.components,
+        eventOrder: detail.eventOrder
+      };
+    };
+    var schema$a = [
+      strict$1('data'),
+      strict$1('components'),
+      strict$1('dom'),
+      defaulted$1('hasSubmenu', false),
+      option('toggling'),
+      SketchBehaviours.field('itemBehaviours', [
+        Toggling,
+        Focusing,
+        Keying,
+        Representing
+      ]),
+      defaulted$1('ignoreFocus', false),
+      defaulted$1('domModification', {}),
+      output('builder', builder),
+      defaulted$1('eventOrder', {})
+    ];
+
+    var builder$1 = function (detail) {
+      return {
+        dom: detail.dom,
+        components: detail.components,
+        events: derive([stopper(focusItem())])
+      };
+    };
+    var schema$b = [
+      strict$1('dom'),
+      strict$1('components'),
+      output('builder', builder$1)
+    ];
+
+    var owner$2 = function () {
+      return 'item-widget';
+    };
+    var parts = constant([required({
+        name: 'widget',
+        overrides: function (detail) {
+          return {
+            behaviours: derive$1([Representing.config({
+                store: {
+                  mode: 'manual',
+                  getValue: function (_component) {
+                    return detail.data;
+                  },
+                  setValue: function () {
+                  }
+                }
+              })])
+          };
+        }
+      })]);
+
+    var builder$2 = function (detail) {
+      var subs = substitutes(owner$2(), detail, parts());
+      var components$1 = components(owner$2(), detail, subs.internals());
+      var focusWidget = function (component) {
+        return getPart(component, detail, 'widget').map(function (widget) {
+          Keying.focusIn(widget);
+          return widget;
+        });
+      };
+      var onHorizontalArrow = function (component, simulatedEvent) {
+        return inside(simulatedEvent.event().target()) ? Option.none() : function () {
+          if (detail.autofocus) {
+            simulatedEvent.setSource(component.element());
+            return Option.none();
+          } else {
+            return Option.none();
+          }
+        }();
+      };
+      return {
+        dom: detail.dom,
+        components: components$1,
+        domModification: detail.domModification,
+        events: derive([
+          runOnExecute(function (component, simulatedEvent) {
+            focusWidget(component).each(function (_widget) {
+              simulatedEvent.stop();
+            });
+          }),
+          run(mouseover(), onHover),
+          run(focusItem(), function (component, _simulatedEvent) {
+            if (detail.autofocus) {
+              focusWidget(component);
+            } else {
+              Focusing.focus(component);
+            }
+          })
+        ]),
+        behaviours: SketchBehaviours.augment(detail.widgetBehaviours, [
+          Representing.config({
+            store: {
+              mode: 'memory',
+              initialValue: detail.data
+            }
+          }),
+          Focusing.config({
+            ignore: detail.ignoreFocus,
+            onFocus: function (component) {
+              onFocus(component);
+            }
+          }),
+          Keying.config({
+            mode: 'special',
+            focusIn: detail.autofocus ? function (component) {
+              focusWidget(component);
+            } : revoke(),
+            onLeft: onHorizontalArrow,
+            onRight: onHorizontalArrow,
+            onEscape: function (component, simulatedEvent) {
+              if (!Focusing.isFocused(component) && !detail.autofocus) {
+                Focusing.focus(component);
+                return Option.some(true);
+              } else if (detail.autofocus) {
+                simulatedEvent.setSource(component.element());
+                return Option.none();
+              } else {
+                return Option.none();
+              }
+            }
+          })
+        ])
+      };
+    };
+    var schema$c = [
+      strict$1('uid'),
+      strict$1('data'),
+      strict$1('components'),
+      strict$1('dom'),
+      defaulted$1('autofocus', false),
+      defaulted$1('ignoreFocus', false),
+      SketchBehaviours.field('widgetBehaviours', [
+        Representing,
+        Focusing,
+        Keying
+      ]),
+      defaulted$1('domModification', {}),
+      defaultUidsSchema(parts()),
+      output('builder', builder$2)
+    ];
+
+    var itemSchema$1 = choose$1('type', {
+      widget: schema$c,
+      item: schema$a,
+      separator: schema$b
+    });
+    var configureGrid = function (detail, movementInfo) {
+      return {
+        mode: 'flatgrid',
+        selector: '.' + detail.markers.item,
+        initSize: {
+          numColumns: movementInfo.initSize.numColumns,
+          numRows: movementInfo.initSize.numRows
+        },
+        focusManager: detail.focusManager
+      };
+    };
+    var configureMatrix = function (detail, movementInfo) {
+      return {
+        mode: 'matrix',
+        selectors: {
+          row: movementInfo.rowSelector,
+          cell: '.' + detail.markers.item
+        },
+        focusManager: detail.focusManager
+      };
+    };
+    var configureMenu = function (detail, movementInfo) {
+      return {
+        mode: 'menu',
+        selector: '.' + detail.markers.item,
+        moveOnTab: movementInfo.moveOnTab,
+        focusManager: detail.focusManager
+      };
+    };
+    var parts$1 = constant([group({
+        factory: {
+          sketch: function (spec) {
+            var itemInfo = asRawOrDie('menu.spec item', itemSchema$1, spec);
+            return itemInfo.builder(itemInfo);
+          }
+        },
+        name: 'items',
+        unit: 'item',
+        defaults: function (detail, u) {
+          return u.hasOwnProperty('uid') ? u : __assign(__assign({}, u), { uid: generate$2('item') });
+        },
+        overrides: function (detail, u) {
+          return {
+            type: u.type,
+            ignoreFocus: detail.fakeFocus,
+            domModification: { classes: [detail.markers.item] }
+          };
+        }
+      })]);
+    var schema$d = constant([
+      strict$1('value'),
+      strict$1('items'),
+      strict$1('dom'),
+      strict$1('components'),
+      defaulted$1('eventOrder', {}),
+      field$1('menuBehaviours', [
+        Highlighting,
+        Representing,
+        Composing,
+        Keying
+      ]),
+      defaultedOf('movement', {
+        mode: 'menu',
+        moveOnTab: true
+      }, choose$1('mode', {
+        grid: [
+          initSize(),
+          output('config', configureGrid)
+        ],
+        matrix: [
+          output('config', configureMatrix),
+          strict$1('rowSelector')
+        ],
+        menu: [
+          defaulted$1('moveOnTab', true),
+          output('config', configureMenu)
+        ]
+      })),
+      itemMarkers(),
+      defaulted$1('fakeFocus', false),
+      defaulted$1('focusManager', dom()),
+      onHandler('onHighlight')
+    ]);
+
+    var focus$4 = constant('alloy.menu-focus');
+
+    var make$1 = function (detail, components, _spec, _externals) {
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        markers: detail.markers,
+        behaviours: augment(detail.menuBehaviours, [
+          Highlighting.config({
+            highlightClass: detail.markers.selectedItem,
+            itemClass: detail.markers.item,
+            onHighlight: detail.onHighlight
+          }),
+          Representing.config({
+            store: {
+              mode: 'memory',
+              initialValue: detail.value
+            }
+          }),
+          Composing.config({ find: Option.some }),
+          Keying.config(detail.movement.config(detail, detail.movement))
+        ]),
+        events: derive([
+          run(focus$3(), function (menu, simulatedEvent) {
+            var event = simulatedEvent.event();
+            menu.getSystem().getByDom(event.target()).each(function (item) {
+              Highlighting.highlight(menu, item);
+              simulatedEvent.stop();
+              emitWith(menu, focus$4(), {
+                menu: menu,
+                item: item
+              });
+            });
+          }),
+          run(hover(), function (menu, simulatedEvent) {
+            var item = simulatedEvent.event().item();
+            Highlighting.highlight(menu, item);
+          })
+        ]),
+        components: components,
+        eventOrder: detail.eventOrder,
+        domModification: { attributes: { role: 'menu' } }
+      };
+    };
+
+    var Menu = composite$1({
+      name: 'Menu',
+      configFields: schema$d(),
+      partFields: parts$1(),
+      factory: make$1
+    });
+
+    var transpose = function (obj) {
+      return tupleMap(obj, function (v, k) {
+        return {
+          k: v,
+          v: k
+        };
+      });
+    };
+    var trace = function (items, byItem, byMenu, finish) {
+      return get(byMenu, finish).bind(function (triggerItem) {
+        return get(items, triggerItem).bind(function (triggerMenu) {
+          var rest = trace(items, byItem, byMenu, triggerMenu);
+          return Option.some([triggerMenu].concat(rest));
+        });
+      }).getOr([]);
+    };
+    var generate$5 = function (menus, expansions) {
+      var items = {};
+      each$1(menus, function (menuItems, menu) {
+        each(menuItems, function (item) {
+          items[item] = menu;
+        });
+      });
+      var byItem = expansions;
+      var byMenu = transpose(expansions);
+      var menuPaths = map$1(byMenu, function (_triggerItem, submenu) {
+        return [submenu].concat(trace(items, byItem, byMenu, submenu));
+      });
+      return map$1(items, function (menu) {
+        return get(menuPaths, menu).getOr([menu]);
+      });
+    };
+
+    var init$3 = function () {
+      var expansions = Cell({});
+      var menus = Cell({});
+      var paths = Cell({});
+      var primary = Cell(Option.none());
+      var directory = Cell({});
+      var clear = function () {
+        expansions.set({});
+        menus.set({});
+        paths.set({});
+        primary.set(Option.none());
+      };
+      var isClear = function () {
+        return primary.get().isNone();
+      };
+      var setMenuBuilt = function (menuName, built) {
+        var _a;
+        menus.set(__assign(__assign({}, menus.get()), (_a = {}, _a[menuName] = {
+          type: 'prepared',
+          menu: built
+        }, _a)));
+      };
+      var setContents = function (sPrimary, sMenus, sExpansions, dir) {
+        primary.set(Option.some(sPrimary));
+        expansions.set(sExpansions);
+        menus.set(sMenus);
+        directory.set(dir);
+        var sPaths = generate$5(dir, sExpansions);
+        paths.set(sPaths);
+      };
+      var getTriggeringItem = function (menuValue) {
+        return find$1(expansions.get(), function (v, _k) {
+          return v === menuValue;
+        });
+      };
+      var getTriggerData = function (menuValue, getItemByValue, path) {
+        return getPreparedMenu(menuValue).bind(function (menu) {
+          return getTriggeringItem(menuValue).bind(function (triggeringItemValue) {
+            return getItemByValue(triggeringItemValue).map(function (triggeredItem) {
+              return {
+                triggeredMenu: menu,
+                triggeringItem: triggeredItem,
+                triggeringPath: path
+              };
+            });
+          });
+        });
+      };
+      var getTriggeringPath = function (itemValue, getItemByValue) {
+        var extraPath = filter(lookupItem(itemValue).toArray(), function (menuValue) {
+          return getPreparedMenu(menuValue).isSome();
+        });
+        return get(paths.get(), itemValue).bind(function (path) {
+          var revPath = reverse(extraPath.concat(path));
+          var triggers = bind(revPath, function (menuValue, menuIndex) {
+            return getTriggerData(menuValue, getItemByValue, revPath.slice(0, menuIndex + 1)).fold(function () {
+              return primary.get().is(menuValue) ? [] : [Option.none()];
+            }, function (data) {
+              return [Option.some(data)];
+            });
+          });
+          return sequence(triggers);
+        });
+      };
+      var expand = function (itemValue) {
+        return get(expansions.get(), itemValue).map(function (menu) {
+          var current = get(paths.get(), itemValue).getOr([]);
+          return [menu].concat(current);
+        });
+      };
+      var collapse = function (itemValue) {
+        return get(paths.get(), itemValue).bind(function (path) {
+          return path.length > 1 ? Option.some(path.slice(1)) : Option.none();
+        });
+      };
+      var refresh = function (itemValue) {
+        return get(paths.get(), itemValue);
+      };
+      var getPreparedMenu = function (menuValue) {
+        return lookupMenu(menuValue).bind(extractPreparedMenu);
+      };
+      var lookupMenu = function (menuValue) {
+        return get(menus.get(), menuValue);
+      };
+      var lookupItem = function (itemValue) {
+        return get(expansions.get(), itemValue);
+      };
+      var otherMenus = function (path) {
+        var menuValues = directory.get();
+        return difference(keys(menuValues), path);
+      };
+      var getPrimary = function () {
+        return primary.get().bind(getPreparedMenu);
+      };
+      var getMenus = function () {
+        return menus.get();
+      };
+      return {
+        setMenuBuilt: setMenuBuilt,
+        setContents: setContents,
+        expand: expand,
+        refresh: refresh,
+        collapse: collapse,
+        lookupMenu: lookupMenu,
+        lookupItem: lookupItem,
+        otherMenus: otherMenus,
+        getPrimary: getPrimary,
+        getMenus: getMenus,
+        clear: clear,
+        isClear: isClear,
+        getTriggeringPath: getTriggeringPath
+      };
+    };
+    var extractPreparedMenu = function (prep) {
+      return prep.type === 'prepared' ? Option.some(prep.menu) : Option.none();
+    };
+    var LayeredState = {
+      init: init$3,
+      extractPreparedMenu: extractPreparedMenu
+    };
+
+    var make$2 = function (detail, _rawUiSpec) {
+      var submenuParentItems = Cell(Option.none());
+      var buildMenus = function (container, primaryName, menus) {
+        return map$1(menus, function (spec, name) {
+          var makeSketch = function () {
+            return Menu.sketch(__assign(__assign({ dom: spec.dom }, spec), {
+              value: name,
+              items: spec.items,
+              markers: detail.markers,
+              fakeFocus: detail.fakeFocus,
+              onHighlight: detail.onHighlight,
+              focusManager: detail.fakeFocus ? highlights() : dom()
+            }));
+          };
+          return name === primaryName ? {
+            type: 'prepared',
+            menu: container.getSystem().build(makeSketch())
+          } : {
+            type: 'notbuilt',
+            nbMenu: makeSketch
+          };
+        });
+      };
+      var layeredState = LayeredState.init();
+      var setup = function (container) {
+        var componentMap = buildMenus(container, detail.data.primary, detail.data.menus);
+        var directory = toDirectory();
+        layeredState.setContents(detail.data.primary, componentMap, detail.data.expansions, directory);
+        return layeredState.getPrimary();
+      };
+      var getItemValue = function (item) {
+        return Representing.getValue(item).value;
+      };
+      var getItemByValue = function (_container, menus, itemValue) {
+        return findMap(menus, function (menu) {
+          if (!menu.getSystem().isConnected()) {
+            return Option.none();
+          }
+          var candidates = Highlighting.getCandidates(menu);
+          return find(candidates, function (c) {
+            return getItemValue(c) === itemValue;
+          });
+        });
+      };
+      var toDirectory = function (_container) {
+        return map$1(detail.data.menus, function (data, _menuName) {
+          return bind(data.items, function (item) {
+            return item.type === 'separator' ? [] : [item.data.value];
+          });
+        });
+      };
+      var setActiveMenu = function (container, menu) {
+        Highlighting.highlight(container, menu);
+        Highlighting.getHighlighted(menu).orThunk(function () {
+          return Highlighting.getFirst(menu);
+        }).each(function (item) {
+          dispatch(container, item.element(), focusItem());
+        });
+      };
+      var getMenus = function (state, menuValues) {
+        return cat(map(menuValues, function (mv) {
+          return state.lookupMenu(mv).bind(function (prep) {
+            return prep.type === 'prepared' ? Option.some(prep.menu) : Option.none();
+          });
+        }));
+      };
+      var closeOthers = function (container, state, path) {
+        var others = getMenus(state, state.otherMenus(path));
+        each(others, function (o) {
+          remove$5(o.element(), [detail.markers.backgroundMenu]);
+          if (!detail.stayInDom) {
+            Replacing.remove(container, o);
+          }
+        });
+      };
+      var getSubmenuParents = function (container) {
+        return submenuParentItems.get().getOrThunk(function () {
+          var r = {};
+          var items = descendants(container.element(), '.' + detail.markers.item);
+          var parentItems = filter(items, function (i) {
+            return get$2(i, 'aria-haspopup') === 'true';
+          });
+          each(parentItems, function (i) {
+            container.getSystem().getByDom(i).each(function (itemComp) {
+              var key = getItemValue(itemComp);
+              r[key] = itemComp;
+            });
+          });
+          submenuParentItems.set(Option.some(r));
+          return r;
+        });
+      };
+      var updateAriaExpansions = function (container, path) {
+        var parentItems = getSubmenuParents(container);
+        each$1(parentItems, function (v, k) {
+          var expanded = contains(path, k);
+          set$1(v.element(), 'aria-expanded', expanded);
+        });
+      };
+      var updateMenuPath = function (container, state, path) {
+        return Option.from(path[0]).bind(function (latestMenuName) {
+          return state.lookupMenu(latestMenuName).bind(function (menuPrep) {
+            if (menuPrep.type === 'notbuilt') {
+              return Option.none();
+            } else {
+              var activeMenu = menuPrep.menu;
+              var rest = getMenus(state, path.slice(1));
+              each(rest, function (r) {
+                add$2(r.element(), detail.markers.backgroundMenu);
+              });
+              if (!inBody(activeMenu.element())) {
+                Replacing.append(container, premade$1(activeMenu));
+              }
+              remove$5(activeMenu.element(), [detail.markers.backgroundMenu]);
+              setActiveMenu(container, activeMenu);
+              closeOthers(container, state, path);
+              return Option.some(activeMenu);
+            }
+          });
+        });
+      };
+      var ExpandHighlightDecision;
+      (function (ExpandHighlightDecision) {
+        ExpandHighlightDecision[ExpandHighlightDecision['HighlightSubmenu'] = 0] = 'HighlightSubmenu';
+        ExpandHighlightDecision[ExpandHighlightDecision['HighlightParent'] = 1] = 'HighlightParent';
+      }(ExpandHighlightDecision || (ExpandHighlightDecision = {})));
+      var buildIfRequired = function (container, menuName, menuPrep) {
+        if (menuPrep.type === 'notbuilt') {
+          var menu = container.getSystem().build(menuPrep.nbMenu());
+          layeredState.setMenuBuilt(menuName, menu);
+          return menu;
+        } else {
+          return menuPrep.menu;
+        }
+      };
+      var expandRight = function (container, item, decision) {
+        if (decision === void 0) {
+          decision = ExpandHighlightDecision.HighlightSubmenu;
+        }
+        var value = getItemValue(item);
+        return layeredState.expand(value).bind(function (path) {
+          updateAriaExpansions(container, path);
+          return Option.from(path[0]).bind(function (menuName) {
+            return layeredState.lookupMenu(menuName).bind(function (activeMenuPrep) {
+              var activeMenu = buildIfRequired(container, menuName, activeMenuPrep);
+              if (!inBody(activeMenu.element())) {
+                Replacing.append(container, premade$1(activeMenu));
+              }
+              detail.onOpenSubmenu(container, item, activeMenu, reverse(path));
+              if (decision === ExpandHighlightDecision.HighlightSubmenu) {
+                Highlighting.highlightFirst(activeMenu);
+                return updateMenuPath(container, layeredState, path);
+              } else {
+                Highlighting.dehighlightAll(activeMenu);
+                return Option.some(item);
+              }
+            });
+          });
+        });
+      };
+      var collapseLeft = function (container, item) {
+        var value = getItemValue(item);
+        return layeredState.collapse(value).bind(function (path) {
+          updateAriaExpansions(container, path);
+          return updateMenuPath(container, layeredState, path).map(function (activeMenu) {
+            detail.onCollapseMenu(container, item, activeMenu);
+            return activeMenu;
+          });
+        });
+      };
+      var updateView = function (container, item) {
+        var value = getItemValue(item);
+        return layeredState.refresh(value).bind(function (path) {
+          updateAriaExpansions(container, path);
+          return updateMenuPath(container, layeredState, path);
+        });
+      };
+      var onRight = function (container, item) {
+        return inside(item.element()) ? Option.none() : expandRight(container, item, ExpandHighlightDecision.HighlightSubmenu);
+      };
+      var onLeft = function (container, item) {
+        return inside(item.element()) ? Option.none() : collapseLeft(container, item);
+      };
+      var onEscape = function (container, item) {
+        return collapseLeft(container, item).orThunk(function () {
+          return detail.onEscape(container, item).map(function () {
+            return container;
+          });
+        });
+      };
+      var keyOnItem = function (f) {
+        return function (container, simulatedEvent) {
+          return closest$3(simulatedEvent.getSource(), '.' + detail.markers.item).bind(function (target) {
+            return container.getSystem().getByDom(target).toOption().bind(function (item) {
+              return f(container, item).map(function () {
+                return true;
+              });
+            });
+          });
+        };
+      };
+      var events = derive([
+        run(focus$4(), function (sandbox, simulatedEvent) {
+          var item = simulatedEvent.event().item();
+          layeredState.lookupItem(getItemValue(item)).each(function () {
+            var menu = simulatedEvent.event().menu();
+            Highlighting.highlight(sandbox, menu);
+            var value = getItemValue(simulatedEvent.event().item());
+            layeredState.refresh(value).each(function (path) {
+              return closeOthers(sandbox, layeredState, path);
+            });
+          });
+        }),
+        runOnExecute(function (component, simulatedEvent) {
+          var target = simulatedEvent.event().target();
+          component.getSystem().getByDom(target).each(function (item) {
+            var itemValue = getItemValue(item);
+            if (itemValue.indexOf('collapse-item') === 0) {
+              collapseLeft(component, item);
+            }
+            expandRight(component, item, ExpandHighlightDecision.HighlightSubmenu).fold(function () {
+              detail.onExecute(component, item);
+            }, function () {
+            });
+          });
+        }),
+        runOnAttached(function (container, _simulatedEvent) {
+          setup(container).each(function (primary) {
+            Replacing.append(container, premade$1(primary));
+            detail.onOpenMenu(container, primary);
+            if (detail.highlightImmediately) {
+              setActiveMenu(container, primary);
+            }
+          });
+        })
+      ].concat(detail.navigateOnHover ? [run(hover(), function (sandbox, simulatedEvent) {
+          var item = simulatedEvent.event().item();
+          updateView(sandbox, item);
+          expandRight(sandbox, item, ExpandHighlightDecision.HighlightParent);
+          detail.onHover(sandbox, item);
+        })] : []));
+      var getActiveItem = function (container) {
+        return Highlighting.getHighlighted(container).bind(Highlighting.getHighlighted);
+      };
+      var collapseMenuApi = function (container) {
+        getActiveItem(container).each(function (currentItem) {
+          collapseLeft(container, currentItem);
+        });
+      };
+      var highlightPrimary = function (container) {
+        layeredState.getPrimary().each(function (primary) {
+          setActiveMenu(container, primary);
+        });
+      };
+      var extractMenuFromContainer = function (container) {
+        return Option.from(container.components()[0]).filter(function (comp) {
+          return get$2(comp.element(), 'role') === 'menu';
+        });
+      };
+      var repositionMenus = function (container) {
+        var maybeActivePrimary = layeredState.getPrimary().bind(function (primary) {
+          return getActiveItem(container).bind(function (currentItem) {
+            var itemValue = getItemValue(currentItem);
+            var allMenus = values(layeredState.getMenus());
+            var preparedMenus = cat(map(allMenus, LayeredState.extractPreparedMenu));
+            return layeredState.getTriggeringPath(itemValue, function (v) {
+              return getItemByValue(container, preparedMenus, v);
+            });
+          }).map(function (triggeringPath) {
+            return {
+              primary: primary,
+              triggeringPath: triggeringPath
+            };
+          });
+        });
+        maybeActivePrimary.fold(function () {
+          extractMenuFromContainer(container).each(function (primaryMenu) {
+            detail.onRepositionMenu(container, primaryMenu, []);
+          });
+        }, function (_a) {
+          var primary = _a.primary, triggeringPath = _a.triggeringPath;
+          detail.onRepositionMenu(container, primary, triggeringPath);
+        });
+      };
+      var apis = {
+        collapseMenu: collapseMenuApi,
+        highlightPrimary: highlightPrimary,
+        repositionMenus: repositionMenus
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        markers: detail.markers,
+        behaviours: augment(detail.tmenuBehaviours, [
+          Keying.config({
+            mode: 'special',
+            onRight: keyOnItem(onRight),
+            onLeft: keyOnItem(onLeft),
+            onEscape: keyOnItem(onEscape),
+            focusIn: function (container, _keyInfo) {
+              layeredState.getPrimary().each(function (primary) {
+                dispatch(container, primary.element(), focusItem());
+              });
+            }
+          }),
+          Highlighting.config({
+            highlightClass: detail.markers.selectedMenu,
+            itemClass: detail.markers.menu
+          }),
+          Composing.config({
+            find: function (container) {
+              return Highlighting.getHighlighted(container);
+            }
+          }),
+          Replacing.config({})
+        ]),
+        eventOrder: detail.eventOrder,
+        apis: apis,
+        events: events
+      };
+    };
+    var collapseItem = constant('collapse-item');
+
+    var tieredData = function (primary, menus, expansions) {
+      return {
+        primary: primary,
+        menus: menus,
+        expansions: expansions
+      };
+    };
+    var singleData = function (name, menu) {
+      return {
+        primary: name,
+        menus: wrap$1(name, menu),
+        expansions: {}
+      };
+    };
+    var collapseItem$1 = function (text) {
+      return {
+        value: generate$1(collapseItem()),
+        meta: { text: text }
+      };
+    };
+    var tieredMenu = single$2({
+      name: 'TieredMenu',
+      configFields: [
+        onStrictKeyboardHandler('onExecute'),
+        onStrictKeyboardHandler('onEscape'),
+        onStrictHandler('onOpenMenu'),
+        onStrictHandler('onOpenSubmenu'),
+        onHandler('onRepositionMenu'),
+        onHandler('onCollapseMenu'),
+        defaulted$1('highlightImmediately', true),
+        strictObjOf('data', [
+          strict$1('primary'),
+          strict$1('menus'),
+          strict$1('expansions')
+        ]),
+        defaulted$1('fakeFocus', false),
+        onHandler('onHighlight'),
+        onHandler('onHover'),
+        tieredMenuMarkers(),
+        strict$1('dom'),
+        defaulted$1('navigateOnHover', true),
+        defaulted$1('stayInDom', false),
+        field$1('tmenuBehaviours', [
+          Keying,
+          Highlighting,
+          Composing,
+          Replacing
+        ]),
+        defaulted$1('eventOrder', {})
+      ],
+      apis: {
+        collapseMenu: function (apis, tmenu) {
+          apis.collapseMenu(tmenu);
+        },
+        highlightPrimary: function (apis, tmenu) {
+          apis.highlightPrimary(tmenu);
+        },
+        repositionMenus: function (apis, tmenu) {
+          apis.repositionMenus(tmenu);
+        }
+      },
+      factory: make$2,
+      extraApis: {
+        tieredData: tieredData,
+        singleData: singleData,
+        collapseItem: collapseItem$1
+      }
+    });
+
+    var makeMenu = function (detail, menuSandbox, anchor, menuSpec, getBounds) {
+      var lazySink = function () {
+        return detail.lazySink(menuSandbox);
+      };
+      var layouts = menuSpec.type === 'horizontal' ? {
+        layouts: {
+          onLtr: function () {
+            return belowOrAbove();
+          },
+          onRtl: function () {
+            return belowOrAboveRtl();
+          }
+        }
+      } : {};
+      var isFirstTierSubmenu = function (triggeringPaths) {
+        return triggeringPaths.length === 2;
+      };
+      var getSubmenuLayouts = function (triggeringPaths) {
+        return isFirstTierSubmenu(triggeringPaths) ? layouts : {};
+      };
+      return tieredMenu.sketch({
+        dom: { tag: 'div' },
+        data: menuSpec.data,
+        markers: menuSpec.menu.markers,
+        highlightImmediately: menuSpec.menu.highlightImmediately,
+        onEscape: function () {
+          Sandboxing.close(menuSandbox);
+          detail.onEscape.map(function (handler) {
+            return handler(menuSandbox);
+          });
+          return Option.some(true);
+        },
+        onExecute: function () {
+          return Option.some(true);
+        },
+        onOpenMenu: function (tmenu, menu) {
+          Positioning.positionWithinBounds(lazySink().getOrDie(), anchor, menu, getBounds());
+        },
+        onOpenSubmenu: function (tmenu, item, submenu, triggeringPaths) {
+          var sink = lazySink().getOrDie();
+          Positioning.position(sink, __assign({
+            anchor: 'submenu',
+            item: item
+          }, getSubmenuLayouts(triggeringPaths)), submenu);
+        },
+        onRepositionMenu: function (tmenu, primaryMenu, submenuTriggers) {
+          var sink = lazySink().getOrDie();
+          Positioning.positionWithinBounds(sink, anchor, primaryMenu, getBounds());
+          each(submenuTriggers, function (st) {
+            var submenuLayouts = getSubmenuLayouts(st.triggeringPath);
+            Positioning.position(sink, __assign({
+              anchor: 'submenu',
+              item: st.triggeringItem
+            }, submenuLayouts), st.triggeredMenu);
+          });
+        }
+      });
+    };
+    var factory = function (detail, spec) {
+      var isPartOfRelated = function (sandbox, queryElem) {
+        var related = detail.getRelated(sandbox);
+        return related.exists(function (rel) {
+          return isPartOf(rel, queryElem);
+        });
+      };
+      var setContent = function (sandbox, thing) {
+        Sandboxing.setContent(sandbox, thing);
+      };
+      var showAt = function (sandbox, anchor, thing) {
+        showWithin(sandbox, anchor, thing, Option.none());
+      };
+      var showWithin = function (sandbox, anchor, thing, boxElement) {
+        showWithinBounds(sandbox, anchor, thing, function () {
+          return boxElement.map(function (elem) {
+            return box(elem);
+          });
+        });
+      };
+      var showWithinBounds = function (sandbox, anchor, thing, getBounds) {
+        var sink = detail.lazySink(sandbox).getOrDie();
+        Sandboxing.openWhileCloaked(sandbox, thing, function () {
+          return Positioning.positionWithinBounds(sink, anchor, sandbox, getBounds());
+        });
+        Representing.setValue(sandbox, Option.some({
+          mode: 'position',
+          anchor: anchor,
+          getBounds: getBounds
+        }));
+      };
+      var showMenuAt = function (sandbox, anchor, menuSpec) {
+        showMenuWithinBounds(sandbox, anchor, menuSpec, function () {
+          return Option.none();
+        });
+      };
+      var showMenuWithinBounds = function (sandbox, anchor, menuSpec, getBounds) {
+        var menu = makeMenu(detail, sandbox, anchor, menuSpec, getBounds);
+        Sandboxing.open(sandbox, menu);
+        Representing.setValue(sandbox, Option.some({
+          mode: 'menu',
+          menu: menu
+        }));
+      };
+      var hide = function (sandbox) {
+        if (Sandboxing.isOpen(sandbox)) {
+          Representing.setValue(sandbox, Option.none());
+          Sandboxing.close(sandbox);
+        }
+      };
+      var getContent = function (sandbox) {
+        return Sandboxing.getState(sandbox);
+      };
+      var reposition = function (sandbox) {
+        if (Sandboxing.isOpen(sandbox)) {
+          Representing.getValue(sandbox).each(function (state) {
+            switch (state.mode) {
+            case 'menu':
+              Sandboxing.getState(sandbox).each(function (tmenu) {
+                tieredMenu.repositionMenus(tmenu);
+              });
+              break;
+            case 'position':
+              var sink = detail.lazySink(sandbox).getOrDie();
+              Positioning.positionWithinBounds(sink, state.anchor, sandbox, state.getBounds());
+              break;
+            }
+          });
+        }
+      };
+      var apis = {
+        setContent: setContent,
+        showAt: showAt,
+        showWithin: showWithin,
+        showWithinBounds: showWithinBounds,
+        showMenuAt: showMenuAt,
+        showMenuWithinBounds: showMenuWithinBounds,
+        hide: hide,
+        getContent: getContent,
+        reposition: reposition,
+        isOpen: Sandboxing.isOpen
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        behaviours: augment(detail.inlineBehaviours, [
+          Sandboxing.config({
+            isPartOf: function (sandbox, data, queryElem) {
+              return isPartOf(data, queryElem) || isPartOfRelated(sandbox, queryElem);
+            },
+            getAttachPoint: function (sandbox) {
+              return detail.lazySink(sandbox).getOrDie();
+            },
+            onOpen: function (sandbox) {
+              detail.onShow(sandbox);
+            },
+            onClose: function (sandbox) {
+              detail.onHide(sandbox);
+            }
+          }),
+          Representing.config({
+            store: {
+              mode: 'memory',
+              initialValue: Option.none()
+            }
+          }),
+          Receiving.config({
+            channels: __assign(__assign({}, receivingChannel(__assign({ isExtraPart: spec.isExtraPart }, detail.fireDismissalEventInstead.map(function (fe) {
+              return { fireEventInstead: { event: fe.event } };
+            }).getOr({})))), receivingChannel$1(__assign(__assign({}, detail.fireRepositionEventInstead.map(function (fe) {
+              return { fireEventInstead: { event: fe.event } };
+            }).getOr({})), { doReposition: reposition })))
+          })
+        ]),
+        eventOrder: detail.eventOrder,
+        apis: apis
+      };
+    };
+    var InlineView = single$2({
+      name: 'InlineView',
+      configFields: [
+        strict$1('lazySink'),
+        onHandler('onShow'),
+        onHandler('onHide'),
+        optionFunction('onEscape'),
+        field$1('inlineBehaviours', [
+          Sandboxing,
+          Representing,
+          Receiving
+        ]),
+        optionObjOf('fireDismissalEventInstead', [defaulted$1('event', dismissRequested())]),
+        optionObjOf('fireRepositionEventInstead', [defaulted$1('event', repositionRequested())]),
+        defaulted$1('getRelated', Option.none),
+        defaulted$1('isExtraPart', never),
+        defaulted$1('eventOrder', Option.none)
+      ],
+      factory: factory,
+      apis: {
+        showAt: function (apis, component, anchor, thing) {
+          apis.showAt(component, anchor, thing);
+        },
+        showWithin: function (apis, component, anchor, thing, boxElement) {
+          apis.showWithin(component, anchor, thing, boxElement);
+        },
+        showWithinBounds: function (apis, component, anchor, thing, bounds) {
+          apis.showWithinBounds(component, anchor, thing, bounds);
+        },
+        showMenuAt: function (apis, component, anchor, menuSpec) {
+          apis.showMenuAt(component, anchor, menuSpec);
+        },
+        showMenuWithinBounds: function (apis, component, anchor, menuSpec, bounds) {
+          apis.showMenuWithinBounds(component, anchor, menuSpec, bounds);
+        },
+        hide: function (apis, component) {
+          apis.hide(component);
+        },
+        isOpen: function (apis, component) {
+          return apis.isOpen(component);
+        },
+        getContent: function (apis, component) {
+          return apis.getContent(component);
+        },
+        setContent: function (apis, component, thing) {
+          apis.setContent(component, thing);
+        },
+        reposition: function (apis, component) {
+          apis.reposition(component);
+        }
+      }
+    });
+
+    var westEdgeX$1 = function (anchor) {
+      return anchor.x;
+    };
+    var middleX$1 = function (anchor, element) {
+      return anchor.x + anchor.width / 2 - element.width / 2;
+    };
+    var eastEdgeX$1 = function (anchor, element) {
+      return anchor.x + anchor.width - element.width;
+    };
+    var northY$2 = function (anchor) {
+      return anchor.y;
+    };
+    var southY$2 = function (anchor, element) {
+      return anchor.y + anchor.height - element.height;
+    };
+    var southeast$3 = function (anchor, element, bubbles) {
+      return nu$7(eastEdgeX$1(anchor, element), southY$2(anchor, element), bubbles.innerSoutheast(), northwest(), boundsRestriction(anchor, {
+        right: 0,
+        bottom: 3
+      }), 'layout-inner-se');
+    };
+    var southwest$3 = function (anchor, element, bubbles) {
+      return nu$7(westEdgeX$1(anchor), southY$2(anchor, element), bubbles.innerSouthwest(), northeast(), boundsRestriction(anchor, {
+        left: 1,
+        bottom: 3
+      }), 'layout-inner-sw');
+    };
+    var northeast$3 = function (anchor, element, bubbles) {
+      return nu$7(eastEdgeX$1(anchor, element), northY$2(anchor), bubbles.innerNortheast(), southwest(), boundsRestriction(anchor, {
+        right: 0,
+        top: 2
+      }), 'layout-inner-ne');
+    };
+    var northwest$3 = function (anchor, element, bubbles) {
+      return nu$7(westEdgeX$1(anchor), northY$2(anchor), bubbles.innerNorthwest(), southeast(), boundsRestriction(anchor, {
+        left: 1,
+        top: 2
+      }), 'layout-inner-nw');
+    };
+    var north$3 = function (anchor, element, bubbles) {
+      return nu$7(middleX$1(anchor, element), northY$2(anchor), bubbles.innerNorth(), south(), boundsRestriction(anchor, { top: 2 }), 'layout-inner-n');
+    };
+    var south$3 = function (anchor, element, bubbles) {
+      return nu$7(middleX$1(anchor, element), southY$2(anchor, element), bubbles.innerSouth(), north(), boundsRestriction(anchor, { bottom: 3 }), 'layout-inner-s');
+    };
+
+    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Delay');
+
+    var factory$1 = function (detail) {
+      var events = events$7(detail.action);
+      var tag = detail.dom.tag;
+      var lookupAttr = function (attr) {
+        return get(detail.dom, 'attributes').bind(function (attrs) {
+          return get(attrs, attr);
+        });
+      };
+      var getModAttributes = function () {
+        if (tag === 'button') {
+          var type = lookupAttr('type').getOr('button');
+          var roleAttrs = lookupAttr('role').map(function (role) {
+            return { role: role };
+          }).getOr({});
+          return __assign({ type: type }, roleAttrs);
+        } else {
+          var role = lookupAttr('role').getOr('button');
+          return { role: role };
+        }
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: detail.components,
+        events: events,
+        behaviours: SketchBehaviours.augment(detail.buttonBehaviours, [
+          Focusing.config({}),
+          Keying.config({
+            mode: 'execution',
+            useSpace: true,
+            useEnter: true
+          })
+        ]),
+        domModification: { attributes: getModAttributes() },
+        eventOrder: detail.eventOrder
+      };
+    };
+    var Button = single$2({
+      name: 'Button',
+      factory: factory$1,
+      configFields: [
+        defaulted$1('uid', undefined),
+        strict$1('dom'),
+        defaulted$1('components', []),
+        SketchBehaviours.field('buttonBehaviours', [
+          Focusing,
+          Keying
+        ]),
+        option('action'),
+        option('role'),
+        defaulted$1('eventOrder', {})
+      ]
+    });
+
+    var record = function (spec) {
+      var uid = isSketchSpec(spec) && hasNonNullableKey(spec, 'uid') ? spec.uid : generate$2('memento');
+      var get = function (anyInSystem) {
+        return anyInSystem.getSystem().getByUid(uid).getOrDie();
+      };
+      var getOpt = function (anyInSystem) {
+        return anyInSystem.getSystem().getByUid(uid).toOption();
+      };
+      var asSpec = function () {
+        return __assign(__assign({}, spec), { uid: uid });
+      };
+      return {
+        get: get,
+        getOpt: getOpt,
+        asSpec: asSpec
+      };
+    };
+
+    var defaultIcon = function (icons) {
+      return Option.from(icons()['temporary-placeholder']).getOr('!not found!');
+    };
+    var get$d = function (name, icons) {
+      return Option.from(icons()[name]).getOrThunk(function () {
+        return defaultIcon(icons);
+      });
+    };
+    var getOr = function (name, icons, fallback) {
+      return Option.from(icons()[name]).or(fallback).getOrThunk(function () {
+        return defaultIcon(icons);
+      });
+    };
+    var getFirst$1 = function (names, icons) {
+      return findMap(names, function (name) {
+        return Option.from(icons()[name]);
+      }).getOrThunk(function () {
+        return defaultIcon(icons);
+      });
+    };
+
+    var notificationIconMap = {
+      success: 'checkmark',
+      error: 'warning',
+      err: 'error',
+      warning: 'warning',
+      warn: 'warning',
+      info: 'info'
+    };
+    var factory$2 = function (detail) {
+      var memBannerText = record({
+        dom: {
+          tag: 'p',
+          innerHtml: detail.translationProvider(detail.text)
+        },
+        behaviours: derive$1([Replacing.config({})])
+      });
+      var renderPercentBar = function (percent) {
+        return {
+          dom: {
+            tag: 'div',
+            classes: ['tox-bar'],
+            attributes: { style: 'width: ' + percent + '%' }
+          }
+        };
+      };
+      var renderPercentText = function (percent) {
+        return {
+          dom: {
+            tag: 'div',
+            classes: ['tox-text'],
+            innerHtml: percent + '%'
+          }
+        };
+      };
+      var memBannerProgress = record({
+        dom: {
+          tag: 'div',
+          classes: detail.progress ? [
+            'tox-progress-bar',
+            'tox-progress-indicator'
+          ] : ['tox-progress-bar']
+        },
+        components: [
+          {
+            dom: {
+              tag: 'div',
+              classes: ['tox-bar-container']
+            },
+            components: [renderPercentBar(0)]
+          },
+          renderPercentText(0)
+        ],
+        behaviours: derive$1([Replacing.config({})])
+      });
+      var updateProgress = function (comp, percent) {
+        if (comp.getSystem().isConnected()) {
+          memBannerProgress.getOpt(comp).each(function (progress) {
+            Replacing.set(progress, [
+              {
+                dom: {
+                  tag: 'div',
+                  classes: ['tox-bar-container']
+                },
+                components: [renderPercentBar(percent)]
+              },
+              renderPercentText(percent)
+            ]);
+          });
+        }
+      };
+      var updateText = function (comp, text$1) {
+        if (comp.getSystem().isConnected()) {
+          var banner = memBannerText.get(comp);
+          Replacing.set(banner, [text(text$1)]);
+        }
+      };
+      var apis = {
+        updateProgress: updateProgress,
+        updateText: updateText
+      };
+      var iconChoices = flatten([
+        detail.icon.toArray(),
+        detail.level.toArray(),
+        detail.level.bind(function (level) {
+          return Option.from(notificationIconMap[level]);
+        }).toArray()
+      ]);
+      return {
+        uid: detail.uid,
+        dom: {
+          tag: 'div',
+          attributes: { role: 'alert' },
+          classes: detail.level.map(function (level) {
+            return [
+              'tox-notification',
+              'tox-notification--in',
+              'tox-notification--' + level
+            ];
+          }).getOr([
+            'tox-notification',
+            'tox-notification--in'
+          ])
+        },
+        components: [
+          {
+            dom: {
+              tag: 'div',
+              classes: ['tox-notification__icon'],
+              innerHtml: getFirst$1(iconChoices, detail.iconProvider)
+            }
+          },
+          {
+            dom: {
+              tag: 'div',
+              classes: ['tox-notification__body']
+            },
+            components: [memBannerText.asSpec()],
+            behaviours: derive$1([Replacing.config({})])
+          }
+        ].concat(detail.progress ? [memBannerProgress.asSpec()] : []).concat(!detail.closeButton ? [] : [Button.sketch({
+            dom: {
+              tag: 'button',
+              classes: [
+                'tox-notification__dismiss',
+                'tox-button',
+                'tox-button--naked',
+                'tox-button--icon'
+              ]
+            },
+            components: [{
+                dom: {
+                  tag: 'div',
+                  classes: ['tox-icon'],
+                  innerHtml: get$d('close', detail.iconProvider),
+                  attributes: { 'aria-label': detail.translationProvider('Close') }
+                }
+              }],
+            action: function (comp) {
+              detail.onAction(comp);
+            }
+          })]),
+        apis: apis
+      };
+    };
+    var Notification = single$2({
+      name: 'Notification',
+      factory: factory$2,
+      configFields: [
+        option('level'),
+        strict$1('progress'),
+        strict$1('icon'),
+        strict$1('onAction'),
+        strict$1('text'),
+        strict$1('iconProvider'),
+        strict$1('translationProvider'),
+        defaultedBoolean('closeButton', true)
+      ],
+      apis: {
+        updateProgress: function (apis, comp, percent) {
+          apis.updateProgress(comp, percent);
+        },
+        updateText: function (apis, comp, text) {
+          apis.updateText(comp, text);
+        }
+      }
+    });
+
+    function NotificationManagerImpl (editor, extras, uiMothership) {
+      var backstage = extras.backstage;
+      var getLayoutDirection = function (rel) {
+        switch (rel) {
+        case 'bc-bc':
+          return south$3;
+        case 'tc-tc':
+          return north$3;
+        case 'tc-bc':
+          return north$1;
+        case 'bc-tc':
+        default:
+          return south$1;
+        }
+      };
+      var prePositionNotifications = function (notifications) {
+        each(notifications, function (notification) {
+          return notification.moveTo(0, 0);
+        });
+      };
+      var positionNotifications = function (notifications) {
+        if (notifications.length > 0) {
+          head(notifications).each(function (firstItem) {
+            return firstItem.moveRel(null, 'banner');
+          });
+          each(notifications, function (notification, index) {
+            if (index > 0) {
+              notification.moveRel(notifications[index - 1].getEl(), 'bc-tc');
+            }
+          });
+        }
+      };
+      var reposition = function (notifications) {
+        prePositionNotifications(notifications);
+        positionNotifications(notifications);
+      };
+      var open = function (settings, closeCallback) {
+        var hideCloseButton = !settings.closeButton && settings.timeout && (settings.timeout > 0 || settings.timeout < 0);
+        var close = function () {
+          closeCallback();
+          InlineView.hide(notificationWrapper);
+        };
+        var notification = build$1(Notification.sketch({
+          text: settings.text,
+          level: contains([
+            'success',
+            'error',
+            'warning',
+            'warn',
+            'info'
+          ], settings.type) ? settings.type : undefined,
+          progress: settings.progressBar === true,
+          icon: Option.from(settings.icon),
+          closeButton: !hideCloseButton,
+          onAction: close,
+          iconProvider: backstage.shared.providers.icons,
+          translationProvider: backstage.shared.providers.translate
+        }));
+        var notificationWrapper = build$1(InlineView.sketch(__assign({
+          dom: {
+            tag: 'div',
+            classes: ['tox-notifications-container']
+          },
+          lazySink: extras.backstage.shared.getSink,
+          fireDismissalEventInstead: {}
+        }, backstage.shared.header.isPositionedAtTop() ? {} : { fireRepositionEventInstead: {} })));
+        uiMothership.add(notificationWrapper);
+        if (settings.timeout > 0) {
+          global$2.setTimeout(function () {
+            close();
+          }, settings.timeout);
+        }
+        return {
+          close: close,
+          moveTo: function (x, y) {
+            InlineView.showAt(notificationWrapper, {
+              anchor: 'makeshift',
+              x: x,
+              y: y
+            }, premade$1(notification));
+          },
+          moveRel: function (element, rel) {
+            if (rel !== 'banner') {
+              var layoutDirection_1 = getLayoutDirection(rel);
+              var nodeAnchor = {
+                anchor: 'node',
+                root: body(),
+                node: Option.some(Element.fromDom(element)),
+                layouts: {
+                  onRtl: function () {
+                    return [layoutDirection_1];
+                  },
+                  onLtr: function () {
+                    return [layoutDirection_1];
+                  }
+                }
+              };
+              InlineView.showAt(notificationWrapper, nodeAnchor, premade$1(notification));
+            } else {
+              InlineView.showAt(notificationWrapper, extras.backstage.shared.anchors.banner(), premade$1(notification));
+            }
+          },
+          text: function (nuText) {
+            Notification.updateText(notification, nuText);
+          },
+          settings: settings,
+          getEl: function () {
+            return notification.element().dom();
+          },
+          progressBar: {
+            value: function (percent) {
+              Notification.updateProgress(notification, percent);
+            }
+          }
+        };
+      };
+      var close = function (notification) {
+        notification.close();
+      };
+      var getArgs = function (notification) {
+        return notification.settings;
+      };
+      return {
+        open: open,
+        close: close,
+        reposition: reposition,
+        getArgs: getArgs
+      };
+    }
+
+    var first = function (fn, rate) {
+      var timer = null;
+      var cancel = function () {
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+          timer = null;
+        }
+      };
+      var throttle = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (timer === null) {
+          timer = domGlobals.setTimeout(function () {
+            fn.apply(null, args);
+            timer = null;
+          }, rate);
+        }
+      };
+      return {
+        cancel: cancel,
+        throttle: throttle
+      };
+    };
+    var last$2 = function (fn, rate) {
+      var timer = null;
+      var cancel = function () {
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+          timer = null;
+        }
+      };
+      var throttle = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+        }
+        timer = domGlobals.setTimeout(function () {
+          fn.apply(null, args);
+          timer = null;
+        }, rate);
+      };
+      return {
+        cancel: cancel,
+        throttle: throttle
+      };
+    };
+
+    var global$3 = tinymce.util.Tools.resolve('tinymce.dom.TextSeeker');
+
+    var isBoundary = function (dom, node) {
+      return dom.isBlock(node) || contains([
+        'BR',
+        'IMG',
+        'HR',
+        'INPUT'
+      ], node.nodeName) || dom.getContentEditable(node) === 'false';
+    };
+    var repeatLeft = function (dom, node, offset, process, rootNode) {
+      var search = global$3(dom, function (node) {
+        return isBoundary(dom, node);
+      });
+      return Option.from(search.backwards(node, offset, process, rootNode));
+    };
+
+    var autocompleteSelector = '[data-mce-autocompleter]';
+    var create$4 = function (editor, range) {
+      return detect$4(Element.fromDom(editor.selection.getNode())).getOrThunk(function () {
+        var wrapper = Element.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>', editor.getDoc());
+        append(wrapper, Element.fromDom(range.extractContents()));
+        range.insertNode(wrapper.dom());
+        parent(wrapper).each(function (elm) {
+          return elm.dom().normalize();
+        });
+        last$1(wrapper).map(function (last) {
+          editor.selection.setCursorLocation(last.dom(), getEnd(last));
+        });
+        return wrapper;
+      });
+    };
+    var detect$4 = function (elm) {
+      return closest$3(elm, autocompleteSelector);
+    };
+
+    var isValidTextRange = function (rng) {
+      return rng.collapsed && rng.startContainer.nodeType === 3;
+    };
+    var getText = function (rng) {
+      return rng.toString().replace(/\u00A0/g, ' ').replace(/\uFEFF/g, '');
+    };
+    var isWhitespace = function (chr) {
+      return chr !== '' && ' \xA0\f\n\r\t\x0B'.indexOf(chr) !== -1;
+    };
+
+    var stripTriggerChar = function (text, triggerCh) {
+      return text.substring(triggerCh.length);
+    };
+    var findChar = function (text, index, ch) {
+      var i;
+      for (i = index - 1; i >= 0; i--) {
+        var char = text.charAt(i);
+        if (isWhitespace(char)) {
+          return Option.none();
+        }
+        if (char === ch) {
+          break;
+        }
+      }
+      return Option.some(i);
+    };
+    var findStart = function (dom, initRange, ch, minChars) {
+      if (minChars === void 0) {
+        minChars = 0;
+      }
+      if (!isValidTextRange(initRange)) {
+        return Option.none();
+      }
+      var findTriggerChIndex = function (element, offset, text) {
+        return findChar(text, offset, ch).getOr(offset);
+      };
+      var root = dom.getParent(initRange.startContainer, dom.isBlock) || dom.getRoot();
+      return repeatLeft(dom, initRange.startContainer, initRange.startOffset, findTriggerChIndex, root).bind(function (spot) {
+        var range = initRange.cloneRange();
+        range.setStart(spot.container, spot.offset);
+        range.setEnd(initRange.endContainer, initRange.endOffset);
+        if (range.collapsed) {
+          return Option.none();
+        }
+        var text = getText(range);
+        var triggerCharIndex = text.lastIndexOf(ch);
+        if (triggerCharIndex !== 0 || stripTriggerChar(text, ch).length < minChars) {
+          return Option.none();
+        } else {
+          return Option.some({
+            text: stripTriggerChar(text, ch),
+            range: range,
+            triggerChar: ch
+          });
+        }
+      });
+    };
+    var getContext = function (dom, initRange, ch, minChars) {
+      if (minChars === void 0) {
+        minChars = 0;
+      }
+      return detect$4(Element.fromDom(initRange.startContainer)).fold(function () {
+        return findStart(dom, initRange, ch, minChars);
+      }, function (elm) {
+        var range = dom.createRng();
+        range.selectNode(elm.dom());
+        var text = getText(range);
+        return Option.some({
+          range: range,
+          text: stripTriggerChar(text, ch),
+          triggerChar: ch
+        });
+      });
+    };
+
+    var setup = function (api, editor) {
+      editor.on('keypress compositionend', api.onKeypress.throttle);
+      editor.on('remove', api.onKeypress.cancel);
+      var redirectKeyToItem = function (item, e) {
+        emitWith(item, keydown(), { raw: e });
+      };
+      editor.on('keydown', function (e) {
+        var getItem = function () {
+          return api.getView().bind(Highlighting.getHighlighted);
+        };
+        if (e.which === 8) {
+          api.onKeypress.throttle(e);
+        }
+        if (api.isActive()) {
+          if (e.which === 27) {
+            api.cancelIfNecessary();
+          }
+          if (api.isMenuOpen()) {
+            if (e.which === 13) {
+              getItem().each(emitExecute);
+              e.preventDefault();
+            } else if (e.which === 40) {
+              getItem().fold(function () {
+                api.getView().each(Highlighting.highlightFirst);
+              }, function (item) {
+                redirectKeyToItem(item, e);
+              });
+              e.preventDefault();
+              e.stopImmediatePropagation();
+            } else if (e.which === 37 || e.which === 38 || e.which === 39) {
+              getItem().each(function (item) {
+                redirectKeyToItem(item, e);
+                e.preventDefault();
+                e.stopImmediatePropagation();
+              });
+            }
+          } else {
+            if (e.which === 13 || e.which === 38 || e.which === 40) {
+              api.cancelIfNecessary();
+            }
+          }
+        }
+      });
+      editor.on('NodeChange', function (e) {
+        if (api.isActive() && !api.isProcessingAction() && detect$4(Element.fromDom(e.element)).isNone()) {
+          api.cancelIfNecessary();
+        }
+      });
+    };
+    var AutocompleterEditorEvents = { setup: setup };
+
+    var global$4 = tinymce.util.Tools.resolve('tinymce.util.Promise');
+
+    var point$2 = function (container, offset) {
+      return {
+        container: container,
+        offset: offset
+      };
+    };
+
+    var isText$1 = function (node) {
+      return node.nodeType === domGlobals.Node.TEXT_NODE;
+    };
+    var isElement$1 = function (node) {
+      return node.nodeType === domGlobals.Node.ELEMENT_NODE;
+    };
+    var toLast = function (node) {
+      if (isText$1(node)) {
+        return point$2(node, node.data.length);
+      } else {
+        var children = node.childNodes;
+        return children.length > 0 ? toLast(children[children.length - 1]) : point$2(node, children.length);
+      }
+    };
+    var toLeaf = function (node, offset) {
+      var children = node.childNodes;
+      if (children.length > 0 && offset < children.length) {
+        return toLeaf(children[offset], 0);
+      } else if (children.length > 0 && isElement$1(node) && children.length === offset) {
+        return toLast(children[children.length - 1]);
+      } else {
+        return point$2(node, offset);
+      }
+    };
+
+    var isPreviousCharContent = function (dom, leaf) {
+      return repeatLeft(dom, leaf.container, leaf.offset, function (element, offset) {
+        return offset === 0 ? -1 : offset;
+      }, dom.getRoot()).filter(function (spot) {
+        var char = spot.container.data.charAt(spot.offset - 1);
+        return !isWhitespace(char);
+      }).isSome();
+    };
+    var isStartOfWord = function (dom) {
+      return function (rng) {
+        var leaf = toLeaf(rng.startContainer, rng.startOffset);
+        return !isPreviousCharContent(dom, leaf);
+      };
+    };
+    var getTriggerContext = function (dom, initRange, database) {
+      return findMap(database.triggerChars, function (ch) {
+        return getContext(dom, initRange, ch);
+      });
+    };
+    var lookup = function (editor, getDatabase) {
+      var database = getDatabase();
+      var rng = editor.selection.getRng();
+      return getTriggerContext(editor.dom, rng, database).bind(function (context) {
+        return lookupWithContext(editor, getDatabase, context);
+      });
+    };
+    var lookupWithContext = function (editor, getDatabase, context, fetchOptions) {
+      if (fetchOptions === void 0) {
+        fetchOptions = {};
+      }
+      var database = getDatabase();
+      var rng = editor.selection.getRng();
+      var startText = rng.startContainer.nodeValue;
+      var autocompleters = filter(database.lookupByChar(context.triggerChar), function (autocompleter) {
+        return context.text.length >= autocompleter.minChars && autocompleter.matches.getOrThunk(function () {
+          return isStartOfWord(editor.dom);
+        })(context.range, startText, context.text);
+      });
+      if (autocompleters.length === 0) {
+        return Option.none();
+      }
+      var lookupData = global$4.all(map(autocompleters, function (ac) {
+        var fetchResult = ac.fetch(context.text, ac.maxResults, fetchOptions);
+        return fetchResult.then(function (results) {
+          return {
+            matchText: context.text,
+            items: results,
+            columns: ac.columns,
+            onAction: ac.onAction
+          };
+        });
+      }));
+      return Option.some({
+        lookupData: lookupData,
+        context: context
+      });
+    };
+
+    var separatorMenuItemSchema = objOf([
+      strictString('type'),
+      optionString('text')
+    ]);
+    var createSeparatorMenuItem = function (spec) {
+      return asRaw('separatormenuitem', separatorMenuItemSchema, spec);
+    };
+
+    var autocompleterItemSchema = objOf([
+      state$1('type', function () {
+        return 'autocompleteitem';
+      }),
+      state$1('active', function () {
+        return false;
+      }),
+      state$1('disabled', function () {
+        return false;
+      }),
+      defaulted$1('meta', {}),
+      strictString('value'),
+      optionString('text'),
+      optionString('icon')
+    ]);
+    var autocompleterSchema = objOf([
+      strictString('type'),
+      strictString('ch'),
+      defaultedNumber('minChars', 1),
+      defaulted$1('columns', 1),
+      defaultedNumber('maxResults', 10),
+      optionFunction('matches'),
+      strictFunction('fetch'),
+      strictFunction('onAction')
+    ]);
+    var createSeparatorItem = function (spec) {
+      return asRaw('Autocompleter.Separator', separatorMenuItemSchema, spec);
+    };
+    var createAutocompleterItem = function (spec) {
+      return asRaw('Autocompleter.Item', autocompleterItemSchema, spec);
+    };
+    var createAutocompleter = function (spec) {
+      return asRaw('Autocompleter', autocompleterSchema, spec);
+    };
+
+    var stringArray = function (a) {
+      var all = {};
+      each(a, function (key) {
+        all[key] = {};
+      });
+      return keys(all);
+    };
+
+    var register = function (editor) {
+      var popups = editor.ui.registry.getAll().popups;
+      var dataset = map$1(popups, function (popup) {
+        return createAutocompleter(popup).fold(function (err) {
+          throw new Error(formatError(err));
+        }, function (x) {
+          return x;
+        });
+      });
+      var triggerChars = stringArray(mapToArray(dataset, function (v) {
+        return v.ch;
+      }));
+      var datasetValues = values(dataset);
+      var lookupByChar = function (ch) {
+        return filter(datasetValues, function (dv) {
+          return dv.ch === ch;
+        });
+      };
+      return {
+        dataset: dataset,
+        triggerChars: triggerChars,
+        lookupByChar: lookupByChar
+      };
+    };
+
+    var commonMenuItemFields = [
+      defaultedBoolean('disabled', false),
+      optionString('text'),
+      optionString('shortcut'),
+      field('value', 'value', defaultedThunk(function () {
+        return generate$1('menuitem-value');
+      }), anyValue$1()),
+      defaulted$1('meta', {})
+    ];
+
+    var menuItemSchema = objOf([
+      strictString('type'),
+      defaultedFunction('onSetup', function () {
+        return noop;
+      }),
+      defaultedFunction('onAction', noop),
+      optionString('icon')
+    ].concat(commonMenuItemFields));
+    var createMenuItem = function (spec) {
+      return asRaw('menuitem', menuItemSchema, spec);
+    };
+
+    var nestedMenuItemSchema = objOf([
+      strictString('type'),
+      strictFunction('getSubmenuItems'),
+      defaultedFunction('onSetup', function () {
+        return noop;
+      }),
+      optionString('icon')
+    ].concat(commonMenuItemFields));
+    var createNestedMenuItem = function (spec) {
+      return asRaw('nestedmenuitem', nestedMenuItemSchema, spec);
+    };
+
+    var toggleMenuItemSchema = objOf([
+      strictString('type'),
+      optionString('icon'),
+      defaultedBoolean('active', false),
+      defaultedFunction('onSetup', function () {
+        return noop;
+      }),
+      strictFunction('onAction')
+    ].concat(commonMenuItemFields));
+    var createToggleMenuItem = function (spec) {
+      return asRaw('togglemenuitem', toggleMenuItemSchema, spec);
+    };
+
+    var choiceMenuItemSchema = objOf([
+      strictString('type'),
+      defaultedBoolean('active', false),
+      optionString('icon')
+    ].concat(commonMenuItemFields));
+    var createChoiceMenuItem = function (spec) {
+      return asRaw('choicemenuitem', choiceMenuItemSchema, spec);
+    };
+
+    var fancyTypes = [
+      'inserttable',
+      'colorswatch'
+    ];
+    var fancyMenuItemSchema = objOf([
+      strictString('type'),
+      strictStringEnum('fancytype', fancyTypes),
+      defaultedFunction('onAction', noop)
+    ]);
+    var createFancyMenuItem = function (spec) {
+      return asRaw('fancymenuitem', fancyMenuItemSchema, spec);
+    };
+
+    var detectSize = function (comp, margin, selectorClass) {
+      var descendants$1 = descendants(comp.element(), '.' + selectorClass);
+      if (descendants$1.length > 0) {
+        var columnLength = findIndex(descendants$1, function (c) {
+          var thisTop = c.dom().getBoundingClientRect().top;
+          var cTop = descendants$1[0].dom().getBoundingClientRect().top;
+          return Math.abs(thisTop - cTop) > margin;
+        }).getOr(descendants$1.length);
+        return Option.some({
+          numColumns: columnLength,
+          numRows: Math.ceil(descendants$1.length / columnLength)
+        });
+      } else {
+        return Option.none();
+      }
+    };
+
+    var namedEvents = function (name, handlers) {
+      return derive$1([config(name, handlers)]);
+    };
+    var unnamedEvents = function (handlers) {
+      return namedEvents(generate$1('unnamed-events'), handlers);
+    };
+    var SimpleBehaviours = {
+      namedEvents: namedEvents,
+      unnamedEvents: unnamedEvents
+    };
+
+    var TooltippingSchema = [
+      strict$1('lazySink'),
+      strict$1('tooltipDom'),
+      defaulted$1('exclusive', true),
+      defaulted$1('tooltipComponents', []),
+      defaulted$1('delay', 300),
+      defaultedStringEnum('mode', 'normal', [
+        'normal',
+        'follow-highlight'
+      ]),
+      defaulted$1('anchor', function (comp) {
+        return {
+          anchor: 'hotspot',
+          hotspot: comp,
+          layouts: {
+            onLtr: constant([
+              south$1,
+              north$1,
+              southeast$1,
+              northeast$1,
+              southwest$1,
+              northwest$1
+            ]),
+            onRtl: constant([
+              south$1,
+              north$1,
+              southeast$1,
+              northeast$1,
+              southwest$1,
+              northwest$1
+            ])
+          }
+        };
+      }),
+      onHandler('onHide'),
+      onHandler('onShow')
+    ];
+
+    var init$4 = function () {
+      var timer = Cell(Option.none());
+      var popup = Cell(Option.none());
+      var getTooltip = function () {
+        return popup.get();
+      };
+      var setTooltip = function (comp) {
+        popup.set(Option.some(comp));
+      };
+      var clearTooltip = function () {
+        popup.set(Option.none());
+      };
+      var clearTimer = function () {
+        timer.get().each(function (t) {
+          domGlobals.clearTimeout(t);
+        });
+      };
+      var resetTimer = function (f, delay) {
+        clearTimer();
+        timer.set(Option.some(domGlobals.setTimeout(function () {
+          f();
+        }, delay)));
+      };
+      var isShowing = function () {
+        return popup.get().isSome();
+      };
+      var readState = constant('not-implemented');
+      return nu$5({
+        getTooltip: getTooltip,
+        isShowing: isShowing,
+        setTooltip: setTooltip,
+        clearTooltip: clearTooltip,
+        clearTimer: clearTimer,
+        resetTimer: resetTimer,
+        readState: readState
+      });
+    };
+
+    var TooltippingState = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        init: init$4
+    });
+
+    var ExclusivityChannel = generate$1('tooltip.exclusive');
+    var ShowTooltipEvent = generate$1('tooltip.show');
+    var HideTooltipEvent = generate$1('tooltip.hide');
+
+    var hideAllExclusive = function (component, _tConfig, _tState) {
+      component.getSystem().broadcastOn([ExclusivityChannel], {});
+    };
+    var setComponents = function (component, tConfig, tState, specs) {
+      tState.getTooltip().each(function (tooltip) {
+        if (tooltip.getSystem().isConnected()) {
+          Replacing.set(tooltip, specs);
+        }
+      });
+    };
+
+    var TooltippingApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        hideAllExclusive: hideAllExclusive,
+        setComponents: setComponents
+    });
+
+    var events$8 = function (tooltipConfig, state) {
+      var hide = function (comp) {
+        state.getTooltip().each(function (p) {
+          detach(p);
+          tooltipConfig.onHide(comp, p);
+          state.clearTooltip();
+        });
+        state.clearTimer();
+      };
+      var show = function (comp) {
+        if (!state.isShowing()) {
+          hideAllExclusive(comp);
+          var sink = tooltipConfig.lazySink(comp).getOrDie();
+          var popup = comp.getSystem().build({
+            dom: tooltipConfig.tooltipDom,
+            components: tooltipConfig.tooltipComponents,
+            events: derive(tooltipConfig.mode === 'normal' ? [
+              run(mouseover(), function (_) {
+                emit(comp, ShowTooltipEvent);
+              }),
+              run(mouseout(), function (_) {
+                emit(comp, HideTooltipEvent);
+              })
+            ] : []),
+            behaviours: derive$1([Replacing.config({})])
+          });
+          state.setTooltip(popup);
+          attach$1(sink, popup);
+          tooltipConfig.onShow(comp, popup);
+          Positioning.position(sink, tooltipConfig.anchor(comp), popup);
+        }
+      };
+      return derive(flatten([
+        [
+          run(ShowTooltipEvent, function (comp) {
+            state.resetTimer(function () {
+              show(comp);
+            }, tooltipConfig.delay);
+          }),
+          run(HideTooltipEvent, function (comp) {
+            state.resetTimer(function () {
+              hide(comp);
+            }, tooltipConfig.delay);
+          }),
+          run(receive(), function (comp, message) {
+            var receivingData = message;
+            if (contains(receivingData.channels(), ExclusivityChannel)) {
+              hide(comp);
+            }
+          }),
+          runOnDetached(function (comp) {
+            hide(comp);
+          })
+        ],
+        tooltipConfig.mode === 'normal' ? [
+          run(focusin(), function (comp) {
+            emit(comp, ShowTooltipEvent);
+          }),
+          run(postBlur(), function (comp) {
+            emit(comp, HideTooltipEvent);
+          }),
+          run(mouseover(), function (comp) {
+            emit(comp, ShowTooltipEvent);
+          }),
+          run(mouseout(), function (comp) {
+            emit(comp, HideTooltipEvent);
+          })
+        ] : [
+          run(highlight(), function (comp, _se) {
+            emit(comp, ShowTooltipEvent);
+          }),
+          run(dehighlight(), function (comp) {
+            emit(comp, HideTooltipEvent);
+          })
+        ]
+      ]));
+    };
+
+    var ActiveTooltipping = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events$8
+    });
+
+    var Tooltipping = create$1({
+      fields: TooltippingSchema,
+      name: 'tooltipping',
+      active: ActiveTooltipping,
+      state: TooltippingState,
+      apis: TooltippingApis
+    });
+
+    var global$5 = tinymce.util.Tools.resolve('tinymce.util.I18n');
+
+    var navClass = 'tox-menu-nav__js';
+    var selectableClass = 'tox-collection__item';
+    var colorClass = 'tox-swatch';
+    var presetClasses = {
+      normal: navClass,
+      color: colorClass
+    };
+    var tickedClass = 'tox-collection__item--enabled';
+    var groupHeadingClass = 'tox-collection__group-heading';
+    var iconClass = 'tox-collection__item-icon';
+    var textClass = 'tox-collection__item-label';
+    var accessoryClass = 'tox-collection__item-accessory';
+    var caretClass = 'tox-collection__item-caret';
+    var checkmarkClass = 'tox-collection__item-checkmark';
+    var activeClass = 'tox-collection__item--active';
+    var iconClassRtl = 'tox-collection__item-icon-rtl';
+    var classForPreset = function (presets) {
+      return get(presetClasses, presets).getOr(navClass);
+    };
+
+    var global$6 = tinymce.util.Tools.resolve('tinymce.Env');
+
+    var convertText = function (source) {
+      var mac = {
+        alt: '&#x2325;',
+        ctrl: '&#x2303;',
+        shift: '&#x21E7;',
+        meta: '&#x2318;',
+        access: '&#x2303;&#x2325;'
+      };
+      var other = {
+        meta: 'Ctrl',
+        access: 'Shift+Alt'
+      };
+      var replace = global$6.mac ? mac : other;
+      var shortcut = source.split('+');
+      var updated = map(shortcut, function (segment) {
+        var search = segment.toLowerCase().trim();
+        return has(replace, search) ? replace[search] : segment;
+      });
+      return global$6.mac ? updated.join('') : updated.join('+');
+    };
+
+    var renderIcon = function (iconHtml) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: [iconClass],
+          innerHtml: iconHtml
+        }
+      };
+    };
+    var renderText = function (text$1) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: [textClass]
+        },
+        components: [text(global$5.translate(text$1))]
+      };
+    };
+    var renderHtml = function (html) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: [textClass],
+          innerHtml: html
+        }
+      };
+    };
+    var renderStyledText = function (style, text$1) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: [textClass]
+        },
+        components: [{
+            dom: {
+              tag: style.tag,
+              styles: style.styles
+            },
+            components: [text(global$5.translate(text$1))]
+          }]
+      };
+    };
+    var renderShortcut = function (shortcut) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: [accessoryClass],
+          innerHtml: convertText(shortcut)
+        }
+      };
+    };
+    var renderCheckmark = function (icons) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: [checkmarkClass],
+          innerHtml: get$d('checkmark', icons)
+        }
+      };
+    };
+    var renderSubmenuCaret = function (icons) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: [caretClass],
+          innerHtml: get$d('chevron-right', icons)
+        }
+      };
+    };
+    var renderDownwardsCaret = function (icons) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: [caretClass],
+          innerHtml: get$d('chevron-down', icons)
+        }
+      };
+    };
+
+    var renderColorStructure = function (itemText, itemValue, iconSvg, providerBackstage) {
+      var colorPickerCommand = 'custom';
+      var removeColorCommand = 'remove';
+      var getDom = function () {
+        var common = colorClass;
+        var icon = iconSvg.getOr('');
+        var attributes = itemText.map(function (text) {
+          return { title: providerBackstage.translate(text) };
+        }).getOr({});
+        var baseDom = {
+          tag: 'div',
+          attributes: attributes,
+          classes: [common]
+        };
+        if (itemValue === colorPickerCommand) {
+          return __assign(__assign({}, baseDom), {
+            tag: 'button',
+            classes: __spreadArrays(baseDom.classes, ['tox-swatches__picker-btn']),
+            innerHtml: icon
+          });
+        } else if (itemValue === removeColorCommand) {
+          return __assign(__assign({}, baseDom), {
+            classes: __spreadArrays(baseDom.classes, ['tox-swatch--remove']),
+            innerHtml: icon
+          });
+        } else {
+          return __assign(__assign({}, baseDom), {
+            attributes: __assign(__assign({}, baseDom.attributes), { 'data-mce-color': itemValue }),
+            styles: { 'background-color': itemValue }
+          });
+        }
+      };
+      return {
+        dom: getDom(),
+        optComponents: []
+      };
+    };
+    var renderNormalItemStructure = function (info, icon, renderIcons, textRender, rtlClass) {
+      var leftIcon = renderIcons ? icon.or(Option.some('')).map(renderIcon) : Option.none();
+      var checkmark = info.checkMark;
+      var domTitle = info.ariaLabel.map(function (label) {
+        return { attributes: { title: global$5.translate(label) } };
+      }).getOr({});
+      var dom = __assign({
+        tag: 'div',
+        classes: [
+          navClass,
+          selectableClass
+        ].concat(rtlClass ? [iconClassRtl] : [])
+      }, domTitle);
+      var content = info.htmlContent.fold(function () {
+        return info.textContent.map(textRender);
+      }, function (html) {
+        return Option.some(renderHtml(html));
+      });
+      var menuItem = {
+        dom: dom,
+        optComponents: [
+          leftIcon,
+          content,
+          info.shortcutContent.map(renderShortcut),
+          checkmark,
+          info.caret
+        ]
+      };
+      return menuItem;
+    };
+    var rtlIcon = [
+      'list-num-default',
+      'list-num-lower-alpha',
+      'list-num-lower-greek',
+      'list-num-lower-roman',
+      'list-num-upper-alpha',
+      'list-num-upper-roman'
+    ];
+    var rtlTransform = [
+      'list-bull-circle',
+      'list-bull-default',
+      'list-bull-square'
+    ];
+    var renderItemStructure = function (info, providersBackstage, renderIcons, fallbackIcon) {
+      if (fallbackIcon === void 0) {
+        fallbackIcon = Option.none();
+      }
+      var getIconName = function (iconName) {
+        return iconName.map(function (name) {
+          return global$5.isRtl() && contains(rtlIcon, name) ? name + '-rtl' : name;
+        });
+      };
+      var needRtlClass = global$5.isRtl() && info.iconContent.exists(function (name) {
+        return contains(rtlTransform, name);
+      });
+      var icon = getIconName(info.iconContent).map(function (iconName) {
+        return getOr(iconName, providersBackstage.icons, fallbackIcon);
+      });
+      var textRender = Option.from(info.meta).fold(function () {
+        return renderText;
+      }, function (meta) {
+        return has(meta, 'style') ? curry(renderStyledText, meta.style) : renderText;
+      });
+      if (info.presets === 'color') {
+        return renderColorStructure(info.ariaLabel, info.value, icon, providersBackstage);
+      } else {
+        return renderNormalItemStructure(info, icon, renderIcons, textRender, needRtlClass);
+      }
+    };
+
+    var nativeDisabled = [
+      'input',
+      'button',
+      'textarea',
+      'select'
+    ];
+    var onLoad$5 = function (component, disableConfig, disableState) {
+      var f = disableConfig.disabled() ? disable : enable;
+      f(component, disableConfig, disableState);
+    };
+    var hasNative = function (component, config) {
+      return config.useNative === true && contains(nativeDisabled, name(component.element()));
+    };
+    var nativeIsDisabled = function (component) {
+      return has$1(component.element(), 'disabled');
+    };
+    var nativeDisable = function (component) {
+      set$1(component.element(), 'disabled', 'disabled');
+    };
+    var nativeEnable = function (component) {
+      remove$1(component.element(), 'disabled');
+    };
+    var ariaIsDisabled = function (component) {
+      return get$2(component.element(), 'aria-disabled') === 'true';
+    };
+    var ariaDisable = function (component) {
+      set$1(component.element(), 'aria-disabled', 'true');
+    };
+    var ariaEnable = function (component) {
+      set$1(component.element(), 'aria-disabled', 'false');
+    };
+    var disable = function (component, disableConfig, _disableState) {
+      disableConfig.disableClass.each(function (disableClass) {
+        add$2(component.element(), disableClass);
+      });
+      var f = hasNative(component, disableConfig) ? nativeDisable : ariaDisable;
+      f(component);
+      disableConfig.onDisabled(component);
+    };
+    var enable = function (component, disableConfig, _disableState) {
+      disableConfig.disableClass.each(function (disableClass) {
+        remove$4(component.element(), disableClass);
+      });
+      var f = hasNative(component, disableConfig) ? nativeEnable : ariaEnable;
+      f(component);
+      disableConfig.onEnabled(component);
+    };
+    var isDisabled = function (component, disableConfig) {
+      return hasNative(component, disableConfig) ? nativeIsDisabled(component) : ariaIsDisabled(component);
+    };
+    var set$7 = function (component, disableConfig, disableState, disabled) {
+      var f = disabled ? disable : enable;
+      f(component, disableConfig, disableState);
+    };
+
+    var DisableApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        enable: enable,
+        disable: disable,
+        isDisabled: isDisabled,
+        onLoad: onLoad$5,
+        set: set$7
+    });
+
+    var exhibit$3 = function (base, disableConfig) {
+      return nu$6({ classes: disableConfig.disabled ? disableConfig.disableClass.map(pure).getOr([]) : [] });
+    };
+    var events$9 = function (disableConfig, disableState) {
+      return derive([
+        abort(execute(), function (component, _simulatedEvent) {
+          return isDisabled(component, disableConfig);
+        }),
+        loadEvent(disableConfig, disableState, onLoad$5)
+      ]);
+    };
+
+    var ActiveDisable = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        exhibit: exhibit$3,
+        events: events$9
+    });
+
+    var DisableSchema = [
+      defaultedFunction('disabled', never),
+      defaulted$1('useNative', true),
+      option('disableClass'),
+      onHandler('onDisabled'),
+      onHandler('onEnabled')
+    ];
+
+    var Disabling = create$1({
+      fields: DisableSchema,
+      name: 'disabling',
+      active: ActiveDisable,
+      apis: DisableApis
+    });
+
+    var global$7 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
+
+    var global$8 = tinymce.util.Tools.resolve('tinymce.EditorManager');
+
+    var getSkinUrl = function (editor) {
+      var settings = editor.settings;
+      var skin = settings.skin;
+      var skinUrl = settings.skin_url;
+      if (skin !== false) {
+        var skinName = skin ? skin : 'oxide';
+        if (skinUrl) {
+          skinUrl = editor.documentBaseURI.toAbsolute(skinUrl);
+        } else {
+          skinUrl = global$8.baseURL + '/skins/ui/' + skinName;
+        }
+      }
+      return skinUrl;
+    };
+    var isReadOnly = function (editor) {
+      return editor.getParam('readonly', false, 'boolean');
+    };
+    var isSkinDisabled = function (editor) {
+      return editor.getParam('skin') === false;
+    };
+    var getHeightSetting = function (editor) {
+      return editor.getParam('height', Math.max(editor.getElement().offsetHeight, 200));
+    };
+    var getWidthSetting = function (editor) {
+      return editor.getParam('width', global$7.DOM.getStyle(editor.getElement(), 'width'));
+    };
+    var getMinWidthSetting = function (editor) {
+      return Option.from(editor.settings.min_width).filter(isNumber);
+    };
+    var getMinHeightSetting = function (editor) {
+      return Option.from(editor.settings.min_height).filter(isNumber);
+    };
+    var getMaxWidthSetting = function (editor) {
+      return Option.from(editor.getParam('max_width')).filter(isNumber);
+    };
+    var getMaxHeightSetting = function (editor) {
+      return Option.from(editor.getParam('max_height')).filter(isNumber);
+    };
+    var getUserStyleFormats = function (editor) {
+      return Option.from(editor.getParam('style_formats')).filter(isArray);
+    };
+    var isMergeStyleFormats = function (editor) {
+      return editor.getParam('style_formats_merge', false, 'boolean');
+    };
+    var getRemovedMenuItems = function (editor) {
+      return editor.getParam('removed_menuitems', '');
+    };
+    var isMenubarEnabled = function (editor) {
+      return editor.getParam('menubar', true, 'boolean') !== false;
+    };
+    var isToolbarEnabled = function (editor) {
+      var toolbar = editor.getParam('toolbar', true);
+      var isToolbarTrue = toolbar === true;
+      var isToolbarString = isString(toolbar);
+      var isToolbarObjectArray = isArray(toolbar) && toolbar.length > 0;
+      return !isMultipleToolbars(editor) && (isToolbarObjectArray || isToolbarString || isToolbarTrue);
+    };
+    var getMultipleToolbarsSetting = function (editor) {
+      var keys$1 = keys(editor.settings);
+      var toolbarKeys = filter(keys$1, function (key) {
+        return /^toolbar([1-9])$/.test(key);
+      });
+      var toolbars = map(toolbarKeys, function (key) {
+        return editor.getParam(key, false, 'string');
+      });
+      var toolbarArray = filter(toolbars, function (toolbar) {
+        return typeof toolbar === 'string';
+      });
+      return toolbarArray.length > 0 ? Option.some(toolbarArray) : Option.none();
+    };
+    var isMultipleToolbars = function (editor) {
+      return getMultipleToolbarsSetting(editor).fold(function () {
+        var toolbar = editor.getParam('toolbar', [], 'string[]');
+        return toolbar.length > 0;
+      }, function () {
+        return true;
+      });
+    };
+    var ToolbarMode;
+    (function (ToolbarMode) {
+      ToolbarMode['default'] = 'wrap';
+      ToolbarMode['floating'] = 'floating';
+      ToolbarMode['sliding'] = 'sliding';
+      ToolbarMode['scrolling'] = 'scrolling';
+    }(ToolbarMode || (ToolbarMode = {})));
+    var getToolbarMode = function (editor) {
+      return editor.getParam('toolbar_mode', '', 'string');
+    };
+    var ToolbarLocation;
+    (function (ToolbarLocation) {
+      ToolbarLocation['auto'] = 'auto';
+      ToolbarLocation['top'] = 'top';
+      ToolbarLocation['bottom'] = 'bottom';
+    }(ToolbarLocation || (ToolbarLocation = {})));
+    var getToolbarGroups = function (editor) {
+      return editor.getParam('toolbar_groups', {}, 'object');
+    };
+    var getToolbarLocation = function (editor) {
+      return editor.getParam('toolbar_location', ToolbarLocation.auto, 'string');
+    };
+    var isToolbarLocationBottom = function (editor) {
+      return getToolbarLocation(editor) === ToolbarLocation.bottom;
+    };
+    var fixedContainerSelector = function (editor) {
+      return editor.getParam('fixed_toolbar_container', '', 'string');
+    };
+    var fixedContainerElement = function (editor) {
+      var selector = fixedContainerSelector(editor);
+      return selector.length > 0 && editor.inline ? descendant$1(body(), selector) : Option.none();
+    };
+    var useFixedContainer = function (editor) {
+      return editor.inline && fixedContainerElement(editor).isSome();
+    };
+    var getUiContainer = function (editor) {
+      var fixedContainer = fixedContainerElement(editor);
+      return fixedContainer.getOr(body());
+    };
+    var isDistractionFree = function (editor) {
+      return editor.inline && !isMenubarEnabled(editor) && !isToolbarEnabled(editor) && !isMultipleToolbars(editor);
+    };
+    var isStickyToolbar = function (editor) {
+      var isStickyToolbar = editor.getParam('toolbar_sticky', false, 'boolean');
+      return (isStickyToolbar || editor.inline) && !useFixedContainer(editor) && !isDistractionFree(editor);
+    };
+    var isDraggableModal = function (editor) {
+      return editor.getParam('draggable_modal', false, 'boolean');
+    };
+
+    var ReadOnlyChannel = 'silver.readonly';
+    var ReadOnlyDataSchema = objOf([strictBoolean('readonly')]);
+    var broadcastReadonly = function (uiComponents, readonly) {
+      var outerContainer = uiComponents.outerContainer;
+      var target = outerContainer.element();
+      if (readonly) {
+        uiComponents.mothership.broadcastOn([dismissPopups()], { target: target });
+        uiComponents.uiMothership.broadcastOn([dismissPopups()], { target: target });
+      }
+      uiComponents.mothership.broadcastOn([ReadOnlyChannel], { readonly: readonly });
+      uiComponents.uiMothership.broadcastOn([ReadOnlyChannel], { readonly: readonly });
+    };
+    var setupReadonlyModeSwitch = function (editor, uiComponents) {
+      editor.on('init', function () {
+        if (editor.mode.isReadOnly()) {
+          broadcastReadonly(uiComponents, true);
+        }
+      });
+      editor.on('SwitchMode', function () {
+        return broadcastReadonly(uiComponents, editor.mode.isReadOnly());
+      });
+      if (isReadOnly(editor)) {
+        editor.setMode('readonly');
+      }
+    };
+    var receivingConfig = function () {
+      var _a;
+      return Receiving.config({
+        channels: (_a = {}, _a[ReadOnlyChannel] = {
+          schema: ReadOnlyDataSchema,
+          onReceive: function (comp, data) {
+            Disabling.set(comp, data.readonly);
+          }
+        }, _a)
+      });
+    };
+
+    var item = function (disabled) {
+      return Disabling.config({
+        disabled: disabled,
+        disableClass: 'tox-collection__item--state-disabled'
+      });
+    };
+    var button = function (disabled) {
+      return Disabling.config({ disabled: disabled });
+    };
+    var splitButton = function (disabled) {
+      return Disabling.config({
+        disabled: disabled,
+        disableClass: 'tox-tbtn--disabled'
+      });
+    };
+    var toolbarButton = function (disabled) {
+      return Disabling.config({
+        disabled: disabled,
+        disableClass: 'tox-tbtn--disabled',
+        useNative: false
+      });
+    };
+    var DisablingConfigs = {
+      item: item,
+      button: button,
+      splitButton: splitButton,
+      toolbarButton: toolbarButton
+    };
+
+    var runWithApi = function (info, comp) {
+      var api = info.getApi(comp);
+      return function (f) {
+        f(api);
+      };
+    };
+    var onControlAttached = function (info, editorOffCell) {
+      return runOnAttached(function (comp) {
+        var run = runWithApi(info, comp);
+        run(function (api) {
+          var onDestroy = info.onSetup(api);
+          if (onDestroy !== null && onDestroy !== undefined) {
+            editorOffCell.set(onDestroy);
+          }
+        });
+      });
+    };
+    var onControlDetached = function (getApi, editorOffCell) {
+      return runOnDetached(function (comp) {
+        return runWithApi(getApi, comp)(editorOffCell.get());
+      });
+    };
+
+    var ItemResponse;
+    (function (ItemResponse) {
+      ItemResponse[ItemResponse['CLOSE_ON_EXECUTE'] = 0] = 'CLOSE_ON_EXECUTE';
+      ItemResponse[ItemResponse['BUBBLE_TO_SANDBOX'] = 1] = 'BUBBLE_TO_SANDBOX';
+    }(ItemResponse || (ItemResponse = {})));
+    var ItemResponse$1 = ItemResponse;
+
+    var onMenuItemExecute = function (info, itemResponse) {
+      return runOnExecute(function (comp, simulatedEvent) {
+        runWithApi(info, comp)(info.onAction);
+        if (!info.triggersSubmenu && itemResponse === ItemResponse$1.CLOSE_ON_EXECUTE) {
+          emit(comp, sandboxClose());
+          simulatedEvent.stop();
+        }
+      });
+    };
+    var menuItemEventOrder = {
+      'alloy.execute': [
+        'disabling',
+        'alloy.base.behaviour',
+        'toggling',
+        'item-events'
+      ]
+    };
+
+    var componentRenderPipeline = function (xs) {
+      return bind(xs, function (o) {
+        return o.toArray();
+      });
+    };
+    var renderCommonItem = function (spec, structure, itemResponse, providersbackstage) {
+      var editorOffCell = Cell(noop);
+      return {
+        type: 'item',
+        dom: structure.dom,
+        components: componentRenderPipeline(structure.optComponents),
+        data: spec.data,
+        eventOrder: menuItemEventOrder,
+        hasSubmenu: spec.triggersSubmenu,
+        itemBehaviours: derive$1([
+          config('item-events', [
+            onMenuItemExecute(spec, itemResponse),
+            onControlAttached(spec, editorOffCell),
+            onControlDetached(spec, editorOffCell)
+          ]),
+          DisablingConfigs.item(function () {
+            return spec.disabled || providersbackstage.isReadOnly();
+          }),
+          receivingConfig(),
+          Replacing.config({})
+        ].concat(spec.itemBehaviours))
+      };
+    };
+    var buildData = function (source) {
+      return {
+        value: source.value,
+        meta: __assign({ text: source.text.getOr('') }, source.meta)
+      };
+    };
+
+    var tooltipBehaviour = function (meta, sharedBackstage) {
+      return get(meta, 'tooltipWorker').map(function (tooltipWorker) {
+        return [Tooltipping.config({
+            lazySink: sharedBackstage.getSink,
+            tooltipDom: {
+              tag: 'div',
+              classes: ['tox-tooltip-worker-container']
+            },
+            tooltipComponents: [],
+            anchor: function (comp) {
+              return {
+                anchor: 'submenu',
+                item: comp,
+                overrides: { maxHeightFunction: expandable }
+              };
+            },
+            mode: 'follow-highlight',
+            onShow: function (component, _tooltip) {
+              tooltipWorker(function (elm) {
+                Tooltipping.setComponents(component, [external({ element: Element.fromDom(elm) })]);
+              });
+            }
+          })];
+      }).getOr([]);
+    };
+    var escapeRegExp = function (text) {
+      return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
+    };
+    var encodeText = function (text) {
+      return global$7.DOM.encode(text);
+    };
+    var replaceText = function (text, matchText) {
+      var translated = global$5.translate(text);
+      var encoded = encodeText(translated);
+      if (matchText.length > 0) {
+        var escapedMatchRegex = new RegExp(escapeRegExp(matchText), 'gi');
+        return encoded.replace(escapedMatchRegex, function (match) {
+          return '<span class="tox-autocompleter-highlight">' + match + '</span>';
+        });
+      } else {
+        return encoded;
+      }
+    };
+    var renderAutocompleteItem = function (spec, matchText, useText, presets, onItemValueHandler, itemResponse, sharedBackstage, renderIcons) {
+      if (renderIcons === void 0) {
+        renderIcons = true;
+      }
+      var structure = renderItemStructure({
+        presets: presets,
+        textContent: Option.none(),
+        htmlContent: useText ? spec.text.map(function (text) {
+          return replaceText(text, matchText);
+        }) : Option.none(),
+        ariaLabel: spec.text,
+        iconContent: spec.icon,
+        shortcutContent: Option.none(),
+        checkMark: Option.none(),
+        caret: Option.none(),
+        value: spec.value
+      }, sharedBackstage.providers, renderIcons, spec.icon);
+      return renderCommonItem({
+        data: buildData(spec),
+        disabled: spec.disabled,
+        getApi: function () {
+          return {};
+        },
+        onAction: function (_api) {
+          return onItemValueHandler(spec.value, spec.meta);
+        },
+        onSetup: function () {
+          return function () {
+          };
+        },
+        triggersSubmenu: false,
+        itemBehaviours: tooltipBehaviour(spec.meta, sharedBackstage)
+      }, structure, itemResponse, sharedBackstage.providers);
+    };
+
+    var renderChoiceItem = function (spec, useText, presets, onItemValueHandler, isSelected, itemResponse, providersBackstage, renderIcons) {
+      if (renderIcons === void 0) {
+        renderIcons = true;
+      }
+      var getApi = function (component) {
+        return {
+          setActive: function (state) {
+            Toggling.set(component, state);
+          },
+          isActive: function () {
+            return Toggling.isOn(component);
+          },
+          isDisabled: function () {
+            return Disabling.isDisabled(component);
+          },
+          setDisabled: function (state) {
+            return Disabling.set(component, state);
+          }
+        };
+      };
+      var structure = renderItemStructure({
+        presets: presets,
+        textContent: useText ? spec.text : Option.none(),
+        htmlContent: Option.none(),
+        ariaLabel: spec.text,
+        iconContent: spec.icon,
+        shortcutContent: useText ? spec.shortcut : Option.none(),
+        checkMark: useText ? Option.some(renderCheckmark(providersBackstage.icons)) : Option.none(),
+        caret: Option.none(),
+        value: spec.value
+      }, providersBackstage, renderIcons);
+      return deepMerge(renderCommonItem({
+        data: buildData(spec),
+        disabled: spec.disabled,
+        getApi: getApi,
+        onAction: function (_api) {
+          return onItemValueHandler(spec.value);
+        },
+        onSetup: function (api) {
+          api.setActive(isSelected);
+          return function () {
+          };
+        },
+        triggersSubmenu: false,
+        itemBehaviours: []
+      }, structure, itemResponse, providersBackstage), {
+        toggling: {
+          toggleClass: tickedClass,
+          toggleOnExecute: false,
+          selected: spec.active
+        }
+      });
+    };
+
+    var parts$2 = constant(generate$4(owner$2(), parts()));
+
+    var cellOverEvent = generate$1('cell-over');
+    var cellExecuteEvent = generate$1('cell-execute');
+    var makeCell = function (row, col, labelId) {
+      var _a;
+      var emitCellOver = function (c) {
+        return emitWith(c, cellOverEvent, {
+          row: row,
+          col: col
+        });
+      };
+      var emitExecute = function (c) {
+        return emitWith(c, cellExecuteEvent, {
+          row: row,
+          col: col
+        });
+      };
+      var onClick = function (c, se) {
+        se.stop();
+        emitExecute(c);
+      };
+      return build$1({
+        dom: {
+          tag: 'div',
+          attributes: (_a = { role: 'button' }, _a['aria-labelledby'] = labelId, _a)
+        },
+        behaviours: derive$1([
+          config('insert-table-picker-cell', [
+            run(mouseover(), Focusing.focus),
+            run(execute(), emitExecute),
+            run(click(), onClick),
+            run(tap(), onClick)
+          ]),
+          Toggling.config({
+            toggleClass: 'tox-insert-table-picker__selected',
+            toggleOnExecute: false
+          }),
+          Focusing.config({ onFocus: emitCellOver })
+        ])
+      });
+    };
+    var makeCells = function (labelId, numRows, numCols) {
+      var cells = [];
+      for (var i = 0; i < numRows; i++) {
+        var row = [];
+        for (var j = 0; j < numCols; j++) {
+          row.push(makeCell(i, j, labelId));
+        }
+        cells.push(row);
+      }
+      return cells;
+    };
+    var selectCells = function (cells, selectedRow, selectedColumn, numRows, numColumns) {
+      for (var i = 0; i < numRows; i++) {
+        for (var j = 0; j < numColumns; j++) {
+          Toggling.set(cells[i][j], i <= selectedRow && j <= selectedColumn);
+        }
+      }
+    };
+    var makeComponents = function (cells) {
+      return bind(cells, function (cellRow) {
+        return map(cellRow, premade$1);
+      });
+    };
+    var makeLabelText = function (row, col) {
+      return text(col + 1 + 'x' + (row + 1));
+    };
+    var renderInsertTableMenuItem = function (spec) {
+      var numRows = 10;
+      var numColumns = 10;
+      var sizeLabelId = generate$1('size-label');
+      var cells = makeCells(sizeLabelId, numRows, numColumns);
+      var memLabel = record({
+        dom: {
+          tag: 'span',
+          classes: ['tox-insert-table-picker__label'],
+          attributes: { id: sizeLabelId }
+        },
+        components: [text('0x0')],
+        behaviours: derive$1([Replacing.config({})])
+      });
+      return {
+        type: 'widget',
+        data: { value: generate$1('widget-id') },
+        dom: {
+          tag: 'div',
+          classes: ['tox-fancymenuitem']
+        },
+        autofocus: true,
+        components: [parts$2().widget({
+            dom: {
+              tag: 'div',
+              classes: ['tox-insert-table-picker']
+            },
+            components: makeComponents(cells).concat(memLabel.asSpec()),
+            behaviours: derive$1([
+              config('insert-table-picker', [
+                runWithTarget(cellOverEvent, function (c, t, e) {
+                  var row = e.event().row();
+                  var col = e.event().col();
+                  selectCells(cells, row, col, numRows, numColumns);
+                  Replacing.set(memLabel.get(c), [makeLabelText(row, col)]);
+                }),
+                runWithTarget(cellExecuteEvent, function (c, _, e) {
+                  spec.onAction({
+                    numRows: e.event().row() + 1,
+                    numColumns: e.event().col() + 1
+                  });
+                  emit(c, sandboxClose());
+                })
+              ]),
+              Keying.config({
+                initSize: {
+                  numRows: numRows,
+                  numColumns: numColumns
+                },
+                mode: 'flatgrid',
+                selector: '[role="button"]'
+              })
+            ])
+          })]
+      };
+    };
+
+    var hexColour = function (value) {
+      return { value: value };
+    };
+    var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
+    var longformRegex = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;
+    var isHexString = function (hex) {
+      return shorthandRegex.test(hex) || longformRegex.test(hex);
+    };
+    var getLongForm = function (hex) {
+      var hexString = hex.value.replace(shorthandRegex, function (m, r, g, b) {
+        return r + r + g + g + b + b;
+      });
+      return { value: hexString };
+    };
+    var extractValues = function (hex) {
+      var longForm = getLongForm(hex);
+      var splitForm = longformRegex.exec(longForm.value);
+      return splitForm === null ? [
+        'FFFFFF',
+        'FF',
+        'FF',
+        'FF'
+      ] : splitForm;
+    };
+    var toHex = function (component) {
+      var hex = component.toString(16);
+      return hex.length === 1 ? '0' + hex : hex;
+    };
+    var fromRgba = function (rgbaColour) {
+      var value = toHex(rgbaColour.red) + toHex(rgbaColour.green) + toHex(rgbaColour.blue);
+      return hexColour(value);
+    };
+
+    var min = Math.min;
+    var max = Math.max;
+    var round = Math.round;
+    var rgbRegex = /^rgb\((\d+),\s*(\d+),\s*(\d+)\)/;
+    var rgbaRegex = /^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/;
+    var rgbaColour = function (red, green, blue, alpha) {
+      return {
+        red: red,
+        green: green,
+        blue: blue,
+        alpha: alpha
+      };
+    };
+    var isRgbaComponent = function (value) {
+      var num = parseInt(value, 10);
+      return num.toString() === value && num >= 0 && num <= 255;
+    };
+    var fromHsv = function (hsv) {
+      var r;
+      var g;
+      var b;
+      var hue = (hsv.hue || 0) % 360;
+      var saturation = hsv.saturation / 100;
+      var brightness = hsv.value / 100;
+      saturation = max(0, min(saturation, 1));
+      brightness = max(0, min(brightness, 1));
+      if (saturation === 0) {
+        r = g = b = round(255 * brightness);
+        return rgbaColour(r, g, b, 1);
+      }
+      var side = hue / 60;
+      var chroma = brightness * saturation;
+      var x = chroma * (1 - Math.abs(side % 2 - 1));
+      var match = brightness - chroma;
+      switch (Math.floor(side)) {
+      case 0:
+        r = chroma;
+        g = x;
+        b = 0;
+        break;
+      case 1:
+        r = x;
+        g = chroma;
+        b = 0;
+        break;
+      case 2:
+        r = 0;
+        g = chroma;
+        b = x;
+        break;
+      case 3:
+        r = 0;
+        g = x;
+        b = chroma;
+        break;
+      case 4:
+        r = x;
+        g = 0;
+        b = chroma;
+        break;
+      case 5:
+        r = chroma;
+        g = 0;
+        b = x;
+        break;
+      default:
+        r = g = b = 0;
+      }
+      r = round(255 * (r + match));
+      g = round(255 * (g + match));
+      b = round(255 * (b + match));
+      return rgbaColour(r, g, b, 1);
+    };
+    var fromHex = function (hexColour) {
+      var result = extractValues(hexColour);
+      var red = parseInt(result[1], 16);
+      var green = parseInt(result[2], 16);
+      var blue = parseInt(result[3], 16);
+      return rgbaColour(red, green, blue, 1);
+    };
+    var fromStringValues = function (red, green, blue, alpha) {
+      var r = parseInt(red, 10);
+      var g = parseInt(green, 10);
+      var b = parseInt(blue, 10);
+      var a = parseFloat(alpha);
+      return rgbaColour(r, g, b, a);
+    };
+    var fromString = function (rgbaString) {
+      if (rgbaString === 'transparent') {
+        return Option.some(rgbaColour(0, 0, 0, 0));
+      }
+      var rgbMatch = rgbRegex.exec(rgbaString);
+      if (rgbMatch !== null) {
+        return Option.some(fromStringValues(rgbMatch[1], rgbMatch[2], rgbMatch[3], '1'));
+      }
+      var rgbaMatch = rgbaRegex.exec(rgbaString);
+      if (rgbaMatch !== null) {
+        return Option.some(fromStringValues(rgbaMatch[1], rgbaMatch[2], rgbaMatch[3], rgbaMatch[4]));
+      }
+      return Option.none();
+    };
+    var toString = function (rgba) {
+      return 'rgba(' + rgba.red + ',' + rgba.green + ',' + rgba.blue + ',' + rgba.alpha + ')';
+    };
+    var red = rgbaColour(255, 0, 0, 1);
+
+    var global$9 = tinymce.util.Tools.resolve('tinymce.util.LocalStorage');
+
+    var storageName = 'tinymce-custom-colors';
+    function ColorCache (max) {
+      if (max === void 0) {
+        max = 10;
+      }
+      var storageString = global$9.getItem(storageName);
+      var localstorage = isString(storageString) ? JSON.parse(storageString) : [];
+      var prune = function (list) {
+        var diff = max - list.length;
+        return diff < 0 ? list.slice(0, max) : list;
+      };
+      var cache = prune(localstorage);
+      var add = function (key) {
+        indexOf(cache, key).each(remove);
+        cache.unshift(key);
+        if (cache.length > max) {
+          cache.pop();
+        }
+        global$9.setItem(storageName, JSON.stringify(cache));
+      };
+      var remove = function (idx) {
+        cache.splice(idx, 1);
+      };
+      var state = function () {
+        return cache.slice(0);
+      };
+      return {
+        add: add,
+        state: state
+      };
+    }
+
+    var choiceItem = 'choiceitem';
+    var defaultColors = [
+      {
+        type: choiceItem,
+        text: 'Light Green',
+        value: '#BFEDD2'
+      },
+      {
+        type: choiceItem,
+        text: 'Light Yellow',
+        value: '#FBEEB8'
+      },
+      {
+        type: choiceItem,
+        text: 'Light Red',
+        value: '#F8CAC6'
+      },
+      {
+        type: choiceItem,
+        text: 'Light Purple',
+        value: '#ECCAFA'
+      },
+      {
+        type: choiceItem,
+        text: 'Light Blue',
+        value: '#C2E0F4'
+      },
+      {
+        type: choiceItem,
+        text: 'Green',
+        value: '#2DC26B'
+      },
+      {
+        type: choiceItem,
+        text: 'Yellow',
+        value: '#F1C40F'
+      },
+      {
+        type: choiceItem,
+        text: 'Red',
+        value: '#E03E2D'
+      },
+      {
+        type: choiceItem,
+        text: 'Purple',
+        value: '#B96AD9'
+      },
+      {
+        type: choiceItem,
+        text: 'Blue',
+        value: '#3598DB'
+      },
+      {
+        type: choiceItem,
+        text: 'Dark Turquoise',
+        value: '#169179'
+      },
+      {
+        type: choiceItem,
+        text: 'Orange',
+        value: '#E67E23'
+      },
+      {
+        type: choiceItem,
+        text: 'Dark Red',
+        value: '#BA372A'
+      },
+      {
+        type: choiceItem,
+        text: 'Dark Purple',
+        value: '#843FA1'
+      },
+      {
+        type: choiceItem,
+        text: 'Dark Blue',
+        value: '#236FA1'
+      },
+      {
+        type: choiceItem,
+        text: 'Light Gray',
+        value: '#ECF0F1'
+      },
+      {
+        type: choiceItem,
+        text: 'Medium Gray',
+        value: '#CED4D9'
+      },
+      {
+        type: choiceItem,
+        text: 'Gray',
+        value: '#95A5A6'
+      },
+      {
+        type: choiceItem,
+        text: 'Dark Gray',
+        value: '#7E8C8D'
+      },
+      {
+        type: choiceItem,
+        text: 'Navy Blue',
+        value: '#34495E'
+      },
+      {
+        type: choiceItem,
+        text: 'Black',
+        value: '#000000'
+      },
+      {
+        type: choiceItem,
+        text: 'White',
+        value: '#ffffff'
+      }
+    ];
+    var colorCache = ColorCache(10);
+    var mapColors = function (colorMap) {
+      var colors = [];
+      var canvas = domGlobals.document.createElement('canvas');
+      canvas.height = 1;
+      canvas.width = 1;
+      var ctx = canvas.getContext('2d');
+      var byteAsHex = function (colorByte, alphaByte) {
+        var bg = 255;
+        var alpha = alphaByte / 255;
+        var colorByteWithWhiteBg = Math.round(colorByte * alpha + bg * (1 - alpha));
+        return ('0' + colorByteWithWhiteBg.toString(16)).slice(-2).toUpperCase();
+      };
+      var asHexColor = function (color) {
+        if (/^[0-9A-Fa-f]{6}$/.test(color)) {
+          return '#' + color.toUpperCase();
+        }
+        ctx.clearRect(0, 0, canvas.width, canvas.height);
+        ctx.fillStyle = '#FFFFFF';
+        ctx.fillStyle = color;
+        ctx.fillRect(0, 0, 1, 1);
+        var rgba = ctx.getImageData(0, 0, 1, 1).data;
+        var r = rgba[0], g = rgba[1], b = rgba[2], a = rgba[3];
+        return '#' + byteAsHex(r, a) + byteAsHex(g, a) + byteAsHex(b, a);
+      };
+      for (var i = 0; i < colorMap.length; i += 2) {
+        colors.push({
+          text: colorMap[i + 1],
+          value: asHexColor(colorMap[i]),
+          type: 'choiceitem'
+        });
+      }
+      return colors;
+    };
+    var getColorCols = function (editor, defaultCols) {
+      return editor.getParam('color_cols', defaultCols, 'number');
+    };
+    var hasCustomColors = function (editor) {
+      return editor.getParam('custom_colors') !== false;
+    };
+    var getColorMap = function (editor) {
+      return editor.getParam('color_map');
+    };
+    var getColors = function (editor) {
+      var unmapped = getColorMap(editor);
+      return unmapped !== undefined ? mapColors(unmapped) : defaultColors;
+    };
+    var getCurrentColors = function () {
+      return map(colorCache.state(), function (color) {
+        return {
+          type: choiceItem,
+          text: color,
+          value: color
+        };
+      });
+    };
+    var addColor = function (color) {
+      colorCache.add(color);
+    };
+
+    var fireSkinLoaded = function (editor) {
+      return editor.fire('SkinLoaded');
+    };
+    var fireSkinLoadError = function (editor, error) {
+      return editor.fire('SkinLoadError', error);
+    };
+    var fireResizeEditor = function (editor) {
+      return editor.fire('ResizeEditor');
+    };
+    var fireResizeContent = function (editor, e) {
+      return editor.fire('ResizeContent', e);
+    };
+    var fireScrollContent = function (editor, e) {
+      return editor.fire('ScrollContent', e);
+    };
+    var fireTextColorChange = function (editor, data) {
+      return editor.fire('TextColorChange', data);
+    };
+
+    var getCurrentColor = function (editor, format) {
+      var color;
+      editor.dom.getParents(editor.selection.getStart(), function (elm) {
+        var value;
+        if (value = elm.style[format === 'forecolor' ? 'color' : 'background-color']) {
+          color = color ? color : value;
+        }
+      });
+      return color;
+    };
+    var applyFormat = function (editor, format, value) {
+      editor.undoManager.transact(function () {
+        editor.focus();
+        editor.formatter.apply(format, { value: value });
+        editor.nodeChanged();
+      });
+    };
+    var removeFormat = function (editor, format) {
+      editor.undoManager.transact(function () {
+        editor.focus();
+        editor.formatter.remove(format, { value: null }, null, true);
+        editor.nodeChanged();
+      });
+    };
+    var registerCommands = function (editor) {
+      editor.addCommand('mceApplyTextcolor', function (format, value) {
+        applyFormat(editor, format, value);
+      });
+      editor.addCommand('mceRemoveTextcolor', function (format) {
+        removeFormat(editor, format);
+      });
+    };
+    var calcCols = function (colors) {
+      return Math.max(5, Math.ceil(Math.sqrt(colors)));
+    };
+    var getColorCols$1 = function (editor) {
+      var colors = getColors(editor);
+      var defaultCols = calcCols(colors.length);
+      return getColorCols(editor, defaultCols);
+    };
+    var getAdditionalColors = function (hasCustom) {
+      var type = 'choiceitem';
+      var remove = {
+        type: type,
+        text: 'Remove color',
+        icon: 'color-swatch-remove-color',
+        value: 'remove'
+      };
+      var custom = {
+        type: type,
+        text: 'Custom color',
+        icon: 'color-picker',
+        value: 'custom'
+      };
+      return hasCustom ? [
+        remove,
+        custom
+      ] : [remove];
+    };
+    var applyColor = function (editor, format, value, onChoice) {
+      if (value === 'custom') {
+        var dialog = colorPickerDialog(editor);
+        dialog(function (colorOpt) {
+          colorOpt.each(function (color) {
+            addColor(color);
+            editor.execCommand('mceApplyTextcolor', format, color);
+            onChoice(color);
+          });
+        }, '#000000');
+      } else if (value === 'remove') {
+        onChoice('');
+        editor.execCommand('mceRemoveTextcolor', format);
+      } else {
+        onChoice(value);
+        editor.execCommand('mceApplyTextcolor', format, value);
+      }
+    };
+    var getColors$1 = function (colors, hasCustom) {
+      return colors.concat(getCurrentColors().concat(getAdditionalColors(hasCustom)));
+    };
+    var getFetch = function (colors, hasCustom) {
+      return function (callback) {
+        callback(getColors$1(colors, hasCustom));
+      };
+    };
+    var setIconColor = function (splitButtonApi, name, newColor) {
+      var setIconFillAndStroke = function (pathId, color) {
+        splitButtonApi.setIconFill(pathId, color);
+        splitButtonApi.setIconStroke(pathId, color);
+      };
+      var id = name === 'forecolor' ? 'tox-icon-text-color__color' : 'tox-icon-highlight-bg-color__color';
+      setIconFillAndStroke(id, newColor);
+    };
+    var registerTextColorButton = function (editor, name, format, tooltip, lastColor) {
+      editor.ui.registry.addSplitButton(name, {
+        tooltip: tooltip,
+        presets: 'color',
+        icon: name === 'forecolor' ? 'text-color' : 'highlight-bg-color',
+        select: function (value) {
+          var optCurrentRgb = Option.from(getCurrentColor(editor, format));
+          return optCurrentRgb.bind(function (currentRgb) {
+            return fromString(currentRgb).map(function (rgba) {
+              var currentHex = fromRgba(rgba).value;
+              return contains$1(value.toLowerCase(), currentHex);
+            });
+          }).getOr(false);
+        },
+        columns: getColorCols$1(editor),
+        fetch: getFetch(getColors(editor), hasCustomColors(editor)),
+        onAction: function (_splitButtonApi) {
+          if (lastColor.get() !== null) {
+            applyColor(editor, format, lastColor.get(), function () {
+            });
+          }
+        },
+        onItemAction: function (_splitButtonApi, value) {
+          applyColor(editor, format, value, function (newColor) {
+            lastColor.set(newColor);
+            fireTextColorChange(editor, {
+              name: name,
+              color: newColor
+            });
+          });
+        },
+        onSetup: function (splitButtonApi) {
+          if (lastColor.get() !== null) {
+            setIconColor(splitButtonApi, name, lastColor.get());
+          }
+          var handler = function (e) {
+            if (e.name === name) {
+              setIconColor(splitButtonApi, e.name, e.color);
+            }
+          };
+          editor.on('TextColorChange', handler);
+          return function () {
+            editor.off('TextColorChange', handler);
+          };
+        }
+      });
+    };
+    var registerTextColorMenuItem = function (editor, name, format, text) {
+      editor.ui.registry.addNestedMenuItem(name, {
+        text: text,
+        icon: name === 'forecolor' ? 'text-color' : 'highlight-bg-color',
+        getSubmenuItems: function () {
+          return [{
+              type: 'fancymenuitem',
+              fancytype: 'colorswatch',
+              onAction: function (data) {
+                applyColor(editor, format, data.value, noop);
+              }
+            }];
+        }
+      });
+    };
+    var colorPickerDialog = function (editor) {
+      return function (callback, value) {
+        var getOnSubmit = function (callback) {
+          return function (api) {
+            var data = api.getData();
+            callback(Option.from(data.colorpicker));
+            api.close();
+          };
+        };
+        var onAction = function (api, details) {
+          if (details.name === 'hex-valid') {
+            if (details.value) {
+              api.enable('ok');
+            } else {
+              api.disable('ok');
+            }
+          }
+        };
+        var initialData = { colorpicker: value };
+        var submit = getOnSubmit(callback);
+        editor.windowManager.open({
+          title: 'Color Picker',
+          size: 'normal',
+          body: {
+            type: 'panel',
+            items: [{
+                type: 'colorpicker',
+                name: 'colorpicker',
+                label: 'Color'
+              }]
+          },
+          buttons: [
+            {
+              type: 'cancel',
+              name: 'cancel',
+              text: 'Cancel'
+            },
+            {
+              type: 'submit',
+              name: 'save',
+              text: 'Save',
+              primary: true
+            }
+          ],
+          initialData: initialData,
+          onAction: onAction,
+          onSubmit: submit,
+          onClose: function () {
+          },
+          onCancel: function () {
+            callback(Option.none());
+          }
+        });
+      };
+    };
+    var register$1 = function (editor) {
+      registerCommands(editor);
+      var lastForeColor = Cell(null);
+      var lastBackColor = Cell(null);
+      registerTextColorButton(editor, 'forecolor', 'forecolor', 'Text color', lastForeColor);
+      registerTextColorButton(editor, 'backcolor', 'hilitecolor', 'Background color', lastBackColor);
+      registerTextColorMenuItem(editor, 'forecolor', 'forecolor', 'Text color');
+      registerTextColorMenuItem(editor, 'backcolor', 'hilitecolor', 'Background color');
+    };
+
+    var forMenu = function (presets) {
+      if (presets === 'color') {
+        return 'tox-swatches';
+      } else {
+        return 'tox-menu';
+      }
+    };
+    var classes = function (presets) {
+      return {
+        backgroundMenu: 'tox-background-menu',
+        selectedMenu: 'tox-selected-menu',
+        selectedItem: 'tox-collection__item--active',
+        hasIcons: 'tox-menu--has-icons',
+        menu: forMenu(presets),
+        tieredMenu: 'tox-tiered-menu'
+      };
+    };
+
+    var markers$1 = function (presets) {
+      var menuClasses = classes(presets);
+      return {
+        backgroundMenu: menuClasses.backgroundMenu,
+        selectedMenu: menuClasses.selectedMenu,
+        menu: menuClasses.menu,
+        selectedItem: menuClasses.selectedItem,
+        item: classForPreset(presets)
+      };
+    };
+    var dom$1 = function (hasIcons, columns, presets) {
+      var menuClasses = classes(presets);
+      return {
+        tag: 'div',
+        classes: flatten([
+          [
+            menuClasses.menu,
+            'tox-menu-' + columns + '-column'
+          ],
+          hasIcons ? [menuClasses.hasIcons] : []
+        ])
+      };
+    };
+    var components$1 = [Menu.parts().items({})];
+    var part = function (hasIcons, columns, presets) {
+      var menuClasses = classes(presets);
+      var d = {
+        tag: 'div',
+        classes: flatten([[menuClasses.tieredMenu]])
+      };
+      return {
+        dom: d,
+        markers: markers$1(presets)
+      };
+    };
+
+    var chunk$1 = function (rowDom, numColumns) {
+      return function (items) {
+        var chunks = chunk(items, numColumns);
+        return map(chunks, function (c) {
+          return {
+            dom: rowDom,
+            components: c
+          };
+        });
+      };
+    };
+    var forSwatch = function (columns) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: [
+            'tox-menu',
+            'tox-swatches-menu'
+          ]
+        },
+        components: [{
+            dom: {
+              tag: 'div',
+              classes: ['tox-swatches']
+            },
+            components: [Menu.parts().items({
+                preprocess: columns !== 'auto' ? chunk$1({
+                  tag: 'div',
+                  classes: ['tox-swatches__row']
+                }, columns) : identity
+              })]
+          }]
+      };
+    };
+    var forToolbar = function (columns) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: [
+            'tox-menu',
+            'tox-collection',
+            'tox-collection--toolbar',
+            'tox-collection--toolbar-lg'
+          ]
+        },
+        components: [Menu.parts().items({
+            preprocess: chunk$1({
+              tag: 'div',
+              classes: ['tox-collection__group']
+            }, columns)
+          })]
+      };
+    };
+    var preprocessCollection = function (items, isSeparator) {
+      var allSplits = [];
+      var currentSplit = [];
+      each(items, function (item, i) {
+        if (isSeparator(item, i)) {
+          if (currentSplit.length > 0) {
+            allSplits.push(currentSplit);
+          }
+          currentSplit = [];
+          if (has(item.dom, 'innerHtml')) {
+            currentSplit.push(item);
+          }
+        } else {
+          currentSplit.push(item);
+        }
+      });
+      if (currentSplit.length > 0) {
+        allSplits.push(currentSplit);
+      }
+      return map(allSplits, function (s) {
+        return {
+          dom: {
+            tag: 'div',
+            classes: ['tox-collection__group']
+          },
+          components: s
+        };
+      });
+    };
+    var forCollection = function (columns, initItems, _hasIcons) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: [
+            'tox-menu',
+            'tox-collection'
+          ].concat(columns === 1 ? ['tox-collection--list'] : ['tox-collection--grid'])
+        },
+        components: [Menu.parts().items({
+            preprocess: function (items) {
+              if (columns !== 'auto' && columns > 1) {
+                return chunk$1({
+                  tag: 'div',
+                  classes: ['tox-collection__group']
+                }, columns)(items);
+              } else {
+                return preprocessCollection(items, function (_item, i) {
+                  return initItems[i].type === 'separator';
+                });
+              }
+            }
+          })]
+      };
+    };
+    var forHorizontalCollection = function (initItems, _hasIcons) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: [
+            'tox-collection',
+            'tox-collection--horizontal'
+          ]
+        },
+        components: [Menu.parts().items({
+            preprocess: function (items) {
+              return preprocessCollection(items, function (_item, i) {
+                return initItems[i].type === 'separator';
+              });
+            }
+          })]
+      };
+    };
+
+    var menuHasIcons = function (xs) {
+      return exists(xs, function (item) {
+        return 'icon' in item && item.icon !== undefined;
+      });
+    };
+    var handleError = function (error) {
+      domGlobals.console.error(formatError(error));
+      domGlobals.console.log(error);
+      return Option.none();
+    };
+    var createHorizontalPartialMenuWithAlloyItems = function (value, _hasIcons, items, _columns, _presets) {
+      var structure = forHorizontalCollection(items);
+      return {
+        value: value,
+        dom: structure.dom,
+        components: structure.components,
+        items: items
+      };
+    };
+    var createPartialMenuWithAlloyItems = function (value, hasIcons, items, columns, presets) {
+      if (presets === 'color') {
+        var structure = forSwatch(columns);
+        return {
+          value: value,
+          dom: structure.dom,
+          components: structure.components,
+          items: items
+        };
+      }
+      if (presets === 'normal' && columns === 'auto') {
+        var structure = forCollection(columns, items);
+        return {
+          value: value,
+          dom: structure.dom,
+          components: structure.components,
+          items: items
+        };
+      }
+      if (presets === 'normal' && columns === 1) {
+        var structure = forCollection(1, items);
+        return {
+          value: value,
+          dom: structure.dom,
+          components: structure.components,
+          items: items
+        };
+      }
+      if (presets === 'normal') {
+        var structure = forCollection(columns, items);
+        return {
+          value: value,
+          dom: structure.dom,
+          components: structure.components,
+          items: items
+        };
+      }
+      if (presets === 'listpreview' && columns !== 'auto') {
+        var structure = forToolbar(columns);
+        return {
+          value: value,
+          dom: structure.dom,
+          components: structure.components,
+          items: items
+        };
+      }
+      return {
+        value: value,
+        dom: dom$1(hasIcons, columns, presets),
+        components: components$1,
+        items: items
+      };
+    };
+
+    var createPartialChoiceMenu = function (value, items, onItemValueHandler, columns, presets, itemResponse, select, providersBackstage) {
+      var hasIcons = menuHasIcons(items);
+      var presetItemTypes = presets !== 'color' ? 'normal' : 'color';
+      var alloyItems = createChoiceItems(items, onItemValueHandler, columns, presetItemTypes, itemResponse, select, providersBackstage);
+      return createPartialMenuWithAlloyItems(value, hasIcons, alloyItems, columns, presets);
+    };
+    var createChoiceItems = function (items, onItemValueHandler, columns, itemPresets, itemResponse, select, providersBackstage) {
+      return cat(map(items, function (item) {
+        if (item.type === 'choiceitem') {
+          return createChoiceMenuItem(item).fold(handleError, function (d) {
+            return Option.some(renderChoiceItem(d, columns === 1, itemPresets, onItemValueHandler, select(item.value), itemResponse, providersBackstage, menuHasIcons(items)));
+          });
+        } else {
+          return Option.none();
+        }
+      }));
+    };
+
+    var deriveMenuMovement = function (columns, presets) {
+      var menuMarkers = markers$1(presets);
+      if (columns === 1) {
+        return {
+          mode: 'menu',
+          moveOnTab: true
+        };
+      } else if (columns === 'auto') {
+        return {
+          mode: 'grid',
+          selector: '.' + menuMarkers.item,
+          initSize: {
+            numColumns: 1,
+            numRows: 1
+          }
+        };
+      } else {
+        var rowClass = presets === 'color' ? 'tox-swatches__row' : 'tox-collection__group';
+        return {
+          mode: 'matrix',
+          rowSelector: '.' + rowClass
+        };
+      }
+    };
+    var deriveCollectionMovement = function (columns, presets) {
+      if (columns === 1) {
+        return {
+          mode: 'menu',
+          moveOnTab: false,
+          selector: '.tox-collection__item'
+        };
+      } else if (columns === 'auto') {
+        return {
+          mode: 'flatgrid',
+          selector: '.' + 'tox-collection__item',
+          initSize: {
+            numColumns: 1,
+            numRows: 1
+          }
+        };
+      } else {
+        return {
+          mode: 'matrix',
+          selectors: {
+            row: presets === 'color' ? '.tox-swatches__row' : '.tox-collection__group',
+            cell: presets === 'color' ? '.' + colorClass : '.' + selectableClass
+          }
+        };
+      }
+    };
+
+    function renderColorSwatchItem(spec, backstage) {
+      var items = getColors$1(backstage.colorinput.getColors(), backstage.colorinput.hasCustomColors());
+      var columns = backstage.colorinput.getColorCols();
+      var presets = 'color';
+      var menuSpec = createPartialChoiceMenu(generate$1('menu-value'), items, function (value) {
+        spec.onAction({ value: value });
+      }, columns, presets, ItemResponse$1.CLOSE_ON_EXECUTE, function () {
+        return false;
+      }, backstage.shared.providers);
+      var widgetSpec = __assign(__assign({}, menuSpec), {
+        markers: markers$1(presets),
+        movement: deriveMenuMovement(columns, presets)
+      });
+      return {
+        type: 'widget',
+        data: { value: generate$1('widget-id') },
+        dom: {
+          tag: 'div',
+          classes: ['tox-fancymenuitem']
+        },
+        autofocus: true,
+        components: [parts$2().widget(Menu.sketch(widgetSpec))]
+      };
+    }
+
+    var fancyMenuItems = {
+      inserttable: renderInsertTableMenuItem,
+      colorswatch: renderColorSwatchItem
+    };
+    var valueOpt = function (obj, key) {
+      return Object.prototype.hasOwnProperty.call(obj, key) ? Option.some(obj[key]) : Option.none();
+    };
+    var renderFancyMenuItem = function (spec, backstage) {
+      return valueOpt(fancyMenuItems, spec.fancytype).map(function (render) {
+        return render(spec, backstage);
+      });
+    };
+
+    var renderNormalItem = function (spec, itemResponse, providersBackstage, renderIcons) {
+      if (renderIcons === void 0) {
+        renderIcons = true;
+      }
+      var getApi = function (component) {
+        return {
+          isDisabled: function () {
+            return Disabling.isDisabled(component);
+          },
+          setDisabled: function (state) {
+            return Disabling.set(component, state);
+          }
+        };
+      };
+      var structure = renderItemStructure({
+        presets: 'normal',
+        iconContent: spec.icon,
+        textContent: spec.text,
+        htmlContent: Option.none(),
+        ariaLabel: spec.text,
+        caret: Option.none(),
+        checkMark: Option.none(),
+        shortcutContent: spec.shortcut
+      }, providersBackstage, renderIcons);
+      return renderCommonItem({
+        data: buildData(spec),
+        getApi: getApi,
+        disabled: spec.disabled,
+        onAction: spec.onAction,
+        onSetup: spec.onSetup,
+        triggersSubmenu: false,
+        itemBehaviours: []
+      }, structure, itemResponse, providersBackstage);
+    };
+
+    var renderNestedItem = function (spec, itemResponse, providersBackstage, renderIcons, downwardsCaret) {
+      if (renderIcons === void 0) {
+        renderIcons = true;
+      }
+      if (downwardsCaret === void 0) {
+        downwardsCaret = false;
+      }
+      var caret = downwardsCaret ? renderDownwardsCaret(providersBackstage.icons) : renderSubmenuCaret(providersBackstage.icons);
+      var getApi = function (component) {
+        return {
+          isDisabled: function () {
+            return Disabling.isDisabled(component);
+          },
+          setDisabled: function (state) {
+            return Disabling.set(component, state);
+          }
+        };
+      };
+      var structure = renderItemStructure({
+        presets: 'normal',
+        iconContent: spec.icon,
+        textContent: spec.text,
+        htmlContent: Option.none(),
+        ariaLabel: spec.text,
+        caret: Option.some(caret),
+        checkMark: Option.none(),
+        shortcutContent: spec.shortcut
+      }, providersBackstage, renderIcons);
+      return renderCommonItem({
+        data: buildData(spec),
+        getApi: getApi,
+        disabled: spec.disabled,
+        onAction: noop,
+        onSetup: spec.onSetup,
+        triggersSubmenu: true,
+        itemBehaviours: []
+      }, structure, itemResponse, providersBackstage);
+    };
+
+    var renderSeparatorItem = function (spec) {
+      var innerHtml = spec.text.fold(function () {
+        return {};
+      }, function (text) {
+        return { innerHtml: text };
+      });
+      return {
+        type: 'separator',
+        dom: __assign({
+          tag: 'div',
+          classes: [
+            selectableClass,
+            groupHeadingClass
+          ]
+        }, innerHtml),
+        components: []
+      };
+    };
+
+    var renderToggleMenuItem = function (spec, itemResponse, providersBackstage, renderIcons) {
+      if (renderIcons === void 0) {
+        renderIcons = true;
+      }
+      var getApi = function (component) {
+        return {
+          setActive: function (state) {
+            Toggling.set(component, state);
+          },
+          isActive: function () {
+            return Toggling.isOn(component);
+          },
+          isDisabled: function () {
+            return Disabling.isDisabled(component);
+          },
+          setDisabled: function (state) {
+            return Disabling.set(component, state);
+          }
+        };
+      };
+      var structure = renderItemStructure({
+        iconContent: spec.icon,
+        textContent: spec.text,
+        htmlContent: Option.none(),
+        ariaLabel: spec.text,
+        checkMark: Option.some(renderCheckmark(providersBackstage.icons)),
+        caret: Option.none(),
+        shortcutContent: spec.shortcut,
+        presets: 'normal',
+        meta: spec.meta
+      }, providersBackstage, renderIcons);
+      return deepMerge(renderCommonItem({
+        data: buildData(spec),
+        disabled: spec.disabled,
+        getApi: getApi,
+        onAction: spec.onAction,
+        onSetup: spec.onSetup,
+        triggersSubmenu: false,
+        itemBehaviours: []
+      }, structure, itemResponse, providersBackstage), {
+        toggling: {
+          toggleClass: tickedClass,
+          toggleOnExecute: false,
+          selected: spec.active
+        }
+      });
+    };
+
+    var autocomplete = renderAutocompleteItem;
+    var separator = renderSeparatorItem;
+    var normal = renderNormalItem;
+    var nested = renderNestedItem;
+    var toggle$1 = renderToggleMenuItem;
+    var fancy = renderFancyMenuItem;
+
+    var FocusMode;
+    (function (FocusMode) {
+      FocusMode[FocusMode['ContentFocus'] = 0] = 'ContentFocus';
+      FocusMode[FocusMode['UiFocus'] = 1] = 'UiFocus';
+    }(FocusMode || (FocusMode = {})));
+    var createMenuItemFromBridge = function (item, itemResponse, backstage, menuHasIcons, isHorizontalMenu) {
+      var providersBackstage = backstage.shared.providers;
+      var parseForHorizontalMenu = function (menuitem) {
+        return !isHorizontalMenu ? menuitem : __assign(__assign({}, menuitem), {
+          shortcut: Option.none(),
+          icon: menuitem.text.isSome() ? Option.none() : menuitem.icon
+        });
+      };
+      switch (item.type) {
+      case 'menuitem':
+        return createMenuItem(item).fold(handleError, function (d) {
+          return Option.some(normal(parseForHorizontalMenu(d), itemResponse, providersBackstage, menuHasIcons));
+        });
+      case 'nestedmenuitem':
+        return createNestedMenuItem(item).fold(handleError, function (d) {
+          return Option.some(nested(parseForHorizontalMenu(d), itemResponse, providersBackstage, menuHasIcons, isHorizontalMenu));
+        });
+      case 'togglemenuitem':
+        return createToggleMenuItem(item).fold(handleError, function (d) {
+          return Option.some(toggle$1(parseForHorizontalMenu(d), itemResponse, providersBackstage, menuHasIcons));
+        });
+      case 'separator':
+        return createSeparatorMenuItem(item).fold(handleError, function (d) {
+          return Option.some(separator(d));
+        });
+      case 'fancymenuitem':
+        return createFancyMenuItem(item).fold(handleError, function (d) {
+          return fancy(parseForHorizontalMenu(d), backstage);
+        });
+      default: {
+          domGlobals.console.error('Unknown item in general menu', item);
+          return Option.none();
+        }
+      }
+    };
+    var createAutocompleteItems = function (items, matchText, onItemValueHandler, columns, itemResponse, sharedBackstage) {
+      var renderText = columns === 1;
+      var renderIcons = !renderText || menuHasIcons(items);
+      return cat(map(items, function (item) {
+        if (item.type === 'separator') {
+          return createSeparatorItem(item).fold(handleError, function (d) {
+            return Option.some(separator(d));
+          });
+        } else {
+          return createAutocompleterItem(item).fold(handleError, function (d) {
+            return Option.some(autocomplete(d, matchText, renderText, 'normal', onItemValueHandler, itemResponse, sharedBackstage, renderIcons));
+          });
+        }
+      }));
+    };
+    var createPartialMenu = function (value, items, itemResponse, backstage, isHorizontalMenu) {
+      var hasIcons = menuHasIcons(items);
+      var alloyItems = cat(map(items, function (item) {
+        var itemHasIcon = function (i) {
+          return isHorizontalMenu ? !i.hasOwnProperty('text') : hasIcons;
+        };
+        var createItem = function (i) {
+          return createMenuItemFromBridge(i, itemResponse, backstage, itemHasIcon(i), isHorizontalMenu);
+        };
+        if (item.type === 'nestedmenuitem' && item.getSubmenuItems().length <= 0) {
+          return createItem(__assign(__assign({}, item), { disabled: true }));
+        } else {
+          return createItem(item);
+        }
+      }));
+      var createPartial = isHorizontalMenu ? createHorizontalPartialMenuWithAlloyItems : createPartialMenuWithAlloyItems;
+      return createPartial(value, hasIcons, alloyItems, 1, 'normal');
+    };
+    var createTieredDataFrom = function (partialMenu) {
+      return tieredMenu.singleData(partialMenu.value, partialMenu);
+    };
+    var createMenuFrom = function (partialMenu, columns, focusMode, presets) {
+      var focusManager = focusMode === FocusMode.ContentFocus ? highlights() : dom();
+      var movement = deriveMenuMovement(columns, presets);
+      var menuMarkers = markers$1(presets);
+      return {
+        dom: partialMenu.dom,
+        components: partialMenu.components,
+        items: partialMenu.items,
+        value: partialMenu.value,
+        markers: {
+          selectedItem: menuMarkers.selectedItem,
+          item: menuMarkers.item
+        },
+        movement: movement,
+        fakeFocus: focusMode === FocusMode.ContentFocus,
+        focusManager: focusManager,
+        menuBehaviours: SimpleBehaviours.unnamedEvents(columns !== 'auto' ? [] : [runOnAttached(function (comp, _se) {
+            detectSize(comp, 4, menuMarkers.item).each(function (_a) {
+              var numColumns = _a.numColumns, numRows = _a.numRows;
+              Keying.setGridSize(comp, numRows, numColumns);
+            });
+          })])
+      };
+    };
+
+    var register$2 = function (editor, sharedBackstage) {
+      var activeAutocompleter = Cell(Option.none());
+      var processingAction = Cell(false);
+      var autocompleter = build$1(InlineView.sketch({
+        dom: {
+          tag: 'div',
+          classes: ['tox-autocompleter']
+        },
+        components: [],
+        fireDismissalEventInstead: {},
+        inlineBehaviours: derive$1([config('dismissAutocompleter', [run(dismissRequested(), function () {
+              return cancelIfNecessary();
+            })])]),
+        lazySink: sharedBackstage.getSink
+      }));
+      var isMenuOpen = function () {
+        return InlineView.isOpen(autocompleter);
+      };
+      var isActive = function () {
+        return activeAutocompleter.get().isSome();
+      };
+      var hideIfNecessary = function () {
+        if (isActive()) {
+          InlineView.hide(autocompleter);
+        }
+      };
+      var cancelIfNecessary = function () {
+        if (isActive()) {
+          var lastElement = activeAutocompleter.get().map(function (ac) {
+            return ac.element;
+          });
+          detect$4(lastElement.getOr(Element.fromDom(editor.selection.getNode()))).each(unwrap);
+          hideIfNecessary();
+          activeAutocompleter.set(Option.none());
+          processingAction.set(false);
+        }
+      };
+      var getAutocompleters = cached(function () {
+        return register(editor);
+      });
+      var getCombinedItems = function (triggerChar, matches) {
+        var columns = findMap(matches, function (m) {
+          return Option.from(m.columns);
+        }).getOr(1);
+        return bind(matches, function (match) {
+          var choices = match.items;
+          return createAutocompleteItems(choices, match.matchText, function (itemValue, itemMeta) {
+            var nr = editor.selection.getRng();
+            getContext(editor.dom, nr, triggerChar).fold(function () {
+              return domGlobals.console.error('Lost context. Cursor probably moved');
+            }, function (_a) {
+              var range = _a.range;
+              var autocompleterApi = {
+                hide: function () {
+                  cancelIfNecessary();
+                },
+                reload: function (fetchOptions) {
+                  hideIfNecessary();
+                  load(fetchOptions);
+                }
+              };
+              processingAction.set(true);
+              match.onAction(autocompleterApi, range, itemValue, itemMeta);
+              processingAction.set(false);
+            });
+          }, columns, ItemResponse$1.BUBBLE_TO_SANDBOX, sharedBackstage);
+        });
+      };
+      var commenceIfNecessary = function (context) {
+        if (!isActive()) {
+          var wrapper = create$4(editor, context.range);
+          activeAutocompleter.set(Option.some({
+            triggerChar: context.triggerChar,
+            element: wrapper,
+            matchLength: context.text.length
+          }));
+          processingAction.set(false);
+        }
+      };
+      var display = function (ac, context, lookupData, items) {
+        ac.matchLength = context.text.length;
+        var columns = findMap(lookupData, function (ld) {
+          return Option.from(ld.columns);
+        }).getOr(1);
+        InlineView.showAt(autocompleter, {
+          anchor: 'node',
+          root: Element.fromDom(editor.getBody()),
+          node: Option.from(ac.element)
+        }, Menu.sketch(createMenuFrom(createPartialMenuWithAlloyItems('autocompleter-value', true, items, columns, 'normal'), columns, FocusMode.ContentFocus, 'normal')));
+        InlineView.getContent(autocompleter).each(Highlighting.highlightFirst);
+      };
+      var doLookup = function (fetchOptions) {
+        return activeAutocompleter.get().map(function (ac) {
+          return getContext(editor.dom, editor.selection.getRng(), ac.triggerChar).bind(function (newContext) {
+            return lookupWithContext(editor, getAutocompleters, newContext, fetchOptions);
+          });
+        }).getOrThunk(function () {
+          return lookup(editor, getAutocompleters);
+        });
+      };
+      var load = function (fetchOptions) {
+        doLookup(fetchOptions).fold(cancelIfNecessary, function (lookupInfo) {
+          commenceIfNecessary(lookupInfo.context);
+          lookupInfo.lookupData.then(function (lookupData) {
+            activeAutocompleter.get().map(function (ac) {
+              var context = lookupInfo.context;
+              if (ac.triggerChar === context.triggerChar) {
+                var combinedItems = getCombinedItems(context.triggerChar, lookupData);
+                if (combinedItems.length > 0) {
+                  display(ac, context, lookupData, combinedItems);
+                } else if (context.text.length - ac.matchLength >= 10) {
+                  cancelIfNecessary();
+                } else {
+                  hideIfNecessary();
+                }
+              }
+            });
+          });
+        });
+      };
+      var onKeypress = last$2(function (e) {
+        if (e.which === 27) {
+          return;
+        }
+        load();
+      }, 50);
+      var autocompleterUiApi = {
+        onKeypress: onKeypress,
+        cancelIfNecessary: cancelIfNecessary,
+        isMenuOpen: isMenuOpen,
+        isActive: isActive,
+        isProcessingAction: processingAction.get,
+        getView: function () {
+          return InlineView.getContent(autocompleter);
+        }
+      };
+      AutocompleterEditorEvents.setup(autocompleterUiApi, editor);
+    };
+    var Autocompleter = { register: register$2 };
+
+    var filter$2 = constant(true);
+    var bind$3 = function (element, event, handler) {
+      return bind$2(element, event, filter$2, handler);
+    };
+    var capture$1 = function (element, event, handler) {
+      return capture(element, event, filter$2, handler);
+    };
+    var fromRawEvent$1 = fromRawEvent;
+
+    var closest$4 = function (scope, selector, isRoot) {
+      return closest$3(scope, selector, isRoot).isSome();
+    };
+
+    function DelayedFunction (fun, delay) {
+      var ref = null;
+      var schedule = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        ref = domGlobals.setTimeout(function () {
+          fun.apply(null, args);
+          ref = null;
+        }, delay);
+      };
+      var cancel = function () {
+        if (ref !== null) {
+          domGlobals.clearTimeout(ref);
+          ref = null;
+        }
+      };
+      return {
+        cancel: cancel,
+        schedule: schedule
+      };
+    }
+
+    var SIGNIFICANT_MOVE = 5;
+    var LONGPRESS_DELAY = 400;
+    var getTouch = function (event) {
+      var raw = event.raw();
+      if (raw.touches === undefined || raw.touches.length !== 1) {
+        return Option.none();
+      }
+      return Option.some(raw.touches[0]);
+    };
+    var isFarEnough = function (touch, data) {
+      var distX = Math.abs(touch.clientX - data.x);
+      var distY = Math.abs(touch.clientY - data.y);
+      return distX > SIGNIFICANT_MOVE || distY > SIGNIFICANT_MOVE;
+    };
+    var monitor = function (settings) {
+      var startData = Cell(Option.none());
+      var longpressFired = Cell(false);
+      var longpress$1 = DelayedFunction(function (event) {
+        settings.triggerEvent(longpress(), event);
+        longpressFired.set(true);
+      }, LONGPRESS_DELAY);
+      var handleTouchstart = function (event) {
+        getTouch(event).each(function (touch) {
+          longpress$1.cancel();
+          var data = {
+            x: touch.clientX,
+            y: touch.clientY,
+            target: event.target()
+          };
+          longpress$1.schedule(event);
+          longpressFired.set(false);
+          startData.set(Option.some(data));
+        });
+        return Option.none();
+      };
+      var handleTouchmove = function (event) {
+        longpress$1.cancel();
+        getTouch(event).each(function (touch) {
+          startData.get().each(function (data) {
+            if (isFarEnough(touch, data)) {
+              startData.set(Option.none());
+            }
+          });
+        });
+        return Option.none();
+      };
+      var handleTouchend = function (event) {
+        longpress$1.cancel();
+        var isSame = function (data) {
+          return eq$1(data.target, event.target());
+        };
+        return startData.get().filter(isSame).map(function (_data) {
+          if (longpressFired.get()) {
+            event.prevent();
+            return false;
+          } else {
+            return settings.triggerEvent(tap(), event);
+          }
+        });
+      };
+      var handlers = wrapAll$1([
+        {
+          key: touchstart(),
+          value: handleTouchstart
+        },
+        {
+          key: touchmove(),
+          value: handleTouchmove
+        },
+        {
+          key: touchend(),
+          value: handleTouchend
+        }
+      ]);
+      var fireIfReady = function (event, type) {
+        return get(handlers, type).bind(function (handler) {
+          return handler(event);
+        });
+      };
+      return { fireIfReady: fireIfReady };
+    };
+
+    var isDangerous = function (event) {
+      var keyEv = event.raw();
+      return keyEv.which === BACKSPACE()[0] && !contains([
+        'input',
+        'textarea'
+      ], name(event.target())) && !closest$4(event.target(), '[contenteditable="true"]');
+    };
+    var isFirefox = function () {
+      return detect$3().browser.isFirefox();
+    };
+    var settingsSchema = objOfOnly([
+      strictFunction('triggerEvent'),
+      defaulted$1('stopBackspace', true)
+    ]);
+    var bindFocus = function (container, handler) {
+      if (isFirefox()) {
+        return capture$1(container, 'focus', handler);
+      } else {
+        return bind$3(container, 'focusin', handler);
+      }
+    };
+    var bindBlur = function (container, handler) {
+      if (isFirefox()) {
+        return capture$1(container, 'blur', handler);
+      } else {
+        return bind$3(container, 'focusout', handler);
+      }
+    };
+    var setup$1 = function (container, rawSettings) {
+      var settings = asRawOrDie('Getting GUI events settings', settingsSchema, rawSettings);
+      var pointerEvents = [
+        'touchstart',
+        'touchmove',
+        'touchend',
+        'touchcancel',
+        'gesturestart',
+        'mousedown',
+        'mouseup',
+        'mouseover',
+        'mousemove',
+        'mouseout',
+        'click'
+      ];
+      var tapEvent = monitor(settings);
+      var simpleEvents = map(pointerEvents.concat([
+        'selectstart',
+        'input',
+        'contextmenu',
+        'change',
+        'transitionend',
+        'drag',
+        'dragstart',
+        'dragend',
+        'dragenter',
+        'dragleave',
+        'dragover',
+        'drop',
+        'keyup'
+      ]), function (type) {
+        return bind$3(container, type, function (event) {
+          tapEvent.fireIfReady(event, type).each(function (tapStopped) {
+            if (tapStopped) {
+              event.kill();
+            }
+          });
+          var stopped = settings.triggerEvent(type, event);
+          if (stopped) {
+            event.kill();
+          }
+        });
+      });
+      var pasteTimeout = Cell(Option.none());
+      var onPaste = bind$3(container, 'paste', function (event) {
+        tapEvent.fireIfReady(event, 'paste').each(function (tapStopped) {
+          if (tapStopped) {
+            event.kill();
+          }
+        });
+        var stopped = settings.triggerEvent('paste', event);
+        if (stopped) {
+          event.kill();
+        }
+        pasteTimeout.set(Option.some(domGlobals.setTimeout(function () {
+          settings.triggerEvent(postPaste(), event);
+        }, 0)));
+      });
+      var onKeydown = bind$3(container, 'keydown', function (event) {
+        var stopped = settings.triggerEvent('keydown', event);
+        if (stopped) {
+          event.kill();
+        } else if (settings.stopBackspace === true && isDangerous(event)) {
+          event.prevent();
+        }
+      });
+      var onFocusIn = bindFocus(container, function (event) {
+        var stopped = settings.triggerEvent('focusin', event);
+        if (stopped) {
+          event.kill();
+        }
+      });
+      var focusoutTimeout = Cell(Option.none());
+      var onFocusOut = bindBlur(container, function (event) {
+        var stopped = settings.triggerEvent('focusout', event);
+        if (stopped) {
+          event.kill();
+        }
+        focusoutTimeout.set(Option.some(domGlobals.setTimeout(function () {
+          settings.triggerEvent(postBlur(), event);
+        }, 0)));
+      });
+      var unbind = function () {
+        each(simpleEvents, function (e) {
+          e.unbind();
+        });
+        onKeydown.unbind();
+        onFocusIn.unbind();
+        onFocusOut.unbind();
+        onPaste.unbind();
+        pasteTimeout.get().each(domGlobals.clearTimeout);
+        focusoutTimeout.get().each(domGlobals.clearTimeout);
+      };
+      return { unbind: unbind };
+    };
+
+    var derive$2 = function (rawEvent, rawTarget) {
+      var source = get(rawEvent, 'target').map(function (getTarget) {
+        return getTarget();
+      }).getOr(rawTarget);
+      return Cell(source);
+    };
+
+    var fromSource = function (event, source) {
+      var stopper = Cell(false);
+      var cutter = Cell(false);
+      var stop = function () {
+        stopper.set(true);
+      };
+      var cut = function () {
+        cutter.set(true);
+      };
+      return {
+        stop: stop,
+        cut: cut,
+        isStopped: stopper.get,
+        isCut: cutter.get,
+        event: constant(event),
+        setSource: source.set,
+        getSource: source.get
+      };
+    };
+    var fromExternal = function (event) {
+      var stopper = Cell(false);
+      var stop = function () {
+        stopper.set(true);
+      };
+      return {
+        stop: stop,
+        cut: noop,
+        isStopped: stopper.get,
+        isCut: constant(false),
+        event: constant(event),
+        setSource: die('Cannot set source of a broadcasted event'),
+        getSource: die('Cannot get source of a broadcasted event')
+      };
+    };
+
+    var adt$b = Adt.generate([
+      { stopped: [] },
+      { resume: ['element'] },
+      { complete: [] }
+    ]);
+    var doTriggerHandler = function (lookup, eventType, rawEvent, target, source, logger) {
+      var handler = lookup(eventType, target);
+      var simulatedEvent = fromSource(rawEvent, source);
+      return handler.fold(function () {
+        logger.logEventNoHandlers(eventType, target);
+        return adt$b.complete();
+      }, function (handlerInfo) {
+        var descHandler = handlerInfo.descHandler;
+        var eventHandler = getCurried(descHandler);
+        eventHandler(simulatedEvent);
+        if (simulatedEvent.isStopped()) {
+          logger.logEventStopped(eventType, handlerInfo.element, descHandler.purpose());
+          return adt$b.stopped();
+        } else if (simulatedEvent.isCut()) {
+          logger.logEventCut(eventType, handlerInfo.element, descHandler.purpose());
+          return adt$b.complete();
+        } else {
+          return parent(handlerInfo.element).fold(function () {
+            logger.logNoParent(eventType, handlerInfo.element, descHandler.purpose());
+            return adt$b.complete();
+          }, function (parent) {
+            logger.logEventResponse(eventType, handlerInfo.element, descHandler.purpose());
+            return adt$b.resume(parent);
+          });
+        }
+      });
+    };
+    var doTriggerOnUntilStopped = function (lookup, eventType, rawEvent, rawTarget, source, logger) {
+      return doTriggerHandler(lookup, eventType, rawEvent, rawTarget, source, logger).fold(function () {
+        return true;
+      }, function (parent) {
+        return doTriggerOnUntilStopped(lookup, eventType, rawEvent, parent, source, logger);
+      }, function () {
+        return false;
+      });
+    };
+    var triggerHandler = function (lookup, eventType, rawEvent, target, logger) {
+      var source = derive$2(rawEvent, target);
+      return doTriggerHandler(lookup, eventType, rawEvent, target, source, logger);
+    };
+    var broadcast = function (listeners, rawEvent, _logger) {
+      var simulatedEvent = fromExternal(rawEvent);
+      each(listeners, function (listener) {
+        var descHandler = listener.descHandler();
+        var handler = getCurried(descHandler);
+        handler(simulatedEvent);
+      });
+      return simulatedEvent.isStopped();
+    };
+    var triggerUntilStopped = function (lookup, eventType, rawEvent, logger) {
+      var rawTarget = rawEvent.target();
+      return triggerOnUntilStopped(lookup, eventType, rawEvent, rawTarget, logger);
+    };
+    var triggerOnUntilStopped = function (lookup, eventType, rawEvent, rawTarget, logger) {
+      var source = derive$2(rawEvent, rawTarget);
+      return doTriggerOnUntilStopped(lookup, eventType, rawEvent, rawTarget, source, logger);
+    };
+
+    var eventHandler = function (element, descHandler) {
+      return {
+        element: element,
+        descHandler: descHandler
+      };
+    };
+    var broadcastHandler = function (id, handler) {
+      return {
+        id: constant(id),
+        descHandler: constant(handler)
+      };
+    };
+    function EventRegistry () {
+      var registry = {};
+      var registerId = function (extraArgs, id, events) {
+        each$1(events, function (v, k) {
+          var handlers = registry[k] !== undefined ? registry[k] : {};
+          handlers[id] = curryArgs(v, extraArgs);
+          registry[k] = handlers;
+        });
+      };
+      var findHandler = function (handlers, elem) {
+        return read$1(elem).fold(function () {
+          return Option.none();
+        }, function (id) {
+          return handlers.bind(function (h) {
+            return get(h, id);
+          }).map(function (descHandler) {
+            return eventHandler(elem, descHandler);
+          });
+        });
+      };
+      var filterByType = function (type) {
+        return get(registry, type).map(function (handlers) {
+          return mapToArray(handlers, function (f, id) {
+            return broadcastHandler(id, f);
+          });
+        }).getOr([]);
+      };
+      var find = function (isAboveRoot, type, target) {
+        var handlers = get(registry, type);
+        return closest(target, function (elem) {
+          return findHandler(handlers, elem);
+        }, isAboveRoot);
+      };
+      var unregisterId = function (id) {
+        each$1(registry, function (handlersById, _eventName) {
+          if (handlersById.hasOwnProperty(id)) {
+            delete handlersById[id];
+          }
+        });
+      };
+      return {
+        registerId: registerId,
+        unregisterId: unregisterId,
+        filterByType: filterByType,
+        find: find
+      };
+    }
+
+    function Registry () {
+      var events = EventRegistry();
+      var components = {};
+      var readOrTag = function (component) {
+        var elem = component.element();
+        return read$1(elem).fold(function () {
+          return write('uid-', component.element());
+        }, function (uid) {
+          return uid;
+        });
+      };
+      var failOnDuplicate = function (component, tagId) {
+        var conflict = components[tagId];
+        if (conflict === component) {
+          unregister(component);
+        } else {
+          throw new Error('The tagId "' + tagId + '" is already used by: ' + element(conflict.element()) + '\nCannot use it for: ' + element(component.element()) + '\n' + 'The conflicting element is' + (inBody(conflict.element()) ? ' ' : ' not ') + 'already in the DOM');
+        }
+      };
+      var register = function (component) {
+        var tagId = readOrTag(component);
+        if (hasNonNullableKey(components, tagId)) {
+          failOnDuplicate(component, tagId);
+        }
+        var extraArgs = [component];
+        events.registerId(extraArgs, tagId, component.events());
+        components[tagId] = component;
+      };
+      var unregister = function (component) {
+        read$1(component.element()).each(function (tagId) {
+          delete components[tagId];
+          events.unregisterId(tagId);
+        });
+      };
+      var filter = function (type) {
+        return events.filterByType(type);
+      };
+      var find = function (isAboveRoot, type, target) {
+        return events.find(isAboveRoot, type, target);
+      };
+      var getById = function (id) {
+        return get(components, id);
+      };
+      return {
+        find: find,
+        filter: filter,
+        register: register,
+        unregister: unregister,
+        getById: getById
+      };
+    }
+
+    var factory$3 = function (detail) {
+      var _a = detail.dom, attributes = _a.attributes, domWithoutAttributes = __rest(_a, ['attributes']);
+      return {
+        uid: detail.uid,
+        dom: __assign({
+          tag: 'div',
+          attributes: __assign({ role: 'presentation' }, attributes)
+        }, domWithoutAttributes),
+        components: detail.components,
+        behaviours: get$c(detail.containerBehaviours),
+        events: detail.events,
+        domModification: detail.domModification,
+        eventOrder: detail.eventOrder
+      };
+    };
+    var Container = single$2({
+      name: 'Container',
+      factory: factory$3,
+      configFields: [
+        defaulted$1('components', []),
+        field$1('containerBehaviours', []),
+        defaulted$1('events', {}),
+        defaulted$1('domModification', {}),
+        defaulted$1('eventOrder', {})
+      ]
+    });
+
+    var takeover = function (root) {
+      var isAboveRoot = function (el) {
+        return parent(root.element()).fold(function () {
+          return true;
+        }, function (parent) {
+          return eq$1(el, parent);
+        });
+      };
+      var registry = Registry();
+      var lookup = function (eventName, target) {
+        return registry.find(isAboveRoot, eventName, target);
+      };
+      var domEvents = setup$1(root.element(), {
+        triggerEvent: function (eventName, event) {
+          return monitorEvent(eventName, event.target(), function (logger) {
+            return triggerUntilStopped(lookup, eventName, event, logger);
+          });
+        }
+      });
+      var systemApi = {
+        debugInfo: constant('real'),
+        triggerEvent: function (eventName, target, data) {
+          monitorEvent(eventName, target, function (logger) {
+            return triggerOnUntilStopped(lookup, eventName, data, target, logger);
+          });
+        },
+        triggerFocus: function (target, originator) {
+          read$1(target).fold(function () {
+            focus$1(target);
+          }, function (_alloyId) {
+            monitorEvent(focus(), target, function (logger) {
+              triggerHandler(lookup, focus(), {
+                originator: constant(originator),
+                kill: noop,
+                prevent: noop,
+                target: constant(target)
+              }, target, logger);
+              return false;
+            });
+          });
+        },
+        triggerEscape: function (comp, simulatedEvent) {
+          systemApi.triggerEvent('keydown', comp.element(), simulatedEvent.event());
+        },
+        getByUid: function (uid) {
+          return getByUid(uid);
+        },
+        getByDom: function (elem) {
+          return getByDom(elem);
+        },
+        build: build$1,
+        addToGui: function (c) {
+          add(c);
+        },
+        removeFromGui: function (c) {
+          remove$1(c);
+        },
+        addToWorld: function (c) {
+          addToWorld(c);
+        },
+        removeFromWorld: function (c) {
+          removeFromWorld(c);
+        },
+        broadcast: function (message) {
+          broadcast$1(message);
+        },
+        broadcastOn: function (channels, message) {
+          broadcastOn(channels, message);
+        },
+        broadcastEvent: function (eventName, event) {
+          broadcastEvent(eventName, event);
+        },
+        isConnected: constant(true)
+      };
+      var addToWorld = function (component) {
+        component.connect(systemApi);
+        if (!isText(component.element())) {
+          registry.register(component);
+          each(component.components(), addToWorld);
+          systemApi.triggerEvent(systemInit(), component.element(), { target: constant(component.element()) });
+        }
+      };
+      var removeFromWorld = function (component) {
+        if (!isText(component.element())) {
+          each(component.components(), removeFromWorld);
+          registry.unregister(component);
+        }
+        component.disconnect();
+      };
+      var add = function (component) {
+        attach$1(root, component);
+      };
+      var remove$1 = function (component) {
+        detach(component);
+      };
+      var destroy = function () {
+        domEvents.unbind();
+        remove(root.element());
+      };
+      var broadcastData = function (data) {
+        var receivers = registry.filter(receive());
+        each(receivers, function (receiver) {
+          var descHandler = receiver.descHandler();
+          var handler = getCurried(descHandler);
+          handler(data);
+        });
+      };
+      var broadcast$1 = function (message) {
+        broadcastData({
+          universal: constant(true),
+          data: constant(message)
+        });
+      };
+      var broadcastOn = function (channels, message) {
+        broadcastData({
+          universal: constant(false),
+          channels: constant(channels),
+          data: constant(message)
+        });
+      };
+      var broadcastEvent = function (eventName, event) {
+        var listeners = registry.filter(eventName);
+        return broadcast(listeners, event);
+      };
+      var getByUid = function (uid) {
+        return registry.getById(uid).fold(function () {
+          return Result.error(new Error('Could not find component with uid: "' + uid + '" in system.'));
+        }, Result.value);
+      };
+      var getByDom = function (elem) {
+        var uid = read$1(elem).getOr('not found');
+        return getByUid(uid);
+      };
+      addToWorld(root);
+      return {
+        root: constant(root),
+        element: root.element,
+        destroy: destroy,
+        add: add,
+        remove: remove$1,
+        getByUid: getByUid,
+        getByDom: getByDom,
+        addToWorld: addToWorld,
+        removeFromWorld: removeFromWorld,
+        broadcast: broadcast$1,
+        broadcastOn: broadcastOn,
+        broadcastEvent: broadcastEvent
+      };
+    };
+
+    var formChangeEvent = generate$1('form-component-change');
+    var formCloseEvent = generate$1('form-close');
+    var formCancelEvent = generate$1('form-cancel');
+    var formActionEvent = generate$1('form-action');
+    var formSubmitEvent = generate$1('form-submit');
+    var formBlockEvent = generate$1('form-block');
+    var formUnblockEvent = generate$1('form-unblock');
+    var formTabChangeEvent = generate$1('form-tabchange');
+    var formResizeEvent = generate$1('form-resize');
+
+    var renderAlertBanner = function (spec, providersBackstage) {
+      return Container.sketch({
+        dom: {
+          tag: 'div',
+          attributes: { role: 'alert' },
+          classes: [
+            'tox-notification',
+            'tox-notification--in',
+            'tox-notification--' + spec.level
+          ]
+        },
+        components: [
+          {
+            dom: {
+              tag: 'div',
+              classes: ['tox-notification__icon']
+            },
+            components: [Button.sketch({
+                dom: {
+                  tag: 'button',
+                  classes: [
+                    'tox-button',
+                    'tox-button--naked',
+                    'tox-button--icon'
+                  ],
+                  innerHtml: get$d(spec.icon, providersBackstage.icons),
+                  attributes: { title: providersBackstage.translate(spec.iconTooltip) }
+                },
+                action: function (comp) {
+                  emitWith(comp, formActionEvent, {
+                    name: 'alert-banner',
+                    value: spec.url
+                  });
+                }
+              })]
+          },
+          {
+            dom: {
+              tag: 'div',
+              classes: ['tox-notification__body'],
+              innerHtml: providersBackstage.translate(spec.text)
+            }
+          }
+        ]
+      });
+    };
+
+    var renderBar = function (spec, backstage) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: [
+            'tox-bar',
+            'tox-form__controls-h-stack'
+          ]
+        },
+        components: map(spec.items, backstage.interpreter)
+      };
+    };
+
+    var schema$e = constant([
+      defaulted$1('prefix', 'form-field'),
+      field$1('fieldBehaviours', [
+        Composing,
+        Representing
+      ])
+    ]);
+    var parts$3 = constant([
+      optional({
+        schema: [strict$1('dom')],
+        name: 'label'
+      }),
+      optional({
+        factory: {
+          sketch: function (spec) {
+            return {
+              uid: spec.uid,
+              dom: {
+                tag: 'span',
+                styles: { display: 'none' },
+                attributes: { 'aria-hidden': 'true' },
+                innerHtml: spec.text
+              }
+            };
+          }
+        },
+        schema: [strict$1('text')],
+        name: 'aria-descriptor'
+      }),
+      required({
+        factory: {
+          sketch: function (spec) {
+            var excludeFactory = exclude$1(spec, ['factory']);
+            return spec.factory.sketch(excludeFactory);
+          }
+        },
+        schema: [strict$1('factory')],
+        name: 'field'
+      })
+    ]);
+
+    var factory$4 = function (detail, components, _spec, _externals) {
+      var behaviours = augment(detail.fieldBehaviours, [
+        Composing.config({
+          find: function (container) {
+            return getPart(container, detail, 'field');
+          }
+        }),
+        Representing.config({
+          store: {
+            mode: 'manual',
+            getValue: function (field) {
+              return Composing.getCurrent(field).bind(Representing.getValue);
+            },
+            setValue: function (field, value) {
+              Composing.getCurrent(field).each(function (current) {
+                Representing.setValue(current, value);
+              });
+            }
+          }
+        })
+      ]);
+      var events = derive([runOnAttached(function (component, _simulatedEvent) {
+          var ps = getParts(component, detail, [
+            'label',
+            'field',
+            'aria-descriptor'
+          ]);
+          ps.field().each(function (field) {
+            var id = generate$1(detail.prefix);
+            ps.label().each(function (label) {
+              set$1(label.element(), 'for', id);
+              set$1(field.element(), 'id', id);
+            });
+            ps['aria-descriptor']().each(function (descriptor) {
+              var descriptorId = generate$1(detail.prefix);
+              set$1(descriptor.element(), 'id', descriptorId);
+              set$1(field.element(), 'aria-describedby', descriptorId);
+            });
+          });
+        })]);
+      var apis = {
+        getField: function (container) {
+          return getPart(container, detail, 'field');
+        },
+        getLabel: function (container) {
+          return getPart(container, detail, 'label');
+        }
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        behaviours: behaviours,
+        events: events,
+        apis: apis
+      };
+    };
+    var FormField = composite$1({
+      name: 'FormField',
+      configFields: schema$e(),
+      partFields: parts$3(),
+      factory: factory$4,
+      apis: {
+        getField: function (apis, comp) {
+          return apis.getField(comp);
+        },
+        getLabel: function (apis, comp) {
+          return apis.getLabel(comp);
+        }
+      }
+    });
+
+    var schema$f = constant([
+      option('data'),
+      defaulted$1('inputAttributes', {}),
+      defaulted$1('inputStyles', {}),
+      defaulted$1('tag', 'input'),
+      defaulted$1('inputClasses', []),
+      onHandler('onSetValue'),
+      defaulted$1('styles', {}),
+      defaulted$1('eventOrder', {}),
+      field$1('inputBehaviours', [
+        Representing,
+        Focusing
+      ]),
+      defaulted$1('selectOnFocus', true)
+    ]);
+    var focusBehaviours = function (detail) {
+      return derive$1([Focusing.config({
+          onFocus: !detail.selectOnFocus ? noop : function (component) {
+            var input = component.element();
+            var value = get$5(input);
+            input.dom().setSelectionRange(0, value.length);
+          }
+        })]);
+    };
+    var behaviours = function (detail) {
+      return __assign(__assign({}, focusBehaviours(detail)), augment(detail.inputBehaviours, [Representing.config({
+          store: __assign(__assign({ mode: 'manual' }, detail.data.map(function (data) {
+            return { initialValue: data };
+          }).getOr({})), {
+            getValue: function (input) {
+              return get$5(input.element());
+            },
+            setValue: function (input, data) {
+              var current = get$5(input.element());
+              if (current !== data) {
+                set$3(input.element(), data);
+              }
+            }
+          }),
+          onSetValue: detail.onSetValue
+        })]));
+    };
+    var dom$2 = function (detail) {
+      return {
+        tag: detail.tag,
+        attributes: __assign({ type: 'text' }, detail.inputAttributes),
+        styles: detail.inputStyles,
+        classes: detail.inputClasses
+      };
+    };
+
+    var factory$5 = function (detail, _spec) {
+      return {
+        uid: detail.uid,
+        dom: dom$2(detail),
+        components: [],
+        behaviours: behaviours(detail),
+        eventOrder: detail.eventOrder
+      };
+    };
+    var Input = single$2({
+      name: 'Input',
+      configFields: schema$f(),
+      factory: factory$5
+    });
+
+    var exports$1 = {}, module = { exports: exports$1 };
+    (function (define, exports, module, require) {
+      (function (f) {
+        if (typeof exports === 'object' && typeof module !== 'undefined') {
+          module.exports = f();
+        } else if (typeof define === 'function' && define.amd) {
+          define([], f);
+        } else {
+          var g;
+          if (typeof window !== 'undefined') {
+            g = window;
+          } else if (typeof global !== 'undefined') {
+            g = global;
+          } else if (typeof self !== 'undefined') {
+            g = self;
+          } else {
+            g = this;
+          }
+          g.EphoxContactWrapper = f();
+        }
+      }(function () {
+        return function () {
+          function r(e, n, t) {
+            function o(i, f) {
+              if (!n[i]) {
+                if (!e[i]) {
+                  var c = 'function' == typeof require && require;
+                  if (!f && c)
+                    return c(i, !0);
+                  if (u)
+                    return u(i, !0);
+                  var a = new Error('Cannot find module \'' + i + '\'');
+                  throw a.code = 'MODULE_NOT_FOUND', a;
+                }
+                var p = n[i] = { exports: {} };
+                e[i][0].call(p.exports, function (r) {
+                  var n = e[i][1][r];
+                  return o(n || r);
+                }, p, p.exports, r, e, n, t);
+              }
+              return n[i].exports;
+            }
+            for (var u = 'function' == typeof require && require, i = 0; i < t.length; i++)
+              o(t[i]);
+            return o;
+          }
+          return r;
+        }()({
+          1: [
+            function (require, module, exports) {
+              var process = module.exports = {};
+              var cachedSetTimeout;
+              var cachedClearTimeout;
+              function defaultSetTimout() {
+                throw new Error('setTimeout has not been defined');
+              }
+              function defaultClearTimeout() {
+                throw new Error('clearTimeout has not been defined');
+              }
+              (function () {
+                try {
+                  if (typeof setTimeout === 'function') {
+                    cachedSetTimeout = setTimeout;
+                  } else {
+                    cachedSetTimeout = defaultSetTimout;
+                  }
+                } catch (e) {
+                  cachedSetTimeout = defaultSetTimout;
+                }
+                try {
+                  if (typeof clearTimeout === 'function') {
+                    cachedClearTimeout = clearTimeout;
+                  } else {
+                    cachedClearTimeout = defaultClearTimeout;
+                  }
+                } catch (e) {
+                  cachedClearTimeout = defaultClearTimeout;
+                }
+              }());
+              function runTimeout(fun) {
+                if (cachedSetTimeout === setTimeout) {
+                  return setTimeout(fun, 0);
+                }
+                if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+                  cachedSetTimeout = setTimeout;
+                  return setTimeout(fun, 0);
+                }
+                try {
+                  return cachedSetTimeout(fun, 0);
+                } catch (e) {
+                  try {
+                    return cachedSetTimeout.call(null, fun, 0);
+                  } catch (e) {
+                    return cachedSetTimeout.call(this, fun, 0);
+                  }
+                }
+              }
+              function runClearTimeout(marker) {
+                if (cachedClearTimeout === clearTimeout) {
+                  return clearTimeout(marker);
+                }
+                if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+                  cachedClearTimeout = clearTimeout;
+                  return clearTimeout(marker);
+                }
+                try {
+                  return cachedClearTimeout(marker);
+                } catch (e) {
+                  try {
+                    return cachedClearTimeout.call(null, marker);
+                  } catch (e) {
+                    return cachedClearTimeout.call(this, marker);
+                  }
+                }
+              }
+              var queue = [];
+              var draining = false;
+              var currentQueue;
+              var queueIndex = -1;
+              function cleanUpNextTick() {
+                if (!draining || !currentQueue) {
+                  return;
+                }
+                draining = false;
+                if (currentQueue.length) {
+                  queue = currentQueue.concat(queue);
+                } else {
+                  queueIndex = -1;
+                }
+                if (queue.length) {
+                  drainQueue();
+                }
+              }
+              function drainQueue() {
+                if (draining) {
+                  return;
+                }
+                var timeout = runTimeout(cleanUpNextTick);
+                draining = true;
+                var len = queue.length;
+                while (len) {
+                  currentQueue = queue;
+                  queue = [];
+                  while (++queueIndex < len) {
+                    if (currentQueue) {
+                      currentQueue[queueIndex].run();
+                    }
+                  }
+                  queueIndex = -1;
+                  len = queue.length;
+                }
+                currentQueue = null;
+                draining = false;
+                runClearTimeout(timeout);
+              }
+              process.nextTick = function (fun) {
+                var args = new Array(arguments.length - 1);
+                if (arguments.length > 1) {
+                  for (var i = 1; i < arguments.length; i++) {
+                    args[i - 1] = arguments[i];
+                  }
+                }
+                queue.push(new Item(fun, args));
+                if (queue.length === 1 && !draining) {
+                  runTimeout(drainQueue);
+                }
+              };
+              function Item(fun, array) {
+                this.fun = fun;
+                this.array = array;
+              }
+              Item.prototype.run = function () {
+                this.fun.apply(null, this.array);
+              };
+              process.title = 'browser';
+              process.browser = true;
+              process.env = {};
+              process.argv = [];
+              process.version = '';
+              process.versions = {};
+              function noop() {
+              }
+              process.on = noop;
+              process.addListener = noop;
+              process.once = noop;
+              process.off = noop;
+              process.removeListener = noop;
+              process.removeAllListeners = noop;
+              process.emit = noop;
+              process.prependListener = noop;
+              process.prependOnceListener = noop;
+              process.listeners = function (name) {
+                return [];
+              };
+              process.binding = function (name) {
+                throw new Error('process.binding is not supported');
+              };
+              process.cwd = function () {
+                return '/';
+              };
+              process.chdir = function (dir) {
+                throw new Error('process.chdir is not supported');
+              };
+              process.umask = function () {
+                return 0;
+              };
+            },
+            {}
+          ],
+          2: [
+            function (require, module, exports) {
+              (function (setImmediate) {
+                (function (root) {
+                  var setTimeoutFunc = setTimeout;
+                  function noop() {
+                  }
+                  function bind(fn, thisArg) {
+                    return function () {
+                      fn.apply(thisArg, arguments);
+                    };
+                  }
+                  function Promise(fn) {
+                    if (typeof this !== 'object')
+                      throw new TypeError('Promises must be constructed via new');
+                    if (typeof fn !== 'function')
+                      throw new TypeError('not a function');
+                    this._state = 0;
+                    this._handled = false;
+                    this._value = undefined;
+                    this._deferreds = [];
+                    doResolve(fn, this);
+                  }
+                  function handle(self, deferred) {
+                    while (self._state === 3) {
+                      self = self._value;
+                    }
+                    if (self._state === 0) {
+                      self._deferreds.push(deferred);
+                      return;
+                    }
+                    self._handled = true;
+                    Promise._immediateFn(function () {
+                      var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
+                      if (cb === null) {
+                        (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
+                        return;
+                      }
+                      var ret;
+                      try {
+                        ret = cb(self._value);
+                      } catch (e) {
+                        reject(deferred.promise, e);
+                        return;
+                      }
+                      resolve(deferred.promise, ret);
+                    });
+                  }
+                  function resolve(self, newValue) {
+                    try {
+                      if (newValue === self)
+                        throw new TypeError('A promise cannot be resolved with itself.');
+                      if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
+                        var then = newValue.then;
+                        if (newValue instanceof Promise) {
+                          self._state = 3;
+                          self._value = newValue;
+                          finale(self);
+                          return;
+                        } else if (typeof then === 'function') {
+                          doResolve(bind(then, newValue), self);
+                          return;
+                        }
+                      }
+                      self._state = 1;
+                      self._value = newValue;
+                      finale(self);
+                    } catch (e) {
+                      reject(self, e);
+                    }
+                  }
+                  function reject(self, newValue) {
+                    self._state = 2;
+                    self._value = newValue;
+                    finale(self);
+                  }
+                  function finale(self) {
+                    if (self._state === 2 && self._deferreds.length === 0) {
+                      Promise._immediateFn(function () {
+                        if (!self._handled) {
+                          Promise._unhandledRejectionFn(self._value);
+                        }
+                      });
+                    }
+                    for (var i = 0, len = self._deferreds.length; i < len; i++) {
+                      handle(self, self._deferreds[i]);
+                    }
+                    self._deferreds = null;
+                  }
+                  function Handler(onFulfilled, onRejected, promise) {
+                    this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
+                    this.onRejected = typeof onRejected === 'function' ? onRejected : null;
+                    this.promise = promise;
+                  }
+                  function doResolve(fn, self) {
+                    var done = false;
+                    try {
+                      fn(function (value) {
+                        if (done)
+                          return;
+                        done = true;
+                        resolve(self, value);
+                      }, function (reason) {
+                        if (done)
+                          return;
+                        done = true;
+                        reject(self, reason);
+                      });
+                    } catch (ex) {
+                      if (done)
+                        return;
+                      done = true;
+                      reject(self, ex);
+                    }
+                  }
+                  Promise.prototype['catch'] = function (onRejected) {
+                    return this.then(null, onRejected);
+                  };
+                  Promise.prototype.then = function (onFulfilled, onRejected) {
+                    var prom = new this.constructor(noop);
+                    handle(this, new Handler(onFulfilled, onRejected, prom));
+                    return prom;
+                  };
+                  Promise.all = function (arr) {
+                    var args = Array.prototype.slice.call(arr);
+                    return new Promise(function (resolve, reject) {
+                      if (args.length === 0)
+                        return resolve([]);
+                      var remaining = args.length;
+                      function res(i, val) {
+                        try {
+                          if (val && (typeof val === 'object' || typeof val === 'function')) {
+                            var then = val.then;
+                            if (typeof then === 'function') {
+                              then.call(val, function (val) {
+                                res(i, val);
+                              }, reject);
+                              return;
+                            }
+                          }
+                          args[i] = val;
+                          if (--remaining === 0) {
+                            resolve(args);
+                          }
+                        } catch (ex) {
+                          reject(ex);
+                        }
+                      }
+                      for (var i = 0; i < args.length; i++) {
+                        res(i, args[i]);
+                      }
+                    });
+                  };
+                  Promise.resolve = function (value) {
+                    if (value && typeof value === 'object' && value.constructor === Promise) {
+                      return value;
+                    }
+                    return new Promise(function (resolve) {
+                      resolve(value);
+                    });
+                  };
+                  Promise.reject = function (value) {
+                    return new Promise(function (resolve, reject) {
+                      reject(value);
+                    });
+                  };
+                  Promise.race = function (values) {
+                    return new Promise(function (resolve, reject) {
+                      for (var i = 0, len = values.length; i < len; i++) {
+                        values[i].then(resolve, reject);
+                      }
+                    });
+                  };
+                  Promise._immediateFn = typeof setImmediate === 'function' ? function (fn) {
+                    setImmediate(fn);
+                  } : function (fn) {
+                    setTimeoutFunc(fn, 0);
+                  };
+                  Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
+                    if (typeof console !== 'undefined' && console) {
+                      console.warn('Possible Unhandled Promise Rejection:', err);
+                    }
+                  };
+                  Promise._setImmediateFn = function _setImmediateFn(fn) {
+                    Promise._immediateFn = fn;
+                  };
+                  Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {
+                    Promise._unhandledRejectionFn = fn;
+                  };
+                  if (typeof module !== 'undefined' && module.exports) {
+                    module.exports = Promise;
+                  } else if (!root.Promise) {
+                    root.Promise = Promise;
+                  }
+                }(this));
+              }.call(this, require('timers').setImmediate));
+            },
+            { 'timers': 3 }
+          ],
+          3: [
+            function (require, module, exports) {
+              (function (setImmediate, clearImmediate) {
+                var nextTick = require('process/browser.js').nextTick;
+                var apply = Function.prototype.apply;
+                var slice = Array.prototype.slice;
+                var immediateIds = {};
+                var nextImmediateId = 0;
+                exports.setTimeout = function () {
+                  return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);
+                };
+                exports.setInterval = function () {
+                  return new Timeout(apply.call(setInterval, window, arguments), clearInterval);
+                };
+                exports.clearTimeout = exports.clearInterval = function (timeout) {
+                  timeout.close();
+                };
+                function Timeout(id, clearFn) {
+                  this._id = id;
+                  this._clearFn = clearFn;
+                }
+                Timeout.prototype.unref = Timeout.prototype.ref = function () {
+                };
+                Timeout.prototype.close = function () {
+                  this._clearFn.call(window, this._id);
+                };
+                exports.enroll = function (item, msecs) {
+                  clearTimeout(item._idleTimeoutId);
+                  item._idleTimeout = msecs;
+                };
+                exports.unenroll = function (item) {
+                  clearTimeout(item._idleTimeoutId);
+                  item._idleTimeout = -1;
+                };
+                exports._unrefActive = exports.active = function (item) {
+                  clearTimeout(item._idleTimeoutId);
+                  var msecs = item._idleTimeout;
+                  if (msecs >= 0) {
+                    item._idleTimeoutId = setTimeout(function onTimeout() {
+                      if (item._onTimeout)
+                        item._onTimeout();
+                    }, msecs);
+                  }
+                };
+                exports.setImmediate = typeof setImmediate === 'function' ? setImmediate : function (fn) {
+                  var id = nextImmediateId++;
+                  var args = arguments.length < 2 ? false : slice.call(arguments, 1);
+                  immediateIds[id] = true;
+                  nextTick(function onNextTick() {
+                    if (immediateIds[id]) {
+                      if (args) {
+                        fn.apply(null, args);
+                      } else {
+                        fn.call(null);
+                      }
+                      exports.clearImmediate(id);
+                    }
+                  });
+                  return id;
+                };
+                exports.clearImmediate = typeof clearImmediate === 'function' ? clearImmediate : function (id) {
+                  delete immediateIds[id];
+                };
+              }.call(this, require('timers').setImmediate, require('timers').clearImmediate));
+            },
+            {
+              'process/browser.js': 1,
+              'timers': 3
+            }
+          ],
+          4: [
+            function (require, module, exports) {
+              var promisePolyfill = require('promise-polyfill');
+              var Global = function () {
+                if (typeof window !== 'undefined') {
+                  return window;
+                } else {
+                  return Function('return this;')();
+                }
+              }();
+              module.exports = { boltExport: Global.Promise || promisePolyfill };
+            },
+            { 'promise-polyfill': 2 }
+          ]
+        }, {}, [4])(4);
+      }));
+    }(undefined, exports$1, module, undefined));
+    var Promise = module.exports.boltExport;
+
+    var nu$a = function (baseFn) {
+      var data = Option.none();
+      var callbacks = [];
+      var map = function (f) {
+        return nu$a(function (nCallback) {
+          get(function (data) {
+            nCallback(f(data));
+          });
+        });
+      };
+      var get = function (nCallback) {
+        if (isReady()) {
+          call(nCallback);
+        } else {
+          callbacks.push(nCallback);
+        }
+      };
+      var set = function (x) {
+        data = Option.some(x);
+        run(callbacks);
+        callbacks = [];
+      };
+      var isReady = function () {
+        return data.isSome();
+      };
+      var run = function (cbs) {
+        each(cbs, call);
+      };
+      var call = function (cb) {
+        data.each(function (x) {
+          domGlobals.setTimeout(function () {
+            cb(x);
+          }, 0);
+        });
+      };
+      baseFn(set);
+      return {
+        get: get,
+        map: map,
+        isReady: isReady
+      };
+    };
+    var pure$1 = function (a) {
+      return nu$a(function (callback) {
+        callback(a);
+      });
+    };
+    var LazyValue = {
+      nu: nu$a,
+      pure: pure$1
+    };
+
+    var errorReporter = function (err) {
+      domGlobals.setTimeout(function () {
+        throw err;
+      }, 0);
+    };
+    var make$3 = function (run) {
+      var get = function (callback) {
+        run().then(callback, errorReporter);
+      };
+      var map = function (fab) {
+        return make$3(function () {
+          return run().then(fab);
+        });
+      };
+      var bind = function (aFutureB) {
+        return make$3(function () {
+          return run().then(function (v) {
+            return aFutureB(v).toPromise();
+          });
+        });
+      };
+      var anonBind = function (futureB) {
+        return make$3(function () {
+          return run().then(function () {
+            return futureB.toPromise();
+          });
+        });
+      };
+      var toLazy = function () {
+        return LazyValue.nu(get);
+      };
+      var toCached = function () {
+        var cache = null;
+        return make$3(function () {
+          if (cache === null) {
+            cache = run();
+          }
+          return cache;
+        });
+      };
+      var toPromise = run;
+      return {
+        map: map,
+        bind: bind,
+        anonBind: anonBind,
+        toLazy: toLazy,
+        toCached: toCached,
+        toPromise: toPromise,
+        get: get
+      };
+    };
+    var nu$b = function (baseFn) {
+      return make$3(function () {
+        return new Promise(baseFn);
+      });
+    };
+    var pure$2 = function (a) {
+      return make$3(function () {
+        return Promise.resolve(a);
+      });
+    };
+    var Future = {
+      nu: nu$b,
+      pure: pure$2
+    };
+
+    var ariaElements = [
+      'input',
+      'textarea'
+    ];
+    var isAriaElement = function (elem) {
+      var name$1 = name(elem);
+      return contains(ariaElements, name$1);
+    };
+    var markValid = function (component, invalidConfig) {
+      var elem = invalidConfig.getRoot(component).getOr(component.element());
+      remove$4(elem, invalidConfig.invalidClass);
+      invalidConfig.notify.each(function (notifyInfo) {
+        if (isAriaElement(component.element())) {
+          set$1(component.element(), 'aria-invalid', false);
+        }
+        notifyInfo.getContainer(component).each(function (container) {
+          set(container, notifyInfo.validHtml);
+        });
+        notifyInfo.onValid(component);
+      });
+    };
+    var markInvalid = function (component, invalidConfig, invalidState, text) {
+      var elem = invalidConfig.getRoot(component).getOr(component.element());
+      add$2(elem, invalidConfig.invalidClass);
+      invalidConfig.notify.each(function (notifyInfo) {
+        if (isAriaElement(component.element())) {
+          set$1(component.element(), 'aria-invalid', true);
+        }
+        notifyInfo.getContainer(component).each(function (container) {
+          set(container, text);
+        });
+        notifyInfo.onInvalid(component, text);
+      });
+    };
+    var query = function (component, invalidConfig, _invalidState) {
+      return invalidConfig.validator.fold(function () {
+        return Future.pure(Result.value(true));
+      }, function (validatorInfo) {
+        return validatorInfo.validate(component);
+      });
+    };
+    var run$1 = function (component, invalidConfig, invalidState) {
+      invalidConfig.notify.each(function (notifyInfo) {
+        notifyInfo.onValidate(component);
+      });
+      return query(component, invalidConfig).map(function (valid) {
+        if (component.getSystem().isConnected()) {
+          return valid.fold(function (err) {
+            markInvalid(component, invalidConfig, invalidState, err);
+            return Result.error(err);
+          }, function (v) {
+            markValid(component, invalidConfig);
+            return Result.value(v);
+          });
+        } else {
+          return Result.error('No longer in system');
+        }
+      });
+    };
+    var isInvalid = function (component, invalidConfig) {
+      var elem = invalidConfig.getRoot(component).getOr(component.element());
+      return has$2(elem, invalidConfig.invalidClass);
+    };
+
+    var InvalidateApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        markValid: markValid,
+        markInvalid: markInvalid,
+        query: query,
+        run: run$1,
+        isInvalid: isInvalid
+    });
+
+    var events$a = function (invalidConfig, invalidState) {
+      return invalidConfig.validator.map(function (validatorInfo) {
+        return derive([run(validatorInfo.onEvent, function (component) {
+            run$1(component, invalidConfig, invalidState).get(identity);
+          })].concat(validatorInfo.validateOnLoad ? [runOnAttached(function (component) {
+            run$1(component, invalidConfig, invalidState).get(noop);
+          })] : []));
+      }).getOr({});
+    };
+
+    var ActiveInvalidate = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events$a
+    });
+
+    var InvalidateSchema = [
+      strict$1('invalidClass'),
+      defaulted$1('getRoot', Option.none),
+      optionObjOf('notify', [
+        defaulted$1('aria', 'alert'),
+        defaulted$1('getContainer', Option.none),
+        defaulted$1('validHtml', ''),
+        onHandler('onValid'),
+        onHandler('onInvalid'),
+        onHandler('onValidate')
+      ]),
+      optionObjOf('validator', [
+        strict$1('validate'),
+        defaulted$1('onEvent', 'input'),
+        defaulted$1('validateOnLoad', true)
+      ])
+    ];
+
+    var Invalidating = create$1({
+      fields: InvalidateSchema,
+      name: 'invalidating',
+      active: ActiveInvalidate,
+      apis: InvalidateApis,
+      extra: {
+        validation: function (validator) {
+          return function (component) {
+            var v = Representing.getValue(component);
+            return Future.pure(validator(v));
+          };
+        }
+      }
+    });
+
+    var exhibit$4 = function (base, tabConfig) {
+      return nu$6({
+        attributes: wrapAll$1([{
+            key: tabConfig.tabAttr,
+            value: 'true'
+          }])
+      });
+    };
+
+    var ActiveTabstopping = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        exhibit: exhibit$4
+    });
+
+    var TabstopSchema = [defaulted$1('tabAttr', 'data-alloy-tabstop')];
+
+    var Tabstopping = create$1({
+      fields: TabstopSchema,
+      name: 'tabstopping',
+      active: ActiveTabstopping
+    });
+
+    var renderFormFieldWith = function (pLabel, pField, extraClasses, extraBehaviours) {
+      var spec = renderFormFieldSpecWith(pLabel, pField, extraClasses, extraBehaviours);
+      return FormField.sketch(spec);
+    };
+    var renderFormField = function (pLabel, pField) {
+      return renderFormFieldWith(pLabel, pField, [], []);
+    };
+    var renderFormFieldSpecWith = function (pLabel, pField, extraClasses, extraBehaviours) {
+      return {
+        dom: renderFormFieldDomWith(extraClasses),
+        components: pLabel.toArray().concat([pField]),
+        fieldBehaviours: derive$1(extraBehaviours)
+      };
+    };
+    var renderFormFieldDom = function () {
+      return renderFormFieldDomWith([]);
+    };
+    var renderFormFieldDomWith = function (extraClasses) {
+      return {
+        tag: 'div',
+        classes: ['tox-form__group'].concat(extraClasses)
+      };
+    };
+    var renderLabel = function (label, providersBackstage) {
+      return FormField.parts().label({
+        dom: {
+          tag: 'label',
+          classes: ['tox-label'],
+          innerHtml: providersBackstage.translate(label)
+        }
+      });
+    };
+
+    var getCoupled = function (component, coupleConfig, coupleState, name) {
+      return coupleState.getOrCreate(component, coupleConfig, name);
+    };
+
+    var CouplingApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        getCoupled: getCoupled
+    });
+
+    var CouplingSchema = [strictOf('others', setOf$1(Result.value, anyValue$1()))];
+
+    var init$5 = function () {
+      var coupled = {};
+      var getOrCreate = function (component, coupleConfig, name) {
+        var available = keys(coupleConfig.others);
+        if (!available) {
+          throw new Error('Cannot find coupled component: ' + name + '. Known coupled components: ' + JSON.stringify(available, null, 2));
+        } else {
+          return get(coupled, name).getOrThunk(function () {
+            var builder = get(coupleConfig.others, name).getOrDie('No information found for coupled component: ' + name);
+            var spec = builder(component);
+            var built = component.getSystem().build(spec);
+            coupled[name] = built;
+            return built;
+          });
+        }
+      };
+      var readState = constant({});
+      return nu$5({
+        readState: readState,
+        getOrCreate: getOrCreate
+      });
+    };
+
+    var CouplingState = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        init: init$5
+    });
+
+    var Coupling = create$1({
+      fields: CouplingSchema,
+      name: 'coupling',
+      apis: CouplingApis,
+      state: CouplingState
+    });
+
+    var suffix = constant('sink');
+    var partType = constant(optional({
+      name: suffix(),
+      overrides: constant({
+        dom: { tag: 'div' },
+        behaviours: derive$1([Positioning.config({ useFixed: always })]),
+        events: derive([
+          cutter(keydown()),
+          cutter(mousedown()),
+          cutter(click())
+        ])
+      })
+    }));
+
+    var HighlightOnOpen;
+    (function (HighlightOnOpen) {
+      HighlightOnOpen[HighlightOnOpen['HighlightFirst'] = 0] = 'HighlightFirst';
+      HighlightOnOpen[HighlightOnOpen['HighlightNone'] = 1] = 'HighlightNone';
+    }(HighlightOnOpen || (HighlightOnOpen = {})));
+    var getAnchor = function (detail, component) {
+      var hotspot = detail.getHotspot(component).getOr(component);
+      var anchor = 'hotspot';
+      var overrides = detail.getAnchorOverrides();
+      return detail.layouts.fold(function () {
+        return {
+          anchor: anchor,
+          hotspot: hotspot,
+          overrides: overrides
+        };
+      }, function (layouts) {
+        return {
+          anchor: anchor,
+          hotspot: hotspot,
+          overrides: overrides,
+          layouts: layouts
+        };
+      });
+    };
+    var fetch = function (detail, mapFetch, component) {
+      var fetcher = detail.fetch;
+      return fetcher(component).map(mapFetch);
+    };
+    var openF = function (detail, mapFetch, anchor, component, sandbox, externals, highlightOnOpen) {
+      var futureData = fetch(detail, mapFetch, component);
+      var getLazySink = getSink(component, detail);
+      return futureData.map(function (tdata) {
+        return tdata.bind(function (data) {
+          return Option.from(tieredMenu.sketch(__assign(__assign({}, externals.menu()), {
+            uid: generate$2(''),
+            data: data,
+            highlightImmediately: highlightOnOpen === HighlightOnOpen.HighlightFirst,
+            onOpenMenu: function (tmenu, menu) {
+              var sink = getLazySink().getOrDie();
+              Positioning.position(sink, anchor, menu);
+              Sandboxing.decloak(sandbox);
+            },
+            onOpenSubmenu: function (tmenu, item, submenu) {
+              var sink = getLazySink().getOrDie();
+              Positioning.position(sink, {
+                anchor: 'submenu',
+                item: item
+              }, submenu);
+              Sandboxing.decloak(sandbox);
+            },
+            onRepositionMenu: function (tmenu, primaryMenu, submenuTriggers) {
+              var sink = getLazySink().getOrDie();
+              Positioning.position(sink, anchor, primaryMenu);
+              each(submenuTriggers, function (st) {
+                Positioning.position(sink, {
+                  anchor: 'submenu',
+                  item: st.triggeringItem
+                }, st.triggeredMenu);
+              });
+            },
+            onEscape: function () {
+              Focusing.focus(component);
+              Sandboxing.close(sandbox);
+              return Option.some(true);
+            }
+          })));
+        });
+      });
+    };
+    var open$1 = function (detail, mapFetch, hotspot, sandbox, externals, onOpenSync, highlightOnOpen) {
+      var anchor = getAnchor(detail, hotspot);
+      var processed = openF(detail, mapFetch, anchor, hotspot, sandbox, externals, highlightOnOpen);
+      return processed.map(function (tdata) {
+        tdata.fold(function () {
+          if (Sandboxing.isOpen(sandbox)) {
+            Sandboxing.close(sandbox);
+          }
+        }, function (data) {
+          Sandboxing.cloak(sandbox);
+          Sandboxing.open(sandbox, data);
+          onOpenSync(sandbox);
+        });
+        return sandbox;
+      });
+    };
+    var close$1 = function (detail, mapFetch, component, sandbox, _externals, _onOpenSync, _highlightOnOpen) {
+      Sandboxing.close(sandbox);
+      return Future.pure(sandbox);
+    };
+    var togglePopup = function (detail, mapFetch, hotspot, externals, onOpenSync, highlightOnOpen) {
+      var sandbox = Coupling.getCoupled(hotspot, 'sandbox');
+      var showing = Sandboxing.isOpen(sandbox);
+      var action = showing ? close$1 : open$1;
+      return action(detail, mapFetch, hotspot, sandbox, externals, onOpenSync, highlightOnOpen);
+    };
+    var matchWidth = function (hotspot, container, useMinWidth) {
+      var menu = Composing.getCurrent(container).getOr(container);
+      var buttonWidth = get$7(hotspot.element());
+      if (useMinWidth) {
+        set$2(menu.element(), 'min-width', buttonWidth + 'px');
+      } else {
+        set$4(menu.element(), buttonWidth);
+      }
+    };
+    var getSink = function (anyInSystem, sinkDetail) {
+      return anyInSystem.getSystem().getByUid(sinkDetail.uid + '-' + suffix()).map(function (internalSink) {
+        return function () {
+          return Result.value(internalSink);
+        };
+      }).getOrThunk(function () {
+        return sinkDetail.lazySink.fold(function () {
+          return function () {
+            return Result.error(new Error('No internal sink is specified, nor could an external sink be found'));
+          };
+        }, function (lazySinkFn) {
+          return function () {
+            return lazySinkFn(anyInSystem);
+          };
+        });
+      });
+    };
+    var doRepositionMenus = function (sandbox) {
+      Sandboxing.getState(sandbox).each(function (tmenu) {
+        tieredMenu.repositionMenus(tmenu);
+      });
+    };
+    var makeSandbox = function (detail, hotspot, extras) {
+      var ariaOwner = manager();
+      var onOpen = function (component, menu) {
+        var anchor = getAnchor(detail, hotspot);
+        ariaOwner.link(hotspot.element());
+        if (detail.matchWidth) {
+          matchWidth(anchor.hotspot, menu, detail.useMinWidth);
+        }
+        detail.onOpen(anchor, component, menu);
+        if (extras !== undefined && extras.onOpen !== undefined) {
+          extras.onOpen(component, menu);
+        }
+      };
+      var onClose = function (component, menu) {
+        ariaOwner.unlink(hotspot.element());
+        if (extras !== undefined && extras.onClose !== undefined) {
+          extras.onClose(component, menu);
+        }
+      };
+      var lazySink = getSink(hotspot, detail);
+      return {
+        dom: {
+          tag: 'div',
+          classes: detail.sandboxClasses,
+          attributes: {
+            id: ariaOwner.id,
+            role: 'listbox'
+          }
+        },
+        behaviours: SketchBehaviours.augment(detail.sandboxBehaviours, [
+          Representing.config({
+            store: {
+              mode: 'memory',
+              initialValue: hotspot
+            }
+          }),
+          Sandboxing.config({
+            onOpen: onOpen,
+            onClose: onClose,
+            isPartOf: function (container, data, queryElem) {
+              return isPartOf(data, queryElem) || isPartOf(hotspot, queryElem);
+            },
+            getAttachPoint: function () {
+              return lazySink().getOrDie();
+            }
+          }),
+          Composing.config({
+            find: function (sandbox) {
+              return Sandboxing.getState(sandbox).bind(function (menu) {
+                return Composing.getCurrent(menu);
+              });
+            }
+          }),
+          Receiving.config({ channels: __assign(__assign({}, receivingChannel({ isExtraPart: never })), receivingChannel$1({ doReposition: doRepositionMenus })) })
+        ])
+      };
+    };
+    var repositionMenus = function (comp) {
+      var sandbox = Coupling.getCoupled(comp, 'sandbox');
+      doRepositionMenus(sandbox);
+    };
+
+    var sandboxFields = function () {
+      return [
+        defaulted$1('sandboxClasses', []),
+        SketchBehaviours.field('sandboxBehaviours', [
+          Composing,
+          Receiving,
+          Sandboxing,
+          Representing
+        ])
+      ];
+    };
+
+    var schema$g = constant([
+      strict$1('dom'),
+      strict$1('fetch'),
+      onHandler('onOpen'),
+      onKeyboardHandler('onExecute'),
+      defaulted$1('getHotspot', Option.some),
+      defaulted$1('getAnchorOverrides', constant({})),
+      schema$1(),
+      field$1('dropdownBehaviours', [
+        Toggling,
+        Coupling,
+        Keying,
+        Focusing
+      ]),
+      strict$1('toggleClass'),
+      defaulted$1('eventOrder', {}),
+      option('lazySink'),
+      defaulted$1('matchWidth', false),
+      defaulted$1('useMinWidth', false),
+      option('role')
+    ].concat(sandboxFields()));
+    var parts$4 = constant([
+      external$1({
+        schema: [tieredMenuMarkers()],
+        name: 'menu',
+        defaults: function (detail) {
+          return { onExecute: detail.onExecute };
+        }
+      }),
+      partType()
+    ]);
+
+    var factory$6 = function (detail, components, _spec, externals) {
+      var _a;
+      var lookupAttr = function (attr) {
+        return get(detail.dom, 'attributes').bind(function (attrs) {
+          return get(attrs, attr);
+        });
+      };
+      var switchToMenu = function (sandbox) {
+        Sandboxing.getState(sandbox).each(function (tmenu) {
+          tieredMenu.highlightPrimary(tmenu);
+        });
+      };
+      var action = function (component) {
+        var onOpenSync = switchToMenu;
+        togglePopup(detail, function (x) {
+          return x;
+        }, component, externals, onOpenSync, HighlightOnOpen.HighlightFirst).get(noop);
+      };
+      var apis = {
+        expand: function (comp) {
+          if (!Toggling.isOn(comp)) {
+            togglePopup(detail, function (x) {
+              return x;
+            }, comp, externals, noop, HighlightOnOpen.HighlightNone).get(noop);
+          }
+        },
+        open: function (comp) {
+          if (!Toggling.isOn(comp)) {
+            togglePopup(detail, function (x) {
+              return x;
+            }, comp, externals, noop, HighlightOnOpen.HighlightFirst).get(noop);
+          }
+        },
+        isOpen: Toggling.isOn,
+        close: function (comp) {
+          if (Toggling.isOn(comp)) {
+            togglePopup(detail, function (x) {
+              return x;
+            }, comp, externals, noop, HighlightOnOpen.HighlightFirst).get(noop);
+          }
+        },
+        repositionMenus: function (comp) {
+          if (Toggling.isOn(comp)) {
+            repositionMenus(comp);
+          }
+        }
+      };
+      var triggerExecute = function (comp, _se) {
+        emitExecute(comp);
+        return Option.some(true);
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        behaviours: augment(detail.dropdownBehaviours, [
+          Toggling.config({
+            toggleClass: detail.toggleClass,
+            aria: { mode: 'expanded' }
+          }),
+          Coupling.config({
+            others: {
+              sandbox: function (hotspot) {
+                return makeSandbox(detail, hotspot, {
+                  onOpen: function () {
+                    Toggling.on(hotspot);
+                  },
+                  onClose: function () {
+                    Toggling.off(hotspot);
+                  }
+                });
+              }
+            }
+          }),
+          Keying.config({
+            mode: 'special',
+            onSpace: triggerExecute,
+            onEnter: triggerExecute,
+            onDown: function (comp, _se) {
+              if (Dropdown.isOpen(comp)) {
+                var sandbox = Coupling.getCoupled(comp, 'sandbox');
+                switchToMenu(sandbox);
+              } else {
+                Dropdown.open(comp);
+              }
+              return Option.some(true);
+            },
+            onEscape: function (comp, _se) {
+              if (Dropdown.isOpen(comp)) {
+                Dropdown.close(comp);
+                return Option.some(true);
+              } else {
+                return Option.none();
+              }
+            }
+          }),
+          Focusing.config({})
+        ]),
+        events: events$7(Option.some(action)),
+        eventOrder: __assign(__assign({}, detail.eventOrder), (_a = {}, _a[execute()] = [
+          'disabling',
+          'toggling',
+          'alloy.base.behaviour'
+        ], _a)),
+        apis: apis,
+        domModification: {
+          attributes: __assign(__assign({ 'aria-haspopup': 'true' }, detail.role.fold(function () {
+            return {};
+          }, function (role) {
+            return { role: role };
+          })), detail.dom.tag === 'button' ? { type: lookupAttr('type').getOr('button') } : {})
+        }
+      };
+    };
+    var Dropdown = composite$1({
+      name: 'Dropdown',
+      configFields: schema$g(),
+      partFields: parts$4(),
+      factory: factory$6,
+      apis: {
+        open: function (apis, comp) {
+          return apis.open(comp);
+        },
+        expand: function (apis, comp) {
+          return apis.expand(comp);
+        },
+        close: function (apis, comp) {
+          return apis.close(comp);
+        },
+        isOpen: function (apis, comp) {
+          return apis.isOpen(comp);
+        },
+        repositionMenus: function (apis, comp) {
+          return apis.repositionMenus(comp);
+        }
+      }
+    });
+
+    var exhibit$5 = function () {
+      return nu$6({
+        styles: {
+          '-webkit-user-select': 'none',
+          'user-select': 'none',
+          '-ms-user-select': 'none',
+          '-moz-user-select': '-moz-none'
+        },
+        attributes: { unselectable: 'on' }
+      });
+    };
+    var events$b = function () {
+      return derive([abort(selectstart(), constant(true))]);
+    };
+
+    var ActiveUnselecting = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events$b,
+        exhibit: exhibit$5
+    });
+
+    var Unselecting = create$1({
+      fields: [],
+      name: 'unselecting',
+      active: ActiveUnselecting
+    });
+
+    var renderPanelButton = function (spec, sharedBackstage) {
+      return Dropdown.sketch({
+        dom: spec.dom,
+        components: spec.components,
+        toggleClass: 'mce-active',
+        dropdownBehaviours: derive$1([
+          DisablingConfigs.button(sharedBackstage.providers.isReadOnly),
+          receivingConfig(),
+          Unselecting.config({}),
+          Tabstopping.config({})
+        ]),
+        layouts: spec.layouts,
+        sandboxClasses: ['tox-dialog__popups'],
+        lazySink: sharedBackstage.getSink,
+        fetch: function (comp) {
+          return Future.nu(function (callback) {
+            return spec.fetch(callback);
+          }).map(function (items) {
+            return Option.from(createTieredDataFrom(deepMerge(createPartialChoiceMenu(generate$1('menu-value'), items, function (value) {
+              spec.onItemAction(comp, value);
+            }, spec.columns, spec.presets, ItemResponse$1.CLOSE_ON_EXECUTE, function () {
+              return false;
+            }, sharedBackstage.providers), { movement: deriveMenuMovement(spec.columns, spec.presets) })));
+          });
+        },
+        parts: { menu: part(false, 1, spec.presets) }
+      });
+    };
+
+    var colorInputChangeEvent = generate$1('color-input-change');
+    var colorSwatchChangeEvent = generate$1('color-swatch-change');
+    var colorPickerCancelEvent = generate$1('color-picker-cancel');
+    var renderColorInput = function (spec, sharedBackstage, colorInputBackstage) {
+      var pField = FormField.parts().field({
+        factory: Input,
+        inputClasses: ['tox-textfield'],
+        onSetValue: function (c) {
+          return Invalidating.run(c).get(function () {
+          });
+        },
+        inputBehaviours: derive$1([
+          Disabling.config({ disabled: sharedBackstage.providers.isReadOnly }),
+          receivingConfig(),
+          Tabstopping.config({}),
+          Invalidating.config({
+            invalidClass: 'tox-textbox-field-invalid',
+            getRoot: function (comp) {
+              return parent(comp.element());
+            },
+            notify: {
+              onValid: function (comp) {
+                var val = Representing.getValue(comp);
+                emitWith(comp, colorInputChangeEvent, { color: val });
+              }
+            },
+            validator: {
+              validateOnLoad: false,
+              validate: function (input) {
+                var inputValue = Representing.getValue(input);
+                if (inputValue.length === 0) {
+                  return Future.pure(Result.value(true));
+                } else {
+                  var span = Element.fromTag('span');
+                  set$2(span, 'background-color', inputValue);
+                  var res = getRaw(span, 'background-color').fold(function () {
+                    return Result.error('blah');
+                  }, function (_) {
+                    return Result.value(inputValue);
+                  });
+                  return Future.pure(res);
+                }
+              }
+            }
+          })
+        ]),
+        selectOnFocus: false
+      });
+      var pLabel = spec.label.map(function (label) {
+        return renderLabel(label, sharedBackstage.providers);
+      });
+      var emitSwatchChange = function (colorBit, value) {
+        emitWith(colorBit, colorSwatchChangeEvent, { value: value });
+      };
+      var onItemAction = function (comp, value) {
+        memColorButton.getOpt(comp).each(function (colorBit) {
+          if (value === 'custom') {
+            colorInputBackstage.colorPicker(function (valueOpt) {
+              valueOpt.fold(function () {
+                return emit(colorBit, colorPickerCancelEvent);
+              }, function (value) {
+                emitSwatchChange(colorBit, value);
+                addColor(value);
+              });
+            }, '#ffffff');
+          } else if (value === 'remove') {
+            emitSwatchChange(colorBit, '');
+          } else {
+            emitSwatchChange(colorBit, value);
+          }
+        });
+      };
+      var memColorButton = record(renderPanelButton({
+        dom: {
+          tag: 'span',
+          attributes: { 'aria-label': sharedBackstage.providers.translate('Color swatch') }
+        },
+        layouts: {
+          onRtl: function () {
+            return [
+              southwest$1,
+              southeast$1,
+              south$1
+            ];
+          },
+          onLtr: function () {
+            return [
+              southeast$1,
+              southwest$1,
+              south$1
+            ];
+          }
+        },
+        components: [],
+        fetch: getFetch(colorInputBackstage.getColors(), colorInputBackstage.hasCustomColors()),
+        columns: colorInputBackstage.getColorCols(),
+        presets: 'color',
+        onItemAction: onItemAction
+      }, sharedBackstage));
+      return FormField.sketch({
+        dom: {
+          tag: 'div',
+          classes: ['tox-form__group']
+        },
+        components: pLabel.toArray().concat([{
+            dom: {
+              tag: 'div',
+              classes: ['tox-color-input']
+            },
+            components: [
+              pField,
+              memColorButton.asSpec()
+            ]
+          }]),
+        fieldBehaviours: derive$1([config('form-field-events', [
+            run(colorInputChangeEvent, function (comp, se) {
+              memColorButton.getOpt(comp).each(function (colorButton) {
+                set$2(colorButton.element(), 'background-color', se.event().color());
+              });
+              emitWith(comp, formChangeEvent, { name: spec.name });
+            }),
+            run(colorSwatchChangeEvent, function (comp, se) {
+              FormField.getField(comp).each(function (field) {
+                Representing.setValue(field, se.event().value());
+                Composing.getCurrent(comp).each(Focusing.focus);
+              });
+            }),
+            run(colorPickerCancelEvent, function (comp, _se) {
+              FormField.getField(comp).each(function (_field) {
+                Composing.getCurrent(comp).each(Focusing.focus);
+              });
+            })
+          ])])
+      });
+    };
+
+    var hsvColour = function (hue, saturation, value) {
+      return {
+        hue: hue,
+        saturation: saturation,
+        value: value
+      };
+    };
+    var fromRgb = function (rgbaColour) {
+      var h = 0;
+      var s = 0;
+      var v = 0;
+      var r = rgbaColour.red / 255;
+      var g = rgbaColour.green / 255;
+      var b = rgbaColour.blue / 255;
+      var minRGB = Math.min(r, Math.min(g, b));
+      var maxRGB = Math.max(r, Math.max(g, b));
+      if (minRGB === maxRGB) {
+        v = minRGB;
+        return hsvColour(0, 0, v * 100);
+      }
+      var d = r === minRGB ? g - b : b === minRGB ? r - g : b - r;
+      h = r === minRGB ? 3 : b === minRGB ? 1 : 5;
+      h = 60 * (h - d / (maxRGB - minRGB));
+      s = (maxRGB - minRGB) / maxRGB;
+      v = maxRGB;
+      return hsvColour(Math.round(h), Math.round(s * 100), Math.round(v * 100));
+    };
+
+    var calcHex = function (value) {
+      var hue = (100 - value) / 100 * 360;
+      var hsv = hsvColour(hue, 100, 100);
+      var rgb = fromHsv(hsv);
+      return fromRgba(rgb);
+    };
+
+    var fieldsUpdate = generate$1('rgb-hex-update');
+    var sliderUpdate = generate$1('slider-update');
+    var paletteUpdate = generate$1('palette-update');
+
+    var labelPart = optional({
+      schema: [strict$1('dom')],
+      name: 'label'
+    });
+    var edgePart = function (name) {
+      return optional({
+        name: '' + name + '-edge',
+        overrides: function (detail) {
+          var action = detail.model.manager.edgeActions[name];
+          return action.fold(function () {
+            return {};
+          }, function (a) {
+            return {
+              events: derive([
+                runActionExtra(touchstart(), function (comp, se, d) {
+                  return a(comp, d);
+                }, [detail]),
+                runActionExtra(mousedown(), function (comp, se, d) {
+                  return a(comp, d);
+                }, [detail]),
+                runActionExtra(mousemove(), function (comp, se, det) {
+                  if (det.mouseIsDown.get()) {
+                    a(comp, det);
+                  }
+                }, [detail])
+              ])
+            };
+          });
+        }
+      });
+    };
+    var tlEdgePart = edgePart('top-left');
+    var tedgePart = edgePart('top');
+    var trEdgePart = edgePart('top-right');
+    var redgePart = edgePart('right');
+    var brEdgePart = edgePart('bottom-right');
+    var bedgePart = edgePart('bottom');
+    var blEdgePart = edgePart('bottom-left');
+    var ledgePart = edgePart('left');
+    var thumbPart = required({
+      name: 'thumb',
+      defaults: constant({ dom: { styles: { position: 'absolute' } } }),
+      overrides: function (detail) {
+        return {
+          events: derive([
+            redirectToPart(touchstart(), detail, 'spectrum'),
+            redirectToPart(touchmove(), detail, 'spectrum'),
+            redirectToPart(touchend(), detail, 'spectrum'),
+            redirectToPart(mousedown(), detail, 'spectrum'),
+            redirectToPart(mousemove(), detail, 'spectrum'),
+            redirectToPart(mouseup(), detail, 'spectrum')
+          ])
+        };
+      }
+    });
+    var spectrumPart = required({
+      schema: [state$1('mouseIsDown', function () {
+          return Cell(false);
+        })],
+      name: 'spectrum',
+      overrides: function (detail) {
+        var modelDetail = detail.model;
+        var model = modelDetail.manager;
+        var setValueFrom = function (component, simulatedEvent) {
+          return model.getValueFromEvent(simulatedEvent).map(function (value) {
+            return model.setValueFrom(component, detail, value);
+          });
+        };
+        return {
+          behaviours: derive$1([
+            Keying.config({
+              mode: 'special',
+              onLeft: function (spectrum) {
+                return model.onLeft(spectrum, detail);
+              },
+              onRight: function (spectrum) {
+                return model.onRight(spectrum, detail);
+              },
+              onUp: function (spectrum) {
+                return model.onUp(spectrum, detail);
+              },
+              onDown: function (spectrum) {
+                return model.onDown(spectrum, detail);
+              }
+            }),
+            Focusing.config({})
+          ]),
+          events: derive([
+            run(touchstart(), setValueFrom),
+            run(touchmove(), setValueFrom),
+            run(mousedown(), setValueFrom),
+            run(mousemove(), function (spectrum, se) {
+              if (detail.mouseIsDown.get()) {
+                setValueFrom(spectrum, se);
+              }
+            })
+          ])
+        };
+      }
+    });
+    var SliderParts = [
+      labelPart,
+      ledgePart,
+      redgePart,
+      tedgePart,
+      bedgePart,
+      tlEdgePart,
+      trEdgePart,
+      blEdgePart,
+      brEdgePart,
+      thumbPart,
+      spectrumPart
+    ];
+
+    var _sliderChangeEvent = 'slider.change.value';
+    var sliderChangeEvent = constant(_sliderChangeEvent);
+    var isTouchEvent = function (evt) {
+      return evt.type.indexOf('touch') !== -1;
+    };
+    var getEventSource = function (simulatedEvent) {
+      var evt = simulatedEvent.event().raw();
+      if (isTouchEvent(evt)) {
+        var touchEvent = evt;
+        return touchEvent.touches !== undefined && touchEvent.touches.length === 1 ? Option.some(touchEvent.touches[0]).map(function (t) {
+          return Position(t.clientX, t.clientY);
+        }) : Option.none();
+      } else {
+        var mouseEvent = evt;
+        return mouseEvent.clientX !== undefined ? Option.some(mouseEvent).map(function (me) {
+          return Position(me.clientX, me.clientY);
+        }) : Option.none();
+      }
+    };
+
+    var t = 'top', r$1 = 'right', b = 'bottom', l = 'left';
+    var minX = function (detail) {
+      return detail.model.minX;
+    };
+    var minY = function (detail) {
+      return detail.model.minY;
+    };
+    var min1X = function (detail) {
+      return detail.model.minX - 1;
+    };
+    var min1Y = function (detail) {
+      return detail.model.minY - 1;
+    };
+    var maxX = function (detail) {
+      return detail.model.maxX;
+    };
+    var maxY = function (detail) {
+      return detail.model.maxY;
+    };
+    var max1X = function (detail) {
+      return detail.model.maxX + 1;
+    };
+    var max1Y = function (detail) {
+      return detail.model.maxY + 1;
+    };
+    var range$2 = function (detail, max, min) {
+      return max(detail) - min(detail);
+    };
+    var xRange = function (detail) {
+      return range$2(detail, maxX, minX);
+    };
+    var yRange = function (detail) {
+      return range$2(detail, maxY, minY);
+    };
+    var halfX = function (detail) {
+      return xRange(detail) / 2;
+    };
+    var halfY = function (detail) {
+      return yRange(detail) / 2;
+    };
+    var step = function (detail) {
+      return detail.stepSize;
+    };
+    var snap = function (detail) {
+      return detail.snapToGrid;
+    };
+    var snapStart = function (detail) {
+      return detail.snapStart;
+    };
+    var rounded = function (detail) {
+      return detail.rounded;
+    };
+    var hasEdge = function (detail, edgeName) {
+      return detail[edgeName + '-edge'] !== undefined;
+    };
+    var hasLEdge = function (detail) {
+      return hasEdge(detail, l);
+    };
+    var hasREdge = function (detail) {
+      return hasEdge(detail, r$1);
+    };
+    var hasTEdge = function (detail) {
+      return hasEdge(detail, t);
+    };
+    var hasBEdge = function (detail) {
+      return hasEdge(detail, b);
+    };
+    var currentValue = function (detail) {
+      return detail.model.value.get();
+    };
+
+    var xValue = function (x) {
+      return { x: constant(x) };
+    };
+    var yValue = function (y) {
+      return { y: constant(y) };
+    };
+    var xyValue = function (x, y) {
+      return {
+        x: constant(x),
+        y: constant(y)
+      };
+    };
+    var fireSliderChange = function (component, value) {
+      emitWith(component, sliderChangeEvent(), { value: value });
+    };
+    var setToTLEdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(min1X(detail), min1Y(detail)));
+    };
+    var setToTEdge = function (edge, detail) {
+      fireSliderChange(edge, yValue(min1Y(detail)));
+    };
+    var setToTEdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(halfX(detail), min1Y(detail)));
+    };
+    var setToTREdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(max1X(detail), min1Y(detail)));
+    };
+    var setToREdge = function (edge, detail) {
+      fireSliderChange(edge, xValue(max1X(detail)));
+    };
+    var setToREdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(max1X(detail), halfY(detail)));
+    };
+    var setToBREdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(max1X(detail), max1Y(detail)));
+    };
+    var setToBEdge = function (edge, detail) {
+      fireSliderChange(edge, yValue(max1Y(detail)));
+    };
+    var setToBEdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(halfX(detail), max1Y(detail)));
+    };
+    var setToBLEdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(min1X(detail), max1Y(detail)));
+    };
+    var setToLEdge = function (edge, detail) {
+      fireSliderChange(edge, xValue(min1X(detail)));
+    };
+    var setToLEdgeXY = function (edge, detail) {
+      fireSliderChange(edge, xyValue(min1X(detail), halfY(detail)));
+    };
+
+    var reduceBy = function (value, min, max, step) {
+      if (value < min) {
+        return value;
+      } else if (value > max) {
+        return max;
+      } else if (value === min) {
+        return min - 1;
+      } else {
+        return Math.max(min, value - step);
+      }
+    };
+    var increaseBy = function (value, min, max, step) {
+      if (value > max) {
+        return value;
+      } else if (value < min) {
+        return min;
+      } else if (value === max) {
+        return max + 1;
+      } else {
+        return Math.min(max, value + step);
+      }
+    };
+    var capValue = function (value, min, max) {
+      return Math.max(min, Math.min(max, value));
+    };
+    var snapValueOf = function (value, min, max, step, snapStart) {
+      return snapStart.fold(function () {
+        var initValue = value - min;
+        var extraValue = Math.round(initValue / step) * step;
+        return capValue(min + extraValue, min - 1, max + 1);
+      }, function (start) {
+        var remainder = (value - start) % step;
+        var adjustment = Math.round(remainder / step);
+        var rawSteps = Math.floor((value - start) / step);
+        var maxSteps = Math.floor((max - start) / step);
+        var numSteps = Math.min(maxSteps, rawSteps + adjustment);
+        var r = start + numSteps * step;
+        return Math.max(start, r);
+      });
+    };
+    var findOffsetOf = function (value, min, max) {
+      return Math.min(max, Math.max(value, min)) - min;
+    };
+    var findValueOf = function (args) {
+      var min = args.min, max = args.max, range = args.range, value = args.value, step = args.step, snap = args.snap, snapStart = args.snapStart, rounded = args.rounded, hasMinEdge = args.hasMinEdge, hasMaxEdge = args.hasMaxEdge, minBound = args.minBound, maxBound = args.maxBound, screenRange = args.screenRange;
+      var capMin = hasMinEdge ? min - 1 : min;
+      var capMax = hasMaxEdge ? max + 1 : max;
+      if (value < minBound) {
+        return capMin;
+      } else if (value > maxBound) {
+        return capMax;
+      } else {
+        var offset = findOffsetOf(value, minBound, maxBound);
+        var newValue = capValue(offset / screenRange * range + min, capMin, capMax);
+        if (snap && newValue >= min && newValue <= max) {
+          return snapValueOf(newValue, min, max, step, snapStart);
+        } else if (rounded) {
+          return Math.round(newValue);
+        } else {
+          return newValue;
+        }
+      }
+    };
+    var findOffsetOfValue = function (args) {
+      var min = args.min, max = args.max, range = args.range, value = args.value, hasMinEdge = args.hasMinEdge, hasMaxEdge = args.hasMaxEdge, maxBound = args.maxBound, maxOffset = args.maxOffset, centerMinEdge = args.centerMinEdge, centerMaxEdge = args.centerMaxEdge;
+      if (value < min) {
+        return hasMinEdge ? 0 : centerMinEdge;
+      } else if (value > max) {
+        return hasMaxEdge ? maxBound : centerMaxEdge;
+      } else {
+        return (value - min) / range * maxOffset;
+      }
+    };
+
+    var top = 'top', right = 'right', bottom = 'bottom', left = 'left', width = 'width', height = 'height';
+    var getBounds$1 = function (component) {
+      return component.element().dom().getBoundingClientRect();
+    };
+    var getBoundsProperty = function (bounds, property) {
+      return bounds[property];
+    };
+    var getMinXBounds = function (component) {
+      var bounds = getBounds$1(component);
+      return getBoundsProperty(bounds, left);
+    };
+    var getMaxXBounds = function (component) {
+      var bounds = getBounds$1(component);
+      return getBoundsProperty(bounds, right);
+    };
+    var getMinYBounds = function (component) {
+      var bounds = getBounds$1(component);
+      return getBoundsProperty(bounds, top);
+    };
+    var getMaxYBounds = function (component) {
+      var bounds = getBounds$1(component);
+      return getBoundsProperty(bounds, bottom);
+    };
+    var getXScreenRange = function (component) {
+      var bounds = getBounds$1(component);
+      return getBoundsProperty(bounds, width);
+    };
+    var getYScreenRange = function (component) {
+      var bounds = getBounds$1(component);
+      return getBoundsProperty(bounds, height);
+    };
+    var getCenterOffsetOf = function (componentMinEdge, componentMaxEdge, spectrumMinEdge) {
+      return (componentMinEdge + componentMaxEdge) / 2 - spectrumMinEdge;
+    };
+    var getXCenterOffSetOf = function (component, spectrum) {
+      var componentBounds = getBounds$1(component);
+      var spectrumBounds = getBounds$1(spectrum);
+      var componentMinEdge = getBoundsProperty(componentBounds, left);
+      var componentMaxEdge = getBoundsProperty(componentBounds, right);
+      var spectrumMinEdge = getBoundsProperty(spectrumBounds, left);
+      return getCenterOffsetOf(componentMinEdge, componentMaxEdge, spectrumMinEdge);
+    };
+    var getYCenterOffSetOf = function (component, spectrum) {
+      var componentBounds = getBounds$1(component);
+      var spectrumBounds = getBounds$1(spectrum);
+      var componentMinEdge = getBoundsProperty(componentBounds, top);
+      var componentMaxEdge = getBoundsProperty(componentBounds, bottom);
+      var spectrumMinEdge = getBoundsProperty(spectrumBounds, top);
+      return getCenterOffsetOf(componentMinEdge, componentMaxEdge, spectrumMinEdge);
+    };
+
+    var fireSliderChange$1 = function (spectrum, value) {
+      emitWith(spectrum, sliderChangeEvent(), { value: value });
+    };
+    var sliderValue = function (x) {
+      return { x: constant(x) };
+    };
+    var findValueOfOffset = function (spectrum, detail, left) {
+      var args = {
+        min: minX(detail),
+        max: maxX(detail),
+        range: xRange(detail),
+        value: left,
+        step: step(detail),
+        snap: snap(detail),
+        snapStart: snapStart(detail),
+        rounded: rounded(detail),
+        hasMinEdge: hasLEdge(detail),
+        hasMaxEdge: hasREdge(detail),
+        minBound: getMinXBounds(spectrum),
+        maxBound: getMaxXBounds(spectrum),
+        screenRange: getXScreenRange(spectrum)
+      };
+      return findValueOf(args);
+    };
+    var setValueFrom = function (spectrum, detail, value) {
+      var xValue = findValueOfOffset(spectrum, detail, value);
+      var sliderVal = sliderValue(xValue);
+      fireSliderChange$1(spectrum, sliderVal);
+      return xValue;
+    };
+    var setToMin = function (spectrum, detail) {
+      var min = minX(detail);
+      fireSliderChange$1(spectrum, sliderValue(min));
+    };
+    var setToMax = function (spectrum, detail) {
+      var max = maxX(detail);
+      fireSliderChange$1(spectrum, sliderValue(max));
+    };
+    var moveBy = function (direction, spectrum, detail) {
+      var f = direction > 0 ? increaseBy : reduceBy;
+      var xValue = f(currentValue(detail).x(), minX(detail), maxX(detail), step(detail));
+      fireSliderChange$1(spectrum, sliderValue(xValue));
+      return Option.some(xValue);
+    };
+    var handleMovement = function (direction) {
+      return function (spectrum, detail) {
+        return moveBy(direction, spectrum, detail).map(function () {
+          return true;
+        });
+      };
+    };
+    var getValueFromEvent = function (simulatedEvent) {
+      var pos = getEventSource(simulatedEvent);
+      return pos.map(function (p) {
+        return p.left();
+      });
+    };
+    var findOffsetOfValue$1 = function (spectrum, detail, value, minEdge, maxEdge) {
+      var minOffset = 0;
+      var maxOffset = getXScreenRange(spectrum);
+      var centerMinEdge = minEdge.bind(function (edge) {
+        return Option.some(getXCenterOffSetOf(edge, spectrum));
+      }).getOr(minOffset);
+      var centerMaxEdge = maxEdge.bind(function (edge) {
+        return Option.some(getXCenterOffSetOf(edge, spectrum));
+      }).getOr(maxOffset);
+      var args = {
+        min: minX(detail),
+        max: maxX(detail),
+        range: xRange(detail),
+        value: value,
+        hasMinEdge: hasLEdge(detail),
+        hasMaxEdge: hasREdge(detail),
+        minBound: getMinXBounds(spectrum),
+        minOffset: minOffset,
+        maxBound: getMaxXBounds(spectrum),
+        maxOffset: maxOffset,
+        centerMinEdge: centerMinEdge,
+        centerMaxEdge: centerMaxEdge
+      };
+      return findOffsetOfValue(args);
+    };
+    var findPositionOfValue = function (slider, spectrum, value, minEdge, maxEdge, detail) {
+      var offset = findOffsetOfValue$1(spectrum, detail, value, minEdge, maxEdge);
+      return getMinXBounds(spectrum) - getMinXBounds(slider) + offset;
+    };
+    var setPositionFromValue = function (slider, thumb, detail, edges) {
+      var value = currentValue(detail);
+      var pos = findPositionOfValue(slider, edges.getSpectrum(slider), value.x(), edges.getLeftEdge(slider), edges.getRightEdge(slider), detail);
+      var thumbRadius = get$7(thumb.element()) / 2;
+      set$2(thumb.element(), 'left', pos - thumbRadius + 'px');
+    };
+    var onLeft = handleMovement(-1);
+    var onRight = handleMovement(1);
+    var onUp = Option.none;
+    var onDown = Option.none;
+    var edgeActions = {
+      'top-left': Option.none(),
+      'top': Option.none(),
+      'top-right': Option.none(),
+      'right': Option.some(setToREdge),
+      'bottom-right': Option.none(),
+      'bottom': Option.none(),
+      'bottom-left': Option.none(),
+      'left': Option.some(setToLEdge)
+    };
+
+    var HorizontalModel = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        setValueFrom: setValueFrom,
+        setToMin: setToMin,
+        setToMax: setToMax,
+        findValueOfOffset: findValueOfOffset,
+        getValueFromEvent: getValueFromEvent,
+        findPositionOfValue: findPositionOfValue,
+        setPositionFromValue: setPositionFromValue,
+        onLeft: onLeft,
+        onRight: onRight,
+        onUp: onUp,
+        onDown: onDown,
+        edgeActions: edgeActions
+    });
+
+    var fireSliderChange$2 = function (spectrum, value) {
+      emitWith(spectrum, sliderChangeEvent(), { value: value });
+    };
+    var sliderValue$1 = function (y) {
+      return { y: constant(y) };
+    };
+    var findValueOfOffset$1 = function (spectrum, detail, top) {
+      var args = {
+        min: minY(detail),
+        max: maxY(detail),
+        range: yRange(detail),
+        value: top,
+        step: step(detail),
+        snap: snap(detail),
+        snapStart: snapStart(detail),
+        rounded: rounded(detail),
+        hasMinEdge: hasTEdge(detail),
+        hasMaxEdge: hasBEdge(detail),
+        minBound: getMinYBounds(spectrum),
+        maxBound: getMaxYBounds(spectrum),
+        screenRange: getYScreenRange(spectrum)
+      };
+      return findValueOf(args);
+    };
+    var setValueFrom$1 = function (spectrum, detail, value) {
+      var yValue = findValueOfOffset$1(spectrum, detail, value);
+      var sliderVal = sliderValue$1(yValue);
+      fireSliderChange$2(spectrum, sliderVal);
+      return yValue;
+    };
+    var setToMin$1 = function (spectrum, detail) {
+      var min = minY(detail);
+      fireSliderChange$2(spectrum, sliderValue$1(min));
+    };
+    var setToMax$1 = function (spectrum, detail) {
+      var max = maxY(detail);
+      fireSliderChange$2(spectrum, sliderValue$1(max));
+    };
+    var moveBy$1 = function (direction, spectrum, detail) {
+      var f = direction > 0 ? increaseBy : reduceBy;
+      var yValue = f(currentValue(detail).y(), minY(detail), maxY(detail), step(detail));
+      fireSliderChange$2(spectrum, sliderValue$1(yValue));
+      return Option.some(yValue);
+    };
+    var handleMovement$1 = function (direction) {
+      return function (spectrum, detail) {
+        return moveBy$1(direction, spectrum, detail).map(function () {
+          return true;
+        });
+      };
+    };
+    var getValueFromEvent$1 = function (simulatedEvent) {
+      var pos = getEventSource(simulatedEvent);
+      return pos.map(function (p) {
+        return p.top();
+      });
+    };
+    var findOffsetOfValue$2 = function (spectrum, detail, value, minEdge, maxEdge) {
+      var minOffset = 0;
+      var maxOffset = getYScreenRange(spectrum);
+      var centerMinEdge = minEdge.bind(function (edge) {
+        return Option.some(getYCenterOffSetOf(edge, spectrum));
+      }).getOr(minOffset);
+      var centerMaxEdge = maxEdge.bind(function (edge) {
+        return Option.some(getYCenterOffSetOf(edge, spectrum));
+      }).getOr(maxOffset);
+      var args = {
+        min: minY(detail),
+        max: maxY(detail),
+        range: yRange(detail),
+        value: value,
+        hasMinEdge: hasTEdge(detail),
+        hasMaxEdge: hasBEdge(detail),
+        minBound: getMinYBounds(spectrum),
+        minOffset: minOffset,
+        maxBound: getMaxYBounds(spectrum),
+        maxOffset: maxOffset,
+        centerMinEdge: centerMinEdge,
+        centerMaxEdge: centerMaxEdge
+      };
+      return findOffsetOfValue(args);
+    };
+    var findPositionOfValue$1 = function (slider, spectrum, value, minEdge, maxEdge, detail) {
+      var offset = findOffsetOfValue$2(spectrum, detail, value, minEdge, maxEdge);
+      return getMinYBounds(spectrum) - getMinYBounds(slider) + offset;
+    };
+    var setPositionFromValue$1 = function (slider, thumb, detail, edges) {
+      var value = currentValue(detail);
+      var pos = findPositionOfValue$1(slider, edges.getSpectrum(slider), value.y(), edges.getTopEdge(slider), edges.getBottomEdge(slider), detail);
+      var thumbRadius = get$6(thumb.element()) / 2;
+      set$2(thumb.element(), 'top', pos - thumbRadius + 'px');
+    };
+    var onLeft$1 = Option.none;
+    var onRight$1 = Option.none;
+    var onUp$1 = handleMovement$1(-1);
+    var onDown$1 = handleMovement$1(1);
+    var edgeActions$1 = {
+      'top-left': Option.none(),
+      'top': Option.some(setToTEdge),
+      'top-right': Option.none(),
+      'right': Option.none(),
+      'bottom-right': Option.none(),
+      'bottom': Option.some(setToBEdge),
+      'bottom-left': Option.none(),
+      'left': Option.none()
+    };
+
+    var VerticalModel = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        setValueFrom: setValueFrom$1,
+        setToMin: setToMin$1,
+        setToMax: setToMax$1,
+        findValueOfOffset: findValueOfOffset$1,
+        getValueFromEvent: getValueFromEvent$1,
+        findPositionOfValue: findPositionOfValue$1,
+        setPositionFromValue: setPositionFromValue$1,
+        onLeft: onLeft$1,
+        onRight: onRight$1,
+        onUp: onUp$1,
+        onDown: onDown$1,
+        edgeActions: edgeActions$1
+    });
+
+    var fireSliderChange$3 = function (spectrum, value) {
+      emitWith(spectrum, sliderChangeEvent(), { value: value });
+    };
+    var sliderValue$2 = function (x, y) {
+      return {
+        x: constant(x),
+        y: constant(y)
+      };
+    };
+    var setValueFrom$2 = function (spectrum, detail, value) {
+      var xValue = findValueOfOffset(spectrum, detail, value.left());
+      var yValue = findValueOfOffset$1(spectrum, detail, value.top());
+      var val = sliderValue$2(xValue, yValue);
+      fireSliderChange$3(spectrum, val);
+      return val;
+    };
+    var moveBy$2 = function (direction, isVerticalMovement, spectrum, detail) {
+      var f = direction > 0 ? increaseBy : reduceBy;
+      var xValue = isVerticalMovement ? currentValue(detail).x() : f(currentValue(detail).x(), minX(detail), maxX(detail), step(detail));
+      var yValue = !isVerticalMovement ? currentValue(detail).y() : f(currentValue(detail).y(), minY(detail), maxY(detail), step(detail));
+      fireSliderChange$3(spectrum, sliderValue$2(xValue, yValue));
+      return Option.some(xValue);
+    };
+    var handleMovement$2 = function (direction, isVerticalMovement) {
+      return function (spectrum, detail) {
+        return moveBy$2(direction, isVerticalMovement, spectrum, detail).map(function () {
+          return true;
+        });
+      };
+    };
+    var setToMin$2 = function (spectrum, detail) {
+      var mX = minX(detail);
+      var mY = minY(detail);
+      fireSliderChange$3(spectrum, sliderValue$2(mX, mY));
+    };
+    var setToMax$2 = function (spectrum, detail) {
+      var mX = maxX(detail);
+      var mY = maxY(detail);
+      fireSliderChange$3(spectrum, sliderValue$2(mX, mY));
+    };
+    var getValueFromEvent$2 = function (simulatedEvent) {
+      return getEventSource(simulatedEvent);
+    };
+    var setPositionFromValue$2 = function (slider, thumb, detail, edges) {
+      var value = currentValue(detail);
+      var xPos = findPositionOfValue(slider, edges.getSpectrum(slider), value.x(), edges.getLeftEdge(slider), edges.getRightEdge(slider), detail);
+      var yPos = findPositionOfValue$1(slider, edges.getSpectrum(slider), value.y(), edges.getTopEdge(slider), edges.getBottomEdge(slider), detail);
+      var thumbXRadius = get$7(thumb.element()) / 2;
+      var thumbYRadius = get$6(thumb.element()) / 2;
+      set$2(thumb.element(), 'left', xPos - thumbXRadius + 'px');
+      set$2(thumb.element(), 'top', yPos - thumbYRadius + 'px');
+    };
+    var onLeft$2 = handleMovement$2(-1, false);
+    var onRight$2 = handleMovement$2(1, false);
+    var onUp$2 = handleMovement$2(-1, true);
+    var onDown$2 = handleMovement$2(1, true);
+    var edgeActions$2 = {
+      'top-left': Option.some(setToTLEdgeXY),
+      'top': Option.some(setToTEdgeXY),
+      'top-right': Option.some(setToTREdgeXY),
+      'right': Option.some(setToREdgeXY),
+      'bottom-right': Option.some(setToBREdgeXY),
+      'bottom': Option.some(setToBEdgeXY),
+      'bottom-left': Option.some(setToBLEdgeXY),
+      'left': Option.some(setToLEdgeXY)
+    };
+
+    var TwoDModel = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        setValueFrom: setValueFrom$2,
+        setToMin: setToMin$2,
+        setToMax: setToMax$2,
+        getValueFromEvent: getValueFromEvent$2,
+        setPositionFromValue: setPositionFromValue$2,
+        onLeft: onLeft$2,
+        onRight: onRight$2,
+        onUp: onUp$2,
+        onDown: onDown$2,
+        edgeActions: edgeActions$2
+    });
+
+    var SliderSchema = [
+      defaulted$1('stepSize', 1),
+      defaulted$1('onChange', noop),
+      defaulted$1('onChoose', noop),
+      defaulted$1('onInit', noop),
+      defaulted$1('onDragStart', noop),
+      defaulted$1('onDragEnd', noop),
+      defaulted$1('snapToGrid', false),
+      defaulted$1('rounded', true),
+      option('snapStart'),
+      strictOf('model', choose$1('mode', {
+        x: [
+          defaulted$1('minX', 0),
+          defaulted$1('maxX', 100),
+          state$1('value', function (spec) {
+            return Cell(spec.mode.minX);
+          }),
+          strict$1('getInitialValue'),
+          output('manager', HorizontalModel)
+        ],
+        y: [
+          defaulted$1('minY', 0),
+          defaulted$1('maxY', 100),
+          state$1('value', function (spec) {
+            return Cell(spec.mode.minY);
+          }),
+          strict$1('getInitialValue'),
+          output('manager', VerticalModel)
+        ],
+        xy: [
+          defaulted$1('minX', 0),
+          defaulted$1('maxX', 100),
+          defaulted$1('minY', 0),
+          defaulted$1('maxY', 100),
+          state$1('value', function (spec) {
+            return Cell({
+              x: constant(spec.mode.minX),
+              y: constant(spec.mode.minY)
+            });
+          }),
+          strict$1('getInitialValue'),
+          output('manager', TwoDModel)
+        ]
+      })),
+      field$1('sliderBehaviours', [
+        Keying,
+        Representing
+      ]),
+      state$1('mouseIsDown', function () {
+        return Cell(false);
+      })
+    ];
+
+    var sketch = function (detail, components, _spec, _externals) {
+      var _a;
+      var getThumb = function (component) {
+        return getPartOrDie(component, detail, 'thumb');
+      };
+      var getSpectrum = function (component) {
+        return getPartOrDie(component, detail, 'spectrum');
+      };
+      var getLeftEdge = function (component) {
+        return getPart(component, detail, 'left-edge');
+      };
+      var getRightEdge = function (component) {
+        return getPart(component, detail, 'right-edge');
+      };
+      var getTopEdge = function (component) {
+        return getPart(component, detail, 'top-edge');
+      };
+      var getBottomEdge = function (component) {
+        return getPart(component, detail, 'bottom-edge');
+      };
+      var modelDetail = detail.model;
+      var model = modelDetail.manager;
+      var refresh = function (slider, thumb) {
+        model.setPositionFromValue(slider, thumb, detail, {
+          getLeftEdge: getLeftEdge,
+          getRightEdge: getRightEdge,
+          getTopEdge: getTopEdge,
+          getBottomEdge: getBottomEdge,
+          getSpectrum: getSpectrum
+        });
+      };
+      var changeValue = function (slider, newValue) {
+        modelDetail.value.set(newValue);
+        var thumb = getThumb(slider);
+        refresh(slider, thumb);
+        detail.onChange(slider, thumb, newValue);
+        return Option.some(true);
+      };
+      var resetToMin = function (slider) {
+        model.setToMin(slider, detail);
+      };
+      var resetToMax = function (slider) {
+        model.setToMax(slider, detail);
+      };
+      var choose = function (slider) {
+        var fireOnChoose = function () {
+          getPart(slider, detail, 'thumb').each(function (thumb) {
+            var value = modelDetail.value.get();
+            detail.onChoose(slider, thumb, value);
+          });
+        };
+        var wasDown = detail.mouseIsDown.get();
+        detail.mouseIsDown.set(false);
+        if (wasDown) {
+          fireOnChoose();
+        }
+      };
+      var onDragStart = function (slider, simulatedEvent) {
+        simulatedEvent.stop();
+        detail.mouseIsDown.set(true);
+        detail.onDragStart(slider, getThumb(slider));
+      };
+      var onDragEnd = function (slider, simulatedEvent) {
+        simulatedEvent.stop();
+        detail.onDragEnd(slider, getThumb(slider));
+        choose(slider);
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        behaviours: augment(detail.sliderBehaviours, [
+          Keying.config({
+            mode: 'special',
+            focusIn: function (slider) {
+              return getPart(slider, detail, 'spectrum').map(Keying.focusIn).map(constant(true));
+            }
+          }),
+          Representing.config({
+            store: {
+              mode: 'manual',
+              getValue: function (_) {
+                return modelDetail.value.get();
+              }
+            }
+          }),
+          Receiving.config({ channels: (_a = {}, _a[mouseReleased()] = { onReceive: choose }, _a) })
+        ]),
+        events: derive([
+          run(sliderChangeEvent(), function (slider, simulatedEvent) {
+            changeValue(slider, simulatedEvent.event().value());
+          }),
+          runOnAttached(function (slider, _simulatedEvent) {
+            var getInitial = modelDetail.getInitialValue();
+            modelDetail.value.set(getInitial);
+            var thumb = getThumb(slider);
+            refresh(slider, thumb);
+            var spectrum = getSpectrum(slider);
+            detail.onInit(slider, thumb, spectrum, modelDetail.value.get());
+          }),
+          run(touchstart(), onDragStart),
+          run(touchend(), onDragEnd),
+          run(mousedown(), onDragStart),
+          run(mouseup(), onDragEnd)
+        ]),
+        apis: {
+          resetToMin: resetToMin,
+          resetToMax: resetToMax,
+          changeValue: changeValue,
+          refresh: refresh
+        },
+        domModification: { styles: { position: 'relative' } }
+      };
+    };
+
+    var Slider = composite$1({
+      name: 'Slider',
+      configFields: SliderSchema,
+      partFields: SliderParts,
+      factory: sketch,
+      apis: {
+        resetToMin: function (apis, slider) {
+          apis.resetToMin(slider);
+        },
+        resetToMax: function (apis, slider) {
+          apis.resetToMax(slider);
+        },
+        refresh: function (apis, slider) {
+          apis.refresh(slider);
+        }
+      }
+    });
+
+    var sliderFactory = function (translate, getClass) {
+      var spectrum = Slider.parts().spectrum({
+        dom: {
+          tag: 'div',
+          classes: [getClass('hue-slider-spectrum')],
+          attributes: { role: 'presentation' }
+        }
+      });
+      var thumb = Slider.parts().thumb({
+        dom: {
+          tag: 'div',
+          classes: [getClass('hue-slider-thumb')],
+          attributes: { role: 'presentation' }
+        }
+      });
+      return Slider.sketch({
+        dom: {
+          tag: 'div',
+          classes: [getClass('hue-slider')],
+          attributes: { role: 'presentation' }
+        },
+        rounded: false,
+        model: {
+          mode: 'y',
+          getInitialValue: constant({ y: constant(0) })
+        },
+        components: [
+          spectrum,
+          thumb
+        ],
+        sliderBehaviours: derive$1([Focusing.config({})]),
+        onChange: function (slider, _thumb, value) {
+          emitWith(slider, sliderUpdate, { value: value });
+        }
+      });
+    };
+
+    var owner$3 = 'form';
+    var schema$h = [field$1('formBehaviours', [Representing])];
+    var getPartName = function (name) {
+      return '<alloy.field.' + name + '>';
+    };
+    var sketch$1 = function (fSpec) {
+      var parts = function () {
+        var record = [];
+        var field = function (name, config) {
+          record.push(name);
+          return generateOne(owner$3, getPartName(name), config);
+        };
+        return {
+          field: field,
+          record: function () {
+            return record;
+          }
+        };
+      }();
+      var spec = fSpec(parts);
+      var partNames = parts.record();
+      var fieldParts = map(partNames, function (n) {
+        return required({
+          name: n,
+          pname: getPartName(n)
+        });
+      });
+      return composite(owner$3, schema$h, fieldParts, make$4, spec);
+    };
+    var toResult$1 = function (o, e) {
+      return o.fold(function () {
+        return Result.error(e);
+      }, Result.value);
+    };
+    var make$4 = function (detail, components) {
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        behaviours: augment(detail.formBehaviours, [Representing.config({
+            store: {
+              mode: 'manual',
+              getValue: function (form) {
+                var resPs = getAllParts(form, detail);
+                return map$1(resPs, function (resPThunk, pName) {
+                  return resPThunk().bind(function (v) {
+                    var opt = Composing.getCurrent(v);
+                    return toResult$1(opt, new Error('Cannot find a current component to extract the value from for form part \'' + pName + '\': ' + element(v.element())));
+                  }).map(Representing.getValue);
+                });
+              },
+              setValue: function (form, values) {
+                each$1(values, function (newValue, key) {
+                  getPart(form, detail, key).each(function (wrapper) {
+                    Composing.getCurrent(wrapper).each(function (field) {
+                      Representing.setValue(field, newValue);
+                    });
+                  });
+                });
+              }
+            }
+          })]),
+        apis: {
+          getField: function (form, key) {
+            return getPart(form, detail, key).bind(Composing.getCurrent);
+          }
+        }
+      };
+    };
+    var Form = {
+      getField: makeApi(function (apis, component, key) {
+        return apis.getField(component, key);
+      }),
+      sketch: sketch$1
+    };
+
+    var validInput = generate$1('valid-input');
+    var invalidInput = generate$1('invalid-input');
+    var validatingInput = generate$1('validating-input');
+    var translatePrefix = 'colorcustom.rgb.';
+    var rgbFormFactory = function (translate, getClass, onValidHexx, onInvalidHexx) {
+      var invalidation = function (label, isValid) {
+        return Invalidating.config({
+          invalidClass: getClass('invalid'),
+          notify: {
+            onValidate: function (comp) {
+              emitWith(comp, validatingInput, { type: label });
+            },
+            onValid: function (comp) {
+              emitWith(comp, validInput, {
+                type: label,
+                value: Representing.getValue(comp)
+              });
+            },
+            onInvalid: function (comp) {
+              emitWith(comp, invalidInput, {
+                type: label,
+                value: Representing.getValue(comp)
+              });
+            }
+          },
+          validator: {
+            validate: function (comp) {
+              var value = Representing.getValue(comp);
+              var res = isValid(value) ? Result.value(true) : Result.error(translate('aria.input.invalid'));
+              return Future.pure(res);
+            },
+            validateOnLoad: false
+          }
+        });
+      };
+      var renderTextField = function (isValid, name, label, description, data) {
+        var helptext = translate(translatePrefix + 'range');
+        var pLabel = FormField.parts().label({
+          dom: {
+            tag: 'label',
+            innerHtml: label,
+            attributes: { 'aria-label': description }
+          }
+        });
+        var pField = FormField.parts().field({
+          data: data,
+          factory: Input,
+          inputAttributes: __assign({ type: 'text' }, name === 'hex' ? { 'aria-live': 'polite' } : {}),
+          inputClasses: [getClass('textfield')],
+          inputBehaviours: derive$1([
+            invalidation(name, isValid),
+            Tabstopping.config({})
+          ]),
+          onSetValue: function (input) {
+            if (Invalidating.isInvalid(input)) {
+              var run = Invalidating.run(input);
+              run.get(noop);
+            }
+          }
+        });
+        var comps = [
+          pLabel,
+          pField
+        ];
+        var concats = name !== 'hex' ? [FormField.parts()['aria-descriptor']({ text: helptext })] : [];
+        var components = comps.concat(concats);
+        return {
+          dom: {
+            tag: 'div',
+            attributes: { role: 'presentation' }
+          },
+          components: components
+        };
+      };
+      var copyRgbToHex = function (form, rgba) {
+        var hex = fromRgba(rgba);
+        Form.getField(form, 'hex').each(function (hexField) {
+          if (!Focusing.isFocused(hexField)) {
+            Representing.setValue(form, { hex: hex.value });
+          }
+        });
+        return hex;
+      };
+      var copyRgbToForm = function (form, rgb) {
+        var red = rgb.red;
+        var green = rgb.green;
+        var blue = rgb.blue;
+        Representing.setValue(form, {
+          red: red,
+          green: green,
+          blue: blue
+        });
+      };
+      var memPreview = record({
+        dom: {
+          tag: 'div',
+          classes: [getClass('rgba-preview')],
+          styles: { 'background-color': 'white' },
+          attributes: { role: 'presentation' }
+        }
+      });
+      var updatePreview = function (anyInSystem, hex) {
+        memPreview.getOpt(anyInSystem).each(function (preview) {
+          set$2(preview.element(), 'background-color', '#' + hex.value);
+        });
+      };
+      var factory = function () {
+        var state = {
+          red: Cell(Option.some(255)),
+          green: Cell(Option.some(255)),
+          blue: Cell(Option.some(255)),
+          hex: Cell(Option.some('ffffff'))
+        };
+        var copyHexToRgb = function (form, hex) {
+          var rgb = fromHex(hex);
+          copyRgbToForm(form, rgb);
+          setValueRgb(rgb);
+        };
+        var get = function (prop) {
+          return state[prop].get();
+        };
+        var set = function (prop, value) {
+          state[prop].set(value);
+        };
+        var getValueRgb = function () {
+          return get('red').bind(function (red) {
+            return get('green').bind(function (green) {
+              return get('blue').map(function (blue) {
+                return rgbaColour(red, green, blue, 1);
+              });
+            });
+          });
+        };
+        var setValueRgb = function (rgb) {
+          var red = rgb.red;
+          var green = rgb.green;
+          var blue = rgb.blue;
+          set('red', Option.some(red));
+          set('green', Option.some(green));
+          set('blue', Option.some(blue));
+        };
+        var onInvalidInput = function (form, simulatedEvent) {
+          var data = simulatedEvent.event();
+          if (data.type() !== 'hex') {
+            set(data.type(), Option.none());
+          } else {
+            onInvalidHexx(form);
+          }
+        };
+        var onValidHex = function (form, value) {
+          onValidHexx(form);
+          var hex = hexColour(value);
+          set('hex', Option.some(value));
+          var rgb = fromHex(hex);
+          copyRgbToForm(form, rgb);
+          setValueRgb(rgb);
+          emitWith(form, fieldsUpdate, { hex: hex });
+          updatePreview(form, hex);
+        };
+        var onValidRgb = function (form, prop, value) {
+          var val = parseInt(value, 10);
+          set(prop, Option.some(val));
+          getValueRgb().each(function (rgb) {
+            var hex = copyRgbToHex(form, rgb);
+            updatePreview(form, hex);
+          });
+        };
+        var isHexInputEvent = function (data) {
+          return data.type() === 'hex';
+        };
+        var onValidInput = function (form, simulatedEvent) {
+          var data = simulatedEvent.event();
+          if (isHexInputEvent(data)) {
+            onValidHex(form, data.value());
+          } else {
+            onValidRgb(form, data.type(), data.value());
+          }
+        };
+        var formPartStrings = function (key) {
+          return {
+            label: translate(translatePrefix + key + '.label'),
+            description: translate(translatePrefix + key + '.description')
+          };
+        };
+        var redStrings = formPartStrings('red');
+        var greenStrings = formPartStrings('green');
+        var blueStrings = formPartStrings('blue');
+        var hexStrings = formPartStrings('hex');
+        return deepMerge(Form.sketch(function (parts) {
+          return {
+            dom: {
+              tag: 'form',
+              classes: [getClass('rgb-form')],
+              attributes: { 'aria-label': translate('aria.color.picker') }
+            },
+            components: [
+              parts.field('red', FormField.sketch(renderTextField(isRgbaComponent, 'red', redStrings.label, redStrings.description, 255))),
+              parts.field('green', FormField.sketch(renderTextField(isRgbaComponent, 'green', greenStrings.label, greenStrings.description, 255))),
+              parts.field('blue', FormField.sketch(renderTextField(isRgbaComponent, 'blue', blueStrings.label, blueStrings.description, 255))),
+              parts.field('hex', FormField.sketch(renderTextField(isHexString, 'hex', hexStrings.label, hexStrings.description, 'ffffff'))),
+              memPreview.asSpec()
+            ],
+            formBehaviours: derive$1([
+              Invalidating.config({ invalidClass: getClass('form-invalid') }),
+              config('rgb-form-events', [
+                run(validInput, onValidInput),
+                run(invalidInput, onInvalidInput),
+                run(validatingInput, onInvalidInput)
+              ])
+            ])
+          };
+        }), {
+          apis: {
+            updateHex: function (form, hex) {
+              Representing.setValue(form, { hex: hex.value });
+              copyHexToRgb(form, hex);
+              updatePreview(form, hex);
+            }
+          }
+        });
+      };
+      var rgbFormSketcher = single$2({
+        factory: factory,
+        name: 'RgbForm',
+        configFields: [],
+        apis: {
+          updateHex: function (apis, form, hex) {
+            apis.updateHex(form, hex);
+          }
+        },
+        extraApis: {}
+      });
+      return rgbFormSketcher;
+    };
+
+    var paletteFactory = function (_translate, getClass) {
+      var spectrumPart = Slider.parts().spectrum({
+        dom: {
+          tag: 'canvas',
+          attributes: { role: 'presentation' },
+          classes: [getClass('sv-palette-spectrum')]
+        }
+      });
+      var thumbPart = Slider.parts().thumb({
+        dom: {
+          tag: 'div',
+          attributes: { role: 'presentation' },
+          classes: [getClass('sv-palette-thumb')],
+          innerHtml: '<div class=' + getClass('sv-palette-inner-thumb') + ' role="presentation"></div>'
+        }
+      });
+      var setColour = function (canvas, rgba) {
+        var width = canvas.width, height = canvas.height;
+        var ctx = canvas.getContext('2d');
+        if (ctx === null) {
+          return;
+        }
+        ctx.fillStyle = rgba;
+        ctx.fillRect(0, 0, width, height);
+        var grdWhite = ctx.createLinearGradient(0, 0, width, 0);
+        grdWhite.addColorStop(0, 'rgba(255,255,255,1)');
+        grdWhite.addColorStop(1, 'rgba(255,255,255,0)');
+        ctx.fillStyle = grdWhite;
+        ctx.fillRect(0, 0, width, height);
+        var grdBlack = ctx.createLinearGradient(0, 0, 0, height);
+        grdBlack.addColorStop(0, 'rgba(0,0,0,0)');
+        grdBlack.addColorStop(1, 'rgba(0,0,0,1)');
+        ctx.fillStyle = grdBlack;
+        ctx.fillRect(0, 0, width, height);
+      };
+      var setSliderColour = function (slider, rgba) {
+        var canvas = slider.components()[0].element().dom();
+        setColour(canvas, toString(rgba));
+      };
+      var factory = function (_detail) {
+        var getInitialValue = constant({
+          x: constant(0),
+          y: constant(0)
+        });
+        var onChange = function (slider, _thumb, value) {
+          emitWith(slider, paletteUpdate, { value: value });
+        };
+        var onInit = function (_slider, _thumb, spectrum, _value) {
+          setColour(spectrum.element().dom(), toString(red));
+        };
+        var sliderBehaviours = derive$1([
+          Composing.config({ find: Option.some }),
+          Focusing.config({})
+        ]);
+        return Slider.sketch({
+          dom: {
+            tag: 'div',
+            attributes: { role: 'presentation' },
+            classes: [getClass('sv-palette')]
+          },
+          model: {
+            mode: 'xy',
+            getInitialValue: getInitialValue
+          },
+          rounded: false,
+          components: [
+            spectrumPart,
+            thumbPart
+          ],
+          onChange: onChange,
+          onInit: onInit,
+          sliderBehaviours: sliderBehaviours
+        });
+      };
+      var saturationBrightnessPaletteSketcher = single$2({
+        factory: factory,
+        name: 'SaturationBrightnessPalette',
+        configFields: [],
+        apis: {
+          setRgba: function (_apis, slider, rgba) {
+            setSliderColour(slider, rgba);
+          }
+        },
+        extraApis: {}
+      });
+      return saturationBrightnessPaletteSketcher;
+    };
+
+    var makeFactory = function (translate, getClass) {
+      var factory = function (detail) {
+        var rgbForm = rgbFormFactory(translate, getClass, detail.onValidHex, detail.onInvalidHex);
+        var sbPalette = paletteFactory(translate, getClass);
+        var state = { paletteRgba: Cell(red) };
+        var memPalette = record(sbPalette.sketch({}));
+        var memRgb = record(rgbForm.sketch({}));
+        var updatePalette = function (anyInSystem, hex) {
+          memPalette.getOpt(anyInSystem).each(function (palette) {
+            var rgba = fromHex(hex);
+            state.paletteRgba.set(rgba);
+            sbPalette.setRgba(palette, rgba);
+          });
+        };
+        var updateFields = function (anyInSystem, hex) {
+          memRgb.getOpt(anyInSystem).each(function (form) {
+            rgbForm.updateHex(form, hex);
+          });
+        };
+        var runUpdates = function (anyInSystem, hex, updates) {
+          each(updates, function (update) {
+            update(anyInSystem, hex);
+          });
+        };
+        var paletteUpdates = function () {
+          var updates = [updateFields];
+          return function (form, simulatedEvent) {
+            var value = simulatedEvent.event().value();
+            var oldRgb = state.paletteRgba.get();
+            var hsvColour$1 = fromRgb(oldRgb);
+            var newHsvColour = hsvColour(hsvColour$1.hue, value.x(), 100 - value.y());
+            var rgb = fromHsv(newHsvColour);
+            var nuHex = fromRgba(rgb);
+            runUpdates(form, nuHex, updates);
+          };
+        };
+        var sliderUpdates = function () {
+          var updates = [
+            updatePalette,
+            updateFields
+          ];
+          return function (form, simulatedEvent) {
+            var value = simulatedEvent.event().value();
+            var hex = calcHex(value.y());
+            runUpdates(form, hex, updates);
+          };
+        };
+        return {
+          uid: detail.uid,
+          dom: detail.dom,
+          components: [
+            memPalette.asSpec(),
+            sliderFactory(translate, getClass),
+            memRgb.asSpec()
+          ],
+          behaviours: derive$1([
+            config('colour-picker-events', [
+              run(paletteUpdate, paletteUpdates()),
+              run(sliderUpdate, sliderUpdates())
+            ]),
+            Composing.config({
+              find: function (comp) {
+                return memRgb.getOpt(comp);
+              }
+            }),
+            Keying.config({ mode: 'acyclic' })
+          ])
+        };
+      };
+      var colourPickerSketcher = single$2({
+        name: 'ColourPicker',
+        configFields: [
+          strict$1('dom'),
+          defaulted$1('onValidHex', noop),
+          defaulted$1('onInvalidHex', noop)
+        ],
+        factory: factory
+      });
+      return colourPickerSketcher;
+    };
+
+    var self$1 = function () {
+      return Composing.config({ find: Option.some });
+    };
+    var memento = function (mem) {
+      return Composing.config({ find: mem.getOpt });
+    };
+    var childAt = function (index) {
+      return Composing.config({
+        find: function (comp) {
+          return child(comp.element(), index).bind(function (element) {
+            return comp.getSystem().getByDom(element).toOption();
+          });
+        }
+      });
+    };
+    var ComposingConfigs = {
+      self: self$1,
+      memento: memento,
+      childAt: childAt
+    };
+
+    var english = {
+      'colorcustom.rgb.red.label': 'R',
+      'colorcustom.rgb.red.description': 'Red component',
+      'colorcustom.rgb.green.label': 'G',
+      'colorcustom.rgb.green.description': 'Green component',
+      'colorcustom.rgb.blue.label': 'B',
+      'colorcustom.rgb.blue.description': 'Blue component',
+      'colorcustom.rgb.hex.label': '#',
+      'colorcustom.rgb.hex.description': 'Hex color code',
+      'colorcustom.rgb.range': 'Range 0 to 255',
+      'colorcustom.sb.saturation': 'Saturation',
+      'colorcustom.sb.brightness': 'Brightness',
+      'colorcustom.sb.picker': 'Saturation and Brightness Picker',
+      'colorcustom.sb.palette': 'Saturation and Brightness Palette',
+      'colorcustom.sb.instructions': 'Use arrow keys to select saturation and brightness, on x and y axes',
+      'colorcustom.hue.hue': 'Hue',
+      'colorcustom.hue.slider': 'Hue Slider',
+      'colorcustom.hue.palette': 'Hue Palette',
+      'colorcustom.hue.instructions': 'Use arrow keys to select a hue',
+      'aria.color.picker': 'Color Picker',
+      'aria.input.invalid': 'Invalid input'
+    };
+    var getEnglishText = function (key) {
+      return english[key];
+    };
+    var translate$1 = function (key) {
+      return getEnglishText(key);
+    };
+    var renderColorPicker = function (_spec) {
+      var getClass = function (key) {
+        return 'tox-' + key;
+      };
+      var colourPickerFactory = makeFactory(translate$1, getClass);
+      var onValidHex = function (form) {
+        emitWith(form, formActionEvent, {
+          name: 'hex-valid',
+          value: true
+        });
+      };
+      var onInvalidHex = function (form) {
+        emitWith(form, formActionEvent, {
+          name: 'hex-valid',
+          value: false
+        });
+      };
+      var memPicker = record(colourPickerFactory.sketch({
+        dom: {
+          tag: 'div',
+          classes: [getClass('color-picker-container')],
+          attributes: { role: 'presentation' }
+        },
+        onValidHex: onValidHex,
+        onInvalidHex: onInvalidHex
+      }));
+      return {
+        dom: { tag: 'div' },
+        components: [memPicker.asSpec()],
+        behaviours: derive$1([
+          Representing.config({
+            store: {
+              mode: 'manual',
+              getValue: function (comp) {
+                var picker = memPicker.get(comp);
+                var optRgbForm = Composing.getCurrent(picker);
+                var optHex = optRgbForm.bind(function (rgbForm) {
+                  var formValues = Representing.getValue(rgbForm);
+                  return formValues.hex;
+                });
+                return optHex.map(function (hex) {
+                  return '#' + hex;
+                }).getOr('');
+              },
+              setValue: function (comp, newValue) {
+                var pattern = /^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/;
+                var m = pattern.exec(newValue);
+                var picker = memPicker.get(comp);
+                var optRgbForm = Composing.getCurrent(picker);
+                optRgbForm.fold(function () {
+                  domGlobals.console.log('Can not find form');
+                }, function (rgbForm) {
+                  Representing.setValue(rgbForm, { hex: Option.from(m[1]).getOr('') });
+                  Form.getField(rgbForm, 'hex').each(function (hexField) {
+                    emit(hexField, input());
+                  });
+                });
+              }
+            }
+          }),
+          ComposingConfigs.self()
+        ])
+      };
+    };
+
+    var global$a = tinymce.util.Tools.resolve('tinymce.Resource');
+
+    var isOldCustomEditor = function (spec) {
+      return Object.prototype.hasOwnProperty.call(spec, 'init');
+    };
+    var renderCustomEditor = function (spec) {
+      var editorApi = Cell(Option.none());
+      var memReplaced = record({ dom: { tag: spec.tag } });
+      var initialValue = Cell(Option.none());
+      return {
+        dom: {
+          tag: 'div',
+          classes: ['tox-custom-editor']
+        },
+        behaviours: derive$1([
+          config('editor-foo-events', [runOnAttached(function (component) {
+              memReplaced.getOpt(component).each(function (ta) {
+                (isOldCustomEditor(spec) ? spec.init(ta.element().dom()) : global$a.load(spec.scriptId, spec.scriptUrl).then(function (init) {
+                  return init(ta.element().dom(), spec.settings);
+                })).then(function (ea) {
+                  initialValue.get().each(function (cvalue) {
+                    ea.setValue(cvalue);
+                  });
+                  initialValue.set(Option.none());
+                  editorApi.set(Option.some(ea));
+                });
+              });
+            })]),
+          Representing.config({
+            store: {
+              mode: 'manual',
+              getValue: function () {
+                return editorApi.get().fold(function () {
+                  return initialValue.get().getOr('');
+                }, function (ed) {
+                  return ed.getValue();
+                });
+              },
+              setValue: function (component, value) {
+                editorApi.get().fold(function () {
+                  initialValue.set(Option.some(value));
+                }, function (ed) {
+                  return ed.setValue(value);
+                });
+              }
+            }
+          }),
+          ComposingConfigs.self()
+        ]),
+        components: [memReplaced.asSpec()]
+      };
+    };
+
+    var processors = objOf([
+      defaulted$1('preprocess', identity),
+      defaulted$1('postprocess', identity)
+    ]);
+    var memento$1 = function (mem, rawProcessors) {
+      var ps = asRawOrDie('RepresentingConfigs.memento processors', processors, rawProcessors);
+      return Representing.config({
+        store: {
+          mode: 'manual',
+          getValue: function (comp) {
+            var other = mem.get(comp);
+            var rawValue = Representing.getValue(other);
+            return ps.postprocess(rawValue);
+          },
+          setValue: function (comp, rawValue) {
+            var newValue = ps.preprocess(rawValue);
+            var other = mem.get(comp);
+            Representing.setValue(other, newValue);
+          }
+        }
+      });
+    };
+    var withComp = function (optInitialValue, getter, setter) {
+      return Representing.config(deepMerge({
+        store: {
+          mode: 'manual',
+          getValue: getter,
+          setValue: setter
+        }
+      }, optInitialValue.map(function (initialValue) {
+        return { store: { initialValue: initialValue } };
+      }).getOr({})));
+    };
+    var withElement = function (initialValue, getter, setter) {
+      return withComp(initialValue, function (c) {
+        return getter(c.element());
+      }, function (c, v) {
+        return setter(c.element(), v);
+      });
+    };
+    var domValue = function (optInitialValue) {
+      return withElement(optInitialValue, get$5, set$3);
+    };
+    var domHtml = function (optInitialValue) {
+      return withElement(optInitialValue, get$1, set);
+    };
+    var memory$1 = function (initialValue) {
+      return Representing.config({
+        store: {
+          mode: 'memory',
+          initialValue: initialValue
+        }
+      });
+    };
+    var RepresentingConfigs = {
+      memento: memento$1,
+      withElement: withElement,
+      withComp: withComp,
+      domValue: domValue,
+      domHtml: domHtml,
+      memory: memory$1
+    };
+
+    var extensionsAccepted = '.jpg,.jpeg,.png,.gif';
+    var filterByExtension = function (files) {
+      var re = new RegExp('(' + extensionsAccepted.split(/\s*,\s*/).join('|') + ')$', 'i');
+      return filter(from$1(files), function (file) {
+        return re.test(file.name);
+      });
+    };
+    var renderDropZone = function (spec, providersBackstage) {
+      var stopper = function (_, se) {
+        se.stop();
+      };
+      var sequence = function (actions) {
+        return function (comp, se) {
+          each(actions, function (a) {
+            a(comp, se);
+          });
+        };
+      };
+      var onDrop = function (comp, se) {
+        if (!Disabling.isDisabled(comp)) {
+          var transferEvent = se.event().raw();
+          handleFiles(comp, transferEvent.dataTransfer.files);
+        }
+      };
+      var onSelect = function (component, simulatedEvent) {
+        var files = simulatedEvent.event().raw().target.files;
+        handleFiles(component, files);
+      };
+      var handleFiles = function (component, files) {
+        Representing.setValue(component, filterByExtension(files));
+        emitWith(component, formChangeEvent, { name: spec.name });
+      };
+      var memInput = record({
+        dom: {
+          tag: 'input',
+          attributes: {
+            type: 'file',
+            accept: 'image/*'
+          },
+          styles: { display: 'none' }
+        },
+        behaviours: derive$1([config('input-file-events', [
+            cutter(click()),
+            cutter(tap())
+          ])])
+      });
+      var renderField = function (s) {
+        return {
+          uid: s.uid,
+          dom: {
+            tag: 'div',
+            classes: ['tox-dropzone-container']
+          },
+          behaviours: derive$1([
+            RepresentingConfigs.memory([]),
+            ComposingConfigs.self(),
+            Disabling.config({}),
+            Toggling.config({
+              toggleClass: 'dragenter',
+              toggleOnExecute: false
+            }),
+            config('dropzone-events', [
+              run('dragenter', sequence([
+                stopper,
+                Toggling.toggle
+              ])),
+              run('dragleave', sequence([
+                stopper,
+                Toggling.toggle
+              ])),
+              run('dragover', stopper),
+              run('drop', sequence([
+                stopper,
+                onDrop
+              ])),
+              run(change(), onSelect)
+            ])
+          ]),
+          components: [{
+              dom: {
+                tag: 'div',
+                classes: ['tox-dropzone'],
+                styles: {}
+              },
+              components: [
+                {
+                  dom: {
+                    tag: 'p',
+                    innerHtml: providersBackstage.translate('Drop an image here')
+                  }
+                },
+                Button.sketch({
+                  dom: {
+                    tag: 'button',
+                    innerHtml: providersBackstage.translate('Browse for an image'),
+                    styles: { position: 'relative' },
+                    classes: [
+                      'tox-button',
+                      'tox-button--secondary'
+                    ]
+                  },
+                  components: [memInput.asSpec()],
+                  action: function (comp) {
+                    var inputComp = memInput.get(comp);
+                    inputComp.element().dom().click();
+                  },
+                  buttonBehaviours: derive$1([
+                    Tabstopping.config({}),
+                    DisablingConfigs.button(providersBackstage.isReadOnly),
+                    receivingConfig()
+                  ])
+                })
+              ]
+            }]
+        };
+      };
+      var pLabel = spec.label.map(function (label) {
+        return renderLabel(label, providersBackstage);
+      });
+      var pField = FormField.parts().field({ factory: { sketch: renderField } });
+      return renderFormFieldWith(pLabel, pField, ['tox-form__group--stretched'], []);
+    };
+
+    var renderGrid = function (spec, backstage) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: [
+            'tox-form__grid',
+            'tox-form__grid--' + spec.columns + 'col'
+          ]
+        },
+        components: map(spec.items, backstage.interpreter)
+      };
+    };
+
+    var beforeObject = generate$1('alloy-fake-before-tabstop');
+    var afterObject = generate$1('alloy-fake-after-tabstop');
+    var craftWithClasses = function (classes) {
+      return {
+        dom: {
+          tag: 'div',
+          styles: {
+            width: '1px',
+            height: '1px',
+            outline: 'none'
+          },
+          attributes: { tabindex: '0' },
+          classes: classes
+        },
+        behaviours: derive$1([
+          Focusing.config({ ignore: true }),
+          Tabstopping.config({})
+        ])
+      };
+    };
+    var craft = function (spec) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: ['tox-navobj']
+        },
+        components: [
+          craftWithClasses([beforeObject]),
+          spec,
+          craftWithClasses([afterObject])
+        ],
+        behaviours: derive$1([ComposingConfigs.childAt(1)])
+      };
+    };
+    var triggerTab = function (placeholder, shiftKey) {
+      emitWith(placeholder, keydown(), {
+        raw: {
+          which: 9,
+          shiftKey: shiftKey
+        }
+      });
+    };
+    var onFocus$1 = function (container, targetComp) {
+      var target = targetComp.element();
+      if (has$2(target, beforeObject)) {
+        triggerTab(container, true);
+      } else if (has$2(target, afterObject)) {
+        triggerTab(container, false);
+      }
+    };
+    var isPseudoStop = function (element) {
+      return closest$4(element, [
+        '.' + beforeObject,
+        '.' + afterObject
+      ].join(','), constant(false));
+    };
+
+    var platformNeedsSandboxing = !(detect$3().browser.isIE() || detect$3().browser.isEdge());
+    var getDynamicSource = function (isSandbox) {
+      var cachedValue = Cell('');
+      return {
+        getValue: function (_frameComponent) {
+          return cachedValue.get();
+        },
+        setValue: function (frameComponent, html) {
+          if (!isSandbox) {
+            set$1(frameComponent.element(), 'src', 'javascript:\'\'');
+            var doc = frameComponent.element().dom().contentWindow.document;
+            doc.open();
+            doc.write(html);
+            doc.close();
+          } else {
+            set$1(frameComponent.element(), 'srcdoc', html);
+          }
+          cachedValue.set(html);
+        }
+      };
+    };
+    var renderIFrame = function (spec, providersBackstage) {
+      var isSandbox = platformNeedsSandboxing && spec.sandboxed;
+      var attributes = __assign(__assign({}, spec.label.map(function (title) {
+        return { title: title };
+      }).getOr({})), isSandbox ? { sandbox: 'allow-scripts allow-same-origin' } : {});
+      var sourcing = getDynamicSource(isSandbox);
+      var pLabel = spec.label.map(function (label) {
+        return renderLabel(label, providersBackstage);
+      });
+      var factory = function (newSpec) {
+        return craft({
+          uid: newSpec.uid,
+          dom: {
+            tag: 'iframe',
+            attributes: attributes
+          },
+          behaviours: derive$1([
+            Tabstopping.config({}),
+            Focusing.config({}),
+            RepresentingConfigs.withComp(Option.none(), sourcing.getValue, sourcing.setValue)
+          ])
+        });
+      };
+      var pField = FormField.parts().field({ factory: { sketch: factory } });
+      return renderFormFieldWith(pLabel, pField, ['tox-form__group--stretched'], []);
+    };
+
+    function create$5(width, height) {
+      return resize(domGlobals.document.createElement('canvas'), width, height);
+    }
+    function clone$1(canvas) {
+      var tCanvas = create$5(canvas.width, canvas.height);
+      var ctx = get2dContext(tCanvas);
+      ctx.drawImage(canvas, 0, 0);
+      return tCanvas;
+    }
+    function get2dContext(canvas) {
+      return canvas.getContext('2d');
+    }
+    function resize(canvas, width, height) {
+      canvas.width = width;
+      canvas.height = height;
+      return canvas;
+    }
+
+    function getWidth(image) {
+      return image.naturalWidth || image.width;
+    }
+    function getHeight(image) {
+      return image.naturalHeight || image.height;
+    }
+
+    var promise = function () {
+      var Promise = function (fn) {
+        if (typeof this !== 'object') {
+          throw new TypeError('Promises must be constructed via new');
+        }
+        if (typeof fn !== 'function') {
+          throw new TypeError('not a function');
+        }
+        this._state = null;
+        this._value = null;
+        this._deferreds = [];
+        doResolve(fn, bind(resolve, this), bind(reject, this));
+      };
+      var asap = Promise.immediateFn || typeof window.setImmediate === 'function' && window.setImmediate || function (fn) {
+        domGlobals.setTimeout(fn, 1);
+      };
+      function bind(fn, thisArg) {
+        return function () {
+          return fn.apply(thisArg, arguments);
+        };
+      }
+      var isArray = Array.isArray || function (value) {
+        return Object.prototype.toString.call(value) === '[object Array]';
+      };
+      function handle(deferred) {
+        var me = this;
+        if (this._state === null) {
+          this._deferreds.push(deferred);
+          return;
+        }
+        asap(function () {
+          var cb = me._state ? deferred.onFulfilled : deferred.onRejected;
+          if (cb === null) {
+            (me._state ? deferred.resolve : deferred.reject)(me._value);
+            return;
+          }
+          var ret;
+          try {
+            ret = cb(me._value);
+          } catch (e) {
+            deferred.reject(e);
+            return;
+          }
+          deferred.resolve(ret);
+        });
+      }
+      function resolve(newValue) {
+        try {
+          if (newValue === this) {
+            throw new TypeError('A promise cannot be resolved with itself.');
+          }
+          if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
+            var then = newValue.then;
+            if (typeof then === 'function') {
+              doResolve(bind(then, newValue), bind(resolve, this), bind(reject, this));
+              return;
+            }
+          }
+          this._state = true;
+          this._value = newValue;
+          finale.call(this);
+        } catch (e) {
+          reject.call(this, e);
+        }
+      }
+      function reject(newValue) {
+        this._state = false;
+        this._value = newValue;
+        finale.call(this);
+      }
+      function finale() {
+        for (var _i = 0, _a = this._deferreds; _i < _a.length; _i++) {
+          var deferred = _a[_i];
+          handle.call(this, deferred);
+        }
+        this._deferreds = [];
+      }
+      function Handler(onFulfilled, onRejected, resolve, reject) {
+        this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
+        this.onRejected = typeof onRejected === 'function' ? onRejected : null;
+        this.resolve = resolve;
+        this.reject = reject;
+      }
+      function doResolve(fn, onFulfilled, onRejected) {
+        var done = false;
+        try {
+          fn(function (value) {
+            if (done) {
+              return;
+            }
+            done = true;
+            onFulfilled(value);
+          }, function (reason) {
+            if (done) {
+              return;
+            }
+            done = true;
+            onRejected(reason);
+          });
+        } catch (ex) {
+          if (done) {
+            return;
+          }
+          done = true;
+          onRejected(ex);
+        }
+      }
+      Promise.prototype.catch = function (onRejected) {
+        return this.then(null, onRejected);
+      };
+      Promise.prototype.then = function (onFulfilled, onRejected) {
+        var me = this;
+        return new Promise(function (resolve, reject) {
+          handle.call(me, new Handler(onFulfilled, onRejected, resolve, reject));
+        });
+      };
+      Promise.all = function () {
+        var values = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          values[_i] = arguments[_i];
+        }
+        var args = Array.prototype.slice.call(values.length === 1 && isArray(values[0]) ? values[0] : values);
+        return new Promise(function (resolve, reject) {
+          if (args.length === 0) {
+            return resolve([]);
+          }
+          var remaining = args.length;
+          function res(i, val) {
+            try {
+              if (val && (typeof val === 'object' || typeof val === 'function')) {
+                var then = val.then;
+                if (typeof then === 'function') {
+                  then.call(val, function (val) {
+                    res(i, val);
+                  }, reject);
+                  return;
+                }
+              }
+              args[i] = val;
+              if (--remaining === 0) {
+                resolve(args);
+              }
+            } catch (ex) {
+              reject(ex);
+            }
+          }
+          for (var i = 0; i < args.length; i++) {
+            res(i, args[i]);
+          }
+        });
+      };
+      Promise.resolve = function (value) {
+        if (value && typeof value === 'object' && value.constructor === Promise) {
+          return value;
+        }
+        return new Promise(function (resolve) {
+          resolve(value);
+        });
+      };
+      Promise.reject = function (reason) {
+        return new Promise(function (resolve, reject) {
+          reject(reason);
+        });
+      };
+      Promise.race = function (values) {
+        return new Promise(function (resolve, reject) {
+          for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {
+            var value = values_1[_i];
+            value.then(resolve, reject);
+          }
+        });
+      };
+      return Promise;
+    };
+    var Promise$1 = window.Promise ? window.Promise : promise();
+
+    function blobToImage(blob) {
+      return new Promise$1(function (resolve, reject) {
+        var blobUrl = domGlobals.URL.createObjectURL(blob);
+        var image = new domGlobals.Image();
+        var removeListeners = function () {
+          image.removeEventListener('load', loaded);
+          image.removeEventListener('error', error);
+        };
+        function loaded() {
+          removeListeners();
+          resolve(image);
+        }
+        function error() {
+          removeListeners();
+          reject('Unable to load data of type ' + blob.type + ': ' + blobUrl);
+        }
+        image.addEventListener('load', loaded);
+        image.addEventListener('error', error);
+        image.src = blobUrl;
+        if (image.complete) {
+          loaded();
+        }
+      });
+    }
+    function dataUriToBlobSync(uri) {
+      var data = uri.split(',');
+      var matches = /data:([^;]+)/.exec(data[0]);
+      if (!matches) {
+        return Option.none();
+      }
+      var mimetype = matches[1];
+      var base64 = data[1];
+      var sliceSize = 1024;
+      var byteCharacters = domGlobals.atob(base64);
+      var bytesLength = byteCharacters.length;
+      var slicesCount = Math.ceil(bytesLength / sliceSize);
+      var byteArrays = new Array(slicesCount);
+      for (var sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {
+        var begin = sliceIndex * sliceSize;
+        var end = Math.min(begin + sliceSize, bytesLength);
+        var bytes = new Array(end - begin);
+        for (var offset = begin, i = 0; offset < end; ++i, ++offset) {
+          bytes[i] = byteCharacters[offset].charCodeAt(0);
+        }
+        byteArrays[sliceIndex] = new Uint8Array(bytes);
+      }
+      return Option.some(new domGlobals.Blob(byteArrays, { type: mimetype }));
+    }
+    function dataUriToBlob(uri) {
+      return new Promise$1(function (resolve, reject) {
+        dataUriToBlobSync(uri).fold(function () {
+          reject('uri is not base64: ' + uri);
+        }, resolve);
+      });
+    }
+    function canvasToBlob(canvas, type, quality) {
+      type = type || 'image/png';
+      if (domGlobals.HTMLCanvasElement.prototype.toBlob) {
+        return new Promise$1(function (resolve, reject) {
+          canvas.toBlob(function (blob) {
+            if (blob) {
+              resolve(blob);
+            } else {
+              reject();
+            }
+          }, type, quality);
+        });
+      } else {
+        return dataUriToBlob(canvas.toDataURL(type, quality));
+      }
+    }
+    function canvasToDataURL(canvas, type, quality) {
+      type = type || 'image/png';
+      return canvas.toDataURL(type, quality);
+    }
+    function blobToCanvas(blob) {
+      return blobToImage(blob).then(function (image) {
+        revokeImageUrl(image);
+        var canvas = create$5(getWidth(image), getHeight(image));
+        var context = get2dContext(canvas);
+        context.drawImage(image, 0, 0);
+        return canvas;
+      });
+    }
+    function blobToDataUri(blob) {
+      return new Promise$1(function (resolve) {
+        var reader = new domGlobals.FileReader();
+        reader.onloadend = function () {
+          resolve(reader.result);
+        };
+        reader.readAsDataURL(blob);
+      });
+    }
+    function revokeImageUrl(image) {
+      domGlobals.URL.revokeObjectURL(image.src);
+    }
+
+    function create$6(getCanvas, blob, uri) {
+      var initialType = blob.type;
+      var getType = constant(initialType);
+      function toBlob() {
+        return Promise$1.resolve(blob);
+      }
+      var toDataURL = constant(uri);
+      function toBase64() {
+        return uri.split(',')[1];
+      }
+      function toAdjustedBlob(type, quality) {
+        return getCanvas.then(function (canvas) {
+          return canvasToBlob(canvas, type, quality);
+        });
+      }
+      function toAdjustedDataURL(type, quality) {
+        return getCanvas.then(function (canvas) {
+          return canvasToDataURL(canvas, type, quality);
+        });
+      }
+      function toAdjustedBase64(type, quality) {
+        return toAdjustedDataURL(type, quality).then(function (dataurl) {
+          return dataurl.split(',')[1];
+        });
+      }
+      function toCanvas() {
+        return getCanvas.then(clone$1);
+      }
+      return {
+        getType: getType,
+        toBlob: toBlob,
+        toDataURL: toDataURL,
+        toBase64: toBase64,
+        toAdjustedBlob: toAdjustedBlob,
+        toAdjustedDataURL: toAdjustedDataURL,
+        toAdjustedBase64: toAdjustedBase64,
+        toCanvas: toCanvas
+      };
+    }
+    function fromBlob(blob) {
+      return blobToDataUri(blob).then(function (uri) {
+        return create$6(blobToCanvas(blob), blob, uri);
+      });
+    }
+    function fromCanvas(canvas, type) {
+      return canvasToBlob(canvas, type).then(function (blob) {
+        return create$6(Promise$1.resolve(canvas), blob, canvas.toDataURL());
+      });
+    }
+
+    var blobToImageResult = function (blob) {
+      return fromBlob(blob);
+    };
+
+    function clamp$1(value, min, max) {
+      var parsedValue = typeof value === 'string' ? parseFloat(value) : value;
+      if (parsedValue > max) {
+        parsedValue = max;
+      } else if (parsedValue < min) {
+        parsedValue = min;
+      }
+      return parsedValue;
+    }
+    function identity$1() {
+      return [
+        1,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1
+      ];
+    }
+    var DELTA_INDEX = [
+      0,
+      0.01,
+      0.02,
+      0.04,
+      0.05,
+      0.06,
+      0.07,
+      0.08,
+      0.1,
+      0.11,
+      0.12,
+      0.14,
+      0.15,
+      0.16,
+      0.17,
+      0.18,
+      0.2,
+      0.21,
+      0.22,
+      0.24,
+      0.25,
+      0.27,
+      0.28,
+      0.3,
+      0.32,
+      0.34,
+      0.36,
+      0.38,
+      0.4,
+      0.42,
+      0.44,
+      0.46,
+      0.48,
+      0.5,
+      0.53,
+      0.56,
+      0.59,
+      0.62,
+      0.65,
+      0.68,
+      0.71,
+      0.74,
+      0.77,
+      0.8,
+      0.83,
+      0.86,
+      0.89,
+      0.92,
+      0.95,
+      0.98,
+      1,
+      1.06,
+      1.12,
+      1.18,
+      1.24,
+      1.3,
+      1.36,
+      1.42,
+      1.48,
+      1.54,
+      1.6,
+      1.66,
+      1.72,
+      1.78,
+      1.84,
+      1.9,
+      1.96,
+      2,
+      2.12,
+      2.25,
+      2.37,
+      2.5,
+      2.62,
+      2.75,
+      2.87,
+      3,
+      3.2,
+      3.4,
+      3.6,
+      3.8,
+      4,
+      4.3,
+      4.7,
+      4.9,
+      5,
+      5.5,
+      6,
+      6.5,
+      6.8,
+      7,
+      7.3,
+      7.5,
+      7.8,
+      8,
+      8.4,
+      8.7,
+      9,
+      9.4,
+      9.6,
+      9.8,
+      10
+    ];
+    function multiply(matrix1, matrix2) {
+      var col = [];
+      var out = new Array(25);
+      var val;
+      for (var i = 0; i < 5; i++) {
+        for (var j = 0; j < 5; j++) {
+          col[j] = matrix2[j + i * 5];
+        }
+        for (var j = 0; j < 5; j++) {
+          val = 0;
+          for (var k = 0; k < 5; k++) {
+            val += matrix1[j + k * 5] * col[k];
+          }
+          out[j + i * 5] = val;
+        }
+      }
+      return out;
+    }
+    function adjustContrast(matrix, value) {
+      var x;
+      value = clamp$1(value, -1, 1);
+      value *= 100;
+      if (value < 0) {
+        x = 127 + value / 100 * 127;
+      } else {
+        x = value % 1;
+        if (x === 0) {
+          x = DELTA_INDEX[value];
+        } else {
+          x = DELTA_INDEX[Math.floor(value)] * (1 - x) + DELTA_INDEX[Math.floor(value) + 1] * x;
+        }
+        x = x * 127 + 127;
+      }
+      return multiply(matrix, [
+        x / 127,
+        0,
+        0,
+        0,
+        0.5 * (127 - x),
+        0,
+        x / 127,
+        0,
+        0,
+        0.5 * (127 - x),
+        0,
+        0,
+        x / 127,
+        0,
+        0.5 * (127 - x),
+        0,
+        0,
+        0,
+        1,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1
+      ]);
+    }
+    function adjustBrightness(matrix, value) {
+      value = clamp$1(255 * value, -255, 255);
+      return multiply(matrix, [
+        1,
+        0,
+        0,
+        0,
+        value,
+        0,
+        1,
+        0,
+        0,
+        value,
+        0,
+        0,
+        1,
+        0,
+        value,
+        0,
+        0,
+        0,
+        1,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1
+      ]);
+    }
+    function adjustColors(matrix, adjustR, adjustG, adjustB) {
+      adjustR = clamp$1(adjustR, 0, 2);
+      adjustG = clamp$1(adjustG, 0, 2);
+      adjustB = clamp$1(adjustB, 0, 2);
+      return multiply(matrix, [
+        adjustR,
+        0,
+        0,
+        0,
+        0,
+        0,
+        adjustG,
+        0,
+        0,
+        0,
+        0,
+        0,
+        adjustB,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1
+      ]);
+    }
+
+    function colorFilter(ir, matrix) {
+      return ir.toCanvas().then(function (canvas) {
+        return applyColorFilter(canvas, ir.getType(), matrix);
+      });
+    }
+    function applyColorFilter(canvas, type, matrix) {
+      var context = get2dContext(canvas);
+      function applyMatrix(pixelsData, m) {
+        var r, g, b, a;
+        var data = pixelsData.data, m0 = m[0], m1 = m[1], m2 = m[2], m3 = m[3], m4 = m[4], m5 = m[5], m6 = m[6], m7 = m[7], m8 = m[8], m9 = m[9], m10 = m[10], m11 = m[11], m12 = m[12], m13 = m[13], m14 = m[14], m15 = m[15], m16 = m[16], m17 = m[17], m18 = m[18], m19 = m[19];
+        for (var i = 0; i < data.length; i += 4) {
+          r = data[i];
+          g = data[i + 1];
+          b = data[i + 2];
+          a = data[i + 3];
+          data[i] = r * m0 + g * m1 + b * m2 + a * m3 + m4;
+          data[i + 1] = r * m5 + g * m6 + b * m7 + a * m8 + m9;
+          data[i + 2] = r * m10 + g * m11 + b * m12 + a * m13 + m14;
+          data[i + 3] = r * m15 + g * m16 + b * m17 + a * m18 + m19;
+        }
+        return pixelsData;
+      }
+      var pixels = applyMatrix(context.getImageData(0, 0, canvas.width, canvas.height), matrix);
+      context.putImageData(pixels, 0, 0);
+      return fromCanvas(canvas, type);
+    }
+    function convoluteFilter(ir, matrix) {
+      return ir.toCanvas().then(function (canvas) {
+        return applyConvoluteFilter(canvas, ir.getType(), matrix);
+      });
+    }
+    function applyConvoluteFilter(canvas, type, matrix) {
+      var context = get2dContext(canvas);
+      function applyMatrix(pIn, pOut, aMatrix) {
+        function clamp(value, min, max) {
+          if (value > max) {
+            value = max;
+          } else if (value < min) {
+            value = min;
+          }
+          return value;
+        }
+        var side = Math.round(Math.sqrt(aMatrix.length));
+        var halfSide = Math.floor(side / 2);
+        var rgba = pIn.data;
+        var drgba = pOut.data;
+        var w = pIn.width;
+        var h = pIn.height;
+        for (var y = 0; y < h; y++) {
+          for (var x = 0; x < w; x++) {
+            var r = 0;
+            var g = 0;
+            var b = 0;
+            for (var cy = 0; cy < side; cy++) {
+              for (var cx = 0; cx < side; cx++) {
+                var scx = clamp(x + cx - halfSide, 0, w - 1);
+                var scy = clamp(y + cy - halfSide, 0, h - 1);
+                var innerOffset = (scy * w + scx) * 4;
+                var wt = aMatrix[cy * side + cx];
+                r += rgba[innerOffset] * wt;
+                g += rgba[innerOffset + 1] * wt;
+                b += rgba[innerOffset + 2] * wt;
+              }
+            }
+            var offset = (y * w + x) * 4;
+            drgba[offset] = clamp(r, 0, 255);
+            drgba[offset + 1] = clamp(g, 0, 255);
+            drgba[offset + 2] = clamp(b, 0, 255);
+          }
+        }
+        return pOut;
+      }
+      var pixelsIn = context.getImageData(0, 0, canvas.width, canvas.height);
+      var pixelsOut = context.getImageData(0, 0, canvas.width, canvas.height);
+      pixelsOut = applyMatrix(pixelsIn, pixelsOut, matrix);
+      context.putImageData(pixelsOut, 0, 0);
+      return fromCanvas(canvas, type);
+    }
+    function functionColorFilter(colorFn) {
+      var filterImpl = function (canvas, type, value) {
+        var context = get2dContext(canvas);
+        var lookup = new Array(256);
+        function applyLookup(pixelsData, lookupData) {
+          var data = pixelsData.data;
+          for (var i = 0; i < data.length; i += 4) {
+            data[i] = lookupData[data[i]];
+            data[i + 1] = lookupData[data[i + 1]];
+            data[i + 2] = lookupData[data[i + 2]];
+          }
+          return pixelsData;
+        }
+        for (var i = 0; i < lookup.length; i++) {
+          lookup[i] = colorFn(i, value);
+        }
+        var pixels = applyLookup(context.getImageData(0, 0, canvas.width, canvas.height), lookup);
+        context.putImageData(pixels, 0, 0);
+        return fromCanvas(canvas, type);
+      };
+      return function (ir, value) {
+        return ir.toCanvas().then(function (canvas) {
+          return filterImpl(canvas, ir.getType(), value);
+        });
+      };
+    }
+    function complexAdjustableColorFilter(matrixAdjustFn) {
+      return function (ir, adjust) {
+        return colorFilter(ir, matrixAdjustFn(identity$1(), adjust));
+      };
+    }
+    function basicColorFilter(matrix) {
+      return function (ir) {
+        return colorFilter(ir, matrix);
+      };
+    }
+    function basicConvolutionFilter(kernel) {
+      return function (ir) {
+        return convoluteFilter(ir, kernel);
+      };
+    }
+    var invert = basicColorFilter([
+      -1,
+      0,
+      0,
+      0,
+      255,
+      0,
+      -1,
+      0,
+      0,
+      255,
+      0,
+      0,
+      -1,
+      0,
+      255,
+      0,
+      0,
+      0,
+      1,
+      0,
+      0,
+      0,
+      0,
+      0,
+      1
+    ]);
+    var brightness = complexAdjustableColorFilter(adjustBrightness);
+    var contrast = complexAdjustableColorFilter(adjustContrast);
+    var colorize = function (ir, adjustR, adjustG, adjustB) {
+      return colorFilter(ir, adjustColors(identity$1(), adjustR, adjustG, adjustB));
+    };
+    var sharpen = basicConvolutionFilter([
+      0,
+      -1,
+      0,
+      -1,
+      5,
+      -1,
+      0,
+      -1,
+      0
+    ]);
+    var gamma = functionColorFilter(function (color, value) {
+      return Math.pow(color / 255, 1 - value) * 255;
+    });
+
+    function scale(image, dW, dH) {
+      var sW = getWidth(image);
+      var sH = getHeight(image);
+      var wRatio = dW / sW;
+      var hRatio = dH / sH;
+      var scaleCapped = false;
+      if (wRatio < 0.5 || wRatio > 2) {
+        wRatio = wRatio < 0.5 ? 0.5 : 2;
+        scaleCapped = true;
+      }
+      if (hRatio < 0.5 || hRatio > 2) {
+        hRatio = hRatio < 0.5 ? 0.5 : 2;
+        scaleCapped = true;
+      }
+      var scaled = _scale(image, wRatio, hRatio);
+      return !scaleCapped ? scaled : scaled.then(function (tCanvas) {
+        return scale(tCanvas, dW, dH);
+      });
+    }
+    function _scale(image, wRatio, hRatio) {
+      return new Promise$1(function (resolve) {
+        var sW = getWidth(image);
+        var sH = getHeight(image);
+        var dW = Math.floor(sW * wRatio);
+        var dH = Math.floor(sH * hRatio);
+        var canvas = create$5(dW, dH);
+        var context = get2dContext(canvas);
+        context.drawImage(image, 0, 0, sW, sH, 0, 0, dW, dH);
+        resolve(canvas);
+      });
+    }
+
+    function rotate(ir, angle) {
+      return ir.toCanvas().then(function (canvas) {
+        return applyRotate(canvas, ir.getType(), angle);
+      });
+    }
+    function applyRotate(image, type, angle) {
+      var canvas = create$5(image.width, image.height);
+      var context = get2dContext(canvas);
+      var translateX = 0;
+      var translateY = 0;
+      angle = angle < 0 ? 360 + angle : angle;
+      if (angle === 90 || angle === 270) {
+        resize(canvas, canvas.height, canvas.width);
+      }
+      if (angle === 90 || angle === 180) {
+        translateX = canvas.width;
+      }
+      if (angle === 270 || angle === 180) {
+        translateY = canvas.height;
+      }
+      context.translate(translateX, translateY);
+      context.rotate(angle * Math.PI / 180);
+      context.drawImage(image, 0, 0);
+      return fromCanvas(canvas, type);
+    }
+    function flip(ir, axis) {
+      return ir.toCanvas().then(function (canvas) {
+        return applyFlip(canvas, ir.getType(), axis);
+      });
+    }
+    function applyFlip(image, type, axis) {
+      var canvas = create$5(image.width, image.height);
+      var context = get2dContext(canvas);
+      if (axis === 'v') {
+        context.scale(1, -1);
+        context.drawImage(image, 0, -canvas.height);
+      } else {
+        context.scale(-1, 1);
+        context.drawImage(image, -canvas.width, 0);
+      }
+      return fromCanvas(canvas, type);
+    }
+    function crop(ir, x, y, w, h) {
+      return ir.toCanvas().then(function (canvas) {
+        return applyCrop(canvas, ir.getType(), x, y, w, h);
+      });
+    }
+    function applyCrop(image, type, x, y, w, h) {
+      var canvas = create$5(w, h);
+      var context = get2dContext(canvas);
+      context.drawImage(image, -x, -y);
+      return fromCanvas(canvas, type);
+    }
+    function resize$1(ir, w, h) {
+      return ir.toCanvas().then(function (canvas) {
+        return scale(canvas, w, h).then(function (newCanvas) {
+          return fromCanvas(newCanvas, ir.getType());
+        });
+      });
+    }
+
+    var invert$1 = function (ir) {
+      return invert(ir);
+    };
+    var sharpen$1 = function (ir) {
+      return sharpen(ir);
+    };
+    var gamma$1 = function (ir, value) {
+      return gamma(ir, value);
+    };
+    var colorize$1 = function (ir, adjustR, adjustG, adjustB) {
+      return colorize(ir, adjustR, adjustG, adjustB);
+    };
+    var brightness$1 = function (ir, adjust) {
+      return brightness(ir, adjust);
+    };
+    var contrast$1 = function (ir, adjust) {
+      return contrast(ir, adjust);
+    };
+    var flip$1 = function (ir, axis) {
+      return flip(ir, axis);
+    };
+    var crop$1 = function (ir, x, y, w, h) {
+      return crop(ir, x, y, w, h);
+    };
+    var resize$2 = function (ir, w, h) {
+      return resize$1(ir, w, h);
+    };
+    var rotate$1 = function (ir, angle) {
+      return rotate(ir, angle);
+    };
+
+    var renderIcon$1 = function (iconHtml, behaviours) {
+      return __assign({
+        dom: {
+          tag: 'span',
+          innerHtml: iconHtml,
+          classes: [
+            'tox-icon',
+            'tox-tbtn__icon-wrap'
+          ]
+        }
+      }, behaviours);
+    };
+    var renderIconFromPack = function (iconName, iconsProvider) {
+      return renderIcon$1(get$d(iconName, iconsProvider), {});
+    };
+    var renderReplacableIconFromPack = function (iconName, iconsProvider) {
+      return renderIcon$1(get$d(iconName, iconsProvider), { behaviours: derive$1([Replacing.config({})]) });
+    };
+    var renderLabel$1 = function (text, prefix, providersBackstage) {
+      return {
+        dom: {
+          tag: 'span',
+          innerHtml: providersBackstage.translate(text),
+          classes: [prefix + '__select-label']
+        },
+        behaviours: derive$1([Replacing.config({})])
+      };
+    };
+
+    var internalToolbarButtonExecute = generate$1('toolbar.button.execute');
+    var onToolbarButtonExecute = function (info) {
+      return runOnExecute(function (comp, _simulatedEvent) {
+        runWithApi(info, comp)(function (itemApi) {
+          emitWith(comp, internalToolbarButtonExecute, { buttonApi: itemApi });
+          info.onAction(itemApi);
+        });
+      });
+    };
+    var toolbarButtonEventOrder = {
+      'alloy.execute': [
+        'disabling',
+        'alloy.base.behaviour',
+        'toggling',
+        'toolbar-button-events'
+      ]
+    };
+
+    var updateMenuText = generate$1('update-menu-text');
+    var updateMenuIcon = generate$1('update-menu-icon');
+    var renderCommonDropdown = function (spec, prefix, sharedBackstage) {
+      var editorOffCell = Cell(noop);
+      var optMemDisplayText = spec.text.map(function (text) {
+        return record(renderLabel$1(text, prefix, sharedBackstage.providers));
+      });
+      var optMemDisplayIcon = spec.icon.map(function (iconName) {
+        return record(renderReplacableIconFromPack(iconName, sharedBackstage.providers.icons));
+      });
+      var onLeftOrRightInMenu = function (comp, se) {
+        var dropdown = Representing.getValue(comp);
+        Focusing.focus(dropdown);
+        emitWith(dropdown, 'keydown', { raw: se.event().raw() });
+        Dropdown.close(dropdown);
+        return Option.some(true);
+      };
+      var role = spec.role.fold(function () {
+        return {};
+      }, function (role) {
+        return { role: role };
+      });
+      var tooltipAttributes = spec.tooltip.fold(function () {
+        return {};
+      }, function (tooltip) {
+        var translatedTooltip = sharedBackstage.providers.translate(tooltip);
+        return {
+          'title': translatedTooltip,
+          'aria-label': translatedTooltip
+        };
+      });
+      var memDropdown = record(Dropdown.sketch(__assign(__assign({}, role), {
+        dom: {
+          tag: 'button',
+          classes: [
+            prefix,
+            prefix + '--select'
+          ].concat(map(spec.classes, function (c) {
+            return prefix + '--' + c;
+          })),
+          attributes: __assign({}, tooltipAttributes)
+        },
+        components: componentRenderPipeline([
+          optMemDisplayIcon.map(function (mem) {
+            return mem.asSpec();
+          }),
+          optMemDisplayText.map(function (mem) {
+            return mem.asSpec();
+          }),
+          Option.some({
+            dom: {
+              tag: 'div',
+              classes: [prefix + '__select-chevron'],
+              innerHtml: get$d('chevron-down', sharedBackstage.providers.icons)
+            }
+          })
+        ]),
+        matchWidth: true,
+        useMinWidth: true,
+        dropdownBehaviours: derive$1(__spreadArrays(spec.dropdownBehaviours, [
+          DisablingConfigs.button(function () {
+            return spec.disabled || sharedBackstage.providers.isReadOnly();
+          }),
+          receivingConfig(),
+          Unselecting.config({}),
+          Replacing.config({}),
+          config('dropdown-events', [
+            onControlAttached(spec, editorOffCell),
+            onControlDetached(spec, editorOffCell)
+          ]),
+          config('menubutton-update-display-text', [
+            run(updateMenuText, function (comp, se) {
+              optMemDisplayText.bind(function (mem) {
+                return mem.getOpt(comp);
+              }).each(function (displayText) {
+                Replacing.set(displayText, [text(sharedBackstage.providers.translate(se.event().text()))]);
+              });
+            }),
+            run(updateMenuIcon, function (comp, se) {
+              optMemDisplayIcon.bind(function (mem) {
+                return mem.getOpt(comp);
+              }).each(function (displayIcon) {
+                Replacing.set(displayIcon, [renderReplacableIconFromPack(se.event().icon(), sharedBackstage.providers.icons)]);
+              });
+            })
+          ])
+        ])),
+        eventOrder: deepMerge(toolbarButtonEventOrder, {
+          mousedown: [
+            'focusing',
+            'alloy.base.behaviour',
+            'item-type-events',
+            'normal-dropdown-events'
+          ]
+        }),
+        sandboxBehaviours: derive$1([Keying.config({
+            mode: 'special',
+            onLeft: onLeftOrRightInMenu,
+            onRight: onLeftOrRightInMenu
+          })]),
+        lazySink: sharedBackstage.getSink,
+        toggleClass: prefix + '--active',
+        parts: { menu: part(false, spec.columns, spec.presets) },
+        fetch: function () {
+          return Future.nu(spec.fetch);
+        }
+      })));
+      return memDropdown.asSpec();
+    };
+
+    var isMenuItemReference = function (item) {
+      return isString(item);
+    };
+    var isSeparator = function (item) {
+      return item.type === 'separator';
+    };
+    var isExpandingMenuItem = function (item) {
+      return has(item, 'getSubmenuItems');
+    };
+    var separator$1 = { type: 'separator' };
+    var unwrapReferences = function (items, menuItems) {
+      var realItems = foldl(items, function (acc, item) {
+        if (isMenuItemReference(item)) {
+          if (item === '') {
+            return acc;
+          } else if (item === '|') {
+            return acc.length > 0 && !isSeparator(acc[acc.length - 1]) ? acc.concat([separator$1]) : acc;
+          } else if (has(menuItems, item.toLowerCase())) {
+            return acc.concat([menuItems[item.toLowerCase()]]);
+          } else {
+            return acc;
+          }
+        } else {
+          return acc.concat([item]);
+        }
+      }, []);
+      if (realItems.length > 0 && isSeparator(realItems[realItems.length - 1])) {
+        realItems.pop();
+      }
+      return realItems;
+    };
+    var getFromExpandingItem = function (item, menuItems) {
+      var submenuItems = item.getSubmenuItems();
+      var rest = expand(submenuItems, menuItems);
+      var newMenus = deepMerge(rest.menus, wrap$1(item.value, rest.items));
+      var newExpansions = deepMerge(rest.expansions, wrap$1(item.value, item.value));
+      return {
+        item: item,
+        menus: newMenus,
+        expansions: newExpansions
+      };
+    };
+    var getFromItem = function (item, menuItems) {
+      return isExpandingMenuItem(item) ? getFromExpandingItem(item, menuItems) : {
+        item: item,
+        menus: {},
+        expansions: {}
+      };
+    };
+    var generateValueIfRequired = function (item) {
+      if (isSeparator(item)) {
+        return item;
+      } else {
+        var itemValue = get(item, 'value').getOrThunk(function () {
+          return generate$1('generated-menu-item');
+        });
+        return deepMerge({ value: itemValue }, item);
+      }
+    };
+    var expand = function (items, menuItems) {
+      var realItems = unwrapReferences(isString(items) ? items.split(' ') : items, menuItems);
+      return foldr(realItems, function (acc, item) {
+        var itemWithValue = generateValueIfRequired(item);
+        var newData = getFromItem(itemWithValue, menuItems);
+        return {
+          menus: deepMerge(acc.menus, newData.menus),
+          items: [newData.item].concat(acc.items),
+          expansions: deepMerge(acc.expansions, newData.expansions)
+        };
+      }, {
+        menus: {},
+        expansions: {},
+        items: []
+      });
+    };
+
+    var build$2 = function (items, itemResponse, backstage, isHorizontalMenu) {
+      var primary = generate$1('primary-menu');
+      var data = expand(items, backstage.shared.providers.menuItems());
+      if (data.items.length === 0) {
+        return Option.none();
+      }
+      var mainMenu = createPartialMenu(primary, data.items, itemResponse, backstage, isHorizontalMenu);
+      var submenus = map$1(data.menus, function (menuItems, menuName) {
+        return createPartialMenu(menuName, menuItems, itemResponse, backstage, false);
+      });
+      var menus = deepMerge(submenus, wrap$1(primary, mainMenu));
+      return Option.from(tieredMenu.tieredData(primary, menus, data.expansions));
+    };
+
+    var getMenuButtonApi = function (component) {
+      return {
+        isDisabled: function () {
+          return Disabling.isDisabled(component);
+        },
+        setDisabled: function (state) {
+          return Disabling.set(component, state);
+        },
+        setActive: function (state) {
+          var elm = component.element();
+          if (state) {
+            add$2(elm, 'tox-tbtn--enabled');
+            set$1(elm, 'aria-pressed', true);
+          } else {
+            remove$4(elm, 'tox-tbtn--enabled');
+            remove$1(elm, 'aria-pressed');
+          }
+        },
+        isActive: function () {
+          return has$2(component.element(), 'tox-tbtn--enabled');
+        }
+      };
+    };
+    var renderMenuButton = function (spec, prefix, backstage, role) {
+      return renderCommonDropdown({
+        text: spec.text,
+        icon: spec.icon,
+        tooltip: spec.tooltip,
+        role: role,
+        fetch: function (callback) {
+          spec.fetch(function (items) {
+            callback(build$2(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, false));
+          });
+        },
+        onSetup: spec.onSetup,
+        getApi: getMenuButtonApi,
+        columns: 1,
+        presets: 'normal',
+        classes: [],
+        dropdownBehaviours: [Tabstopping.config({})]
+      }, prefix, backstage.shared);
+    };
+    var getFetch$1 = function (items, getButton, backstage) {
+      var getMenuItemAction = function (item) {
+        return function (api) {
+          var newValue = !api.isActive();
+          api.setActive(newValue);
+          item.storage.set(newValue);
+          backstage.shared.getSink().each(function (sink) {
+            getButton().getOpt(sink).each(function (orig) {
+              focus$1(orig.element());
+              emitWith(orig, formActionEvent, {
+                name: item.name,
+                value: item.storage.get()
+              });
+            });
+          });
+        };
+      };
+      var getMenuItemSetup = function (item) {
+        return function (api) {
+          api.setActive(item.storage.get());
+        };
+      };
+      return function (success) {
+        success(map(items, function (item) {
+          var text = item.text.fold(function () {
+            return {};
+          }, function (text) {
+            return { text: text };
+          });
+          return __assign(__assign({
+            type: item.type,
+            active: false
+          }, text), {
+            onAction: getMenuItemAction(item),
+            onSetup: getMenuItemSetup(item)
+          });
+        }));
+      };
+    };
+
+    var renderCommonSpec = function (spec, actionOpt, extraBehaviours, dom, components, providersBackstage) {
+      if (extraBehaviours === void 0) {
+        extraBehaviours = [];
+      }
+      var action = actionOpt.fold(function () {
+        return {};
+      }, function (action) {
+        return { action: action };
+      });
+      var common = __assign({
+        buttonBehaviours: derive$1([
+          DisablingConfigs.button(function () {
+            return spec.disabled || providersBackstage.isReadOnly();
+          }),
+          receivingConfig(),
+          Tabstopping.config({}),
+          config('button press', [
+            preventDefault('click'),
+            preventDefault('mousedown')
+          ])
+        ].concat(extraBehaviours)),
+        eventOrder: {
+          click: [
+            'button press',
+            'alloy.base.behaviour'
+          ],
+          mousedown: [
+            'button press',
+            'alloy.base.behaviour'
+          ]
+        }
+      }, action);
+      var domFinal = deepMerge(common, { dom: dom });
+      return deepMerge(domFinal, { components: components });
+    };
+    var renderIconButtonSpec = function (spec, action, providersBackstage, extraBehaviours) {
+      if (extraBehaviours === void 0) {
+        extraBehaviours = [];
+      }
+      var tooltipAttributes = spec.tooltip.map(function (tooltip) {
+        return {
+          'aria-label': providersBackstage.translate(tooltip),
+          'title': providersBackstage.translate(tooltip)
+        };
+      }).getOr({});
+      var dom = {
+        tag: 'button',
+        classes: ['tox-tbtn'],
+        attributes: tooltipAttributes
+      };
+      var icon = spec.icon.map(function (iconName) {
+        return renderIconFromPack(iconName, providersBackstage.icons);
+      });
+      var components = componentRenderPipeline([icon]);
+      return renderCommonSpec(spec, action, extraBehaviours, dom, components, providersBackstage);
+    };
+    var renderIconButton = function (spec, action, providersBackstage, extraBehaviours) {
+      if (extraBehaviours === void 0) {
+        extraBehaviours = [];
+      }
+      var iconButtonSpec = renderIconButtonSpec(spec, Option.some(action), providersBackstage, extraBehaviours);
+      return Button.sketch(iconButtonSpec);
+    };
+    var renderButtonSpec = function (spec, action, providersBackstage, extraBehaviours, extraClasses) {
+      if (extraBehaviours === void 0) {
+        extraBehaviours = [];
+      }
+      if (extraClasses === void 0) {
+        extraClasses = [];
+      }
+      var translatedText = providersBackstage.translate(spec.text);
+      var icon = spec.icon ? spec.icon.map(function (iconName) {
+        return renderIconFromPack(iconName, providersBackstage.icons);
+      }) : Option.none();
+      var components = icon.isSome() ? componentRenderPipeline([icon]) : [];
+      var innerHtml = icon.isSome() ? {} : { innerHtml: translatedText };
+      var classes = __spreadArrays(!spec.primary && !spec.borderless ? [
+        'tox-button',
+        'tox-button--secondary'
+      ] : ['tox-button'], icon.isSome() ? ['tox-button--icon'] : [], spec.borderless ? ['tox-button--naked'] : [], extraClasses);
+      var dom = __assign(__assign({
+        tag: 'button',
+        classes: classes
+      }, innerHtml), { attributes: { title: translatedText } });
+      return renderCommonSpec(spec, action, extraBehaviours, dom, components, providersBackstage);
+    };
+    var renderButton = function (spec, action, providersBackstage, extraBehaviours, extraClasses) {
+      if (extraBehaviours === void 0) {
+        extraBehaviours = [];
+      }
+      if (extraClasses === void 0) {
+        extraClasses = [];
+      }
+      var buttonSpec = renderButtonSpec(spec, Option.some(action), providersBackstage, extraBehaviours, extraClasses);
+      return Button.sketch(buttonSpec);
+    };
+    var getAction = function (name, buttonType) {
+      return function (comp) {
+        if (buttonType === 'custom') {
+          emitWith(comp, formActionEvent, {
+            name: name,
+            value: {}
+          });
+        } else if (buttonType === 'submit') {
+          emit(comp, formSubmitEvent);
+        } else if (buttonType === 'cancel') {
+          emit(comp, formCancelEvent);
+        } else {
+          domGlobals.console.error('Unknown button type: ', buttonType);
+        }
+      };
+    };
+    var isMenuFooterButtonSpec = function (spec, buttonType) {
+      return buttonType === 'menu';
+    };
+    var isNormalFooterButtonSpec = function (spec, buttonType) {
+      return buttonType === 'custom' || buttonType === 'cancel' || buttonType === 'submit';
+    };
+    var renderFooterButton = function (spec, buttonType, backstage) {
+      if (isMenuFooterButtonSpec(spec, buttonType)) {
+        var getButton = function () {
+          return memButton_1;
+        };
+        var menuButtonSpec = spec;
+        var fixedSpec = __assign(__assign({}, spec), {
+          onSetup: function (api) {
+            api.setDisabled(spec.disabled);
+            return noop;
+          },
+          fetch: getFetch$1(menuButtonSpec.items, getButton, backstage)
+        });
+        var memButton_1 = record(renderMenuButton(fixedSpec, 'tox-tbtn', backstage, Option.none()));
+        return memButton_1.asSpec();
+      } else if (isNormalFooterButtonSpec(spec, buttonType)) {
+        var action = getAction(spec.name, buttonType);
+        var buttonSpec = __assign(__assign({}, spec), { borderless: false });
+        return renderButton(buttonSpec, action, backstage.shared.providers, []);
+      } else {
+        domGlobals.console.error('Unknown footer button type: ', buttonType);
+      }
+    };
+    var renderDialogButton = function (spec, providersBackstage) {
+      var action = getAction(spec.name, 'custom');
+      return renderFormField(Option.none(), FormField.parts().field(__assign({ factory: Button }, renderButtonSpec(spec, Option.some(action), providersBackstage, [
+        RepresentingConfigs.memory(''),
+        ComposingConfigs.self()
+      ]))));
+    };
+
+    var schema$i = constant([
+      defaulted$1('field1Name', 'field1'),
+      defaulted$1('field2Name', 'field2'),
+      onStrictHandler('onLockedChange'),
+      markers(['lockClass']),
+      defaulted$1('locked', false),
+      SketchBehaviours.field('coupledFieldBehaviours', [
+        Composing,
+        Representing
+      ])
+    ]);
+    var getField = function (comp, detail, partName) {
+      return getPart(comp, detail, partName).bind(Composing.getCurrent);
+    };
+    var coupledPart = function (selfName, otherName) {
+      return required({
+        factory: FormField,
+        name: selfName,
+        overrides: function (detail) {
+          return {
+            fieldBehaviours: derive$1([config('coupled-input-behaviour', [run(input(), function (me) {
+                  getField(me, detail, otherName).each(function (other) {
+                    getPart(me, detail, 'lock').each(function (lock) {
+                      if (Toggling.isOn(lock)) {
+                        detail.onLockedChange(me, other, lock);
+                      }
+                    });
+                  });
+                })])])
+          };
+        }
+      });
+    };
+    var parts$5 = constant([
+      coupledPart('field1', 'field2'),
+      coupledPart('field2', 'field1'),
+      required({
+        factory: Button,
+        schema: [strict$1('dom')],
+        name: 'lock',
+        overrides: function (detail) {
+          return {
+            buttonBehaviours: derive$1([Toggling.config({
+                selected: detail.locked,
+                toggleClass: detail.markers.lockClass,
+                aria: { mode: 'pressed' }
+              })])
+          };
+        }
+      })
+    ]);
+
+    var factory$7 = function (detail, components, _spec, _externals) {
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        behaviours: SketchBehaviours.augment(detail.coupledFieldBehaviours, [
+          Composing.config({ find: Option.some }),
+          Representing.config({
+            store: {
+              mode: 'manual',
+              getValue: function (comp) {
+                var _a;
+                var parts = getPartsOrDie(comp, detail, [
+                  'field1',
+                  'field2'
+                ]);
+                return _a = {}, _a[detail.field1Name] = Representing.getValue(parts.field1()), _a[detail.field2Name] = Representing.getValue(parts.field2()), _a;
+              },
+              setValue: function (comp, value) {
+                var parts = getPartsOrDie(comp, detail, [
+                  'field1',
+                  'field2'
+                ]);
+                if (hasNonNullableKey(value, detail.field1Name)) {
+                  Representing.setValue(parts.field1(), value[detail.field1Name]);
+                }
+                if (hasNonNullableKey(value, detail.field2Name)) {
+                  Representing.setValue(parts.field2(), value[detail.field2Name]);
+                }
+              }
+            }
+          })
+        ]),
+        apis: {
+          getField1: function (component) {
+            return getPart(component, detail, 'field1');
+          },
+          getField2: function (component) {
+            return getPart(component, detail, 'field2');
+          },
+          getLock: function (component) {
+            return getPart(component, detail, 'lock');
+          }
+        }
+      };
+    };
+    var FormCoupledInputs = composite$1({
+      name: 'FormCoupledInputs',
+      configFields: schema$i(),
+      partFields: parts$5(),
+      factory: factory$7,
+      apis: {
+        getField1: function (apis, component) {
+          return apis.getField1(component);
+        },
+        getField2: function (apis, component) {
+          return apis.getField2(component);
+        },
+        getLock: function (apis, component) {
+          return apis.getLock(component);
+        }
+      }
+    });
+
+    var formatSize = function (size) {
+      var unitDec = {
+        '': 0,
+        'px': 0,
+        'pt': 1,
+        'mm': 1,
+        'pc': 2,
+        'ex': 2,
+        'em': 2,
+        'ch': 2,
+        'rem': 2,
+        'cm': 3,
+        'in': 4,
+        '%': 4
+      };
+      var maxDecimal = function (unit) {
+        return unit in unitDec ? unitDec[unit] : 1;
+      };
+      var numText = size.value.toFixed(maxDecimal(size.unit));
+      if (numText.indexOf('.') !== -1) {
+        numText = numText.replace(/\.?0*$/, '');
+      }
+      return numText + size.unit;
+    };
+    var parseSize = function (sizeText) {
+      var numPattern = /^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/;
+      var match = numPattern.exec(sizeText);
+      if (match !== null) {
+        var value = parseFloat(match[1]);
+        var unit = match[2];
+        return Result.value({
+          value: value,
+          unit: unit
+        });
+      } else {
+        return Result.error(sizeText);
+      }
+    };
+    var convertUnit = function (size, unit) {
+      var inInch = {
+        '': 96,
+        'px': 96,
+        'pt': 72,
+        'cm': 2.54,
+        'pc': 12,
+        'mm': 25.4,
+        'in': 1
+      };
+      var supported = function (u) {
+        return Object.prototype.hasOwnProperty.call(inInch, u);
+      };
+      if (size.unit === unit) {
+        return Option.some(size.value);
+      } else if (supported(size.unit) && supported(unit)) {
+        if (inInch[size.unit] === inInch[unit]) {
+          return Option.some(size.value);
+        } else {
+          return Option.some(size.value / inInch[size.unit] * inInch[unit]);
+        }
+      } else {
+        return Option.none();
+      }
+    };
+    var noSizeConversion = function (_input) {
+      return Option.none();
+    };
+    var ratioSizeConversion = function (scale, unit) {
+      return function (size) {
+        return convertUnit(size, unit).map(function (value) {
+          return {
+            value: value * scale,
+            unit: unit
+          };
+        });
+      };
+    };
+    var makeRatioConverter = function (currentFieldText, otherFieldText) {
+      var cValue = parseSize(currentFieldText).toOption();
+      var oValue = parseSize(otherFieldText).toOption();
+      return lift2(cValue, oValue, function (cSize, oSize) {
+        return convertUnit(cSize, oSize.unit).map(function (val) {
+          return oSize.value / val;
+        }).map(function (r) {
+          return ratioSizeConversion(r, oSize.unit);
+        }).getOr(noSizeConversion);
+      }).getOr(noSizeConversion);
+    };
+
+    var renderSizeInput = function (spec, providersBackstage) {
+      var converter = noSizeConversion;
+      var ratioEvent = generate$1('ratio-event');
+      var pLock = FormCoupledInputs.parts().lock({
+        dom: {
+          tag: 'button',
+          classes: [
+            'tox-lock',
+            'tox-button',
+            'tox-button--naked',
+            'tox-button--icon'
+          ],
+          attributes: { title: providersBackstage.translate(spec.label.getOr('Constrain proportions')) }
+        },
+        components: [
+          {
+            dom: {
+              tag: 'span',
+              classes: [
+                'tox-icon',
+                'tox-lock-icon__lock'
+              ],
+              innerHtml: get$d('lock', providersBackstage.icons)
+            }
+          },
+          {
+            dom: {
+              tag: 'span',
+              classes: [
+                'tox-icon',
+                'tox-lock-icon__unlock'
+              ],
+              innerHtml: get$d('unlock', providersBackstage.icons)
+            }
+          }
+        ],
+        buttonBehaviours: derive$1([
+          Disabling.config({
+            disabled: function () {
+              return spec.disabled || providersBackstage.isReadOnly();
+            }
+          }),
+          receivingConfig(),
+          Tabstopping.config({})
+        ])
+      });
+      var formGroup = function (components) {
+        return {
+          dom: {
+            tag: 'div',
+            classes: ['tox-form__group']
+          },
+          components: components
+        };
+      };
+      var getFieldPart = function (isField1) {
+        return FormField.parts().field({
+          factory: Input,
+          inputClasses: ['tox-textfield'],
+          inputBehaviours: derive$1([
+            Disabling.config({
+              disabled: function () {
+                return spec.disabled || providersBackstage.isReadOnly();
+              }
+            }),
+            receivingConfig(),
+            Tabstopping.config({}),
+            config('size-input-events', [
+              run(focusin(), function (component, _simulatedEvent) {
+                emitWith(component, ratioEvent, { isField1: isField1 });
+              }),
+              run(change(), function (component, _simulatedEvent) {
+                emitWith(component, formChangeEvent, { name: spec.name });
+              })
+            ])
+          ]),
+          selectOnFocus: false
+        });
+      };
+      var getLabel = function (label) {
+        return {
+          dom: {
+            tag: 'label',
+            classes: ['tox-label'],
+            innerHtml: providersBackstage.translate(label)
+          }
+        };
+      };
+      var widthField = FormCoupledInputs.parts().field1(formGroup([
+        FormField.parts().label(getLabel('Width')),
+        getFieldPart(true)
+      ]));
+      var heightField = FormCoupledInputs.parts().field2(formGroup([
+        FormField.parts().label(getLabel('Height')),
+        getFieldPart(false)
+      ]));
+      return FormCoupledInputs.sketch({
+        dom: {
+          tag: 'div',
+          classes: ['tox-form__group']
+        },
+        components: [{
+            dom: {
+              tag: 'div',
+              classes: ['tox-form__controls-h-stack']
+            },
+            components: [
+              widthField,
+              heightField,
+              formGroup([
+                getLabel('&nbsp;'),
+                pLock
+              ])
+            ]
+          }],
+        field1Name: 'width',
+        field2Name: 'height',
+        locked: true,
+        markers: { lockClass: 'tox-locked' },
+        onLockedChange: function (current, other, _lock) {
+          parseSize(Representing.getValue(current)).each(function (size) {
+            converter(size).each(function (newSize) {
+              Representing.setValue(other, formatSize(newSize));
+            });
+          });
+        },
+        coupledFieldBehaviours: derive$1([
+          Disabling.config({
+            disabled: function () {
+              return spec.disabled || providersBackstage.isReadOnly();
+            },
+            onDisabled: function (comp) {
+              FormCoupledInputs.getField1(comp).bind(FormField.getField).each(Disabling.disable);
+              FormCoupledInputs.getField2(comp).bind(FormField.getField).each(Disabling.disable);
+              FormCoupledInputs.getLock(comp).each(Disabling.disable);
+            },
+            onEnabled: function (comp) {
+              FormCoupledInputs.getField1(comp).bind(FormField.getField).each(Disabling.enable);
+              FormCoupledInputs.getField2(comp).bind(FormField.getField).each(Disabling.enable);
+              FormCoupledInputs.getLock(comp).each(Disabling.enable);
+            }
+          }),
+          receivingConfig(),
+          config('size-input-events2', [run(ratioEvent, function (component, simulatedEvent) {
+              var isField1 = simulatedEvent.event().isField1();
+              var optCurrent = isField1 ? FormCoupledInputs.getField1(component) : FormCoupledInputs.getField2(component);
+              var optOther = isField1 ? FormCoupledInputs.getField2(component) : FormCoupledInputs.getField1(component);
+              var value1 = optCurrent.map(Representing.getValue).getOr('');
+              var value2 = optOther.map(Representing.getValue).getOr('');
+              converter = makeRatioConverter(value1, value2);
+            })])
+        ])
+      });
+    };
+
+    var undo = constant(generate$1('undo'));
+    var redo = constant(generate$1('redo'));
+    var zoom = constant(generate$1('zoom'));
+    var back = constant(generate$1('back'));
+    var apply = constant(generate$1('apply'));
+    var swap = constant(generate$1('swap'));
+    var transform = constant(generate$1('transform'));
+    var tempTransform = constant(generate$1('temp-transform'));
+    var transformApply = constant(generate$1('transform-apply'));
+    var internal = {
+      undo: undo,
+      redo: redo,
+      zoom: zoom,
+      back: back,
+      apply: apply,
+      swap: swap,
+      transform: transform,
+      tempTransform: tempTransform,
+      transformApply: transformApply
+    };
+    var saveState = constant('save-state');
+    var disable$1 = constant('disable');
+    var enable$1 = constant('enable');
+    var external$2 = {
+      formActionEvent: formActionEvent,
+      saveState: saveState,
+      disable: disable$1,
+      enable: enable$1
+    };
+
+    var renderEditPanel = function (imagePanel, providersBackstage) {
+      var createButton = function (text, action, disabled, primary) {
+        return record(renderButton({
+          name: text,
+          text: text,
+          disabled: disabled,
+          primary: primary,
+          icon: Option.none(),
+          borderless: false
+        }, action, providersBackstage));
+      };
+      var createIconButton = function (icon, tooltip, action, disabled) {
+        return record(renderIconButton({
+          name: icon,
+          icon: Option.some(icon),
+          tooltip: Option.some(tooltip),
+          disabled: disabled,
+          primary: false,
+          borderless: false
+        }, action, providersBackstage));
+      };
+      var disableAllComponents = function (comps, eventcomp) {
+        comps.map(function (mem) {
+          var component = mem.get(eventcomp);
+          if (component.hasConfigured(Disabling)) {
+            Disabling.disable(component);
+          }
+        });
+      };
+      var enableAllComponents = function (comps, eventcomp) {
+        comps.map(function (mem) {
+          var component = mem.get(eventcomp);
+          if (component.hasConfigured(Disabling)) {
+            Disabling.enable(component);
+          }
+        });
+      };
+      var panelDom = {
+        tag: 'div',
+        classes: [
+          'tox-image-tools__toolbar',
+          'tox-image-tools-edit-panel'
+        ]
+      };
+      var noop$1 = noop;
+      var emit$1 = function (comp, event, data) {
+        emitWith(comp, event, data);
+      };
+      var emitDisable = function (component) {
+        return emit(component, external$2.disable());
+      };
+      var emitEnable = function (component) {
+        return emit(component, external$2.enable());
+      };
+      var emitTransform = function (comp, transform) {
+        emitDisable(comp);
+        emit$1(comp, internal.transform(), { transform: transform });
+        emitEnable(comp);
+      };
+      var emitTempTransform = function (comp, transform) {
+        emitDisable(comp);
+        emit$1(comp, internal.tempTransform(), { transform: transform });
+        emitEnable(comp);
+      };
+      var getBackSwap = function (anyInSystem) {
+        return function () {
+          memContainer.getOpt(anyInSystem).each(function (container) {
+            Replacing.set(container, [ButtonPanel]);
+          });
+        };
+      };
+      var emitTransformApply = function (comp, transform) {
+        emitDisable(comp);
+        emit$1(comp, internal.transformApply(), {
+          transform: transform,
+          swap: getBackSwap(comp)
+        });
+        emitEnable(comp);
+      };
+      var createBackButton = function () {
+        return createButton('Back', function (button) {
+          return emit$1(button, internal.back(), { swap: getBackSwap(button) });
+        }, false, false);
+      };
+      var createSpacer = function () {
+        return record({
+          dom: {
+            tag: 'div',
+            classes: ['tox-spacer']
+          },
+          behaviours: derive$1([Disabling.config({})])
+        });
+      };
+      var createApplyButton = function () {
+        return createButton('Apply', function (button) {
+          return emit$1(button, internal.apply(), { swap: getBackSwap(button) });
+        }, true, true);
+      };
+      var makeCropTransform = function () {
+        return function (ir) {
+          var rect = imagePanel.getRect();
+          return crop$1(ir, rect.x, rect.y, rect.w, rect.h);
+        };
+      };
+      var cropPanelComponents = [
+        createBackButton(),
+        createSpacer(),
+        createButton('Apply', function (button) {
+          var transform = makeCropTransform();
+          emitTransformApply(button, transform);
+          imagePanel.hideCrop();
+        }, false, true)
+      ];
+      var CropPanel = Container.sketch({
+        dom: panelDom,
+        components: cropPanelComponents.map(function (mem) {
+          return mem.asSpec();
+        }),
+        containerBehaviours: derive$1([config('image-tools-crop-buttons-events', [
+            run(external$2.disable(), function (comp, _se) {
+              disableAllComponents(cropPanelComponents, comp);
+            }),
+            run(external$2.enable(), function (comp, _se) {
+              enableAllComponents(cropPanelComponents, comp);
+            })
+          ])])
+      });
+      var memSize = record(renderSizeInput({
+        name: 'size',
+        label: Option.none(),
+        constrain: true,
+        disabled: false
+      }, providersBackstage));
+      var makeResizeTransform = function (width, height) {
+        return function (ir) {
+          return resize$2(ir, width, height);
+        };
+      };
+      var resizePanelComponents = [
+        createBackButton(),
+        createSpacer(),
+        memSize,
+        createSpacer(),
+        createButton('Apply', function (button) {
+          memSize.getOpt(button).each(function (sizeInput) {
+            var value = Representing.getValue(sizeInput);
+            var width = parseInt(value.width, 10);
+            var height = parseInt(value.height, 10);
+            var transform = makeResizeTransform(width, height);
+            emitTransformApply(button, transform);
+          });
+        }, false, true)
+      ];
+      var ResizePanel = Container.sketch({
+        dom: panelDom,
+        components: resizePanelComponents.map(function (mem) {
+          return mem.asSpec();
+        }),
+        containerBehaviours: derive$1([config('image-tools-resize-buttons-events', [
+            run(external$2.disable(), function (comp, _se) {
+              disableAllComponents(resizePanelComponents, comp);
+            }),
+            run(external$2.enable(), function (comp, _se) {
+              enableAllComponents(resizePanelComponents, comp);
+            })
+          ])])
+      });
+      var makeValueTransform = function (transform, value) {
+        return function (ir) {
+          return transform(ir, value);
+        };
+      };
+      var horizontalFlip = makeValueTransform(flip$1, 'h');
+      var verticalFlip = makeValueTransform(flip$1, 'v');
+      var counterclockwiseRotate = makeValueTransform(rotate$1, -90);
+      var clockwiseRotate = makeValueTransform(rotate$1, 90);
+      var flipRotateOnAction = function (comp, operation) {
+        emitTempTransform(comp, operation);
+      };
+      var flipRotateComponents = [
+        createBackButton(),
+        createSpacer(),
+        createIconButton('flip-horizontally', 'Flip horizontally', function (button) {
+          flipRotateOnAction(button, horizontalFlip);
+        }, false),
+        createIconButton('flip-vertically', 'Flip vertically', function (button) {
+          flipRotateOnAction(button, verticalFlip);
+        }, false),
+        createIconButton('rotate-left', 'Rotate counterclockwise', function (button) {
+          flipRotateOnAction(button, counterclockwiseRotate);
+        }, false),
+        createIconButton('rotate-right', 'Rotate clockwise', function (button) {
+          flipRotateOnAction(button, clockwiseRotate);
+        }, false),
+        createSpacer(),
+        createApplyButton()
+      ];
+      var FlipRotatePanel = Container.sketch({
+        dom: panelDom,
+        components: flipRotateComponents.map(function (mem) {
+          return mem.asSpec();
+        }),
+        containerBehaviours: derive$1([config('image-tools-fliprotate-buttons-events', [
+            run(external$2.disable(), function (comp, _se) {
+              disableAllComponents(flipRotateComponents, comp);
+            }),
+            run(external$2.enable(), function (comp, _se) {
+              enableAllComponents(flipRotateComponents, comp);
+            })
+          ])])
+      });
+      var makeSlider = function (label, onChoose, min, value, max) {
+        var labelPart = Slider.parts().label({
+          dom: {
+            tag: 'label',
+            classes: ['tox-label'],
+            innerHtml: providersBackstage.translate(label)
+          }
+        });
+        var spectrum = Slider.parts().spectrum({
+          dom: {
+            tag: 'div',
+            classes: ['tox-slider__rail'],
+            attributes: { role: 'presentation' }
+          }
+        });
+        var thumb = Slider.parts().thumb({
+          dom: {
+            tag: 'div',
+            classes: ['tox-slider__handle'],
+            attributes: { role: 'presentation' }
+          }
+        });
+        return record(Slider.sketch({
+          dom: {
+            tag: 'div',
+            classes: ['tox-slider'],
+            attributes: { role: 'presentation' }
+          },
+          model: {
+            mode: 'x',
+            minX: min,
+            maxX: max,
+            getInitialValue: constant({ x: constant(value) })
+          },
+          components: [
+            labelPart,
+            spectrum,
+            thumb
+          ],
+          sliderBehaviours: derive$1([Focusing.config({})]),
+          onChoose: onChoose
+        }));
+      };
+      var makeVariableSlider = function (label, transform, min, value, max) {
+        var onChoose = function (slider, _thumb, value) {
+          var valTransform = makeValueTransform(transform, value.x() / 100);
+          emitTransform(slider, valTransform);
+        };
+        return makeSlider(label, onChoose, min, value, max);
+      };
+      var variableFilterPanelComponents = function (label, transform, min, value, max) {
+        return [
+          createBackButton(),
+          makeVariableSlider(label, transform, min, value, max),
+          createApplyButton()
+        ];
+      };
+      var createVariableFilterPanel = function (label, transform, min, value, max) {
+        var filterPanelComponents = variableFilterPanelComponents(label, transform, min, value, max);
+        return Container.sketch({
+          dom: panelDom,
+          components: filterPanelComponents.map(function (mem) {
+            return mem.asSpec();
+          }),
+          containerBehaviours: derive$1([config('image-tools-filter-panel-buttons-events', [
+              run(external$2.disable(), function (comp, _se) {
+                disableAllComponents(filterPanelComponents, comp);
+              }),
+              run(external$2.enable(), function (comp, _se) {
+                enableAllComponents(filterPanelComponents, comp);
+              })
+            ])])
+        });
+      };
+      var filterPanelComponents = [
+        createBackButton(),
+        createSpacer(),
+        createApplyButton()
+      ];
+      var FilterPanel = Container.sketch({
+        dom: panelDom,
+        components: filterPanelComponents.map(function (mem) {
+          return mem.asSpec();
+        })
+      });
+      var BrightnessPanel = createVariableFilterPanel('Brightness', brightness$1, -100, 0, 100);
+      var ContrastPanel = createVariableFilterPanel('Contrast', contrast$1, -100, 0, 100);
+      var GammaPanel = createVariableFilterPanel('Gamma', gamma$1, -100, 0, 100);
+      var makeColorTransform = function (red, green, blue) {
+        return function (ir) {
+          return colorize$1(ir, red, green, blue);
+        };
+      };
+      var makeColorSlider = function (label) {
+        var onChoose = function (slider, _thumb, _value) {
+          var redOpt = memRed.getOpt(slider);
+          var blueOpt = memBlue.getOpt(slider);
+          var greenOpt = memGreen.getOpt(slider);
+          redOpt.each(function (red) {
+            blueOpt.each(function (blue) {
+              greenOpt.each(function (green) {
+                var r = Representing.getValue(red).x() / 100;
+                var g = Representing.getValue(green).x() / 100;
+                var b = Representing.getValue(blue).x() / 100;
+                var transform = makeColorTransform(r, g, b);
+                emitTransform(slider, transform);
+              });
+            });
+          });
+        };
+        return makeSlider(label, onChoose, 0, 100, 200);
+      };
+      var memRed = makeColorSlider('R');
+      var memGreen = makeColorSlider('G');
+      var memBlue = makeColorSlider('B');
+      var colorizePanelComponents = [
+        createBackButton(),
+        memRed,
+        memGreen,
+        memBlue,
+        createApplyButton()
+      ];
+      var ColorizePanel = Container.sketch({
+        dom: panelDom,
+        components: colorizePanelComponents.map(function (mem) {
+          return mem.asSpec();
+        })
+      });
+      var getTransformPanelEvent = function (panel, transform, update) {
+        return function (button) {
+          var swap = function () {
+            memContainer.getOpt(button).each(function (container) {
+              Replacing.set(container, [panel]);
+              update(container);
+            });
+          };
+          emit$1(button, internal.swap(), {
+            transform: transform,
+            swap: swap
+          });
+        };
+      };
+      var cropPanelUpdate = function (_anyInSystem) {
+        imagePanel.showCrop();
+      };
+      var resizePanelUpdate = function (anyInSystem) {
+        memSize.getOpt(anyInSystem).each(function (sizeInput) {
+          var measurements = imagePanel.getMeasurements();
+          var width = measurements.width;
+          var height = measurements.height;
+          Representing.setValue(sizeInput, {
+            width: width,
+            height: height
+          });
+        });
+      };
+      var sharpenTransform = Option.some(sharpen$1);
+      var invertTransform = Option.some(invert$1);
+      var buttonPanelComponents = [
+        createIconButton('crop', 'Crop', getTransformPanelEvent(CropPanel, Option.none(), cropPanelUpdate), false),
+        createIconButton('resize', 'Resize', getTransformPanelEvent(ResizePanel, Option.none(), resizePanelUpdate), false),
+        createIconButton('orientation', 'Orientation', getTransformPanelEvent(FlipRotatePanel, Option.none(), noop$1), false),
+        createIconButton('brightness', 'Brightness', getTransformPanelEvent(BrightnessPanel, Option.none(), noop$1), false),
+        createIconButton('sharpen', 'Sharpen', getTransformPanelEvent(FilterPanel, sharpenTransform, noop$1), false),
+        createIconButton('contrast', 'Contrast', getTransformPanelEvent(ContrastPanel, Option.none(), noop$1), false),
+        createIconButton('color-levels', 'Color levels', getTransformPanelEvent(ColorizePanel, Option.none(), noop$1), false),
+        createIconButton('gamma', 'Gamma', getTransformPanelEvent(GammaPanel, Option.none(), noop$1), false),
+        createIconButton('invert', 'Invert', getTransformPanelEvent(FilterPanel, invertTransform, noop$1), false)
+      ];
+      var ButtonPanel = Container.sketch({
+        dom: panelDom,
+        components: buttonPanelComponents.map(function (mem) {
+          return mem.asSpec();
+        })
+      });
+      var container = Container.sketch({
+        dom: { tag: 'div' },
+        components: [ButtonPanel],
+        containerBehaviours: derive$1([Replacing.config({})])
+      });
+      var memContainer = record(container);
+      var getApplyButton = function (anyInSystem) {
+        return memContainer.getOpt(anyInSystem).map(function (container) {
+          var panel = container.components()[0];
+          return panel.components()[panel.components().length - 1];
+        });
+      };
+      return {
+        memContainer: memContainer,
+        getApplyButton: getApplyButton
+      };
+    };
+
+    var global$b = tinymce.util.Tools.resolve('tinymce.dom.DomQuery');
+
+    var global$c = tinymce.util.Tools.resolve('tinymce.geom.Rect');
+
+    var global$d = tinymce.util.Tools.resolve('tinymce.util.Observable');
+
+    var global$e = tinymce.util.Tools.resolve('tinymce.util.Tools');
+
+    var global$f = tinymce.util.Tools.resolve('tinymce.util.VK');
+
+    function getDocumentSize(doc) {
+      var documentElement, body, scrollWidth, clientWidth;
+      var offsetWidth, scrollHeight, clientHeight, offsetHeight;
+      var max = Math.max;
+      documentElement = doc.documentElement;
+      body = doc.body;
+      scrollWidth = max(documentElement.scrollWidth, body.scrollWidth);
+      clientWidth = max(documentElement.clientWidth, body.clientWidth);
+      offsetWidth = max(documentElement.offsetWidth, body.offsetWidth);
+      scrollHeight = max(documentElement.scrollHeight, body.scrollHeight);
+      clientHeight = max(documentElement.clientHeight, body.clientHeight);
+      offsetHeight = max(documentElement.offsetHeight, body.offsetHeight);
+      return {
+        width: scrollWidth < offsetWidth ? clientWidth : scrollWidth,
+        height: scrollHeight < offsetHeight ? clientHeight : scrollHeight
+      };
+    }
+    function updateWithTouchData(e) {
+      var keys, i;
+      if (e.changedTouches) {
+        keys = 'screenX screenY pageX pageY clientX clientY'.split(' ');
+        for (i = 0; i < keys.length; i++) {
+          e[keys[i]] = e.changedTouches[0][keys[i]];
+        }
+      }
+    }
+    function DragHelper (id, settings) {
+      var $eventOverlay;
+      var doc = settings.document || domGlobals.document;
+      var downButton;
+      var start, stop, drag, startX, startY;
+      settings = settings || {};
+      var handleElement = doc.getElementById(settings.handle || id);
+      start = function (e) {
+        var docSize = getDocumentSize(doc);
+        var handleElm, cursor;
+        updateWithTouchData(e);
+        e.preventDefault();
+        downButton = e.button;
+        handleElm = handleElement;
+        startX = e.screenX;
+        startY = e.screenY;
+        if (domGlobals.window.getComputedStyle) {
+          cursor = domGlobals.window.getComputedStyle(handleElm, null).getPropertyValue('cursor');
+        } else {
+          cursor = handleElm.runtimeStyle.cursor;
+        }
+        $eventOverlay = global$b('<div></div>').css({
+          position: 'absolute',
+          top: 0,
+          left: 0,
+          width: docSize.width,
+          height: docSize.height,
+          zIndex: 2147483647,
+          opacity: 0.0001,
+          cursor: cursor
+        }).appendTo(doc.body);
+        global$b(doc).on('mousemove touchmove', drag).on('mouseup touchend', stop);
+        settings.start(e);
+      };
+      drag = function (e) {
+        updateWithTouchData(e);
+        if (e.button !== downButton) {
+          return stop(e);
+        }
+        e.deltaX = e.screenX - startX;
+        e.deltaY = e.screenY - startY;
+        e.preventDefault();
+        settings.drag(e);
+      };
+      stop = function (e) {
+        updateWithTouchData(e);
+        global$b(doc).off('mousemove touchmove', drag).off('mouseup touchend', stop);
+        $eventOverlay.remove();
+        if (settings.stop) {
+          settings.stop(e);
+        }
+      };
+      this.destroy = function () {
+        global$b(handleElement).off();
+      };
+      global$b(handleElement).on('mousedown touchstart', start);
+    }
+
+    var count = 0;
+    var create$7 = function (currentRect, viewPortRect, clampRect, containerElm, action) {
+      var instance;
+      var dragHelpers;
+      var blockers;
+      var prefix = 'tox-';
+      var id = prefix + 'crid-' + count++;
+      var handles = [
+        {
+          name: 'move',
+          xMul: 0,
+          yMul: 0,
+          deltaX: 1,
+          deltaY: 1,
+          deltaW: 0,
+          deltaH: 0,
+          label: 'Crop Mask'
+        },
+        {
+          name: 'nw',
+          xMul: 0,
+          yMul: 0,
+          deltaX: 1,
+          deltaY: 1,
+          deltaW: -1,
+          deltaH: -1,
+          label: 'Top Left Crop Handle'
+        },
+        {
+          name: 'ne',
+          xMul: 1,
+          yMul: 0,
+          deltaX: 0,
+          deltaY: 1,
+          deltaW: 1,
+          deltaH: -1,
+          label: 'Top Right Crop Handle'
+        },
+        {
+          name: 'sw',
+          xMul: 0,
+          yMul: 1,
+          deltaX: 1,
+          deltaY: 0,
+          deltaW: -1,
+          deltaH: 1,
+          label: 'Bottom Left Crop Handle'
+        },
+        {
+          name: 'se',
+          xMul: 1,
+          yMul: 1,
+          deltaX: 0,
+          deltaY: 0,
+          deltaW: 1,
+          deltaH: 1,
+          label: 'Bottom Right Crop Handle'
+        }
+      ];
+      blockers = [
+        'top',
+        'right',
+        'bottom',
+        'left'
+      ];
+      var getAbsoluteRect = function (outerRect, relativeRect) {
+        return {
+          x: relativeRect.x + outerRect.x,
+          y: relativeRect.y + outerRect.y,
+          w: relativeRect.w,
+          h: relativeRect.h
+        };
+      };
+      var getRelativeRect = function (outerRect, innerRect) {
+        return {
+          x: innerRect.x - outerRect.x,
+          y: innerRect.y - outerRect.y,
+          w: innerRect.w,
+          h: innerRect.h
+        };
+      };
+      var getInnerRect = function () {
+        return getRelativeRect(clampRect, currentRect);
+      };
+      function moveRect(handle, startRect, deltaX, deltaY) {
+        var x, y, w, h, rect;
+        x = startRect.x;
+        y = startRect.y;
+        w = startRect.w;
+        h = startRect.h;
+        x += deltaX * handle.deltaX;
+        y += deltaY * handle.deltaY;
+        w += deltaX * handle.deltaW;
+        h += deltaY * handle.deltaH;
+        if (w < 20) {
+          w = 20;
+        }
+        if (h < 20) {
+          h = 20;
+        }
+        rect = currentRect = global$c.clamp({
+          x: x,
+          y: y,
+          w: w,
+          h: h
+        }, clampRect, handle.name === 'move');
+        rect = getRelativeRect(clampRect, rect);
+        instance.fire('updateRect', { rect: rect });
+        setInnerRect(rect);
+      }
+      function render() {
+        function createDragHelper(handle) {
+          var startRect;
+          return new DragHelper(id, {
+            document: containerElm.ownerDocument,
+            handle: id + '-' + handle.name,
+            start: function () {
+              startRect = currentRect;
+            },
+            drag: function (e) {
+              moveRect(handle, startRect, e.deltaX, e.deltaY);
+            }
+          });
+        }
+        global$b('<div id="' + id + '" class="' + prefix + 'croprect-container"' + ' role="grid" aria-dropeffect="execute">').appendTo(containerElm);
+        global$e.each(blockers, function (blocker) {
+          global$b('#' + id, containerElm).append('<div id="' + id + '-' + blocker + '"class="' + prefix + 'croprect-block" style="display: none" data-mce-bogus="all">');
+        });
+        global$e.each(handles, function (handle) {
+          global$b('#' + id, containerElm).append('<div id="' + id + '-' + handle.name + '" class="' + prefix + 'croprect-handle ' + prefix + 'croprect-handle-' + handle.name + '"' + 'style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1"' + ' aria-label="' + handle.label + '" aria-grabbed="false" title="' + handle.label + '">');
+        });
+        dragHelpers = global$e.map(handles, createDragHelper);
+        repaint(currentRect);
+        global$b(containerElm).on('focusin focusout', function (e) {
+          global$b(e.target).attr('aria-grabbed', e.type === 'focus' ? 'true' : 'false');
+        });
+        global$b(containerElm).on('keydown', function (e) {
+          var activeHandle;
+          global$e.each(handles, function (handle) {
+            if (e.target.id === id + '-' + handle.name) {
+              activeHandle = handle;
+              return false;
+            }
+          });
+          function moveAndBlock(evt, handle, startRect, deltaX, deltaY) {
+            evt.stopPropagation();
+            evt.preventDefault();
+            moveRect(activeHandle, startRect, deltaX, deltaY);
+          }
+          switch (e.keyCode) {
+          case global$f.LEFT:
+            moveAndBlock(e, activeHandle, currentRect, -10, 0);
+            break;
+          case global$f.RIGHT:
+            moveAndBlock(e, activeHandle, currentRect, 10, 0);
+            break;
+          case global$f.UP:
+            moveAndBlock(e, activeHandle, currentRect, 0, -10);
+            break;
+          case global$f.DOWN:
+            moveAndBlock(e, activeHandle, currentRect, 0, 10);
+            break;
+          case global$f.ENTER:
+          case global$f.SPACEBAR:
+            e.preventDefault();
+            action();
+            break;
+          }
+        });
+      }
+      function toggleVisibility(state) {
+        var selectors;
+        selectors = global$e.map(handles, function (handle) {
+          return '#' + id + '-' + handle.name;
+        }).concat(global$e.map(blockers, function (blocker) {
+          return '#' + id + '-' + blocker;
+        })).join(',');
+        if (state) {
+          global$b(selectors, containerElm).show();
+        } else {
+          global$b(selectors, containerElm).hide();
+        }
+      }
+      function repaint(rect) {
+        function updateElementRect(name, rect) {
+          if (rect.h < 0) {
+            rect.h = 0;
+          }
+          if (rect.w < 0) {
+            rect.w = 0;
+          }
+          global$b('#' + id + '-' + name, containerElm).css({
+            left: rect.x,
+            top: rect.y,
+            width: rect.w,
+            height: rect.h
+          });
+        }
+        global$e.each(handles, function (handle) {
+          global$b('#' + id + '-' + handle.name, containerElm).css({
+            left: rect.w * handle.xMul + rect.x,
+            top: rect.h * handle.yMul + rect.y
+          });
+        });
+        updateElementRect('top', {
+          x: viewPortRect.x,
+          y: viewPortRect.y,
+          w: viewPortRect.w,
+          h: rect.y - viewPortRect.y
+        });
+        updateElementRect('right', {
+          x: rect.x + rect.w,
+          y: rect.y,
+          w: viewPortRect.w - rect.x - rect.w + viewPortRect.x,
+          h: rect.h
+        });
+        updateElementRect('bottom', {
+          x: viewPortRect.x,
+          y: rect.y + rect.h,
+          w: viewPortRect.w,
+          h: viewPortRect.h - rect.y - rect.h + viewPortRect.y
+        });
+        updateElementRect('left', {
+          x: viewPortRect.x,
+          y: rect.y,
+          w: rect.x - viewPortRect.x,
+          h: rect.h
+        });
+        updateElementRect('move', rect);
+      }
+      function setRect(rect) {
+        currentRect = rect;
+        repaint(currentRect);
+      }
+      function setViewPortRect(rect) {
+        viewPortRect = rect;
+        repaint(currentRect);
+      }
+      function setInnerRect(rect) {
+        setRect(getAbsoluteRect(clampRect, rect));
+      }
+      function setClampRect(rect) {
+        clampRect = rect;
+        repaint(currentRect);
+      }
+      function destroy() {
+        global$e.each(dragHelpers, function (helper) {
+          helper.destroy();
+        });
+        dragHelpers = [];
+      }
+      render();
+      instance = global$e.extend({
+        toggleVisibility: toggleVisibility,
+        setClampRect: setClampRect,
+        setRect: setRect,
+        getInnerRect: getInnerRect,
+        setInnerRect: setInnerRect,
+        setViewPortRect: setViewPortRect,
+        destroy: destroy
+      }, global$d);
+      return instance;
+    };
+    var CropRect = { create: create$7 };
+
+    var loadImage = function (image) {
+      return new global$4(function (resolve) {
+        var loaded = function () {
+          image.removeEventListener('load', loaded);
+          resolve(image);
+        };
+        if (image.complete) {
+          resolve(image);
+        } else {
+          image.addEventListener('load', loaded);
+        }
+      });
+    };
+    var renderImagePanel = function (initialUrl) {
+      var memBg = record({
+        dom: {
+          tag: 'div',
+          classes: ['tox-image-tools__image-bg'],
+          attributes: { role: 'presentation' }
+        }
+      });
+      var zoomState = Cell(1);
+      var cropRect = Cell(Option.none());
+      var rectState = Cell({
+        x: 0,
+        y: 0,
+        w: 1,
+        h: 1
+      });
+      var viewRectState = Cell({
+        x: 0,
+        y: 0,
+        w: 1,
+        h: 1
+      });
+      var repaintImg = function (anyInSystem, img) {
+        memContainer.getOpt(anyInSystem).each(function (panel) {
+          var zoom = zoomState.get();
+          var panelW = get$7(panel.element());
+          var panelH = get$6(panel.element());
+          var width = img.dom().naturalWidth * zoom;
+          var height = img.dom().naturalHeight * zoom;
+          var left = Math.max(0, panelW / 2 - width / 2);
+          var top = Math.max(0, panelH / 2 - height / 2);
+          var css = {
+            left: left.toString() + 'px',
+            top: top.toString() + 'px',
+            width: width.toString() + 'px',
+            height: height.toString() + 'px',
+            position: 'absolute'
+          };
+          setAll$1(img, css);
+          memBg.getOpt(panel).each(function (bg) {
+            setAll$1(bg.element(), css);
+          });
+          cropRect.get().each(function (cRect) {
+            var rect = rectState.get();
+            cRect.setRect({
+              x: rect.x * zoom + left,
+              y: rect.y * zoom + top,
+              w: rect.w * zoom,
+              h: rect.h * zoom
+            });
+            cRect.setClampRect({
+              x: left,
+              y: top,
+              w: width,
+              h: height
+            });
+            cRect.setViewPortRect({
+              x: 0,
+              y: 0,
+              w: panelW,
+              h: panelH
+            });
+          });
+        });
+      };
+      var zoomFit = function (anyInSystem, img) {
+        memContainer.getOpt(anyInSystem).each(function (panel) {
+          var panelW = get$7(panel.element());
+          var panelH = get$6(panel.element());
+          var width = img.dom().naturalWidth;
+          var height = img.dom().naturalHeight;
+          var zoom = Math.min(panelW / width, panelH / height);
+          if (zoom >= 1) {
+            zoomState.set(1);
+          } else {
+            zoomState.set(zoom);
+          }
+        });
+      };
+      var updateSrc = function (anyInSystem, url) {
+        var img = Element.fromTag('img');
+        set$1(img, 'src', url);
+        return loadImage(img.dom()).then(function () {
+          return memContainer.getOpt(anyInSystem).map(function (panel) {
+            var aImg = external({ element: img });
+            Replacing.replaceAt(panel, 1, Option.some(aImg));
+            var lastViewRect = viewRectState.get();
+            var viewRect = {
+              x: 0,
+              y: 0,
+              w: img.dom().naturalWidth,
+              h: img.dom().naturalHeight
+            };
+            viewRectState.set(viewRect);
+            var rect = global$c.inflate(viewRect, -20, -20);
+            rectState.set(rect);
+            if (lastViewRect.w !== viewRect.w || lastViewRect.h !== viewRect.h) {
+              zoomFit(panel, img);
+            }
+            repaintImg(panel, img);
+            return img;
+          });
+        });
+      };
+      var zoom = function (anyInSystem, direction) {
+        var currentZoom = zoomState.get();
+        var newZoom = direction > 0 ? Math.min(2, currentZoom + 0.1) : Math.max(0.1, currentZoom - 0.1);
+        zoomState.set(newZoom);
+        memContainer.getOpt(anyInSystem).each(function (panel) {
+          var img = panel.components()[1].element();
+          repaintImg(panel, img);
+        });
+      };
+      var showCrop = function () {
+        cropRect.get().each(function (cRect) {
+          cRect.toggleVisibility(true);
+        });
+      };
+      var hideCrop = function () {
+        cropRect.get().each(function (cRect) {
+          cRect.toggleVisibility(false);
+        });
+      };
+      var getRect = function () {
+        return rectState.get();
+      };
+      var container = Container.sketch({
+        dom: {
+          tag: 'div',
+          classes: ['tox-image-tools__image']
+        },
+        components: [
+          memBg.asSpec(),
+          {
+            dom: {
+              tag: 'img',
+              attributes: { src: initialUrl }
+            }
+          },
+          {
+            dom: { tag: 'div' },
+            behaviours: derive$1([config('image-panel-crop-events', [runOnAttached(function (comp) {
+                  memContainer.getOpt(comp).each(function (container) {
+                    var el = container.element().dom();
+                    var cRect = CropRect.create({
+                      x: 10,
+                      y: 10,
+                      w: 100,
+                      h: 100
+                    }, {
+                      x: 0,
+                      y: 0,
+                      w: 200,
+                      h: 200
+                    }, {
+                      x: 0,
+                      y: 0,
+                      w: 200,
+                      h: 200
+                    }, el, function () {
+                    });
+                    cRect.toggleVisibility(false);
+                    cRect.on('updateRect', function (e) {
+                      var rect = e.rect;
+                      var zoom = zoomState.get();
+                      var newRect = {
+                        x: Math.round(rect.x / zoom),
+                        y: Math.round(rect.y / zoom),
+                        w: Math.round(rect.w / zoom),
+                        h: Math.round(rect.h / zoom)
+                      };
+                      rectState.set(newRect);
+                    });
+                    cropRect.set(Option.some(cRect));
+                  });
+                })])])
+          }
+        ],
+        containerBehaviours: derive$1([
+          Replacing.config({}),
+          config('image-panel-events', [runOnAttached(function (comp) {
+              updateSrc(comp, initialUrl);
+            })])
+        ])
+      });
+      var memContainer = record(container);
+      var getMeasurements = function () {
+        var viewRect = viewRectState.get();
+        return {
+          width: viewRect.w,
+          height: viewRect.h
+        };
+      };
+      return {
+        memContainer: memContainer,
+        updateSrc: updateSrc,
+        zoom: zoom,
+        showCrop: showCrop,
+        hideCrop: hideCrop,
+        getRect: getRect,
+        getMeasurements: getMeasurements
+      };
+    };
+
+    var createButton = function (innerHtml, icon, disabled, action, providersBackstage) {
+      return renderIconButton({
+        name: innerHtml,
+        icon: Option.some(icon),
+        disabled: disabled,
+        tooltip: Option.some(innerHtml),
+        primary: false,
+        borderless: false
+      }, action, providersBackstage);
+    };
+    var setButtonEnabled = function (button, enabled) {
+      if (enabled) {
+        Disabling.enable(button);
+      } else {
+        Disabling.disable(button);
+      }
+    };
+    var renderSideBar = function (providersBackstage) {
+      var updateButtonUndoStates = function (anyInSystem, undoEnabled, redoEnabled) {
+        memUndo.getOpt(anyInSystem).each(function (undo) {
+          setButtonEnabled(undo, undoEnabled);
+        });
+        memRedo.getOpt(anyInSystem).each(function (redo) {
+          setButtonEnabled(redo, redoEnabled);
+        });
+      };
+      var memUndo = record(createButton('Undo', 'undo', true, function (button) {
+        emitWith(button, internal.undo(), { direction: 1 });
+      }, providersBackstage));
+      var memRedo = record(createButton('Redo', 'redo', true, function (button) {
+        emitWith(button, internal.redo(), { direction: 1 });
+      }, providersBackstage));
+      var container = Container.sketch({
+        dom: {
+          tag: 'div',
+          classes: [
+            'tox-image-tools__toolbar',
+            'tox-image-tools__sidebar'
+          ]
+        },
+        components: [
+          memUndo.asSpec(),
+          memRedo.asSpec(),
+          createButton('Zoom in', 'zoom-in', false, function (button) {
+            emitWith(button, internal.zoom(), { direction: 1 });
+          }, providersBackstage),
+          createButton('Zoom out', 'zoom-out', false, function (button) {
+            emitWith(button, internal.zoom(), { direction: -1 });
+          }, providersBackstage)
+        ]
+      });
+      return {
+        container: container,
+        updateButtonUndoStates: updateButtonUndoStates
+      };
+    };
+
+    function UndoStack () {
+      var data = [];
+      var index = -1;
+      function add(state) {
+        var removed;
+        removed = data.splice(++index);
+        data.push(state);
+        return {
+          state: state,
+          removed: removed
+        };
+      }
+      function undo() {
+        if (canUndo()) {
+          return data[--index];
+        }
+      }
+      function redo() {
+        if (canRedo()) {
+          return data[++index];
+        }
+      }
+      function canUndo() {
+        return index > 0;
+      }
+      function canRedo() {
+        return index !== -1 && index < data.length - 1;
+      }
+      return {
+        data: data,
+        add: add,
+        undo: undo,
+        redo: redo,
+        canUndo: canUndo,
+        canRedo: canRedo
+      };
+    }
+
+    var makeState = function (initialState) {
+      var blobState = Cell(initialState);
+      var tempState = Cell(Option.none());
+      var undoStack = UndoStack();
+      undoStack.add(initialState);
+      var getBlobState = function () {
+        return blobState.get();
+      };
+      var setBlobState = function (state) {
+        blobState.set(state);
+      };
+      var getTempState = function () {
+        return tempState.get().fold(function () {
+          return blobState.get();
+        }, function (temp) {
+          return temp;
+        });
+      };
+      var updateTempState = function (blob) {
+        var newTempState = createState(blob);
+        destroyTempState();
+        tempState.set(Option.some(newTempState));
+        return newTempState.url;
+      };
+      var createState = function (blob) {
+        return {
+          blob: blob,
+          url: domGlobals.URL.createObjectURL(blob)
+        };
+      };
+      var destroyState = function (state) {
+        domGlobals.URL.revokeObjectURL(state.url);
+      };
+      var destroyStates = function (states) {
+        global$e.each(states, destroyState);
+      };
+      var destroyTempState = function () {
+        tempState.get().each(destroyState);
+        tempState.set(Option.none());
+      };
+      var addBlobState = function (blob) {
+        var newState = createState(blob);
+        setBlobState(newState);
+        var removed = undoStack.add(newState).removed;
+        destroyStates(removed);
+        return newState.url;
+      };
+      var addTempState = function (blob) {
+        var newState = createState(blob);
+        tempState.set(Option.some(newState));
+        return newState.url;
+      };
+      var applyTempState = function (postApply) {
+        return tempState.get().fold(function () {
+        }, function (temp) {
+          addBlobState(temp.blob);
+          postApply();
+        });
+      };
+      var undo = function () {
+        var currentState = undoStack.undo();
+        setBlobState(currentState);
+        return currentState.url;
+      };
+      var redo = function () {
+        var currentState = undoStack.redo();
+        setBlobState(currentState);
+        return currentState.url;
+      };
+      var getHistoryStates = function () {
+        var undoEnabled = undoStack.canUndo();
+        var redoEnabled = undoStack.canRedo();
+        return {
+          undoEnabled: undoEnabled,
+          redoEnabled: redoEnabled
+        };
+      };
+      return {
+        getBlobState: getBlobState,
+        setBlobState: setBlobState,
+        addBlobState: addBlobState,
+        getTempState: getTempState,
+        updateTempState: updateTempState,
+        addTempState: addTempState,
+        applyTempState: applyTempState,
+        destroyTempState: destroyTempState,
+        undo: undo,
+        redo: redo,
+        getHistoryStates: getHistoryStates
+      };
+    };
+
+    var renderImageTools = function (detail, providersBackstage) {
+      var state = makeState(detail.currentState);
+      var zoom = function (anyInSystem, simulatedEvent) {
+        var direction = simulatedEvent.event().direction();
+        imagePanel.zoom(anyInSystem, direction);
+      };
+      var updateButtonUndoStates = function (anyInSystem) {
+        var historyStates = state.getHistoryStates();
+        sideBar.updateButtonUndoStates(anyInSystem, historyStates.undoEnabled, historyStates.redoEnabled);
+        emitWith(anyInSystem, external$2.formActionEvent, {
+          name: external$2.saveState(),
+          value: historyStates.undoEnabled
+        });
+      };
+      var disableUndoRedo = function (anyInSystem) {
+        sideBar.updateButtonUndoStates(anyInSystem, false, false);
+      };
+      var undo = function (anyInSystem, _simulatedEvent) {
+        var url = state.undo();
+        updateSrc(anyInSystem, url).then(function (_oImg) {
+          unblock(anyInSystem);
+          updateButtonUndoStates(anyInSystem);
+        });
+      };
+      var redo = function (anyInSystem, _simulatedEvent) {
+        var url = state.redo();
+        updateSrc(anyInSystem, url).then(function (_oImg) {
+          unblock(anyInSystem);
+          updateButtonUndoStates(anyInSystem);
+        });
+      };
+      var imageResultToBlob = function (ir) {
+        return ir.toBlob();
+      };
+      var block = function (anyInSystem) {
+        emitWith(anyInSystem, external$2.formActionEvent, {
+          name: external$2.disable(),
+          value: {}
+        });
+      };
+      var unblock = function (anyInSystem) {
+        editPanel.getApplyButton(anyInSystem).each(function (applyButton) {
+          Disabling.enable(applyButton);
+        });
+        emitWith(anyInSystem, external$2.formActionEvent, {
+          name: external$2.enable(),
+          value: {}
+        });
+      };
+      var updateSrc = function (anyInSystem, src) {
+        block(anyInSystem);
+        return imagePanel.updateSrc(anyInSystem, src);
+      };
+      var blobManipulate = function (anyInSystem, blob, filter, action, swap) {
+        block(anyInSystem);
+        return blobToImageResult(blob).then(filter).then(imageResultToBlob).then(action).then(function (url) {
+          return updateSrc(anyInSystem, url).then(function (oImg) {
+            updateButtonUndoStates(anyInSystem);
+            swap();
+            unblock(anyInSystem);
+            return oImg;
+          });
+        }).catch(function (err) {
+          domGlobals.console.log(err);
+          unblock(anyInSystem);
+          return err;
+        });
+      };
+      var manipulate = function (anyInSystem, filter, swap) {
+        var blob = state.getBlobState().blob;
+        var action = function (blob) {
+          return state.updateTempState(blob);
+        };
+        blobManipulate(anyInSystem, blob, filter, action, swap);
+      };
+      var tempManipulate = function (anyInSystem, filter) {
+        var blob = state.getTempState().blob;
+        var action = function (blob) {
+          return state.addTempState(blob);
+        };
+        blobManipulate(anyInSystem, blob, filter, action, noop);
+      };
+      var manipulateApply = function (anyInSystem, filter, swap) {
+        var blob = state.getBlobState().blob;
+        var action = function (blob) {
+          var url = state.addBlobState(blob);
+          destroyTempState(anyInSystem);
+          return url;
+        };
+        blobManipulate(anyInSystem, blob, filter, action, swap);
+      };
+      var apply = function (anyInSystem, simulatedEvent) {
+        var postApply = function () {
+          destroyTempState(anyInSystem);
+          var swap = simulatedEvent.event().swap();
+          swap();
+        };
+        state.applyTempState(postApply);
+      };
+      var destroyTempState = function (anyInSystem) {
+        var currentUrl = state.getBlobState().url;
+        state.destroyTempState();
+        updateButtonUndoStates(anyInSystem);
+        return currentUrl;
+      };
+      var cancel = function (anyInSystem) {
+        var currentUrl = destroyTempState(anyInSystem);
+        updateSrc(anyInSystem, currentUrl).then(function (_oImg) {
+          unblock(anyInSystem);
+        });
+      };
+      var back = function (anyInSystem, simulatedEvent) {
+        cancel(anyInSystem);
+        var swap = simulatedEvent.event().swap();
+        swap();
+        imagePanel.hideCrop();
+      };
+      var transform = function (anyInSystem, simulatedEvent) {
+        return manipulate(anyInSystem, simulatedEvent.event().transform(), noop);
+      };
+      var tempTransform = function (anyInSystem, simulatedEvent) {
+        return tempManipulate(anyInSystem, simulatedEvent.event().transform());
+      };
+      var transformApply = function (anyInSystem, simulatedEvent) {
+        return manipulateApply(anyInSystem, simulatedEvent.event().transform(), simulatedEvent.event().swap());
+      };
+      var imagePanel = renderImagePanel(detail.currentState.url);
+      var sideBar = renderSideBar(providersBackstage);
+      var editPanel = renderEditPanel(imagePanel, providersBackstage);
+      var swap = function (anyInSystem, simulatedEvent) {
+        disableUndoRedo(anyInSystem);
+        var transform = simulatedEvent.event().transform();
+        var swap = simulatedEvent.event().swap();
+        transform.fold(function () {
+          swap();
+        }, function (transform) {
+          manipulate(anyInSystem, transform, swap);
+        });
+      };
+      return {
+        dom: {
+          tag: 'div',
+          attributes: { role: 'presentation' }
+        },
+        components: [
+          editPanel.memContainer.asSpec(),
+          imagePanel.memContainer.asSpec(),
+          sideBar.container
+        ],
+        behaviours: derive$1([
+          Representing.config({
+            store: {
+              mode: 'manual',
+              getValue: function () {
+                return state.getBlobState();
+              }
+            }
+          }),
+          config('image-tools-events', [
+            run(internal.undo(), undo),
+            run(internal.redo(), redo),
+            run(internal.zoom(), zoom),
+            run(internal.back(), back),
+            run(internal.apply(), apply),
+            run(internal.transform(), transform),
+            run(internal.tempTransform(), tempTransform),
+            run(internal.transformApply(), transformApply),
+            run(internal.swap(), swap)
+          ]),
+          ComposingConfigs.self()
+        ])
+      };
+    };
+
+    var factory$8 = function (detail, _spec) {
+      var options = map(detail.options, function (option) {
+        return {
+          dom: {
+            tag: 'option',
+            value: option.value,
+            innerHtml: option.text
+          }
+        };
+      });
+      var initialValues = detail.data.map(function (v) {
+        return wrap$1('initialValue', v);
+      }).getOr({});
+      return {
+        uid: detail.uid,
+        dom: {
+          tag: 'select',
+          classes: detail.selectClasses,
+          attributes: detail.selectAttributes
+        },
+        components: options,
+        behaviours: augment(detail.selectBehaviours, [
+          Focusing.config({}),
+          Representing.config({
+            store: __assign({
+              mode: 'manual',
+              getValue: function (select) {
+                return get$5(select.element());
+              },
+              setValue: function (select, newValue) {
+                var found = find(detail.options, function (opt) {
+                  return opt.value === newValue;
+                });
+                if (found.isSome()) {
+                  set$3(select.element(), newValue);
+                }
+              }
+            }, initialValues)
+          })
+        ])
+      };
+    };
+    var HtmlSelect = single$2({
+      name: 'HtmlSelect',
+      configFields: [
+        strict$1('options'),
+        field$1('selectBehaviours', [
+          Focusing,
+          Representing
+        ]),
+        defaulted$1('selectClasses', []),
+        defaulted$1('selectAttributes', {}),
+        option('data')
+      ],
+      factory: factory$8
+    });
+
+    var renderSelectBox = function (spec, providersBackstage) {
+      var translatedOptions = map(spec.items, function (item) {
+        return {
+          text: providersBackstage.translate(item.text),
+          value: item.value
+        };
+      });
+      var pLabel = spec.label.map(function (label) {
+        return renderLabel(label, providersBackstage);
+      });
+      var pField = FormField.parts().field({
+        dom: {},
+        selectAttributes: { size: spec.size },
+        options: translatedOptions,
+        factory: HtmlSelect,
+        selectBehaviours: derive$1([
+          Disabling.config({
+            disabled: function () {
+              return spec.disabled || providersBackstage.isReadOnly();
+            }
+          }),
+          Tabstopping.config({}),
+          config('selectbox-change', [run(change(), function (component, _) {
+              emitWith(component, formChangeEvent, { name: spec.name });
+            })])
+        ])
+      });
+      var chevron = spec.size > 1 ? Option.none() : Option.some({
+        dom: {
+          tag: 'div',
+          classes: ['tox-selectfield__icon-js'],
+          innerHtml: get$d('chevron-down', providersBackstage.icons)
+        }
+      });
+      var selectWrap = {
+        dom: {
+          tag: 'div',
+          classes: ['tox-selectfield']
+        },
+        components: flatten([
+          [pField],
+          chevron.toArray()
+        ])
+      };
+      return FormField.sketch({
+        dom: {
+          tag: 'div',
+          classes: ['tox-form__group']
+        },
+        components: flatten([
+          pLabel.toArray(),
+          [selectWrap]
+        ]),
+        fieldBehaviours: derive$1([
+          Disabling.config({
+            disabled: function () {
+              return spec.disabled || providersBackstage.isReadOnly();
+            },
+            onDisabled: function (comp) {
+              FormField.getField(comp).each(Disabling.disable);
+            },
+            onEnabled: function (comp) {
+              FormField.getField(comp).each(Disabling.enable);
+            }
+          }),
+          receivingConfig()
+        ])
+      });
+    };
+
+    var renderTextField = function (spec, providersBackstage) {
+      var pLabel = spec.label.map(function (label) {
+        return renderLabel(label, providersBackstage);
+      });
+      var baseInputBehaviours = [
+        Disabling.config({
+          disabled: function () {
+            return spec.disabled || providersBackstage.isReadOnly();
+          }
+        }),
+        receivingConfig(),
+        Keying.config({
+          mode: 'execution',
+          useEnter: spec.multiline !== true,
+          useControlEnter: spec.multiline === true,
+          execute: function (comp) {
+            emit(comp, formSubmitEvent);
+            return Option.some(true);
+          }
+        }),
+        config('textfield-change', [
+          run(input(), function (component, _) {
+            emitWith(component, formChangeEvent, { name: spec.name });
+          }),
+          run(postPaste(), function (component, _) {
+            emitWith(component, formChangeEvent, { name: spec.name });
+          })
+        ]),
+        Tabstopping.config({})
+      ];
+      var validatingBehaviours = spec.validation.map(function (vl) {
+        return Invalidating.config({
+          getRoot: function (input) {
+            return parent(input.element());
+          },
+          invalidClass: 'tox-invalid',
+          validator: {
+            validate: function (input) {
+              var v = Representing.getValue(input);
+              var result = vl.validator(v);
+              return Future.pure(result === true ? Result.value(v) : Result.error(result));
+            },
+            validateOnLoad: vl.validateOnLoad
+          }
+        });
+      }).toArray();
+      var placeholder = spec.placeholder.fold(constant({}), function (p) {
+        return { placeholder: providersBackstage.translate(p) };
+      });
+      var inputMode = spec.inputMode.fold(constant({}), function (mode) {
+        return { inputmode: mode };
+      });
+      var inputAttributes = __assign(__assign({}, placeholder), inputMode);
+      var pField = FormField.parts().field({
+        tag: spec.multiline === true ? 'textarea' : 'input',
+        inputAttributes: inputAttributes,
+        inputClasses: [spec.classname],
+        inputBehaviours: derive$1(flatten([
+          baseInputBehaviours,
+          validatingBehaviours
+        ])),
+        selectOnFocus: false,
+        factory: Input
+      });
+      var extraClasses = spec.flex ? ['tox-form__group--stretched'] : [];
+      var extraClasses2 = extraClasses.concat(spec.maximized ? ['tox-form-group--maximize'] : []);
+      var extraBehaviours = [
+        Disabling.config({
+          disabled: function () {
+            return spec.disabled || providersBackstage.isReadOnly();
+          },
+          onDisabled: function (comp) {
+            FormField.getField(comp).each(Disabling.disable);
+          },
+          onEnabled: function (comp) {
+            FormField.getField(comp).each(Disabling.enable);
+          }
+        }),
+        receivingConfig()
+      ];
+      return renderFormFieldWith(pLabel, pField, extraClasses2, extraBehaviours);
+    };
+    var renderInput = function (spec, providersBackstage) {
+      return renderTextField({
+        name: spec.name,
+        multiline: false,
+        label: spec.label,
+        inputMode: spec.inputMode,
+        placeholder: spec.placeholder,
+        flex: false,
+        disabled: spec.disabled,
+        classname: 'tox-textfield',
+        validation: Option.none(),
+        maximized: spec.maximized
+      }, providersBackstage);
+    };
+    var renderTextarea = function (spec, providersBackstage) {
+      return renderTextField({
+        name: spec.name,
+        multiline: true,
+        label: spec.label,
+        inputMode: Option.none(),
+        placeholder: spec.placeholder,
+        flex: true,
+        disabled: spec.disabled,
+        classname: 'tox-textarea',
+        validation: Option.none(),
+        maximized: spec.maximized
+      }, providersBackstage);
+    };
+
+    var events$c = function (streamConfig, streamState) {
+      var streams = streamConfig.stream.streams;
+      var processor = streams.setup(streamConfig, streamState);
+      return derive([
+        run(streamConfig.event, processor),
+        runOnDetached(function () {
+          return streamState.cancel();
+        })
+      ].concat(streamConfig.cancelEvent.map(function (e) {
+        return [run(e, function () {
+            return streamState.cancel();
+          })];
+      }).getOr([])));
+    };
+
+    var ActiveStreaming = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events$c
+    });
+
+    var throttle = function (_config) {
+      var state = Cell(null);
+      var readState = function () {
+        return { timer: state.get() !== null ? 'set' : 'unset' };
+      };
+      var setTimer = function (t) {
+        state.set(t);
+      };
+      var cancel = function () {
+        var t = state.get();
+        if (t !== null) {
+          t.cancel();
+        }
+      };
+      return nu$5({
+        readState: readState,
+        setTimer: setTimer,
+        cancel: cancel
+      });
+    };
+    var init$6 = function (spec) {
+      return spec.stream.streams.state(spec);
+    };
+
+    var StreamingState = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        throttle: throttle,
+        init: init$6
+    });
+
+    var setup$2 = function (streamInfo, streamState) {
+      var sInfo = streamInfo.stream;
+      var throttler = last$2(streamInfo.onStream, sInfo.delay);
+      streamState.setTimer(throttler);
+      return function (component, simulatedEvent) {
+        throttler.throttle(component, simulatedEvent);
+        if (sInfo.stopEvent) {
+          simulatedEvent.stop();
+        }
+      };
+    };
+    var StreamingSchema = [
+      strictOf('stream', choose$1('mode', {
+        throttle: [
+          strict$1('delay'),
+          defaulted$1('stopEvent', true),
+          output('streams', {
+            setup: setup$2,
+            state: throttle
+          })
+        ]
+      })),
+      defaulted$1('event', 'input'),
+      option('cancelEvent'),
+      onStrictHandler('onStream')
+    ];
+
+    var Streaming = create$1({
+      fields: StreamingSchema,
+      name: 'streaming',
+      active: ActiveStreaming,
+      state: StreamingState
+    });
+
+    var setValueFromItem = function (model, input, item) {
+      var itemData = Representing.getValue(item);
+      Representing.setValue(input, itemData);
+      setCursorAtEnd(input);
+    };
+    var setSelectionOn = function (input, f) {
+      var el = input.element();
+      var value = get$5(el);
+      var node = el.dom();
+      if (get$2(el, 'type') !== 'number') {
+        f(node, value);
+      }
+    };
+    var setCursorAtEnd = function (input) {
+      setSelectionOn(input, function (node, value) {
+        return node.setSelectionRange(value.length, value.length);
+      });
+    };
+    var setSelectionToEnd = function (input, startOffset) {
+      setSelectionOn(input, function (node, value) {
+        return node.setSelectionRange(startOffset, value.length);
+      });
+    };
+    var attemptSelectOver = function (model, input, item) {
+      if (!model.selectsOver) {
+        return Option.none();
+      } else {
+        var currentValue = Representing.getValue(input);
+        var inputDisplay_1 = model.getDisplayText(currentValue);
+        var itemValue = Representing.getValue(item);
+        var itemDisplay = model.getDisplayText(itemValue);
+        return itemDisplay.indexOf(inputDisplay_1) === 0 ? Option.some(function () {
+          setValueFromItem(model, input, item);
+          setSelectionToEnd(input, inputDisplay_1.length);
+        }) : Option.none();
+      }
+    };
+
+    var itemExecute = constant('alloy.typeahead.itemexecute');
+
+    var make$5 = function (detail, components, spec, externals) {
+      var navigateList = function (comp, simulatedEvent, highlighter) {
+        detail.previewing.set(false);
+        var sandbox = Coupling.getCoupled(comp, 'sandbox');
+        if (Sandboxing.isOpen(sandbox)) {
+          Composing.getCurrent(sandbox).each(function (menu) {
+            Highlighting.getHighlighted(menu).fold(function () {
+              highlighter(menu);
+            }, function () {
+              dispatchEvent(sandbox, menu.element(), 'keydown', simulatedEvent);
+            });
+          });
+        } else {
+          var onOpenSync = function (sandbox) {
+            Composing.getCurrent(sandbox).each(highlighter);
+          };
+          open$1(detail, mapFetch(comp), comp, sandbox, externals, onOpenSync, HighlightOnOpen.HighlightFirst).get(noop);
+        }
+      };
+      var focusBehaviours$1 = focusBehaviours(detail);
+      var mapFetch = function (comp) {
+        return function (tdata) {
+          return tdata.map(function (data) {
+            var menus = values(data.menus);
+            var items = bind(menus, function (menu) {
+              return filter(menu.items, function (item) {
+                return item.type === 'item';
+              });
+            });
+            var repState = Representing.getState(comp);
+            repState.update(map(items, function (item) {
+              return item.data;
+            }));
+            return data;
+          });
+        };
+      };
+      var behaviours = [
+        Focusing.config({}),
+        Representing.config({
+          onSetValue: detail.onSetValue,
+          store: __assign({
+            mode: 'dataset',
+            getDataKey: function (comp) {
+              return get$5(comp.element());
+            },
+            getFallbackEntry: function (itemString) {
+              return {
+                value: itemString,
+                meta: {}
+              };
+            },
+            setValue: function (comp, data) {
+              set$3(comp.element(), detail.model.getDisplayText(data));
+            }
+          }, detail.initialData.map(function (d) {
+            return wrap$1('initialValue', d);
+          }).getOr({}))
+        }),
+        Streaming.config({
+          stream: {
+            mode: 'throttle',
+            delay: detail.responseTime,
+            stopEvent: false
+          },
+          onStream: function (component, _simulatedEvent) {
+            var sandbox = Coupling.getCoupled(component, 'sandbox');
+            var focusInInput = Focusing.isFocused(component);
+            if (focusInInput) {
+              if (get$5(component.element()).length >= detail.minChars) {
+                var previousValue_1 = Composing.getCurrent(sandbox).bind(function (menu) {
+                  return Highlighting.getHighlighted(menu).map(Representing.getValue);
+                });
+                detail.previewing.set(true);
+                var onOpenSync = function (_sandbox) {
+                  Composing.getCurrent(sandbox).each(function (menu) {
+                    previousValue_1.fold(function () {
+                      if (detail.model.selectsOver) {
+                        Highlighting.highlightFirst(menu);
+                      }
+                    }, function (pv) {
+                      Highlighting.highlightBy(menu, function (item) {
+                        var itemData = Representing.getValue(item);
+                        return itemData.value === pv.value;
+                      });
+                      Highlighting.getHighlighted(menu).orThunk(function () {
+                        Highlighting.highlightFirst(menu);
+                        return Option.none();
+                      });
+                    });
+                  });
+                };
+                open$1(detail, mapFetch(component), component, sandbox, externals, onOpenSync, HighlightOnOpen.HighlightFirst).get(noop);
+              }
+            }
+          },
+          cancelEvent: typeaheadCancel()
+        }),
+        Keying.config({
+          mode: 'special',
+          onDown: function (comp, simulatedEvent) {
+            navigateList(comp, simulatedEvent, Highlighting.highlightFirst);
+            return Option.some(true);
+          },
+          onEscape: function (comp) {
+            var sandbox = Coupling.getCoupled(comp, 'sandbox');
+            if (Sandboxing.isOpen(sandbox)) {
+              Sandboxing.close(sandbox);
+              return Option.some(true);
+            }
+            return Option.none();
+          },
+          onUp: function (comp, simulatedEvent) {
+            navigateList(comp, simulatedEvent, Highlighting.highlightLast);
+            return Option.some(true);
+          },
+          onEnter: function (comp) {
+            var sandbox = Coupling.getCoupled(comp, 'sandbox');
+            var sandboxIsOpen = Sandboxing.isOpen(sandbox);
+            if (sandboxIsOpen && !detail.previewing.get()) {
+              return Composing.getCurrent(sandbox).bind(function (menu) {
+                return Highlighting.getHighlighted(menu);
+              }).map(function (item) {
+                emitWith(comp, itemExecute(), { item: item });
+                return true;
+              });
+            } else {
+              var currentValue = Representing.getValue(comp);
+              emit(comp, typeaheadCancel());
+              detail.onExecute(sandbox, comp, currentValue);
+              if (sandboxIsOpen) {
+                Sandboxing.close(sandbox);
+              }
+              return Option.some(true);
+            }
+          }
+        }),
+        Toggling.config({
+          toggleClass: detail.markers.openClass,
+          aria: { mode: 'expanded' }
+        }),
+        Coupling.config({
+          others: {
+            sandbox: function (hotspot) {
+              return makeSandbox(detail, hotspot, {
+                onOpen: function () {
+                  return Toggling.on(hotspot);
+                },
+                onClose: function () {
+                  return Toggling.off(hotspot);
+                }
+              });
+            }
+          }
+        }),
+        config('typeaheadevents', [
+          runOnExecute(function (comp) {
+            var onOpenSync = noop;
+            togglePopup(detail, mapFetch(comp), comp, externals, onOpenSync, HighlightOnOpen.HighlightFirst).get(noop);
+          }),
+          run(itemExecute(), function (comp, se) {
+            var sandbox = Coupling.getCoupled(comp, 'sandbox');
+            setValueFromItem(detail.model, comp, se.event().item());
+            emit(comp, typeaheadCancel());
+            detail.onItemExecute(comp, sandbox, se.event().item(), Representing.getValue(comp));
+            Sandboxing.close(sandbox);
+            setCursorAtEnd(comp);
+          })
+        ].concat(detail.dismissOnBlur ? [run(postBlur(), function (typeahead) {
+            var sandbox = Coupling.getCoupled(typeahead, 'sandbox');
+            if (search(sandbox.element()).isNone()) {
+              Sandboxing.close(sandbox);
+            }
+          })] : []))
+      ];
+      return {
+        uid: detail.uid,
+        dom: dom$2(deepMerge(detail, {
+          inputAttributes: {
+            'role': 'combobox',
+            'aria-autocomplete': 'list',
+            'aria-haspopup': 'true'
+          }
+        })),
+        behaviours: __assign(__assign({}, focusBehaviours$1), augment(detail.typeaheadBehaviours, behaviours)),
+        eventOrder: detail.eventOrder
+      };
+    };
+
+    var schema$j = constant([
+      option('lazySink'),
+      strict$1('fetch'),
+      defaulted$1('minChars', 5),
+      defaulted$1('responseTime', 1000),
+      onHandler('onOpen'),
+      defaulted$1('getHotspot', Option.some),
+      defaulted$1('getAnchorOverrides', constant({})),
+      defaulted$1('layouts', Option.none()),
+      defaulted$1('eventOrder', {}),
+      defaultedObjOf('model', {}, [
+        defaulted$1('getDisplayText', function (itemData) {
+          return itemData.meta !== undefined && itemData.meta.text !== undefined ? itemData.meta.text : itemData.value;
+        }),
+        defaulted$1('selectsOver', true),
+        defaulted$1('populateFromBrowse', true)
+      ]),
+      onHandler('onSetValue'),
+      onKeyboardHandler('onExecute'),
+      onHandler('onItemExecute'),
+      defaulted$1('inputClasses', []),
+      defaulted$1('inputAttributes', {}),
+      defaulted$1('inputStyles', {}),
+      defaulted$1('matchWidth', true),
+      defaulted$1('useMinWidth', false),
+      defaulted$1('dismissOnBlur', true),
+      markers(['openClass']),
+      option('initialData'),
+      field$1('typeaheadBehaviours', [
+        Focusing,
+        Representing,
+        Streaming,
+        Keying,
+        Toggling,
+        Coupling
+      ]),
+      state$1('previewing', function () {
+        return Cell(true);
+      })
+    ].concat(schema$f()).concat(sandboxFields()));
+    var parts$6 = constant([external$1({
+        schema: [tieredMenuMarkers()],
+        name: 'menu',
+        overrides: function (detail) {
+          return {
+            fakeFocus: true,
+            onHighlight: function (menu, item) {
+              if (!detail.previewing.get()) {
+                menu.getSystem().getByUid(detail.uid).each(function (input) {
+                  if (detail.model.populateFromBrowse) {
+                    setValueFromItem(detail.model, input, item);
+                  }
+                });
+              } else {
+                menu.getSystem().getByUid(detail.uid).each(function (input) {
+                  attemptSelectOver(detail.model, input, item).fold(function () {
+                    return Highlighting.dehighlight(menu, item);
+                  }, function (fn) {
+                    return fn();
+                  });
+                });
+              }
+              detail.previewing.set(false);
+            },
+            onExecute: function (menu, item) {
+              return menu.getSystem().getByUid(detail.uid).toOption().map(function (typeahead) {
+                emitWith(typeahead, itemExecute(), { item: item });
+                return true;
+              });
+            },
+            onHover: function (menu, item) {
+              detail.previewing.set(false);
+              menu.getSystem().getByUid(detail.uid).each(function (input) {
+                if (detail.model.populateFromBrowse) {
+                  setValueFromItem(detail.model, input, item);
+                }
+              });
+            }
+          };
+        }
+      })]);
+
+    var Typeahead = composite$1({
+      name: 'Typeahead',
+      configFields: schema$j(),
+      partFields: parts$6(),
+      factory: make$5
+    });
+
+    var wrap$2 = function (delegate) {
+      var toCached = function () {
+        return wrap$2(delegate.toCached());
+      };
+      var bindFuture = function (f) {
+        return wrap$2(delegate.bind(function (resA) {
+          return resA.fold(function (err) {
+            return Future.pure(Result.error(err));
+          }, function (a) {
+            return f(a);
+          });
+        }));
+      };
+      var bindResult = function (f) {
+        return wrap$2(delegate.map(function (resA) {
+          return resA.bind(f);
+        }));
+      };
+      var mapResult = function (f) {
+        return wrap$2(delegate.map(function (resA) {
+          return resA.map(f);
+        }));
+      };
+      var mapError = function (f) {
+        return wrap$2(delegate.map(function (resA) {
+          return resA.mapError(f);
+        }));
+      };
+      var foldResult = function (whenError, whenValue) {
+        return delegate.map(function (res) {
+          return res.fold(whenError, whenValue);
+        });
+      };
+      var withTimeout = function (timeout, errorThunk) {
+        return wrap$2(Future.nu(function (callback) {
+          var timedOut = false;
+          var timer = domGlobals.setTimeout(function () {
+            timedOut = true;
+            callback(Result.error(errorThunk()));
+          }, timeout);
+          delegate.get(function (result) {
+            if (!timedOut) {
+              domGlobals.clearTimeout(timer);
+              callback(result);
+            }
+          });
+        }));
+      };
+      return __assign(__assign({}, delegate), {
+        toCached: toCached,
+        bindFuture: bindFuture,
+        bindResult: bindResult,
+        mapResult: mapResult,
+        mapError: mapError,
+        foldResult: foldResult,
+        withTimeout: withTimeout
+      });
+    };
+    var nu$c = function (worker) {
+      return wrap$2(Future.nu(worker));
+    };
+    var value$2 = function (value) {
+      return wrap$2(Future.pure(Result.value(value)));
+    };
+    var error$1 = function (error) {
+      return wrap$2(Future.pure(Result.error(error)));
+    };
+    var fromResult$1 = function (result) {
+      return wrap$2(Future.pure(result));
+    };
+    var fromFuture = function (future) {
+      return wrap$2(future.map(Result.value));
+    };
+    var fromPromise = function (promise) {
+      return nu$c(function (completer) {
+        promise.then(function (value) {
+          completer(Result.value(value));
+        }, function (error) {
+          completer(Result.error(error));
+        });
+      });
+    };
+    var FutureResult = {
+      nu: nu$c,
+      wrap: wrap$2,
+      pure: value$2,
+      value: value$2,
+      error: error$1,
+      fromResult: fromResult$1,
+      fromFuture: fromFuture,
+      fromPromise: fromPromise
+    };
+
+    var separator$2 = { type: 'separator' };
+    var toMenuItem = function (target) {
+      return {
+        type: 'menuitem',
+        value: target.url,
+        text: target.title,
+        meta: { attach: target.attach },
+        onAction: function () {
+        }
+      };
+    };
+    var staticMenuItem = function (title, url) {
+      return {
+        type: 'menuitem',
+        value: url,
+        text: title,
+        meta: { attach: undefined },
+        onAction: function () {
+        }
+      };
+    };
+    var toMenuItems = function (targets) {
+      return map(targets, toMenuItem);
+    };
+    var filterLinkTargets = function (type, targets) {
+      return filter(targets, function (target) {
+        return target.type === type;
+      });
+    };
+    var filteredTargets = function (type, targets) {
+      return toMenuItems(filterLinkTargets(type, targets));
+    };
+    var headerTargets = function (linkInfo) {
+      return filteredTargets('header', linkInfo.targets);
+    };
+    var anchorTargets = function (linkInfo) {
+      return filteredTargets('anchor', linkInfo.targets);
+    };
+    var anchorTargetTop = function (linkInfo) {
+      return Option.from(linkInfo.anchorTop).map(function (url) {
+        return staticMenuItem('<top>', url);
+      }).toArray();
+    };
+    var anchorTargetBottom = function (linkInfo) {
+      return Option.from(linkInfo.anchorBottom).map(function (url) {
+        return staticMenuItem('<bottom>', url);
+      }).toArray();
+    };
+    var historyTargets = function (history) {
+      return map(history, function (url) {
+        return staticMenuItem(url, url);
+      });
+    };
+    var joinMenuLists = function (items) {
+      return foldl(items, function (a, b) {
+        var bothEmpty = a.length === 0 || b.length === 0;
+        return bothEmpty ? a.concat(b) : a.concat(separator$2, b);
+      }, []);
+    };
+    var filterByQuery = function (term, menuItems) {
+      var lowerCaseTerm = term.toLowerCase();
+      return filter(menuItems, function (item) {
+        var text = item.meta !== undefined && item.meta.text !== undefined ? item.meta.text : item.text;
+        return contains$1(text.toLowerCase(), lowerCaseTerm) || contains$1(item.value.toLowerCase(), lowerCaseTerm);
+      });
+    };
+
+    var getItems = function (fileType, input, urlBackstage) {
+      var urlInputValue = Representing.getValue(input);
+      var term = urlInputValue.meta.text !== undefined ? urlInputValue.meta.text : urlInputValue.value;
+      var info = urlBackstage.getLinkInformation();
+      return info.fold(function () {
+        return [];
+      }, function (linkInfo) {
+        var history = filterByQuery(term, historyTargets(urlBackstage.getHistory(fileType)));
+        return fileType === 'file' ? joinMenuLists([
+          history,
+          filterByQuery(term, headerTargets(linkInfo)),
+          filterByQuery(term, flatten([
+            anchorTargetTop(linkInfo),
+            anchorTargets(linkInfo),
+            anchorTargetBottom(linkInfo)
+          ]))
+        ]) : history;
+      });
+    };
+    var errorId = generate$1('aria-invalid');
+    var renderUrlInput = function (spec, backstage, urlBackstage) {
+      var _a;
+      var providersBackstage = backstage.shared.providers;
+      var updateHistory = function (component) {
+        var urlEntry = Representing.getValue(component);
+        urlBackstage.addToHistory(urlEntry.value, spec.filetype);
+      };
+      var pField = FormField.parts().field({
+        factory: Typeahead,
+        dismissOnBlur: true,
+        inputClasses: ['tox-textfield'],
+        sandboxClasses: ['tox-dialog__popups'],
+        inputAttributes: {
+          'aria-errormessage': errorId,
+          'type': 'url'
+        },
+        minChars: 0,
+        responseTime: 0,
+        fetch: function (input) {
+          var items = getItems(spec.filetype, input, urlBackstage);
+          var tdata = build$2(items, ItemResponse$1.BUBBLE_TO_SANDBOX, backstage, false);
+          return Future.pure(tdata);
+        },
+        getHotspot: function (comp) {
+          return memUrlBox.getOpt(comp);
+        },
+        onSetValue: function (comp, _newValue) {
+          if (comp.hasConfigured(Invalidating)) {
+            Invalidating.run(comp).get(noop);
+          }
+        },
+        typeaheadBehaviours: derive$1(flatten([
+          urlBackstage.getValidationHandler().map(function (handler) {
+            return Invalidating.config({
+              getRoot: function (comp) {
+                return parent(comp.element());
+              },
+              invalidClass: 'tox-control-wrap--status-invalid',
+              notify: {
+                onInvalid: function (comp, err) {
+                  memInvalidIcon.getOpt(comp).each(function (invalidComp) {
+                    set$1(invalidComp.element(), 'title', providersBackstage.translate(err));
+                  });
+                }
+              },
+              validator: {
+                validate: function (input) {
+                  var urlEntry = Representing.getValue(input);
+                  return FutureResult.nu(function (completer) {
+                    handler({
+                      type: spec.filetype,
+                      url: urlEntry.value
+                    }, function (validation) {
+                      if (validation.status === 'invalid') {
+                        var err = Result.error(validation.message);
+                        completer(err);
+                      } else {
+                        var val = Result.value(validation.message);
+                        completer(val);
+                      }
+                    });
+                  });
+                },
+                validateOnLoad: false
+              }
+            });
+          }).toArray(),
+          [
+            Disabling.config({
+              disabled: function () {
+                return spec.disabled || providersBackstage.isReadOnly();
+              }
+            }),
+            Tabstopping.config({}),
+            config('urlinput-events', flatten([
+              spec.filetype === 'file' ? [run(input(), function (comp) {
+                  emitWith(comp, formChangeEvent, { name: spec.name });
+                })] : [],
+              [
+                run(change(), function (comp) {
+                  emitWith(comp, formChangeEvent, { name: spec.name });
+                  updateHistory(comp);
+                }),
+                run(postPaste(), function (comp) {
+                  emitWith(comp, formChangeEvent, { name: spec.name });
+                  updateHistory(comp);
+                })
+              ]
+            ]))
+          ]
+        ])),
+        eventOrder: (_a = {}, _a[input()] = [
+          'streaming',
+          'urlinput-events',
+          'invalidating'
+        ], _a),
+        model: {
+          getDisplayText: function (itemData) {
+            return itemData.value;
+          },
+          selectsOver: false,
+          populateFromBrowse: false
+        },
+        markers: { openClass: 'tox-textfield--popup-open' },
+        lazySink: backstage.shared.getSink,
+        parts: { menu: part(false, 1, 'normal') },
+        onExecute: function (_menu, component, _entry) {
+          emitWith(component, formSubmitEvent, {});
+        },
+        onItemExecute: function (typeahead, _sandbox, _item, _value) {
+          updateHistory(typeahead);
+          emitWith(typeahead, formChangeEvent, { name: spec.name });
+        }
+      });
+      var pLabel = spec.label.map(function (label) {
+        return renderLabel(label, providersBackstage);
+      });
+      var makeIcon = function (name, errId, icon, label) {
+        if (icon === void 0) {
+          icon = name;
+        }
+        if (label === void 0) {
+          label = name;
+        }
+        return {
+          dom: {
+            tag: 'div',
+            classes: [
+              'tox-icon',
+              'tox-control-wrap__status-icon-' + name
+            ],
+            innerHtml: get$d(icon, providersBackstage.icons),
+            attributes: __assign({
+              'title': providersBackstage.translate(label),
+              'aria-live': 'polite'
+            }, errId.fold(function () {
+              return {};
+            }, function (id) {
+              return { id: id };
+            }))
+          }
+        };
+      };
+      var memInvalidIcon = record(makeIcon('invalid', Option.some(errorId), 'warning'));
+      var memStatus = record({
+        dom: {
+          tag: 'div',
+          classes: ['tox-control-wrap__status-icon-wrap']
+        },
+        components: [memInvalidIcon.asSpec()]
+      });
+      var optUrlPicker = urlBackstage.getUrlPicker(spec.filetype);
+      var browseUrlEvent = generate$1('browser.url.event');
+      var memUrlBox = record({
+        dom: {
+          tag: 'div',
+          classes: ['tox-control-wrap']
+        },
+        components: [
+          pField,
+          memStatus.asSpec()
+        ],
+        behaviours: derive$1([Disabling.config({
+            disabled: function () {
+              return spec.disabled || providersBackstage.isReadOnly();
+            }
+          })])
+      });
+      var memUrlPickerButton = record(renderButton({
+        name: spec.name,
+        icon: Option.some('browse'),
+        text: spec.label.getOr(''),
+        disabled: spec.disabled,
+        primary: false,
+        borderless: true
+      }, function (component) {
+        return emit(component, browseUrlEvent);
+      }, providersBackstage, [], ['tox-browse-url']));
+      var controlHWrapper = function () {
+        return {
+          dom: {
+            tag: 'div',
+            classes: ['tox-form__controls-h-stack']
+          },
+          components: flatten([
+            [memUrlBox.asSpec()],
+            optUrlPicker.map(function () {
+              return memUrlPickerButton.asSpec();
+            }).toArray()
+          ])
+        };
+      };
+      var openUrlPicker = function (comp) {
+        Composing.getCurrent(comp).each(function (field) {
+          var componentData = Representing.getValue(field);
+          var urlData = __assign({ fieldname: spec.name }, componentData);
+          optUrlPicker.each(function (picker) {
+            picker(urlData).get(function (chosenData) {
+              Representing.setValue(field, chosenData);
+              emitWith(comp, formChangeEvent, { name: spec.name });
+            });
+          });
+        });
+      };
+      return FormField.sketch({
+        dom: renderFormFieldDom(),
+        components: pLabel.toArray().concat([controlHWrapper()]),
+        fieldBehaviours: derive$1([
+          Disabling.config({
+            disabled: function () {
+              return spec.disabled || providersBackstage.isReadOnly();
+            },
+            onDisabled: function (comp) {
+              FormField.getField(comp).each(Disabling.disable);
+              memUrlPickerButton.getOpt(comp).each(Disabling.disable);
+            },
+            onEnabled: function (comp) {
+              FormField.getField(comp).each(Disabling.enable);
+              memUrlPickerButton.getOpt(comp).each(Disabling.enable);
+            }
+          }),
+          receivingConfig(),
+          config('url-input-events', [run(browseUrlEvent, openUrlPicker)])
+        ])
+      });
+    };
+
+    var renderCheckbox = function (spec, providerBackstage) {
+      var repBehaviour = Representing.config({
+        store: {
+          mode: 'manual',
+          getValue: function (comp) {
+            var el = comp.element().dom();
+            return el.checked;
+          },
+          setValue: function (comp, value) {
+            var el = comp.element().dom();
+            el.checked = value;
+          }
+        }
+      });
+      var toggleCheckboxHandler = function (comp) {
+        comp.element().dom().click();
+        return Option.some(true);
+      };
+      var pField = FormField.parts().field({
+        factory: { sketch: identity },
+        dom: {
+          tag: 'input',
+          classes: ['tox-checkbox__input'],
+          attributes: { type: 'checkbox' }
+        },
+        behaviours: derive$1([
+          ComposingConfigs.self(),
+          Disabling.config({
+            disabled: function () {
+              return spec.disabled || providerBackstage.isReadOnly();
+            }
+          }),
+          Tabstopping.config({}),
+          Focusing.config({}),
+          repBehaviour,
+          Keying.config({
+            mode: 'special',
+            onEnter: toggleCheckboxHandler,
+            onSpace: toggleCheckboxHandler,
+            stopSpaceKeyup: true
+          }),
+          config('checkbox-events', [run(change(), function (component, _) {
+              emitWith(component, formChangeEvent, { name: spec.name });
+            })])
+        ])
+      });
+      var pLabel = FormField.parts().label({
+        dom: {
+          tag: 'span',
+          classes: ['tox-checkbox__label'],
+          innerHtml: providerBackstage.translate(spec.label)
+        },
+        behaviours: derive$1([Unselecting.config({})])
+      });
+      var makeIcon = function (className) {
+        var iconName = className === 'checked' ? 'selected' : 'unselected';
+        return {
+          dom: {
+            tag: 'span',
+            classes: [
+              'tox-icon',
+              'tox-checkbox-icon__' + className
+            ],
+            innerHtml: get$d(iconName, providerBackstage.icons)
+          }
+        };
+      };
+      var memIcons = record({
+        dom: {
+          tag: 'div',
+          classes: ['tox-checkbox__icons']
+        },
+        components: [
+          makeIcon('checked'),
+          makeIcon('unchecked')
+        ]
+      });
+      return FormField.sketch({
+        dom: {
+          tag: 'label',
+          classes: ['tox-checkbox']
+        },
+        components: [
+          pField,
+          memIcons.asSpec(),
+          pLabel
+        ],
+        fieldBehaviours: derive$1([
+          Disabling.config({
+            disabled: function () {
+              return spec.disabled || providerBackstage.isReadOnly();
+            },
+            disableClass: 'tox-checkbox--disabled',
+            onDisabled: function (comp) {
+              FormField.getField(comp).each(Disabling.disable);
+            },
+            onEnabled: function (comp) {
+              FormField.getField(comp).each(Disabling.enable);
+            }
+          }),
+          receivingConfig()
+        ])
+      });
+    };
+
+    var renderHtmlPanel = function (spec) {
+      if (spec.presets === 'presentation') {
+        return Container.sketch({
+          dom: {
+            tag: 'div',
+            classes: ['tox-form__group'],
+            innerHtml: spec.html
+          }
+        });
+      } else {
+        return Container.sketch({
+          dom: {
+            tag: 'div',
+            classes: ['tox-form__group'],
+            innerHtml: spec.html,
+            attributes: { role: 'document' }
+          },
+          containerBehaviours: derive$1([
+            Tabstopping.config({}),
+            Focusing.config({})
+          ])
+        });
+      }
+    };
+
+    var renderLabel$2 = function (spec, backstageShared) {
+      var label = {
+        dom: {
+          tag: 'label',
+          innerHtml: backstageShared.providers.translate(spec.label),
+          classes: ['tox-label']
+        }
+      };
+      var comps = map(spec.items, backstageShared.interpreter);
+      return {
+        dom: {
+          tag: 'div',
+          classes: ['tox-form__group']
+        },
+        components: [label].concat(comps),
+        behaviours: derive$1([
+          ComposingConfigs.self(),
+          Replacing.config({}),
+          RepresentingConfigs.domHtml(Option.none()),
+          Keying.config({ mode: 'acyclic' })
+        ])
+      };
+    };
+
+    var renderCollection = function (spec, providersBackstage) {
+      var pLabel = spec.label.map(function (label) {
+        return renderLabel(label, providersBackstage);
+      });
+      var runOnItem = function (f) {
+        return function (comp, se) {
+          closest$3(se.event().target(), '[data-collection-item-value]').each(function (target) {
+            f(comp, se, target, get$2(target, 'data-collection-item-value'));
+          });
+        };
+      };
+      var escapeAttribute = function (ch) {
+        if (ch === '"') {
+          return '&quot;';
+        }
+        return ch;
+      };
+      var setContents = function (comp, items) {
+        var htmlLines = map(items, function (item) {
+          var itemText = global$5.translate(item.text);
+          var textContent = spec.columns === 1 ? '<div class="tox-collection__item-label">' + itemText + '</div>' : '';
+          var iconContent = '<div class="tox-collection__item-icon">' + item.icon + '</div>';
+          var mapItemName = {
+            '_': ' ',
+            ' - ': ' ',
+            '-': ' '
+          };
+          var ariaLabel = itemText.replace(/\_| \- |\-/g, function (match) {
+            return mapItemName[match];
+          });
+          var readonlyClass = providersBackstage.isReadOnly() ? ' tox-collection__item--state-disabled' : '';
+          return '<div class="tox-collection__item' + readonlyClass + '" tabindex="-1" data-collection-item-value="' + escapeAttribute(item.value) + '" title="' + ariaLabel + '" aria-label="' + ariaLabel + '">' + iconContent + textContent + '</div>';
+        });
+        var chunks = spec.columns > 1 && spec.columns !== 'auto' ? chunk(htmlLines, spec.columns) : [htmlLines];
+        var html = map(chunks, function (ch) {
+          return '<div class="tox-collection__group">' + ch.join('') + '</div>';
+        });
+        set(comp.element(), html.join(''));
+      };
+      var onClick = runOnItem(function (comp, se, tgt, itemValue) {
+        se.stop();
+        if (!providersBackstage.isReadOnly()) {
+          emitWith(comp, formActionEvent, {
+            name: spec.name,
+            value: itemValue
+          });
+        }
+      });
+      var collectionEvents = [
+        run(mouseover(), runOnItem(function (comp, se, tgt) {
+          focus$1(tgt);
+        })),
+        run(click(), onClick),
+        run(tap(), onClick),
+        run(focusin(), runOnItem(function (comp, se, tgt) {
+          descendant$1(comp.element(), '.' + activeClass).each(function (currentActive) {
+            remove$4(currentActive, activeClass);
+          });
+          add$2(tgt, activeClass);
+        })),
+        run(focusout(), runOnItem(function (comp) {
+          descendant$1(comp.element(), '.' + activeClass).each(function (currentActive) {
+            remove$4(currentActive, activeClass);
+          });
+        })),
+        runOnExecute(runOnItem(function (comp, se, tgt, itemValue) {
+          emitWith(comp, formActionEvent, {
+            name: spec.name,
+            value: itemValue
+          });
+        }))
+      ];
+      var iterCollectionItems = function (comp, applyAttributes) {
+        return map(descendants(comp.element(), '.tox-collection__item'), applyAttributes);
+      };
+      var pField = FormField.parts().field({
+        dom: {
+          tag: 'div',
+          classes: ['tox-collection'].concat(spec.columns !== 1 ? ['tox-collection--grid'] : ['tox-collection--list'])
+        },
+        components: [],
+        factory: { sketch: identity },
+        behaviours: derive$1([
+          Disabling.config({
+            disabled: providersBackstage.isReadOnly,
+            onDisabled: function (comp) {
+              iterCollectionItems(comp, function (childElm) {
+                add$2(childElm, 'tox-collection__item--state-disabled');
+                set$1(childElm, 'aria-disabled', true);
+              });
+            },
+            onEnabled: function (comp) {
+              iterCollectionItems(comp, function (childElm) {
+                remove$4(childElm, 'tox-collection__item--state-disabled');
+                remove$1(childElm, 'aria-disabled');
+              });
+            }
+          }),
+          receivingConfig(),
+          Replacing.config({}),
+          Representing.config({
+            store: {
+              mode: 'memory',
+              initialValue: []
+            },
+            onSetValue: function (comp, items) {
+              setContents(comp, items);
+              if (spec.columns === 'auto') {
+                detectSize(comp, 5, 'tox-collection__item').each(function (_a) {
+                  var numRows = _a.numRows, numColumns = _a.numColumns;
+                  Keying.setGridSize(comp, numRows, numColumns);
+                });
+              }
+              emit(comp, formResizeEvent);
+            }
+          }),
+          Tabstopping.config({}),
+          Keying.config(deriveCollectionMovement(spec.columns, 'normal')),
+          config('collection-events', collectionEvents)
+        ]),
+        eventOrder: {
+          'alloy.execute': [
+            'disabling',
+            'alloy.base.behaviour',
+            'collection-events'
+          ]
+        }
+      });
+      var extraClasses = ['tox-form__group--collection'];
+      return renderFormFieldWith(pLabel, pField, extraClasses, []);
+    };
+
+    var renderTable = function (spec, providersBackstage) {
+      var renderTh = function (text) {
+        return {
+          dom: {
+            tag: 'th',
+            innerHtml: providersBackstage.translate(text)
+          }
+        };
+      };
+      var renderHeader = function (header) {
+        return {
+          dom: { tag: 'thead' },
+          components: [{
+              dom: { tag: 'tr' },
+              components: map(header, renderTh)
+            }]
+        };
+      };
+      var renderTd = function (text) {
+        return {
+          dom: {
+            tag: 'td',
+            innerHtml: providersBackstage.translate(text)
+          }
+        };
+      };
+      var renderTr = function (row) {
+        return {
+          dom: { tag: 'tr' },
+          components: map(row, renderTd)
+        };
+      };
+      var renderRows = function (rows) {
+        return {
+          dom: { tag: 'tbody' },
+          components: map(rows, renderTr)
+        };
+      };
+      return {
+        dom: {
+          tag: 'table',
+          classes: ['tox-dialog__table']
+        },
+        components: [
+          renderHeader(spec.header),
+          renderRows(spec.cells)
+        ],
+        behaviours: derive$1([
+          Tabstopping.config({}),
+          Focusing.config({})
+        ])
+      };
+    };
+
+    var renderPanel = function (spec, backstage) {
+      return {
+        dom: {
+          tag: 'div',
+          classes: spec.classes
+        },
+        components: map(spec.items, backstage.shared.interpreter)
+      };
+    };
+
+    var make$6 = function (render) {
+      return function (parts, spec, backstage) {
+        return get(spec, 'name').fold(function () {
+          return render(spec, backstage);
+        }, function (fieldName) {
+          return parts.field(fieldName, render(spec, backstage));
+        });
+      };
+    };
+    var makeIframe = function (render) {
+      return function (parts, spec, backstage) {
+        var iframeSpec = deepMerge(spec, { source: 'dynamic' });
+        return make$6(render)(parts, iframeSpec, backstage);
+      };
+    };
+    var factories = {
+      bar: make$6(function (spec, backstage) {
+        return renderBar(spec, backstage.shared);
+      }),
+      collection: make$6(function (spec, backstage) {
+        return renderCollection(spec, backstage.shared.providers);
+      }),
+      alertbanner: make$6(function (spec, backstage) {
+        return renderAlertBanner(spec, backstage.shared.providers);
+      }),
+      input: make$6(function (spec, backstage) {
+        return renderInput(spec, backstage.shared.providers);
+      }),
+      textarea: make$6(function (spec, backstage) {
+        return renderTextarea(spec, backstage.shared.providers);
+      }),
+      label: make$6(function (spec, backstage) {
+        return renderLabel$2(spec, backstage.shared);
+      }),
+      iframe: makeIframe(function (spec, backstage) {
+        return renderIFrame(spec, backstage.shared.providers);
+      }),
+      button: make$6(function (spec, backstage) {
+        return renderDialogButton(spec, backstage.shared.providers);
+      }),
+      checkbox: make$6(function (spec, backstage) {
+        return renderCheckbox(spec, backstage.shared.providers);
+      }),
+      colorinput: make$6(function (spec, backstage) {
+        return renderColorInput(spec, backstage.shared, backstage.colorinput);
+      }),
+      colorpicker: make$6(renderColorPicker),
+      dropzone: make$6(function (spec, backstage) {
+        return renderDropZone(spec, backstage.shared.providers);
+      }),
+      grid: make$6(function (spec, backstage) {
+        return renderGrid(spec, backstage.shared);
+      }),
+      selectbox: make$6(function (spec, backstage) {
+        return renderSelectBox(spec, backstage.shared.providers);
+      }),
+      sizeinput: make$6(function (spec, backstage) {
+        return renderSizeInput(spec, backstage.shared.providers);
+      }),
+      urlinput: make$6(function (spec, backstage) {
+        return renderUrlInput(spec, backstage, backstage.urlinput);
+      }),
+      customeditor: make$6(renderCustomEditor),
+      htmlpanel: make$6(renderHtmlPanel),
+      imagetools: make$6(function (spec, backstage) {
+        return renderImageTools(spec, backstage.shared.providers);
+      }),
+      table: make$6(function (spec, backstage) {
+        return renderTable(spec, backstage.shared.providers);
+      }),
+      panel: make$6(function (spec, backstage) {
+        return renderPanel(spec, backstage);
+      })
+    };
+    var noFormParts = {
+      field: function (_name, spec) {
+        return spec;
+      }
+    };
+    var interpretInForm = function (parts, spec, oldBackstage) {
+      var newBackstage = deepMerge(oldBackstage, {
+        shared: {
+          interpreter: function (childSpec) {
+            return interpretParts(parts, childSpec, newBackstage);
+          }
+        }
+      });
+      return interpretParts(parts, spec, newBackstage);
+    };
+    var interpretParts = function (parts, spec, backstage) {
+      return get(factories, spec.type).fold(function () {
+        domGlobals.console.error('Unknown factory type "' + spec.type + '", defaulting to container: ', spec);
+        return spec;
+      }, function (factory) {
+        return factory(parts, spec, backstage);
+      });
+    };
+    var interpretWithoutForm = function (spec, backstage) {
+      var parts = noFormParts;
+      return interpretParts(parts, spec, backstage);
+    };
+
+    var bubbleAlignments = {
+      valignCentre: [],
+      alignCentre: [],
+      alignLeft: [],
+      alignRight: [],
+      right: [],
+      left: [],
+      bottom: [],
+      top: []
+    };
+    var getInlineDialogAnchor = function (contentAreaElement, lazyAnchorbar, lazyUseEditableAreaAnchor) {
+      var bubble = nu$8(-12, 12, bubbleAlignments);
+      var overrides = { maxHeightFunction: expandable() };
+      var editableAreaAnchor = function () {
+        return {
+          anchor: 'node',
+          root: getBody(owner(contentAreaElement())),
+          node: Option.from(contentAreaElement()),
+          bubble: bubble,
+          layouts: {
+            onRtl: function () {
+              return [northwest$3];
+            },
+            onLtr: function () {
+              return [northeast$3];
+            }
+          },
+          overrides: overrides
+        };
+      };
+      var standardAnchor = function () {
+        return {
+          anchor: 'hotspot',
+          hotspot: lazyAnchorbar(),
+          bubble: bubble,
+          layouts: {
+            onRtl: function () {
+              return [southeast$1];
+            },
+            onLtr: function () {
+              return [southwest$1];
+            }
+          },
+          overrides: overrides
+        };
+      };
+      return function () {
+        return lazyUseEditableAreaAnchor() ? editableAreaAnchor() : standardAnchor();
+      };
+    };
+    var getBannerAnchor = function (contentAreaElement, lazyAnchorbar, lazyUseEditableAreaAnchor) {
+      var editableAreaAnchor = function () {
+        return {
+          anchor: 'node',
+          root: getBody(owner(contentAreaElement())),
+          node: Option.from(contentAreaElement()),
+          layouts: {
+            onRtl: function () {
+              return [north$3];
+            },
+            onLtr: function () {
+              return [north$3];
+            }
+          }
+        };
+      };
+      var standardAnchor = function () {
+        return {
+          anchor: 'hotspot',
+          hotspot: lazyAnchorbar(),
+          layouts: {
+            onRtl: function () {
+              return [south$1];
+            },
+            onLtr: function () {
+              return [south$1];
+            }
+          }
+        };
+      };
+      return function () {
+        return lazyUseEditableAreaAnchor() ? editableAreaAnchor() : standardAnchor();
+      };
+    };
+    var getCursorAnchor = function (editor, bodyElement) {
+      return function () {
+        return {
+          anchor: 'selection',
+          root: bodyElement(),
+          getSelection: function () {
+            var rng = editor.selection.getRng();
+            return Option.some(Selection.range(Element.fromDom(rng.startContainer), rng.startOffset, Element.fromDom(rng.endContainer), rng.endOffset));
+          }
+        };
+      };
+    };
+    var getNodeAnchor = function (bodyElement) {
+      return function (element) {
+        return {
+          anchor: 'node',
+          root: bodyElement(),
+          node: element
+        };
+      };
+    };
+    var getAnchors = function (editor, lazyAnchorbar, isToolbarTop) {
+      var useFixedToolbarContainer = useFixedContainer(editor);
+      var bodyElement = function () {
+        return Element.fromDom(editor.getBody());
+      };
+      var contentAreaElement = function () {
+        return Element.fromDom(editor.getContentAreaContainer());
+      };
+      var lazyUseEditableAreaAnchor = function () {
+        return useFixedToolbarContainer || !isToolbarTop();
+      };
+      return {
+        inlineDialog: getInlineDialogAnchor(contentAreaElement, lazyAnchorbar, lazyUseEditableAreaAnchor),
+        banner: getBannerAnchor(contentAreaElement, lazyAnchorbar, lazyUseEditableAreaAnchor),
+        cursor: getCursorAnchor(editor, bodyElement),
+        node: getNodeAnchor(bodyElement)
+      };
+    };
+
+    var colorPicker = function (editor) {
+      return function (callback, value) {
+        var dialog = colorPickerDialog(editor);
+        dialog(callback, value);
+      };
+    };
+    var hasCustomColors$1 = function (editor) {
+      return function () {
+        return hasCustomColors(editor);
+      };
+    };
+    var getColors$2 = function (editor) {
+      return function () {
+        return getColors(editor);
+      };
+    };
+    var getColorCols$2 = function (editor) {
+      return function () {
+        return getColorCols$1(editor);
+      };
+    };
+    var ColorInputBackstage = function (editor) {
+      return {
+        colorPicker: colorPicker(editor),
+        hasCustomColors: hasCustomColors$1(editor),
+        getColors: getColors$2(editor),
+        getColorCols: getColorCols$2(editor)
+      };
+    };
+
+    var isDraggableModal$1 = function (editor) {
+      return function () {
+        return isDraggableModal(editor);
+      };
+    };
+    var DialogBackstage = function (editor) {
+      return { isDraggableModal: isDraggableModal$1(editor) };
+    };
+
+    var HeaderBackstage = function (editor) {
+      var mode = Cell(isToolbarLocationBottom(editor) ? 'bottom' : 'top');
+      return {
+        isPositionedAtTop: function () {
+          return mode.get() === 'top';
+        },
+        getDockingMode: mode.get,
+        setDockingMode: mode.set
+      };
+    };
+
+    var defaultStyleFormats = [
+      {
+        title: 'Headings',
+        items: [
+          {
+            title: 'Heading 1',
+            format: 'h1'
+          },
+          {
+            title: 'Heading 2',
+            format: 'h2'
+          },
+          {
+            title: 'Heading 3',
+            format: 'h3'
+          },
+          {
+            title: 'Heading 4',
+            format: 'h4'
+          },
+          {
+            title: 'Heading 5',
+            format: 'h5'
+          },
+          {
+            title: 'Heading 6',
+            format: 'h6'
+          }
+        ]
+      },
+      {
+        title: 'Inline',
+        items: [
+          {
+            title: 'Bold',
+            format: 'bold'
+          },
+          {
+            title: 'Italic',
+            format: 'italic'
+          },
+          {
+            title: 'Underline',
+            format: 'underline'
+          },
+          {
+            title: 'Strikethrough',
+            format: 'strikethrough'
+          },
+          {
+            title: 'Superscript',
+            format: 'superscript'
+          },
+          {
+            title: 'Subscript',
+            format: 'subscript'
+          },
+          {
+            title: 'Code',
+            format: 'code'
+          }
+        ]
+      },
+      {
+        title: 'Blocks',
+        items: [
+          {
+            title: 'Paragraph',
+            format: 'p'
+          },
+          {
+            title: 'Blockquote',
+            format: 'blockquote'
+          },
+          {
+            title: 'Div',
+            format: 'div'
+          },
+          {
+            title: 'Pre',
+            format: 'pre'
+          }
+        ]
+      },
+      {
+        title: 'Align',
+        items: [
+          {
+            title: 'Left',
+            format: 'alignleft'
+          },
+          {
+            title: 'Center',
+            format: 'aligncenter'
+          },
+          {
+            title: 'Right',
+            format: 'alignright'
+          },
+          {
+            title: 'Justify',
+            format: 'alignjustify'
+          }
+        ]
+      }
+    ];
+    var isNestedFormat = function (format) {
+      return has(format, 'items');
+    };
+    var isBlockFormat = function (format) {
+      return has(format, 'block');
+    };
+    var isInlineFormat = function (format) {
+      return has(format, 'inline');
+    };
+    var isSelectorFormat = function (format) {
+      return has(format, 'selector');
+    };
+    var mapFormats = function (userFormats) {
+      return foldl(userFormats, function (acc, fmt) {
+        if (isNestedFormat(fmt)) {
+          var result = mapFormats(fmt.items);
+          return {
+            customFormats: acc.customFormats.concat(result.customFormats),
+            formats: acc.formats.concat([{
+                title: fmt.title,
+                items: result.formats
+              }])
+          };
+        } else if (isInlineFormat(fmt) || isBlockFormat(fmt) || isSelectorFormat(fmt)) {
+          var formatName = 'custom-' + fmt.title.toLowerCase();
+          return {
+            customFormats: acc.customFormats.concat([{
+                name: formatName,
+                format: fmt
+              }]),
+            formats: acc.formats.concat([{
+                title: fmt.title,
+                format: formatName,
+                icon: fmt.icon
+              }])
+          };
+        } else {
+          return __assign(__assign({}, acc), { formats: acc.formats.concat(fmt) });
+        }
+      }, {
+        customFormats: [],
+        formats: []
+      });
+    };
+    var registerCustomFormats = function (editor, userFormats) {
+      var result = mapFormats(userFormats);
+      var registerFormats = function (customFormats) {
+        each(customFormats, function (fmt) {
+          if (!editor.formatter.has(fmt.name)) {
+            editor.formatter.register(fmt.name, fmt.format);
+          }
+        });
+      };
+      if (editor.formatter) {
+        registerFormats(result.customFormats);
+      } else {
+        editor.on('init', function () {
+          registerFormats(result.customFormats);
+        });
+      }
+      return result.formats;
+    };
+    var getStyleFormats = function (editor) {
+      return getUserStyleFormats(editor).map(function (userFormats) {
+        var registeredUserFormats = registerCustomFormats(editor, userFormats);
+        return isMergeStyleFormats(editor) ? defaultStyleFormats.concat(registeredUserFormats) : registeredUserFormats;
+      }).getOr(defaultStyleFormats);
+    };
+
+    var processBasic = function (item, isSelectedFor, getPreviewFor) {
+      var formatterSpec = {
+        type: 'formatter',
+        isSelected: isSelectedFor(item.format),
+        getStylePreview: getPreviewFor(item.format)
+      };
+      return deepMerge(item, formatterSpec);
+    };
+    var register$3 = function (editor, formats, isSelectedFor, getPreviewFor) {
+      var enrichSupported = function (item) {
+        return processBasic(item, isSelectedFor, getPreviewFor);
+      };
+      var enrichMenu = function (item) {
+        var submenuSpec = { type: 'submenu' };
+        return deepMerge(item, submenuSpec);
+      };
+      var enrichCustom = function (item) {
+        var formatName = generate$1(item.title);
+        var customSpec = {
+          type: 'formatter',
+          format: formatName,
+          isSelected: isSelectedFor(formatName),
+          getStylePreview: getPreviewFor(formatName)
+        };
+        var newItem = deepMerge(item, customSpec);
+        editor.formatter.register(formatName, newItem);
+        return newItem;
+      };
+      var doEnrich = function (items) {
+        return map(items, function (item) {
+          var keys$1 = keys(item);
+          if (hasNonNullableKey(item, 'items')) {
+            var newItems_1 = doEnrich(item.items);
+            return deepMerge(enrichMenu(item), {
+              getStyleItems: function () {
+                return newItems_1;
+              }
+            });
+          } else if (hasNonNullableKey(item, 'format')) {
+            return enrichSupported(item);
+          } else if (keys$1.length === 1 && contains(keys$1, 'title')) {
+            return deepMerge(item, { type: 'separator' });
+          } else {
+            return enrichCustom(item);
+          }
+        });
+      };
+      return doEnrich(formats);
+    };
+
+    var init$7 = function (editor) {
+      var isSelectedFor = function (format) {
+        return function () {
+          return editor.formatter.match(format);
+        };
+      };
+      var getPreviewFor = function (format) {
+        return function () {
+          var fmt = editor.formatter.get(format);
+          return fmt !== undefined ? Option.some({
+            tag: fmt.length > 0 ? fmt[0].inline || fmt[0].block || 'div' : 'div',
+            styles: editor.dom.parseStyle(editor.formatter.getCssText(format))
+          }) : Option.none();
+        };
+      };
+      var flatten = function (fmt) {
+        var subs = fmt.items;
+        return subs !== undefined && subs.length > 0 ? bind(subs, flatten) : [fmt.format];
+      };
+      var settingsFormats = Cell([]);
+      var settingsFlattenedFormats = Cell([]);
+      var eventsFormats = Cell([]);
+      var eventsFlattenedFormats = Cell([]);
+      var replaceSettings = Cell(false);
+      editor.on('PreInit', function (_e) {
+        var formats = getStyleFormats(editor);
+        var enriched = register$3(editor, formats, isSelectedFor, getPreviewFor);
+        settingsFormats.set(enriched);
+        settingsFlattenedFormats.set(bind(enriched, flatten));
+      });
+      editor.on('addStyleModifications', function (e) {
+        var modifications = register$3(editor, e.items, isSelectedFor, getPreviewFor);
+        eventsFormats.set(modifications);
+        replaceSettings.set(e.replace);
+        eventsFlattenedFormats.set(bind(modifications, flatten));
+      });
+      var getData = function () {
+        var fromSettings = replaceSettings.get() ? [] : settingsFormats.get();
+        var fromEvents = eventsFormats.get();
+        return fromSettings.concat(fromEvents);
+      };
+      var getFlattenedKeys = function () {
+        var fromSettings = replaceSettings.get() ? [] : settingsFlattenedFormats.get();
+        var fromEvents = eventsFlattenedFormats.get();
+        return fromSettings.concat(fromEvents);
+      };
+      return {
+        getData: getData,
+        getFlattenedKeys: getFlattenedKeys
+      };
+    };
+
+    var trim$1 = global$e.trim;
+    var hasContentEditableState = function (value) {
+      return function (node) {
+        if (node && node.nodeType === 1) {
+          if (node.contentEditable === value) {
+            return true;
+          }
+          if (node.getAttribute('data-mce-contenteditable') === value) {
+            return true;
+          }
+        }
+        return false;
+      };
+    };
+    var isContentEditableTrue = hasContentEditableState('true');
+    var isContentEditableFalse = hasContentEditableState('false');
+    var create$8 = function (type, title, url, level, attach) {
+      return {
+        type: type,
+        title: title,
+        url: url,
+        level: level,
+        attach: attach
+      };
+    };
+    var isChildOfContentEditableTrue = function (node) {
+      while (node = node.parentNode) {
+        var value = node.contentEditable;
+        if (value && value !== 'inherit') {
+          return isContentEditableTrue(node);
+        }
+      }
+      return false;
+    };
+    var select = function (selector, root) {
+      return map(descendants(Element.fromDom(root), selector), function (element) {
+        return element.dom();
+      });
+    };
+    var getElementText = function (elm) {
+      return elm.innerText || elm.textContent;
+    };
+    var getOrGenerateId = function (elm) {
+      return elm.id ? elm.id : generate$1('h');
+    };
+    var isAnchor = function (elm) {
+      return elm && elm.nodeName === 'A' && (elm.id || elm.name) !== undefined;
+    };
+    var isValidAnchor = function (elm) {
+      return isAnchor(elm) && isEditable(elm);
+    };
+    var isHeader = function (elm) {
+      return elm && /^(H[1-6])$/.test(elm.nodeName);
+    };
+    var isEditable = function (elm) {
+      return isChildOfContentEditableTrue(elm) && !isContentEditableFalse(elm);
+    };
+    var isValidHeader = function (elm) {
+      return isHeader(elm) && isEditable(elm);
+    };
+    var getLevel = function (elm) {
+      return isHeader(elm) ? parseInt(elm.nodeName.substr(1), 10) : 0;
+    };
+    var headerTarget = function (elm) {
+      var headerId = getOrGenerateId(elm);
+      var attach = function () {
+        elm.id = headerId;
+      };
+      return create$8('header', getElementText(elm), '#' + headerId, getLevel(elm), attach);
+    };
+    var anchorTarget = function (elm) {
+      var anchorId = elm.id || elm.name;
+      var anchorText = getElementText(elm);
+      return create$8('anchor', anchorText ? anchorText : '#' + anchorId, '#' + anchorId, 0, noop);
+    };
+    var getHeaderTargets = function (elms) {
+      return map(filter(elms, isValidHeader), headerTarget);
+    };
+    var getAnchorTargets = function (elms) {
+      return map(filter(elms, isValidAnchor), anchorTarget);
+    };
+    var getTargetElements = function (elm) {
+      var elms = select('h1,h2,h3,h4,h5,h6,a:not([href])', elm);
+      return elms;
+    };
+    var hasTitle = function (target) {
+      return trim$1(target.title).length > 0;
+    };
+    var find$5 = function (elm) {
+      var elms = getTargetElements(elm);
+      return filter(getHeaderTargets(elms).concat(getAnchorTargets(elms)), hasTitle);
+    };
+    var LinkTargets = { find: find$5 };
+
+    var STORAGE_KEY = 'tinymce-url-history';
+    var HISTORY_LENGTH = 5;
+    var isHttpUrl = function (url) {
+      return isString(url) && /^https?/.test(url);
+    };
+    var isArrayOfUrl = function (a) {
+      return isArray(a) && a.length <= HISTORY_LENGTH && forall(a, isHttpUrl);
+    };
+    var isRecordOfUrlArray = function (r) {
+      return isObject(r) && find$1(r, function (value) {
+        return !isArrayOfUrl(value);
+      }).isNone();
+    };
+    var getAllHistory = function () {
+      var unparsedHistory = global$9.getItem(STORAGE_KEY);
+      if (unparsedHistory === null) {
+        return {};
+      }
+      var history;
+      try {
+        history = JSON.parse(unparsedHistory);
+      } catch (e) {
+        if (e instanceof SyntaxError) {
+          domGlobals.console.log('Local storage ' + STORAGE_KEY + ' was not valid JSON', e);
+          return {};
+        }
+        throw e;
+      }
+      if (!isRecordOfUrlArray(history)) {
+        domGlobals.console.log('Local storage ' + STORAGE_KEY + ' was not valid format', history);
+        return {};
+      }
+      return history;
+    };
+    var setAllHistory = function (history) {
+      if (!isRecordOfUrlArray(history)) {
+        throw new Error('Bad format for history:\n' + JSON.stringify(history));
+      }
+      global$9.setItem(STORAGE_KEY, JSON.stringify(history));
+    };
+    var getHistory = function (fileType) {
+      var history = getAllHistory();
+      return Object.prototype.hasOwnProperty.call(history, fileType) ? history[fileType] : [];
+    };
+    var addToHistory = function (url, fileType) {
+      if (!isHttpUrl(url)) {
+        return;
+      }
+      var history = getAllHistory();
+      var items = Object.prototype.hasOwnProperty.call(history, fileType) ? history[fileType] : [];
+      var itemsWithoutUrl = filter(items, function (item) {
+        return item !== url;
+      });
+      history[fileType] = [url].concat(itemsWithoutUrl).slice(0, HISTORY_LENGTH);
+      setAllHistory(history);
+    };
+
+    var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
+    var isTruthy = function (value) {
+      return !!value;
+    };
+    var makeMap = function (value) {
+      return map$1(global$e.makeMap(value, /[, ]/), isTruthy);
+    };
+    var getOpt$1 = function (obj, key) {
+      return hasOwnProperty$2.call(obj, key) ? Option.some(obj[key]) : Option.none();
+    };
+    var getTextSetting = function (settings, name, defaultValue) {
+      var value = getOpt$1(settings, name).getOr(defaultValue);
+      return isString(value) ? Option.some(value) : Option.none();
+    };
+    var getPicker = function (settings) {
+      return Option.some(settings.file_picker_callback).filter(isFunction);
+    };
+    var getPickerTypes = function (settings) {
+      var optFileTypes = Option.some(settings.file_picker_types).filter(isTruthy);
+      var optLegacyTypes = Option.some(settings.file_browser_callback_types).filter(isTruthy);
+      var optTypes = optFileTypes.or(optLegacyTypes).map(makeMap);
+      return getPicker(settings).fold(function () {
+        return false;
+      }, function (_picker) {
+        return optTypes.fold(function () {
+          return true;
+        }, function (types) {
+          return keys(types).length > 0 ? types : false;
+        });
+      });
+    };
+    var getPickerSetting = function (settings, filetype) {
+      var pickerTypes = getPickerTypes(settings);
+      if (isBoolean(pickerTypes)) {
+        return pickerTypes ? getPicker(settings) : Option.none();
+      } else {
+        return pickerTypes[filetype] ? getPicker(settings) : Option.none();
+      }
+    };
+    var getUrlPicker = function (editor, filetype) {
+      return getPickerSetting(editor.settings, filetype).map(function (picker) {
+        return function (entry) {
+          return Future.nu(function (completer) {
+            var handler = function (value, meta) {
+              if (!isString(value)) {
+                throw new Error('Expected value to be string');
+              }
+              if (meta !== undefined && !isObject(meta)) {
+                throw new Error('Expected meta to be a object');
+              }
+              var r = {
+                value: value,
+                meta: meta
+              };
+              completer(r);
+            };
+            var meta = __assign({
+              filetype: filetype,
+              fieldname: entry.fieldname
+            }, Option.from(entry.meta).getOr({}));
+            picker.call(editor, handler, entry.value, meta);
+          });
+        };
+      });
+    };
+    var getLinkInformation = function (editor) {
+      if (editor.settings.typeahead_urls === false) {
+        return Option.none();
+      }
+      return Option.some({
+        targets: LinkTargets.find(editor.getBody()),
+        anchorTop: getTextSetting(editor.settings, 'anchor_top', '#top').getOrUndefined(),
+        anchorBottom: getTextSetting(editor.settings, 'anchor_bottom', '#bottom').getOrUndefined()
+      });
+    };
+    var getValidationHandler = function (editor) {
+      var optValidator = Option.from(editor.settings.file_picker_validator_handler).filter(isFunction);
+      return optValidator.orThunk(function () {
+        return Option.from(editor.settings.filepicker_validator_handler).filter(isFunction);
+      });
+    };
+    var UrlInputBackstage = function (editor) {
+      return {
+        getHistory: getHistory,
+        addToHistory: addToHistory,
+        getLinkInformation: function () {
+          return getLinkInformation(editor);
+        },
+        getValidationHandler: function () {
+          return getValidationHandler(editor);
+        },
+        getUrlPicker: function (filetype) {
+          return getUrlPicker(editor, filetype);
+        }
+      };
+    };
+
+    var init$8 = function (sink, editor, lazyAnchorbar) {
+      var contextMenuState = Cell(false);
+      var toolbar = HeaderBackstage(editor);
+      var backstage = {
+        shared: {
+          providers: {
+            icons: function () {
+              return editor.ui.registry.getAll().icons;
+            },
+            menuItems: function () {
+              return editor.ui.registry.getAll().menuItems;
+            },
+            translate: global$5.translate,
+            isReadOnly: function () {
+              return editor.mode.isReadOnly();
+            }
+          },
+          interpreter: function (s) {
+            return interpretWithoutForm(s, backstage);
+          },
+          anchors: getAnchors(editor, lazyAnchorbar, toolbar.isPositionedAtTop),
+          header: toolbar,
+          getSink: function () {
+            return Result.value(sink);
+          }
+        },
+        urlinput: UrlInputBackstage(editor),
+        styleselect: init$7(editor),
+        colorinput: ColorInputBackstage(editor),
+        dialog: DialogBackstage(editor),
+        isContextMenuOpen: function () {
+          return contextMenuState.get();
+        },
+        setContextMenuState: function (state) {
+          return contextMenuState.set(state);
+        }
+      };
+      return backstage;
+    };
+
+    var expandable$1 = constant(function (element, available) {
+      setMax$1(element, Math.floor(available));
+    });
+
+    var showContextToolbarEvent = 'contexttoolbar-show';
+    var hideContextToolbarEvent = 'contexttoolbar-hide';
+
+    var schema$k = constant([
+      strict$1('items'),
+      markers(['itemSelector']),
+      field$1('tgroupBehaviours', [Keying])
+    ]);
+    var parts$7 = constant([group({
+        name: 'items',
+        unit: 'item'
+      })]);
+
+    var factory$9 = function (detail, components, _spec, _externals) {
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        behaviours: augment(detail.tgroupBehaviours, [Keying.config({
+            mode: 'flow',
+            selector: detail.markers.itemSelector
+          })]),
+        domModification: { attributes: { role: 'toolbar' } }
+      };
+    };
+    var ToolbarGroup = composite$1({
+      name: 'ToolbarGroup',
+      configFields: schema$k(),
+      partFields: parts$7(),
+      factory: factory$9
+    });
+
+    var schema$l = constant([
+      strict$1('dom'),
+      defaulted$1('shell', true),
+      field$1('toolbarBehaviours', [Replacing])
+    ]);
+    var enhanceGroups = function () {
+      return { behaviours: derive$1([Replacing.config({})]) };
+    };
+    var parts$8 = constant([optional({
+        name: 'groups',
+        overrides: enhanceGroups
+      })]);
+
+    var factory$a = function (detail, components, _spec, _externals) {
+      var setGroups = function (toolbar, groups) {
+        getGroupContainer(toolbar).fold(function () {
+          domGlobals.console.error('Toolbar was defined to not be a shell, but no groups container was specified in components');
+          throw new Error('Toolbar was defined to not be a shell, but no groups container was specified in components');
+        }, function (container) {
+          Replacing.set(container, groups);
+        });
+      };
+      var getGroupContainer = function (component) {
+        return detail.shell ? Option.some(component) : getPart(component, detail, 'groups');
+      };
+      var extra = detail.shell ? {
+        behaviours: [Replacing.config({})],
+        components: []
+      } : {
+        behaviours: [],
+        components: components
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: extra.components,
+        behaviours: augment(detail.toolbarBehaviours, extra.behaviours),
+        apis: { setGroups: setGroups },
+        domModification: { attributes: { role: 'group' } }
+      };
+    };
+    var Toolbar = composite$1({
+      name: 'Toolbar',
+      configFields: schema$l(),
+      partFields: parts$8(),
+      factory: factory$a,
+      apis: {
+        setGroups: function (apis, toolbar, groups) {
+          apis.setGroups(toolbar, groups);
+        }
+      }
+    });
+
+    var generate$6 = function (xs, f) {
+      var init = {
+        len: 0,
+        list: []
+      };
+      var r = foldl(xs, function (b, a) {
+        var value = f(a, b.len);
+        return value.fold(constant(b), function (v) {
+          return {
+            len: v.finish(),
+            list: b.list.concat([v])
+          };
+        });
+      }, init);
+      return r.list;
+    };
+
+    var output$1 = function (within, extra, withinWidth) {
+      return {
+        within: constant(within),
+        extra: constant(extra),
+        withinWidth: constant(withinWidth)
+      };
+    };
+    var apportion = function (units, total, len) {
+      var parray = generate$6(units, function (unit, current) {
+        var width = len(unit);
+        return Option.some({
+          element: constant(unit),
+          start: constant(current),
+          finish: constant(current + width),
+          width: constant(width)
+        });
+      });
+      var within = filter(parray, function (unit) {
+        return unit.finish() <= total;
+      });
+      var withinWidth = foldr(within, function (acc, el) {
+        return acc + el.width();
+      }, 0);
+      var extra = parray.slice(within.length);
+      return {
+        within: constant(within),
+        extra: constant(extra),
+        withinWidth: constant(withinWidth)
+      };
+    };
+    var toUnit = function (parray) {
+      return map(parray, function (unit) {
+        return unit.element();
+      });
+    };
+    var fitLast = function (within, extra, withinWidth) {
+      var fits = toUnit(within.concat(extra));
+      return output$1(fits, [], withinWidth);
+    };
+    var overflow = function (within, extra, overflower, withinWidth) {
+      var fits = toUnit(within).concat([overflower]);
+      return output$1(fits, toUnit(extra), withinWidth);
+    };
+    var fitAll = function (within, extra, withinWidth) {
+      return output$1(toUnit(within), [], withinWidth);
+    };
+    var tryFit = function (total, units, len) {
+      var divide = apportion(units, total, len);
+      return divide.extra().length === 0 ? Option.some(divide) : Option.none();
+    };
+    var partition$3 = function (total, units, len, overflower) {
+      var divide = tryFit(total, units, len).getOrThunk(function () {
+        return apportion(units, total - len(overflower), len);
+      });
+      var within = divide.within();
+      var extra = divide.extra();
+      var withinWidth = divide.withinWidth();
+      if (extra.length === 1 && extra[0].width() <= len(overflower)) {
+        return fitLast(within, extra, withinWidth);
+      } else if (extra.length >= 1) {
+        return overflow(within, extra, overflower, withinWidth);
+      } else {
+        return fitAll(within, extra, withinWidth);
+      }
+    };
+
+    var setGroups = function (toolbar, storedGroups) {
+      var bGroups = map(storedGroups, function (g) {
+        return premade$1(g);
+      });
+      Toolbar.setGroups(toolbar, bGroups);
+    };
+    var findFocusedComp = function (comps) {
+      return findMap(comps, function (comp) {
+        return search(comp.element()).bind(function (focusedElm) {
+          return comp.getSystem().getByDom(focusedElm).toOption();
+        });
+      });
+    };
+    var refresh = function (toolbar, detail, setOverflow) {
+      var primary = getPartOrDie(toolbar, detail, 'primary');
+      var overflowGroup = Coupling.getCoupled(toolbar, 'overflowGroup');
+      set$2(primary.element(), 'visibility', 'hidden');
+      var groups = detail.builtGroups.get().concat([overflowGroup]);
+      var focusedComp = findFocusedComp(groups);
+      setOverflow([]);
+      setGroups(primary, groups);
+      var availableWidth = get$7(primary.element());
+      var overflows = partition$3(availableWidth, detail.builtGroups.get(), function (comp) {
+        return get$7(comp.element());
+      }, overflowGroup);
+      if (overflows.extra().length === 0) {
+        Replacing.remove(primary, overflowGroup);
+        setOverflow([]);
+      } else {
+        setGroups(primary, overflows.within());
+        setOverflow(overflows.extra());
+      }
+      remove$6(primary.element(), 'visibility');
+      reflow(primary.element());
+      focusedComp.each(Focusing.focus);
+    };
+
+    var schema$m = constant([
+      field$1('splitToolbarBehaviours', [Coupling]),
+      state$1('builtGroups', function () {
+        return Cell([]);
+      })
+    ]);
+
+    var schema$n = constant([
+      markers(['overflowToggledClass']),
+      optionFunction('getOverflowBounds'),
+      strict$1('lazySink'),
+      state$1('overflowGroups', function () {
+        return Cell([]);
+      })
+    ].concat(schema$m()));
+    var parts$9 = constant([
+      required({
+        factory: Toolbar,
+        schema: schema$l(),
+        name: 'primary'
+      }),
+      external$1({
+        schema: schema$l(),
+        name: 'overflow'
+      }),
+      external$1({ name: 'overflow-button' }),
+      external$1({ name: 'overflow-group' })
+    ]);
+
+    var schema$o = constant([
+      markers(['toggledClass']),
+      strict$1('lazySink'),
+      strictFunction('fetch'),
+      optionFunction('getBounds'),
+      optionObjOf('fireDismissalEventInstead', [defaulted$1('event', dismissRequested())]),
+      schema$1()
+    ]);
+    var parts$a = constant([
+      external$1({
+        name: 'button',
+        overrides: function (detail) {
+          return {
+            dom: { attributes: { 'aria-haspopup': 'true' } },
+            buttonBehaviours: derive$1([Toggling.config({
+                toggleClass: detail.markers.toggledClass,
+                aria: { mode: 'expanded' },
+                toggleOnExecute: false
+              })])
+          };
+        }
+      }),
+      external$1({
+        factory: Toolbar,
+        schema: schema$l(),
+        name: 'toolbar',
+        overrides: function (detail) {
+          return {
+            toolbarBehaviours: derive$1([Keying.config({
+                mode: 'cyclic',
+                onEscape: function (comp) {
+                  getPart(comp, detail, 'button').each(Focusing.focus);
+                  return Option.none();
+                }
+              })])
+          };
+        }
+      })
+    ]);
+
+    var toggle$2 = function (button, externals) {
+      var toolbarSandbox = Coupling.getCoupled(button, 'toolbarSandbox');
+      if (Sandboxing.isOpen(toolbarSandbox)) {
+        Sandboxing.close(toolbarSandbox);
+      } else {
+        Sandboxing.open(toolbarSandbox, externals.toolbar());
+      }
+    };
+    var position$2 = function (button, toolbar, detail, layouts) {
+      var bounds = detail.getBounds.map(function (bounder) {
+        return bounder();
+      });
+      var sink = detail.lazySink(button).getOrDie();
+      Positioning.positionWithinBounds(sink, {
+        anchor: 'hotspot',
+        hotspot: button,
+        layouts: layouts,
+        overrides: { maxWidthFunction: expandable$1() }
+      }, toolbar, bounds);
+    };
+    var setGroups$1 = function (button, toolbar, detail, layouts, groups) {
+      Toolbar.setGroups(toolbar, groups);
+      position$2(button, toolbar, detail, layouts);
+      Toggling.on(button);
+    };
+    var makeSandbox$1 = function (button, spec, detail) {
+      var ariaOwner = manager();
+      var onOpen = function (sandbox, toolbar) {
+        detail.fetch().get(function (groups) {
+          setGroups$1(button, toolbar, detail, spec.layouts, groups);
+          ariaOwner.link(button.element());
+          Keying.focusIn(toolbar);
+        });
+      };
+      var onClose = function () {
+        Toggling.off(button);
+        Focusing.focus(button);
+        ariaOwner.unlink(button.element());
+      };
+      return {
+        dom: {
+          tag: 'div',
+          attributes: { id: ariaOwner.id }
+        },
+        behaviours: derive$1([
+          Keying.config({
+            mode: 'special',
+            onEscape: function (comp) {
+              Sandboxing.close(comp);
+              return Option.some(true);
+            }
+          }),
+          Sandboxing.config({
+            onOpen: onOpen,
+            onClose: onClose,
+            isPartOf: function (container, data, queryElem) {
+              return isPartOf(data, queryElem) || isPartOf(button, queryElem);
+            },
+            getAttachPoint: function () {
+              return detail.lazySink(button).getOrDie();
+            }
+          }),
+          Receiving.config({
+            channels: __assign(__assign({}, receivingChannel(__assign({ isExtraPart: never }, detail.fireDismissalEventInstead.map(function (fe) {
+              return { fireEventInstead: { event: fe.event } };
+            }).getOr({})))), receivingChannel$1({
+              doReposition: function () {
+                Sandboxing.getState(Coupling.getCoupled(button, 'toolbarSandbox')).each(function (toolbar) {
+                  position$2(button, toolbar, detail, spec.layouts);
+                });
+              }
+            }))
+          })
+        ])
+      };
+    };
+    var factory$b = function (detail, components, spec, externals) {
+      return __assign(__assign({}, Button.sketch(__assign(__assign({}, externals.button()), {
+        action: function (button) {
+          toggle$2(button, externals);
+        },
+        buttonBehaviours: SketchBehaviours.augment({ dump: externals.button().buttonBehaviours }, [Coupling.config({
+            others: {
+              toolbarSandbox: function (button) {
+                return makeSandbox$1(button, spec, detail);
+              }
+            }
+          })])
+      }))), {
+        apis: {
+          setGroups: function (button, groups) {
+            Sandboxing.getState(Coupling.getCoupled(button, 'toolbarSandbox')).each(function (toolbar) {
+              setGroups$1(button, toolbar, detail, spec.layouts, groups);
+            });
+          },
+          reposition: function (button) {
+            Sandboxing.getState(Coupling.getCoupled(button, 'toolbarSandbox')).each(function (toolbar) {
+              position$2(button, toolbar, detail, spec.layouts);
+            });
+          },
+          toggle: function (button) {
+            toggle$2(button, externals);
+          },
+          getToolbar: function (button) {
+            return Sandboxing.getState(Coupling.getCoupled(button, 'toolbarSandbox'));
+          }
+        }
+      });
+    };
+    var FloatingToolbarButton = composite$1({
+      name: 'FloatingToolbarButton',
+      factory: factory$b,
+      configFields: schema$o(),
+      partFields: parts$a(),
+      apis: {
+        setGroups: function (apis, button, groups) {
+          apis.setGroups(button, groups);
+        },
+        reposition: function (apis, button) {
+          apis.reposition(button);
+        },
+        toggle: function (apis, button) {
+          apis.toggle(button);
+        },
+        getToolbar: function (apis, button) {
+          return apis.getToolbar(button);
+        }
+      }
+    });
+
+    var buildGroups = function (comps) {
+      return map(comps, function (g) {
+        return premade$1(g);
+      });
+    };
+    var refresh$1 = function (toolbar, memFloatingToolbarButton, detail) {
+      refresh(toolbar, detail, function (overflowGroups) {
+        detail.overflowGroups.set(overflowGroups);
+        memFloatingToolbarButton.getOpt(toolbar).each(function (floatingToolbarButton) {
+          FloatingToolbarButton.setGroups(floatingToolbarButton, buildGroups(overflowGroups));
+        });
+      });
+    };
+    var factory$c = function (detail, components, spec, externals) {
+      var memFloatingToolbarButton = record(FloatingToolbarButton.sketch({
+        fetch: function () {
+          return Future.nu(function (resolve) {
+            resolve(buildGroups(detail.overflowGroups.get()));
+          });
+        },
+        layouts: {
+          onLtr: function () {
+            return [
+              southwest$1,
+              southeast$1
+            ];
+          },
+          onRtl: function () {
+            return [
+              southeast$1,
+              southwest$1
+            ];
+          },
+          onBottomLtr: function () {
+            return [
+              northwest$1,
+              northeast$1
+            ];
+          },
+          onBottomRtl: function () {
+            return [
+              northeast$1,
+              northwest$1
+            ];
+          }
+        },
+        getBounds: spec.getOverflowBounds,
+        lazySink: detail.lazySink,
+        fireDismissalEventInstead: {},
+        markers: { toggledClass: detail.markers.overflowToggledClass },
+        parts: {
+          button: externals['overflow-button'](),
+          toolbar: externals.overflow()
+        }
+      }));
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        behaviours: augment(detail.splitToolbarBehaviours, [Coupling.config({
+            others: {
+              overflowGroup: function () {
+                return ToolbarGroup.sketch(__assign(__assign({}, externals['overflow-group']()), { items: [memFloatingToolbarButton.asSpec()] }));
+              }
+            }
+          })]),
+        apis: {
+          setGroups: function (toolbar, groups) {
+            detail.builtGroups.set(map(groups, toolbar.getSystem().build));
+            refresh$1(toolbar, memFloatingToolbarButton, detail);
+          },
+          refresh: function (toolbar) {
+            return refresh$1(toolbar, memFloatingToolbarButton, detail);
+          },
+          toggle: function (toolbar) {
+            memFloatingToolbarButton.getOpt(toolbar).each(function (floatingToolbarButton) {
+              FloatingToolbarButton.toggle(floatingToolbarButton);
+            });
+          },
+          reposition: function (toolbar) {
+            memFloatingToolbarButton.getOpt(toolbar).each(function (floatingToolbarButton) {
+              FloatingToolbarButton.reposition(floatingToolbarButton);
+            });
+          },
+          getOverflow: function (toolbar) {
+            return memFloatingToolbarButton.getOpt(toolbar).bind(function (floatingToolbarButton) {
+              return FloatingToolbarButton.getToolbar(floatingToolbarButton);
+            });
+          }
+        },
+        domModification: { attributes: { role: 'group' } }
+      };
+    };
+    var SplitFloatingToolbar = composite$1({
+      name: 'SplitFloatingToolbar',
+      configFields: schema$n(),
+      partFields: parts$9(),
+      factory: factory$c,
+      apis: {
+        setGroups: function (apis, toolbar, groups) {
+          apis.setGroups(toolbar, groups);
+        },
+        refresh: function (apis, toolbar) {
+          apis.refresh(toolbar);
+        },
+        reposition: function (apis, toolbar) {
+          apis.reposition(toolbar);
+        },
+        toggle: function (apis, toolbar) {
+          apis.toggle(toolbar);
+        },
+        getOverflow: function (apis, toolbar) {
+          return apis.getOverflow(toolbar);
+        }
+      }
+    });
+
+    var getAnimationRoot = function (component, slideConfig) {
+      return slideConfig.getAnimationRoot.fold(function () {
+        return component.element();
+      }, function (get) {
+        return get(component);
+      });
+    };
+
+    var getDimensionProperty = function (slideConfig) {
+      return slideConfig.dimension.property;
+    };
+    var getDimension = function (slideConfig, elem) {
+      return slideConfig.dimension.getDimension(elem);
+    };
+    var disableTransitions = function (component, slideConfig) {
+      var root = getAnimationRoot(component, slideConfig);
+      remove$5(root, [
+        slideConfig.shrinkingClass,
+        slideConfig.growingClass
+      ]);
+    };
+    var setShrunk = function (component, slideConfig) {
+      remove$4(component.element(), slideConfig.openClass);
+      add$2(component.element(), slideConfig.closedClass);
+      set$2(component.element(), getDimensionProperty(slideConfig), '0px');
+      reflow(component.element());
+    };
+    var setGrown = function (component, slideConfig) {
+      remove$4(component.element(), slideConfig.closedClass);
+      add$2(component.element(), slideConfig.openClass);
+      remove$6(component.element(), getDimensionProperty(slideConfig));
+    };
+    var doImmediateShrink = function (component, slideConfig, slideState, _calculatedSize) {
+      slideState.setCollapsed();
+      set$2(component.element(), getDimensionProperty(slideConfig), getDimension(slideConfig, component.element()));
+      reflow(component.element());
+      disableTransitions(component, slideConfig);
+      setShrunk(component, slideConfig);
+      slideConfig.onStartShrink(component);
+      slideConfig.onShrunk(component);
+    };
+    var doStartShrink = function (component, slideConfig, slideState, calculatedSize) {
+      var size = calculatedSize.getOrThunk(function () {
+        return getDimension(slideConfig, component.element());
+      });
+      slideState.setCollapsed();
+      set$2(component.element(), getDimensionProperty(slideConfig), size);
+      reflow(component.element());
+      var root = getAnimationRoot(component, slideConfig);
+      remove$4(root, slideConfig.growingClass);
+      add$2(root, slideConfig.shrinkingClass);
+      setShrunk(component, slideConfig);
+      slideConfig.onStartShrink(component);
+    };
+    var doStartSmartShrink = function (component, slideConfig, slideState) {
+      var size = getDimension(slideConfig, component.element());
+      var shrinker = size === '0px' ? doImmediateShrink : doStartShrink;
+      shrinker(component, slideConfig, slideState, Option.some(size));
+    };
+    var doStartGrow = function (component, slideConfig, slideState) {
+      var root = getAnimationRoot(component, slideConfig);
+      var wasShrinking = has$2(root, slideConfig.shrinkingClass);
+      var beforeSize = getDimension(slideConfig, component.element());
+      setGrown(component, slideConfig);
+      var fullSize = getDimension(slideConfig, component.element());
+      var startPartialGrow = function () {
+        set$2(component.element(), getDimensionProperty(slideConfig), beforeSize);
+        reflow(component.element());
+      };
+      var startCompleteGrow = function () {
+        setShrunk(component, slideConfig);
+      };
+      var setStartSize = wasShrinking ? startPartialGrow : startCompleteGrow;
+      setStartSize();
+      remove$4(root, slideConfig.shrinkingClass);
+      add$2(root, slideConfig.growingClass);
+      setGrown(component, slideConfig);
+      set$2(component.element(), getDimensionProperty(slideConfig), fullSize);
+      slideState.setExpanded();
+      slideConfig.onStartGrow(component);
+    };
+    var refresh$2 = function (component, slideConfig, slideState) {
+      if (slideState.isExpanded()) {
+        remove$6(component.element(), getDimensionProperty(slideConfig));
+        var fullSize = getDimension(slideConfig, component.element());
+        set$2(component.element(), getDimensionProperty(slideConfig), fullSize);
+      }
+    };
+    var grow = function (component, slideConfig, slideState) {
+      if (!slideState.isExpanded()) {
+        doStartGrow(component, slideConfig, slideState);
+      }
+    };
+    var shrink = function (component, slideConfig, slideState) {
+      if (slideState.isExpanded()) {
+        doStartSmartShrink(component, slideConfig, slideState);
+      }
+    };
+    var immediateShrink = function (component, slideConfig, slideState) {
+      if (slideState.isExpanded()) {
+        doImmediateShrink(component, slideConfig, slideState, Option.none());
+      }
+    };
+    var hasGrown = function (component, slideConfig, slideState) {
+      return slideState.isExpanded();
+    };
+    var hasShrunk = function (component, slideConfig, slideState) {
+      return slideState.isCollapsed();
+    };
+    var isGrowing = function (component, slideConfig, _slideState) {
+      var root = getAnimationRoot(component, slideConfig);
+      return has$2(root, slideConfig.growingClass) === true;
+    };
+    var isShrinking = function (component, slideConfig, _slideState) {
+      var root = getAnimationRoot(component, slideConfig);
+      return has$2(root, slideConfig.shrinkingClass) === true;
+    };
+    var isTransitioning = function (component, slideConfig, slideState) {
+      return isGrowing(component, slideConfig) === true || isShrinking(component, slideConfig) === true;
+    };
+    var toggleGrow = function (component, slideConfig, slideState) {
+      var f = slideState.isExpanded() ? doStartSmartShrink : doStartGrow;
+      f(component, slideConfig, slideState);
+    };
+
+    var SlidingApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        refresh: refresh$2,
+        grow: grow,
+        shrink: shrink,
+        immediateShrink: immediateShrink,
+        hasGrown: hasGrown,
+        hasShrunk: hasShrunk,
+        isGrowing: isGrowing,
+        isShrinking: isShrinking,
+        isTransitioning: isTransitioning,
+        toggleGrow: toggleGrow,
+        disableTransitions: disableTransitions
+    });
+
+    var exhibit$6 = function (base, slideConfig, _slideState) {
+      var expanded = slideConfig.expanded;
+      return expanded ? nu$6({
+        classes: [slideConfig.openClass],
+        styles: {}
+      }) : nu$6({
+        classes: [slideConfig.closedClass],
+        styles: wrap$1(slideConfig.dimension.property, '0px')
+      });
+    };
+    var events$d = function (slideConfig, slideState) {
+      return derive([runOnSource(transitionend(), function (component, simulatedEvent) {
+          var raw = simulatedEvent.event().raw();
+          if (raw.propertyName === slideConfig.dimension.property) {
+            disableTransitions(component, slideConfig);
+            if (slideState.isExpanded()) {
+              remove$6(component.element(), slideConfig.dimension.property);
+            }
+            var notify = slideState.isExpanded() ? slideConfig.onGrown : slideConfig.onShrunk;
+            notify(component);
+          }
+        })]);
+    };
+
+    var ActiveSliding = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        exhibit: exhibit$6,
+        events: events$d
+    });
+
+    var SlidingSchema = [
+      strict$1('closedClass'),
+      strict$1('openClass'),
+      strict$1('shrinkingClass'),
+      strict$1('growingClass'),
+      option('getAnimationRoot'),
+      onHandler('onShrunk'),
+      onHandler('onStartShrink'),
+      onHandler('onGrown'),
+      onHandler('onStartGrow'),
+      defaulted$1('expanded', false),
+      strictOf('dimension', choose$1('property', {
+        width: [
+          output('property', 'width'),
+          output('getDimension', function (elem) {
+            return get$7(elem) + 'px';
+          })
+        ],
+        height: [
+          output('property', 'height'),
+          output('getDimension', function (elem) {
+            return get$6(elem) + 'px';
+          })
+        ]
+      }))
+    ];
+
+    var init$9 = function (spec) {
+      var state = Cell(spec.expanded);
+      var readState = function () {
+        return 'expanded: ' + state.get();
+      };
+      return nu$5({
+        isExpanded: function () {
+          return state.get() === true;
+        },
+        isCollapsed: function () {
+          return state.get() === false;
+        },
+        setCollapsed: curry(state.set, false),
+        setExpanded: curry(state.set, true),
+        readState: readState
+      });
+    };
+
+    var SlidingState = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        init: init$9
+    });
+
+    var Sliding = create$1({
+      fields: SlidingSchema,
+      name: 'sliding',
+      active: ActiveSliding,
+      apis: SlidingApis,
+      state: SlidingState
+    });
+
+    var schema$p = constant([
+      markers([
+        'closedClass',
+        'openClass',
+        'shrinkingClass',
+        'growingClass',
+        'overflowToggledClass'
+      ]),
+      onHandler('onOpened'),
+      onHandler('onClosed')
+    ].concat(schema$m()));
+    var parts$b = constant([
+      required({
+        factory: Toolbar,
+        schema: schema$l(),
+        name: 'primary'
+      }),
+      required({
+        factory: Toolbar,
+        schema: schema$l(),
+        name: 'overflow',
+        overrides: function (detail) {
+          return {
+            toolbarBehaviours: derive$1([
+              Sliding.config({
+                dimension: { property: 'height' },
+                closedClass: detail.markers.closedClass,
+                openClass: detail.markers.openClass,
+                shrinkingClass: detail.markers.shrinkingClass,
+                growingClass: detail.markers.growingClass,
+                onShrunk: function (comp) {
+                  getPart(comp, detail, 'overflow-button').each(function (button) {
+                    Toggling.off(button);
+                    Focusing.focus(button);
+                  });
+                  detail.onClosed(comp);
+                },
+                onGrown: function (comp) {
+                  Keying.focusIn(comp);
+                  detail.onOpened(comp);
+                },
+                onStartGrow: function (comp) {
+                  getPart(comp, detail, 'overflow-button').each(Toggling.on);
+                }
+              }),
+              Keying.config({
+                mode: 'acyclic',
+                onEscape: function (comp) {
+                  getPart(comp, detail, 'overflow-button').each(Focusing.focus);
+                  return Option.some(true);
+                }
+              })
+            ])
+          };
+        }
+      }),
+      external$1({
+        name: 'overflow-button',
+        overrides: function (detail) {
+          return {
+            buttonBehaviours: derive$1([Toggling.config({
+                toggleClass: detail.markers.overflowToggledClass,
+                aria: { mode: 'pressed' },
+                toggleOnExecute: false
+              })])
+          };
+        }
+      }),
+      external$1({ name: 'overflow-group' })
+    ]);
+
+    var toggleToolbar = function (toolbar, detail) {
+      getPart(toolbar, detail, 'overflow').each(function (overf) {
+        refresh$3(toolbar, detail);
+        Sliding.toggleGrow(overf);
+      });
+    };
+    var refresh$3 = function (toolbar, detail) {
+      getPart(toolbar, detail, 'overflow').each(function (overflow) {
+        refresh(toolbar, detail, function (groups) {
+          var builtGroups = map(groups, function (g) {
+            return premade$1(g);
+          });
+          Toolbar.setGroups(overflow, builtGroups);
+        });
+        getPart(toolbar, detail, 'overflow-button').each(function (button) {
+          if (Sliding.hasGrown(overflow)) {
+            Toggling.on(button);
+          }
+        });
+        Sliding.refresh(overflow);
+      });
+    };
+    var factory$d = function (detail, components, spec, externals) {
+      var toolbarToggleEvent = 'alloy.toolbar.toggle';
+      var doSetGroups = function (toolbar, groups) {
+        var built = map(groups, toolbar.getSystem().build);
+        detail.builtGroups.set(built);
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        behaviours: augment(detail.splitToolbarBehaviours, [
+          Coupling.config({
+            others: {
+              overflowGroup: function (toolbar) {
+                return ToolbarGroup.sketch(__assign(__assign({}, externals['overflow-group']()), {
+                  items: [Button.sketch(__assign(__assign({}, externals['overflow-button']()), {
+                      action: function (_button) {
+                        emit(toolbar, toolbarToggleEvent);
+                      }
+                    }))]
+                }));
+              }
+            }
+          }),
+          config('toolbar-toggle-events', [run(toolbarToggleEvent, function (toolbar) {
+              getPart(toolbar, detail, 'overflow').each(function (overf) {
+                refresh$3(toolbar, detail);
+                Sliding.toggleGrow(overf);
+              });
+            })])
+        ]),
+        apis: {
+          setGroups: function (toolbar, groups) {
+            doSetGroups(toolbar, groups);
+            refresh$3(toolbar, detail);
+          },
+          refresh: function (toolbar) {
+            return refresh$3(toolbar, detail);
+          },
+          toggle: function (toolbar) {
+            return toggleToolbar(toolbar, detail);
+          }
+        },
+        domModification: { attributes: { role: 'group' } }
+      };
+    };
+    var SplitSlidingToolbar = composite$1({
+      name: 'SplitSlidingToolbar',
+      configFields: schema$p(),
+      partFields: parts$b(),
+      factory: factory$d,
+      apis: {
+        setGroups: function (apis, toolbar, groups) {
+          apis.setGroups(toolbar, groups);
+        },
+        refresh: function (apis, toolbar) {
+          apis.refresh(toolbar);
+        },
+        toggle: function (apis, toolbar) {
+          apis.toggle(toolbar);
+        }
+      }
+    });
+
+    var toolbarHeightChange = constant(generate$1('toolbar-height-change'));
+
+    var renderToolbarGroupCommon = function (toolbarGroup) {
+      var attributes = toolbarGroup.title.fold(function () {
+        return {};
+      }, function (title) {
+        return { attributes: { title: title } };
+      });
+      return {
+        dom: __assign({
+          tag: 'div',
+          classes: ['tox-toolbar__group']
+        }, attributes),
+        components: [ToolbarGroup.parts().items({})],
+        items: toolbarGroup.items,
+        markers: { itemSelector: '*:not(.tox-split-button) > .tox-tbtn:not([disabled]), ' + '.tox-split-button:not([disabled]), ' + '.tox-toolbar-nav-js:not([disabled])' },
+        tgroupBehaviours: derive$1([
+          Tabstopping.config({}),
+          Focusing.config({})
+        ])
+      };
+    };
+    var renderToolbarGroup = function (toolbarGroup) {
+      return ToolbarGroup.sketch(renderToolbarGroupCommon(toolbarGroup));
+    };
+    var getToolbarbehaviours = function (toolbarSpec, modeName) {
+      var onAttached = runOnAttached(function (component) {
+        var groups = map(toolbarSpec.initGroups, renderToolbarGroup);
+        Toolbar.setGroups(component, groups);
+      });
+      return derive$1([
+        DisablingConfigs.toolbarButton(toolbarSpec.providers.isReadOnly),
+        receivingConfig(),
+        Keying.config({
+          mode: modeName,
+          onEscape: toolbarSpec.onEscape,
+          selector: '.tox-toolbar__group'
+        }),
+        config('toolbar-events', [onAttached])
+      ]);
+    };
+    var renderMoreToolbarCommon = function (toolbarSpec) {
+      var modeName = toolbarSpec.cyclicKeying ? 'cyclic' : 'acyclic';
+      return {
+        uid: toolbarSpec.uid,
+        dom: {
+          tag: 'div',
+          classes: ['tox-toolbar-overlord']
+        },
+        parts: {
+          'overflow-group': renderToolbarGroupCommon({
+            title: Option.none(),
+            items: []
+          }),
+          'overflow-button': renderIconButtonSpec({
+            name: 'more',
+            icon: Option.some('more-drawer'),
+            disabled: false,
+            tooltip: Option.some('More...'),
+            primary: false,
+            borderless: false
+          }, Option.none(), toolbarSpec.providers)
+        },
+        splitToolbarBehaviours: getToolbarbehaviours(toolbarSpec, modeName)
+      };
+    };
+    var renderFloatingMoreToolbar = function (toolbarSpec) {
+      var baseSpec = renderMoreToolbarCommon(toolbarSpec);
+      var overflowXOffset = 4;
+      var primary = SplitFloatingToolbar.parts().primary({
+        dom: {
+          tag: 'div',
+          classes: ['tox-toolbar__primary']
+        }
+      });
+      return SplitFloatingToolbar.sketch(__assign(__assign({}, baseSpec), {
+        lazySink: toolbarSpec.getSink,
+        getOverflowBounds: function () {
+          var headerElem = toolbarSpec.moreDrawerData.lazyHeader().element();
+          var headerBounds = absolute$1(headerElem);
+          var docElem = documentElement(headerElem);
+          var docBounds = absolute$1(docElem);
+          var height = Math.max(docElem.dom().scrollHeight, docBounds.height);
+          return bounds$1(headerBounds.x + overflowXOffset, docBounds.y, headerBounds.width - overflowXOffset * 2, height);
+        },
+        parts: __assign(__assign({}, baseSpec.parts), {
+          overflow: {
+            dom: {
+              tag: 'div',
+              classes: ['tox-toolbar__overflow'],
+              attributes: toolbarSpec.attributes
+            }
+          }
+        }),
+        components: [primary],
+        markers: { overflowToggledClass: 'tox-tbtn--enabled' }
+      }));
+    };
+    var renderSlidingMoreToolbar = function (toolbarSpec) {
+      var primary = SplitSlidingToolbar.parts().primary({
+        dom: {
+          tag: 'div',
+          classes: ['tox-toolbar__primary']
+        }
+      });
+      var overflow = SplitSlidingToolbar.parts().overflow({
+        dom: {
+          tag: 'div',
+          classes: ['tox-toolbar__overflow']
+        }
+      });
+      var baseSpec = renderMoreToolbarCommon(toolbarSpec);
+      return SplitSlidingToolbar.sketch(__assign(__assign({}, baseSpec), {
+        components: [
+          primary,
+          overflow
+        ],
+        markers: {
+          openClass: 'tox-toolbar__overflow--open',
+          closedClass: 'tox-toolbar__overflow--closed',
+          growingClass: 'tox-toolbar__overflow--growing',
+          shrinkingClass: 'tox-toolbar__overflow--shrinking',
+          overflowToggledClass: 'tox-tbtn--enabled'
+        },
+        onOpened: function (comp) {
+          comp.getSystem().broadcastOn([toolbarHeightChange()], { type: 'opened' });
+        },
+        onClosed: function (comp) {
+          comp.getSystem().broadcastOn([toolbarHeightChange()], { type: 'closed' });
+        }
+      }));
+    };
+    var renderToolbar = function (toolbarSpec) {
+      var modeName = toolbarSpec.cyclicKeying ? 'cyclic' : 'acyclic';
+      return Toolbar.sketch({
+        uid: toolbarSpec.uid,
+        dom: {
+          tag: 'div',
+          classes: ['tox-toolbar'].concat(toolbarSpec.type === ToolbarMode.scrolling ? ['tox-toolbar--scrolling'] : [])
+        },
+        components: [Toolbar.parts().groups({})],
+        toolbarBehaviours: getToolbarbehaviours(toolbarSpec, modeName)
+      });
+    };
+
+    var baseToolbarButtonFields = [
+      defaultedBoolean('disabled', false),
+      optionString('tooltip'),
+      optionString('icon'),
+      optionString('text'),
+      defaultedFunction('onSetup', function () {
+        return noop;
+      })
+    ];
+    var toolbarButtonSchema = objOf([
+      strictString('type'),
+      strictFunction('onAction')
+    ].concat(baseToolbarButtonFields));
+    var createToolbarButton = function (spec) {
+      return asRaw('toolbarbutton', toolbarButtonSchema, spec);
+    };
+
+    var baseMenuButtonFields = [
+      optionString('text'),
+      optionString('tooltip'),
+      optionString('icon'),
+      strictFunction('fetch'),
+      defaultedFunction('onSetup', function () {
+        return noop;
+      })
+    ];
+
+    var MenuButtonSchema = objOf(__spreadArrays([strictString('type')], baseMenuButtonFields));
+    var createMenuButton = function (spec) {
+      return asRaw('menubutton', MenuButtonSchema, spec);
+    };
+
+    var splitButtonSchema = objOf([
+      strictString('type'),
+      optionString('tooltip'),
+      optionString('icon'),
+      optionString('text'),
+      optionFunction('select'),
+      strictFunction('fetch'),
+      defaultedFunction('onSetup', function () {
+        return noop;
+      }),
+      defaultedStringEnum('presets', 'normal', [
+        'normal',
+        'color',
+        'listpreview'
+      ]),
+      defaulted$1('columns', 1),
+      strictFunction('onAction'),
+      strictFunction('onItemAction')
+    ]);
+    var createSplitButton = function (spec) {
+      return asRaw('SplitButton', splitButtonSchema, spec);
+    };
+
+    var baseToolbarToggleButtonFields = [defaultedBoolean('active', false)].concat(baseToolbarButtonFields);
+    var toggleButtonSchema = objOf(baseToolbarToggleButtonFields.concat([
+      strictString('type'),
+      strictFunction('onAction')
+    ]));
+    var createToggleButton = function (spec) {
+      return asRaw('ToggleButton', toggleButtonSchema, spec);
+    };
+
+    var groupToolbarButtonSchema = objOf([
+      strictString('type'),
+      strictOf('items', oneOf([
+        arrOfObj$1([
+          strictString('name'),
+          strictArrayOf('items', string)
+        ]),
+        string
+      ]))
+    ].concat(baseToolbarButtonFields));
+    var createGroupToolbarButton = function (spec) {
+      return asRaw('GroupToolbarButton', groupToolbarButtonSchema, spec);
+    };
+
+    var contextBarFields = [
+      defaultedFunction('predicate', function () {
+        return false;
+      }),
+      defaultedStringEnum('scope', 'node', [
+        'node',
+        'editor'
+      ]),
+      defaultedStringEnum('position', 'selection', [
+        'node',
+        'selection',
+        'line'
+      ])
+    ];
+    var contextButtonFields = baseToolbarButtonFields.concat([
+      defaulted$1('type', 'contextformbutton'),
+      defaulted$1('primary', false),
+      strictFunction('onAction'),
+      state$1('original', identity)
+    ]);
+    var contextToggleButtonFields = baseToolbarToggleButtonFields.concat([
+      defaulted$1('type', 'contextformbutton'),
+      defaulted$1('primary', false),
+      strictFunction('onAction'),
+      state$1('original', identity)
+    ]);
+    var launchButtonFields = baseToolbarButtonFields.concat([defaulted$1('type', 'contextformbutton')]);
+    var launchToggleButtonFields = baseToolbarToggleButtonFields.concat([defaulted$1('type', 'contextformtogglebutton')]);
+    var toggleOrNormal = choose$1('type', {
+      contextformbutton: contextButtonFields,
+      contextformtogglebutton: contextToggleButtonFields
+    });
+    var contextFormSchema = objOf([
+      defaulted$1('type', 'contextform'),
+      defaultedFunction('initValue', function () {
+        return '';
+      }),
+      optionString('label'),
+      strictArrayOf('commands', toggleOrNormal),
+      optionOf('launch', choose$1('type', {
+        contextformbutton: launchButtonFields,
+        contextformtogglebutton: launchToggleButtonFields
+      }))
+    ].concat(contextBarFields));
+    var contextToolbarSchema = objOf([
+      defaulted$1('type', 'contexttoolbar'),
+      strictString('items')
+    ].concat(contextBarFields));
+    var createContextToolbar = function (spec) {
+      return asRaw('ContextToolbar', contextToolbarSchema, spec);
+    };
+    var createContextForm = function (spec) {
+      return asRaw('ContextForm', contextFormSchema, spec);
+    };
+
+    var getState$2 = function (component, replaceConfig, reflectState) {
+      return reflectState;
+    };
+
+    var ReflectingApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        getState: getState$2
+    });
+
+    var events$e = function (reflectingConfig, reflectingState) {
+      var update = function (component, data) {
+        reflectingConfig.updateState.each(function (updateState) {
+          var newState = updateState(component, data);
+          reflectingState.set(newState);
+        });
+        reflectingConfig.renderComponents.each(function (renderComponents) {
+          var newComponents = renderComponents(data, reflectingState.get());
+          var newChildren = map(newComponents, component.getSystem().build);
+          replaceChildren(component, newChildren);
+        });
+      };
+      return derive([
+        run(receive(), function (component, message) {
+          var receivingData = message;
+          var channel = reflectingConfig.channel;
+          if (contains(receivingData.channels(), channel)) {
+            update(component, receivingData.data());
+          }
+        }),
+        runOnAttached(function (comp, _se) {
+          reflectingConfig.initialData.each(function (rawData) {
+            update(comp, rawData);
+          });
+        })
+      ]);
+    };
+
+    var ActiveReflecting = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events$e
+    });
+
+    var init$a = function () {
+      var cell = Cell(Option.none());
+      var set = function (optS) {
+        return cell.set(optS);
+      };
+      var clear = function () {
+        return cell.set(Option.none());
+      };
+      var get = function () {
+        return cell.get();
+      };
+      var readState = function () {
+        return cell.get().fold(function () {
+          return 'none';
+        }, function (x) {
+          return x;
+        });
+      };
+      return {
+        readState: readState,
+        get: get,
+        set: set,
+        clear: clear
+      };
+    };
+
+    var ReflectingState = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        init: init$a
+    });
+
+    var ReflectingSchema = [
+      strict$1('channel'),
+      option('renderComponents'),
+      option('updateState'),
+      option('initialData')
+    ];
+
+    var Reflecting = create$1({
+      fields: ReflectingSchema,
+      name: 'reflecting',
+      active: ActiveReflecting,
+      apis: ReflectingApis,
+      state: ReflectingState
+    });
+
+    var schema$q = constant([
+      strict$1('toggleClass'),
+      strict$1('fetch'),
+      onStrictHandler('onExecute'),
+      defaulted$1('getHotspot', Option.some),
+      defaulted$1('getAnchorOverrides', constant({})),
+      schema$1(),
+      onStrictHandler('onItemExecute'),
+      option('lazySink'),
+      strict$1('dom'),
+      onHandler('onOpen'),
+      field$1('splitDropdownBehaviours', [
+        Coupling,
+        Keying,
+        Focusing
+      ]),
+      defaulted$1('matchWidth', false),
+      defaulted$1('useMinWidth', false),
+      defaulted$1('eventOrder', {}),
+      option('role')
+    ].concat(sandboxFields()));
+    var arrowPart = required({
+      factory: Button,
+      schema: [strict$1('dom')],
+      name: 'arrow',
+      defaults: function () {
+        return { buttonBehaviours: derive$1([Focusing.revoke()]) };
+      },
+      overrides: function (detail) {
+        return {
+          dom: {
+            tag: 'span',
+            attributes: { role: 'presentation' }
+          },
+          action: function (arrow) {
+            arrow.getSystem().getByUid(detail.uid).each(emitExecute);
+          },
+          buttonBehaviours: derive$1([Toggling.config({
+              toggleOnExecute: false,
+              toggleClass: detail.toggleClass
+            })])
+        };
+      }
+    });
+    var buttonPart = required({
+      factory: Button,
+      schema: [strict$1('dom')],
+      name: 'button',
+      defaults: function () {
+        return { buttonBehaviours: derive$1([Focusing.revoke()]) };
+      },
+      overrides: function (detail) {
+        return {
+          dom: {
+            tag: 'span',
+            attributes: { role: 'presentation' }
+          },
+          action: function (btn) {
+            btn.getSystem().getByUid(detail.uid).each(function (splitDropdown) {
+              detail.onExecute(splitDropdown, btn);
+            });
+          }
+        };
+      }
+    });
+    var parts$c = constant([
+      arrowPart,
+      buttonPart,
+      optional({
+        factory: {
+          sketch: function (spec) {
+            return {
+              uid: spec.uid,
+              dom: {
+                tag: 'span',
+                styles: { display: 'none' },
+                attributes: { 'aria-hidden': 'true' },
+                innerHtml: spec.text
+              }
+            };
+          }
+        },
+        schema: [strict$1('text')],
+        name: 'aria-descriptor'
+      }),
+      external$1({
+        schema: [tieredMenuMarkers()],
+        name: 'menu',
+        defaults: function (detail) {
+          return {
+            onExecute: function (tmenu, item) {
+              tmenu.getSystem().getByUid(detail.uid).each(function (splitDropdown) {
+                detail.onItemExecute(splitDropdown, tmenu, item);
+              });
+            }
+          };
+        }
+      }),
+      partType()
+    ]);
+
+    var factory$e = function (detail, components, spec, externals) {
+      var switchToMenu = function (sandbox) {
+        Composing.getCurrent(sandbox).each(function (current) {
+          Highlighting.highlightFirst(current);
+          Keying.focusIn(current);
+        });
+      };
+      var action = function (component) {
+        var onOpenSync = switchToMenu;
+        togglePopup(detail, function (x) {
+          return x;
+        }, component, externals, onOpenSync, HighlightOnOpen.HighlightFirst).get(noop);
+      };
+      var openMenu = function (comp) {
+        action(comp);
+        return Option.some(true);
+      };
+      var executeOnButton = function (comp) {
+        var button = getPartOrDie(comp, detail, 'button');
+        emitExecute(button);
+        return Option.some(true);
+      };
+      var buttonEvents = __assign(__assign({}, derive([runOnAttached(function (component, _simulatedEvent) {
+          var ariaDescriptor = getPart(component, detail, 'aria-descriptor');
+          ariaDescriptor.each(function (descriptor) {
+            var descriptorId = generate$1('aria');
+            set$1(descriptor.element(), 'id', descriptorId);
+            set$1(component.element(), 'aria-describedby', descriptorId);
+          });
+        })])), events$7(Option.some(action)));
+      var apis = {
+        repositionMenus: function (comp) {
+          if (Toggling.isOn(comp)) {
+            repositionMenus(comp);
+          }
+        }
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        apis: apis,
+        eventOrder: __assign(__assign({}, detail.eventOrder), {
+          'alloy.execute': [
+            'disabling',
+            'toggling',
+            'alloy.base.behaviour'
+          ]
+        }),
+        events: buttonEvents,
+        behaviours: augment(detail.splitDropdownBehaviours, [
+          Coupling.config({
+            others: {
+              sandbox: function (hotspot) {
+                var arrow = getPartOrDie(hotspot, detail, 'arrow');
+                var extras = {
+                  onOpen: function () {
+                    Toggling.on(arrow);
+                    Toggling.on(hotspot);
+                  },
+                  onClose: function () {
+                    Toggling.off(arrow);
+                    Toggling.off(hotspot);
+                  }
+                };
+                return makeSandbox(detail, hotspot, extras);
+              }
+            }
+          }),
+          Keying.config({
+            mode: 'special',
+            onSpace: executeOnButton,
+            onEnter: executeOnButton,
+            onDown: openMenu
+          }),
+          Focusing.config({}),
+          Toggling.config({
+            toggleOnExecute: false,
+            aria: { mode: 'expanded' }
+          })
+        ]),
+        domModification: {
+          attributes: {
+            'role': detail.role.getOr('button'),
+            'aria-haspopup': true
+          }
+        }
+      };
+    };
+    var SplitDropdown = composite$1({
+      name: 'SplitDropdown',
+      configFields: schema$q(),
+      partFields: parts$c(),
+      factory: factory$e,
+      apis: {
+        repositionMenus: function (apis, comp) {
+          return apis.repositionMenus(comp);
+        }
+      }
+    });
+
+    var getButtonApi = function (component) {
+      return {
+        isDisabled: function () {
+          return Disabling.isDisabled(component);
+        },
+        setDisabled: function (state) {
+          return Disabling.set(component, state);
+        }
+      };
+    };
+    var getToggleApi = function (component) {
+      return {
+        setActive: function (state) {
+          Toggling.set(component, state);
+        },
+        isActive: function () {
+          return Toggling.isOn(component);
+        },
+        isDisabled: function () {
+          return Disabling.isDisabled(component);
+        },
+        setDisabled: function (state) {
+          return Disabling.set(component, state);
+        }
+      };
+    };
+    var getTooltipAttributes = function (tooltip, providersBackstage) {
+      return tooltip.map(function (tooltip) {
+        return {
+          'aria-label': providersBackstage.translate(tooltip),
+          'title': providersBackstage.translate(tooltip)
+        };
+      }).getOr({});
+    };
+    var focusButtonEvent = generate$1('focus-button');
+    var rtlIcon$1 = [
+      'checklist',
+      'ordered-list'
+    ];
+    var rtlTransform$1 = [
+      'indent',
+      'outdent',
+      'table-insert-column-after',
+      'table-insert-column-before',
+      'unordered-list'
+    ];
+    var renderCommonStructure = function (icon, text, tooltip, receiver, behaviours, providersBackstage) {
+      var _d;
+      var getIconName = function (iconName) {
+        return global$5.isRtl() && contains(rtlIcon$1, iconName) ? iconName + '-rtl' : iconName;
+      };
+      var needsRtlClass = global$5.isRtl() && icon.exists(function (name) {
+        return contains(rtlTransform$1, name);
+      });
+      return {
+        dom: {
+          tag: 'button',
+          classes: ['tox-tbtn'].concat(text.isSome() ? ['tox-tbtn--select'] : []).concat(needsRtlClass ? ['tox-tbtn__icon-rtl'] : []),
+          attributes: getTooltipAttributes(tooltip, providersBackstage)
+        },
+        components: componentRenderPipeline([
+          icon.map(function (iconName) {
+            return renderIconFromPack(getIconName(iconName), providersBackstage.icons);
+          }),
+          text.map(function (text) {
+            return renderLabel$1(text, 'tox-tbtn', providersBackstage);
+          })
+        ]),
+        eventOrder: (_d = {}, _d[mousedown()] = [
+          'focusing',
+          'alloy.base.behaviour',
+          'common-button-display-events'
+        ], _d),
+        buttonBehaviours: derive$1([
+          DisablingConfigs.toolbarButton(providersBackstage.isReadOnly),
+          receivingConfig(),
+          config('common-button-display-events', [run(mousedown(), function (button, se) {
+              se.event().prevent();
+              emit(button, focusButtonEvent);
+            })])
+        ].concat(receiver.map(function (r) {
+          return Reflecting.config({
+            channel: r,
+            initialData: {
+              icon: icon,
+              text: text
+            },
+            renderComponents: function (data, _state) {
+              return componentRenderPipeline([
+                data.icon.map(function (iconName) {
+                  return renderIconFromPack(getIconName(iconName), providersBackstage.icons);
+                }),
+                data.text.map(function (text) {
+                  return renderLabel$1(text, 'tox-tbtn', providersBackstage);
+                })
+              ]);
+            }
+          });
+        }).toArray()).concat(behaviours.getOr([])))
+      };
+    };
+    var renderFloatingToolbarButton = function (spec, backstage, identifyButtons, attributes) {
+      var sharedBackstage = backstage.shared;
+      return FloatingToolbarButton.sketch({
+        lazySink: sharedBackstage.getSink,
+        fetch: function () {
+          return Future.nu(function (resolve) {
+            resolve(map(identifyButtons(spec.items), renderToolbarGroup));
+          });
+        },
+        markers: { toggledClass: 'tox-tbtn--enabled' },
+        parts: {
+          button: renderCommonStructure(spec.icon, spec.text, spec.tooltip, Option.none(), Option.none(), sharedBackstage.providers),
+          toolbar: {
+            dom: {
+              tag: 'div',
+              classes: ['tox-toolbar__overflow'],
+              attributes: attributes
+            }
+          }
+        }
+      });
+    };
+    var renderCommonToolbarButton = function (spec, specialisation, providersBackstage) {
+      var editorOffCell = Cell(noop);
+      var structure = renderCommonStructure(spec.icon, spec.text, spec.tooltip, Option.none(), Option.none(), providersBackstage);
+      return Button.sketch({
+        dom: structure.dom,
+        components: structure.components,
+        eventOrder: toolbarButtonEventOrder,
+        buttonBehaviours: derive$1([
+          config('toolbar-button-events', [
+            onToolbarButtonExecute({
+              onAction: spec.onAction,
+              getApi: specialisation.getApi
+            }),
+            onControlAttached(specialisation, editorOffCell),
+            onControlDetached(specialisation, editorOffCell)
+          ]),
+          DisablingConfigs.toolbarButton(function () {
+            return spec.disabled || providersBackstage.isReadOnly();
+          }),
+          receivingConfig()
+        ].concat(specialisation.toolbarButtonBehaviours))
+      });
+    };
+    var renderToolbarButton = function (spec, providersBackstage) {
+      return renderToolbarButtonWith(spec, providersBackstage, []);
+    };
+    var renderToolbarButtonWith = function (spec, providersBackstage, bonusEvents) {
+      return renderCommonToolbarButton(spec, {
+        toolbarButtonBehaviours: [].concat(bonusEvents.length > 0 ? [config('toolbarButtonWith', bonusEvents)] : []),
+        getApi: getButtonApi,
+        onSetup: spec.onSetup
+      }, providersBackstage);
+    };
+    var renderToolbarToggleButton = function (spec, providersBackstage) {
+      return renderToolbarToggleButtonWith(spec, providersBackstage, []);
+    };
+    var renderToolbarToggleButtonWith = function (spec, providersBackstage, bonusEvents) {
+      return deepMerge(renderCommonToolbarButton(spec, {
+        toolbarButtonBehaviours: [
+          Replacing.config({}),
+          Toggling.config({
+            toggleClass: 'tox-tbtn--enabled',
+            aria: { mode: 'pressed' },
+            toggleOnExecute: false
+          })
+        ].concat(bonusEvents.length > 0 ? [config('toolbarToggleButtonWith', bonusEvents)] : []),
+        getApi: getToggleApi,
+        onSetup: spec.onSetup
+      }, providersBackstage));
+    };
+    var fetchChoices = function (getApi, spec, providersBackstage) {
+      return function (comp) {
+        return Future.nu(function (callback) {
+          return spec.fetch(callback);
+        }).map(function (items) {
+          return Option.from(createTieredDataFrom(deepMerge(createPartialChoiceMenu(generate$1('menu-value'), items, function (value) {
+            spec.onItemAction(getApi(comp), value);
+          }, spec.columns, spec.presets, ItemResponse$1.CLOSE_ON_EXECUTE, spec.select.getOr(function () {
+            return false;
+          }), providersBackstage), {
+            movement: deriveMenuMovement(spec.columns, spec.presets),
+            menuBehaviours: SimpleBehaviours.unnamedEvents(spec.columns !== 'auto' ? [] : [runOnAttached(function (comp, _se) {
+                detectSize(comp, 4, classForPreset(spec.presets)).each(function (_d) {
+                  var numRows = _d.numRows, numColumns = _d.numColumns;
+                  Keying.setGridSize(comp, numRows, numColumns);
+                });
+              })])
+          })));
+        });
+      };
+    };
+    var renderSplitButton = function (spec, sharedBackstage) {
+      var _d;
+      var displayChannel = generate$1('channel-update-split-dropdown-display');
+      var getApi = function (comp) {
+        return {
+          isDisabled: function () {
+            return Disabling.isDisabled(comp);
+          },
+          setDisabled: function (state) {
+            return Disabling.set(comp, state);
+          },
+          setIconFill: function (id, value) {
+            descendant$1(comp.element(), 'svg path[id="' + id + '"], rect[id="' + id + '"]').each(function (underlinePath) {
+              set$1(underlinePath, 'fill', value);
+            });
+          },
+          setIconStroke: function (id, value) {
+            descendant$1(comp.element(), 'svg path[id="' + id + '"], rect[id="' + id + '"]').each(function (underlinePath) {
+              set$1(underlinePath, 'stroke', value);
+            });
+          },
+          setActive: function (state) {
+            set$1(comp.element(), 'aria-pressed', state);
+            descendant$1(comp.element(), 'span').each(function (button) {
+              comp.getSystem().getByDom(button).each(function (buttonComp) {
+                return Toggling.set(buttonComp, state);
+              });
+            });
+          },
+          isActive: function () {
+            return descendant$1(comp.element(), 'span').exists(function (button) {
+              return comp.getSystem().getByDom(button).exists(Toggling.isOn);
+            });
+          }
+        };
+      };
+      var editorOffCell = Cell(noop);
+      var specialisation = {
+        getApi: getApi,
+        onSetup: spec.onSetup
+      };
+      return SplitDropdown.sketch({
+        dom: {
+          tag: 'div',
+          classes: ['tox-split-button'],
+          attributes: __assign({ 'aria-pressed': false }, getTooltipAttributes(spec.tooltip, sharedBackstage.providers))
+        },
+        onExecute: function (button) {
+          spec.onAction(getApi(button));
+        },
+        onItemExecute: function (_a, _b, _c) {
+        },
+        splitDropdownBehaviours: derive$1([
+          DisablingConfigs.splitButton(sharedBackstage.providers.isReadOnly),
+          receivingConfig(),
+          config('split-dropdown-events', [
+            run(focusButtonEvent, Focusing.focus),
+            onControlAttached(specialisation, editorOffCell),
+            onControlDetached(specialisation, editorOffCell)
+          ]),
+          Unselecting.config({})
+        ]),
+        eventOrder: (_d = {}, _d[attachedToDom()] = [
+          'alloy.base.behaviour',
+          'split-dropdown-events'
+        ], _d),
+        toggleClass: 'tox-tbtn--enabled',
+        lazySink: sharedBackstage.getSink,
+        fetch: fetchChoices(getApi, spec, sharedBackstage.providers),
+        parts: { menu: part(false, spec.columns, spec.presets) },
+        components: [
+          SplitDropdown.parts().button(renderCommonStructure(spec.icon, spec.text, Option.none(), Option.some(displayChannel), Option.some([Toggling.config({
+              toggleClass: 'tox-tbtn--enabled',
+              toggleOnExecute: false
+            })]), sharedBackstage.providers)),
+          SplitDropdown.parts().arrow({
+            dom: {
+              tag: 'button',
+              classes: [
+                'tox-tbtn',
+                'tox-split-button__chevron'
+              ],
+              innerHtml: get$d('chevron-down', sharedBackstage.providers.icons)
+            },
+            buttonBehaviours: derive$1([
+              DisablingConfigs.splitButton(sharedBackstage.providers.isReadOnly),
+              receivingConfig()
+            ])
+          }),
+          SplitDropdown.parts()['aria-descriptor']({ text: sharedBackstage.providers.translate('To open the popup, press Shift+Enter') })
+        ]
+      });
+    };
+
+    var getFormApi = function (input) {
+      return {
+        hide: function () {
+          return emit(input, sandboxClose());
+        },
+        getValue: function () {
+          return Representing.getValue(input);
+        }
+      };
+    };
+    var runOnExecute$1 = function (memInput, original) {
+      return run(internalToolbarButtonExecute, function (comp, se) {
+        var input = memInput.get(comp);
+        var formApi = getFormApi(input);
+        original.onAction(formApi, se.event().buttonApi());
+      });
+    };
+    var renderContextButton = function (memInput, button, extras) {
+      var _a = button.original, primary = _a.primary, rest = __rest(_a, ['primary']);
+      var bridged = getOrDie(createToolbarButton(__assign(__assign({}, rest), {
+        type: 'button',
+        onAction: function () {
+        }
+      })));
+      return renderToolbarButtonWith(bridged, extras.backstage.shared.providers, [runOnExecute$1(memInput, button)]);
+    };
+    var renderContextToggleButton = function (memInput, button, extras) {
+      var _a = button.original, primary = _a.primary, rest = __rest(_a, ['primary']);
+      var bridged = getOrDie(createToggleButton(__assign(__assign({}, rest), {
+        type: 'togglebutton',
+        onAction: function () {
+        }
+      })));
+      return renderToolbarToggleButtonWith(bridged, extras.backstage.shared.providers, [runOnExecute$1(memInput, button)]);
+    };
+    var generateOne$1 = function (memInput, button, providersBackstage) {
+      var extras = { backstage: { shared: { providers: providersBackstage } } };
+      if (button.type === 'contextformtogglebutton') {
+        return renderContextToggleButton(memInput, button, extras);
+      } else {
+        return renderContextButton(memInput, button, extras);
+      }
+    };
+    var generate$7 = function (memInput, buttons, providersBackstage) {
+      var mementos = map(buttons, function (button) {
+        return record(generateOne$1(memInput, button, providersBackstage));
+      });
+      var asSpecs = function () {
+        return map(mementos, function (mem) {
+          return mem.asSpec();
+        });
+      };
+      var findPrimary = function (compInSystem) {
+        return findMap(buttons, function (button, i) {
+          if (button.primary) {
+            return Option.from(mementos[i]).bind(function (mem) {
+              return mem.getOpt(compInSystem);
+            }).filter(not(Disabling.isDisabled));
+          } else {
+            return Option.none();
+          }
+        });
+      };
+      return {
+        asSpecs: asSpecs,
+        findPrimary: findPrimary
+      };
+    };
+
+    var buildInitGroups = function (ctx, providers) {
+      var inputAttributes = ctx.label.fold(function () {
+        return {};
+      }, function (label) {
+        return { 'aria-label': label };
+      });
+      var memInput = record(Input.sketch({
+        inputClasses: [
+          'tox-toolbar-textfield',
+          'tox-toolbar-nav-js'
+        ],
+        data: ctx.initValue(),
+        inputAttributes: inputAttributes,
+        selectOnFocus: true,
+        inputBehaviours: derive$1([Keying.config({
+            mode: 'special',
+            onEnter: function (input) {
+              return commands.findPrimary(input).map(function (primary) {
+                emitExecute(primary);
+                return true;
+              });
+            },
+            onLeft: function (comp, se) {
+              se.cut();
+              return Option.none();
+            },
+            onRight: function (comp, se) {
+              se.cut();
+              return Option.none();
+            }
+          })])
+      }));
+      var commands = generate$7(memInput, ctx.commands, providers);
+      return [
+        {
+          title: Option.none(),
+          items: [memInput.asSpec()]
+        },
+        {
+          title: Option.none(),
+          items: commands.asSpecs()
+        }
+      ];
+    };
+    var renderContextForm = function (toolbarType, ctx, providers) {
+      return renderToolbar({
+        type: toolbarType,
+        uid: generate$1('context-toolbar'),
+        initGroups: buildInitGroups(ctx, providers),
+        onEscape: Option.none,
+        cyclicKeying: true,
+        providers: providers
+      });
+    };
+    var ContextForm = {
+      renderContextForm: renderContextForm,
+      buildInitGroups: buildInitGroups
+    };
+
+    var getHorizontalBounds = function (contentAreaBox, viewportBounds) {
+      var x = Math.max(viewportBounds.x, contentAreaBox.x);
+      var contentBoxWidth = contentAreaBox.right - x;
+      var maxViewportWidth = viewportBounds.width - (x - viewportBounds.x);
+      var width = Math.min(contentBoxWidth, maxViewportWidth);
+      return {
+        x: x,
+        width: width
+      };
+    };
+    var getVerticalBounds = function (editor, contentAreaBox, viewportBounds, isToolbarLocationTop) {
+      var container = Element.fromDom(editor.getContainer());
+      var header = descendant$1(container, '.tox-editor-header').getOr(container);
+      var headerBox = box(header);
+      var isToolbarBelowContentArea = headerBox.y >= contentAreaBox.bottom;
+      var isToolbarAbove = isToolbarLocationTop && !isToolbarBelowContentArea;
+      if (editor.inline && isToolbarAbove) {
+        return {
+          y: Math.max(headerBox.bottom, viewportBounds.y),
+          bottom: viewportBounds.bottom
+        };
+      }
+      if (editor.inline && !isToolbarAbove) {
+        return {
+          y: viewportBounds.y,
+          bottom: Math.min(headerBox.y, viewportBounds.bottom)
+        };
+      }
+      var containerBounds = box(container);
+      if (isToolbarAbove) {
+        return {
+          y: Math.max(headerBox.bottom, viewportBounds.y),
+          bottom: Math.min(containerBounds.bottom, viewportBounds.bottom)
+        };
+      }
+      return {
+        y: Math.max(containerBounds.y, viewportBounds.y),
+        bottom: Math.min(headerBox.y, viewportBounds.bottom)
+      };
+    };
+    var getContextToolbarBounds = function (editor, sharedBackstage) {
+      var viewportBounds = getBounds(domGlobals.window);
+      var contentAreaBox = box(Element.fromDom(editor.getContentAreaContainer()));
+      var toolbarOrMenubarEnabled = isMenubarEnabled(editor) || isToolbarEnabled(editor) || isMultipleToolbars(editor);
+      var _a = getHorizontalBounds(contentAreaBox, viewportBounds), x = _a.x, width = _a.width;
+      if (editor.inline && !toolbarOrMenubarEnabled) {
+        return bounds$1(x, viewportBounds.y, width, viewportBounds.height);
+      } else {
+        var isToolbarTop = sharedBackstage.header.isPositionedAtTop();
+        var _b = getVerticalBounds(editor, contentAreaBox, viewportBounds, isToolbarTop), y = _b.y, bottom = _b.bottom;
+        return bounds$1(x, y, width, bottom - y);
+      }
+    };
+
+    var matchTargetWith = function (elem, candidates) {
+      var ctxs = filter(candidates, function (toolbarApi) {
+        return toolbarApi.predicate(elem.dom());
+      });
+      var _a = partition(ctxs, function (t) {
+          return t.type === 'contexttoolbar';
+        }), pass = _a.pass, fail = _a.fail;
+      return {
+        contextToolbars: pass,
+        contextForms: fail
+      };
+    };
+    var filterByPositionForStartNode = function (toolbars) {
+      if (toolbars.length <= 1) {
+        return toolbars;
+      } else {
+        var doesPositionExist = function (value) {
+          return exists(toolbars, function (t) {
+            return t.position === value;
+          });
+        };
+        var filterToolbarsByPosition = function (value) {
+          return filter(toolbars, function (t) {
+            return t.position === value;
+          });
+        };
+        var hasSelectionToolbars = doesPositionExist('selection');
+        var hasNodeToolbars = doesPositionExist('node');
+        if (hasSelectionToolbars || hasNodeToolbars) {
+          if (hasNodeToolbars && hasSelectionToolbars) {
+            var nodeToolbars = filterToolbarsByPosition('node');
+            var selectionToolbars = map(filterToolbarsByPosition('selection'), function (t) {
+              return __assign(__assign({}, t), { position: 'node' });
+            });
+            return nodeToolbars.concat(selectionToolbars);
+          } else {
+            return hasSelectionToolbars ? filterToolbarsByPosition('selection') : filterToolbarsByPosition('node');
+          }
+        } else {
+          return filterToolbarsByPosition('line');
+        }
+      }
+    };
+    var filterByPositionForAncestorNode = function (toolbars) {
+      if (toolbars.length <= 1) {
+        return toolbars;
+      } else {
+        var findPosition_1 = function (value) {
+          return find(toolbars, function (t) {
+            return t.position === value;
+          });
+        };
+        var basePosition = findPosition_1('selection').orThunk(function () {
+          return findPosition_1('node');
+        }).orThunk(function () {
+          return findPosition_1('line');
+        }).map(function (t) {
+          return t.position;
+        });
+        return basePosition.fold(function () {
+          return [];
+        }, function (pos) {
+          return filter(toolbars, function (t) {
+            return t.position === pos;
+          });
+        });
+      }
+    };
+    var matchStartNode = function (elem, nodeCandidates, editorCandidates) {
+      var nodeMatches = matchTargetWith(elem, nodeCandidates);
+      if (nodeMatches.contextForms.length > 0) {
+        return Option.some({
+          elem: elem,
+          toolbars: [nodeMatches.contextForms[0]]
+        });
+      } else {
+        var editorMatches = matchTargetWith(elem, editorCandidates);
+        if (editorMatches.contextForms.length > 0) {
+          return Option.some({
+            elem: elem,
+            toolbars: [editorMatches.contextForms[0]]
+          });
+        } else if (nodeMatches.contextToolbars.length > 0 || editorMatches.contextToolbars.length > 0) {
+          var toolbars = filterByPositionForStartNode(nodeMatches.contextToolbars.concat(editorMatches.contextToolbars));
+          return Option.some({
+            elem: elem,
+            toolbars: toolbars
+          });
+        } else {
+          return Option.none();
+        }
+      }
+    };
+    var matchAncestor = function (isRoot, startNode, scopes) {
+      if (isRoot(startNode)) {
+        return Option.none();
+      } else {
+        return ancestor(startNode, function (ancestorElem) {
+          var _a = matchTargetWith(ancestorElem, scopes.inNodeScope), contextToolbars = _a.contextToolbars, contextForms = _a.contextForms;
+          var toolbars = contextForms.length > 0 ? contextForms : filterByPositionForAncestorNode(contextToolbars);
+          return toolbars.length > 0 ? Option.some({
+            elem: ancestorElem,
+            toolbars: toolbars
+          }) : Option.none();
+        }, isRoot);
+      }
+    };
+    var lookup$1 = function (scopes, editor) {
+      var rootElem = Element.fromDom(editor.getBody());
+      var isRoot = function (elem) {
+        return eq$1(elem, rootElem);
+      };
+      var isOutsideRoot = function (startNode) {
+        return !isRoot(startNode) && !contains$2(rootElem, startNode);
+      };
+      var startNode = Element.fromDom(editor.selection.getNode());
+      if (isOutsideRoot(startNode)) {
+        return Option.none();
+      }
+      return matchStartNode(startNode, scopes.inNodeScope, scopes.inEditorScope).orThunk(function () {
+        return matchAncestor(isRoot, startNode, scopes);
+      });
+    };
+
+    var categorise = function (contextToolbars, navigate) {
+      var forms = {};
+      var inNodeScope = [];
+      var inEditorScope = [];
+      var formNavigators = {};
+      var lookupTable = {};
+      var registerForm = function (key, toolbarApi) {
+        var contextForm = getOrDie(createContextForm(toolbarApi));
+        forms[key] = contextForm;
+        contextForm.launch.map(function (launch) {
+          formNavigators['form:' + key + ''] = __assign(__assign({}, toolbarApi.launch), {
+            type: launch.type === 'contextformtogglebutton' ? 'togglebutton' : 'button',
+            onAction: function () {
+              navigate(contextForm);
+            }
+          });
+        });
+        if (contextForm.scope === 'editor') {
+          inEditorScope.push(contextForm);
+        } else {
+          inNodeScope.push(contextForm);
+        }
+        lookupTable[key] = contextForm;
+      };
+      var registerToolbar = function (key, toolbarApi) {
+        createContextToolbar(toolbarApi).each(function (contextToolbar) {
+          if (toolbarApi.scope === 'editor') {
+            inEditorScope.push(contextToolbar);
+          } else {
+            inNodeScope.push(contextToolbar);
+          }
+          lookupTable[key] = contextToolbar;
+        });
+      };
+      var keys$1 = keys(contextToolbars);
+      each(keys$1, function (key) {
+        var toolbarApi = contextToolbars[key];
+        if (toolbarApi.type === 'contextform') {
+          registerForm(key, toolbarApi);
+        } else if (toolbarApi.type === 'contexttoolbar') {
+          registerToolbar(key, toolbarApi);
+        }
+      });
+      return {
+        forms: forms,
+        inNodeScope: inNodeScope,
+        inEditorScope: inEditorScope,
+        lookupTable: lookupTable,
+        formNavigators: formNavigators
+      };
+    };
+
+    var forwardSlideEvent = generate$1('forward-slide');
+    var backSlideEvent = generate$1('backward-slide');
+    var changeSlideEvent = generate$1('change-slide-event');
+    var resizingClass = 'tox-pop--resizing';
+    var renderContextToolbar = function (spec) {
+      var stack = Cell([]);
+      return InlineView.sketch({
+        dom: {
+          tag: 'div',
+          classes: ['tox-pop']
+        },
+        fireDismissalEventInstead: { event: 'doNotDismissYet' },
+        onShow: function (comp) {
+          stack.set([]);
+          InlineView.getContent(comp).each(function (c) {
+            remove$6(c.element(), 'visibility');
+          });
+          remove$4(comp.element(), resizingClass);
+          remove$6(comp.element(), 'width');
+        },
+        inlineBehaviours: derive$1([
+          config('context-toolbar-events', [
+            runOnSource(transitionend(), function (comp, _se) {
+              remove$4(comp.element(), resizingClass);
+              remove$6(comp.element(), 'width');
+            }),
+            run(changeSlideEvent, function (comp, se) {
+              remove$6(comp.element(), 'width');
+              var currentWidth = get$7(comp.element());
+              InlineView.setContent(comp, se.event().contents());
+              add$2(comp.element(), resizingClass);
+              var newWidth = get$7(comp.element());
+              set$2(comp.element(), 'width', currentWidth + 'px');
+              InlineView.getContent(comp).each(function (newContents) {
+                se.event().focus().bind(function (f) {
+                  focus$1(f);
+                  return search(comp.element());
+                }).orThunk(function () {
+                  Keying.focusIn(newContents);
+                  return active();
+                });
+              });
+              global$2.setTimeout(function () {
+                set$2(comp.element(), 'width', newWidth + 'px');
+              }, 0);
+            }),
+            run(forwardSlideEvent, function (comp, se) {
+              InlineView.getContent(comp).each(function (oldContents) {
+                stack.set(stack.get().concat([{
+                    bar: oldContents,
+                    focus: active()
+                  }]));
+              });
+              emitWith(comp, changeSlideEvent, {
+                contents: se.event().forwardContents(),
+                focus: Option.none()
+              });
+            }),
+            run(backSlideEvent, function (comp, _se) {
+              last(stack.get()).each(function (last) {
+                stack.set(stack.get().slice(0, stack.get().length - 1));
+                emitWith(comp, changeSlideEvent, {
+                  contents: premade$1(last.bar),
+                  focus: last.focus
+                });
+              });
+            })
+          ]),
+          Keying.config({
+            mode: 'special',
+            onEscape: function (comp) {
+              return last(stack.get()).fold(function () {
+                return spec.onEscape();
+              }, function (_) {
+                emit(comp, backSlideEvent);
+                return Option.some(true);
+              });
+            }
+          })
+        ]),
+        lazySink: function () {
+          return Result.value(spec.sink);
+        }
+      });
+    };
+
+    var generateSelectItems = function (_editor, backstage, spec) {
+      var generateItem = function (rawItem, response, disabled, value) {
+        var translatedText = backstage.shared.providers.translate(rawItem.title);
+        if (rawItem.type === 'separator') {
+          return Option.some({
+            type: 'separator',
+            text: translatedText
+          });
+        } else if (rawItem.type === 'submenu') {
+          var items = bind(rawItem.getStyleItems(), function (si) {
+            return validate(si, response, value);
+          });
+          if (response === 0 && items.length <= 0) {
+            return Option.none();
+          } else {
+            return Option.some({
+              type: 'nestedmenuitem',
+              text: translatedText,
+              disabled: items.length <= 0,
+              getSubmenuItems: function () {
+                return bind(rawItem.getStyleItems(), function (si) {
+                  return validate(si, response, value);
+                });
+              }
+            });
+          }
+        } else {
+          return Option.some(__assign({
+            type: 'togglemenuitem',
+            text: translatedText,
+            icon: rawItem.icon,
+            active: rawItem.isSelected(value),
+            disabled: disabled,
+            onAction: spec.onAction(rawItem)
+          }, rawItem.getStylePreview().fold(function () {
+            return {};
+          }, function (preview) {
+            return { meta: { style: preview } };
+          })));
+        }
+      };
+      var validate = function (item, response, value) {
+        var invalid = item.type === 'formatter' && spec.isInvalid(item);
+        if (response === 0) {
+          return invalid ? [] : generateItem(item, response, false, value).toArray();
+        } else {
+          return generateItem(item, response, invalid, value).toArray();
+        }
+      };
+      var validateItems = function (preItems) {
+        var value = spec.getCurrentValue();
+        var response = spec.shouldHide ? 0 : 1;
+        return bind(preItems, function (item) {
+          return validate(item, response, value);
+        });
+      };
+      var getFetch = function (backstage, getStyleItems) {
+        return function (callback) {
+          var preItems = getStyleItems();
+          var items = validateItems(preItems);
+          var menu = build$2(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, false);
+          callback(menu);
+        };
+      };
+      return {
+        validateItems: validateItems,
+        getFetch: getFetch
+      };
+    };
+    var createMenuItems = function (editor, backstage, spec) {
+      var dataset = spec.dataset;
+      var getStyleItems = dataset.type === 'basic' ? function () {
+        return map(dataset.data, function (d) {
+          return processBasic(d, spec.isSelectedFor, spec.getPreviewFor);
+        });
+      } : dataset.getData;
+      return {
+        items: generateSelectItems(editor, backstage, spec),
+        getStyleItems: getStyleItems
+      };
+    };
+    var createSelectButton = function (editor, backstage, spec) {
+      var _a = createMenuItems(editor, backstage, spec), items = _a.items, getStyleItems = _a.getStyleItems;
+      var getApi = function (comp) {
+        return {
+          getComponent: function () {
+            return comp;
+          }
+        };
+      };
+      var onSetup = function (api) {
+        spec.setInitialValue.each(function (f) {
+          return f(api.getComponent());
+        });
+        return spec.nodeChangeHandler.map(function (f) {
+          var handler = f(api.getComponent());
+          editor.on('NodeChange', handler);
+          return function () {
+            editor.off('NodeChange', handler);
+          };
+        }).getOr(noop);
+      };
+      return renderCommonDropdown({
+        text: spec.icon.isSome() ? Option.none() : Option.some(''),
+        icon: spec.icon,
+        tooltip: Option.from(spec.tooltip),
+        role: Option.none(),
+        fetch: items.getFetch(backstage, getStyleItems),
+        onSetup: onSetup,
+        getApi: getApi,
+        columns: 1,
+        presets: 'normal',
+        classes: spec.icon.isSome() ? [] : ['bespoke'],
+        dropdownBehaviours: []
+      }, 'tox-tbtn', backstage.shared);
+    };
+
+    var process = function (rawFormats) {
+      return map(rawFormats, function (item) {
+        var title = item, format = item;
+        var values = item.split('=');
+        if (values.length > 1) {
+          title = values[0];
+          format = values[1];
+        }
+        return {
+          title: title,
+          format: format
+        };
+      });
+    };
+    var buildBasicStaticDataset = function (data) {
+      return {
+        type: 'basic',
+        data: data
+      };
+    };
+    var Delimiter;
+    (function (Delimiter) {
+      Delimiter[Delimiter['SemiColon'] = 0] = 'SemiColon';
+      Delimiter[Delimiter['Space'] = 1] = 'Space';
+    }(Delimiter || (Delimiter = {})));
+    var split = function (rawFormats, delimiter) {
+      if (delimiter === Delimiter.SemiColon) {
+        return rawFormats.replace(/;$/, '').split(';');
+      } else {
+        return rawFormats.split(' ');
+      }
+    };
+    var buildBasicSettingsDataset = function (editor, settingName, defaults, delimiter) {
+      var rawFormats = get(editor.settings, settingName).getOr(defaults);
+      var data = process(split(rawFormats, delimiter));
+      return {
+        type: 'basic',
+        data: data
+      };
+    };
+
+    var alignMenuItems = [
+      {
+        title: 'Left',
+        icon: 'align-left',
+        format: 'alignleft',
+        command: 'JustifyLeft'
+      },
+      {
+        title: 'Center',
+        icon: 'align-center',
+        format: 'aligncenter',
+        command: 'JustifyCenter'
+      },
+      {
+        title: 'Right',
+        icon: 'align-right',
+        format: 'alignright',
+        command: 'JustifyRight'
+      },
+      {
+        title: 'Justify',
+        icon: 'align-justify',
+        format: 'alignjustify',
+        command: 'JustifyFull'
+      }
+    ];
+    var getSpec = function (editor) {
+      var getMatchingValue = function () {
+        return find(alignMenuItems, function (item) {
+          return editor.formatter.match(item.format);
+        });
+      };
+      var isSelectedFor = function (format) {
+        return function () {
+          return editor.formatter.match(format);
+        };
+      };
+      var getPreviewFor = function (_format) {
+        return function () {
+          return Option.none();
+        };
+      };
+      var updateSelectMenuIcon = function (comp) {
+        var match = getMatchingValue();
+        var alignment = match.fold(function () {
+          return 'left';
+        }, function (item) {
+          return item.title.toLowerCase();
+        });
+        emitWith(comp, updateMenuIcon, { icon: 'align-' + alignment });
+      };
+      var nodeChangeHandler = Option.some(function (comp) {
+        return function () {
+          return updateSelectMenuIcon(comp);
+        };
+      });
+      var setInitialValue = Option.some(function (comp) {
+        return updateSelectMenuIcon(comp);
+      });
+      var dataset = buildBasicStaticDataset(alignMenuItems);
+      var onAction = function (rawItem) {
+        return function () {
+          return find(alignMenuItems, function (item) {
+            return item.format === rawItem.format;
+          }).each(function (item) {
+            return editor.execCommand(item.command);
+          });
+        };
+      };
+      return {
+        tooltip: 'Align',
+        icon: Option.some('align-left'),
+        isSelectedFor: isSelectedFor,
+        getCurrentValue: constant(Option.none()),
+        getPreviewFor: getPreviewFor,
+        onAction: onAction,
+        setInitialValue: setInitialValue,
+        nodeChangeHandler: nodeChangeHandler,
+        dataset: dataset,
+        shouldHide: false,
+        isInvalid: function (item) {
+          return !editor.formatter.canApply(item.format);
+        }
+      };
+    };
+    var createAlignSelect = function (editor, backstage) {
+      return createSelectButton(editor, backstage, getSpec(editor));
+    };
+    var alignSelectMenu = function (editor, backstage) {
+      var menuItems = createMenuItems(editor, backstage, getSpec(editor));
+      editor.ui.registry.addNestedMenuItem('align', {
+        text: backstage.shared.providers.translate('Align'),
+        getSubmenuItems: function () {
+          return menuItems.items.validateItems(menuItems.getStyleItems());
+        }
+      });
+    };
+
+    var defaultFontsFormats = 'Andale Mono=andale mono,monospace;' + 'Arial=arial,helvetica,sans-serif;' + 'Arial Black=arial black,sans-serif;' + 'Book Antiqua=book antiqua,palatino,serif;' + 'Comic Sans MS=comic sans ms,sans-serif;' + 'Courier New=courier new,courier,monospace;' + 'Georgia=georgia,palatino,serif;' + 'Helvetica=helvetica,arial,sans-serif;' + 'Impact=impact,sans-serif;' + 'Symbol=symbol;' + 'Tahoma=tahoma,arial,helvetica,sans-serif;' + 'Terminal=terminal,monaco,monospace;' + 'Times New Roman=times new roman,times,serif;' + 'Trebuchet MS=trebuchet ms,geneva,sans-serif;' + 'Verdana=verdana,geneva,sans-serif;' + 'Webdings=webdings;' + 'Wingdings=wingdings,zapf dingbats';
+    var systemStackFonts = [
+      '-apple-system',
+      'Segoe UI',
+      'Roboto',
+      'Helvetica Neue',
+      'sans-serif'
+    ];
+    var splitFonts = function (fontFamily) {
+      var fonts = fontFamily.split(/\s*,\s*/);
+      return map(fonts, function (font) {
+        return font.replace(/^['"]+|['"]+$/g, '');
+      });
+    };
+    var isSystemFontStack = function (fontFamily) {
+      var matchesSystemStack = function () {
+        var fonts = splitFonts(fontFamily.toLowerCase());
+        return forall(systemStackFonts, function (font) {
+          return fonts.indexOf(font.toLowerCase()) > -1;
+        });
+      };
+      return fontFamily.indexOf('-apple-system') === 0 && matchesSystemStack();
+    };
+    var getSpec$1 = function (editor) {
+      var getMatchingValue = function () {
+        var getFirstFont = function (fontFamily) {
+          return fontFamily ? splitFonts(fontFamily)[0] : '';
+        };
+        var fontFamily = editor.queryCommandValue('FontName');
+        var items = dataset.data;
+        var font = fontFamily ? fontFamily.toLowerCase() : '';
+        var matchOpt = find(items, function (item) {
+          var format = item.format;
+          return format.toLowerCase() === font || getFirstFont(format).toLowerCase() === getFirstFont(font).toLowerCase();
+        }).orThunk(function () {
+          if (isSystemFontStack(font)) {
+            return Option.from({
+              title: 'System Font',
+              format: font
+            });
+          } else {
+            return Option.none();
+          }
+        });
+        return {
+          matchOpt: matchOpt,
+          font: fontFamily
+        };
+      };
+      var isSelectedFor = function (item) {
+        return function (valueOpt) {
+          return valueOpt.exists(function (value) {
+            return value.format === item;
+          });
+        };
+      };
+      var getCurrentValue = function () {
+        var matchOpt = getMatchingValue().matchOpt;
+        return matchOpt;
+      };
+      var getPreviewFor = function (item) {
+        return function () {
+          return Option.some({
+            tag: 'div',
+            styles: item.indexOf('dings') === -1 ? { 'font-family': item } : {}
+          });
+        };
+      };
+      var onAction = function (rawItem) {
+        return function () {
+          editor.undoManager.transact(function () {
+            editor.focus();
+            editor.execCommand('FontName', false, rawItem.format);
+          });
+        };
+      };
+      var updateSelectMenuText = function (comp) {
+        var _a = getMatchingValue(), matchOpt = _a.matchOpt, font = _a.font;
+        var text = matchOpt.fold(function () {
+          return font;
+        }, function (item) {
+          return item.title;
+        });
+        emitWith(comp, updateMenuText, { text: text });
+      };
+      var nodeChangeHandler = Option.some(function (comp) {
+        return function () {
+          return updateSelectMenuText(comp);
+        };
+      });
+      var setInitialValue = Option.some(function (comp) {
+        return updateSelectMenuText(comp);
+      });
+      var dataset = buildBasicSettingsDataset(editor, 'font_formats', defaultFontsFormats, Delimiter.SemiColon);
+      return {
+        tooltip: 'Fonts',
+        icon: Option.none(),
+        isSelectedFor: isSelectedFor,
+        getCurrentValue: getCurrentValue,
+        getPreviewFor: getPreviewFor,
+        onAction: onAction,
+        setInitialValue: setInitialValue,
+        nodeChangeHandler: nodeChangeHandler,
+        dataset: dataset,
+        shouldHide: false,
+        isInvalid: function () {
+          return false;
+        }
+      };
+    };
+    var createFontSelect = function (editor, backstage) {
+      return createSelectButton(editor, backstage, getSpec$1(editor));
+    };
+    var fontSelectMenu = function (editor, backstage) {
+      var menuItems = createMenuItems(editor, backstage, getSpec$1(editor));
+      editor.ui.registry.addNestedMenuItem('fontformats', {
+        text: backstage.shared.providers.translate('Fonts'),
+        getSubmenuItems: function () {
+          return menuItems.items.validateItems(menuItems.getStyleItems());
+        }
+      });
+    };
+
+    var defaultFontsizeFormats = '8pt 10pt 12pt 14pt 18pt 24pt 36pt';
+    var legacyFontSizes = {
+      '8pt': '1',
+      '10pt': '2',
+      '12pt': '3',
+      '14pt': '4',
+      '18pt': '5',
+      '24pt': '6',
+      '36pt': '7'
+    };
+    var round$1 = function (number, precision) {
+      var factor = Math.pow(10, precision);
+      return Math.round(number * factor) / factor;
+    };
+    var toPt = function (fontSize, precision) {
+      if (/[0-9.]+px$/.test(fontSize)) {
+        return round$1(parseInt(fontSize, 10) * 72 / 96, precision || 0) + 'pt';
+      }
+      return fontSize;
+    };
+    var toLegacy = function (fontSize) {
+      return get(legacyFontSizes, fontSize).getOr('');
+    };
+    var getSpec$2 = function (editor) {
+      var getMatchingValue = function () {
+        var matchOpt = Option.none();
+        var items = dataset.data;
+        var fontSize = editor.queryCommandValue('FontSize');
+        if (fontSize) {
+          var _loop_1 = function (precision) {
+            var pt = toPt(fontSize, precision);
+            var legacy = toLegacy(pt);
+            matchOpt = find(items, function (item) {
+              return item.format === fontSize || item.format === pt || item.format === legacy;
+            });
+          };
+          for (var precision = 3; matchOpt.isNone() && precision >= 0; precision--) {
+            _loop_1(precision);
+          }
+        }
+        return {
+          matchOpt: matchOpt,
+          size: fontSize
+        };
+      };
+      var isSelectedFor = function (item) {
+        return function (valueOpt) {
+          return valueOpt.exists(function (value) {
+            return value.format === item;
+          });
+        };
+      };
+      var getCurrentValue = function () {
+        var matchOpt = getMatchingValue().matchOpt;
+        return matchOpt;
+      };
+      var getPreviewFor = constant(constant(Option.none()));
+      var onAction = function (rawItem) {
+        return function () {
+          editor.undoManager.transact(function () {
+            editor.focus();
+            editor.execCommand('FontSize', false, rawItem.format);
+          });
+        };
+      };
+      var updateSelectMenuText = function (comp) {
+        var _a = getMatchingValue(), matchOpt = _a.matchOpt, size = _a.size;
+        var text = matchOpt.fold(function () {
+          return size;
+        }, function (match) {
+          return match.title;
+        });
+        emitWith(comp, updateMenuText, { text: text });
+      };
+      var nodeChangeHandler = Option.some(function (comp) {
+        return function () {
+          return updateSelectMenuText(comp);
+        };
+      });
+      var setInitialValue = Option.some(function (comp) {
+        return updateSelectMenuText(comp);
+      });
+      var dataset = buildBasicSettingsDataset(editor, 'fontsize_formats', defaultFontsizeFormats, Delimiter.Space);
+      return {
+        tooltip: 'Font sizes',
+        icon: Option.none(),
+        isSelectedFor: isSelectedFor,
+        getPreviewFor: getPreviewFor,
+        getCurrentValue: getCurrentValue,
+        onAction: onAction,
+        setInitialValue: setInitialValue,
+        nodeChangeHandler: nodeChangeHandler,
+        dataset: dataset,
+        shouldHide: false,
+        isInvalid: function () {
+          return false;
+        }
+      };
+    };
+    var createFontsizeSelect = function (editor, backstage) {
+      return createSelectButton(editor, backstage, getSpec$2(editor));
+    };
+    var fontsizeSelectMenu = function (editor, backstage) {
+      var menuItems = createMenuItems(editor, backstage, getSpec$2(editor));
+      editor.ui.registry.addNestedMenuItem('fontsizes', {
+        text: 'Font sizes',
+        getSubmenuItems: function () {
+          return menuItems.items.validateItems(menuItems.getStyleItems());
+        }
+      });
+    };
+
+    var findNearest = function (editor, getStyles, parents) {
+      var styles = getStyles();
+      return findMap(parents, function (parent) {
+        return find(styles, function (fmt) {
+          return editor.formatter.matchNode(parent, fmt.format);
+        });
+      }).orThunk(function () {
+        if (editor.formatter.match('p')) {
+          return Option.some({
+            title: 'Paragraph',
+            format: 'p'
+          });
+        }
+        return Option.none();
+      });
+    };
+    var getCurrentSelectionParents = function (editor) {
+      var currentNode = editor.selection.getStart(true) || editor.getBody();
+      return editor.dom.getParents(currentNode, function () {
+        return true;
+      }, editor.getBody());
+    };
+
+    var onSetupFormatToggle = function (editor, name) {
+      return function (api) {
+        var unbindCell = Cell(Option.none());
+        var init = function () {
+          api.setActive(editor.formatter.match(name));
+          var unbind = editor.formatter.formatChanged(name, api.setActive).unbind;
+          unbindCell.set(Option.some(unbind));
+        };
+        editor.initialized ? init() : editor.on('init', init);
+        return function () {
+          return unbindCell.get().each(function (unbind) {
+            return unbind();
+          });
+        };
+      };
+    };
+    var onActionToggleFormat = function (editor) {
+      return function (rawItem) {
+        return function () {
+          editor.undoManager.transact(function () {
+            editor.focus();
+            editor.execCommand('mceToggleFormat', false, rawItem.format);
+          });
+        };
+      };
+    };
+
+    var defaultBlocks = 'Paragraph=p;' + 'Heading 1=h1;' + 'Heading 2=h2;' + 'Heading 3=h3;' + 'Heading 4=h4;' + 'Heading 5=h5;' + 'Heading 6=h6;' + 'Preformatted=pre';
+    var getSpec$3 = function (editor) {
+      var getMatchingValue = function (nodeChangeEvent) {
+        return findNearest(editor, function () {
+          return dataset.data;
+        }, nodeChangeEvent);
+      };
+      var isSelectedFor = function (format) {
+        return function () {
+          return editor.formatter.match(format);
+        };
+      };
+      var getPreviewFor = function (format) {
+        return function () {
+          var fmt = editor.formatter.get(format);
+          return Option.some({
+            tag: fmt.length > 0 ? fmt[0].inline || fmt[0].block || 'div' : 'div',
+            styles: editor.dom.parseStyle(editor.formatter.getCssText(format))
+          });
+        };
+      };
+      var updateSelectMenuText = function (parents, comp) {
+        var detectedFormat = getMatchingValue(parents);
+        var text = detectedFormat.fold(function () {
+          return 'Paragraph';
+        }, function (fmt) {
+          return fmt.title;
+        });
+        emitWith(comp, updateMenuText, { text: text });
+      };
+      var nodeChangeHandler = Option.some(function (comp) {
+        return function (e) {
+          return updateSelectMenuText(e.parents, comp);
+        };
+      });
+      var setInitialValue = Option.some(function (comp) {
+        var parents = getCurrentSelectionParents(editor);
+        updateSelectMenuText(parents, comp);
+      });
+      var dataset = buildBasicSettingsDataset(editor, 'block_formats', defaultBlocks, Delimiter.SemiColon);
+      return {
+        tooltip: 'Blocks',
+        icon: Option.none(),
+        isSelectedFor: isSelectedFor,
+        getCurrentValue: constant(Option.none()),
+        getPreviewFor: getPreviewFor,
+        onAction: onActionToggleFormat(editor),
+        setInitialValue: setInitialValue,
+        nodeChangeHandler: nodeChangeHandler,
+        dataset: dataset,
+        shouldHide: false,
+        isInvalid: function (item) {
+          return !editor.formatter.canApply(item.format);
+        }
+      };
+    };
+    var createFormatSelect = function (editor, backstage) {
+      return createSelectButton(editor, backstage, getSpec$3(editor));
+    };
+    var formatSelectMenu = function (editor, backstage) {
+      var menuItems = createMenuItems(editor, backstage, getSpec$3(editor));
+      editor.ui.registry.addNestedMenuItem('blockformats', {
+        text: 'Blocks',
+        getSubmenuItems: function () {
+          return menuItems.items.validateItems(menuItems.getStyleItems());
+        }
+      });
+    };
+
+    var getSpec$4 = function (editor, dataset) {
+      var isSelectedFor = function (format) {
+        return function () {
+          return editor.formatter.match(format);
+        };
+      };
+      var getPreviewFor = function (format) {
+        return function () {
+          var fmt = editor.formatter.get(format);
+          return fmt !== undefined ? Option.some({
+            tag: fmt.length > 0 ? fmt[0].inline || fmt[0].block || 'div' : 'div',
+            styles: editor.dom.parseStyle(editor.formatter.getCssText(format))
+          }) : Option.none();
+        };
+      };
+      var updateSelectMenuText = function (parents, comp) {
+        var getFormatItems = function (fmt) {
+          var subs = fmt.items;
+          return subs !== undefined && subs.length > 0 ? bind(subs, getFormatItems) : [{
+              title: fmt.title,
+              format: fmt.format
+            }];
+        };
+        var flattenedItems = bind(getStyleFormats(editor), getFormatItems);
+        var detectedFormat = findNearest(editor, function () {
+          return flattenedItems;
+        }, parents);
+        var text = detectedFormat.fold(function () {
+          return 'Paragraph';
+        }, function (fmt) {
+          return fmt.title;
+        });
+        emitWith(comp, updateMenuText, { text: text });
+      };
+      var nodeChangeHandler = Option.some(function (comp) {
+        return function (e) {
+          return updateSelectMenuText(e.parents, comp);
+        };
+      });
+      var setInitialValue = Option.some(function (comp) {
+        var parents = getCurrentSelectionParents(editor);
+        updateSelectMenuText(parents, comp);
+      });
+      return {
+        tooltip: 'Formats',
+        icon: Option.none(),
+        isSelectedFor: isSelectedFor,
+        getCurrentValue: constant(Option.none()),
+        getPreviewFor: getPreviewFor,
+        onAction: onActionToggleFormat(editor),
+        setInitialValue: setInitialValue,
+        nodeChangeHandler: nodeChangeHandler,
+        shouldHide: editor.getParam('style_formats_autohide', false, 'boolean'),
+        isInvalid: function (item) {
+          return !editor.formatter.canApply(item.format);
+        },
+        dataset: dataset
+      };
+    };
+    var createStyleSelect = function (editor, backstage) {
+      var dataset = __assign({ type: 'advanced' }, backstage.styleselect);
+      return createSelectButton(editor, backstage, getSpec$4(editor, dataset));
+    };
+    var styleSelectMenu = function (editor, backstage) {
+      var dataset = __assign({ type: 'advanced' }, backstage.styleselect);
+      var menuItems = createMenuItems(editor, backstage, getSpec$4(editor, dataset));
+      editor.ui.registry.addNestedMenuItem('formats', {
+        text: 'Formats',
+        getSubmenuItems: function () {
+          return menuItems.items.validateItems(menuItems.getStyleItems());
+        }
+      });
+    };
+
+    var defaultToolbar = [
+      {
+        name: 'history',
+        items: [
+          'undo',
+          'redo'
+        ]
+      },
+      {
+        name: 'styles',
+        items: ['styleselect']
+      },
+      {
+        name: 'formatting',
+        items: [
+          'bold',
+          'italic'
+        ]
+      },
+      {
+        name: 'alignment',
+        items: [
+          'alignleft',
+          'aligncenter',
+          'alignright',
+          'alignjustify'
+        ]
+      },
+      {
+        name: 'indentation',
+        items: [
+          'outdent',
+          'indent'
+        ]
+      },
+      {
+        name: 'permanent pen',
+        items: ['permanentpen']
+      },
+      {
+        name: 'comments',
+        items: ['addcomment']
+      }
+    ];
+    var renderFromBridge = function (bridgeBuilder, render) {
+      return function (spec, extras, editor) {
+        var internal = bridgeBuilder(spec).mapError(function (errInfo) {
+          return formatError(errInfo);
+        }).getOrDie();
+        return render(internal, extras, editor);
+      };
+    };
+    var types = {
+      button: renderFromBridge(createToolbarButton, function (s, extras) {
+        return renderToolbarButton(s, extras.backstage.shared.providers);
+      }),
+      togglebutton: renderFromBridge(createToggleButton, function (s, extras) {
+        return renderToolbarToggleButton(s, extras.backstage.shared.providers);
+      }),
+      menubutton: renderFromBridge(createMenuButton, function (s, extras) {
+        return renderMenuButton(s, 'tox-tbtn', extras.backstage, Option.none());
+      }),
+      splitbutton: renderFromBridge(createSplitButton, function (s, extras) {
+        return renderSplitButton(s, extras.backstage.shared);
+      }),
+      grouptoolbarbutton: renderFromBridge(createGroupToolbarButton, function (s, extras, editor) {
+        var _a;
+        var buttons = editor.ui.registry.getAll().buttons;
+        var identify = function (toolbar) {
+          return identifyButtons(editor, {
+            buttons: buttons,
+            toolbar: toolbar,
+            allowToolbarGroups: false
+          }, extras, Option.none());
+        };
+        var attributes = (_a = {}, _a[Attribute] = extras.backstage.shared.header.isPositionedAtTop() ? AttributeValue.TopToBottom : AttributeValue.BottomToTop, _a);
+        switch (getToolbarMode(editor)) {
+        case ToolbarMode.floating:
+          return renderFloatingToolbarButton(s, extras.backstage, identify, attributes);
+        default:
+          throw new Error('Toolbar groups are only supported when using floating toolbar mode');
+        }
+      }),
+      styleSelectButton: function (editor, extras) {
+        return createStyleSelect(editor, extras.backstage);
+      },
+      fontsizeSelectButton: function (editor, extras) {
+        return createFontsizeSelect(editor, extras.backstage);
+      },
+      fontSelectButton: function (editor, extras) {
+        return createFontSelect(editor, extras.backstage);
+      },
+      formatButton: function (editor, extras) {
+        return createFormatSelect(editor, extras.backstage);
+      },
+      alignMenuButton: function (editor, extras) {
+        return createAlignSelect(editor, extras.backstage);
+      }
+    };
+    var extractFrom = function (spec, extras, editor) {
+      return get(types, spec.type).fold(function () {
+        domGlobals.console.error('skipping button defined by', spec);
+        return Option.none();
+      }, function (render) {
+        return Option.some(render(spec, extras, editor));
+      });
+    };
+    var bespokeButtons = {
+      styleselect: types.styleSelectButton,
+      fontsizeselect: types.fontsizeSelectButton,
+      fontselect: types.fontSelectButton,
+      formatselect: types.formatButton,
+      align: types.alignMenuButton
+    };
+    var removeUnusedDefaults = function (buttons) {
+      var filteredItemGroups = map(defaultToolbar, function (group) {
+        var items = filter(group.items, function (subItem) {
+          return has(buttons, subItem) || has(bespokeButtons, subItem);
+        });
+        return {
+          name: group.name,
+          items: items
+        };
+      });
+      return filter(filteredItemGroups, function (group) {
+        return group.items.length > 0;
+      });
+    };
+    var convertStringToolbar = function (strToolbar) {
+      var groupsStrings = strToolbar.split('|');
+      return map(groupsStrings, function (g) {
+        return { items: g.trim().split(' ') };
+      });
+    };
+    var isToolbarGroupSettingArray = function (toolbar) {
+      return isArrayOf(toolbar, function (t) {
+        return has(t, 'name') && has(t, 'items');
+      });
+    };
+    var createToolbar = function (toolbarConfig) {
+      var toolbar = toolbarConfig.toolbar;
+      var buttons = toolbarConfig.buttons;
+      if (toolbar === false) {
+        return [];
+      } else if (toolbar === undefined || toolbar === true) {
+        return removeUnusedDefaults(buttons);
+      } else if (isString(toolbar)) {
+        return convertStringToolbar(toolbar);
+      } else if (isToolbarGroupSettingArray(toolbar)) {
+        return toolbar;
+      } else {
+        domGlobals.console.error('Toolbar type should be string, string[], boolean or ToolbarGroup[]');
+        return [];
+      }
+    };
+    var lookupButton = function (editor, buttons, toolbarItem, allowToolbarGroups, extras, prefixes) {
+      return get(buttons, toolbarItem.toLowerCase()).orThunk(function () {
+        return prefixes.bind(function (ps) {
+          return findMap(ps, function (prefix) {
+            return get(buttons, prefix + toolbarItem.toLowerCase());
+          });
+        });
+      }).fold(function () {
+        return get(bespokeButtons, toolbarItem.toLowerCase()).map(function (r) {
+          return r(editor, extras);
+        }).orThunk(function () {
+          return Option.none();
+        });
+      }, function (spec) {
+        if (spec.type === 'grouptoolbarbutton' && !allowToolbarGroups) {
+          domGlobals.console.warn('Ignoring the \'' + toolbarItem + '\' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.');
+          return Option.none();
+        } else {
+          return extractFrom(spec, extras, editor);
+        }
+      });
+    };
+    var identifyButtons = function (editor, toolbarConfig, extras, prefixes) {
+      var toolbarGroups = createToolbar(toolbarConfig);
+      var groups = map(toolbarGroups, function (group) {
+        var items = bind(group.items, function (toolbarItem) {
+          return toolbarItem.trim().length === 0 ? [] : lookupButton(editor, toolbarConfig.buttons, toolbarItem, toolbarConfig.allowToolbarGroups, extras, prefixes).toArray();
+        });
+        return {
+          title: Option.from(editor.translate(group.name)),
+          items: items
+        };
+      });
+      return filter(groups, function (group) {
+        return group.items.length > 0;
+      });
+    };
+
+    var bubbleSize = 12;
+    var bubbleAlignments$1 = {
+      valignCentre: [],
+      alignCentre: [],
+      alignLeft: ['tox-pop--align-left'],
+      alignRight: ['tox-pop--align-right'],
+      right: ['tox-pop--right'],
+      left: ['tox-pop--left'],
+      bottom: ['tox-pop--bottom'],
+      top: ['tox-pop--top']
+    };
+    var anchorOverrides = {
+      maxHeightFunction: expandable(),
+      maxWidthFunction: expandable$1()
+    };
+    var desktopAnchorSpecLayouts = {
+      onLtr: function () {
+        return [
+          north$1,
+          south$1,
+          northeast$1,
+          southeast$1,
+          northwest$1,
+          southwest$1,
+          north$3,
+          south$3,
+          northeast$3,
+          southeast$3,
+          northwest$3,
+          southwest$3
+        ];
+      },
+      onRtl: function () {
+        return [
+          north$1,
+          south$1,
+          northwest$1,
+          southwest$1,
+          northeast$1,
+          southeast$1,
+          north$3,
+          south$3,
+          northwest$3,
+          southwest$3,
+          northeast$3,
+          southeast$3
+        ];
+      }
+    };
+    var mobileAnchorSpecLayouts = {
+      onLtr: function () {
+        return [
+          south$1,
+          southeast$1,
+          southwest$1,
+          northeast$1,
+          northwest$1,
+          north$1,
+          north$3,
+          south$3,
+          northeast$3,
+          southeast$3,
+          northwest$3,
+          southwest$3
+        ];
+      },
+      onRtl: function () {
+        return [
+          south$1,
+          southwest$1,
+          southeast$1,
+          northwest$1,
+          northeast$1,
+          north$1,
+          north$3,
+          south$3,
+          northwest$3,
+          southwest$3,
+          northeast$3,
+          southeast$3
+        ];
+      }
+    };
+    var getAnchorLayout = function (position, isTouch) {
+      if (position === 'line') {
+        return {
+          bubble: nu$8(bubbleSize, 0, bubbleAlignments$1),
+          layouts: {
+            onLtr: function () {
+              return [east$1];
+            },
+            onRtl: function () {
+              return [west$1];
+            }
+          },
+          overrides: anchorOverrides
+        };
+      } else {
+        return {
+          bubble: nu$8(0, bubbleSize, bubbleAlignments$1),
+          layouts: isTouch ? mobileAnchorSpecLayouts : desktopAnchorSpecLayouts,
+          overrides: anchorOverrides
+        };
+      }
+    };
+    var register$4 = function (editor, registryContextToolbars, sink, extras) {
+      var isTouch = detect$3().deviceType.isTouch;
+      var contextbar = build$1(renderContextToolbar({
+        sink: sink,
+        onEscape: function () {
+          editor.focus();
+          return Option.some(true);
+        }
+      }));
+      var getBounds = function () {
+        return getContextToolbarBounds(editor, extras.backstage.shared);
+      };
+      var isRangeOverlapping = function (aTop, aBottom, bTop, bBottom) {
+        return Math.max(aTop, bTop) <= Math.min(aBottom, bBottom);
+      };
+      var getLastElementVerticalBound = function () {
+        var nodeBounds = lastElement.get().map(function (ele) {
+          return ele.getBoundingClientRect();
+        }).getOrThunk(function () {
+          return editor.selection.getRng().getBoundingClientRect();
+        });
+        var diffTop = editor.inline ? get$8().top() : absolute$1(Element.fromDom(editor.getBody())).y;
+        return {
+          y: nodeBounds.top + diffTop,
+          bottom: nodeBounds.bottom + diffTop
+        };
+      };
+      var shouldContextToolbarHide = function () {
+        if (isTouch() && extras.backstage.isContextMenuOpen()) {
+          return true;
+        }
+        var lastElementBounds = getLastElementVerticalBound();
+        var contextToolbarBounds = getBounds();
+        return !isRangeOverlapping(lastElementBounds.y, lastElementBounds.bottom, contextToolbarBounds.y, contextToolbarBounds.bottom);
+      };
+      var forceHide = function () {
+        InlineView.hide(contextbar);
+      };
+      var hideOrRepositionIfNecessary = function () {
+        lastAnchor.get().each(function (anchor) {
+          var contextBarEle = contextbar.element();
+          remove$6(contextBarEle, 'display');
+          if (shouldContextToolbarHide()) {
+            set$2(contextBarEle, 'display', 'none');
+          } else {
+            Positioning.positionWithinBounds(sink, anchor, contextbar, Option.some(getBounds()));
+          }
+        });
+      };
+      var lastAnchor = Cell(Option.none());
+      var lastElement = Cell(Option.none());
+      var timer = Cell(null);
+      var wrapInPopDialog = function (toolbarSpec) {
+        return {
+          dom: {
+            tag: 'div',
+            classes: ['tox-pop__dialog']
+          },
+          components: [toolbarSpec],
+          behaviours: derive$1([
+            Keying.config({ mode: 'acyclic' }),
+            config('pop-dialog-wrap-events', [
+              runOnAttached(function (comp) {
+                editor.shortcuts.add('ctrl+F9', 'focus statusbar', function () {
+                  return Keying.focusIn(comp);
+                });
+              }),
+              runOnDetached(function (_comp) {
+                editor.shortcuts.remove('ctrl+F9');
+              })
+            ])
+          ])
+        };
+      };
+      var getScopes = cached(function () {
+        return categorise(registryContextToolbars, function (toolbarApi) {
+          var alloySpec = buildToolbar([toolbarApi]);
+          emitWith(contextbar, forwardSlideEvent, { forwardContents: wrapInPopDialog(alloySpec) });
+        });
+      });
+      var buildContextToolbarGroups = function (allButtons, ctx) {
+        return identifyButtons(editor, {
+          buttons: allButtons,
+          toolbar: ctx.items,
+          allowToolbarGroups: false
+        }, extras, Option.some(['form:']));
+      };
+      var buildContextMenuGroups = function (ctx, providers) {
+        return ContextForm.buildInitGroups(ctx, providers);
+      };
+      var buildToolbar = function (toolbars) {
+        var buttons = editor.ui.registry.getAll().buttons;
+        var scopes = getScopes();
+        var allButtons = __assign(__assign({}, buttons), scopes.formNavigators);
+        var toolbarType = getToolbarMode(editor) === ToolbarMode.scrolling ? ToolbarMode.scrolling : ToolbarMode.default;
+        var initGroups = flatten(map(toolbars, function (ctx) {
+          return ctx.type === 'contexttoolbar' ? buildContextToolbarGroups(allButtons, ctx) : buildContextMenuGroups(ctx, extras.backstage.shared.providers);
+        }));
+        return renderToolbar({
+          type: toolbarType,
+          uid: generate$1('context-toolbar'),
+          initGroups: initGroups,
+          onEscape: Option.none,
+          cyclicKeying: true,
+          providers: extras.backstage.shared.providers
+        });
+      };
+      editor.on(showContextToolbarEvent, function (e) {
+        var scopes = getScopes();
+        get(scopes.lookupTable, e.toolbarKey).each(function (ctx) {
+          launchContext([ctx], e.target === editor ? Option.none() : Option.some(e));
+          InlineView.getContent(contextbar).each(Keying.focusIn);
+        });
+      });
+      var getAnchor = function (position, element) {
+        var anchorage = position === 'node' ? extras.backstage.shared.anchors.node(element) : extras.backstage.shared.anchors.cursor();
+        return deepMerge(anchorage, getAnchorLayout(position, isTouch()));
+      };
+      var launchContext = function (toolbarApi, elem) {
+        clearTimer();
+        if (isTouch() && extras.backstage.isContextMenuOpen()) {
+          return;
+        }
+        var toolbarSpec = buildToolbar(toolbarApi);
+        var sElem = elem.map(Element.fromDom);
+        var anchor = getAnchor(toolbarApi[0].position, sElem);
+        lastAnchor.set(Option.some(anchor));
+        lastElement.set(elem);
+        var contextBarEle = contextbar.element();
+        remove$6(contextBarEle, 'display');
+        InlineView.showWithinBounds(contextbar, anchor, wrapInPopDialog(toolbarSpec), function () {
+          return Option.some(getBounds());
+        });
+        if (shouldContextToolbarHide()) {
+          set$2(contextBarEle, 'display', 'none');
+        }
+      };
+      var launchContextToolbar = function () {
+        if (!editor.hasFocus()) {
+          return;
+        }
+        var scopes = getScopes();
+        lookup$1(scopes, editor).fold(function () {
+          lastAnchor.set(Option.none());
+          InlineView.hide(contextbar);
+        }, function (info) {
+          launchContext(info.toolbars, Option.some(info.elem.dom()));
+        });
+      };
+      var clearTimer = function () {
+        var current = timer.get();
+        if (current !== null) {
+          global$2.clearTimeout(current);
+          timer.set(null);
+        }
+      };
+      var resetTimer = function (t) {
+        clearTimer();
+        timer.set(t);
+      };
+      editor.on('init', function () {
+        editor.on(hideContextToolbarEvent, forceHide);
+        editor.on('ScrollContent ScrollWindow longpress', hideOrRepositionIfNecessary);
+        editor.on('click keyup focus SetContent ObjectResized ResizeEditor', function () {
+          resetTimer(global$2.setEditorTimeout(editor, launchContextToolbar, 0));
+        });
+        editor.on('focusout', function (_e) {
+          global$2.setEditorTimeout(editor, function () {
+            if (search(sink.element()).isNone() && search(contextbar.element()).isNone()) {
+              lastAnchor.set(Option.none());
+              InlineView.hide(contextbar);
+            }
+          }, 0);
+        });
+        editor.on('SwitchMode', function () {
+          if (editor.mode.isReadOnly()) {
+            lastAnchor.set(Option.none());
+            InlineView.hide(contextbar);
+          }
+        });
+        editor.on('NodeChange', function (_e) {
+          search(contextbar.element()).fold(function () {
+            resetTimer(global$2.setEditorTimeout(editor, launchContextToolbar, 0));
+          }, function (_) {
+          });
+        });
+      });
+    };
+
+    var setup$3 = function (editor, mothership, uiMothership) {
+      var broadcastEvent = function (name, evt) {
+        each([
+          mothership,
+          uiMothership
+        ], function (ship) {
+          ship.broadcastEvent(name, evt);
+        });
+      };
+      var broadcastOn = function (channel, message) {
+        each([
+          mothership,
+          uiMothership
+        ], function (ship) {
+          ship.broadcastOn([channel], message);
+        });
+      };
+      var fireDismissPopups = function (evt) {
+        return broadcastOn(dismissPopups(), { target: evt.target() });
+      };
+      var onTouchstart = bind$3(Element.fromDom(domGlobals.document), 'touchstart', fireDismissPopups);
+      var onTouchmove = bind$3(Element.fromDom(domGlobals.document), 'touchmove', function (evt) {
+        return broadcastEvent(documentTouchmove(), evt);
+      });
+      var onTouchend = bind$3(Element.fromDom(domGlobals.document), 'touchend', function (evt) {
+        return broadcastEvent(documentTouchend(), evt);
+      });
+      var onMousedown = bind$3(Element.fromDom(domGlobals.document), 'mousedown', fireDismissPopups);
+      var onMouseup = bind$3(Element.fromDom(domGlobals.document), 'mouseup', function (evt) {
+        if (evt.raw().button === 0) {
+          broadcastOn(mouseReleased(), { target: evt.target() });
+        }
+      });
+      var onContentClick = function (raw) {
+        return broadcastOn(dismissPopups(), { target: Element.fromDom(raw.target) });
+      };
+      var onContentMouseup = function (raw) {
+        if (raw.button === 0) {
+          broadcastOn(mouseReleased(), { target: Element.fromDom(raw.target) });
+        }
+      };
+      var onWindowScroll = function (evt) {
+        return broadcastEvent(windowScroll(), fromRawEvent$1(evt));
+      };
+      var onWindowResize = function (evt) {
+        broadcastOn(repositionPopups(), {});
+        broadcastEvent(windowResize(), fromRawEvent$1(evt));
+      };
+      var onEditorResize = function () {
+        return broadcastOn(repositionPopups(), {});
+      };
+      editor.on('PostRender', function () {
+        editor.on('click', onContentClick);
+        editor.on('tap', onContentClick);
+        editor.on('mouseup', onContentMouseup);
+        editor.on('ScrollWindow', onWindowScroll);
+        editor.on('ResizeWindow', onWindowResize);
+        editor.on('ResizeEditor', onEditorResize);
+      });
+      editor.on('remove', function () {
+        editor.off('click', onContentClick);
+        editor.off('tap', onContentClick);
+        editor.off('mouseup', onContentMouseup);
+        editor.off('ScrollWindow', onWindowScroll);
+        editor.off('ResizeWindow', onWindowResize);
+        editor.off('ResizeEditor', onEditorResize);
+        onMousedown.unbind();
+        onTouchstart.unbind();
+        onTouchmove.unbind();
+        onTouchend.unbind();
+        onMouseup.unbind();
+      });
+      editor.on('detach', function () {
+        detachSystem(mothership);
+        detachSystem(uiMothership);
+        mothership.destroy();
+        uiMothership.destroy();
+      });
+    };
+
+    var parts$d = AlloyParts;
+    var partType$1 = PartType;
+
+    var schema$r = constant([
+      defaulted$1('shell', false),
+      strict$1('makeItem'),
+      defaulted$1('setupItem', noop),
+      SketchBehaviours.field('listBehaviours', [Replacing])
+    ]);
+    var customListDetail = function () {
+      return { behaviours: derive$1([Replacing.config({})]) };
+    };
+    var itemsPart = optional({
+      name: 'items',
+      overrides: customListDetail
+    });
+    var parts$e = constant([itemsPart]);
+    var name$2 = constant('CustomList');
+
+    var factory$f = function (detail, components, _spec, _external) {
+      var setItems = function (list, items) {
+        getListContainer(list).fold(function () {
+          domGlobals.console.error('Custom List was defined to not be a shell, but no item container was specified in components');
+          throw new Error('Custom List was defined to not be a shell, but no item container was specified in components');
+        }, function (container) {
+          var itemComps = Replacing.contents(container);
+          var numListsRequired = items.length;
+          var numListsToAdd = numListsRequired - itemComps.length;
+          var itemsToAdd = numListsToAdd > 0 ? range(numListsToAdd, function () {
+            return detail.makeItem();
+          }) : [];
+          var itemsToRemove = itemComps.slice(numListsRequired);
+          each(itemsToRemove, function (item) {
+            return Replacing.remove(container, item);
+          });
+          each(itemsToAdd, function (item) {
+            return Replacing.append(container, item);
+          });
+          var builtLists = Replacing.contents(container);
+          each(builtLists, function (item, i) {
+            detail.setupItem(list, item, items[i], i);
+          });
+        });
+      };
+      var extra = detail.shell ? {
+        behaviours: [Replacing.config({})],
+        components: []
+      } : {
+        behaviours: [],
+        components: components
+      };
+      var getListContainer = function (component) {
+        return detail.shell ? Option.some(component) : getPart(component, detail, 'items');
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: extra.components,
+        behaviours: augment(detail.listBehaviours, extra.behaviours),
+        apis: { setItems: setItems }
+      };
+    };
+    var CustomList = composite$1({
+      name: name$2(),
+      configFields: schema$r(),
+      partFields: parts$e(),
+      factory: factory$f,
+      apis: {
+        setItems: function (apis, list, items) {
+          apis.setItems(list, items);
+        }
+      }
+    });
+
+    var getOffsetParent = function (element) {
+      var isFixed = getRaw(element, 'position').is('fixed');
+      var offsetParent$1 = isFixed ? Option.none() : offsetParent(element);
+      return offsetParent$1.orThunk(function () {
+        var marker = Element.fromTag('span');
+        return parent(element).bind(function (parent) {
+          append(parent, marker);
+          var offsetParent$1 = offsetParent(marker);
+          remove(marker);
+          return offsetParent$1;
+        });
+      });
+    };
+    var getOrigin = function (element) {
+      return getOffsetParent(element).map(absolute).getOrThunk(function () {
+        return Position(0, 0);
+      });
+    };
+
+    var morphAdt = Adt.generate([
+      { static: [] },
+      { absolute: ['positionCss'] },
+      { fixed: ['positionCss'] }
+    ]);
+    var appear = function (component, contextualInfo) {
+      var elem = component.element();
+      add$2(elem, contextualInfo.transitionClass);
+      remove$4(elem, contextualInfo.fadeOutClass);
+      add$2(elem, contextualInfo.fadeInClass);
+      contextualInfo.onShow(component);
+    };
+    var disappear = function (component, contextualInfo) {
+      var elem = component.element();
+      add$2(elem, contextualInfo.transitionClass);
+      remove$4(elem, contextualInfo.fadeInClass);
+      add$2(elem, contextualInfo.fadeOutClass);
+      contextualInfo.onHide(component);
+    };
+    var isPartiallyVisible = function (box, viewport) {
+      return box.y < viewport.bottom && box.bottom > viewport.y;
+    };
+    var isTopCompletelyVisible = function (box, viewport) {
+      return box.y >= viewport.y;
+    };
+    var isBottomCompletelyVisible = function (box, viewport) {
+      return box.bottom <= viewport.bottom;
+    };
+    var isVisibleForModes = function (modes, box, viewport) {
+      return forall(modes, function (mode) {
+        switch (mode) {
+        case 'bottom':
+          return isBottomCompletelyVisible(box, viewport);
+        case 'top':
+          return isTopCompletelyVisible(box, viewport);
+        }
+      });
+    };
+    var getPrior = function (elem, state) {
+      return state.getInitialPosition().map(function (pos) {
+        return bounds$1(pos.bounds.x, pos.bounds.y, get$7(elem), get$6(elem));
+      });
+    };
+    var storePrior = function (elem, box, state) {
+      state.setInitialPosition(Option.some({
+        style: getAllRaw(elem),
+        position: get$4(elem, 'position') || 'static',
+        bounds: box
+      }));
+    };
+    var revertToOriginal = function (elem, box$1, state) {
+      return state.getInitialPosition().bind(function (position) {
+        state.setInitialPosition(Option.none());
+        switch (position.position) {
+        case 'static':
+          return Option.some(morphAdt.static());
+        case 'absolute':
+          var offsetBox_1 = getOffsetParent(elem).map(box).getOrThunk(function () {
+            return box(body());
+          });
+          return Option.some(morphAdt.absolute(NuPositionCss('absolute', get(position.style, 'left').map(function (_left) {
+            return box$1.x - offsetBox_1.x;
+          }), get(position.style, 'top').map(function (_top) {
+            return box$1.y - offsetBox_1.y;
+          }), get(position.style, 'right').map(function (_right) {
+            return offsetBox_1.right - box$1.right;
+          }), get(position.style, 'bottom').map(function (_bottom) {
+            return offsetBox_1.bottom - box$1.bottom;
+          }))));
+        default:
+          return Option.none();
+        }
+      });
+    };
+    var morphToOriginal = function (elem, viewport, state) {
+      return getPrior(elem, state).filter(function (box) {
+        return isVisibleForModes(state.getModes(), box, viewport);
+      }).bind(function (box) {
+        return revertToOriginal(elem, box, state);
+      });
+    };
+    var morphToFixed = function (elem, viewport, state) {
+      var box$1 = box(elem);
+      if (!isVisibleForModes(state.getModes(), box$1, viewport)) {
+        storePrior(elem, box$1, state);
+        var winBox = win();
+        var left = box$1.x - winBox.x;
+        var top = viewport.y - winBox.y;
+        var bottom = winBox.bottom - viewport.bottom;
+        var isTop = box$1.y <= viewport.y;
+        return Option.some(morphAdt.fixed(NuPositionCss('fixed', Option.some(left), isTop ? Option.some(top) : Option.none(), Option.none(), !isTop ? Option.some(bottom) : Option.none())));
+      } else {
+        return Option.none();
+      }
+    };
+    var getMorph = function (component, viewport, state) {
+      var elem = component.element();
+      var isDocked = getRaw(elem, 'position').is('fixed');
+      return isDocked ? morphToOriginal(elem, viewport, state) : morphToFixed(elem, viewport, state);
+    };
+    var getMorphToOriginal = function (component, state) {
+      var elem = component.element();
+      return getPrior(elem, state).bind(function (box) {
+        return revertToOriginal(elem, box, state);
+      });
+    };
+
+    var morphToStatic = function (component, config) {
+      each([
+        'left',
+        'right',
+        'top',
+        'bottom',
+        'position'
+      ], function (prop) {
+        return remove$6(component.element(), prop);
+      });
+      config.onUndocked(component);
+    };
+    var morphToCoord = function (component, config, position) {
+      applyPositionCss(component.element(), position);
+      var method = position.position() === 'fixed' ? config.onDocked : config.onUndocked;
+      method(component);
+    };
+    var updateVisibility = function (component, config, state, viewport, morphToDocked) {
+      if (morphToDocked === void 0) {
+        morphToDocked = false;
+      }
+      config.contextual.each(function (contextInfo) {
+        contextInfo.lazyContext(component).each(function (box) {
+          var isVisible = isPartiallyVisible(box, viewport);
+          if (isVisible !== state.isVisible()) {
+            state.setVisible(isVisible);
+            if (morphToDocked && !isVisible) {
+              add$3(component.element(), [contextInfo.fadeOutClass]);
+              contextInfo.onHide(component);
+            } else {
+              var method = isVisible ? appear : disappear;
+              method(component, contextInfo);
+            }
+          }
+        });
+      });
+    };
+    var refreshInternal = function (component, config, state) {
+      var viewport = config.lazyViewport(component);
+      var isDocked = state.isDocked();
+      if (isDocked) {
+        updateVisibility(component, config, state, viewport);
+      }
+      getMorph(component, viewport, state).each(function (morph) {
+        state.setDocked(!isDocked);
+        morph.fold(function () {
+          return morphToStatic(component, config);
+        }, function (position) {
+          return morphToCoord(component, config, position);
+        }, function (position) {
+          updateVisibility(component, config, state, viewport, true);
+          morphToCoord(component, config, position);
+        });
+      });
+    };
+    var resetInternal = function (component, config, state) {
+      var elem = component.element();
+      state.setDocked(false);
+      getMorphToOriginal(component, state).each(function (morph) {
+        morph.fold(function () {
+          return morphToStatic(component, config);
+        }, function (position) {
+          return morphToCoord(component, config, position);
+        }, noop);
+      });
+      state.setVisible(true);
+      config.contextual.each(function (contextInfo) {
+        remove$5(elem, [
+          contextInfo.fadeInClass,
+          contextInfo.fadeOutClass,
+          contextInfo.transitionClass
+        ]);
+        contextInfo.onShow(component);
+      });
+      refresh$4(component, config, state);
+    };
+    var refresh$4 = function (component, config, state) {
+      if (component.getSystem().isConnected()) {
+        refreshInternal(component, config, state);
+      }
+    };
+    var reset = function (component, config, state) {
+      if (state.isDocked()) {
+        resetInternal(component, config, state);
+      }
+    };
+    var isDocked = function (component, config, state) {
+      return state.isDocked();
+    };
+    var setModes = function (component, config, state, modes) {
+      return state.setModes(modes);
+    };
+    var getModes = function (component, config, state) {
+      return state.getModes();
+    };
+
+    var DockingApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        refresh: refresh$4,
+        reset: reset,
+        isDocked: isDocked,
+        getModes: getModes,
+        setModes: setModes
+    });
+
+    var events$f = function (dockInfo, dockState) {
+      return derive([
+        runOnSource(transitionend(), function (component, simulatedEvent) {
+          dockInfo.contextual.each(function (contextInfo) {
+            if (has$2(component.element(), contextInfo.transitionClass)) {
+              remove$5(component.element(), [
+                contextInfo.transitionClass,
+                contextInfo.fadeInClass
+              ]);
+              var notify = dockState.isVisible() ? contextInfo.onShown : contextInfo.onHidden;
+              notify(component);
+            }
+            simulatedEvent.stop();
+          });
+        }),
+        run(windowScroll(), function (component, _) {
+          refresh$4(component, dockInfo, dockState);
+        }),
+        run(windowResize(), function (component, _) {
+          reset(component, dockInfo, dockState);
+        })
+      ]);
+    };
+
+    var ActiveDocking = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        events: events$f
+    });
+
+    var DockingSchema = [
+      optionObjOf('contextual', [
+        strictString('fadeInClass'),
+        strictString('fadeOutClass'),
+        strictString('transitionClass'),
+        strictFunction('lazyContext'),
+        onHandler('onShow'),
+        onHandler('onShown'),
+        onHandler('onHide'),
+        onHandler('onHidden')
+      ]),
+      defaultedFunction('lazyViewport', win),
+      defaultedArrayOf('modes', [
+        'top',
+        'bottom'
+      ], string),
+      onHandler('onDocked'),
+      onHandler('onUndocked')
+    ];
+
+    var init$b = function (spec) {
+      var docked = Cell(false);
+      var visible = Cell(true);
+      var initialBounds = Cell(Option.none());
+      var modes = Cell(spec.modes);
+      var readState = function () {
+        return 'docked:  ' + docked.get() + ', visible: ' + visible.get() + ', modes: ' + modes.get().join(',');
+      };
+      return nu$5({
+        isDocked: docked.get,
+        setDocked: docked.set,
+        getInitialPosition: initialBounds.get,
+        setInitialPosition: initialBounds.set,
+        isVisible: visible.get,
+        setVisible: visible.set,
+        getModes: modes.get,
+        setModes: modes.set,
+        readState: readState
+      });
+    };
+
+    var DockingState = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        init: init$b
+    });
+
+    var Docking = create$1({
+      fields: DockingSchema,
+      name: 'docking',
+      active: ActiveDocking,
+      apis: DockingApis,
+      state: DockingState
+    });
+
+    var visibility = {
+      fadeInClass: 'tox-editor-dock-fadein',
+      fadeOutClass: 'tox-editor-dock-fadeout',
+      transitionClass: 'tox-editor-dock-transition'
+    };
+    var editorStickyOnClass = 'tox-tinymce--toolbar-sticky-on';
+    var editorStickyOffClass = 'tox-tinymce--toolbar-sticky-off';
+    var scrollFromBehindHeader = function (e, containerHeader) {
+      var doc = owner(containerHeader);
+      var viewHeight = doc.dom().defaultView.innerHeight;
+      var scrollPos = get$8(doc);
+      var markerElement = Element.fromDom(e.elm);
+      var markerPos = absolute$1(markerElement);
+      var markerHeight = get$6(markerElement);
+      var markerTop = markerPos.y;
+      var markerBottom = markerTop + markerHeight;
+      var editorHeaderPos = absolute(containerHeader);
+      var editorHeaderHeight = get$6(containerHeader);
+      var editorHeaderTop = editorHeaderPos.top();
+      var editorHeaderBottom = editorHeaderTop + editorHeaderHeight;
+      var editorHeaderDockedAtTop = Math.abs(editorHeaderTop - scrollPos.top()) < 2;
+      var editorHeaderDockedAtBottom = Math.abs(editorHeaderBottom - (scrollPos.top() + viewHeight)) < 2;
+      if (editorHeaderDockedAtTop && markerTop < editorHeaderBottom) {
+        to(scrollPos.left(), markerTop - editorHeaderHeight, doc);
+      } else if (editorHeaderDockedAtBottom && markerBottom > editorHeaderTop) {
+        var y = markerTop - viewHeight + markerHeight + editorHeaderHeight;
+        to(scrollPos.left(), y, doc);
+      }
+    };
+    var isDockedMode = function (header, mode) {
+      return contains(Docking.getModes(header), mode);
+    };
+    var updateIframeContentFlow = function (header) {
+      var getOccupiedHeight = function (elm) {
+        return getOuter$1(elm) + (parseInt(get$4(elm, 'margin-top'), 10) || 0) + (parseInt(get$4(elm, 'margin-bottom'), 10) || 0);
+      };
+      var elm = header.element();
+      parent(elm).each(function (parentElem) {
+        var padding = 'padding-' + Docking.getModes(header)[0];
+        if (Docking.isDocked(header)) {
+          var parentWidth = get$7(parentElem);
+          set$2(elm, 'width', parentWidth + 'px');
+          set$2(parentElem, padding, getOccupiedHeight(elm) + 'px');
+        } else {
+          remove$6(elm, 'width');
+          remove$6(parentElem, padding);
+        }
+      });
+    };
+    var updateSinkVisibility = function (sinkElem, visible) {
+      if (visible) {
+        remove$4(sinkElem, visibility.fadeOutClass);
+        add$3(sinkElem, [
+          visibility.transitionClass,
+          visibility.fadeInClass
+        ]);
+      } else {
+        remove$4(sinkElem, visibility.fadeInClass);
+        add$3(sinkElem, [
+          visibility.fadeOutClass,
+          visibility.transitionClass
+        ]);
+      }
+    };
+    var updateEditorClasses = function (editor, docked) {
+      var editorContainer = Element.fromDom(editor.getContainer());
+      if (docked) {
+        add$2(editorContainer, editorStickyOnClass);
+        remove$4(editorContainer, editorStickyOffClass);
+      } else {
+        add$2(editorContainer, editorStickyOffClass);
+        remove$4(editorContainer, editorStickyOnClass);
+      }
+    };
+    var restoreFocus = function (headerElem, focusedElem) {
+      var ownerDoc = owner(focusedElem);
+      active(ownerDoc).filter(function (activeElm) {
+        return !eq$1(focusedElem, activeElm);
+      }).filter(function (activeElm) {
+        return eq$1(activeElm, Element.fromDom(ownerDoc.dom().body)) || contains$2(headerElem, activeElm);
+      }).each(function () {
+        return focus$1(focusedElem);
+      });
+    };
+    var findFocusedElem = function (rootElm, lazySink) {
+      return search(rootElm).orThunk(function () {
+        return lazySink().toOption().bind(function (sink) {
+          return search(sink.element());
+        });
+      });
+    };
+    var setup$4 = function (editor, sharedBackstage, lazyHeader) {
+      if (!editor.inline) {
+        if (!sharedBackstage.header.isPositionedAtTop()) {
+          editor.on('ResizeEditor', function () {
+            lazyHeader().each(Docking.reset);
+          });
+        }
+        editor.on('ResizeWindow ResizeEditor', function () {
+          lazyHeader().each(updateIframeContentFlow);
+        });
+        editor.on('SkinLoaded', function () {
+          lazyHeader().each(function (comp) {
+            Docking.isDocked(comp) ? Docking.reset(comp) : Docking.refresh(comp);
+          });
+        });
+        editor.on('FullscreenStateChanged', function () {
+          lazyHeader().each(Docking.reset);
+        });
+      }
+      editor.on('AfterScrollIntoView', function (e) {
+        lazyHeader().each(function (header) {
+          Docking.refresh(header);
+          var headerElem = header.element();
+          if (isVisible(headerElem)) {
+            scrollFromBehindHeader(e, headerElem);
+          }
+        });
+      });
+      editor.on('PostRender', function () {
+        updateEditorClasses(editor, false);
+      });
+    };
+    var isDocked$1 = function (lazyHeader) {
+      return lazyHeader().map(Docking.isDocked).getOr(false);
+    };
+    var getIframeBehaviours = function () {
+      var _a;
+      return [Receiving.config({ channels: (_a = {}, _a[toolbarHeightChange()] = { onReceive: updateIframeContentFlow }, _a) })];
+    };
+    var getBehaviours$2 = function (editor, sharedBackstage) {
+      var focusedElm = Cell(Option.none());
+      var lazySink = sharedBackstage.getSink;
+      var runOnSinkElement = function (f) {
+        lazySink().each(function (sink) {
+          return f(sink.element());
+        });
+      };
+      var onDockingSwitch = function (comp) {
+        if (!editor.inline) {
+          updateIframeContentFlow(comp);
+        }
+        updateEditorClasses(editor, Docking.isDocked(comp));
+        comp.getSystem().broadcastOn([repositionPopups()], {});
+        lazySink().each(function (sink) {
+          return sink.getSystem().broadcastOn([repositionPopups()], {});
+        });
+      };
+      var additionalBehaviours = editor.inline ? [] : getIframeBehaviours();
+      return __spreadArrays([
+        Focusing.config({}),
+        Docking.config({
+          contextual: __assign({
+            lazyContext: function (comp) {
+              var headerHeight = getOuter$1(comp.element());
+              var container = editor.inline ? editor.getContentAreaContainer() : editor.getContainer();
+              var box$1 = box(Element.fromDom(container));
+              var boxHeight = box$1.height - headerHeight;
+              var topBound = box$1.y + (isDockedMode(comp, 'top') ? 0 : headerHeight);
+              return Option.some(bounds$1(box$1.x, topBound, box$1.width, boxHeight));
+            },
+            onShow: function () {
+              runOnSinkElement(function (elem) {
+                return updateSinkVisibility(elem, true);
+              });
+            },
+            onShown: function (comp) {
+              runOnSinkElement(function (elem) {
+                return remove$5(elem, [
+                  visibility.transitionClass,
+                  visibility.fadeInClass
+                ]);
+              });
+              focusedElm.get().each(function (elem) {
+                restoreFocus(comp.element(), elem);
+                focusedElm.set(Option.none());
+              });
+            },
+            onHide: function (comp) {
+              focusedElm.set(findFocusedElem(comp.element(), lazySink));
+              runOnSinkElement(function (elem) {
+                return updateSinkVisibility(elem, false);
+              });
+            },
+            onHidden: function () {
+              runOnSinkElement(function (elem) {
+                return remove$5(elem, [visibility.transitionClass]);
+              });
+            }
+          }, visibility),
+          modes: [sharedBackstage.header.getDockingMode()],
+          onDocked: onDockingSwitch,
+          onUndocked: onDockingSwitch
+        })
+      ], additionalBehaviours);
+    };
+
+    var StickyHeader = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        setup: setup$4,
+        isDocked: isDocked$1,
+        getBehaviours: getBehaviours$2
+    });
+
+    var setup$5 = noop;
+    var isDocked$2 = never;
+    var getBehaviours$3 = constant([]);
+
+    var StaticHeader = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        setup: setup$5,
+        isDocked: isDocked$2,
+        getBehaviours: getBehaviours$3
+    });
+
+    var renderHeader = function (spec) {
+      var editor = spec.editor;
+      var getBehaviours = spec.sticky ? getBehaviours$2 : getBehaviours$3;
+      return {
+        uid: spec.uid,
+        dom: spec.dom,
+        components: spec.components,
+        behaviours: derive$1(getBehaviours(editor, spec.sharedBackstage))
+      };
+    };
+
+    var factory$g = function (detail, spec) {
+      var setMenus = function (comp, menus) {
+        var newMenus = map(menus, function (m) {
+          var buttonSpec = {
+            type: 'menubutton',
+            text: m.text,
+            fetch: function (callback) {
+              callback(m.getItems());
+            }
+          };
+          var internal = createMenuButton(buttonSpec).mapError(function (errInfo) {
+            return formatError(errInfo);
+          }).getOrDie();
+          return renderMenuButton(internal, 'tox-mbtn', spec.backstage, Option.some('menuitem'));
+        });
+        Replacing.set(comp, newMenus);
+      };
+      var apis = {
+        focus: Keying.focusIn,
+        setMenus: setMenus
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: [],
+        behaviours: derive$1([
+          Replacing.config({}),
+          config('menubar-events', [
+            runOnAttached(function (component) {
+              detail.onSetup(component);
+            }),
+            run(mouseover(), function (comp, se) {
+              descendant$1(comp.element(), '.' + 'tox-mbtn--active').each(function (activeButton) {
+                closest$3(se.event().target(), '.' + 'tox-mbtn').each(function (hoveredButton) {
+                  if (!eq$1(activeButton, hoveredButton)) {
+                    comp.getSystem().getByDom(activeButton).each(function (activeComp) {
+                      comp.getSystem().getByDom(hoveredButton).each(function (hoveredComp) {
+                        Dropdown.expand(hoveredComp);
+                        Dropdown.close(activeComp);
+                        Focusing.focus(hoveredComp);
+                      });
+                    });
+                  }
+                });
+              });
+            }),
+            run(focusShifted(), function (comp, se) {
+              se.event().prevFocus().bind(function (prev) {
+                return comp.getSystem().getByDom(prev).toOption();
+              }).each(function (prev) {
+                se.event().newFocus().bind(function (nu) {
+                  return comp.getSystem().getByDom(nu).toOption();
+                }).each(function (nu) {
+                  if (Dropdown.isOpen(prev)) {
+                    Dropdown.expand(nu);
+                    Dropdown.close(prev);
+                  }
+                });
+              });
+            })
+          ]),
+          Keying.config({
+            mode: 'flow',
+            selector: '.' + 'tox-mbtn',
+            onEscape: function (comp) {
+              detail.onEscape(comp);
+              return Option.some(true);
+            }
+          }),
+          Tabstopping.config({})
+        ]),
+        apis: apis,
+        domModification: { attributes: { role: 'menubar' } }
+      };
+    };
+    var SilverMenubar = single$2({
+      factory: factory$g,
+      name: 'silver.Menubar',
+      configFields: [
+        strict$1('dom'),
+        strict$1('uid'),
+        strict$1('onEscape'),
+        strict$1('backstage'),
+        defaulted$1('onSetup', noop)
+      ],
+      apis: {
+        focus: function (apis, comp) {
+          apis.focus(comp);
+        },
+        setMenus: function (apis, comp, menus) {
+          apis.setMenus(comp, menus);
+        }
+      }
+    });
+
+    var owner$4 = 'container';
+    var schema$s = [field$1('slotBehaviours', [])];
+    var getPartName$1 = function (name) {
+      return '<alloy.field.' + name + '>';
+    };
+    var sketch$2 = function (sSpec) {
+      var parts = function () {
+        var record = [];
+        var slot = function (name, config) {
+          record.push(name);
+          return generateOne(owner$4, getPartName$1(name), config);
+        };
+        return {
+          slot: slot,
+          record: function () {
+            return record;
+          }
+        };
+      }();
+      var spec = sSpec(parts);
+      var partNames = parts.record();
+      var fieldParts = map(partNames, function (n) {
+        return required({
+          name: n,
+          pname: getPartName$1(n)
+        });
+      });
+      return composite(owner$4, schema$s, fieldParts, make$7, spec);
+    };
+    var make$7 = function (detail, components) {
+      var getSlotNames = function (_) {
+        return getAllPartNames(detail);
+      };
+      var getSlot = function (container, key) {
+        return getPart(container, detail, key);
+      };
+      var onSlot = function (f, def) {
+        return function (container, key) {
+          return getPart(container, detail, key).map(function (slot) {
+            return f(slot, key);
+          }).getOr(def);
+        };
+      };
+      var onSlots = function (f) {
+        return function (container, keys) {
+          each(keys, function (key) {
+            return f(container, key);
+          });
+        };
+      };
+      var doShowing = function (comp, _key) {
+        return get$2(comp.element(), 'aria-hidden') !== 'true';
+      };
+      var doShow = function (comp, key) {
+        if (!doShowing(comp)) {
+          var element = comp.element();
+          remove$6(element, 'display');
+          remove$1(element, 'aria-hidden');
+          emitWith(comp, slotVisibility(), {
+            name: key,
+            visible: true
+          });
+        }
+      };
+      var doHide = function (comp, key) {
+        if (doShowing(comp)) {
+          var element = comp.element();
+          set$2(element, 'display', 'none');
+          set$1(element, 'aria-hidden', 'true');
+          emitWith(comp, slotVisibility(), {
+            name: key,
+            visible: false
+          });
+        }
+      };
+      var isShowing = onSlot(doShowing, false);
+      var hideSlot = onSlot(doHide);
+      var hideSlots = onSlots(hideSlot);
+      var hideAllSlots = function (container) {
+        return hideSlots(container, getSlotNames());
+      };
+      var showSlot = onSlot(doShow);
+      var apis = {
+        getSlotNames: getSlotNames,
+        getSlot: getSlot,
+        isShowing: isShowing,
+        hideSlot: hideSlot,
+        hideAllSlots: hideAllSlots,
+        showSlot: showSlot
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        behaviours: get$c(detail.slotBehaviours),
+        apis: apis
+      };
+    };
+    var slotApis = map$1({
+      getSlotNames: function (apis, c) {
+        return apis.getSlotNames(c);
+      },
+      getSlot: function (apis, c, key) {
+        return apis.getSlot(c, key);
+      },
+      isShowing: function (apis, c, key) {
+        return apis.isShowing(c, key);
+      },
+      hideSlot: function (apis, c, key) {
+        return apis.hideSlot(c, key);
+      },
+      hideAllSlots: function (apis, c) {
+        return apis.hideAllSlots(c);
+      },
+      showSlot: function (apis, c, key) {
+        return apis.showSlot(c, key);
+      }
+    }, function (value) {
+      return makeApi(value);
+    });
+    var SlotContainer = __assign(__assign({}, slotApis), { sketch: sketch$2 });
+
+    var sidebarSchema = objOf([
+      optionString('icon'),
+      optionString('tooltip'),
+      defaultedFunction('onShow', noop),
+      defaultedFunction('onHide', noop),
+      defaultedFunction('onSetup', function () {
+        return noop;
+      })
+    ]);
+    var createSidebar = function (spec) {
+      return asRaw('sidebar', sidebarSchema, spec);
+    };
+
+    var setup$6 = function (editor) {
+      var sidebars = editor.ui.registry.getAll().sidebars;
+      each(keys(sidebars), function (name) {
+        var spec = sidebars[name];
+        var isActive = function () {
+          return Option.from(editor.queryCommandValue('ToggleSidebar')).is(name);
+        };
+        editor.ui.registry.addToggleButton(name, {
+          icon: spec.icon,
+          tooltip: spec.tooltip,
+          onAction: function (buttonApi) {
+            editor.execCommand('ToggleSidebar', false, name);
+            buttonApi.setActive(isActive());
+          },
+          onSetup: function (buttonApi) {
+            var handleToggle = function () {
+              return buttonApi.setActive(isActive());
+            };
+            editor.on('ToggleSidebar', handleToggle);
+            return function () {
+              editor.off('ToggleSidebar', handleToggle);
+            };
+          }
+        });
+      });
+    };
+    var getApi = function (comp) {
+      return {
+        element: function () {
+          return comp.element().dom();
+        }
+      };
+    };
+    var makePanels = function (parts, panelConfigs) {
+      var specs = map(keys(panelConfigs), function (name) {
+        var spec = panelConfigs[name];
+        var bridged = getOrDie(createSidebar(spec));
+        return {
+          name: name,
+          getApi: getApi,
+          onSetup: bridged.onSetup,
+          onShow: bridged.onShow,
+          onHide: bridged.onHide
+        };
+      });
+      return map(specs, function (spec) {
+        var editorOffCell = Cell(noop);
+        return parts.slot(spec.name, {
+          dom: {
+            tag: 'div',
+            classes: ['tox-sidebar__pane']
+          },
+          behaviours: SimpleBehaviours.unnamedEvents([
+            onControlAttached(spec, editorOffCell),
+            onControlDetached(spec, editorOffCell),
+            run(slotVisibility(), function (sidepanel, se) {
+              var data = se.event();
+              var optSidePanelSpec = find(specs, function (config) {
+                return config.name === data.name();
+              });
+              optSidePanelSpec.each(function (sidePanelSpec) {
+                var handler = data.visible() ? sidePanelSpec.onShow : sidePanelSpec.onHide;
+                handler(sidePanelSpec.getApi(sidepanel));
+              });
+            })
+          ])
+        });
+      });
+    };
+    var makeSidebar = function (panelConfigs) {
+      return SlotContainer.sketch(function (parts) {
+        return {
+          dom: {
+            tag: 'div',
+            classes: ['tox-sidebar__pane-container']
+          },
+          components: makePanels(parts, panelConfigs),
+          slotBehaviours: SimpleBehaviours.unnamedEvents([runOnAttached(function (slotContainer) {
+              return SlotContainer.hideAllSlots(slotContainer);
+            })])
+        };
+      });
+    };
+    var setSidebar = function (sidebar, panelConfigs) {
+      var optSlider = Composing.getCurrent(sidebar);
+      optSlider.each(function (slider) {
+        return Replacing.set(slider, [makeSidebar(panelConfigs)]);
+      });
+    };
+    var toggleSidebar = function (sidebar, name) {
+      var optSlider = Composing.getCurrent(sidebar);
+      optSlider.each(function (slider) {
+        var optSlotContainer = Composing.getCurrent(slider);
+        optSlotContainer.each(function (slotContainer) {
+          if (Sliding.hasGrown(slider)) {
+            if (SlotContainer.isShowing(slotContainer, name)) {
+              Sliding.shrink(slider);
+            } else {
+              SlotContainer.hideAllSlots(slotContainer);
+              SlotContainer.showSlot(slotContainer, name);
+            }
+          } else {
+            SlotContainer.hideAllSlots(slotContainer);
+            SlotContainer.showSlot(slotContainer, name);
+            Sliding.grow(slider);
+          }
+        });
+      });
+    };
+    var whichSidebar = function (sidebar) {
+      var optSlider = Composing.getCurrent(sidebar);
+      return optSlider.bind(function (slider) {
+        var sidebarOpen = Sliding.isGrowing(slider) || Sliding.hasGrown(slider);
+        if (sidebarOpen) {
+          var optSlotContainer = Composing.getCurrent(slider);
+          return optSlotContainer.bind(function (slotContainer) {
+            return find(SlotContainer.getSlotNames(slotContainer), function (name) {
+              return SlotContainer.isShowing(slotContainer, name);
+            });
+          });
+        } else {
+          return Option.none();
+        }
+      });
+    };
+    var fixSize = generate$1('FixSizeEvent');
+    var autoSize = generate$1('AutoSizeEvent');
+    var renderSidebar = function (spec) {
+      return {
+        uid: spec.uid,
+        dom: {
+          tag: 'div',
+          classes: ['tox-sidebar'],
+          attributes: { role: 'complementary' }
+        },
+        components: [{
+            dom: {
+              tag: 'div',
+              classes: ['tox-sidebar__slider']
+            },
+            components: [],
+            behaviours: derive$1([
+              Tabstopping.config({}),
+              Focusing.config({}),
+              Sliding.config({
+                dimension: { property: 'width' },
+                closedClass: 'tox-sidebar--sliding-closed',
+                openClass: 'tox-sidebar--sliding-open',
+                shrinkingClass: 'tox-sidebar--sliding-shrinking',
+                growingClass: 'tox-sidebar--sliding-growing',
+                onShrunk: function (slider) {
+                  var optSlotContainer = Composing.getCurrent(slider);
+                  optSlotContainer.each(SlotContainer.hideAllSlots);
+                  emit(slider, autoSize);
+                },
+                onGrown: function (slider) {
+                  emit(slider, autoSize);
+                },
+                onStartGrow: function (slider) {
+                  emitWith(slider, fixSize, { width: getRaw(slider.element(), 'width').getOr('') });
+                },
+                onStartShrink: function (slider) {
+                  emitWith(slider, fixSize, { width: get$7(slider.element()) + 'px' });
+                }
+              }),
+              Replacing.config({}),
+              Composing.config({
+                find: function (comp) {
+                  var children = Replacing.contents(comp);
+                  return head(children);
+                }
+              })
+            ])
+          }],
+        behaviours: derive$1([
+          ComposingConfigs.childAt(0),
+          config('sidebar-sliding-events', [
+            run(fixSize, function (comp, se) {
+              set$2(comp.element(), 'width', se.event().width());
+            }),
+            run(autoSize, function (comp, _se) {
+              remove$6(comp.element(), 'width');
+            })
+          ])
+        ])
+      };
+    };
+
+    var getAttrs = function (elem) {
+      var attributes = elem.dom().attributes !== undefined ? elem.dom().attributes : [];
+      return foldl(attributes, function (b, attr) {
+        var _a;
+        if (attr.name === 'class') {
+          return b;
+        } else {
+          return __assign(__assign({}, b), (_a = {}, _a[attr.name] = attr.value, _a));
+        }
+      }, {});
+    };
+    var getClasses = function (elem) {
+      return Array.prototype.slice.call(elem.dom().classList, 0);
+    };
+    var fromHtml$2 = function (html) {
+      var elem = Element.fromHtml(html);
+      var children$1 = children(elem);
+      var attrs = getAttrs(elem);
+      var classes = getClasses(elem);
+      var contents = children$1.length === 0 ? {} : { innerHtml: get$1(elem) };
+      return __assign({
+        tag: name(elem),
+        classes: classes,
+        attributes: attrs
+      }, contents);
+    };
+
+    var renderSpinner = function (providerBackstage) {
+      return {
+        dom: {
+          tag: 'div',
+          attributes: { 'aria-label': providerBackstage.translate('Loading...') },
+          classes: ['tox-throbber__busy-spinner']
+        },
+        components: [{ dom: fromHtml$2('<div class="tox-spinner"><div></div><div></div><div></div></div>') }],
+        behaviours: derive$1([
+          Keying.config({
+            mode: 'special',
+            onTab: function () {
+              return Option.some(true);
+            },
+            onShiftTab: function () {
+              return Option.some(true);
+            }
+          }),
+          Focusing.config({})
+        ])
+      };
+    };
+    var toggleThrobber = function (comp, state, providerBackstage) {
+      var element = comp.element();
+      if (state === true) {
+        Replacing.set(comp, [renderSpinner(providerBackstage)]);
+        remove$6(element, 'display');
+        remove$1(element, 'aria-hidden');
+      } else {
+        Replacing.set(comp, []);
+        set$2(element, 'display', 'none');
+        set$1(element, 'aria-hidden', 'true');
+      }
+    };
+    var renderThrobber = function (spec) {
+      return {
+        uid: spec.uid,
+        dom: {
+          tag: 'div',
+          attributes: { 'aria-hidden': 'true' },
+          classes: ['tox-throbber'],
+          styles: { display: 'none' }
+        },
+        behaviours: derive$1([Replacing.config({})]),
+        components: []
+      };
+    };
+    var setup$7 = function (editor, lazyThrobber, sharedBackstage) {
+      var throbberState = Cell(false);
+      var timer = Cell(Option.none());
+      var toggle = function (state) {
+        if (state !== throbberState.get()) {
+          toggleThrobber(lazyThrobber(), state, sharedBackstage.providers);
+          throbberState.set(state);
+        }
+      };
+      editor.on('ProgressState', function (e) {
+        timer.get().each(global$2.clearTimeout);
+        if (isNumber(e.time)) {
+          var timerId = global$2.setEditorTimeout(editor, function () {
+            return toggle(e.state);
+          }, e.time);
+          timer.set(Option.some(timerId));
+        } else {
+          toggle(e.state);
+          timer.set(Option.none());
+        }
+      });
+    };
+
+    var factory$h = function (detail, components, _spec) {
+      var apis = {
+        getSocket: function (comp) {
+          return parts$d.getPart(comp, detail, 'socket');
+        },
+        setSidebar: function (comp, panelConfigs) {
+          parts$d.getPart(comp, detail, 'sidebar').each(function (sidebar) {
+            return setSidebar(sidebar, panelConfigs);
+          });
+        },
+        toggleSidebar: function (comp, name) {
+          parts$d.getPart(comp, detail, 'sidebar').each(function (sidebar) {
+            return toggleSidebar(sidebar, name);
+          });
+        },
+        whichSidebar: function (comp) {
+          return parts$d.getPart(comp, detail, 'sidebar').bind(whichSidebar).getOrNull();
+        },
+        getHeader: function (comp) {
+          return parts$d.getPart(comp, detail, 'header');
+        },
+        getToolbar: function (comp) {
+          return parts$d.getPart(comp, detail, 'toolbar');
+        },
+        setToolbar: function (comp, groups) {
+          parts$d.getPart(comp, detail, 'toolbar').each(function (toolbar) {
+            toolbar.getApis().setGroups(toolbar, groups);
+          });
+        },
+        setToolbars: function (comp, toolbars) {
+          parts$d.getPart(comp, detail, 'multiple-toolbar').each(function (mToolbar) {
+            CustomList.setItems(mToolbar, toolbars);
+          });
+        },
+        refreshToolbar: function (comp) {
+          var toolbar = parts$d.getPart(comp, detail, 'toolbar');
+          toolbar.each(function (toolbar) {
+            return toolbar.getApis().refresh(toolbar);
+          });
+        },
+        getThrobber: function (comp) {
+          return parts$d.getPart(comp, detail, 'throbber');
+        },
+        focusToolbar: function (comp) {
+          var optToolbar = parts$d.getPart(comp, detail, 'toolbar').orThunk(function () {
+            return parts$d.getPart(comp, detail, 'multiple-toolbar');
+          });
+          optToolbar.each(function (toolbar) {
+            Keying.focusIn(toolbar);
+          });
+        },
+        setMenubar: function (comp, menus) {
+          parts$d.getPart(comp, detail, 'menubar').each(function (menubar) {
+            SilverMenubar.setMenus(menubar, menus);
+          });
+        },
+        focusMenubar: function (comp) {
+          parts$d.getPart(comp, detail, 'menubar').each(function (menubar) {
+            SilverMenubar.focus(menubar);
+          });
+        }
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        apis: apis,
+        behaviours: detail.behaviours
+      };
+    };
+    var partMenubar = partType$1.optional({
+      factory: SilverMenubar,
+      name: 'menubar',
+      schema: [strict$1('backstage')]
+    });
+    var toolbarFactory = function (spec) {
+      if (spec.type === ToolbarMode.sliding) {
+        return renderSlidingMoreToolbar;
+      } else if (spec.type === ToolbarMode.floating) {
+        return renderFloatingMoreToolbar;
+      } else {
+        return renderToolbar;
+      }
+    };
+    var partMultipleToolbar = partType$1.optional({
+      factory: {
+        sketch: function (spec) {
+          return CustomList.sketch({
+            uid: spec.uid,
+            dom: spec.dom,
+            listBehaviours: derive$1([Keying.config({
+                mode: 'acyclic',
+                selector: '.tox-toolbar'
+              })]),
+            makeItem: function () {
+              return renderToolbar({
+                type: spec.type,
+                uid: generate$1('multiple-toolbar-item'),
+                cyclicKeying: false,
+                initGroups: [],
+                providers: spec.providers,
+                onEscape: function () {
+                  return Option.none();
+                }
+              });
+            },
+            setupItem: function (_mToolbar, tc, data, _index) {
+              Toolbar.setGroups(tc, data);
+            },
+            shell: true
+          });
+        }
+      },
+      name: 'multiple-toolbar',
+      schema: [
+        strict$1('dom'),
+        strict$1('onEscape')
+      ]
+    });
+    var partToolbar = partType$1.optional({
+      factory: {
+        sketch: function (spec) {
+          var renderer = toolbarFactory(spec);
+          var toolbarSpec = {
+            type: spec.type,
+            uid: spec.uid,
+            onEscape: function () {
+              spec.onEscape();
+              return Option.some(true);
+            },
+            cyclicKeying: false,
+            initGroups: [],
+            getSink: spec.getSink,
+            providers: spec.providers,
+            moreDrawerData: {
+              lazyToolbar: spec.lazyToolbar,
+              lazyMoreButton: spec.lazyMoreButton,
+              lazyHeader: spec.lazyHeader
+            },
+            attributes: spec.attributes
+          };
+          return renderer(toolbarSpec);
+        }
+      },
+      name: 'toolbar',
+      schema: [
+        strict$1('dom'),
+        strict$1('onEscape'),
+        strict$1('getSink')
+      ]
+    });
+    var partHeader = partType$1.optional({
+      factory: { sketch: renderHeader },
+      name: 'header',
+      schema: [strict$1('dom')]
+    });
+    var partSocket = partType$1.optional({
+      name: 'socket',
+      schema: [strict$1('dom')]
+    });
+    var partSidebar = partType$1.optional({
+      factory: { sketch: renderSidebar },
+      name: 'sidebar',
+      schema: [strict$1('dom')]
+    });
+    var partThrobber = partType$1.optional({
+      factory: { sketch: renderThrobber },
+      name: 'throbber',
+      schema: [strict$1('dom')]
+    });
+    var OuterContainer = composite$1({
+      name: 'OuterContainer',
+      factory: factory$h,
+      configFields: [
+        strict$1('dom'),
+        strict$1('behaviours')
+      ],
+      partFields: [
+        partHeader,
+        partMenubar,
+        partToolbar,
+        partMultipleToolbar,
+        partSocket,
+        partSidebar,
+        partThrobber
+      ],
+      apis: {
+        getSocket: function (apis, comp) {
+          return apis.getSocket(comp);
+        },
+        setSidebar: function (apis, comp, panelConfigs) {
+          apis.setSidebar(comp, panelConfigs);
+        },
+        toggleSidebar: function (apis, comp, name) {
+          apis.toggleSidebar(comp, name);
+        },
+        whichSidebar: function (apis, comp) {
+          return apis.whichSidebar(comp);
+        },
+        getHeader: function (apis, comp) {
+          return apis.getHeader(comp);
+        },
+        getToolbar: function (apis, comp) {
+          return apis.getToolbar(comp);
+        },
+        setToolbar: function (apis, comp, grps) {
+          var groups = map(grps, function (grp) {
+            return renderToolbarGroup(grp);
+          });
+          apis.setToolbar(comp, groups);
+        },
+        setToolbars: function (apis, comp, ts) {
+          var renderedToolbars = map(ts, function (g) {
+            return map(g, renderToolbarGroup);
+          });
+          apis.setToolbars(comp, renderedToolbars);
+        },
+        refreshToolbar: function (apis, comp) {
+          return apis.refreshToolbar(comp);
+        },
+        getThrobber: function (apis, comp) {
+          return apis.getThrobber(comp);
+        },
+        setMenubar: function (apis, comp, menus) {
+          apis.setMenubar(comp, menus);
+        },
+        focusMenubar: function (apis, comp) {
+          apis.focusMenubar(comp);
+        },
+        focusToolbar: function (apis, comp) {
+          apis.focusToolbar(comp);
+        }
+      }
+    });
+
+    var defaultMenubar = 'file edit view insert format tools table help';
+    var defaultMenus = {
+      file: {
+        title: 'File',
+        items: 'newdocument restoredraft | preview | print | deleteallconversations'
+      },
+      edit: {
+        title: 'Edit',
+        items: 'undo redo | cut copy paste pastetext | selectall | searchreplace'
+      },
+      view: {
+        title: 'View',
+        items: 'code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments'
+      },
+      insert: {
+        title: 'Insert',
+        items: 'image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime'
+      },
+      format: {
+        title: 'Format',
+        items: 'bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align | forecolor backcolor | removeformat'
+      },
+      tools: {
+        title: 'Tools',
+        items: 'spellchecker spellcheckerlanguage | a11ycheck code wordcount'
+      },
+      table: {
+        title: 'Table',
+        items: 'inserttable | cell row column | advtablesort | tableprops deletetable'
+      },
+      help: {
+        title: 'Help',
+        items: 'help'
+      }
+    };
+    var make$8 = function (menu, registry, editor) {
+      var removedMenuItems = getRemovedMenuItems(editor).split(/[ ,]/);
+      return {
+        text: menu.title,
+        getItems: function () {
+          return bind(menu.items, function (i) {
+            var itemName = i.toLowerCase();
+            if (itemName.trim().length === 0) {
+              return [];
+            } else if (exists(removedMenuItems, function (removedMenuItem) {
+                return removedMenuItem === itemName;
+              })) {
+              return [];
+            } else if (itemName === 'separator' || itemName === '|') {
+              return [{ type: 'separator' }];
+            } else if (registry.menuItems[itemName]) {
+              return [registry.menuItems[itemName]];
+            } else {
+              return [];
+            }
+          });
+        }
+      };
+    };
+    var parseItemsString = function (items) {
+      if (typeof items === 'string') {
+        return items.split(' ');
+      }
+      return items;
+    };
+    var identifyMenus = function (editor, registry) {
+      var rawMenuData = __assign(__assign({}, defaultMenus), registry.menus);
+      var userDefinedMenus = keys(registry.menus).length > 0;
+      var menubar = registry.menubar === undefined || registry.menubar === true ? parseItemsString(defaultMenubar) : parseItemsString(registry.menubar === false ? '' : registry.menubar);
+      var validMenus = filter(menubar, function (menuName) {
+        return userDefinedMenus ? registry.menus.hasOwnProperty(menuName) && registry.menus[menuName].hasOwnProperty('items') || defaultMenus.hasOwnProperty(menuName) : defaultMenus.hasOwnProperty(menuName);
+      });
+      var menus = map(validMenus, function (menuName) {
+        var menuData = rawMenuData[menuName];
+        return make$8({
+          title: menuData.title,
+          items: parseItemsString(menuData.items)
+        }, registry, editor);
+      });
+      return filter(menus, function (menu) {
+        var isNotSeparator = function (item) {
+          return item.type !== 'separator';
+        };
+        return menu.getItems().length > 0 && exists(menu.getItems(), isNotSeparator);
+      });
+    };
+
+    var fireSkinLoaded$1 = function (editor) {
+      var done = function () {
+        editor._skinLoaded = true;
+        fireSkinLoaded(editor);
+      };
+      return function () {
+        if (editor.initialized) {
+          done();
+        } else {
+          editor.on('init', done);
+        }
+      };
+    };
+    var fireSkinLoadError$1 = function (editor, err) {
+      return function () {
+        return fireSkinLoadError(editor, { message: err });
+      };
+    };
+
+    var loadSkin = function (isInline, editor) {
+      var skinUrl = getSkinUrl(editor);
+      var skinUiCss;
+      if (skinUrl) {
+        skinUiCss = skinUrl + '/skin.min.css';
+        editor.contentCSS.push(skinUrl + (isInline ? '/content.inline' : '/content') + '.min.css');
+      }
+      if (isSkinDisabled(editor) === false && skinUiCss) {
+        global$7.DOM.styleSheetLoader.load(skinUiCss, fireSkinLoaded$1(editor), fireSkinLoadError$1(editor, 'Skin could not be loaded'));
+      } else {
+        fireSkinLoaded$1(editor)();
+      }
+    };
+    var iframe = curry(loadSkin, false);
+    var inline = curry(loadSkin, true);
+
+    var setToolbar = function (editor, uiComponents, rawUiConfig, backstage) {
+      var comp = uiComponents.outerContainer;
+      var toolbarConfig = rawUiConfig.toolbar;
+      var toolbarButtonsConfig = rawUiConfig.buttons;
+      if (isArrayOf(toolbarConfig, isString)) {
+        var toolbars = toolbarConfig.map(function (t) {
+          var config = {
+            toolbar: t,
+            buttons: toolbarButtonsConfig,
+            allowToolbarGroups: rawUiConfig.allowToolbarGroups
+          };
+          return identifyButtons(editor, config, { backstage: backstage }, Option.none());
+        });
+        OuterContainer.setToolbars(comp, toolbars);
+      } else {
+        OuterContainer.setToolbar(comp, identifyButtons(editor, rawUiConfig, { backstage: backstage }, Option.none()));
+      }
+    };
+
+    var DOM = global$7.DOM;
+    var detection = detect$3();
+    var isiOS12 = detection.os.isiOS() && detection.os.version.major <= 12;
+    var setupEvents = function (editor) {
+      var contentWindow = editor.getWin();
+      var initialDocEle = editor.getDoc().documentElement;
+      var lastWindowDimensions = Cell(Position(contentWindow.innerWidth, contentWindow.innerHeight));
+      var lastDocumentDimensions = Cell(Position(initialDocEle.offsetWidth, initialDocEle.offsetHeight));
+      var resizeWindow = function (e) {
+        var outer = lastWindowDimensions.get();
+        if (outer.left() !== contentWindow.innerWidth || outer.top() !== contentWindow.innerHeight) {
+          lastWindowDimensions.set(Position(contentWindow.innerWidth, contentWindow.innerHeight));
+          fireResizeContent(editor, e);
+        }
+      };
+      var resizeDocument = function (e) {
+        var docEle = editor.getDoc().documentElement;
+        var inner = lastDocumentDimensions.get();
+        if (inner.left() !== docEle.offsetWidth || inner.top() !== docEle.offsetHeight) {
+          lastDocumentDimensions.set(Position(docEle.offsetWidth, docEle.offsetHeight));
+          fireResizeContent(editor, e);
+        }
+      };
+      var scroll = function (e) {
+        return fireScrollContent(editor, e);
+      };
+      DOM.bind(contentWindow, 'resize', resizeWindow);
+      DOM.bind(contentWindow, 'scroll', scroll);
+      var elementLoad = capture$1(Element.fromDom(editor.getBody()), 'load', resizeDocument);
+      editor.on('NodeChange', resizeDocument);
+      editor.on('remove', function () {
+        elementLoad.unbind();
+        DOM.unbind(contentWindow, 'resize', resizeWindow);
+        DOM.unbind(contentWindow, 'scroll', scroll);
+      });
+    };
+    var render = function (editor, uiComponents, rawUiConfig, backstage, args) {
+      var lastToolbarWidth = Cell(0);
+      iframe(editor);
+      attachSystemAfter(Element.fromDom(args.targetNode), uiComponents.mothership);
+      attachSystem(body(), uiComponents.uiMothership);
+      editor.on('PostRender', function () {
+        setToolbar(editor, uiComponents, rawUiConfig, backstage);
+        lastToolbarWidth.set(editor.getWin().innerWidth);
+        OuterContainer.setMenubar(uiComponents.outerContainer, identifyMenus(editor, rawUiConfig));
+        OuterContainer.setSidebar(uiComponents.outerContainer, rawUiConfig.sidebar);
+        setupEvents(editor);
+      });
+      var socket = OuterContainer.getSocket(uiComponents.outerContainer).getOrDie('Could not find expected socket element');
+      if (isiOS12 === true) {
+        setAll$1(socket.element(), {
+          'overflow': 'scroll',
+          '-webkit-overflow-scrolling': 'touch'
+        });
+        var limit = first(function () {
+          editor.fire('ScrollContent');
+        }, 20);
+        bind$3(socket.element(), 'scroll', limit.throttle);
+      }
+      setupReadonlyModeSwitch(editor, uiComponents);
+      editor.addCommand('ToggleSidebar', function (ui, value) {
+        OuterContainer.toggleSidebar(uiComponents.outerContainer, value);
+        editor.fire('ToggleSidebar');
+      });
+      editor.addQueryValueHandler('ToggleSidebar', function () {
+        return OuterContainer.whichSidebar(uiComponents.outerContainer);
+      });
+      var toolbarMode = getToolbarMode(editor);
+      var refreshDrawer = function () {
+        OuterContainer.refreshToolbar(uiComponents.outerContainer);
+      };
+      if (toolbarMode === ToolbarMode.sliding || toolbarMode === ToolbarMode.floating) {
+        editor.on('ResizeWindow ResizeEditor ResizeContent', function () {
+          var width = editor.getWin().innerWidth;
+          if (width !== lastToolbarWidth.get()) {
+            refreshDrawer();
+            lastToolbarWidth.set(width);
+          }
+        });
+      }
+      return {
+        iframeContainer: socket.element().dom(),
+        editorContainer: uiComponents.outerContainer.element().dom()
+      };
+    };
+
+    var Iframe = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        render: render
+    });
+
+    var revocable = function (doRevoke) {
+      var subject = Cell(Option.none());
+      var revoke = function () {
+        subject.get().each(doRevoke);
+      };
+      var clear = function () {
+        revoke();
+        subject.set(Option.none());
+      };
+      var set = function (s) {
+        revoke();
+        subject.set(Option.some(s));
+      };
+      var isSet = function () {
+        return subject.get().isSome();
+      };
+      return {
+        clear: clear,
+        isSet: isSet,
+        set: set
+      };
+    };
+    var unbindable = function () {
+      return revocable(function (s) {
+        s.unbind();
+      });
+    };
+    var value$3 = function () {
+      var subject = Cell(Option.none());
+      var clear = function () {
+        subject.set(Option.none());
+      };
+      var set = function (s) {
+        subject.set(Option.some(s));
+      };
+      var on = function (f) {
+        subject.get().each(f);
+      };
+      var isSet = function () {
+        return subject.get().isSome();
+      };
+      return {
+        clear: clear,
+        set: set,
+        isSet: isSet,
+        on: on
+      };
+    };
+
+    var parseToInt = function (val) {
+      var re = /^[0-9\.]+(|px)$/i;
+      if (re.test('' + val)) {
+        return Option.some(parseInt('' + val, 10));
+      }
+      return Option.none();
+    };
+    var numToPx = function (val) {
+      return isNumber(val) ? val + 'px' : val;
+    };
+    var calcCappedSize = function (size, minSize, maxSize) {
+      var minOverride = minSize.filter(function (min) {
+        return size < min;
+      });
+      var maxOverride = maxSize.filter(function (max) {
+        return size > max;
+      });
+      return minOverride.or(maxOverride).getOr(size);
+    };
+
+    var getHeight$1 = function (editor) {
+      var baseHeight = getHeightSetting(editor);
+      var minHeight = getMinHeightSetting(editor);
+      var maxHeight = getMaxHeightSetting(editor);
+      return parseToInt(baseHeight).map(function (height) {
+        return calcCappedSize(height, minHeight, maxHeight);
+      });
+    };
+    var getHeightWithFallback = function (editor) {
+      var height = getHeight$1(editor);
+      return height.getOr(getHeightSetting(editor));
+    };
+    var getWidth$1 = function (editor) {
+      var baseWidth = getWidthSetting(editor);
+      var minWidth = getMinWidthSetting(editor);
+      var maxWidth = getMaxWidthSetting(editor);
+      return parseToInt(baseWidth).map(function (width) {
+        return calcCappedSize(width, minWidth, maxWidth);
+      });
+    };
+    var getWidthWithFallback = function (editor) {
+      var width = getWidth$1(editor);
+      return width.getOr(getWidthSetting(editor));
+    };
+
+    var InlineHeader = function (editor, targetElm, uiComponents, backstage, floatContainer) {
+      var uiMothership = uiComponents.uiMothership, outerContainer = uiComponents.outerContainer;
+      var DOM = global$7.DOM;
+      var useFixedToolbarContainer = useFixedContainer(editor);
+      var isSticky = isStickyToolbar(editor);
+      var editorMaxWidthOpt = getMaxWidthSetting(editor).or(getWidth$1(editor));
+      var headerBackstage = backstage.shared.header;
+      var isPositionedAtTop = headerBackstage.isPositionedAtTop;
+      var toolbarMode = getToolbarMode(editor);
+      var isSplitToolbar = toolbarMode === ToolbarMode.sliding || toolbarMode === ToolbarMode.floating;
+      var visible = Cell(false);
+      var isVisible = function () {
+        return visible.get() && !editor.removed;
+      };
+      var calcToolbarOffset = function (toolbar) {
+        return isSplitToolbar ? toolbar.fold(function () {
+          return 0;
+        }, function (tbar) {
+          return tbar.components().length > 1 ? get$6(tbar.components()[1].element()) : 0;
+        }) : 0;
+      };
+      var calcMode = function (container) {
+        switch (getToolbarLocation(editor)) {
+        case ToolbarLocation.auto:
+          var toolbar_1 = OuterContainer.getToolbar(outerContainer);
+          var offset = calcToolbarOffset(toolbar_1);
+          var toolbarHeight = get$6(container.element()) - offset;
+          var targetBounds = box(targetElm);
+          var roomAtTop = targetBounds.y > toolbarHeight;
+          if (roomAtTop) {
+            return 'top';
+          } else {
+            var doc = documentElement(targetElm);
+            var docHeight = Math.max(doc.dom().scrollHeight, get$6(doc));
+            var roomAtBottom = targetBounds.bottom < docHeight - toolbarHeight;
+            if (roomAtBottom) {
+              return 'bottom';
+            } else {
+              var winBounds = win();
+              var isRoomAtBottomViewport = winBounds.bottom < targetBounds.bottom - toolbarHeight;
+              return isRoomAtBottomViewport ? 'bottom' : 'top';
+            }
+          }
+        case ToolbarLocation.bottom:
+          return 'bottom';
+        case ToolbarLocation.top:
+        default:
+          return 'top';
+        }
+      };
+      var setupMode = function (mode) {
+        var container = floatContainer.get();
+        Docking.setModes(container, [mode]);
+        headerBackstage.setDockingMode(mode);
+        var verticalDir = isPositionedAtTop() ? AttributeValue.TopToBottom : AttributeValue.BottomToTop;
+        set$1(container.element(), Attribute, verticalDir);
+      };
+      var updateChromeWidth = function () {
+        var maxWidth = editorMaxWidthOpt.getOrThunk(function () {
+          var bodyMargin = parseToInt(get$4(body(), 'margin-left')).getOr(0);
+          return get$7(body()) - absolute(targetElm).left() + bodyMargin;
+        });
+        set$2(floatContainer.get().element(), 'max-width', maxWidth + 'px');
+      };
+      var updateChromePosition = function () {
+        var toolbar = OuterContainer.getToolbar(outerContainer);
+        var offset = calcToolbarOffset(toolbar);
+        var targetBounds = box(targetElm);
+        var top = isPositionedAtTop() ? Math.max(targetBounds.y - get$6(floatContainer.get().element()) + offset, 0) : targetBounds.bottom;
+        setAll$1(outerContainer.element(), {
+          position: 'absolute',
+          top: Math.round(top) + 'px',
+          left: Math.round(targetBounds.x) + 'px'
+        });
+      };
+      var repositionPopups$1 = function () {
+        uiMothership.broadcastOn([repositionPopups()], {});
+      };
+      var updateChromeUi = function (resetDocking) {
+        if (resetDocking === void 0) {
+          resetDocking = false;
+        }
+        if (!isVisible()) {
+          return;
+        }
+        if (!useFixedToolbarContainer) {
+          updateChromeWidth();
+        }
+        if (isSplitToolbar) {
+          OuterContainer.refreshToolbar(outerContainer);
+        }
+        if (!useFixedToolbarContainer) {
+          updateChromePosition();
+        }
+        if (isSticky) {
+          var floatContainerComp = floatContainer.get();
+          resetDocking ? Docking.reset(floatContainerComp) : Docking.refresh(floatContainerComp);
+        }
+        repositionPopups$1();
+      };
+      var updateMode = function (updateUi) {
+        if (updateUi === void 0) {
+          updateUi = true;
+        }
+        if (useFixedToolbarContainer || !isSticky || !isVisible()) {
+          return;
+        }
+        var currentMode = headerBackstage.getDockingMode();
+        var newMode = calcMode(floatContainer.get());
+        if (newMode !== currentMode) {
+          setupMode(newMode);
+          if (updateUi) {
+            updateChromeUi(true);
+          }
+        }
+      };
+      var show = function () {
+        visible.set(true);
+        set$2(outerContainer.element(), 'display', 'flex');
+        DOM.addClass(editor.getBody(), 'mce-edit-focus');
+        remove$6(uiMothership.element(), 'display');
+        updateMode(false);
+        updateChromeUi();
+      };
+      var hide = function () {
+        visible.set(false);
+        if (uiComponents.outerContainer) {
+          set$2(outerContainer.element(), 'display', 'none');
+          DOM.removeClass(editor.getBody(), 'mce-edit-focus');
+        }
+        set$2(uiMothership.element(), 'display', 'none');
+      };
+      return {
+        isVisible: isVisible,
+        isPositionedAtTop: isPositionedAtTop,
+        show: show,
+        hide: hide,
+        update: updateChromeUi,
+        updateMode: updateMode,
+        repositionPopups: repositionPopups$1
+      };
+    };
+
+    var getTargetPosAndBounds = function (targetElm, isToolbarTop) {
+      var bounds = box(targetElm);
+      return {
+        pos: isToolbarTop ? bounds.y : bounds.bottom,
+        bounds: bounds
+      };
+    };
+    var setupEvents$1 = function (editor, targetElm, ui) {
+      var prevPosAndBounds = Cell(getTargetPosAndBounds(targetElm, ui.isPositionedAtTop()));
+      var resizeContent = function (e) {
+        var _a = getTargetPosAndBounds(targetElm, ui.isPositionedAtTop()), pos = _a.pos, bounds = _a.bounds;
+        var _b = prevPosAndBounds.get(), prevPos = _b.pos, prevBounds = _b.bounds;
+        var hasResized = bounds.height !== prevBounds.height || bounds.width !== prevBounds.width;
+        prevPosAndBounds.set({
+          pos: pos,
+          bounds: bounds
+        });
+        if (hasResized) {
+          fireResizeContent(editor, e);
+        }
+        if (ui.isVisible()) {
+          if (prevPos !== pos) {
+            ui.update(true);
+          } else if (hasResized) {
+            ui.updateMode();
+            ui.repositionPopups();
+          }
+        }
+      };
+      editor.on('activate', ui.show);
+      editor.on('deactivate', ui.hide);
+      editor.on('SkinLoaded ResizeWindow', function () {
+        return ui.update(true);
+      });
+      editor.on('NodeChange keydown', function (e) {
+        global$2.requestAnimationFrame(function () {
+          return resizeContent(e);
+        });
+      });
+      editor.on('ScrollWindow', function () {
+        return ui.updateMode();
+      });
+      var elementLoad = unbindable();
+      elementLoad.set(capture$1(Element.fromDom(editor.getBody()), 'load', resizeContent));
+      editor.on('remove', function () {
+        elementLoad.clear();
+      });
+    };
+    var render$1 = function (editor, uiComponents, rawUiConfig, backstage, args) {
+      var mothership = uiComponents.mothership, uiMothership = uiComponents.uiMothership, outerContainer = uiComponents.outerContainer;
+      var floatContainer = Cell(null);
+      var targetElm = Element.fromDom(args.targetNode);
+      var ui = InlineHeader(editor, targetElm, uiComponents, backstage, floatContainer);
+      inline(editor);
+      var render = function () {
+        if (floatContainer.get()) {
+          ui.show();
+          return;
+        }
+        floatContainer.set(OuterContainer.getHeader(outerContainer).getOrDie());
+        var uiContainer = getUiContainer(editor);
+        attachSystem(uiContainer, mothership);
+        attachSystem(uiContainer, uiMothership);
+        setToolbar(editor, uiComponents, rawUiConfig, backstage);
+        OuterContainer.setMenubar(outerContainer, identifyMenus(editor, rawUiConfig));
+        ui.show();
+        setupEvents$1(editor, targetElm, ui);
+        editor.nodeChanged();
+      };
+      editor.on('focus', render);
+      editor.on('blur hide', ui.hide);
+      editor.on('init', function () {
+        if (editor.hasFocus()) {
+          render();
+        }
+      });
+      setupReadonlyModeSwitch(editor, uiComponents);
+      return { editorContainer: outerContainer.element().dom() };
+    };
+
+    var Inline = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        render: render$1
+    });
+
+    var register$5 = function (editor) {
+      var alignToolbarButtons = [
+        {
+          name: 'alignleft',
+          text: 'Align left',
+          cmd: 'JustifyLeft',
+          icon: 'align-left'
+        },
+        {
+          name: 'aligncenter',
+          text: 'Align center',
+          cmd: 'JustifyCenter',
+          icon: 'align-center'
+        },
+        {
+          name: 'alignright',
+          text: 'Align right',
+          cmd: 'JustifyRight',
+          icon: 'align-right'
+        },
+        {
+          name: 'alignjustify',
+          text: 'Justify',
+          cmd: 'JustifyFull',
+          icon: 'align-justify'
+        }
+      ];
+      global$e.each(alignToolbarButtons, function (item) {
+        editor.ui.registry.addToggleButton(item.name, {
+          tooltip: item.text,
+          onAction: function () {
+            return editor.execCommand(item.cmd);
+          },
+          icon: item.icon,
+          onSetup: onSetupFormatToggle(editor, item.name)
+        });
+      });
+      var alignNoneToolbarButton = {
+        name: 'alignnone',
+        text: 'No alignment',
+        cmd: 'JustifyNone',
+        icon: 'align-none'
+      };
+      editor.ui.registry.addButton(alignNoneToolbarButton.name, {
+        tooltip: alignNoneToolbarButton.text,
+        onAction: function () {
+          return editor.execCommand(alignNoneToolbarButton.cmd);
+        },
+        icon: alignNoneToolbarButton.icon
+      });
+    };
+
+    var toggleFormat = function (editor, fmt) {
+      return function () {
+        editor.execCommand('mceToggleFormat', false, fmt);
+      };
+    };
+    var registerFormatButtons = function (editor) {
+      global$e.each([
+        {
+          name: 'bold',
+          text: 'Bold',
+          icon: 'bold'
+        },
+        {
+          name: 'italic',
+          text: 'Italic',
+          icon: 'italic'
+        },
+        {
+          name: 'underline',
+          text: 'Underline',
+          icon: 'underline'
+        },
+        {
+          name: 'strikethrough',
+          text: 'Strikethrough',
+          icon: 'strike-through'
+        },
+        {
+          name: 'subscript',
+          text: 'Subscript',
+          icon: 'subscript'
+        },
+        {
+          name: 'superscript',
+          text: 'Superscript',
+          icon: 'superscript'
+        }
+      ], function (btn, _idx) {
+        editor.ui.registry.addToggleButton(btn.name, {
+          tooltip: btn.text,
+          icon: btn.icon,
+          onSetup: onSetupFormatToggle(editor, btn.name),
+          onAction: toggleFormat(editor, btn.name)
+        });
+      });
+      for (var i = 1; i <= 6; i++) {
+        var name_1 = 'h' + i;
+        editor.ui.registry.addToggleButton(name_1, {
+          text: name_1.toUpperCase(),
+          tooltip: 'Heading ' + i,
+          onSetup: onSetupFormatToggle(editor, name_1),
+          onAction: toggleFormat(editor, name_1)
+        });
+      }
+    };
+    var registerCommandButtons = function (editor) {
+      global$e.each([
+        {
+          name: 'cut',
+          text: 'Cut',
+          action: 'Cut',
+          icon: 'cut'
+        },
+        {
+          name: 'copy',
+          text: 'Copy',
+          action: 'Copy',
+          icon: 'copy'
+        },
+        {
+          name: 'paste',
+          text: 'Paste',
+          action: 'Paste',
+          icon: 'paste'
+        },
+        {
+          name: 'help',
+          text: 'Help',
+          action: 'mceHelp',
+          icon: 'help'
+        },
+        {
+          name: 'selectall',
+          text: 'Select all',
+          action: 'SelectAll',
+          icon: 'select-all'
+        },
+        {
+          name: 'newdocument',
+          text: 'New document',
+          action: 'mceNewDocument',
+          icon: 'new-document'
+        },
+        {
+          name: 'removeformat',
+          text: 'Clear formatting',
+          action: 'RemoveFormat',
+          icon: 'remove-formatting'
+        },
+        {
+          name: 'remove',
+          text: 'Remove',
+          action: 'Delete',
+          icon: 'remove'
+        }
+      ], function (btn) {
+        editor.ui.registry.addButton(btn.name, {
+          tooltip: btn.text,
+          icon: btn.icon,
+          onAction: function () {
+            return editor.execCommand(btn.action);
+          }
+        });
+      });
+    };
+    var registerCommandToggleButtons = function (editor) {
+      global$e.each([{
+          name: 'blockquote',
+          text: 'Blockquote',
+          action: 'mceBlockQuote',
+          icon: 'quote'
+        }], function (btn) {
+        editor.ui.registry.addToggleButton(btn.name, {
+          tooltip: btn.text,
+          icon: btn.icon,
+          onAction: function () {
+            return editor.execCommand(btn.action);
+          },
+          onSetup: onSetupFormatToggle(editor, btn.name)
+        });
+      });
+    };
+    var registerButtons = function (editor) {
+      registerFormatButtons(editor);
+      registerCommandButtons(editor);
+      registerCommandToggleButtons(editor);
+    };
+    var registerMenuItems = function (editor) {
+      global$e.each([
+        {
+          name: 'bold',
+          text: 'Bold',
+          action: 'Bold',
+          icon: 'bold',
+          shortcut: 'Meta+B'
+        },
+        {
+          name: 'italic',
+          text: 'Italic',
+          action: 'Italic',
+          icon: 'italic',
+          shortcut: 'Meta+I'
+        },
+        {
+          name: 'underline',
+          text: 'Underline',
+          action: 'Underline',
+          icon: 'underline',
+          shortcut: 'Meta+U'
+        },
+        {
+          name: 'strikethrough',
+          text: 'Strikethrough',
+          action: 'Strikethrough',
+          icon: 'strike-through',
+          shortcut: ''
+        },
+        {
+          name: 'subscript',
+          text: 'Subscript',
+          action: 'Subscript',
+          icon: 'subscript',
+          shortcut: ''
+        },
+        {
+          name: 'superscript',
+          text: 'Superscript',
+          action: 'Superscript',
+          icon: 'superscript',
+          shortcut: ''
+        },
+        {
+          name: 'removeformat',
+          text: 'Clear formatting',
+          action: 'RemoveFormat',
+          icon: 'remove-formatting',
+          shortcut: ''
+        },
+        {
+          name: 'newdocument',
+          text: 'New document',
+          action: 'mceNewDocument',
+          icon: 'new-document',
+          shortcut: ''
+        },
+        {
+          name: 'cut',
+          text: 'Cut',
+          action: 'Cut',
+          icon: 'cut',
+          shortcut: 'Meta+X'
+        },
+        {
+          name: 'copy',
+          text: 'Copy',
+          action: 'Copy',
+          icon: 'copy',
+          shortcut: 'Meta+C'
+        },
+        {
+          name: 'paste',
+          text: 'Paste',
+          action: 'Paste',
+          icon: 'paste',
+          shortcut: 'Meta+V'
+        },
+        {
+          name: 'selectall',
+          text: 'Select all',
+          action: 'SelectAll',
+          icon: 'select-all',
+          shortcut: 'Meta+A'
+        }
+      ], function (btn) {
+        editor.ui.registry.addMenuItem(btn.name, {
+          text: btn.text,
+          icon: btn.icon,
+          shortcut: btn.shortcut,
+          onAction: function () {
+            return editor.execCommand(btn.action);
+          }
+        });
+      });
+      editor.ui.registry.addMenuItem('codeformat', {
+        text: 'Code',
+        icon: 'sourcecode',
+        onAction: toggleFormat(editor, 'code')
+      });
+    };
+    var register$6 = function (editor) {
+      registerButtons(editor);
+      registerMenuItems(editor);
+    };
+
+    var toggleUndoRedoState = function (api, editor, type) {
+      var checkState = function () {
+        return editor.undoManager ? editor.undoManager[type]() : false;
+      };
+      var onUndoStateChange = function () {
+        api.setDisabled(editor.mode.isReadOnly() || !checkState());
+      };
+      api.setDisabled(!checkState());
+      editor.on('Undo Redo AddUndo TypingUndo ClearUndos SwitchMode', onUndoStateChange);
+      return function () {
+        return editor.off('Undo Redo AddUndo TypingUndo ClearUndos SwitchMode', onUndoStateChange);
+      };
+    };
+    var registerMenuItems$1 = function (editor) {
+      editor.ui.registry.addMenuItem('undo', {
+        text: 'Undo',
+        icon: 'undo',
+        shortcut: 'Meta+Z',
+        onSetup: function (api) {
+          return toggleUndoRedoState(api, editor, 'hasUndo');
+        },
+        onAction: function () {
+          return editor.execCommand('undo');
+        }
+      });
+      editor.ui.registry.addMenuItem('redo', {
+        text: 'Redo',
+        icon: 'redo',
+        shortcut: 'Meta+Y',
+        onSetup: function (api) {
+          return toggleUndoRedoState(api, editor, 'hasRedo');
+        },
+        onAction: function () {
+          return editor.execCommand('redo');
+        }
+      });
+    };
+    var registerButtons$1 = function (editor) {
+      editor.ui.registry.addButton('undo', {
+        tooltip: 'Undo',
+        icon: 'undo',
+        onSetup: function (api) {
+          return toggleUndoRedoState(api, editor, 'hasUndo');
+        },
+        onAction: function () {
+          return editor.execCommand('undo');
+        }
+      });
+      editor.ui.registry.addButton('redo', {
+        tooltip: 'Redo',
+        icon: 'redo',
+        onSetup: function (api) {
+          return toggleUndoRedoState(api, editor, 'hasRedo');
+        },
+        onAction: function () {
+          return editor.execCommand('redo');
+        }
+      });
+    };
+    var register$7 = function (editor) {
+      registerMenuItems$1(editor);
+      registerButtons$1(editor);
+    };
+
+    var toggleVisualAidState = function (api, editor) {
+      api.setActive(editor.hasVisual);
+      var onVisualAid = function (e) {
+        api.setActive(e.hasVisual);
+      };
+      editor.on('VisualAid', onVisualAid);
+      return function () {
+        return editor.off('VisualAid', onVisualAid);
+      };
+    };
+    var registerMenuItems$2 = function (editor) {
+      editor.ui.registry.addToggleMenuItem('visualaid', {
+        text: 'Visual aids',
+        onSetup: function (api) {
+          return toggleVisualAidState(api, editor);
+        },
+        onAction: function () {
+          editor.execCommand('mceToggleVisualAid');
+        }
+      });
+    };
+    var registerToolbarButton = function (editor) {
+      editor.ui.registry.addButton('visualaid', {
+        tooltip: 'Visual aids',
+        text: 'Visual aids',
+        onAction: function () {
+          return editor.execCommand('mceToggleVisualAid');
+        }
+      });
+    };
+    var register$8 = function (editor) {
+      registerToolbarButton(editor);
+      registerMenuItems$2(editor);
+    };
+
+    var toggleOutdentState = function (api, editor) {
+      api.setDisabled(!editor.queryCommandState('outdent'));
+      var onNodeChange = function () {
+        api.setDisabled(!editor.queryCommandState('outdent'));
+      };
+      editor.on('NodeChange', onNodeChange);
+      return function () {
+        return editor.off('NodeChange', onNodeChange);
+      };
+    };
+    var registerButtons$2 = function (editor) {
+      editor.ui.registry.addButton('outdent', {
+        tooltip: 'Decrease indent',
+        icon: 'outdent',
+        onSetup: function (api) {
+          return toggleOutdentState(api, editor);
+        },
+        onAction: function () {
+          return editor.execCommand('outdent');
+        }
+      });
+      editor.ui.registry.addButton('indent', {
+        tooltip: 'Increase indent',
+        icon: 'indent',
+        onAction: function () {
+          return editor.execCommand('indent');
+        }
+      });
+    };
+    var register$9 = function (editor) {
+      registerButtons$2(editor);
+    };
+
+    var register$a = function (editor, backstage) {
+      alignSelectMenu(editor, backstage);
+      fontSelectMenu(editor, backstage);
+      styleSelectMenu(editor, backstage);
+      formatSelectMenu(editor, backstage);
+      fontsizeSelectMenu(editor, backstage);
+    };
+
+    var setup$8 = function (editor, backstage) {
+      register$5(editor);
+      register$6(editor);
+      register$a(editor, backstage);
+      register$7(editor);
+      register$1(editor);
+      register$8(editor);
+      register$9(editor);
+    };
+
+    var nu$d = function (x, y) {
+      return {
+        anchor: 'makeshift',
+        x: x,
+        y: y
+      };
+    };
+    var transpose$1 = function (pos, dx, dy) {
+      return nu$d(pos.x + dx, pos.y + dy);
+    };
+    var isTouchEvent$1 = function (e) {
+      return e.type === 'longpress' || e.type.indexOf('touch') === 0;
+    };
+    var fromPageXY = function (e) {
+      if (isTouchEvent$1(e)) {
+        var touch = e.touches[0];
+        return nu$d(touch.pageX, touch.pageY);
+      } else {
+        return nu$d(e.pageX, e.pageY);
+      }
+    };
+    var fromClientXY = function (e) {
+      if (isTouchEvent$1(e)) {
+        var touch = e.touches[0];
+        return nu$d(touch.clientX, touch.clientY);
+      } else {
+        return nu$d(e.clientX, e.clientY);
+      }
+    };
+    var transposeContentAreaContainer = function (element, pos) {
+      var containerPos = global$7.DOM.getPos(element);
+      return transpose$1(pos, containerPos.x, containerPos.y);
+    };
+    var getPointAnchor = function (editor, e) {
+      if (e.type === 'contextmenu' || e.type === 'longpress') {
+        if (editor.inline) {
+          return fromPageXY(e);
+        } else {
+          return transposeContentAreaContainer(editor.getContentAreaContainer(), fromClientXY(e));
+        }
+      } else {
+        return getSelectionAnchor(editor);
+      }
+    };
+    var getSelectionAnchor = function (editor) {
+      return {
+        anchor: 'selection',
+        root: Element.fromDom(editor.selection.getNode())
+      };
+    };
+    var getNodeAnchor$1 = function (editor) {
+      return {
+        anchor: 'node',
+        node: Option.some(Element.fromDom(editor.selection.getNode())),
+        root: Element.fromDom(editor.getBody())
+      };
+    };
+
+    var getAnchorSpec = function (editor, e, isTriggeredByKeyboardEvent) {
+      return isTriggeredByKeyboardEvent ? getNodeAnchor$1(editor) : getPointAnchor(editor, e);
+    };
+    var initAndShow = function (editor, e, buildMenu, backstage, contextmenu, isTriggeredByKeyboardEvent) {
+      var items = buildMenu();
+      var anchorSpec = getAnchorSpec(editor, e, isTriggeredByKeyboardEvent);
+      build$2(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, false).map(function (menuData) {
+        e.preventDefault();
+        InlineView.showMenuAt(contextmenu, anchorSpec, {
+          menu: { markers: markers$1('normal') },
+          data: menuData
+        });
+      });
+    };
+
+    var layouts = {
+      onLtr: function () {
+        return [
+          south$1,
+          southeast$1,
+          southwest$1,
+          northeast$1,
+          northwest$1,
+          north$1,
+          north$3,
+          south$3,
+          northeast$3,
+          southeast$3,
+          northwest$3,
+          southwest$3
+        ];
+      },
+      onRtl: function () {
+        return [
+          south$1,
+          southwest$1,
+          southeast$1,
+          northwest$1,
+          northeast$1,
+          north$1,
+          north$3,
+          south$3,
+          northwest$3,
+          southwest$3,
+          northeast$3,
+          southeast$3
+        ];
+      }
+    };
+    var bubbleSize$1 = 12;
+    var bubbleAlignments$2 = {
+      valignCentre: [],
+      alignCentre: [],
+      alignLeft: ['tox-pop--align-left'],
+      alignRight: ['tox-pop--align-right'],
+      right: ['tox-pop--right'],
+      left: ['tox-pop--left'],
+      bottom: ['tox-pop--bottom'],
+      top: ['tox-pop--top']
+    };
+    var isTouchWithinSelection = function (editor, e) {
+      var selection = editor.selection;
+      if (selection.isCollapsed() || e.touches.length < 1) {
+        return false;
+      } else {
+        var touch_1 = e.touches[0];
+        var rng = selection.getRng();
+        var rngRectOpt = getFirstRect$1(editor.getWin(), Selection.domRange(rng));
+        return rngRectOpt.exists(function (rngRect) {
+          return rngRect.left() <= touch_1.clientX && rngRect.right() >= touch_1.clientX && rngRect.top() <= touch_1.clientY && rngRect.bottom() >= touch_1.clientY;
+        });
+      }
+    };
+    var getAnchorSpec$1 = function (editor, isTriggeredByKeyboardEvent, e) {
+      var anchorSpec = isTriggeredByKeyboardEvent ? getNodeAnchor$1(editor) : getPointAnchor(editor, e);
+      return __assign({
+        bubble: nu$8(0, bubbleSize$1, bubbleAlignments$2),
+        layouts: layouts,
+        overrides: {
+          maxWidthFunction: expandable$1(),
+          maxHeightFunction: expandable()
+        }
+      }, anchorSpec);
+    };
+    var setupiOSOverrides = function (editor) {
+      var originalSelection = editor.selection.getRng();
+      var selectionReset = function () {
+        global$2.setEditorTimeout(editor, function () {
+          editor.selection.setRng(originalSelection);
+        }, 10);
+        unbindEventListeners();
+      };
+      editor.once('touchend', selectionReset);
+      var preventMousedown = function (e) {
+        e.preventDefault();
+        e.stopImmediatePropagation();
+      };
+      editor.on('mousedown', preventMousedown, true);
+      var clearSelectionReset = function () {
+        return unbindEventListeners();
+      };
+      editor.once('longpresscancel', clearSelectionReset);
+      var unbindEventListeners = function () {
+        editor.off('touchend', selectionReset);
+        editor.off('longpresscancel', clearSelectionReset);
+        editor.off('mousedown', preventMousedown);
+      };
+    };
+    var show = function (editor, e, items, backstage, contextmenu, isTriggeredByKeyboardEvent, highlightImmediately) {
+      var anchorSpec = getAnchorSpec$1(editor, isTriggeredByKeyboardEvent, e);
+      build$2(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, true).map(function (menuData) {
+        e.preventDefault();
+        InlineView.showMenuWithinBounds(contextmenu, anchorSpec, {
+          menu: {
+            markers: markers$1('normal'),
+            highlightImmediately: highlightImmediately
+          },
+          data: menuData,
+          type: 'horizontal'
+        }, function () {
+          return Option.some(getContextToolbarBounds(editor, backstage.shared));
+        });
+        editor.fire(hideContextToolbarEvent);
+      });
+    };
+    var initAndShow$1 = function (editor, e, buildMenu, backstage, contextmenu, isTriggeredByKeyboardEvent) {
+      var detection = detect$3();
+      var isiOS = detection.os.isiOS();
+      var isOSX = detection.os.isOSX();
+      var isAndroid = detection.os.isAndroid();
+      var isTouch = detection.deviceType.isTouch();
+      var shouldHighlightImmediately = function () {
+        return !(isAndroid || isiOS || isOSX && isTouch);
+      };
+      var open = function () {
+        var items = buildMenu();
+        show(editor, e, items, backstage, contextmenu, isTriggeredByKeyboardEvent, shouldHighlightImmediately());
+      };
+      if ((isOSX || isiOS) && !isTriggeredByKeyboardEvent) {
+        var openiOS_1 = function () {
+          setupiOSOverrides(editor);
+          open();
+        };
+        if (isTouchWithinSelection(editor, e)) {
+          openiOS_1();
+        } else {
+          editor.once('selectionchange', openiOS_1);
+          editor.once('touchend', function () {
+            return editor.off('selectionchange', openiOS_1);
+          });
+        }
+      } else {
+        if (isAndroid && !isTriggeredByKeyboardEvent) {
+          editor.selection.setCursorLocation(e.target, 0);
+        }
+        open();
+      }
+    };
+
+    var patchPipeConfig = function (config) {
+      return typeof config === 'string' ? config.split(/[ ,]/) : config;
+    };
+    var shouldNeverUseNative = function (editor) {
+      return editor.settings.contextmenu_never_use_native || false;
+    };
+    var getMenuItems = function (editor, name, defaultItems) {
+      var contextMenus = editor.ui.registry.getAll().contextMenus;
+      return get(editor.settings, name).map(patchPipeConfig).getOrThunk(function () {
+        return filter(patchPipeConfig(defaultItems), function (item) {
+          return has(contextMenus, item);
+        });
+      });
+    };
+    var isContextMenuDisabled = function (editor) {
+      return editor.getParam('contextmenu') === false;
+    };
+    var getContextMenu = function (editor) {
+      return getMenuItems(editor, 'contextmenu', 'link linkchecker image imagetools table spellchecker configurepermanentpen');
+    };
+
+    var isSeparator$1 = function (item) {
+      return isString(item) ? item === '|' : item.type === 'separator';
+    };
+    var separator$3 = { type: 'separator' };
+    var makeContextItem = function (item) {
+      if (isString(item)) {
+        return item;
+      } else {
+        switch (item.type) {
+        case 'separator':
+          return separator$3;
+        case 'submenu':
+          return {
+            type: 'nestedmenuitem',
+            text: item.text,
+            icon: item.icon,
+            getSubmenuItems: function () {
+              var items = item.getSubmenuItems();
+              if (isString(items)) {
+                return items;
+              } else {
+                return map(items, makeContextItem);
+              }
+            }
+          };
+        default:
+          return {
+            type: 'menuitem',
+            text: item.text,
+            icon: item.icon,
+            onAction: noarg(item.onAction)
+          };
+        }
+      }
+    };
+    var addContextMenuGroup = function (xs, groupItems) {
+      if (groupItems.length === 0) {
+        return xs;
+      }
+      var lastMenuItem = last(xs).filter(function (item) {
+        return !isSeparator$1(item);
+      });
+      var before = lastMenuItem.fold(function () {
+        return [];
+      }, function (_) {
+        return [separator$3];
+      });
+      return xs.concat(before).concat(groupItems).concat([separator$3]);
+    };
+    var generateContextMenu = function (contextMenus, menuConfig, selectedElement) {
+      var sections = foldl(menuConfig, function (acc, name) {
+        if (has(contextMenus, name)) {
+          var items = contextMenus[name].update(selectedElement);
+          if (isString(items)) {
+            return addContextMenuGroup(acc, items.split(' '));
+          } else if (items.length > 0) {
+            var allItems = map(items, makeContextItem);
+            return addContextMenuGroup(acc, allItems);
+          } else {
+            return acc;
+          }
+        } else {
+          return acc.concat([name]);
+        }
+      }, []);
+      if (sections.length > 0 && isSeparator$1(sections[sections.length - 1])) {
+        sections.pop();
+      }
+      return sections;
+    };
+    var isNativeOverrideKeyEvent = function (editor, e) {
+      return e.ctrlKey && !shouldNeverUseNative(editor);
+    };
+    var isTriggeredByKeyboard = function (editor, e) {
+      return e.type !== 'longpress' && (e.button !== 2 || e.target === editor.getBody() && e.pointerType === '');
+    };
+    var setup$9 = function (editor, lazySink, backstage) {
+      var detection = detect$3();
+      var isTouch = detection.deviceType.isTouch;
+      var contextmenu = build$1(InlineView.sketch({
+        dom: { tag: 'div' },
+        lazySink: lazySink,
+        onEscape: function () {
+          return editor.focus();
+        },
+        onShow: function () {
+          return backstage.setContextMenuState(true);
+        },
+        onHide: function () {
+          return backstage.setContextMenuState(false);
+        },
+        fireDismissalEventInstead: {},
+        inlineBehaviours: derive$1([config('dismissContextMenu', [run(dismissRequested(), function (comp, _se) {
+              Sandboxing.close(comp);
+              editor.focus();
+            })])])
+      }));
+      var hideContextMenu = function (_e) {
+        return InlineView.hide(contextmenu);
+      };
+      var showContextMenu = function (e) {
+        if (shouldNeverUseNative(editor)) {
+          e.preventDefault();
+        }
+        if (isNativeOverrideKeyEvent(editor, e) || isContextMenuDisabled(editor)) {
+          return;
+        }
+        var isTriggeredByKeyboardEvent = isTriggeredByKeyboard(editor, e);
+        var buildMenu = function () {
+          var selectedElement = isTriggeredByKeyboardEvent ? editor.selection.getStart(true) : e.target;
+          var registry = editor.ui.registry.getAll();
+          var menuConfig = getContextMenu(editor);
+          return generateContextMenu(registry.contextMenus, menuConfig, selectedElement);
+        };
+        var initAndShow$2 = isTouch() ? initAndShow$1 : initAndShow;
+        initAndShow$2(editor, e, buildMenu, backstage, contextmenu, isTriggeredByKeyboardEvent);
+      };
+      editor.on('init', function () {
+        var hideEvents = 'ResizeEditor ScrollContent ScrollWindow longpresscancel' + (isTouch() ? '' : ' ResizeWindow');
+        editor.on(hideEvents, hideContextMenu);
+        editor.on('longpress contextmenu', showContextMenu);
+      });
+    };
+
+    var adt$c = Adt.generate([
+      {
+        offset: [
+          'x',
+          'y'
+        ]
+      },
+      {
+        absolute: [
+          'x',
+          'y'
+        ]
+      },
+      {
+        fixed: [
+          'x',
+          'y'
+        ]
+      }
+    ]);
+    var subtract = function (change) {
+      return function (point) {
+        return point.translate(-change.left(), -change.top());
+      };
+    };
+    var add$4 = function (change) {
+      return function (point) {
+        return point.translate(change.left(), change.top());
+      };
+    };
+    var transform$1 = function (changes) {
+      return function (x, y) {
+        return foldl(changes, function (rest, f) {
+          return f(rest);
+        }, Position(x, y));
+      };
+    };
+    var asFixed = function (coord, scroll, origin) {
+      return coord.fold(transform$1([
+        add$4(origin),
+        subtract(scroll)
+      ]), transform$1([subtract(scroll)]), transform$1([]));
+    };
+    var asAbsolute = function (coord, scroll, origin) {
+      return coord.fold(transform$1([add$4(origin)]), transform$1([]), transform$1([add$4(scroll)]));
+    };
+    var asOffset = function (coord, scroll, origin) {
+      return coord.fold(transform$1([]), transform$1([subtract(origin)]), transform$1([
+        add$4(scroll),
+        subtract(origin)
+      ]));
+    };
+    var withinRange = function (coord1, coord2, xRange, yRange, scroll, origin) {
+      var a1 = asAbsolute(coord1, scroll, origin);
+      var a2 = asAbsolute(coord2, scroll, origin);
+      return Math.abs(a1.left() - a2.left()) <= xRange && Math.abs(a1.top() - a2.top()) <= yRange;
+    };
+    var getDeltas = function (coord1, coord2, xRange, yRange, scroll, origin) {
+      var a1 = asAbsolute(coord1, scroll, origin);
+      var a2 = asAbsolute(coord2, scroll, origin);
+      var left = Math.abs(a1.left() - a2.left());
+      var top = Math.abs(a1.top() - a2.top());
+      return Position(left, top);
+    };
+    var toStyles = function (coord, scroll, origin) {
+      var stylesOpt = coord.fold(function (x, y) {
+        return {
+          position: Option.some('absolute'),
+          left: Option.some(x + 'px'),
+          top: Option.some(y + 'px')
+        };
+      }, function (x, y) {
+        return {
+          position: Option.some('absolute'),
+          left: Option.some(x - origin.left() + 'px'),
+          top: Option.some(y - origin.top() + 'px')
+        };
+      }, function (x, y) {
+        return {
+          position: Option.some('fixed'),
+          left: Option.some(x + 'px'),
+          top: Option.some(y + 'px')
+        };
+      });
+      return __assign({
+        right: Option.none(),
+        bottom: Option.none()
+      }, stylesOpt);
+    };
+    var translate$2 = function (coord, deltaX, deltaY) {
+      return coord.fold(function (x, y) {
+        return offset(x + deltaX, y + deltaY);
+      }, function (x, y) {
+        return absolute$3(x + deltaX, y + deltaY);
+      }, function (x, y) {
+        return fixed$1(x + deltaX, y + deltaY);
+      });
+    };
+    var absorb = function (partialCoord, originalCoord, scroll, origin) {
+      var absorbOne = function (stencil, nu) {
+        return function (optX, optY) {
+          var original = stencil(originalCoord, scroll, origin);
+          return nu(optX.getOr(original.left()), optY.getOr(original.top()));
+        };
+      };
+      return partialCoord.fold(absorbOne(asOffset, offset), absorbOne(asAbsolute, absolute$3), absorbOne(asFixed, fixed$1));
+    };
+    var offset = adt$c.offset;
+    var absolute$3 = adt$c.absolute;
+    var fixed$1 = adt$c.fixed;
+
+    var parseAttrToInt = function (element, name) {
+      var value = get$2(element, name);
+      return isUndefined(value) ? NaN : parseInt(value, 10);
+    };
+    var get$e = function (component, snapsInfo) {
+      var element = component.element();
+      var x = parseAttrToInt(element, snapsInfo.leftAttr);
+      var y = parseAttrToInt(element, snapsInfo.topAttr);
+      return isNaN(x) || isNaN(y) ? Option.none() : Option.some(Position(x, y));
+    };
+    var set$8 = function (component, snapsInfo, pt) {
+      var element = component.element();
+      set$1(element, snapsInfo.leftAttr, pt.left() + 'px');
+      set$1(element, snapsInfo.topAttr, pt.top() + 'px');
+    };
+    var clear = function (component, snapsInfo) {
+      var element = component.element();
+      remove$1(element, snapsInfo.leftAttr);
+      remove$1(element, snapsInfo.topAttr);
+    };
+
+    var getCoords = function (component, snapInfo, coord, delta) {
+      return get$e(component, snapInfo).fold(function () {
+        return coord;
+      }, function (fixed) {
+        return fixed$1(fixed.left() + delta.left(), fixed.top() + delta.top());
+      });
+    };
+    var moveOrSnap = function (component, snapInfo, coord, delta, scroll, origin) {
+      var newCoord = getCoords(component, snapInfo, coord, delta);
+      var snap = snapInfo.mustSnap ? findClosestSnap(component, snapInfo, newCoord, scroll, origin) : findSnap(component, snapInfo, newCoord, scroll, origin);
+      var fixedCoord = asFixed(newCoord, scroll, origin);
+      set$8(component, snapInfo, fixedCoord);
+      return snap.fold(function () {
+        return {
+          coord: fixed$1(fixedCoord.left(), fixedCoord.top()),
+          extra: Option.none()
+        };
+      }, function (spanned) {
+        return {
+          coord: spanned.output,
+          extra: spanned.extra
+        };
+      });
+    };
+    var stopDrag = function (component, snapInfo) {
+      clear(component, snapInfo);
+    };
+    var findMatchingSnap = function (snaps, newCoord, scroll, origin) {
+      return findMap(snaps, function (snap) {
+        var sensor = snap.sensor;
+        var inRange = withinRange(newCoord, sensor, snap.range.left(), snap.range.top(), scroll, origin);
+        return inRange ? Option.some({
+          output: absorb(snap.output, newCoord, scroll, origin),
+          extra: snap.extra
+        }) : Option.none();
+      });
+    };
+    var findClosestSnap = function (component, snapInfo, newCoord, scroll, origin) {
+      var snaps = snapInfo.getSnapPoints(component);
+      var matchSnap = findMatchingSnap(snaps, newCoord, scroll, origin);
+      return matchSnap.orThunk(function () {
+        var bestSnap = foldl(snaps, function (acc, snap) {
+          var sensor = snap.sensor;
+          var deltas = getDeltas(newCoord, sensor, snap.range.left(), snap.range.top(), scroll, origin);
+          return acc.deltas.fold(function () {
+            return {
+              deltas: Option.some(deltas),
+              snap: Option.some(snap)
+            };
+          }, function (bestDeltas) {
+            var currAvg = (deltas.left() + deltas.top()) / 2;
+            var bestAvg = (bestDeltas.left() + bestDeltas.top()) / 2;
+            if (currAvg <= bestAvg) {
+              return {
+                deltas: Option.some(deltas),
+                snap: Option.some(snap)
+              };
+            } else {
+              return acc;
+            }
+          });
+        }, {
+          deltas: Option.none(),
+          snap: Option.none()
+        });
+        return bestSnap.snap.map(function (snap) {
+          return {
+            output: absorb(snap.output, newCoord, scroll, origin),
+            extra: snap.extra
+          };
+        });
+      });
+    };
+    var findSnap = function (component, snapInfo, newCoord, scroll, origin) {
+      var snaps = snapInfo.getSnapPoints(component);
+      return findMatchingSnap(snaps, newCoord, scroll, origin);
+    };
+    var snapTo = function (snap, scroll, origin) {
+      return {
+        coord: absorb(snap.output, snap.output, scroll, origin),
+        extra: snap.extra
+      };
+    };
+
+    var snapTo$1 = function (component, dragConfig, _state, snap) {
+      var target = dragConfig.getTarget(component.element());
+      if (dragConfig.repositionTarget) {
+        var doc = owner(component.element());
+        var scroll = get$8(doc);
+        var origin = getOrigin(target);
+        var snapPin = snapTo(snap, scroll, origin);
+        var styles = toStyles(snapPin.coord, scroll, origin);
+        setOptions(target, styles);
+      }
+    };
+
+    var DraggingApis = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        snapTo: snapTo$1
+    });
+
+    var initialAttribute = 'data-initial-z-index';
+    var resetZIndex = function (blocker) {
+      parent(blocker.element()).filter(isElement).each(function (root) {
+        getOpt(root, initialAttribute).fold(function () {
+          return remove$6(root, 'z-index');
+        }, function (zIndex) {
+          return set$2(root, 'z-index', zIndex);
+        });
+        remove$1(root, initialAttribute);
+      });
+    };
+    var changeZIndex = function (blocker) {
+      parent(blocker.element()).filter(isElement).each(function (root) {
+        getRaw(root, 'z-index').each(function (zindex) {
+          set$1(root, initialAttribute, zindex);
+        });
+        set$2(root, 'z-index', get$4(blocker.element(), 'z-index'));
+      });
+    };
+    var instigate = function (anyComponent, blocker) {
+      anyComponent.getSystem().addToGui(blocker);
+      changeZIndex(blocker);
+    };
+    var discard = function (blocker) {
+      resetZIndex(blocker);
+      blocker.getSystem().removeFromGui(blocker);
+    };
+    var createComponent = function (component, blockerClass, blockerEvents) {
+      return component.getSystem().build(Container.sketch({
+        dom: {
+          styles: {
+            'left': '0px',
+            'top': '0px',
+            'width': '100%',
+            'height': '100%',
+            'position': 'fixed',
+            'z-index': '1000000000000000'
+          },
+          classes: [blockerClass]
+        },
+        events: blockerEvents
+      }));
+    };
+
+    var SnapSchema = optionObjOf('snaps', [
+      strict$1('getSnapPoints'),
+      onHandler('onSensor'),
+      strict$1('leftAttr'),
+      strict$1('topAttr'),
+      defaulted$1('lazyViewport', win),
+      defaulted$1('mustSnap', false)
+    ]);
+
+    var schema$t = [
+      defaulted$1('useFixed', never),
+      strict$1('blockerClass'),
+      defaulted$1('getTarget', identity),
+      defaulted$1('onDrag', noop),
+      defaulted$1('repositionTarget', true),
+      defaulted$1('onDrop', noop),
+      defaultedFunction('getBounds', win),
+      SnapSchema
+    ];
+
+    var getCurrentCoord = function (target) {
+      return lift3(getRaw(target, 'left'), getRaw(target, 'top'), getRaw(target, 'position'), function (left, top, position) {
+        var nu = position === 'fixed' ? fixed$1 : offset;
+        return nu(parseInt(left, 10), parseInt(top, 10));
+      }).getOrThunk(function () {
+        var location = absolute(target);
+        return absolute$3(location.left(), location.top());
+      });
+    };
+    var clampCoords = function (component, coords, scroll, origin, startData) {
+      var bounds = startData.bounds;
+      var absoluteCoord = asAbsolute(coords, scroll, origin);
+      var newX = clamp(absoluteCoord.left(), bounds.x, bounds.x + bounds.width - startData.width);
+      var newY = clamp(absoluteCoord.top(), bounds.y, bounds.y + bounds.height - startData.height);
+      var newCoords = absolute$3(newX, newY);
+      return coords.fold(function () {
+        var offset$1 = asOffset(newCoords, scroll, origin);
+        return offset(offset$1.left(), offset$1.top());
+      }, function () {
+        return newCoords;
+      }, function () {
+        var fixed = asFixed(newCoords, scroll, origin);
+        return fixed$1(fixed.left(), fixed.top());
+      });
+    };
+    var calcNewCoord = function (component, optSnaps, currentCoord, scroll, origin, delta, startData) {
+      var newCoord = optSnaps.fold(function () {
+        var translated = translate$2(currentCoord, delta.left(), delta.top());
+        var fixedCoord = asFixed(translated, scroll, origin);
+        return fixed$1(fixedCoord.left(), fixedCoord.top());
+      }, function (snapInfo) {
+        var snapping = moveOrSnap(component, snapInfo, currentCoord, delta, scroll, origin);
+        snapping.extra.each(function (extra) {
+          snapInfo.onSensor(component, extra);
+        });
+        return snapping.coord;
+      });
+      return clampCoords(component, newCoord, scroll, origin, startData);
+    };
+    var dragBy = function (component, dragConfig, startData, delta) {
+      var target = dragConfig.getTarget(component.element());
+      if (dragConfig.repositionTarget) {
+        var doc = owner(component.element());
+        var scroll = get$8(doc);
+        var origin = getOrigin(target);
+        var currentCoord = getCurrentCoord(target);
+        var newCoord = calcNewCoord(component, dragConfig.snaps, currentCoord, scroll, origin, delta, startData);
+        var styles = toStyles(newCoord, scroll, origin);
+        setOptions(target, styles);
+      }
+      dragConfig.onDrag(component, target, delta);
+    };
+
+    var calcStartData = function (dragConfig, comp) {
+      return {
+        bounds: dragConfig.getBounds(),
+        height: getOuter$1(comp.element()),
+        width: getOuter$2(comp.element())
+      };
+    };
+    var move$1 = function (component, dragConfig, dragState, dragMode, event) {
+      var delta = dragState.update(dragMode, event);
+      var dragStartData = dragState.getStartData().getOrThunk(function () {
+        return calcStartData(dragConfig, component);
+      });
+      delta.each(function (dlt) {
+        dragBy(component, dragConfig, dragStartData, dlt);
+      });
+    };
+    var stop = function (component, blocker, dragConfig, dragState) {
+      blocker.each(discard);
+      dragConfig.snaps.each(function (snapInfo) {
+        stopDrag(component, snapInfo);
+      });
+      var target = dragConfig.getTarget(component.element());
+      dragState.reset();
+      dragConfig.onDrop(component, target);
+    };
+    var handlers = function (events) {
+      return function (dragConfig, dragState) {
+        var updateStartState = function (comp) {
+          dragState.setStartData(calcStartData(dragConfig, comp));
+        };
+        return derive(__spreadArrays([run(windowScroll(), function (comp) {
+            dragState.getStartData().each(function () {
+              return updateStartState(comp);
+            });
+          })], events(dragConfig, dragState, updateStartState)));
+      };
+    };
+
+    var init$c = function (dragApi) {
+      return derive([
+        run(mousedown(), dragApi.forceDrop),
+        run(mouseup(), dragApi.drop),
+        run(mousemove(), function (comp, simulatedEvent) {
+          dragApi.move(simulatedEvent.event());
+        }),
+        run(mouseout(), dragApi.delayDrop)
+      ]);
+    };
+
+    var getData$1 = function (event) {
+      return Option.from(Position(event.x(), event.y()));
+    };
+    var getDelta$1 = function (old, nu) {
+      return Position(nu.left() - old.left(), nu.top() - old.top());
+    };
+
+    var MouseData = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        getData: getData$1,
+        getDelta: getDelta$1
+    });
+
+    var events$g = function (dragConfig, dragState, updateStartState) {
+      return [run(mousedown(), function (component, simulatedEvent) {
+          var raw = simulatedEvent.event().raw();
+          if (raw.button !== 0) {
+            return;
+          }
+          simulatedEvent.stop();
+          var stop$1 = function () {
+            return stop(component, Option.some(blocker), dragConfig, dragState);
+          };
+          var delayDrop = DelayedFunction(stop$1, 200);
+          var dragApi = {
+            drop: stop$1,
+            delayDrop: delayDrop.schedule,
+            forceDrop: stop$1,
+            move: function (event) {
+              delayDrop.cancel();
+              move$1(component, dragConfig, dragState, MouseData, event);
+            }
+          };
+          var blocker = createComponent(component, dragConfig.blockerClass, init$c(dragApi));
+          var start = function () {
+            updateStartState(component);
+            instigate(component, blocker);
+          };
+          start();
+        })];
+    };
+    var schema$u = __spreadArrays(schema$t, [output('dragger', { handlers: handlers(events$g) })]);
+
+    var init$d = function (dragApi) {
+      return derive([
+        run(touchstart(), dragApi.forceDrop),
+        run(touchend(), dragApi.drop),
+        run(touchcancel(), dragApi.drop),
+        run(touchmove(), function (comp, simulatedEvent) {
+          dragApi.move(simulatedEvent.event());
+        })
+      ]);
+    };
+
+    var getDataFrom = function (touches) {
+      var touch = touches[0];
+      return Option.some(Position(touch.clientX, touch.clientY));
+    };
+    var getData$2 = function (event) {
+      var raw = event.raw();
+      var touches = raw.touches;
+      return touches.length === 1 ? getDataFrom(touches) : Option.none();
+    };
+    var getDelta$2 = function (old, nu) {
+      return Position(nu.left() - old.left(), nu.top() - old.top());
+    };
+
+    var TouchData = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        getData: getData$2,
+        getDelta: getDelta$2
+    });
+
+    var events$h = function (dragConfig, dragState, updateStartState) {
+      var blockerCell = Cell(Option.none());
+      return [
+        run(touchstart(), function (component, simulatedEvent) {
+          simulatedEvent.stop();
+          var stop$1 = function () {
+            stop(component, blockerCell.get(), dragConfig, dragState);
+            blockerCell.set(Option.none());
+          };
+          var dragApi = {
+            drop: stop$1,
+            delayDrop: function () {
+            },
+            forceDrop: stop$1,
+            move: function (event) {
+              move$1(component, dragConfig, dragState, TouchData, event);
+            }
+          };
+          var blocker = createComponent(component, dragConfig.blockerClass, init$d(dragApi));
+          blockerCell.set(Option.some(blocker));
+          var start = function () {
+            updateStartState(component);
+            instigate(component, blocker);
+          };
+          start();
+        }),
+        run(touchmove(), function (component, simulatedEvent) {
+          simulatedEvent.stop();
+          move$1(component, dragConfig, dragState, TouchData, simulatedEvent.event());
+        }),
+        run(touchend(), function (component, simulatedEvent) {
+          simulatedEvent.stop();
+          stop(component, blockerCell.get(), dragConfig, dragState);
+          blockerCell.set(Option.none());
+        }),
+        run(touchcancel(), function (component) {
+          stop(component, blockerCell.get(), dragConfig, dragState);
+          blockerCell.set(Option.none());
+        })
+      ];
+    };
+    var schema$v = __spreadArrays(schema$t, [output('dragger', { handlers: handlers(events$h) })]);
+
+    var events$i = function (dragConfig, dragState, updateStartState) {
+      return __spreadArrays(events$g(dragConfig, dragState, updateStartState), events$h(dragConfig, dragState, updateStartState));
+    };
+    var schema$w = __spreadArrays(schema$t, [output('dragger', { handlers: handlers(events$i) })]);
+
+    var mouse = schema$u;
+    var touch = schema$v;
+    var mouseOrTouch = schema$w;
+
+    var DraggingBranches = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        mouse: mouse,
+        touch: touch,
+        mouseOrTouch: mouseOrTouch
+    });
+
+    var init$e = function () {
+      var previous = Option.none();
+      var startData = Option.none();
+      var reset = function () {
+        previous = Option.none();
+        startData = Option.none();
+      };
+      var calculateDelta = function (mode, nu) {
+        var result = previous.map(function (old) {
+          return mode.getDelta(old, nu);
+        });
+        previous = Option.some(nu);
+        return result;
+      };
+      var update = function (mode, dragEvent) {
+        return mode.getData(dragEvent).bind(function (nuData) {
+          return calculateDelta(mode, nuData);
+        });
+      };
+      var setStartData = function (data) {
+        startData = Option.some(data);
+      };
+      var getStartData = function () {
+        return startData;
+      };
+      var readState = constant({});
+      return nu$5({
+        readState: readState,
+        reset: reset,
+        update: update,
+        getStartData: getStartData,
+        setStartData: setStartData
+      });
+    };
+
+    var DragState = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        init: init$e
+    });
+
+    var Dragging = createModes$1({
+      branchKey: 'mode',
+      branches: DraggingBranches,
+      name: 'dragging',
+      active: {
+        events: function (dragConfig, dragState) {
+          var dragger = dragConfig.dragger;
+          return dragger.handlers(dragConfig, dragState);
+        }
+      },
+      extra: {
+        snap: function (sConfig) {
+          return {
+            sensor: sConfig.sensor,
+            range: sConfig.range,
+            output: sConfig.output,
+            extra: Option.from(sConfig.extra)
+          };
+        }
+      },
+      state: DragState,
+      apis: DraggingApis
+    });
+
+    var snapWidth = 40;
+    var snapOffset = snapWidth / 2;
+    var calcSnap = function (selectorOpt, td, x, y, width, height) {
+      return selectorOpt.fold(function () {
+        return Dragging.snap({
+          sensor: absolute$3(x - snapOffset, y - snapOffset),
+          range: Position(width, height),
+          output: absolute$3(Option.some(x), Option.some(y)),
+          extra: { td: td }
+        });
+      }, function (selectorHandle) {
+        var sensorLeft = x - snapOffset;
+        var sensorTop = y - snapOffset;
+        var sensorWidth = snapWidth;
+        var sensorHeight = snapWidth;
+        var rect = selectorHandle.element().dom().getBoundingClientRect();
+        return Dragging.snap({
+          sensor: absolute$3(sensorLeft, sensorTop),
+          range: Position(sensorWidth, sensorHeight),
+          output: absolute$3(Option.some(x - rect.width / 2), Option.some(y - rect.height / 2)),
+          extra: { td: td }
+        });
+      });
+    };
+    var getSnapsConfig = function (getSnapPoints, cell, onChange) {
+      var isSameCell = function (cellOpt, td) {
+        return cellOpt.exists(function (currentTd) {
+          return eq$1(currentTd, td);
+        });
+      };
+      return {
+        getSnapPoints: getSnapPoints,
+        leftAttr: 'data-drag-left',
+        topAttr: 'data-drag-top',
+        onSensor: function (component, extra) {
+          var td = extra.td;
+          if (!isSameCell(cell.get(), td)) {
+            cell.set(Option.some(td));
+            onChange(td);
+          }
+        },
+        mustSnap: true
+      };
+    };
+    var createSelector = function (snaps) {
+      return record(Button.sketch({
+        dom: {
+          tag: 'div',
+          classes: ['tox-selector']
+        },
+        buttonBehaviours: derive$1([
+          Dragging.config({
+            mode: 'mouseOrTouch',
+            blockerClass: 'blocker',
+            snaps: snaps
+          }),
+          Unselecting.config({})
+        ]),
+        eventOrder: {
+          mousedown: [
+            'dragging',
+            'alloy.base.behaviour'
+          ],
+          touchstart: [
+            'dragging',
+            'alloy.base.behaviour'
+          ]
+        }
+      }));
+    };
+    var setup$a = function (editor, sink) {
+      var tlTds = Cell([]);
+      var brTds = Cell([]);
+      var isVisible = Cell(false);
+      var startCell = Cell(Option.none());
+      var finishCell = Cell(Option.none());
+      var getTopLeftSnap = function (td) {
+        var box = absolute$1(td);
+        return calcSnap(memTopLeft.getOpt(sink), td, box.x, box.y, box.width, box.height);
+      };
+      var getTopLeftSnaps = function () {
+        return map(tlTds.get(), function (td) {
+          return getTopLeftSnap(td);
+        });
+      };
+      var getBottomRightSnap = function (td) {
+        var box = absolute$1(td);
+        return calcSnap(memBottomRight.getOpt(sink), td, box.right, box.bottom, box.width, box.height);
+      };
+      var getBottomRightSnaps = function () {
+        return map(brTds.get(), function (td) {
+          return getBottomRightSnap(td);
+        });
+      };
+      var topLeftSnaps = getSnapsConfig(getTopLeftSnaps, startCell, function (start) {
+        finishCell.get().each(function (finish) {
+          editor.fire('TableSelectorChange', {
+            start: start,
+            finish: finish
+          });
+        });
+      });
+      var bottomRightSnaps = getSnapsConfig(getBottomRightSnaps, finishCell, function (finish) {
+        startCell.get().each(function (start) {
+          editor.fire('TableSelectorChange', {
+            start: start,
+            finish: finish
+          });
+        });
+      });
+      var memTopLeft = createSelector(topLeftSnaps);
+      var memBottomRight = createSelector(bottomRightSnaps);
+      var topLeft = build$1(memTopLeft.asSpec());
+      var bottomRight = build$1(memBottomRight.asSpec());
+      var showOrHideHandle = function (selector, cell, isAbove, isBelow) {
+        var cellRect = cell.dom().getBoundingClientRect();
+        remove$6(selector.element(), 'display');
+        var viewportHeight = defaultView(Element.fromDom(editor.getBody())).dom().innerHeight;
+        var aboveViewport = isAbove(cellRect);
+        var belowViewport = isBelow(cellRect, viewportHeight);
+        if (aboveViewport || belowViewport) {
+          set$2(selector.element(), 'display', 'none');
+        }
+      };
+      var snapTo = function (selector, cell, getSnapConfig, pos) {
+        var snap = getSnapConfig(cell);
+        Dragging.snapTo(selector, snap);
+        var isAbove = function (rect) {
+          return rect[pos] < 0;
+        };
+        var isBelow = function (rect, viewportHeight) {
+          return rect[pos] > viewportHeight;
+        };
+        showOrHideHandle(selector, cell, isAbove, isBelow);
+      };
+      var snapTopLeft = function (cell) {
+        return snapTo(topLeft, cell, getTopLeftSnap, 'top');
+      };
+      var snapLastTopLeft = function () {
+        return startCell.get().each(snapTopLeft);
+      };
+      var snapBottomRight = function (cell) {
+        return snapTo(bottomRight, cell, getBottomRightSnap, 'bottom');
+      };
+      var snapLastBottomRight = function () {
+        return finishCell.get().each(snapBottomRight);
+      };
+      if (detect$3().deviceType.isTouch()) {
+        editor.on('TableSelectionChange', function (e) {
+          if (!isVisible.get()) {
+            attach$1(sink, topLeft);
+            attach$1(sink, bottomRight);
+            isVisible.set(true);
+          }
+          startCell.set(Option.some(e.start));
+          finishCell.set(Option.some(e.finish));
+          e.otherCells.each(function (otherCells) {
+            tlTds.set(otherCells.upOrLeftCells);
+            brTds.set(otherCells.downOrRightCells);
+            snapTopLeft(e.start);
+            snapBottomRight(e.finish);
+          });
+        });
+        editor.on('ResizeEditor ResizeWindow ScrollContent', function () {
+          snapLastTopLeft();
+          snapLastBottomRight();
+        });
+        editor.on('TableSelectionClear', function () {
+          if (isVisible.get()) {
+            detach(topLeft);
+            detach(bottomRight);
+            isVisible.set(false);
+          }
+          startCell.set(Option.none());
+          finishCell.set(Option.none());
+        });
+      }
+    };
+
+    var ResizeTypes;
+    (function (ResizeTypes) {
+      ResizeTypes[ResizeTypes['None'] = 0] = 'None';
+      ResizeTypes[ResizeTypes['Both'] = 1] = 'Both';
+      ResizeTypes[ResizeTypes['Vertical'] = 2] = 'Vertical';
+    }(ResizeTypes || (ResizeTypes = {})));
+    var getDimensions = function (editor, deltas, resizeType, originalHeight, originalWidth) {
+      var dimensions = {};
+      dimensions.height = calcCappedSize(originalHeight + deltas.top(), getMinHeightSetting(editor), getMaxHeightSetting(editor));
+      if (resizeType === ResizeTypes.Both) {
+        dimensions.width = calcCappedSize(originalWidth + deltas.left(), getMinWidthSetting(editor), getMaxWidthSetting(editor));
+      }
+      return dimensions;
+    };
+    var resize$3 = function (editor, deltas, resizeType) {
+      var container = Element.fromDom(editor.getContainer());
+      var dimensions = getDimensions(editor, deltas, resizeType, get$6(container), get$7(container));
+      each$1(dimensions, function (val, dim) {
+        return set$2(container, dim, numToPx(val));
+      });
+      fireResizeEditor(editor);
+    };
+
+    var isHidden$1 = function (elm) {
+      if (elm.nodeType === 1) {
+        if (elm.nodeName === 'BR' || !!elm.getAttribute('data-mce-bogus')) {
+          return true;
+        }
+        if (elm.getAttribute('data-mce-type') === 'bookmark') {
+          return true;
+        }
+      }
+      return false;
+    };
+    var renderElementPath = function (editor, settings, providersBackstage) {
+      if (!settings.delimiter) {
+        settings.delimiter = '\xBB';
+      }
+      var getDataPath = function (data) {
+        var parts = data || [];
+        var newPathElements = map(parts, function (part, index) {
+          return Button.sketch({
+            dom: {
+              tag: 'div',
+              classes: ['tox-statusbar__path-item'],
+              attributes: {
+                'role': 'button',
+                'data-index': index,
+                'tab-index': -1,
+                'aria-level': index + 1
+              },
+              innerHtml: part.name
+            },
+            action: function (_btn) {
+              editor.focus();
+              editor.selection.select(part.element);
+              editor.nodeChanged();
+            },
+            buttonBehaviours: derive$1([
+              DisablingConfigs.button(providersBackstage.isReadOnly),
+              receivingConfig()
+            ])
+          });
+        });
+        var divider = {
+          dom: {
+            tag: 'div',
+            classes: ['tox-statusbar__path-divider'],
+            attributes: { 'aria-hidden': true },
+            innerHtml: ' ' + settings.delimiter + ' '
+          }
+        };
+        return foldl(newPathElements.slice(1), function (acc, element) {
+          var newAcc = acc;
+          newAcc.push(divider);
+          newAcc.push(element);
+          return newAcc;
+        }, [newPathElements[0]]);
+      };
+      var updatePath = function (parents) {
+        var newPath = [];
+        var i = parents.length;
+        while (i-- > 0) {
+          var parent_1 = parents[i];
+          if (parent_1.nodeType === 1 && !isHidden$1(parent_1)) {
+            var args = editor.fire('ResolveName', {
+              name: parent_1.nodeName.toLowerCase(),
+              target: parent_1
+            });
+            if (!args.isDefaultPrevented()) {
+              newPath.push({
+                name: args.name,
+                element: parent_1
+              });
+            }
+            if (args.isPropagationStopped()) {
+              break;
+            }
+          }
+        }
+        return newPath;
+      };
+      return {
+        dom: {
+          tag: 'div',
+          classes: ['tox-statusbar__path'],
+          attributes: { role: 'navigation' }
+        },
+        behaviours: derive$1([
+          Keying.config({
+            mode: 'flow',
+            selector: 'div[role=button]'
+          }),
+          Disabling.config({ disabled: providersBackstage.isReadOnly }),
+          receivingConfig(),
+          Tabstopping.config({}),
+          Replacing.config({}),
+          config('elementPathEvents', [runOnAttached(function (comp, _e) {
+              editor.shortcuts.add('alt+F11', 'focus statusbar elementpath', function () {
+                return Keying.focusIn(comp);
+              });
+              editor.on('NodeChange', function (e) {
+                var newPath = updatePath(e.parents);
+                if (newPath.length > 0) {
+                  Replacing.set(comp, getDataPath(newPath));
+                } else {
+                  Replacing.set(comp, []);
+                }
+              });
+            })])
+        ]),
+        components: []
+      };
+    };
+
+    var renderWordCount = function (editor, providersBackstage) {
+      var replaceCountText = function (comp, count, mode) {
+        return Replacing.set(comp, [text(providersBackstage.translate([
+            '{0} ' + mode,
+            count[mode]
+          ]))]);
+      };
+      return Button.sketch({
+        dom: {
+          tag: 'button',
+          classes: ['tox-statusbar__wordcount']
+        },
+        components: [],
+        buttonBehaviours: derive$1([
+          DisablingConfigs.button(providersBackstage.isReadOnly),
+          receivingConfig(),
+          Tabstopping.config({}),
+          Replacing.config({}),
+          Representing.config({
+            store: {
+              mode: 'memory',
+              initialValue: {
+                mode: 'words',
+                count: {
+                  words: 0,
+                  characters: 0
+                }
+              }
+            }
+          }),
+          config('wordcount-events', [
+            runOnExecute(function (comp) {
+              var currentVal = Representing.getValue(comp);
+              var newMode = currentVal.mode === 'words' ? 'characters' : 'words';
+              Representing.setValue(comp, {
+                mode: newMode,
+                count: currentVal.count
+              });
+              replaceCountText(comp, currentVal.count, newMode);
+            }),
+            runOnAttached(function (comp) {
+              editor.on('wordCountUpdate', function (e) {
+                var mode = Representing.getValue(comp).mode;
+                Representing.setValue(comp, {
+                  mode: mode,
+                  count: e.wordCount
+                });
+                replaceCountText(comp, e.wordCount, mode);
+              });
+            })
+          ])
+        ]),
+        eventOrder: {
+          'alloy.execute': [
+            'disabling',
+            'alloy.base.behaviour',
+            'wordcount-events'
+          ]
+        }
+      });
+    };
+
+    var renderStatusbar = function (editor, providersBackstage) {
+      var renderResizeHandlerIcon = function (resizeType) {
+        return {
+          dom: {
+            tag: 'div',
+            classes: ['tox-statusbar__resize-handle'],
+            attributes: {
+              'title': providersBackstage.translate('Resize'),
+              'aria-hidden': 'true'
+            },
+            innerHtml: get$d('resize-handle', providersBackstage.icons)
+          },
+          behaviours: derive$1([Dragging.config({
+              mode: 'mouse',
+              repositionTarget: false,
+              onDrag: function (comp, target, delta) {
+                resize$3(editor, delta, resizeType);
+              },
+              blockerClass: 'tox-blocker'
+            })])
+        };
+      };
+      var renderBranding = function () {
+        var label = global$5.translate([
+          'Powered by {0}',
+          'Tiny'
+        ]);
+        var linkHtml = '<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce&amp;utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="' + label + '">' + label + '</a>';
+        return {
+          dom: {
+            tag: 'span',
+            classes: ['tox-statusbar__branding'],
+            innerHtml: linkHtml
+          }
+        };
+      };
+      var getResizeType = function (editor) {
+        var fallback = !contains$1(editor.settings.plugins, 'autoresize');
+        var resize = editor.getParam('resize', fallback);
+        if (resize === false) {
+          return ResizeTypes.None;
+        } else if (resize === 'both') {
+          return ResizeTypes.Both;
+        } else {
+          return ResizeTypes.Vertical;
+        }
+      };
+      var getTextComponents = function () {
+        var components = [];
+        if (editor.getParam('elementpath', true, 'boolean')) {
+          components.push(renderElementPath(editor, {}, providersBackstage));
+        }
+        if (contains$1(editor.settings.plugins, 'wordcount')) {
+          components.push(renderWordCount(editor, providersBackstage));
+        }
+        if (editor.getParam('branding', true, 'boolean')) {
+          components.push(renderBranding());
+        }
+        if (components.length > 0) {
+          return [{
+              dom: {
+                tag: 'div',
+                classes: ['tox-statusbar__text-container']
+              },
+              components: components
+            }];
+        }
+        return [];
+      };
+      var getComponents = function () {
+        var components = getTextComponents();
+        var resizeType = getResizeType(editor);
+        if (resizeType !== ResizeTypes.None) {
+          components.push(renderResizeHandlerIcon(resizeType));
+        }
+        return components;
+      };
+      return {
+        dom: {
+          tag: 'div',
+          classes: ['tox-statusbar']
+        },
+        components: getComponents()
+      };
+    };
+
+    var setup$b = function (editor) {
+      var _a;
+      var isInline = editor.inline;
+      var mode = isInline ? Inline : Iframe;
+      var header = isStickyToolbar(editor) ? StickyHeader : StaticHeader;
+      var lazyOuterContainer = Option.none();
+      var platform = detect$3();
+      var isIE = platform.browser.isIE();
+      var platformClasses = isIE ? ['tox-platform-ie'] : [];
+      var isTouch = platform.deviceType.isTouch();
+      var touchPlatformClass = 'tox-platform-touch';
+      var deviceClasses = isTouch ? [touchPlatformClass] : [];
+      var isToolbarBottom = isToolbarLocationBottom(editor);
+      var dirAttributes = global$5.isRtl() ? { attributes: { dir: 'rtl' } } : {};
+      var verticalDirAttributes = { attributes: (_a = {}, _a[Attribute] = isToolbarBottom ? AttributeValue.BottomToTop : AttributeValue.TopToBottom, _a) };
+      var lazyHeader = function () {
+        return lazyOuterContainer.bind(OuterContainer.getHeader);
+      };
+      var isHeaderDocked = function () {
+        return header.isDocked(lazyHeader);
+      };
+      var sink = build$1({
+        dom: __assign({
+          tag: 'div',
+          classes: [
+            'tox',
+            'tox-silver-sink',
+            'tox-tinymce-aux'
+          ].concat(platformClasses).concat(deviceClasses)
+        }, dirAttributes),
+        behaviours: derive$1([Positioning.config({
+            useFixed: function () {
+              return isHeaderDocked();
+            }
+          })])
+      });
+      var lazySink = function () {
+        return Result.value(sink);
+      };
+      var memAnchorBar = record({
+        dom: {
+          tag: 'div',
+          classes: ['tox-anchorbar']
+        }
+      });
+      var lazyAnchorBar = function () {
+        return lazyOuterContainer.bind(function (container) {
+          return memAnchorBar.getOpt(container);
+        }).getOrDie('Could not find a anchor bar element');
+      };
+      var lazyToolbar = function () {
+        return lazyOuterContainer.bind(function (container) {
+          return OuterContainer.getToolbar(container);
+        }).getOrDie('Could not find more toolbar element');
+      };
+      var lazyThrobber = function () {
+        return lazyOuterContainer.bind(function (container) {
+          return OuterContainer.getThrobber(container);
+        }).getOrDie('Could not find throbber element');
+      };
+      var backstage = init$8(sink, editor, lazyAnchorBar);
+      var partMenubar = OuterContainer.parts().menubar({
+        dom: {
+          tag: 'div',
+          classes: ['tox-menubar']
+        },
+        backstage: backstage,
+        onEscape: function () {
+          editor.focus();
+        }
+      });
+      var toolbarMode = getToolbarMode(editor);
+      var partToolbar = OuterContainer.parts().toolbar(__assign({
+        dom: {
+          tag: 'div',
+          classes: ['tox-toolbar']
+        },
+        getSink: lazySink,
+        providers: backstage.shared.providers,
+        onEscape: function () {
+          editor.focus();
+        },
+        type: toolbarMode,
+        lazyToolbar: lazyToolbar,
+        lazyHeader: function () {
+          return lazyHeader().getOrDie('Could not find header element');
+        }
+      }, verticalDirAttributes));
+      var partMultipleToolbar = OuterContainer.parts()['multiple-toolbar']({
+        dom: {
+          tag: 'div',
+          classes: ['tox-toolbar-overlord']
+        },
+        providers: backstage.shared.providers,
+        onEscape: function () {
+        },
+        type: toolbarMode
+      });
+      var partSocket = OuterContainer.parts().socket({
+        dom: {
+          tag: 'div',
+          classes: ['tox-edit-area']
+        }
+      });
+      var partSidebar = OuterContainer.parts().sidebar({
+        dom: {
+          tag: 'div',
+          classes: ['tox-sidebar']
+        }
+      });
+      var partThrobber = OuterContainer.parts().throbber({
+        dom: {
+          tag: 'div',
+          classes: ['tox-throbber']
+        },
+        backstage: backstage
+      });
+      var sb = editor.getParam('statusbar', true, 'boolean');
+      var statusbar = sb && !isInline ? Option.some(renderStatusbar(editor, backstage.shared.providers)) : Option.none();
+      var socketSidebarContainer = {
+        dom: {
+          tag: 'div',
+          classes: ['tox-sidebar-wrap']
+        },
+        components: [
+          partSocket,
+          partSidebar
+        ]
+      };
+      var hasMultipleToolbar = isMultipleToolbars(editor);
+      var hasToolbar = isToolbarEnabled(editor);
+      var hasMenubar = isMenubarEnabled(editor);
+      var getPartToolbar = function () {
+        if (hasMultipleToolbar) {
+          return [partMultipleToolbar];
+        } else if (hasToolbar) {
+          return [partToolbar];
+        } else {
+          return [];
+        }
+      };
+      var partHeader = OuterContainer.parts().header({
+        dom: __assign({
+          tag: 'div',
+          classes: ['tox-editor-header']
+        }, verticalDirAttributes),
+        components: flatten([
+          hasMenubar ? [partMenubar] : [],
+          getPartToolbar(),
+          useFixedContainer(editor) ? [] : [memAnchorBar.asSpec()]
+        ]),
+        sticky: isStickyToolbar(editor),
+        editor: editor,
+        sharedBackstage: backstage.shared
+      });
+      var editorComponents = flatten([
+        isToolbarBottom ? [] : [partHeader],
+        isInline ? [] : [socketSidebarContainer],
+        isToolbarBottom ? [partHeader] : []
+      ]);
+      var editorContainer = {
+        dom: {
+          tag: 'div',
+          classes: ['tox-editor-container']
+        },
+        components: editorComponents
+      };
+      var containerComponents = flatten([
+        [editorContainer],
+        isInline ? [] : statusbar.toArray(),
+        [partThrobber]
+      ]);
+      var isHidden = isDistractionFree(editor);
+      var attributes = __assign(__assign({ role: 'application' }, global$5.isRtl() ? { dir: 'rtl' } : {}), isHidden ? { 'aria-hidden': 'true' } : {});
+      var outerContainer = build$1(OuterContainer.sketch({
+        dom: {
+          tag: 'div',
+          classes: [
+            'tox',
+            'tox-tinymce'
+          ].concat(isInline ? ['tox-tinymce-inline'] : []).concat(isToolbarBottom ? ['tox-tinymce--toolbar-bottom'] : []).concat(deviceClasses).concat(platformClasses),
+          styles: __assign({ visibility: 'hidden' }, isHidden ? {
+            opacity: '0',
+            border: '0'
+          } : {}),
+          attributes: attributes
+        },
+        components: containerComponents,
+        behaviours: derive$1([Keying.config({
+            mode: 'cyclic',
+            selector: '.tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a'
+          })])
+      }));
+      lazyOuterContainer = Option.some(outerContainer);
+      editor.shortcuts.add('alt+F9', 'focus menubar', function () {
+        OuterContainer.focusMenubar(outerContainer);
+      });
+      editor.shortcuts.add('alt+F10', 'focus toolbar', function () {
+        OuterContainer.focusToolbar(outerContainer);
+      });
+      var mothership = takeover(outerContainer);
+      var uiMothership = takeover(sink);
+      setup$3(editor, mothership, uiMothership);
+      var getUi = function () {
+        var channels = {
+          broadcastAll: uiMothership.broadcast,
+          broadcastOn: uiMothership.broadcastOn,
+          register: function () {
+          }
+        };
+        return { channels: channels };
+      };
+      var setEditorSize = function () {
+        var parsedHeight = numToPx(getHeightWithFallback(editor));
+        var parsedWidth = numToPx(getWidthWithFallback(editor));
+        if (!editor.inline) {
+          if (isValidValue('div', 'width', parsedWidth)) {
+            set$2(outerContainer.element(), 'width', parsedWidth);
+          }
+          if (isValidValue('div', 'height', parsedHeight)) {
+            set$2(outerContainer.element(), 'height', parsedHeight);
+          } else {
+            set$2(outerContainer.element(), 'height', '200px');
+          }
+        }
+        return parsedHeight;
+      };
+      var renderUI = function () {
+        header.setup(editor, backstage.shared, lazyHeader);
+        setup$8(editor, backstage);
+        setup$9(editor, lazySink, backstage);
+        setup$6(editor);
+        setup$7(editor, lazyThrobber, backstage.shared);
+        map$1(getToolbarGroups(editor), function (toolbarGroupButtonConfig, name) {
+          editor.ui.registry.addGroupToolbarButton(name, toolbarGroupButtonConfig);
+        });
+        var _a = editor.ui.registry.getAll(), buttons = _a.buttons, menuItems = _a.menuItems, contextToolbars = _a.contextToolbars, sidebars = _a.sidebars;
+        var toolbarOpt = getMultipleToolbarsSetting(editor);
+        var rawUiConfig = {
+          menuItems: menuItems,
+          menus: !editor.settings.menu ? {} : map$1(editor.settings.menu, function (menu) {
+            return __assign(__assign({}, menu), { items: menu.items });
+          }),
+          menubar: editor.settings.menubar,
+          toolbar: toolbarOpt.getOrThunk(function () {
+            return editor.getParam('toolbar', true);
+          }),
+          allowToolbarGroups: toolbarMode === ToolbarMode.floating,
+          buttons: buttons,
+          sidebar: sidebars
+        };
+        register$4(editor, contextToolbars, sink, { backstage: backstage });
+        setup$a(editor, sink);
+        var elm = editor.getElement();
+        var height = setEditorSize();
+        var uiComponents = {
+          mothership: mothership,
+          uiMothership: uiMothership,
+          outerContainer: outerContainer
+        };
+        var args = {
+          targetNode: elm,
+          height: height
+        };
+        return mode.render(editor, uiComponents, rawUiConfig, backstage, args);
+      };
+      return {
+        mothership: mothership,
+        uiMothership: uiMothership,
+        backstage: backstage,
+        renderUI: renderUI,
+        getUi: getUi
+      };
+    };
+
+    var describedBy = function (describedElement, describeElement) {
+      var describeId = Option.from(get$2(describedElement, 'id')).fold(function () {
+        var id = generate$1('dialog-describe');
+        set$1(describeElement, 'id', id);
+        return id;
+      }, identity);
+      set$1(describedElement, 'aria-describedby', describeId);
+    };
+
+    var labelledBy = function (labelledElement, labelElement) {
+      var labelId = Option.from(get$2(labelledElement, 'id')).fold(function () {
+        var id = generate$1('dialog-label');
+        set$1(labelElement, 'id', id);
+        return id;
+      }, identity);
+      set$1(labelledElement, 'aria-labelledby', labelId);
+    };
+
+    var schema$x = constant([
+      strict$1('lazySink'),
+      option('dragBlockClass'),
+      defaultedFunction('getBounds', win),
+      defaulted$1('useTabstopAt', constant(true)),
+      defaulted$1('eventOrder', {}),
+      field$1('modalBehaviours', [Keying]),
+      onKeyboardHandler('onExecute'),
+      onStrictKeyboardHandler('onEscape')
+    ]);
+    var basic = { sketch: identity };
+    var parts$f = constant([
+      optional({
+        name: 'draghandle',
+        overrides: function (detail, spec) {
+          return {
+            behaviours: derive$1([Dragging.config({
+                mode: 'mouse',
+                getTarget: function (handle) {
+                  return ancestor$2(handle, '[role="dialog"]').getOr(handle);
+                },
+                blockerClass: detail.dragBlockClass.getOrDie(new Error('The drag blocker class was not specified for a dialog with a drag handle: \n' + JSON.stringify(spec, null, 2)).message),
+                getBounds: detail.getDragBounds
+              })])
+          };
+        }
+      }),
+      required({
+        schema: [strict$1('dom')],
+        name: 'title'
+      }),
+      required({
+        factory: basic,
+        schema: [strict$1('dom')],
+        name: 'close'
+      }),
+      required({
+        factory: basic,
+        schema: [strict$1('dom')],
+        name: 'body'
+      }),
+      optional({
+        factory: basic,
+        schema: [strict$1('dom')],
+        name: 'footer'
+      }),
+      external$1({
+        factory: {
+          sketch: function (spec, detail) {
+            return __assign(__assign({}, spec), {
+              dom: detail.dom,
+              components: detail.components
+            });
+          }
+        },
+        schema: [
+          defaulted$1('dom', {
+            tag: 'div',
+            styles: {
+              position: 'fixed',
+              left: '0px',
+              top: '0px',
+              right: '0px',
+              bottom: '0px'
+            }
+          }),
+          defaulted$1('components', [])
+        ],
+        name: 'blocker'
+      })
+    ]);
+
+    var factory$i = function (detail, components, spec, externals) {
+      var dialogBusyEvent = generate$1('alloy.dialog.busy');
+      var dialogIdleEvent = generate$1('alloy.dialog.idle');
+      var busyBehaviours = derive$1([
+        Keying.config({
+          mode: 'special',
+          onTab: function () {
+            return Option.some(true);
+          },
+          onShiftTab: function () {
+            return Option.some(true);
+          }
+        }),
+        Focusing.config({})
+      ]);
+      var showDialog = function (dialog) {
+        var sink = detail.lazySink(dialog).getOrDie();
+        var busyComp = Cell(Option.none());
+        var externalBlocker = externals.blocker();
+        var blocker = sink.getSystem().build(__assign(__assign({}, externalBlocker), {
+          components: externalBlocker.components.concat([premade$1(dialog)]),
+          behaviours: derive$1([
+            Focusing.config({}),
+            config('dialog-blocker-events', [
+              runOnSource(focusin(), function () {
+                Keying.focusIn(dialog);
+              }),
+              run(dialogIdleEvent, function (_blocker, _se) {
+                if (has$1(dialog.element(), 'aria-busy')) {
+                  remove$1(dialog.element(), 'aria-busy');
+                  busyComp.get().each(function (bc) {
+                    return Replacing.remove(dialog, bc);
+                  });
+                }
+              }),
+              run(dialogBusyEvent, function (blocker, se) {
+                set$1(dialog.element(), 'aria-busy', 'true');
+                var getBusySpec = se.event().getBusySpec();
+                busyComp.get().each(function (bc) {
+                  Replacing.remove(dialog, bc);
+                });
+                var busySpec = getBusySpec(dialog, busyBehaviours);
+                var busy = blocker.getSystem().build(busySpec);
+                busyComp.set(Option.some(busy));
+                Replacing.append(dialog, premade$1(busy));
+                if (busy.hasConfigured(Keying)) {
+                  Keying.focusIn(busy);
+                }
+              })
+            ])
+          ])
+        }));
+        attach$1(sink, blocker);
+        Keying.focusIn(dialog);
+      };
+      var hideDialog = function (dialog) {
+        parent(dialog.element()).each(function (blockerDom) {
+          dialog.getSystem().getByDom(blockerDom).each(function (blocker) {
+            detach(blocker);
+          });
+        });
+      };
+      var getDialogBody = function (dialog) {
+        return getPartOrDie(dialog, detail, 'body');
+      };
+      var getDialogFooter = function (dialog) {
+        return getPartOrDie(dialog, detail, 'footer');
+      };
+      var setBusy = function (dialog, getBusySpec) {
+        emitWith(dialog, dialogBusyEvent, { getBusySpec: getBusySpec });
+      };
+      var setIdle = function (dialog) {
+        emit(dialog, dialogIdleEvent);
+      };
+      var modalEventsId = generate$1('modal-events');
+      var eventOrder = __assign(__assign({}, detail.eventOrder), { 'alloy.system.attached': [modalEventsId].concat(detail.eventOrder['alloy.system.attached'] || []) });
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        apis: {
+          show: showDialog,
+          hide: hideDialog,
+          getBody: getDialogBody,
+          getFooter: getDialogFooter,
+          setIdle: setIdle,
+          setBusy: setBusy
+        },
+        eventOrder: eventOrder,
+        domModification: {
+          attributes: {
+            'role': 'dialog',
+            'aria-modal': 'true'
+          }
+        },
+        behaviours: augment(detail.modalBehaviours, [
+          Replacing.config({}),
+          Keying.config({
+            mode: 'cyclic',
+            onEnter: detail.onExecute,
+            onEscape: detail.onEscape,
+            useTabstopAt: detail.useTabstopAt
+          }),
+          config(modalEventsId, [runOnAttached(function (c) {
+              labelledBy(c.element(), getPartOrDie(c, detail, 'title').element());
+              describedBy(c.element(), getPartOrDie(c, detail, 'body').element());
+            })])
+        ])
+      };
+    };
+    var ModalDialog = composite$1({
+      name: 'ModalDialog',
+      configFields: schema$x(),
+      partFields: parts$f(),
+      factory: factory$i,
+      apis: {
+        show: function (apis, dialog) {
+          apis.show(dialog);
+        },
+        hide: function (apis, dialog) {
+          apis.hide(dialog);
+        },
+        getBody: function (apis, dialog) {
+          return apis.getBody(dialog);
+        },
+        getFooter: function (apis, dialog) {
+          return apis.getFooter(dialog);
+        },
+        setBusy: function (apis, dialog, getBusySpec) {
+          apis.setBusy(dialog, getBusySpec);
+        },
+        setIdle: function (apis, dialog) {
+          apis.setIdle(dialog);
+        }
+      }
+    });
+
+    var alertBannerFields = [
+      strictString('type'),
+      strictString('text'),
+      strictStringEnum('level', [
+        'info',
+        'warn',
+        'error',
+        'success'
+      ]),
+      strictString('icon'),
+      defaulted$1('url', '')
+    ];
+    var alertBannerSchema = objOf(alertBannerFields);
+
+    var createBarFields = function (itemsField) {
+      return [
+        strictString('type'),
+        itemsField
+      ];
+    };
+
+    var buttonFields = [
+      strictString('type'),
+      strictString('text'),
+      defaultedBoolean('disabled', false),
+      defaultedBoolean('primary', false),
+      field('name', 'name', defaultedThunk(function () {
+        return generate$1('button-name');
+      }), string),
+      optionString('icon'),
+      defaultedBoolean('borderless', false)
+    ];
+    var buttonSchema = objOf(buttonFields);
+
+    var checkboxFields = [
+      strictString('type'),
+      strictString('name'),
+      strictString('label'),
+      defaultedBoolean('disabled', false)
+    ];
+    var checkboxSchema = objOf(checkboxFields);
+    var checkboxDataProcessor = boolean;
+
+    var formComponentFields = [
+      strictString('type'),
+      strictString('name')
+    ];
+    var formComponentWithLabelFields = formComponentFields.concat([optionString('label')]);
+
+    var colorInputFields = formComponentWithLabelFields;
+    var colorInputSchema = objOf(colorInputFields);
+    var colorInputDataProcessor = string;
+
+    var colorPickerFields = formComponentWithLabelFields;
+    var colorPickerSchema = objOf(colorPickerFields);
+    var colorPickerDataProcessor = string;
+
+    var dropZoneFields = formComponentWithLabelFields;
+    var dropZoneSchema = objOf(dropZoneFields);
+    var dropZoneDataProcessor = arrOfVal();
+
+    var createGridFields = function (itemsField) {
+      return [
+        strictString('type'),
+        strictNumber('columns'),
+        itemsField
+      ];
+    };
+
+    var iframeFields = formComponentWithLabelFields.concat([defaultedBoolean('sandboxed', true)]);
+    var iframeSchema = objOf(iframeFields);
+    var iframeDataProcessor = string;
+
+    var inputFields = formComponentWithLabelFields.concat([
+      optionString('inputMode'),
+      optionString('placeholder'),
+      defaultedBoolean('maximized', false),
+      defaultedBoolean('disabled', false)
+    ]);
+    var inputSchema = objOf(inputFields);
+    var inputDataProcessor = string;
+
+    var selectBoxFields = formComponentWithLabelFields.concat([
+      strictArrayOfObj('items', [
+        strictString('text'),
+        strictString('value')
+      ]),
+      defaultedNumber('size', 1),
+      defaultedBoolean('disabled', false)
+    ]);
+    var selectBoxSchema = objOf(selectBoxFields);
+    var selectBoxDataProcessor = string;
+
+    var sizeInputFields = formComponentWithLabelFields.concat([
+      defaultedBoolean('constrain', true),
+      defaultedBoolean('disabled', false)
+    ]);
+    var sizeInputSchema = objOf(sizeInputFields);
+    var sizeInputDataProcessor = objOf([
+      strictString('width'),
+      strictString('height')
+    ]);
+
+    var textAreaFields = formComponentWithLabelFields.concat([
+      optionString('placeholder'),
+      defaultedBoolean('maximized', false),
+      defaultedBoolean('disabled', false)
+    ]);
+    var textAreaSchema = objOf(textAreaFields);
+    var textAreaDataProcessor = string;
+
+    var urlInputFields = formComponentWithLabelFields.concat([
+      defaultedStringEnum('filetype', 'file', [
+        'image',
+        'media',
+        'file'
+      ]),
+      defaulted$1('disabled', false)
+    ]);
+    var urlInputSchema = objOf(urlInputFields);
+    var urlInputDataProcessor = objOf([
+      strictString('value'),
+      defaulted$1('meta', {})
+    ]);
+
+    var customEditorFields = formComponentFields.concat([
+      defaultedString('tag', 'textarea'),
+      strictString('scriptId'),
+      strictString('scriptUrl'),
+      defaultedPostMsg('settings', undefined)
+    ]);
+    var customEditorFieldsOld = formComponentFields.concat([
+      defaultedString('tag', 'textarea'),
+      strictFunction('init')
+    ]);
+    var customEditorSchema = valueOf(function (v) {
+      return asRaw('customeditor.old', objOfOnly(customEditorFieldsOld), v).orThunk(function () {
+        return asRaw('customeditor.new', objOfOnly(customEditorFields), v);
+      });
+    });
+    var customEditorDataProcessor = string;
+
+    var htmlPanelFields = [
+      strictString('type'),
+      strictString('html'),
+      defaultedStringEnum('presets', 'presentation', [
+        'presentation',
+        'document'
+      ])
+    ];
+    var htmlPanelSchema = objOf(htmlPanelFields);
+
+    var imageToolsFields = formComponentWithLabelFields.concat([strictOf('currentState', objOf([
+        strict$1('blob'),
+        strictString('url')
+      ]))]);
+    var imageToolsSchema = objOf(imageToolsFields);
+
+    var collectionFields = formComponentWithLabelFields.concat([defaulted$1('columns', 'auto')]);
+    var collectionSchema = objOf(collectionFields);
+    var collectionDataProcessor = arrOfObj$1([
+      strictString('value'),
+      strictString('text'),
+      strictString('icon')
+    ]);
+
+    var createLabelFields = function (itemsField) {
+      return [
+        strictString('type'),
+        strictString('label'),
+        itemsField
+      ];
+    };
+
+    var tableFields = [
+      strictString('type'),
+      strictArrayOf('header', string),
+      strictArrayOf('cells', arrOf(string))
+    ];
+    var tableSchema = objOf(tableFields);
+
+    var createItemsField = function (name) {
+      return field('items', 'items', strict(), arrOf(valueOf(function (v) {
+        return asRaw('Checking item of ' + name, itemSchema$2, v).fold(function (sErr) {
+          return Result.error(formatError(sErr));
+        }, function (passValue) {
+          return Result.value(passValue);
+        });
+      })));
+    };
+    var itemSchema$2 = valueThunkOf(function () {
+      return chooseProcessor('type', {
+        alertbanner: alertBannerSchema,
+        bar: objOf(createBarFields(createItemsField('bar'))),
+        button: buttonSchema,
+        checkbox: checkboxSchema,
+        colorinput: colorInputSchema,
+        colorpicker: colorPickerSchema,
+        dropzone: dropZoneSchema,
+        grid: objOf(createGridFields(createItemsField('grid'))),
+        iframe: iframeSchema,
+        input: inputSchema,
+        selectbox: selectBoxSchema,
+        sizeinput: sizeInputSchema,
+        textarea: textAreaSchema,
+        urlinput: urlInputSchema,
+        customeditor: customEditorSchema,
+        htmlpanel: htmlPanelSchema,
+        imagetools: imageToolsSchema,
+        collection: collectionSchema,
+        label: objOf(createLabelFields(createItemsField('label'))),
+        table: tableSchema,
+        panel: panelSchema
+      });
+    });
+    var panelFields = [
+      strictString('type'),
+      defaulted$1('classes', []),
+      strictArrayOf('items', itemSchema$2)
+    ];
+    var panelSchema = objOf(panelFields);
+
+    var tabFields = [
+      field('name', 'name', defaultedThunk(function () {
+        return generate$1('tab-name');
+      }), string),
+      strictString('title'),
+      strictArrayOf('items', itemSchema$2)
+    ];
+    var tabPanelFields = [
+      strictString('type'),
+      strictArrayOfObj('tabs', tabFields)
+    ];
+    var tabPanelSchema = objOf(tabPanelFields);
+
+    var dialogToggleMenuItemSchema = objOf([
+      strictString('type'),
+      strictString('name')
+    ].concat(commonMenuItemFields));
+    var dialogToggleMenuItemDataProcessor = boolean;
+
+    var baseButtonFields = [
+      field('name', 'name', defaultedThunk(function () {
+        return generate$1('button-name');
+      }), string),
+      optionString('icon'),
+      defaultedStringEnum('align', 'end', [
+        'start',
+        'end'
+      ]),
+      defaultedBoolean('primary', false),
+      defaultedBoolean('disabled', false)
+    ];
+    var dialogButtonFields = __spreadArrays(baseButtonFields, [strictString('text')]);
+    var normalButtonFields = __spreadArrays([strictStringEnum('type', [
+        'submit',
+        'cancel',
+        'custom'
+      ])], dialogButtonFields);
+    var menuButtonFields = __spreadArrays([
+      strictStringEnum('type', ['menu']),
+      optionString('text'),
+      optionString('tooltip'),
+      optionString('icon'),
+      strictArrayOf('items', dialogToggleMenuItemSchema)
+    ], baseButtonFields);
+    var dialogButtonSchema = choose$1('type', {
+      submit: normalButtonFields,
+      cancel: normalButtonFields,
+      custom: normalButtonFields,
+      menu: menuButtonFields
+    });
+
+    var dialogButtonFields$1 = dialogButtonFields;
+    var dialogButtonSchema$1 = dialogButtonSchema;
+    var dialogSchema = objOf([
+      strictString('title'),
+      strictOf('body', chooseProcessor('type', {
+        panel: panelSchema,
+        tabpanel: tabPanelSchema
+      })),
+      defaultedString('size', 'normal'),
+      strictArrayOf('buttons', dialogButtonSchema$1),
+      defaulted$1('initialData', {}),
+      defaultedFunction('onAction', noop),
+      defaultedFunction('onChange', noop),
+      defaultedFunction('onSubmit', noop),
+      defaultedFunction('onClose', noop),
+      defaultedFunction('onCancel', noop),
+      defaulted$1('onTabChange', noop)
+    ]);
+    var createDialog = function (spec) {
+      return asRaw('dialog', dialogSchema, spec);
+    };
+
+    var getAllObjects = function (obj) {
+      if (isObject(obj)) {
+        return [obj].concat(bind(values(obj), getAllObjects));
+      } else if (isArray(obj)) {
+        return bind(obj, getAllObjects);
+      } else {
+        return [];
+      }
+    };
+
+    var isNamedItem = function (obj) {
+      return isString(obj.type) && isString(obj.name);
+    };
+    var dataProcessors = {
+      checkbox: checkboxDataProcessor,
+      colorinput: colorInputDataProcessor,
+      colorpicker: colorPickerDataProcessor,
+      dropzone: dropZoneDataProcessor,
+      input: inputDataProcessor,
+      iframe: iframeDataProcessor,
+      sizeinput: sizeInputDataProcessor,
+      selectbox: selectBoxDataProcessor,
+      size: sizeInputDataProcessor,
+      textarea: textAreaDataProcessor,
+      urlinput: urlInputDataProcessor,
+      customeditor: customEditorDataProcessor,
+      collection: collectionDataProcessor,
+      togglemenuitem: dialogToggleMenuItemDataProcessor
+    };
+    var getDataProcessor = function (item) {
+      return Option.from(dataProcessors[item.type]);
+    };
+    var getNamedItems = function (structure) {
+      return filter(getAllObjects(structure), isNamedItem);
+    };
+
+    var createDataValidator = function (structure) {
+      var namedItems = getNamedItems(structure);
+      var fields = bind(namedItems, function (item) {
+        return getDataProcessor(item).fold(function () {
+          return [];
+        }, function (schema) {
+          return [strictOf(item.name, schema)];
+        });
+      });
+      return objOf(fields);
+    };
+
+    var urlDialogButtonSchema = objOf(__spreadArrays([strictStringEnum('type', [
+        'cancel',
+        'custom'
+      ])], dialogButtonFields$1));
+    var urlDialogSchema = objOf([
+      strictString('title'),
+      strictString('url'),
+      optionNumber('height'),
+      optionNumber('width'),
+      optionArrayOf('buttons', urlDialogButtonSchema),
+      defaultedFunction('onAction', noop),
+      defaultedFunction('onCancel', noop),
+      defaultedFunction('onClose', noop),
+      defaultedFunction('onMessage', noop)
+    ]);
+    var createUrlDialog = function (spec) {
+      return asRaw('dialog', urlDialogSchema, spec);
+    };
+
+    var extract$1 = function (structure) {
+      var internalDialog = getOrDie(createDialog(structure));
+      var dataValidator = createDataValidator(structure);
+      var initialData = structure.initialData;
+      return {
+        internalDialog: internalDialog,
+        dataValidator: dataValidator,
+        initialData: initialData
+      };
+    };
+    var DialogManager = {
+      open: function (factory, structure) {
+        var extraction = extract$1(structure);
+        return factory(extraction.internalDialog, extraction.initialData, extraction.dataValidator);
+      },
+      openUrl: function (factory, structure) {
+        var internalDialog = getOrDie(createUrlDialog(structure));
+        return factory(internalDialog);
+      },
+      redial: function (structure) {
+        return extract$1(structure);
+      }
+    };
+
+    var toValidValues = function (values) {
+      var errors = [];
+      var result = {};
+      each$1(values, function (value, name) {
+        value.fold(function () {
+          errors.push(name);
+        }, function (v) {
+          result[name] = v;
+        });
+      });
+      return errors.length > 0 ? Result.error(errors) : Result.value(result);
+    };
+
+    var renderBodyPanel = function (spec, backstage) {
+      var memForm = record(Form.sketch(function (parts) {
+        return {
+          dom: {
+            tag: 'div',
+            classes: ['tox-form'].concat(spec.classes)
+          },
+          components: map(spec.items, function (item) {
+            return interpretInForm(parts, item, backstage);
+          })
+        };
+      }));
+      return {
+        dom: {
+          tag: 'div',
+          classes: ['tox-dialog__body']
+        },
+        components: [{
+            dom: {
+              tag: 'div',
+              classes: ['tox-dialog__body-content']
+            },
+            components: [memForm.asSpec()]
+          }],
+        behaviours: derive$1([
+          Keying.config({
+            mode: 'acyclic',
+            useTabstopAt: not(isPseudoStop)
+          }),
+          ComposingConfigs.memento(memForm),
+          RepresentingConfigs.memento(memForm, {
+            postprocess: function (formValue) {
+              return toValidValues(formValue).fold(function (err) {
+                domGlobals.console.error(err);
+                return {};
+              }, function (vals) {
+                return vals;
+              });
+            }
+          })
+        ])
+      };
+    };
+
+    var factory$j = function (detail, _spec) {
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: detail.components,
+        events: events$7(detail.action),
+        behaviours: augment(detail.tabButtonBehaviours, [
+          Focusing.config({}),
+          Keying.config({
+            mode: 'execution',
+            useSpace: true,
+            useEnter: true
+          }),
+          Representing.config({
+            store: {
+              mode: 'memory',
+              initialValue: detail.value
+            }
+          })
+        ]),
+        domModification: detail.domModification
+      };
+    };
+    var TabButton = single$2({
+      name: 'TabButton',
+      configFields: [
+        defaulted$1('uid', undefined),
+        strict$1('value'),
+        field('dom', 'dom', mergeWithThunk(function () {
+          return {
+            attributes: {
+              'role': 'tab',
+              'id': generate$1('aria'),
+              'aria-selected': 'false'
+            }
+          };
+        }), anyValue$1()),
+        option('action'),
+        defaulted$1('domModification', {}),
+        field$1('tabButtonBehaviours', [
+          Focusing,
+          Keying,
+          Representing
+        ]),
+        strict$1('view')
+      ],
+      factory: factory$j
+    });
+
+    var schema$y = constant([
+      strict$1('tabs'),
+      strict$1('dom'),
+      defaulted$1('clickToDismiss', false),
+      field$1('tabbarBehaviours', [
+        Highlighting,
+        Keying
+      ]),
+      markers([
+        'tabClass',
+        'selectedClass'
+      ])
+    ]);
+    var tabsPart = group({
+      factory: TabButton,
+      name: 'tabs',
+      unit: 'tab',
+      overrides: function (barDetail) {
+        var dismissTab$1 = function (tabbar, button) {
+          Highlighting.dehighlight(tabbar, button);
+          emitWith(tabbar, dismissTab(), {
+            tabbar: tabbar,
+            button: button
+          });
+        };
+        var changeTab$1 = function (tabbar, button) {
+          Highlighting.highlight(tabbar, button);
+          emitWith(tabbar, changeTab(), {
+            tabbar: tabbar,
+            button: button
+          });
+        };
+        return {
+          action: function (button) {
+            var tabbar = button.getSystem().getByUid(barDetail.uid).getOrDie();
+            var activeButton = Highlighting.isHighlighted(tabbar, button);
+            var response = function () {
+              if (activeButton && barDetail.clickToDismiss) {
+                return dismissTab$1;
+              } else if (!activeButton) {
+                return changeTab$1;
+              } else {
+                return noop;
+              }
+            }();
+            response(tabbar, button);
+          },
+          domModification: { classes: [barDetail.markers.tabClass] }
+        };
+      }
+    });
+    var parts$g = constant([tabsPart]);
+
+    var factory$k = function (detail, components, _spec, _externals) {
+      return {
+        'uid': detail.uid,
+        'dom': detail.dom,
+        components: components,
+        'debug.sketcher': 'Tabbar',
+        'domModification': { attributes: { role: 'tablist' } },
+        'behaviours': augment(detail.tabbarBehaviours, [
+          Highlighting.config({
+            highlightClass: detail.markers.selectedClass,
+            itemClass: detail.markers.tabClass,
+            onHighlight: function (tabbar, tab) {
+              set$1(tab.element(), 'aria-selected', 'true');
+            },
+            onDehighlight: function (tabbar, tab) {
+              set$1(tab.element(), 'aria-selected', 'false');
+            }
+          }),
+          Keying.config({
+            mode: 'flow',
+            getInitial: function (tabbar) {
+              return Highlighting.getHighlighted(tabbar).map(function (tab) {
+                return tab.element();
+              });
+            },
+            selector: '.' + detail.markers.tabClass,
+            executeOnMove: true
+          })
+        ])
+      };
+    };
+    var Tabbar = composite$1({
+      name: 'Tabbar',
+      configFields: schema$y(),
+      partFields: parts$g(),
+      factory: factory$k
+    });
+
+    var factory$l = function (detail, _spec) {
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        behaviours: augment(detail.tabviewBehaviours, [Replacing.config({})]),
+        domModification: { attributes: { role: 'tabpanel' } }
+      };
+    };
+    var Tabview = single$2({
+      name: 'Tabview',
+      configFields: [field$1('tabviewBehaviours', [Replacing])],
+      factory: factory$l
+    });
+
+    var schema$z = constant([
+      defaulted$1('selectFirst', true),
+      onHandler('onChangeTab'),
+      onHandler('onDismissTab'),
+      defaulted$1('tabs', []),
+      field$1('tabSectionBehaviours', [])
+    ]);
+    var barPart = required({
+      factory: Tabbar,
+      schema: [
+        strict$1('dom'),
+        strictObjOf('markers', [
+          strict$1('tabClass'),
+          strict$1('selectedClass')
+        ])
+      ],
+      name: 'tabbar',
+      defaults: function (detail) {
+        return { tabs: detail.tabs };
+      }
+    });
+    var viewPart = required({
+      factory: Tabview,
+      name: 'tabview'
+    });
+    var parts$h = constant([
+      barPart,
+      viewPart
+    ]);
+
+    var factory$m = function (detail, components, _spec, _externals) {
+      var changeTab$1 = function (button) {
+        var tabValue = Representing.getValue(button);
+        getPart(button, detail, 'tabview').each(function (tabview) {
+          var tabWithValue = find(detail.tabs, function (t) {
+            return t.value === tabValue;
+          });
+          tabWithValue.each(function (tabData) {
+            var panel = tabData.view();
+            getOpt(button.element(), 'id').each(function (id) {
+              set$1(tabview.element(), 'aria-labelledby', id);
+            });
+            Replacing.set(tabview, panel);
+            detail.onChangeTab(tabview, button, panel);
+          });
+        });
+      };
+      var changeTabBy = function (section, byPred) {
+        getPart(section, detail, 'tabbar').each(function (tabbar) {
+          byPred(tabbar).each(emitExecute);
+        });
+      };
+      return {
+        uid: detail.uid,
+        dom: detail.dom,
+        components: components,
+        behaviours: get$c(detail.tabSectionBehaviours),
+        events: derive(flatten([
+          detail.selectFirst ? [runOnAttached(function (section, _simulatedEvent) {
+              changeTabBy(section, Highlighting.getFirst);
+            })] : [],
+          [
+            run(changeTab(), function (section, simulatedEvent) {
+              var button = simulatedEvent.event().button();
+              changeTab$1(button);
+            }),
+            run(dismissTab(), function (section, simulatedEvent) {
+              var button = simulatedEvent.event().button();
+              detail.onDismissTab(section, button);
+            })
+          ]
+        ])),
+        apis: {
+          getViewItems: function (section) {
+            return getPart(section, detail, 'tabview').map(function (tabview) {
+              return Replacing.contents(tabview);
+            }).getOr([]);
+          },
+          showTab: function (section, tabKey) {
+            var getTabIfNotActive = function (tabbar) {
+              var candidates = Highlighting.getCandidates(tabbar);
+              var optTab = find(candidates, function (c) {
+                return Representing.getValue(c) === tabKey;
+              });
+              return optTab.filter(function (tab) {
+                return !Highlighting.isHighlighted(tabbar, tab);
+              });
+            };
+            changeTabBy(section, getTabIfNotActive);
+          }
+        }
+      };
+    };
+    var TabSection = composite$1({
+      name: 'TabSection',
+      configFields: schema$z(),
+      partFields: parts$h(),
+      factory: factory$m,
+      apis: {
+        getViewItems: function (apis, component) {
+          return apis.getViewItems(component);
+        },
+        showTab: function (apis, component, tabKey) {
+          apis.showTab(component, tabKey);
+        }
+      }
+    });
+
+    var measureHeights = function (allTabs, tabview, tabviewComp) {
+      return map(allTabs, function (_tab, i) {
+        Replacing.set(tabviewComp, allTabs[i].view());
+        var rect = tabview.dom().getBoundingClientRect();
+        Replacing.set(tabviewComp, []);
+        return rect.height;
+      });
+    };
+    var getMaxHeight = function (heights) {
+      return head(sort(heights, function (a, b) {
+        if (a > b) {
+          return -1;
+        } else if (a < b) {
+          return +1;
+        } else {
+          return 0;
+        }
+      }));
+    };
+    var getMaxTabviewHeight = function (dialog, tabview, tablist) {
+      var documentElement$1 = documentElement(dialog).dom();
+      var rootElm = ancestor$2(dialog, '.tox-dialog-wrap').getOr(dialog);
+      var isFixed = get$4(rootElm, 'position') === 'fixed';
+      var maxHeight;
+      if (isFixed) {
+        maxHeight = Math.max(documentElement$1.clientHeight, domGlobals.window.innerHeight);
+      } else {
+        maxHeight = Math.max(documentElement$1.offsetHeight, documentElement$1.scrollHeight);
+      }
+      var tabviewHeight = get$6(tabview);
+      var isTabListBeside = tabview.dom().offsetLeft >= tablist.dom().offsetLeft + get$7(tablist);
+      var currentTabHeight = isTabListBeside ? Math.max(get$6(tablist), tabviewHeight) : tabviewHeight;
+      var dialogTopMargin = parseInt(get$4(dialog, 'margin-top'), 10) || 0;
+      var dialogBottomMargin = parseInt(get$4(dialog, 'margin-bottom'), 10) || 0;
+      var dialogHeight = get$6(dialog) + dialogTopMargin + dialogBottomMargin;
+      var chromeHeight = dialogHeight - currentTabHeight;
+      return maxHeight - chromeHeight;
+    };
+    var showTab = function (allTabs, comp) {
+      head(allTabs).each(function (tab) {
+        return TabSection.showTab(comp, tab.value);
+      });
+    };
+    var setTabviewHeight = function (tabview, height) {
+      set$2(tabview, 'height', height + 'px');
+      if (!detect$3().browser.isIE()) {
+        set$2(tabview, 'flex-basis', height + 'px');
+      } else {
+        remove$6(tabview, 'flex-basis');
+      }
+    };
+    var updateTabviewHeight = function (dialogBody, tabview, maxTabHeight) {
+      ancestor$2(dialogBody, '[role="dialog"]').each(function (dialog) {
+        descendant$1(dialog, '[role="tablist"]').each(function (tablist) {
+          maxTabHeight.get().map(function (height) {
+            set$2(tabview, 'height', '0');
+            set$2(tabview, 'flex-basis', '0');
+            return Math.min(height, getMaxTabviewHeight(dialog, tabview, tablist));
+          }).each(function (height) {
+            setTabviewHeight(tabview, height);
+          });
+        });
+      });
+    };
+    var getTabview = function (dialog) {
+      return descendant$1(dialog, '[role="tabpanel"]');
+    };
+    var setMode = function (allTabs) {
+      var smartTabHeight = function () {
+        var maxTabHeight = Cell(Option.none());
+        var extraEvents = [
+          runOnAttached(function (comp) {
+            var dialog = comp.element();
+            getTabview(dialog).each(function (tabview) {
+              set$2(tabview, 'visibility', 'hidden');
+              comp.getSystem().getByDom(tabview).toOption().each(function (tabviewComp) {
+                var heights = measureHeights(allTabs, tabview, tabviewComp);
+                var maxTabHeightOpt = getMaxHeight(heights);
+                maxTabHeight.set(maxTabHeightOpt);
+              });
+              updateTabviewHeight(dialog, tabview, maxTabHeight);
+              remove$6(tabview, 'visibility');
+              showTab(allTabs, comp);
+              global$2.requestAnimationFrame(function () {
+                updateTabviewHeight(dialog, tabview, maxTabHeight);
+              });
+            });
+          }),
+          run(windowResize(), function (comp) {
+            var dialog = comp.element();
+            getTabview(dialog).each(function (tabview) {
+              updateTabviewHeight(dialog, tabview, maxTabHeight);
+            });
+          }),
+          run(formResizeEvent, function (comp, _se) {
+            var dialog = comp.element();
+            getTabview(dialog).each(function (tabview) {
+              var oldFocus = active();
+              set$2(tabview, 'visibility', 'hidden');
+              var oldHeight = getRaw(tabview, 'height').map(function (h) {
+                return parseInt(h, 10);
+              });
+              remove$6(tabview, 'height');
+              remove$6(tabview, 'flex-basis');
+              var newHeight = tabview.dom().getBoundingClientRect().height;
+              var hasGrown = oldHeight.forall(function (h) {
+                return newHeight > h;
+              });
+              if (hasGrown) {
+                maxTabHeight.set(Option.from(newHeight));
+                updateTabviewHeight(dialog, tabview, maxTabHeight);
+              } else {
+                oldHeight.each(function (h) {
+                  setTabviewHeight(tabview, h);
+                });
+              }
+              remove$6(tabview, 'visibility');
+              oldFocus.each(focus$1);
+            });
+          })
+        ];
+        var selectFirst = false;
+        return {
+          extraEvents: extraEvents,
+          selectFirst: selectFirst
+        };
+      }();
+      var naiveTabHeight = function () {
+        var extraEvents = [];
+        var selectFirst = true;
+        return {
+          extraEvents: extraEvents,
+          selectFirst: selectFirst
+        };
+      }();
+      return {
+        smartTabHeight: smartTabHeight,
+        naiveTabHeight: naiveTabHeight
+      };
+    };
+
+    var SendDataToSectionChannel = 'send-data-to-section';
+    var SendDataToViewChannel = 'send-data-to-view';
+    var renderTabPanel = function (spec, backstage) {
+      var storedValue = Cell({});
+      var updateDataWithForm = function (form) {
+        var formData = Representing.getValue(form);
+        var validData = toValidValues(formData).getOr({});
+        var currentData = storedValue.get();
+        var newData = deepMerge(currentData, validData);
+        storedValue.set(newData);
+      };
+      var setDataOnForm = function (form) {
+        var tabData = storedValue.get();
+        Representing.setValue(form, tabData);
+      };
+      var oldTab = Cell(null);
+      var allTabs = map(spec.tabs, function (tab) {
+        return {
+          value: tab.name,
+          dom: {
+            tag: 'div',
+            classes: ['tox-dialog__body-nav-item'],
+            innerHtml: backstage.shared.providers.translate(tab.title)
+          },
+          view: function () {
+            return [Form.sketch(function (parts) {
+                return {
+                  dom: {
+                    tag: 'div',
+                    classes: ['tox-form']
+                  },
+                  components: map(tab.items, function (item) {
+                    return interpretInForm(parts, item, backstage);
+                  }),
+                  formBehaviours: derive$1([
+                    Keying.config({
+                      mode: 'acyclic',
+                      useTabstopAt: not(isPseudoStop)
+                    }),
+                    config('TabView.form.events', [
+                      runOnAttached(setDataOnForm),
+                      runOnDetached(updateDataWithForm)
+                    ]),
+                    Receiving.config({
+                      channels: wrapAll$1([
+                        {
+                          key: SendDataToSectionChannel,
+                          value: { onReceive: updateDataWithForm }
+                        },
+                        {
+                          key: SendDataToViewChannel,
+                          value: { onReceive: setDataOnForm }
+                        }
+                      ])
+                    })
+                  ])
+                };
+              })];
+          }
+        };
+      });
+      var tabMode = setMode(allTabs).smartTabHeight;
+      return TabSection.sketch({
+        dom: {
+          tag: 'div',
+          classes: ['tox-dialog__body']
+        },
+        onChangeTab: function (section, button, _viewItems) {
+          var name = Representing.getValue(button);
+          emitWith(section, formTabChangeEvent, {
+            name: name,
+            oldName: oldTab.get()
+          });
+          oldTab.set(name);
+        },
+        tabs: allTabs,
+        components: [
+          TabSection.parts().tabbar({
+            dom: {
+              tag: 'div',
+              classes: ['tox-dialog__body-nav']
+            },
+            components: [Tabbar.parts().tabs({})],
+            markers: {
+              tabClass: 'tox-tab',
+              selectedClass: 'tox-dialog__body-nav-item--active'
+            },
+            tabbarBehaviours: derive$1([Tabstopping.config({})])
+          }),
+          TabSection.parts().tabview({
+            dom: {
+              tag: 'div',
+              classes: ['tox-dialog__body-content']
+            }
+          })
+        ],
+        selectFirst: tabMode.selectFirst,
+        tabSectionBehaviours: derive$1([
+          config('tabpanel', tabMode.extraEvents),
+          Keying.config({ mode: 'acyclic' }),
+          Composing.config({
+            find: function (comp) {
+              return head(TabSection.getViewItems(comp));
+            }
+          }),
+          Representing.config({
+            store: {
+              mode: 'manual',
+              getValue: function (tsection) {
+                tsection.getSystem().broadcastOn([SendDataToSectionChannel], {});
+                return storedValue.get();
+              },
+              setValue: function (tsection, value) {
+                storedValue.set(value);
+                tsection.getSystem().broadcastOn([SendDataToViewChannel], {});
+              }
+            }
+          })
+        ])
+      });
+    };
+
+    var dialogChannel = generate$1('update-dialog');
+    var titleChannel = generate$1('update-title');
+    var bodyChannel = generate$1('update-body');
+    var footerChannel = generate$1('update-footer');
+    var bodySendMessageChannel = generate$1('body-send-message');
+
+    var renderBody = function (spec, id, backstage, ariaAttrs) {
+      var renderComponents = function (incoming) {
+        switch (incoming.body.type) {
+        case 'tabpanel': {
+            return [renderTabPanel(incoming.body, backstage)];
+          }
+        default: {
+            return [renderBodyPanel(incoming.body, backstage)];
+          }
+        }
+      };
+      var updateState = function (_comp, incoming) {
+        return Option.some({
+          isTabPanel: function () {
+            return incoming.body.type === 'tabpanel';
+          }
+        });
+      };
+      var ariaAttributes = { 'aria-live': 'polite' };
+      return {
+        dom: {
+          tag: 'div',
+          classes: ['tox-dialog__content-js'],
+          attributes: __assign(__assign({}, id.map(function (x) {
+            return { id: x };
+          }).getOr({})), ariaAttrs ? ariaAttributes : {})
+        },
+        components: [],
+        behaviours: derive$1([
+          ComposingConfigs.childAt(0),
+          Reflecting.config({
+            channel: bodyChannel,
+            updateState: updateState,
+            renderComponents: renderComponents,
+            initialData: spec
+          })
+        ])
+      };
+    };
+    var renderInlineBody = function (spec, contentId, backstage, ariaAttrs) {
+      return renderBody(spec, Option.some(contentId), backstage, ariaAttrs);
+    };
+    var renderModalBody = function (spec, backstage) {
+      var bodySpec = renderBody(spec, Option.none(), backstage, false);
+      return ModalDialog.parts().body(bodySpec);
+    };
+    var renderIframeBody = function (spec) {
+      var bodySpec = {
+        dom: {
+          tag: 'div',
+          classes: ['tox-dialog__content-js']
+        },
+        components: [{
+            dom: {
+              tag: 'div',
+              classes: ['tox-dialog__body-iframe']
+            },
+            components: [craft({
+                dom: {
+                  tag: 'iframe',
+                  attributes: { src: spec.url }
+                },
+                behaviours: derive$1([
+                  Tabstopping.config({}),
+                  Focusing.config({})
+                ])
+              })]
+          }],
+        behaviours: derive$1([Keying.config({
+            mode: 'acyclic',
+            useTabstopAt: not(isPseudoStop)
+          })])
+      };
+      return ModalDialog.parts().body(bodySpec);
+    };
+
+    var isTouch = global$6.deviceType.isTouch();
+    var hiddenHeader = function (title, close) {
+      return {
+        dom: {
+          tag: 'div',
+          styles: { display: 'none' },
+          classes: ['tox-dialog__header']
+        },
+        components: [
+          title,
+          close
+        ]
+      };
+    };
+    var pClose = function (onClose, providersBackstage) {
+      return ModalDialog.parts().close(Button.sketch({
+        dom: {
+          tag: 'button',
+          classes: [
+            'tox-button',
+            'tox-button--icon',
+            'tox-button--naked'
+          ],
+          attributes: {
+            'type': 'button',
+            'aria-label': providersBackstage.translate('Close')
+          }
+        },
+        action: onClose,
+        buttonBehaviours: derive$1([Tabstopping.config({})])
+      }));
+    };
+    var pUntitled = function () {
+      return ModalDialog.parts().title({
+        dom: {
+          tag: 'div',
+          classes: ['tox-dialog__title'],
+          innerHtml: '',
+          styles: { display: 'none' }
+        }
+      });
+    };
+    var pBodyMessage = function (message, providersBackstage) {
+      return ModalDialog.parts().body({
+        dom: {
+          tag: 'div',
+          classes: ['tox-dialog__body']
+        },
+        components: [{
+            dom: {
+              tag: 'div',
+              classes: ['tox-dialog__body-content']
+            },
+            components: [{ dom: fromHtml$2('<p>' + providersBackstage.translate(message) + '</p>') }]
+          }]
+      });
+    };
+    var pFooter = function (buttons) {
+      return ModalDialog.parts().footer({
+        dom: {
+          tag: 'div',
+          classes: ['tox-dialog__footer']
+        },
+        components: buttons
+      });
+    };
+    var pFooterGroup = function (startButtons, endButtons) {
+      return [
+        Container.sketch({
+          dom: {
+            tag: 'div',
+            classes: ['tox-dialog__footer-start']
+          },
+          components: startButtons
+        }),
+        Container.sketch({
+          dom: {
+            tag: 'div',
+            classes: ['tox-dialog__footer-end']
+          },
+          components: endButtons
+        })
+      ];
+    };
+    var renderDialog = function (spec) {
+      var _a;
+      var dialogClass = 'tox-dialog';
+      var blockerClass = dialogClass + '-wrap';
+      var blockerBackdropClass = blockerClass + '__backdrop';
+      var scrollLockClass = dialogClass + '__disable-scroll';
+      return ModalDialog.sketch({
+        lazySink: spec.lazySink,
+        onEscape: function (comp) {
+          spec.onEscape(comp);
+          return Option.some(true);
+        },
+        useTabstopAt: function (elem) {
+          return !isPseudoStop(elem);
+        },
+        dom: {
+          tag: 'div',
+          classes: [dialogClass].concat(spec.extraClasses),
+          styles: __assign({ position: 'relative' }, spec.extraStyles)
+        },
+        components: __spreadArrays([
+          spec.header,
+          spec.body
+        ], spec.footer.toArray()),
+        parts: {
+          blocker: {
+            dom: fromHtml$2('<div class="' + blockerClass + '"></div>'),
+            components: [{
+                dom: {
+                  tag: 'div',
+                  classes: isTouch ? [
+                    blockerBackdropClass,
+                    blockerBackdropClass + '--opaque'
+                  ] : [blockerBackdropClass]
+                }
+              }]
+          }
+        },
+        dragBlockClass: blockerClass,
+        modalBehaviours: derive$1(__spreadArrays([
+          Focusing.config({}),
+          config('dialog-events', spec.dialogEvents.concat([runOnSource(focusin(), function (comp, _se) {
+              Keying.focusIn(comp);
+            })])),
+          config('scroll-lock', [
+            runOnAttached(function () {
+              add$2(body(), scrollLockClass);
+            }),
+            runOnDetached(function () {
+              remove$4(body(), scrollLockClass);
+            })
+          ])
+        ], spec.extraBehaviours)),
+        eventOrder: __assign((_a = {}, _a[execute()] = ['dialog-events'], _a[attachedToDom()] = [
+          'scroll-lock',
+          'dialog-events',
+          'alloy.base.behaviour'
+        ], _a[detachedFromDom()] = [
+          'alloy.base.behaviour',
+          'dialog-events',
+          'scroll-lock'
+        ], _a), spec.eventOrder)
+      });
+    };
+
+    var renderClose = function (providersBackstage) {
+      return Button.sketch({
+        dom: {
+          tag: 'button',
+          classes: [
+            'tox-button',
+            'tox-button--icon',
+            'tox-button--naked'
+          ],
+          attributes: {
+            'type': 'button',
+            'aria-label': providersBackstage.translate('Close'),
+            'title': providersBackstage.translate('Close')
+          }
+        },
+        components: [{
+            dom: {
+              tag: 'div',
+              classes: ['tox-icon'],
+              innerHtml: '<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg">' + '<path d="M17.953 7.453L13.422 12l4.531 4.547-1.406 1.406L12 ' + '13.422l-4.547 4.531-1.406-1.406L10.578 12 6.047 ' + '7.453l1.406-1.406L12 10.578l4.547-4.531z" ' + 'fill-rule="evenodd"></path></svg>'
+            }
+          }],
+        action: function (comp) {
+          emit(comp, formCancelEvent);
+        }
+      });
+    };
+    var renderTitle = function (spec, id, providersBackstage) {
+      var renderComponents = function (data) {
+        return [text(providersBackstage.translate(data.title))];
+      };
+      return {
+        dom: {
+          tag: 'div',
+          classes: ['tox-dialog__title'],
+          attributes: __assign({}, id.map(function (x) {
+            return { id: x };
+          }).getOr({}))
+        },
+        components: renderComponents(spec),
+        behaviours: derive$1([Reflecting.config({
+            channel: titleChannel,
+            renderComponents: renderComponents
+          })])
+      };
+    };
+    var renderDragHandle = function () {
+      return { dom: fromHtml$2('<div class="tox-dialog__draghandle"></div>') };
+    };
+    var renderInlineHeader = function (spec, titleId, providersBackstage) {
+      return Container.sketch({
+        dom: fromHtml$2('<div class="tox-dialog__header"></div>'),
+        components: [
+          renderTitle(spec, Option.some(titleId), providersBackstage),
+          renderDragHandle(),
+          renderClose(providersBackstage)
+        ],
+        containerBehaviours: derive$1([Dragging.config({
+            mode: 'mouse',
+            blockerClass: 'blocker',
+            getTarget: function (handle) {
+              return closest$3(handle, '[role="dialog"]').getOrDie();
+            },
+            snaps: {
+              getSnapPoints: function () {
+                return [];
+              },
+              leftAttr: 'data-drag-left',
+              topAttr: 'data-drag-top'
+            }
+          })])
+      });
+    };
+    var renderModalHeader = function (spec, providersBackstage) {
+      var pTitle = ModalDialog.parts().title(renderTitle(spec, Option.none(), providersBackstage));
+      var pHandle = ModalDialog.parts().draghandle(renderDragHandle());
+      var pClose = ModalDialog.parts().close(renderClose(providersBackstage));
+      var components = [pTitle].concat(spec.draggable ? [pHandle] : []).concat([pClose]);
+      return Container.sketch({
+        dom: fromHtml$2('<div class="tox-dialog__header"></div>'),
+        components: components
+      });
+    };
+
+    var getHeader = function (title, backstage) {
+      return renderModalHeader({
+        title: backstage.shared.providers.translate(title),
+        draggable: backstage.dialog.isDraggableModal()
+      }, backstage.shared.providers);
+    };
+    var getEventExtras = function (lazyDialog, extra) {
+      return {
+        onClose: function () {
+          return extra.closeWindow();
+        },
+        onBlock: function (blockEvent) {
+          ModalDialog.setBusy(lazyDialog(), function (d, bs) {
+            return {
+              dom: {
+                tag: 'div',
+                classes: ['tox-dialog__busy-spinner'],
+                attributes: { 'aria-label': blockEvent.message() },
+                styles: {
+                  left: '0px',
+                  right: '0px',
+                  bottom: '0px',
+                  top: '0px',
+                  position: 'absolute'
+                }
+              },
+              behaviours: bs,
+              components: [{ dom: fromHtml$2('<div class="tox-spinner"><div></div><div></div><div></div></div>') }]
+            };
+          });
+        },
+        onUnblock: function () {
+          ModalDialog.setIdle(lazyDialog());
+        }
+      };
+    };
+    var renderModalDialog = function (spec, initialData, dialogEvents, backstage) {
+      var _a;
+      var updateState = function (_comp, incoming) {
+        return Option.some(incoming);
+      };
+      return build$1(renderDialog(__assign(__assign({}, spec), {
+        lazySink: backstage.shared.getSink,
+        extraBehaviours: __spreadArrays([
+          Reflecting.config({
+            channel: dialogChannel,
+            updateState: updateState,
+            initialData: initialData
+          }),
+          RepresentingConfigs.memory({})
+        ], spec.extraBehaviours),
+        onEscape: function (comp) {
+          emit(comp, formCancelEvent);
+        },
+        dialogEvents: dialogEvents,
+        eventOrder: (_a = {}, _a[receive()] = [
+          'reflecting',
+          'receiving'
+        ], _a[attachedToDom()] = [
+          'scroll-lock',
+          'reflecting',
+          'messages',
+          'dialog-events',
+          'alloy.base.behaviour'
+        ], _a[detachedFromDom()] = [
+          'alloy.base.behaviour',
+          'dialog-events',
+          'messages',
+          'reflecting',
+          'scroll-lock'
+        ], _a)
+      })));
+    };
+    var mapMenuButtons = function (buttons) {
+      var mapItems = function (button) {
+        var items = map(button.items, function (item) {
+          var cell = Cell(false);
+          return __assign(__assign({}, item), { storage: cell });
+        });
+        return __assign(__assign({}, button), { items: items });
+      };
+      return map(buttons, function (button) {
+        if (button.type === 'menu') {
+          return mapItems(button);
+        }
+        return button;
+      });
+    };
+    var extractCellsToObject = function (buttons) {
+      return foldl(buttons, function (acc, button) {
+        if (button.type === 'menu') {
+          var menuButton = button;
+          return foldl(menuButton.items, function (innerAcc, item) {
+            innerAcc[item.name] = item.storage;
+            return innerAcc;
+          }, acc);
+        }
+        return acc;
+      }, {});
+    };
+
+    var initCommonEvents = function (fireApiEvent, extras) {
+      return [
+        runWithTarget(focusin(), onFocus$1),
+        fireApiEvent(formCloseEvent, function (_api, spec) {
+          extras.onClose();
+          spec.onClose();
+        }),
+        fireApiEvent(formCancelEvent, function (api, spec, _event, self) {
+          spec.onCancel(api);
+          emit(self, formCloseEvent);
+        }),
+        run(formUnblockEvent, function (_c, _se) {
+          return extras.onUnblock();
+        }),
+        run(formBlockEvent, function (_c, se) {
+          return extras.onBlock(se.event());
+        })
+      ];
+    };
+    var initUrlDialog = function (getInstanceApi, extras) {
+      var fireApiEvent = function (eventName, f) {
+        return run(eventName, function (c, se) {
+          withSpec(c, function (spec, _c) {
+            f(getInstanceApi(), spec, se.event(), c);
+          });
+        });
+      };
+      var withSpec = function (c, f) {
+        Reflecting.getState(c).get().each(function (currentDialog) {
+          f(currentDialog, c);
+        });
+      };
+      return __spreadArrays(initCommonEvents(fireApiEvent, extras), [fireApiEvent(formActionEvent, function (api, spec, event) {
+          spec.onAction(api, { name: event.name() });
+        })]);
+    };
+    var initDialog = function (getInstanceApi, extras, getSink) {
+      var fireApiEvent = function (eventName, f) {
+        return run(eventName, function (c, se) {
+          withSpec(c, function (spec, _c) {
+            f(getInstanceApi(), spec, se.event(), c);
+          });
+        });
+      };
+      var withSpec = function (c, f) {
+        Reflecting.getState(c).get().each(function (currentDialogInit) {
+          f(currentDialogInit.internalDialog, c);
+        });
+      };
+      return __spreadArrays(initCommonEvents(fireApiEvent, extras), [
+        fireApiEvent(formSubmitEvent, function (api, spec) {
+          return spec.onSubmit(api);
+        }),
+        fireApiEvent(formChangeEvent, function (api, spec, event) {
+          spec.onChange(api, { name: event.name() });
+        }),
+        fireApiEvent(formActionEvent, function (api, spec, event, component) {
+          var focusIn = function () {
+            return Keying.focusIn(component);
+          };
+          var isDisabled = function (focused) {
+            return has$1(focused, 'disabled') || getOpt(focused, 'aria-disabled').exists(function (val) {
+              return val === 'true';
+            });
+          };
+          var current = active();
+          spec.onAction(api, {
+            name: event.name(),
+            value: event.value()
+          });
+          active().fold(focusIn, function (focused) {
+            if (isDisabled(focused)) {
+              focusIn();
+            } else if (current.exists(function (cur) {
+                return contains$2(focused, cur) && isDisabled(cur);
+              })) {
+              focusIn();
+            } else {
+              getSink().toOption().filter(function (sink) {
+                return !contains$2(sink.element(), focused);
+              }).each(focusIn);
+            }
+          });
+        }),
+        fireApiEvent(formTabChangeEvent, function (api, spec, event) {
+          spec.onTabChange(api, {
+            newTabName: event.name(),
+            oldTabName: event.oldName()
+          });
+        }),
+        runOnDetached(function (component) {
+          var api = getInstanceApi();
+          Representing.setValue(component, api.getData());
+        })
+      ]);
+    };
+    var SilverDialogEvents = {
+      initUrlDialog: initUrlDialog,
+      initDialog: initDialog
+    };
+
+    var makeButton = function (button, backstage) {
+      return renderFooterButton(button, button.type, backstage);
+    };
+    var lookup$2 = function (compInSystem, footerButtons, buttonName) {
+      return find(footerButtons, function (button) {
+        return button.name === buttonName;
+      }).bind(function (memButton) {
+        return memButton.memento.getOpt(compInSystem);
+      });
+    };
+    var renderComponents = function (_data, state) {
+      var footerButtons = state.map(function (s) {
+        return s.footerButtons;
+      }).getOr([]);
+      var buttonGroups = partition(footerButtons, function (button) {
+        return button.align === 'start';
+      });
+      var makeGroup = function (edge, buttons) {
+        return Container.sketch({
+          dom: {
+            tag: 'div',
+            classes: ['tox-dialog__footer-' + edge]
+          },
+          components: map(buttons, function (button) {
+            return button.memento.asSpec();
+          })
+        });
+      };
+      var startButtons = makeGroup('start', buttonGroups.pass);
+      var endButtons = makeGroup('end', buttonGroups.fail);
+      return [
+        startButtons,
+        endButtons
+      ];
+    };
+    var renderFooter = function (initSpec, backstage) {
+      var updateState = function (_comp, data) {
+        var footerButtons = map(data.buttons, function (button) {
+          var memButton = record(makeButton(button, backstage));
+          return {
+            name: button.name,
+            align: button.align,
+            memento: memButton
+          };
+        });
+        var lookupByName = function (compInSystem, buttonName) {
+          return lookup$2(compInSystem, footerButtons, buttonName);
+        };
+        return Option.some({
+          lookupByName: lookupByName,
+          footerButtons: footerButtons
+        });
+      };
+      return {
+        dom: fromHtml$2('<div class="tox-dialog__footer"></div>'),
+        components: [],
+        behaviours: derive$1([Reflecting.config({
+            channel: footerChannel,
+            initialData: initSpec,
+            updateState: updateState,
+            renderComponents: renderComponents
+          })])
+      };
+    };
+    var renderInlineFooter = function (initSpec, backstage) {
+      return renderFooter(initSpec, backstage);
+    };
+    var renderModalFooter = function (initSpec, backstage) {
+      return ModalDialog.parts().footer(renderFooter(initSpec, backstage));
+    };
+
+    var getCompByName = function (access, name) {
+      var root = access.getRoot();
+      if (root.getSystem().isConnected()) {
+        var form_1 = Composing.getCurrent(access.getFormWrapper()).getOr(access.getFormWrapper());
+        return Form.getField(form_1, name).fold(function () {
+          var footer = access.getFooter();
+          var footerState = Reflecting.getState(footer);
+          return footerState.get().bind(function (f) {
+            return f.lookupByName(form_1, name);
+          });
+        }, function (comp) {
+          return Option.some(comp);
+        });
+      } else {
+        return Option.none();
+      }
+    };
+    var validateData = function (access, data) {
+      var root = access.getRoot();
+      return Reflecting.getState(root).get().map(function (dialogState) {
+        return getOrDie(asRaw('data', dialogState.dataValidator, data));
+      }).getOr(data);
+    };
+    var getDialogApi = function (access, doRedial, menuItemStates) {
+      var withRoot = function (f) {
+        var root = access.getRoot();
+        if (root.getSystem().isConnected()) {
+          f(root);
+        }
+      };
+      var getData = function () {
+        var root = access.getRoot();
+        var valueComp = root.getSystem().isConnected() ? access.getFormWrapper() : root;
+        var representedValues = Representing.getValue(valueComp);
+        var menuItemCurrentState = map$1(menuItemStates, function (cell) {
+          return cell.get();
+        });
+        return __assign(__assign({}, representedValues), menuItemCurrentState);
+      };
+      var setData = function (newData) {
+        withRoot(function (_) {
+          var prevData = instanceApi.getData();
+          var mergedData = __assign(__assign({}, prevData), newData);
+          var newInternalData = validateData(access, mergedData);
+          var form = access.getFormWrapper();
+          Representing.setValue(form, newInternalData);
+          each$1(menuItemStates, function (v, k) {
+            if (has(mergedData, k)) {
+              v.set(mergedData[k]);
+            }
+          });
+        });
+      };
+      var disable = function (name) {
+        getCompByName(access, name).each(Disabling.disable);
+      };
+      var enable = function (name) {
+        getCompByName(access, name).each(Disabling.enable);
+      };
+      var focus = function (name) {
+        getCompByName(access, name).each(Focusing.focus);
+      };
+      var block = function (message) {
+        if (!isString(message)) {
+          throw new Error('The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument');
+        }
+        withRoot(function (root) {
+          emitWith(root, formBlockEvent, { message: message });
+        });
+      };
+      var unblock = function () {
+        withRoot(function (root) {
+          emit(root, formUnblockEvent);
+        });
+      };
+      var showTab = function (name) {
+        withRoot(function (_) {
+          var body = access.getBody();
+          var bodyState = Reflecting.getState(body);
+          if (bodyState.get().exists(function (b) {
+              return b.isTabPanel();
+            })) {
+            Composing.getCurrent(body).each(function (tabSection) {
+              TabSection.showTab(tabSection, name);
+            });
+          }
+        });
+      };
+      var redial = function (d) {
+        withRoot(function (root) {
+          var dialogInit = doRedial(d);
+          root.getSystem().broadcastOn([dialogChannel], dialogInit);
+          root.getSystem().broadcastOn([titleChannel], dialogInit.internalDialog);
+          root.getSystem().broadcastOn([bodyChannel], dialogInit.internalDialog);
+          root.getSystem().broadcastOn([footerChannel], dialogInit.internalDialog);
+          instanceApi.setData(dialogInit.initialData);
+        });
+      };
+      var close = function () {
+        withRoot(function (root) {
+          emit(root, formCloseEvent);
+        });
+      };
+      var instanceApi = {
+        getData: getData,
+        setData: setData,
+        disable: disable,
+        enable: enable,
+        focus: focus,
+        block: block,
+        unblock: unblock,
+        showTab: showTab,
+        redial: redial,
+        close: close
+      };
+      return instanceApi;
+    };
+
+    var renderDialog$1 = function (dialogInit, extra, backstage) {
+      var header = getHeader(dialogInit.internalDialog.title, backstage);
+      var body = renderModalBody({ body: dialogInit.internalDialog.body }, backstage);
+      var storagedMenuButtons = mapMenuButtons(dialogInit.internalDialog.buttons);
+      var objOfCells = extractCellsToObject(storagedMenuButtons);
+      var footer = renderModalFooter({ buttons: storagedMenuButtons }, backstage);
+      var dialogEvents = SilverDialogEvents.initDialog(function () {
+        return instanceApi;
+      }, getEventExtras(function () {
+        return dialog;
+      }, extra), backstage.shared.getSink);
+      var dialogSize = dialogInit.internalDialog.size !== 'normal' ? dialogInit.internalDialog.size === 'large' ? ['tox-dialog--width-lg'] : ['tox-dialog--width-md'] : [];
+      var spec = {
+        header: header,
+        body: body,
+        footer: Option.some(footer),
+        extraClasses: dialogSize,
+        extraBehaviours: [],
+        extraStyles: {}
+      };
+      var dialog = renderModalDialog(spec, dialogInit, dialogEvents, backstage);
+      var modalAccess = function () {
+        var getForm = function () {
+          var outerForm = ModalDialog.getBody(dialog);
+          return Composing.getCurrent(outerForm).getOr(outerForm);
+        };
+        return {
+          getRoot: function () {
+            return dialog;
+          },
+          getBody: function () {
+            return ModalDialog.getBody(dialog);
+          },
+          getFooter: function () {
+            return ModalDialog.getFooter(dialog);
+          },
+          getFormWrapper: getForm
+        };
+      }();
+      var instanceApi = getDialogApi(modalAccess, extra.redial, objOfCells);
+      return {
+        dialog: dialog,
+        instanceApi: instanceApi
+      };
+    };
+
+    var renderInlineDialog = function (dialogInit, extra, backstage, ariaAttrs) {
+      var _a, _b;
+      var dialogLabelId = generate$1('dialog-label');
+      var dialogContentId = generate$1('dialog-content');
+      var updateState = function (_comp, incoming) {
+        return Option.some(incoming);
+      };
+      var memHeader = record(renderInlineHeader({
+        title: dialogInit.internalDialog.title,
+        draggable: true
+      }, dialogLabelId, backstage.shared.providers));
+      var memBody = record(renderInlineBody({ body: dialogInit.internalDialog.body }, dialogContentId, backstage, ariaAttrs));
+      var storagedMenuButtons = mapMenuButtons(dialogInit.internalDialog.buttons);
+      var objOfCells = extractCellsToObject(storagedMenuButtons);
+      var memFooter = record(renderInlineFooter({ buttons: storagedMenuButtons }, backstage));
+      var dialogEvents = SilverDialogEvents.initDialog(function () {
+        return instanceApi;
+      }, {
+        onBlock: function () {
+        },
+        onUnblock: function () {
+        },
+        onClose: function () {
+          return extra.closeWindow();
+        }
+      }, backstage.shared.getSink);
+      var dialog = build$1({
+        dom: {
+          tag: 'div',
+          classes: [
+            'tox-dialog',
+            'tox-dialog-inline'
+          ],
+          attributes: (_a = { role: 'dialog' }, _a['aria-labelledby'] = dialogLabelId, _a['aria-describedby'] = '' + dialogContentId, _a)
+        },
+        eventOrder: (_b = {}, _b[receive()] = [
+          Reflecting.name(),
+          Receiving.name()
+        ], _b[execute()] = ['execute-on-form'], _b[attachedToDom()] = [
+          'reflecting',
+          'execute-on-form'
+        ], _b),
+        behaviours: derive$1([
+          Keying.config({
+            mode: 'cyclic',
+            onEscape: function (c) {
+              emit(c, formCloseEvent);
+              return Option.some(true);
+            },
+            useTabstopAt: function (elem) {
+              return !isPseudoStop(elem) && (name(elem) !== 'button' || get$2(elem, 'disabled') !== 'disabled');
+            }
+          }),
+          Reflecting.config({
+            channel: dialogChannel,
+            updateState: updateState,
+            initialData: dialogInit
+          }),
+          Focusing.config({}),
+          config('execute-on-form', dialogEvents.concat([runOnSource(focusin(), function (comp, _se) {
+              Keying.focusIn(comp);
+            })])),
+          RepresentingConfigs.memory({})
+        ]),
+        components: [
+          memHeader.asSpec(),
+          memBody.asSpec(),
+          memFooter.asSpec()
+        ]
+      });
+      var instanceApi = getDialogApi({
+        getRoot: function () {
+          return dialog;
+        },
+        getFooter: function () {
+          return memFooter.get(dialog);
+        },
+        getBody: function () {
+          return memBody.get(dialog);
+        },
+        getFormWrapper: function () {
+          var body = memBody.get(dialog);
+          return Composing.getCurrent(body).getOr(body);
+        }
+      }, extra.redial, objOfCells);
+      return {
+        dialog: dialog,
+        instanceApi: instanceApi
+      };
+    };
+
+    var global$g = tinymce.util.Tools.resolve('tinymce.util.URI');
+
+    var getUrlDialogApi = function (root) {
+      var withRoot = function (f) {
+        if (root.getSystem().isConnected()) {
+          f(root);
+        }
+      };
+      var block = function (message) {
+        if (!isString(message)) {
+          throw new Error('The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument');
+        }
+        withRoot(function (root) {
+          emitWith(root, formBlockEvent, { message: message });
+        });
+      };
+      var unblock = function () {
+        withRoot(function (root) {
+          emit(root, formUnblockEvent);
+        });
+      };
+      var close = function () {
+        withRoot(function (root) {
+          emit(root, formCloseEvent);
+        });
+      };
+      var sendMessage = function (data) {
+        withRoot(function (root) {
+          root.getSystem().broadcastOn([bodySendMessageChannel], data);
+        });
+      };
+      return {
+        block: block,
+        unblock: unblock,
+        close: close,
+        sendMessage: sendMessage
+      };
+    };
+
+    var SUPPORTED_MESSAGE_ACTIONS = [
+      'insertContent',
+      'setContent',
+      'execCommand',
+      'close',
+      'block',
+      'unblock'
+    ];
+    var isSupportedMessage = function (data) {
+      return isObject(data) && SUPPORTED_MESSAGE_ACTIONS.indexOf(data.mceAction) !== -1;
+    };
+    var isCustomMessage = function (data) {
+      return !isSupportedMessage(data) && isObject(data) && has(data, 'mceAction');
+    };
+    var handleMessage = function (editor, api, data) {
+      switch (data.mceAction) {
+      case 'insertContent':
+        editor.insertContent(data.content);
+        break;
+      case 'setContent':
+        editor.setContent(data.content);
+        break;
+      case 'execCommand':
+        var ui = isBoolean(data.ui) ? data.ui : false;
+        editor.execCommand(data.cmd, ui, data.value);
+        break;
+      case 'close':
+        api.close();
+        break;
+      case 'block':
+        api.block(data.message);
+        break;
+      case 'unblock':
+        api.unblock();
+        break;
+      }
+    };
+    var renderUrlDialog = function (internalDialog, extra, editor, backstage) {
+      var _a;
+      var header = getHeader(internalDialog.title, backstage);
+      var body = renderIframeBody(internalDialog);
+      var footer = internalDialog.buttons.bind(function (buttons) {
+        if (buttons.length === 0) {
+          return Option.none();
+        } else {
+          return Option.some(renderModalFooter({ buttons: buttons }, backstage));
+        }
+      });
+      var dialogEvents = SilverDialogEvents.initUrlDialog(function () {
+        return instanceApi;
+      }, getEventExtras(function () {
+        return dialog;
+      }, extra));
+      var styles = __assign(__assign({}, internalDialog.height.fold(function () {
+        return {};
+      }, function (height) {
+        return {
+          'height': height + 'px',
+          'max-height': height + 'px'
+        };
+      })), internalDialog.width.fold(function () {
+        return {};
+      }, function (width) {
+        return {
+          'width': width + 'px',
+          'max-width': width + 'px'
+        };
+      }));
+      var classes = internalDialog.width.isNone() && internalDialog.height.isNone() ? ['tox-dialog--width-lg'] : [];
+      var iframeUri = new global$g(internalDialog.url, { base_uri: new global$g(domGlobals.window.location.href) });
+      var iframeDomain = iframeUri.protocol + '://' + iframeUri.host + (iframeUri.port ? ':' + iframeUri.port : '');
+      var messageHandlerUnbinder = Cell(Option.none());
+      var extraBehaviours = [
+        config('messages', [
+          runOnAttached(function () {
+            var unbind = bind$3(Element.fromDom(domGlobals.window), 'message', function (e) {
+              if (iframeUri.isSameOrigin(new global$g(e.raw().origin))) {
+                var data = e.raw().data;
+                if (isSupportedMessage(data)) {
+                  handleMessage(editor, instanceApi, data);
+                } else if (isCustomMessage(data)) {
+                  internalDialog.onMessage(instanceApi, data);
+                }
+              }
+            });
+            messageHandlerUnbinder.set(Option.some(unbind));
+          }),
+          runOnDetached(function () {
+            messageHandlerUnbinder.get().each(function (unbinder) {
+              return unbinder.unbind();
+            });
+          })
+        ]),
+        Receiving.config({
+          channels: (_a = {}, _a[bodySendMessageChannel] = {
+            onReceive: function (comp, data) {
+              descendant$1(comp.element(), 'iframe').each(function (iframeEle) {
+                var iframeWin = iframeEle.dom().contentWindow;
+                iframeWin.postMessage(data, iframeDomain);
+              });
+            }
+          }, _a)
+        })
+      ];
+      var spec = {
+        header: header,
+        body: body,
+        footer: footer,
+        extraClasses: classes,
+        extraBehaviours: extraBehaviours,
+        extraStyles: styles
+      };
+      var dialog = renderModalDialog(spec, internalDialog, dialogEvents, backstage);
+      var instanceApi = getUrlDialogApi(dialog);
+      return {
+        dialog: dialog,
+        instanceApi: instanceApi
+      };
+    };
+
+    var setup$c = function (extras) {
+      var sharedBackstage = extras.backstage.shared;
+      var open = function (message, callback) {
+        var closeDialog = function () {
+          ModalDialog.hide(alertDialog);
+          callback();
+        };
+        var memFooterClose = record(renderFooterButton({
+          name: 'close-alert',
+          text: 'OK',
+          primary: true,
+          align: 'end',
+          disabled: false,
+          icon: Option.none()
+        }, 'cancel', extras.backstage));
+        var titleSpec = pUntitled();
+        var closeSpec = pClose(closeDialog, sharedBackstage.providers);
+        var alertDialog = build$1(renderDialog({
+          lazySink: function () {
+            return sharedBackstage.getSink();
+          },
+          header: hiddenHeader(titleSpec, closeSpec),
+          body: pBodyMessage(message, sharedBackstage.providers),
+          footer: Option.some(pFooter(pFooterGroup([], [memFooterClose.asSpec()]))),
+          onEscape: closeDialog,
+          extraClasses: ['tox-alert-dialog'],
+          extraBehaviours: [],
+          extraStyles: {},
+          dialogEvents: [run(formCancelEvent, closeDialog)],
+          eventOrder: {}
+        }));
+        ModalDialog.show(alertDialog);
+        var footerCloseButton = memFooterClose.get(alertDialog);
+        Focusing.focus(footerCloseButton);
+      };
+      return { open: open };
+    };
+
+    var setup$d = function (extras) {
+      var sharedBackstage = extras.backstage.shared;
+      var open = function (message, callback) {
+        var closeDialog = function (state) {
+          ModalDialog.hide(confirmDialog);
+          callback(state);
+        };
+        var memFooterYes = record(renderFooterButton({
+          name: 'yes',
+          text: 'Yes',
+          primary: true,
+          align: 'end',
+          disabled: false,
+          icon: Option.none()
+        }, 'submit', extras.backstage));
+        var footerNo = renderFooterButton({
+          name: 'no',
+          text: 'No',
+          primary: false,
+          align: 'end',
+          disabled: false,
+          icon: Option.none()
+        }, 'cancel', extras.backstage);
+        var titleSpec = pUntitled();
+        var closeSpec = pClose(function () {
+          return closeDialog(false);
+        }, sharedBackstage.providers);
+        var confirmDialog = build$1(renderDialog({
+          lazySink: function () {
+            return sharedBackstage.getSink();
+          },
+          header: hiddenHeader(titleSpec, closeSpec),
+          body: pBodyMessage(message, sharedBackstage.providers),
+          footer: Option.some(pFooter(pFooterGroup([], [
+            footerNo,
+            memFooterYes.asSpec()
+          ]))),
+          onEscape: function () {
+            return closeDialog(false);
+          },
+          extraClasses: ['tox-confirm-dialog'],
+          extraBehaviours: [],
+          extraStyles: {},
+          dialogEvents: [
+            run(formCancelEvent, function () {
+              return closeDialog(false);
+            }),
+            run(formSubmitEvent, function () {
+              return closeDialog(true);
+            })
+          ],
+          eventOrder: {}
+        }));
+        ModalDialog.show(confirmDialog);
+        var footerYesButton = memFooterYes.get(confirmDialog);
+        Focusing.focus(footerYesButton);
+      };
+      return { open: open };
+    };
+
+    var validateData$1 = function (data, validator) {
+      return getOrDie(asRaw('data', validator, data));
+    };
+    var isAlertOrConfirmDialog = function (target) {
+      return closest$4(target, '.tox-alert-dialog') || closest$4(target, '.tox-confirm-dialog');
+    };
+    var inlineAdditionalBehaviours = function (editor, isStickyToolbar, isToolbarLocationTop) {
+      if (isStickyToolbar && isToolbarLocationTop) {
+        return [];
+      } else {
+        return [Docking.config({
+            contextual: {
+              lazyContext: function () {
+                return Option.some(box(Element.fromDom(editor.getContentAreaContainer())));
+              },
+              fadeInClass: 'tox-dialog-dock-fadein',
+              fadeOutClass: 'tox-dialog-dock-fadeout',
+              transitionClass: 'tox-dialog-dock-transition'
+            },
+            modes: ['top']
+          })];
+      }
+    };
+    var setup$e = function (extras) {
+      var backstage = extras.backstage;
+      var editor = extras.editor;
+      var isStickyToolbar$1 = isStickyToolbar(editor);
+      var alertDialog = setup$c(extras);
+      var confirmDialog = setup$d(extras);
+      var open = function (config, params, closeWindow) {
+        if (params !== undefined && params.inline === 'toolbar') {
+          return openInlineDialog(config, backstage.shared.anchors.inlineDialog(), closeWindow, params.ariaAttrs);
+        } else if (params !== undefined && params.inline === 'cursor') {
+          return openInlineDialog(config, backstage.shared.anchors.cursor(), closeWindow, params.ariaAttrs);
+        } else {
+          return openModalDialog(config, closeWindow);
+        }
+      };
+      var openUrl = function (config, closeWindow) {
+        return openModalUrlDialog(config, closeWindow);
+      };
+      var openModalUrlDialog = function (config, closeWindow) {
+        var factory = function (contents) {
+          var dialog = renderUrlDialog(contents, {
+            closeWindow: function () {
+              ModalDialog.hide(dialog.dialog);
+              closeWindow(dialog.instanceApi);
+            }
+          }, editor, backstage);
+          ModalDialog.show(dialog.dialog);
+          return dialog.instanceApi;
+        };
+        return DialogManager.openUrl(factory, config);
+      };
+      var openModalDialog = function (config, closeWindow) {
+        var factory = function (contents, internalInitialData, dataValidator) {
+          var initialData = internalInitialData;
+          var dialogInit = {
+            dataValidator: dataValidator,
+            initialData: initialData,
+            internalDialog: contents
+          };
+          var dialog = renderDialog$1(dialogInit, {
+            redial: DialogManager.redial,
+            closeWindow: function () {
+              ModalDialog.hide(dialog.dialog);
+              closeWindow(dialog.instanceApi);
+            }
+          }, backstage);
+          ModalDialog.show(dialog.dialog);
+          dialog.instanceApi.setData(initialData);
+          return dialog.instanceApi;
+        };
+        return DialogManager.open(factory, config);
+      };
+      var openInlineDialog = function (config$1, anchor, closeWindow, ariaAttrs) {
+        var factory = function (contents, internalInitialData, dataValidator) {
+          var initialData = validateData$1(internalInitialData, dataValidator);
+          var inlineDialog = value$3();
+          var isToolbarLocationTop = backstage.shared.header.isPositionedAtTop();
+          var dialogInit = {
+            dataValidator: dataValidator,
+            initialData: initialData,
+            internalDialog: contents
+          };
+          var refreshDocking = function () {
+            return inlineDialog.on(function (dialog) {
+              InlineView.reposition(dialog);
+              Docking.refresh(dialog);
+            });
+          };
+          var dialogUi = renderInlineDialog(dialogInit, {
+            redial: DialogManager.redial,
+            closeWindow: function () {
+              inlineDialog.on(InlineView.hide);
+              editor.off('ResizeEditor', refreshDocking);
+              inlineDialog.clear();
+              closeWindow(dialogUi.instanceApi);
+            }
+          }, backstage, ariaAttrs);
+          var inlineDialogComp = build$1(InlineView.sketch(__assign(__assign({
+            lazySink: backstage.shared.getSink,
+            dom: {
+              tag: 'div',
+              classes: []
+            },
+            fireDismissalEventInstead: {}
+          }, isToolbarLocationTop ? {} : { fireRepositionEventInstead: {} }), {
+            inlineBehaviours: derive$1(__spreadArrays([config('window-manager-inline-events', [run(dismissRequested(), function (_comp, _se) {
+                  emit(dialogUi.dialog, formCancelEvent);
+                })])], inlineAdditionalBehaviours(editor, isStickyToolbar$1, isToolbarLocationTop))),
+            isExtraPart: function (_comp, target) {
+              return isAlertOrConfirmDialog(target);
+            }
+          })));
+          inlineDialog.set(inlineDialogComp);
+          InlineView.showWithin(inlineDialogComp, anchor, premade$1(dialogUi.dialog), Option.some(body()));
+          if (!isStickyToolbar$1 || !isToolbarLocationTop) {
+            Docking.refresh(inlineDialogComp);
+            editor.on('ResizeEditor', refreshDocking);
+          }
+          dialogUi.instanceApi.setData(initialData);
+          Keying.focusIn(dialogUi.dialog);
+          return dialogUi.instanceApi;
+        };
+        return DialogManager.open(factory, config$1);
+      };
+      var confirm = function (message, callback) {
+        confirmDialog.open(message, function (state) {
+          callback(state);
+        });
+      };
+      var alert = function (message, callback) {
+        alertDialog.open(message, function () {
+          callback();
+        });
+      };
+      var close = function (instanceApi) {
+        instanceApi.close();
+      };
+      return {
+        open: open,
+        openUrl: openUrl,
+        alert: alert,
+        close: close,
+        confirm: confirm
+      };
+    };
+
+    function Theme () {
+      global$1.add('silver', function (editor) {
+        var _a = setup$b(editor), uiMothership = _a.uiMothership, backstage = _a.backstage, renderUI = _a.renderUI, getUi = _a.getUi;
+        Autocompleter.register(editor, backstage.shared);
+        var windowMgr = setup$e({
+          editor: editor,
+          backstage: backstage
+        });
+        return {
+          renderUI: renderUI,
+          getWindowManagerImpl: constant(windowMgr),
+          getNotificationManagerImpl: function () {
+            return NotificationManagerImpl(editor, { backstage: backstage }, uiMothership);
+          },
+          ui: getUi()
+        };
+      });
+    }
+
+    Theme();
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/themes/silver/theme.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(nt){"use strict";var Z=function(){},d=function(e,o){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(o.apply(null,t))}},at=function(t){return function(){return t}},ct=function(t){return t};function g(o){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=r.concat(t);return o.apply(null,e)}}var x=function(n){return function(t){return!n(t)}},u=function(t){return function(){throw new Error(t)}},c=at(!1),i=at(!0),t=tinymce.util.Tools.resolve("tinymce.ThemeManager"),et=function(){return(et=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)};function y(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e}function b(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var o=Array(t),r=0;for(n=0;n<e;n++)for(var i=arguments[n],u=0,a=i.length;u<a;u++,r++)o[r]=i[u];return o}var n,e,o,r,a,s,l=function(){return f},f=(n=function(t){return t.isNone()},{fold:function(t,n){return t()},is:c,isSome:c,isNone:i,getOr:o=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:at(null),getOrUndefined:at(undefined),or:o,orThunk:e,map:l,each:Z,bind:l,exists:c,forall:i,filter:l,equals:n,equals_:n,toArray:function(){return[]},toString:at("none()")}),m=function(e){var t=at(e),n=function(){return r},o=function(t){return t(e)},r={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:i,isNone:c,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return m(t(e))},each:function(t){t(e)},bind:o,exists:o,forall:o,filter:function(t){return t(e)?r:f},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(c,function(t){return n(e,t)})}};return r},st={some:m,none:l,from:function(t){return null===t||t===undefined?f:m(t)}},p=function(e){return{is:function(t){return e===t},isValue:i,isError:c,getOr:at(e),getOrThunk:at(e),getOrDie:at(e),or:function(t){return p(e)},orThunk:function(t){return p(e)},fold:function(t,n){return n(e)},map:function(t){return p(t(e))},mapError:function(t){return p(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOption:function(){return st.some(e)}}},h=function(e){return{is:c,isValue:c,isError:i,getOr:ct,getOrThunk:function(t){return t()},getOrDie:function(){return u(String(e))()},or:function(t){return t},orThunk:function(t){return t()},fold:function(t,n){return t(e)},map:function(t){return h(e)},mapError:function(t){return h(t(e))},each:Z,bind:function(t){return h(e)},exists:c,forall:i,toOption:st.none}},ot={value:p,error:h,fromOption:function(t,n){return t.fold(function(){return h(n)},p)}},v=function(o){return function(t){return e=typeof(n=t),(null===n?"null":"object"==e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e)===o;var n,e}},w=function(n){return function(t){return typeof t===n}},S=v("string"),k=v("object"),C=v("array"),O=w("boolean"),_=(r=undefined,function(t){return r===t}),T=w("function"),rt=w("number"),E=function(t,n){if(C(t)){for(var e=0,o=t.length;e<o;++e)if(!n(t[e]))return!1;return!0}return!1},B=Array.prototype.slice,D=Array.prototype.indexOf,M=Array.prototype.push,A=function(t,n){return D.call(t,n)},F=function(t,n){return-1<A(t,n)},I=function(t,n){for(var e=0,o=t.length;e<o;e++){if(n(t[e],e))return!0}return!1},R=function(t,n){for(var e=[],o=0;o<t.length;o+=n){var r=B.call(t,o,o+n);e.push(r)}return e},V=function(t,n){for(var e=t.length,o=new Array(e),r=0;r<e;r++){var i=t[r];o[r]=n(i,r)}return o},it=function(t,n){for(var e=0,o=t.length;e<o;e++){n(t[e],e)}},H=function(t,n){for(var e=[],o=[],r=0,i=t.length;r<i;r++){var u=t[r];(n(u,r)?e:o).push(u)}return{pass:e,fail:o}},P=function(t,n){for(var e=[],o=0,r=t.length;o<r;o++){var i=t[o];n(i,o)&&e.push(i)}return e},z=function(t,n,e){return function(t,n){for(var e=t.length-1;0<=e;e--){n(t[e],e)}}(t,function(t){e=n(e,t)}),e},N=function(t,n,e){return it(t,function(t){e=n(e,t)}),e},L=function(t,n){return function(t,n,e){for(var o=0,r=t.length;o<r;o++){var i=t[o];if(n(i,o))return st.some(i);if(e(i,o))break}return st.none()}(t,n,c)},j=function(t,n){for(var e=0,o=t.length;e<o;e++){if(n(t[e],e))return st.some(e)}return st.none()},ut=function(t){for(var n=[],e=0,o=t.length;e<o;++e){if(!C(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);M.apply(n,t[e])}return n},U=function(t,n){return ut(V(t,n))},W=function(t,n){for(var e=0,o=t.length;e<o;++e){if(!0!==n(t[e],e))return!1}return!0},G=function(t){var n=B.call(t,0);return n.reverse(),n},X=function(t,n){return P(t,function(t){return!F(n,t)})},Y=function(t){return[t]},q=function(t,n){var e=B.call(t,0);return e.sort(n),e},K=function(t){return 0===t.length?st.none():st.some(t[0])},J=function(t){return 0===t.length?st.none():st.some(t[t.length-1])},$=T(Array.from)?Array.from:function(t){return B.call(t)},Q=function(t,n){for(var e=0;e<t.length;e++){var o=n(t[e],e);if(o.isSome())return o}return st.none()},lt=Object.keys,tt=Object.hasOwnProperty,ft=function(t,n){for(var e=lt(t),o=0,r=e.length;o<r;o++){var i=e[o];n(t[i],i)}},dt=function(t,e){return mt(t,function(t,n){return{k:n,v:e(t,n)}})},mt=function(t,o){var r={};return ft(t,function(t,n){var e=o(t,n);r[e.k]=e.v}),r},gt=function(t,n){var e,o,r,i,u={};return e=n,i=u,o=function(t,n){i[n]=t},r=Z,ft(t,function(t,n){(e(t,n)?o:r)(t,n)}),u},pt=function(t,e){var o=[];return ft(t,function(t,n){o.push(e(t,n))}),o},ht=function(t,n){for(var e=lt(t),o=0,r=e.length;o<r;o++){var i=e[o],u=t[i];if(n(u,i,t))return st.some(u)}return st.none()},vt=function(t){return pt(t,function(t){return t})},bt=function(t,n){return yt(t,n)?st.from(t[n]):st.none()},yt=function(t,n){return tt.call(t,n)},xt=function(t,n){return yt(t,n)&&t[n]!==undefined&&null!==t[n]},wt=function(u){if(!C(u))throw new Error("cases must be an array");if(0===u.length)throw new Error("there must be at least one case");var a=[],e={};return it(u,function(t,o){var n=lt(t);if(1!==n.length)throw new Error("one and only one name per case");var r=n[0],i=t[r];if(e[r]!==undefined)throw new Error("duplicate key detected:"+r);if("cata"===r)throw new Error("cannot have a case named cata (sorry)");if(!C(i))throw new Error("case arguments must be an array");a.push(r),e[r]=function(){var t=arguments.length;if(t!==i.length)throw new Error("Wrong number of arguments to case "+r+". Expected "+i.length+" ("+i+"), got "+t);for(var e=new Array(t),n=0;n<e.length;n++)e[n]=arguments[n];return{fold:function(){if(arguments.length!==u.length)throw new Error("Wrong number of arguments to fold. Expected "+u.length+", got "+arguments.length);return arguments[o].apply(null,e)},match:function(t){var n=lt(t);if(a.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+a.join(",")+"\nActual: "+n.join(","));if(!W(a,function(t){return F(n,t)}))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+a.join(", "));return t[r].apply(null,e)},log:function(t){nt.console.log(t,{constructors:a,constructor:r,params:e})}}}}),e},St=Object.prototype.hasOwnProperty,kt=function(u){return function(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Can't merge zero objects");for(var e={},o=0;o<t.length;o++){var r=t[o];for(var i in r)St.call(r,i)&&(e[i]=u(e[i],r[i]))}return e}},Ct=kt(function(t,n){return k(t)&&k(n)?Ct(t,n):n}),Ot=kt(function(t,n){return n}),_t=function(e){var o,r=!1;return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return r||(r=!0,o=e.apply(null,t)),o}};(s=a=a||{})[s.Error=0]="Error",s[s.Value=1]="Value";var Tt,Et,Bt=function(t,n,e){return t.stype===a.Error?n(t.serror):e(t.svalue)},Dt=function(t){return{stype:a.Value,svalue:t}},Mt=function(t){return{stype:a.Error,serror:t}},At=function(t){return t.fold(Mt,Dt)},Ft=function(t){return Bt(t,ot.error,ot.value)},It=Dt,Rt=function(t){var n=[],e=[];return it(t,function(t){Bt(t,function(t){return e.push(t)},function(t){return n.push(t)})}),{values:n,errors:e}},Vt=Mt,Ht=function(t,n){return t.stype===a.Value?n(t.svalue):t},Pt=function(t,n){return t.stype===a.Error?n(t.serror):t},zt=function(t,n){return t.stype===a.Value?{stype:a.Value,svalue:n(t.svalue)}:t},Nt=function(t,n){return t.stype===a.Error?{stype:a.Error,serror:n(t.serror)}:t},Lt=wt([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),jt=function(t){return Lt.defaultedThunk(at(t))},Ut=Lt.strict,Wt=Lt.asOption,Gt=Lt.defaultedThunk,Xt=(Lt.asDefaultedOptionThunk,Lt.mergeWithThunk),Yt=function(t,n){var e;return(e={})[t]=n,e},qt=(wt([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(t,n){return e=n,o={},ft(t,function(t,n){F(e,n)||(o[n]=t)}),o;var e,o}),Kt=function(t,n){return Yt(t,n)},Jt=function(t){return n={},it(t,function(t){n[t.key]=t.value}),n;var n},$t=function(t,n){var e,o,r,i,u,a=(e=[],o=[],it(t,function(t){t.fold(function(t){e.push(t)},function(t){o.push(t)})}),{errors:e,values:o});return 0<a.errors.length?(u=a.errors,ot.error(ut(u))):(i=n,0===(r=a.values).length?ot.value(i):ot.value(Ct(i,Ot.apply(undefined,r))))},Qt=function(t){return d(Vt,ut)(t)},Zt=function(t,n){var e,o,r=Rt(t);return 0<r.errors.length?Qt(r.errors):(e=r.values,o=n,0<e.length?It(Ct(o,Ot.apply(undefined,e))):It(o))},tn=function(t){var n=Rt(t);return 0<n.errors.length?Qt(n.errors):It(n.values)},nn=function(t){return k(t)&&100<lt(t).length?" removed due to size":JSON.stringify(t,null,2)},en=function(t,n){return Vt([{path:t,getErrorInfo:n}])},on=wt([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),rn=function(e,o,r){return bt(o,r).fold(function(){return t=r,n=o,en(e,function(){return'Could not find valid *strict* value for "'+t+'" in '+nn(n)});var t,n},It)},un=function(t,n,e){var o=bt(t,n).fold(function(){return e(t)},ct);return It(o)},an=function(a,c,t,s){return t.fold(function(r,e,t,o){var i=function(t){var n=o.extract(a.concat([r]),s,t);return zt(n,function(t){return Yt(e,s(t))})},u=function(t){return t.fold(function(){var t=Yt(e,s(st.none()));return It(t)},function(t){var n=o.extract(a.concat([r]),s,t);return zt(n,function(t){return Yt(e,s(st.some(t)))})})};return t.fold(function(){return Ht(rn(a,c,r),i)},function(t){return Ht(un(c,r,t),i)},function(){return Ht(It(bt(c,r)),u)},function(t){return Ht((e=t,o=bt(n=c,r).map(function(t){return!0===t?e(n):t}),It(o)),u);var n,e,o},function(t){var n=t(c),e=zt(un(c,r,at({})),function(t){return Ct(n,t)});return Ht(e,i)})},function(t,n){var e=n(c);return It(Yt(t,s(e)))})},cn=function(o){return{extract:function(e,t,n){return Pt(o(n,t),function(t){return n=t,en(e,function(){return n});var n})},toString:function(){return"val"}}},sn=function(t){var u=ln(t),a=z(t,function(n,t){return t.fold(function(t){return Ct(n,Kt(t,!0))},at(n))},{});return{extract:function(t,n,e){var o,r=O(e)?[]:lt(gt(e,function(t){return t!==undefined&&null!==t})),i=P(r,function(t){return!xt(a,t)});return 0===i.length?u.extract(t,n,e):(o=i,en(t,function(){return"There are unsupported fields: ["+o.join(", ")+"] specified"}))},toString:u.toString}},ln=function(a){return{extract:function(t,n,e){return o=t,r=e,i=n,u=V(a,function(t){return an(o,r,t,i)}),Zt(u,{});var o,r,i,u},toString:function(){return"obj{\n"+V(a,function(t){return t.fold(function(t,n,e,o){return t+" -> "+o.toString()},function(t,n){return"state("+t+")"})}).join("\n")+"}"}}},fn=function(r){return{extract:function(e,o,t){var n=V(t,function(t,n){return r.extract(e.concat(["["+n+"]"]),o,t)});return tn(n)},toString:function(){return"array("+r.toString()+")"}}},dn=function(a,c){return{extract:function(e,o,r){var t,n,i=lt(r),u=(t=e,n=i,fn(cn(a)).extract(t,ct,n));return Ht(u,function(t){var n=V(t,function(t){return on.field(t,t,Ut(),c)});return ln(n).extract(e,o,r)})},toString:function(){return"setOf("+c.toString()+")"}}},mn=at(cn(It)),gn=d(fn,ln),pn=on.state,hn=on.field,vn=function(e,n,o,r,i){return bt(r,i).fold(function(){return t=r,n=i,en(e,function(){return'The chosen schema: "'+n+'" did not exist in branches: '+nn(t)});var t,n},function(t){return t.extract(e.concat(["branch: "+i]),n,o)})},bn=function(r,i){return{extract:function(n,e,o){return bt(o,r).fold(function(){return t=r,en(n,function(){return'Choice schema did not contain choice key: "'+t+'"'});var t},function(t){return vn(n,e,o,i,t)})},toString:function(){return"chooseOn("+r+"). Possible values: "+lt(i)}}},yn=cn(It),xn=function(t){return gn(t)},wn=function(o){return{extract:function(t,n,e){return o().extract(t,n,e)},toString:function(){return o().toString()}}},Sn=function(n){return cn(function(t){return n(t).fold(Vt,It)})},kn=function(n,t){return dn(function(t){return At(n(t))},t)},Cn=function(t,n,e){return Ft((o=t,r=ct,i=e,u=n.extract([o],r,i),Nt(u,function(t){return{input:i,errors:t}})));var o,r,i,u},On=function(t){return t.fold(function(t){throw new Error(Tn(t))},ct)},_n=function(t,n,e){return On(Cn(t,n,e))},Tn=function(t){return"Errors: \n"+(n=t.errors,e=10<n.length?n.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):n,V(e,function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}).join("\n"))+"\n\nInput object: "+nn(t.input);var n,e},En=function(t,n){return bn(t,n)},Bn=function(t,n){return bn(t,dt(n,ln))},Dn=at(yn),Mn=function(e,o){return cn(function(t){var n=typeof t;return e(t)?It(t):Vt("Expected type: "+o+" but got: "+n)})},An=Mn(rt,"number"),Fn=Mn(S,"string"),In=Mn(O,"boolean"),Rn=Mn(T,"function"),Vn=function(n){var t=function(t,n){for(var e=t.next();!e.done;){if(!n(e.value))return!1;e=t.next()}return!0};if(Object(n)!==n)return!0;switch({}.toString.call(n).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(n).every(function(t){return Vn(n[t])});case"Map":return t(n.keys(),Vn)&&t(n.values(),Vn);case"Set":return t(n.keys(),Vn);default:return!1}},Hn=cn(function(t){return Vn(t)?It(t):Vt("Expected value to be acceptable for sending via postMessage")}),Pn=function(n){return Sn(function(t){return F(n,t)?ot.value(t):ot.error('Unsupported value: "'+t+'", choose one of "'+n.join(", ")+'".')})},zn=function(t){return hn(t,t,Ut(),mn())},Nn=function(t,n){return hn(t,t,Ut(),n)},Ln=function(t){return Nn(t,Fn)},jn=function(t,n){return hn(t,t,Ut(),Pn(n))},Un=function(t){return Nn(t,Rn)},Wn=function(t,n){return hn(t,t,Ut(),ln(n))},Gn=function(t,n){return hn(t,t,Ut(),gn(n))},Xn=function(t,n){return hn(t,t,Ut(),fn(n))},Yn=function(t){return hn(t,t,Wt(),mn())},qn=function(t,n){return hn(t,t,Wt(),n)},Kn=function(t){return qn(t,An)},Jn=function(t){return qn(t,Fn)},$n=function(t){return qn(t,Rn)},Qn=function(t,n){return qn(t,ln(n))},Zn=function(t,n){return hn(t,t,jt(n),mn())},te=function(t,n,e){return hn(t,t,jt(n),e)},ne=function(t,n){return te(t,n,An)},ee=function(t,n){return te(t,n,Fn)},oe=function(t,n,e){return te(t,n,Pn(e))},re=function(t,n){return te(t,n,In)},ie=function(t,n){return te(t,n,Rn)},ue=function(t,n,e){return te(t,n,ln(e))},ae=function(t,n){return pn(t,n)},ce=function(t){var n=t;return{get:function(){return n},set:function(t){n=t}}},se=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:at(t)}},le={fromHtml:function(t,n){var e=(n||nt.document).createElement("div");if(e.innerHTML=t,!e.hasChildNodes()||1<e.childNodes.length)throw nt.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return se(e.childNodes[0])},fromTag:function(t,n){var e=(n||nt.document).createElement(t);return se(e)},fromText:function(t,n){var e=(n||nt.document).createTextNode(t);return se(e)},fromDom:se,fromPoint:function(t,n,e){var o=t.dom();return st.from(o.elementFromPoint(n,e)).map(se)}},fe=function(t,n){var e=function(t,n){for(var e=0;e<t.length;e++){var o=t[e];if(o.test(n))return o}return undefined}(t,n);if(!e)return{major:0,minor:0};var o=function(t){return Number(n.replace(e,"$"+t))};return me(o(1),o(2))},de=function(){return me(0,0)},me=function(t,n){return{major:t,minor:n}},ge={nu:me,detect:function(t,n){var e=String(n).toLowerCase();return 0===t.length?de():fe(t,e)},unknown:de},pe="Firefox",he=function(t){var n=t.current,e=t.version,o=function(t){return function(){return n===t}};return{current:n,version:e,isEdge:o("Edge"),isChrome:o("Chrome"),isIE:o("IE"),isOpera:o("Opera"),isFirefox:o(pe),isSafari:o("Safari")}},ve={unknown:function(){return he({current:undefined,version:ge.unknown()})},nu:he,edge:at("Edge"),chrome:at("Chrome"),ie:at("IE"),opera:at("Opera"),firefox:at(pe),safari:at("Safari")},be="Windows",ye="Android",xe="Solaris",we="FreeBSD",Se="ChromeOS",ke=function(t){var n=t.current,e=t.version,o=function(t){return function(){return n===t}};return{current:n,version:e,isWindows:o(be),isiOS:o("iOS"),isAndroid:o(ye),isOSX:o("OSX"),isLinux:o("Linux"),isSolaris:o(xe),isFreeBSD:o(we),isChromeOS:o(Se)}},Ce={unknown:function(){return ke({current:undefined,version:ge.unknown()})},nu:ke,windows:at(be),ios:at("iOS"),android:at(ye),linux:at("Linux"),osx:at("OSX"),solaris:at(xe),freebsd:at(we),chromeos:at(Se)},Oe=function(t,n){var e=String(n).toLowerCase();return L(t,function(t){return t.search(e)})},_e=function(t,e){return Oe(t,e).map(function(t){var n=ge.detect(t.versionRegexes,e);return{current:t.name,version:n}})},Te=function(t,e){return Oe(t,e).map(function(t){var n=ge.detect(t.versionRegexes,e);return{current:t.name,version:n}})},Ee=function(t,n){return-1!==t.indexOf(n)},Be=(Tt=/^\s+|\s+$/g,function(t){return t.replace(Tt,"")}),De=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Me=function(n){return function(t){return Ee(t,n)}},Ae=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Ee(t,"edge/")&&Ee(t,"chrome")&&Ee(t,"safari")&&Ee(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,De],search:function(t){return Ee(t,"chrome")&&!Ee(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Ee(t,"msie")||Ee(t,"trident")}},{name:"Opera",versionRegexes:[De,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Me("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Me("firefox")},{name:"Safari",versionRegexes:[De,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Ee(t,"safari")||Ee(t,"mobile/"))&&Ee(t,"applewebkit")}}],Fe=[{name:"Windows",search:Me("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Ee(t,"iphone")||Ee(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Me("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Me("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Me("linux"),versionRegexes:[]},{name:"Solaris",search:Me("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Me("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Me("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Ie={browsers:at(Ae),oses:at(Fe)},Re=function(t,n){var e,o,r,i,u,a,c,s,l,f,d,m,g=Ie.browsers(),p=Ie.oses(),h=_e(g,t).fold(ve.unknown,ve.nu),v=Te(p,t).fold(Ce.unknown,Ce.nu);return{browser:h,os:v,deviceType:(o=h,r=t,i=n,u=(e=v).isiOS()&&!0===/ipad/i.test(r),a=e.isiOS()&&!u,c=e.isiOS()||e.isAndroid(),s=c||i("(pointer:coarse)"),l=u||!a&&c&&i("(min-device-width:768px)"),f=a||c&&!l,d=o.isSafari()&&e.isiOS()&&!1===/safari/i.test(r),m=!f&&!l&&!d,{isiPad:at(u),isiPhone:at(a),isTablet:at(l),isPhone:at(f),isTouch:at(s),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:at(d),isDesktop:at(m)})}},Ve=function(t){return nt.window.matchMedia(t).matches},He=_t(function(){return Re(nt.navigator.userAgent,Ve)}),Pe=function(){return He()},ze=function(t,n){var e=t.dom();if(1!==e.nodeType)return!1;var o=e;if(o.matches!==undefined)return o.matches(n);if(o.msMatchesSelector!==undefined)return o.msMatchesSelector(n);if(o.webkitMatchesSelector!==undefined)return o.webkitMatchesSelector(n);if(o.mozMatchesSelector!==undefined)return o.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},Ne=function(t){return 1!==t.nodeType&&9!==t.nodeType||0===t.childElementCount},Le=function(t,n){return t.dom()===n.dom()},je=function(t,n){return e=t.dom(),o=n.dom(),r=e,i=o,u=nt.Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(r.compareDocumentPosition(i)&u);var e,o,r,i,u},Ue=function(t,n){return Pe().browser.isIE()?je(t,n):(e=n,o=t.dom(),r=e.dom(),o!==r&&o.contains(r));var e,o,r},We=function(t){return T(t)?t:at(!1)},Ge=function(t,n,e){for(var o=t.dom(),r=We(e);o.parentNode;){o=o.parentNode;var i=le.fromDom(o),u=n(i);if(u.isSome())return u;if(r(i))break}return st.none()},Xe=function(t,n,e){var o=n(t),r=We(e);return o.orThunk(function(){return r(t)?st.none():Ge(t,n,r)})},Ye=function(t,n){return Le(t.element(),n.event().target())},qe=function(t){if(!xt(t,"can")&&!xt(t,"abort")&&!xt(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return _n("Extracting event.handler",sn([Zn("can",at(!0)),Zn("abort",at(!1)),Zn("run",Z)]),t)},Ke=function(e){var n,o,r,i,t=(o=function(t){return t.can},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N(n,function(t,n){return t&&o(n).apply(undefined,e)},!0)}),u=(r=n=e,i=function(t){return t.abort},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N(r,function(t,n){return t||i(n).apply(undefined,e)},!1)});return qe({can:t,abort:u,run:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];it(e,function(t){t.run.apply(undefined,n)})}})},Je=at("touchstart"),$e=at("touchmove"),Qe=at("touchend"),Ze=at("touchcancel"),to=at("mousedown"),no=at("mousemove"),eo=at("mouseout"),oo=at("mouseup"),ro=at("mouseover"),io=at("focusin"),uo=at("focusout"),ao=at("keydown"),co=at("keyup"),so=at("input"),lo=at("change"),fo=at("click"),mo=at("transitionend"),go=at("selectstart"),po={tap:at("alloy.tap")},ho=at("alloy.focus"),vo=at("alloy.blur.post"),bo=at("alloy.paste.post"),yo=at("alloy.receive"),xo=at("alloy.execute"),wo=at("alloy.focus.item"),So=po.tap,ko=at("alloy.longpress"),Co=at("alloy.sandbox.close"),Oo=at("alloy.typeahead.cancel"),_o=at("alloy.system.init"),To=at("alloy.system.touchmove"),Eo=at("alloy.system.touchend"),Bo=at("alloy.system.scroll"),Do=at("alloy.system.resize"),Mo=at("alloy.system.attached"),Ao=at("alloy.system.detached"),Fo=at("alloy.system.dismissRequested"),Io=at("alloy.system.repositionRequested"),Ro=at("alloy.focusmanager.shifted"),Vo=at("alloy.slotcontainer.visibility"),Ho=at("alloy.change.tab"),Po=at("alloy.dismiss.tab"),zo=at("alloy.highlight"),No=at("alloy.dehighlight"),Lo=function(t,n){Go(t,t.element(),n,{})},jo=function(t,n,e){Go(t,t.element(),n,e)},Uo=function(t){Lo(t,xo())},Wo=function(t,n,e){Go(t,n,e,{})},Go=function(t,n,e,o){var r=et({target:n},o);t.getSystem().triggerEvent(e,n,dt(r,at))},Xo=function(t,n,e,o){t.getSystem().triggerEvent(e,n,o.event())},Yo=function(t){return Jt(t)},qo=function(t,n){return{key:t,value:qe({abort:n})}},Ko=function(t){return{key:t,value:qe({run:function(t,n){n.event().prevent()}})}},Jo=function(t,n){return{key:t,value:qe({run:n})}},$o=function(t,e,o){return{key:t,value:qe({run:function(t,n){e.apply(undefined,[t,n].concat(o))}})}},Qo=function(t){return function(e){return{key:t,value:qe({run:function(t,n){Ye(t,n)&&e(t,n)}})}}},Zo=function(t,n,e){var o,r,i=n.partUids[e];return r=i,Jo(o=t,function(t,n){t.getSystem().getByUid(r).each(function(t){Xo(t,t.element(),o,n)})})},tr=function(t,r){return Jo(t,function(n,t){var e=t.event(),o=n.getSystem().getByDom(e.target()).fold(function(){return Xe(e.target(),function(t){return n.getSystem().getByDom(t).toOption()},at(!1)).getOr(n)},function(t){return t});r(n,o,t)})},nr=function(t){return Jo(t,function(t,n){n.cut()})},er=function(t,n){return Qo(t)(n)},or=Qo(Mo()),rr=Qo(Ao()),ir=Qo(_o()),ur=(Et=xo(),function(t){return Jo(Et,t)}),ar=function(t){return le.fromDom(t.dom().ownerDocument)},cr=function(t){return le.fromDom(t.dom().ownerDocument.documentElement)},sr=function(t){return le.fromDom(t.dom().ownerDocument.defaultView)},lr=function(t){return st.from(t.dom().parentNode).map(le.fromDom)},fr=function(t){return st.from(t.dom().offsetParent).map(le.fromDom)},dr=function(t){return V(t.dom().childNodes,le.fromDom)},mr=function(t,n){var e=t.dom().childNodes;return st.from(e[n]).map(le.fromDom)},gr=function(n,e){lr(n).each(function(t){t.dom().insertBefore(e.dom(),n.dom())})},pr=function(t,n){var e;(e=t,st.from(e.dom().nextSibling).map(le.fromDom)).fold(function(){lr(t).each(function(t){vr(t,n)})},function(t){gr(t,n)})},hr=function(n,e){mr(n,0).fold(function(){vr(n,e)},function(t){n.dom().insertBefore(e.dom(),t.dom())})},vr=function(t,n){t.dom().appendChild(n.dom())},br=function(n,t){it(t,function(t){vr(n,t)})},yr=function(t){t.dom().textContent="",it(dr(t),function(t){xr(t)})},xr=function(t){var n=t.dom();null!==n.parentNode&&n.parentNode.removeChild(n)},wr=function(t){var n,e=dr(t);0<e.length&&(n=t,it(e,function(t){gr(n,t)})),xr(t)},Sr=function(t){return t.dom().innerHTML},kr=function(t,n){var e,o,r=ar(t).dom(),i=le.fromDom(r.createDocumentFragment()),u=(e=n,(o=(r||nt.document).createElement("div")).innerHTML=e,dr(le.fromDom(o)));br(i,u),yr(t),vr(t,i)},Cr=("undefined"!=typeof nt.window?nt.window:Function("return this;")(),function(t){return t.dom().nodeName.toLowerCase()}),Or=function(n){return function(t){return t.dom().nodeType===n}},_r=Or(1),Tr=Or(3),Er=function(t,n,e){if(!(S(e)||O(e)||rt(e)))throw nt.console.error("Invalid call to Attr.set. Key ",n,":: Value ",e,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(n,e+"")},Br=function(t,n,e){Er(t.dom(),n,e)},Dr=function(t,n){var e=t.dom().getAttribute(n);return null===e?undefined:e},Mr=function(t,n){return st.from(Dr(t,n))},Ar=function(t,n){var e=t.dom();return!(!e||!e.hasAttribute)&&e.hasAttribute(n)},Fr=function(t,n){t.dom().removeAttribute(n)},Ir=function(t){return n=t,e=!1,le.fromDom(n.dom().cloneNode(e));var n,e},Rr=function(t){var n,e,o,r=Ir(t);return n=r,e=le.fromTag("div"),o=le.fromDom(n.dom().cloneNode(!0)),vr(e,o),Sr(e)},Vr=function(t){return Rr(t)},Hr=Yo([{key:ho(),value:qe({can:function(t,n){var e,o,r=n.event().originator(),i=n.event().target();return o=i,!(Le(e=r,t.element())&&!Le(e,o))||(nt.console.warn(ho()+" did not get interpreted by the desired target. \nOriginator: "+Vr(r)+"\nTarget: "+Vr(i)+"\nCheck the "+ho()+" event handlers"),!1)}})}]),Pr=/* */Object.freeze({__proto__:null,events:Hr}),zr=0,Nr=function(t){var n=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++zr+String(n)},Lr=at("alloy-id-"),jr=at("data-alloy-id"),Ur=Lr(),Wr=jr(),Gr=function(t,n){Object.defineProperty(t.dom(),Wr,{value:n,writable:!0})},Xr=function(t){var n=_r(t)?t.dom()[Wr]:null;return st.from(n)},Yr=function(t){return Nr(t)},qr=ct,Kr=function(n){var t=function(t){return function(){throw new Error("The component must be in a context to send: "+t+(n?"\n"+Vr(n().element())+" is not in context.":""))}};return{debugInfo:at("fake"),triggerEvent:t("triggerEvent"),triggerFocus:t("triggerFocus"),triggerEscape:t("triggerEscape"),build:t("build"),addToWorld:t("addToWorld"),removeFromWorld:t("removeFromWorld"),addToGui:t("addToGui"),removeFromGui:t("removeFromGui"),getByUid:t("getByUid"),getByDom:t("getByDom"),broadcast:t("broadcast"),broadcastOn:t("broadcastOn"),broadcastEvent:t("broadcastEvent"),isConnected:at(!1)}},Jr=Kr(),$r=function(t){return V(t,function(t){return o=n="/*",r=(e=t).length-n.length,""===o||e.length>=o.length&&e.substr(r,r+o.length)===o?t.substring(0,t.length-"/*".length):t;var n,e,o,r})},Qr=function(t,n){var e=t.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:n,parameters:$r(i)}},t},Zr=Nr("alloy-premade"),ti=function(t){return Kt(Zr,t)},ni=function(o){return t=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return o.apply(void 0,b([t.getApis(),t],n))},n=o.toString(),e=n.indexOf(")")+1,r=n.indexOf("("),i=n.substring(r+1,e-1).split(/,\s*/),t.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:$r(i.slice(1))}},t;var t,n,e,r,i},ei={init:function(){return oi({readState:function(){return"No State required"}})}},oi=function(t){return t},ri=function(t,r){var i={};return ft(t,function(t,o){ft(t,function(t,n){var e=bt(i,n).getOr([]);i[n]=e.concat([r(o,t)])})}),i},ii=function(t){return{classes:t.classes!==undefined?t.classes:[],attributes:t.attributes!==undefined?t.attributes:{},styles:t.styles!==undefined?t.styles:{}}},ui=function(t,n){return e=g.apply(undefined,[t.handler].concat(n)),o=t.purpose(),{cHandler:e,purpose:at(o)};var e,o},ai=function(t){return t.cHandler},ci=function(t,n){return{name:at(t),handler:at(n)}},si=function(t,n,e){var o,r,i=et(et({},e),(o=t,r={},it(n,function(t){r[t.name()]=t.handlers(o)}),r));return ri(i,ci)},li=function(t){var n,i=T(n=t)?{can:at(!0),abort:at(!1),run:n}:n;return function(t,n){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];var r=[t,n].concat(e);i.abort.apply(undefined,r)?n.stop():i.can.apply(undefined,r)&&i.run.apply(undefined,r)}},fi=function(t,n,e){var o,r,i=n[e];return i?function(u,a,t,c){try{var n=q(t,function(t,n){var e=t[a](),o=n[a](),r=c.indexOf(e),i=c.indexOf(o);if(-1===r)throw new Error("The ordering for "+u+" does not have an entry for "+e+".\nOrder specified: "+JSON.stringify(c,null,2));if(-1===i)throw new Error("The ordering for "+u+" does not have an entry for "+o+".\nOrder specified: "+JSON.stringify(c,null,2));return r<i?-1:i<r?1:0});return ot.value(n)}catch(e){return ot.error([e])}}("Event: "+e,"name",t,i).map(function(t){var n=V(t,function(t){return t.handler()});return Ke(n)}):(o=e,r=t,ot.error(["The event ("+o+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(V(r,function(t){return t.name()}),null,2)]))},di=function(t,i){var n=pt(t,function(o,r){return(1===o.length?ot.value(o[0].handler()):fi(o,i,r)).map(function(t){var n=li(t),e=1<o.length?P(i[r],function(n){return I(o,function(t){return t.name()===n})}).join(" > "):o[0].name();return Kt(r,{handler:n,purpose:at(e)})})});return $t(n,{})},mi=function(t){return Cn("custom.definition",ln([hn("dom","dom",Ut(),ln([zn("tag"),Zn("styles",{}),Zn("classes",[]),Zn("attributes",{}),Yn("value"),Yn("innerHtml")])),zn("components"),zn("uid"),Zn("events",{}),Zn("apis",{}),hn("eventOrder","eventOrder",Lt.mergeWithThunk(at({"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],touchstart:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"],"alloy.receive":["receiving","reflecting","tooltipping"]})),Dn()),Yn("domModification")]),t)},gi=function(t,n){var e=Dr(t,n);return e===undefined||""===e?[]:e.split(" ")},pi=function(t){return t.dom().classList!==undefined},hi=function(t,n){return r=n,i=gi(e=t,o="class").concat([r]),Br(e,o,i.join(" ")),!0;var e,o,r,i},vi=function(t,n){return r=n,0<(i=P(gi(e=t,o="class"),function(t){return t!==r})).length?Br(e,o,i.join(" ")):Fr(e,o),!1;var e,o,r,i},bi=function(t,n){pi(t)?t.dom().classList.add(n):hi(t,n)},yi=function(t){0===(pi(t)?t.dom().classList:gi(t,"class")).length&&Fr(t,"class")},xi=function(t,n){pi(t)?t.dom().classList.remove(n):vi(t,n);yi(t)},wi=function(t,n){return pi(t)&&t.dom().classList.contains(n)},Si=function(n,t){it(t,function(t){bi(n,t)})},ki=function(n,t){it(t,function(t){xi(n,t)})},Ci=function(t){return t.style!==undefined&&T(t.style.getPropertyValue)},Oi=function(t){var n=Tr(t)?t.dom().parentNode:t.dom();return n!==undefined&&null!==n&&n.ownerDocument.body.contains(n)},_i=function(){return Ti(le.fromDom(nt.document))},Ti=function(t){var n=t.dom().body;if(null===n||n===undefined)throw new Error("Body is not available yet");return le.fromDom(n)},Ei=function(t,n,e){if(!S(e))throw nt.console.error("Invalid call to CSS.set. Property ",n,":: Value ",e,":: Element ",t),new Error("CSS value must be a string: "+e);Ci(t)&&t.style.setProperty(n,e)},Bi=function(t,n){Ci(t)&&t.style.removeProperty(n)},Di=function(t,n,e){var o=t.dom();Ei(o,n,e)},Mi=function(t,n){var e=t.dom();ft(n,function(t,n){Ei(e,n,t)})},Ai=function(t,n){var e=t.dom();ft(n,function(t,n){t.fold(function(){Bi(e,n)},function(t){Ei(e,n,t)})})},Fi=function(t,n){var e=t.dom(),o=nt.window.getComputedStyle(e).getPropertyValue(n);return""!==o||Oi(t)?o:Ii(e,n)},Ii=function(t,n){return Ci(t)?t.style.getPropertyValue(n):""},Ri=function(t,n){var e=t.dom(),o=Ii(e,n);return st.from(o).filter(function(t){return 0<t.length})},Vi=function(t,n,e){var o=le.fromTag(t);return Di(o,n,e),Ri(o,n).isSome()},Hi=function(t,n){var e=t.dom();Bi(e,n),Mr(t,"style").map(Be).is("")&&Fr(t,"style")},Pi=function(t){return t.dom().offsetWidth},zi=function(t){return t.dom().value},Ni=function(t,n){if(n===undefined)throw new Error("Value.set was undefined");t.dom().value=n},Li=function(t){var n,e,o,r=le.fromTag(t.tag);n=r,e=t.attributes,o=n.dom(),ft(e,function(t,n){Er(o,n,t)}),Si(r,t.classes),Mi(r,t.styles),t.innerHtml.each(function(t){return kr(r,t)});var i=t.domChildren;return br(r,i),t.value.each(function(t){Ni(r,t)}),t.uid,Gr(r,t.uid),r},ji=function(t,n){return e=t,r=V(o=n,function(t){return Qn(t.name(),[zn("config"),Zn("state",ei)])}),i=Cn("component.behaviours",ln(r),e.behaviours).fold(function(t){throw new Error(Tn(t)+"\nComplete spec:\n"+JSON.stringify(e,null,2))},function(t){return t}),{list:o,data:dt(i,function(t){var n=t.map(function(t){return{config:t.config,state:t.state.init(t.config)}});return function(){return n}})};var e,o,r,i},Ui=function(t){var n,e,o=(n=bt(t,"behaviours").getOr({}),e=P(lt(n),function(t){return n[t]!==undefined}),V(e,function(t){return n[t].me}));return ji(t,o)},Wi=function(t,n,e){var o,r,i,u=et(et({},(o=t).dom),{uid:o.uid,domChildren:V(o.components,function(t){return t.element()})}),a=t.domModification.fold(function(){return ii({})},ii),c={"alloy.base.modification":a},s=0<n.length?function(n,t,e,o){var r=et({},t);it(e,function(t){r[t.name()]=t.exhibit(n,o)});var i=ri(r,function(t,n){return{name:t,modification:n}}),u=function(t){return z(t,function(t,n){return et(et({},n.modification),t)},{})},a=z(i.classes,function(t,n){return n.modification.concat(t)},[]),c=u(i.attributes),s=u(i.styles);return ii({classes:a,attributes:c,styles:s})}(e,c,n,u):a;return i=s,et(et({},r=u),{attributes:et(et({},r.attributes),i.attributes),styles:et(et({},r.styles),i.styles),classes:r.classes.concat(i.classes)})},Gi=function(t,n,e){var o,r,i,u={"alloy.base.behaviour":t.events};return o=e,r=t.eventOrder,i=si(o,n,u),di(i,r).getOrDie()},Xi=function(t){var n,e,o,r,i,u,a,c,s,l,f,d,m,g=qr(t),p=g.events,h=y(g,["events"]),v=(n=bt(h,"components").getOr([]),V(n,Ji)),b=et(et({},h),{events:et(et({},Pr),p),components:v});return ot.value((o=function(){return m},r=ce(Jr),i=On(mi(e=b)),u=Ui(e),a=u.list,c=u.data,s=Wi(i,a,c),l=Li(s),f=Gi(i,a,c),d=ce(i.components),m={getSystem:r.get,config:function(t){var n=c;return(T(n[t.name()])?n[t.name()]:function(){throw new Error("Could not find "+t.name()+" in "+JSON.stringify(e,null,2))})()},hasConfigured:function(t){return T(c[t.name()])},spec:at(e),readState:function(t){return c[t]().map(function(t){return t.state.readState()}).getOr("not enabled")},getApis:function(){return i.apis},connect:function(t){r.set(t)},disconnect:function(){r.set(Kr(o))},element:at(l),syncComponents:function(){var t=dr(l),n=U(t,function(t){return r.get().getByDom(t).fold(function(){return[]},function(t){return[t]})});d.set(n)},components:d.get,events:at(f)}))},Yi=function(t){var n=le.fromText(t);return qi({element:n})},qi=function(t){var n=_n("external.component",sn([zn("element"),Yn("uid")]),t),e=ce(Kr());n.uid.each(function(t){Gr(n.element,t)});var o={getSystem:e.get,config:st.none,hasConfigured:at(!1),connect:function(t){e.set(t)},disconnect:function(){e.set(Kr(function(){return o}))},getApis:function(){return{}},element:at(n.element),spec:at(t),readState:at("No state"),syncComponents:Z,components:at([]),events:at({})};return ti(o)},Ki=Yr,Ji=function(n){return bt(n,Zr).fold(function(){var t=n.hasOwnProperty("uid")?n:et({uid:Ki("")},n);return Xi(t).getOrDie()},function(t){return t})},$i=ti;function Qi(o,r){var t=function(t){var n=r(t);if(n<=0||null===n){var e=Fi(t,o);return parseFloat(e)||0}return n},i=function(r,t){return N(t,function(t,n){var e=Fi(r,n),o=e===undefined?0:parseInt(e,10);return isNaN(o)?t:t+o},0)};return{set:function(t,n){if(!rt(n)&&!n.match(/^[0-9]+$/))throw new Error(o+".set accepts only positive integer values. Value was "+n);var e=t.dom();Ci(e)&&(e.style[o]=n+"px")},get:t,getOuter:t,aggregate:i,max:function(t,n,e){var o=i(t,e);return o<n?n-o:0}}}var Zi=Qi("height",function(t){var n=t.dom();return Oi(t)?n.getBoundingClientRect().height:n.offsetHeight}),tu=function(t){return Zi.get(t)},nu=function(t){return Zi.getOuter(t)},eu=function(e,o){return{left:at(e),top:at(o),translate:function(t,n){return eu(e+t,o+n)}}},ou=eu,ru=function(t,n){return t!==undefined?t:n!==undefined?n:0},iu=function(t){var n=t.dom().ownerDocument,e=n.body,o=n.defaultView,r=n.documentElement;if(e===t.dom())return ou(e.offsetLeft,e.offsetTop);var i=ru(o.pageYOffset,r.scrollTop),u=ru(o.pageXOffset,r.scrollLeft),a=ru(r.clientTop,e.clientTop),c=ru(r.clientLeft,e.clientLeft);return uu(t).translate(u-c,i-a)},uu=function(t){var n,e=t.dom(),o=e.ownerDocument.body;return o===e?ou(o.offsetLeft,o.offsetTop):Oi(t)?(n=e.getBoundingClientRect(),ou(n.left,n.top)):ou(0,0)},au=Qi("width",function(t){return t.dom().offsetWidth}),cu=function(t){return au.get(t)},su=function(t){return au.getOuter(t)},lu=function(t){var n,e,o,r,i,u,a,c=le.fromDom(t.target),s=function(){return t.stopPropagation()},l=function(){return t.preventDefault()},f=d(l,s);return n=c,e=t.clientX,o=t.clientY,r=s,i=l,u=f,a=t,{target:at(n),x:at(e),y:at(o),stop:r,prevent:i,kill:u,raw:at(a)}},fu=function(t,n,e,o,r){var i,u,a=(i=e,u=o,function(t){i(t)&&u(lu(t))});return t.dom().addEventListener(n,a,r),{unbind:g(du,t,n,a,r)}},du=function(t,n,e,o){t.dom().removeEventListener(n,e,o)},mu=function(t){var n=t!==undefined?t.dom():nt.document,e=n.body.scrollLeft||n.documentElement.scrollLeft,o=n.body.scrollTop||n.documentElement.scrollTop;return ou(e,o)},gu=function(t,n,e){(e!==undefined?e.dom():nt.document).defaultView.scrollTo(t,n)},pu=function(t,n,e,o){return{x:t,y:n,width:e,height:o,right:t+e,bottom:n+o}},hu=function(t){var n,e,o=t===undefined?nt.window:t,r=o.document,i=mu(le.fromDom(r));return e=(n=o)===undefined?nt.window:n,st.from(e.visualViewport).fold(function(){var t=o.document.documentElement,n=t.clientWidth,e=t.clientHeight;return pu(i.left(),i.top(),n,e)},function(t){return pu(Math.max(t.pageLeft,i.left()),Math.max(t.pageTop,i.top()),t.width,t.height)})},vu=function(o,t){return o.view(t).fold(at([]),function(t){var n=o.owner(t),e=vu(o,n);return[t].concat(e)})},bu=/* */Object.freeze({__proto__:null,view:function(t){return(t.dom()===nt.document?st.none():st.from(t.dom().defaultView.frameElement)).map(le.fromDom)},owner:function(t){return ar(t)}}),yu=function(o){var t,n,e,r,i=le.fromDom(nt.document),u=mu(i);return(t=o,e=(n=bu).owner(t),r=vu(n,e),st.some(r)).fold(g(iu,o),function(t){var n=uu(o),e=z(t,function(t,n){var e=uu(n);return{left:t.left+e.left(),top:t.top+e.top()}},{left:0,top:0});return ou(e.left+n.left()+u.left(),e.top+n.top()+u.top())})},xu=function(t,n,e,o){return{x:t,y:n,width:e,height:o,right:t+e,bottom:n+o}},wu=function(t){var n=iu(t),e=su(t),o=nu(t);return xu(n.left(),n.top(),e,o)},Su=function(t){var n=yu(t),e=su(t),o=nu(t);return xu(n.left(),n.top(),e,o)},ku=function(){return hu(nt.window)};function Cu(t,n,e,o,r){return t(e,o)?st.some(e):T(r)&&r(e)?st.none():n(e,o,r)}var Ou,_u,Tu=function(t,n,e){for(var o=t.dom(),r=T(e)?e:at(!1);o.parentNode;){o=o.parentNode;var i=le.fromDom(o);if(n(i))return st.some(i);if(r(i))break}return st.none()},Eu=function(t,n,e){return Cu(function(t,n){return n(t)},Tu,t,n,e)},Bu=function(t,n,e){return Eu(t,n,e).isSome()},Du=function(t,n,e){return Tu(t,function(t){return ze(t,n)},e)},Mu=function(t,n){return e=n,r=(o=t)===undefined?nt.document:o.dom(),Ne(r)?st.none():st.from(r.querySelector(e)).map(le.fromDom);var e,o,r},Au=function(t,n,e){return Cu(function(t,n){return ze(t,n)},Du,t,n,e)},Fu=function(){var n=Nr("aria-owns");return{id:n,link:function(t){Br(t,"aria-owns",n)},unlink:function(t){Fr(t,"aria-owns")}}},Iu=function(n,t){return Eu(t,function(t){if(!_r(t))return!1;var n=Dr(t,"id");return n!==undefined&&-1<n.indexOf("aria-owns")}).bind(function(t){var n=Dr(t,"id"),e=ar(t);return Mu(e,'[aria-owns="'+n+'"]')}).exists(function(t){return Ru(n,t)})},Ru=function(n,t){return Bu(t,function(t){return Le(t,n.element())},at(!1))||Iu(n,t)},Vu="unknown";(_u=Ou=Ou||{})[_u.STOP=0]="STOP",_u[_u.NORMAL=1]="NORMAL",_u[_u.LOGGING=2]="LOGGING";var Hu,Pu,zu=ce({}),Nu=function(n,t,e){var o,r,i,u;switch(bt(zu.get(),n).orThunk(function(){var t=lt(zu.get());return Q(t,function(t){return-1<n.indexOf(t)?st.some(zu.get()[t]):st.none()})}).getOr(Ou.NORMAL)){case Ou.NORMAL:return e(Uu());case Ou.LOGGING:var a=(o=n,r=t,i=[],u=(new Date).getTime(),{logEventCut:function(t,n,e){i.push({outcome:"cut",target:n,purpose:e})},logEventStopped:function(t,n,e){i.push({outcome:"stopped",target:n,purpose:e})},logNoParent:function(t,n,e){i.push({outcome:"no-parent",target:n,purpose:e})},logEventNoHandlers:function(t,n){i.push({outcome:"no-handlers-left",target:n})},logEventResponse:function(t,n,e){i.push({outcome:"response",purpose:e,target:n})},write:function(){var t=(new Date).getTime();F(["mousemove","mouseover","mouseout",_o()],o)||nt.console.log(o,{event:o,time:t-u,target:r.dom(),sequence:V(i,function(t){return F(["cut","stopped","response"],t.outcome)?"{"+t.purpose+"} "+t.outcome+" at ("+Vr(t.target)+")":t.outcome})})}}),c=e(a);return a.write(),c;case Ou.STOP:return!0}},Lu=["alloy/data/Fields","alloy/debugging/Debugging"],ju=function(t,n,e){return Nu(t,n,e)},Uu=at({logEventCut:Z,logEventStopped:Z,logNoParent:Z,logEventNoHandlers:Z,logEventResponse:Z,write:Z}),Wu=at([zn("menu"),zn("selectedMenu")]),Gu=at([zn("item"),zn("selectedItem")]),Xu=(at(ln(Gu().concat(Wu()))),at(ln(Gu()))),Yu=Wn("initSize",[zn("numColumns"),zn("numRows")]),qu=function(){return Wn("markers",[zn("backgroundMenu")].concat(Wu()).concat(Gu()))},Ku=function(t){return Wn("markers",V(t,zn))},Ju=function(t,n,e){!function(){var t=new Error;if(t.stack===undefined)return;var n=t.stack.split("\n");L(n,function(n){return 0<n.indexOf("alloy")&&!I(Lu,function(t){return-1<n.indexOf(t)})}).getOr(Vu)}();return hn(n,n,e,Sn(function(e){return ot.value(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.apply(undefined,t)})}))},$u=function(t){return Ju(0,t,jt(Z))},Qu=function(t){return Ju(0,t,jt(st.none))},Zu=function(t){return Ju(0,t,Ut())},ta=function(t){return Ju(0,t,Ut())},na=function(t,n){return ae(t,at(n))},ea=function(t){return ae(t,ct)},oa=at(Yu),ra=function(t,n,e,o,r,i){return{x:at(t),y:at(n),bubble:at(e),direction:at(o),boundsRestriction:at(r),label:at(i)}},ia=wt([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),ua=ia.southeast,aa=ia.southwest,ca=ia.northeast,sa=ia.northwest,la=ia.south,fa=ia.north,da=ia.east,ma=ia.west,ga=function(n,e){return function(t,n){for(var e={},o=0,r=t.length;o<r;o++){var i=t[o];e[String(i)]=n(i,o)}return e}(["left","right","top","bottom"],function(t){return bt(e,t).map(function(t){return function(t,n){switch(n){case 1:return t.x;case 0:return t.x+t.width;case 2:return t.y;case 3:return t.y+t.height}}(n,t)})})},pa=function(t){return t.x},ha=function(t,n){return t.x+t.width/2-n.width/2},va=function(t,n){return t.x+t.width-n.width},ba=function(t,n){return t.y-n.height},ya=function(t){return t.y+t.height},xa=function(t,n){return t.y+t.height/2-n.height/2},wa=function(t,n,e){return ra(pa(t),ya(t),e.southeast(),ua(),ga(t,{left:1,top:3}),"layout-se")},Sa=function(t,n,e){return ra(va(t,n),ya(t),e.southwest(),aa(),ga(t,{right:0,top:3}),"layout-sw")},ka=function(t,n,e){return ra(pa(t),ba(t,n),e.northeast(),ca(),ga(t,{left:1,bottom:2}),"layout-ne")},Ca=function(t,n,e){return ra(va(t,n),ba(t,n),e.northwest(),sa(),ga(t,{right:0,bottom:2}),"layout-nw")},Oa=function(t,n,e){return ra(ha(t,n),ba(t,n),e.north(),fa(),ga(t,{bottom:2}),"layout-n")},_a=function(t,n,e){return ra(ha(t,n),ya(t),e.south(),la(),ga(t,{top:3}),"layout-s")},Ta=function(t,n,e){return ra((o=t).x+o.width,xa(t,n),e.east(),da(),ga(t,{left:0}),"layout-e");var o},Ea=function(t,n,e){return ra((o=n,t.x-o.width),xa(t,n),e.west(),ma(),ga(t,{right:1}),"layout-w");var o},Ba=function(){return[wa,Sa,ka,Ca,_a,Oa,Ta,Ea]},Da=function(){return[Sa,wa,Ca,ka,_a,Oa,Ta,Ea]},Ma=function(){return[ka,Ca,wa,Sa,Oa,_a]},Aa=function(){return[wa,Sa,ka,Ca,_a,Oa]},Fa=function(){return[Sa,wa,Ca,ka,_a,Oa]},Ia=function(e,o,r){return ir(function(t,n){r(t,e,o)})},Ra=function(t,n,e,o,r,i){var u=sn(t),a=Qn(n,[qn("config",sn(t))]);return Pa(u,a,n,e,o,r,i)},Va=function(r,i,u){var t,n,e,o,a,c;return t=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=[e].concat(t);return e.config({name:at(r)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+r+". Using API: "+u)},function(t){var n=Array.prototype.slice.call(o,1);return i.apply(undefined,[e,t.config,t.state].concat(n))})},n=u,e=i.toString(),o=e.indexOf(")")+1,a=e.indexOf("("),c=e.substring(a+1,o-1).split(/,\s*/),t.toFunctionAnnotation=function(){return{name:n,parameters:$r(c.slice(0,1).concat(c.slice(3)))}},t},Ha=function(t){return{key:t,value:undefined}},Pa=function(e,t,o,r,n,i,u){var a=function(t){return xt(t,o)?t[o]():st.none()},c=dt(n,function(t,n){return Va(o,t,n)}),s=dt(i,function(t,n){return Qr(t,n)}),l=et(et(et({},s),c),{revoke:g(Ha,o),config:function(t){var n=_n(o+"-config",e,t);return{key:o,value:{config:n,me:l,configAsRaw:_t(function(){return _n(o+"-config",e,t)}),initialConfig:t,state:u}}},schema:function(){return t},exhibit:function(t,e){return a(t).bind(function(n){return bt(r,"exhibit").map(function(t){return t(e,n.config,n.state)})}).getOr(ii({}))},name:function(){return o},handlers:function(t){return a(t).map(function(t){return bt(r,"events").getOr(function(){return{}})(t.config,t.state)}).getOr({})}});return l},za=function(t){return Jt(t)},Na=sn([zn("fields"),zn("name"),Zn("active",{}),Zn("apis",{}),Zn("state",ei),Zn("extra",{})]),La=function(t){var n=_n("Creating behaviour: "+t.name,Na,t);return Ra(n.fields,n.name,n.active,n.apis,n.extra,n.state)},ja=sn([zn("branchKey"),zn("branches"),zn("name"),Zn("active",{}),Zn("apis",{}),Zn("state",ei),Zn("extra",{})]),Ua=function(t){var n,e,o,r,i,u,a,c,s=_n("Creating behaviour: "+t.name,ja,t);return n=Bn(s.branchKey,s.branches),e=s.name,o=s.active,r=s.apis,i=s.extra,u=s.state,c=Qn(e,[qn("config",a=n)]),Pa(a,c,e,o,r,i,u)},Wa=at(undefined),Ga=/* */Object.freeze({__proto__:null,events:function(c){return Yo([Jo(yo(),function(r,t){var n,e,i=c.channels,o=lt(i),u=t,a=(n=o,(e=u).universal()?n:P(n,function(t){return F(e.channels(),t)}));it(a,function(t){var n=i[t],e=n.schema,o=_n("channel["+t+"] data\nReceiver: "+Vr(r.element()),e,u.data());n.onReceive(r,o)})})])}}),Xa=[Nn("channels",kn(ot.value,sn([Zu("onReceive"),Zn("schema",Dn())])))],Ya=La({fields:Xa,name:"receiving",active:Ga}),qa=/* */Object.freeze({__proto__:null,exhibit:function(t,n){return ii({classes:[],styles:n.useFixed()?{}:{position:"relative"}})}}),Ka=function(t){return t.dom().focus()},Ja=function(t){var n=t!==undefined?t.dom():nt.document;return st.from(n.activeElement).map(le.fromDom)},$a=function(n){return Ja(ar(n)).filter(function(t){return n.dom().contains(t.dom())})},Qa=function(t,e){var o=ar(e),n=Ja(o).bind(function(n){var r,i,t=function(t){return Le(n,t)};return t(e)?st.some(e):(r=t,(i=function(t){for(var n=0;n<t.childNodes.length;n++){var e=le.fromDom(t.childNodes[n]);if(r(e))return st.some(e);var o=i(t.childNodes[n]);if(o.isSome())return o}return st.none()})(e.dom()))}),r=t(e);return n.each(function(n){Ja(o).filter(function(t){return Le(t,n)}).fold(function(){Ka(n)},Z)}),r},Za=function(t,n,e,o,r){return{position:at(t),left:at(n),top:at(e),right:at(o),bottom:at(r)}},tc=function(t,n){var e=function(t){return t+"px"};Ai(t,{position:st.some(n.position()),left:n.left().map(e),top:n.top().map(e),right:n.right().map(e),bottom:n.bottom().map(e)})},nc=wt([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),ec=function(t,n,e,o,r,i){var u,a,c,s,l,f,d,m,g,p=n.x-e,h=n.y-o,v=r-(p+n.width),b=i-(h+n.height),y=st.some(p),x=st.some(h),w=st.some(v),S=st.some(b),k=st.none();return u=n.direction,a=function(){return Za(t,y,x,k,k)},c=function(){return Za(t,k,x,w,k)},s=function(){return Za(t,y,k,k,S)},l=function(){return Za(t,k,k,w,S)},f=function(){return Za(t,y,x,k,k)},d=function(){return Za(t,y,k,k,S)},m=function(){return Za(t,y,x,k,k)},g=function(){return Za(t,k,x,w,k)},u.fold(a,c,s,l,f,d,m,g)},oc=function(t,n){var e=g(yu,n),o=t.fold(e,e,function(){var t=mu();return yu(n).translate(-t.left(),-t.top())}),r=su(n),i=nu(n);return xu(o.left(),o.top(),r,i)},rc=function(t,n,e){var o=ou(n,e);return t.fold(at(o),at(o),function(){var t=mu();return o.translate(-t.left(),-t.top())})},ic=(nc.none,nc.relative),uc=nc.fixed,ac=function(t,n){return e=n,{anchorBox:at(t),origin:at(e)};var e},cc=function(t,n,e,o){var r=t+n;return o<r?e:r<e?o:r},sc=function(t,n,e){return Math.min(Math.max(t,n),e)},lc=wt([{fit:["reposition"]},{nofit:["reposition","deltaW","deltaH"]}]),fc=function(t,n,e,o){var r,i,u,a,c,s,l,f,d,m,g,p,h,v,b,y,x,w,S,k,C,O,_,T,E,B,D,M,A,F,I,R,V,H=t.x(),P=t.y(),z=t.bubble().offset(),N=z.left(),L=z.top(),j=(r=o,i=t.boundsRestriction(),u=z,c=(a=function(n,e){var o="top"===n||"bottom"===n?u.top():u.left();return bt(i,n).bind(ct).bind(function(t){return"left"===n||"top"===n?e<=t?st.some(t):st.none():t<=e?st.some(t):st.none()}).map(function(t){return t+o}).getOr(e)})("left",r.x),s=a("top",r.y),l=a("right",r.right),f=a("bottom",r.bottom),xu(c,s,l-c,f-s)),U=j.y,W=j.bottom,G=j.x,X=j.right,Y=P+L,q=(d=H+N,m=Y,g=n,p=e,v=(h=j).x,b=h.y,y=h.width,x=h.height,S=b<=m,k=(w=v<=d)&&S,C=d+g<=v+y&&m+p<=b+x,O=Math.abs(Math.min(g,w?v+y-d:v-(d+g))),_=Math.abs(Math.min(p,S?b+x-m:b-(m+p))),T=Math.max(h.x,h.right-g),E=Math.max(h.y,h.bottom-p),{originInBounds:k,sizeInBounds:C,limitX:sc(d,h.x,T),limitY:sc(m,h.y,E),deltaW:O,deltaH:_}),K=q.originInBounds,J=q.sizeInBounds,$=q.limitX,Q=q.limitY,Z=q.deltaW,tt=q.deltaH,nt=at(Q+tt-U),et=at(W-Q),ot=(B=t.direction(),M=D=et,A=nt,B.fold(D,D,A,A,D,A,M,M)),rt=at($+Z-G),it=at(X-$),ut={x:$,y:Q,width:Z,height:tt,maxHeight:ot,maxWidth:(F=t.direction(),R=I=it,V=rt,F.fold(I,V,I,V,R,R,I,V)),direction:t.direction(),classes:{on:t.bubble().classesOn(),off:t.bubble().classesOff()},label:t.label(),candidateYforTest:Y};return K&&J?lc.fit(ut):lc.nofit(ut,Z,tt)},dc=function(t,n,e,o){Hi(n,"max-height"),Hi(n,"max-width");var r,i,u,a,c,s,l,f,d,m={width:su(r=n),height:nu(r)};return i=o.preference,u=t,a=m,c=e,s=o.bounds,l=a.width,f=a.height,d=function(t,o,r,i){var n=t(u,a,c);return fc(n,l,f,s).fold(lc.fit,function(t,n,e){return i<e||r<n?lc.nofit(t,n,e):lc.nofit(o,r,i)})},N(i,function(t,n){var e=g(d,n);return t.fold(lc.fit,e)},lc.nofit({x:u.x,y:u.y,width:a.width,height:a.height,maxHeight:a.height,maxWidth:a.width,direction:ua(),classes:{on:[],off:[]},label:"none",candidateYforTest:u.y},-1,-1)).fold(ct,ct)},mc=function(t,n,e){var o,r;tc(t,(o=e.origin,r=n,o.fold(function(){return Za("absolute",st.some(r.x),st.some(r.y),st.none(),st.none())},function(t,n,e,o){return ec("absolute",r,t,n,e,o)},function(t,n,e,o){return ec("fixed",r,t,n,e,o)})))},gc=function(t,n){var e,o,r;e=t,o=Math.floor(n),r=Zi.max(e,o,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]),Di(e,"max-height",r+"px")},pc=at(function(t,n){gc(t,n),Mi(t,{"overflow-x":"hidden","overflow-y":"auto"})}),hc=at(function(t,n){gc(t,n)}),vc=function(t,n,e){return t[n]===undefined?e:t[n]},bc=function(t,n,e,o,r,i){var u,a=vc(i,"maxHeightFunction",pc()),c=vc(i,"maxWidthFunction",Z),s=t.anchorBox(),l=t.origin(),f={bounds:(u=l,r.fold(function(){return u.fold(ku,ku,xu)},function(e){return u.fold(e,e,function(){var t=e(),n=rc(u,t.x,t.y);return xu(n.left(),n.top(),t.width,t.height)})})),origin:l,preference:o,maxHeightFunction:a,maxWidthFunction:c};yc(s,n,e,f)},yc=function(t,n,e,o){var r,i,u,a,c,s,l=dc(t,n,e,o);mc(n,l,o),r=n,i=l.classes,ki(r,i.off),Si(r,i.on),u=n,a=l,(0,o.maxHeightFunction)(u,a.maxHeight),c=n,s=l,(0,o.maxWidthFunction)(c,s.maxWidth)},xc=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right"],wc=function(t,n,e){var r=function(t){return bt(e,t).getOr([])},o=function(t,n,e){var o=X(xc,e);return{offset:function(){return ou(t,n)},classesOn:function(){return U(e,r)},classesOff:function(){return U(o,r)}}};return{southeast:function(){return o(-t,n,["top","alignLeft"])},southwest:function(){return o(t,n,["top","alignRight"])},south:function(){return o(-t/2,n,["top","alignCentre"])},northeast:function(){return o(-t,-n,["bottom","alignLeft"])},northwest:function(){return o(t,-n,["bottom","alignRight"])},north:function(){return o(-t/2,-n,["bottom","alignCentre"])},east:function(){return o(t,-n/2,["valignCentre","left"])},west:function(){return o(-t,-n/2,["valignCentre","right"])},innerNorthwest:function(){return o(-t,n,["top","alignRight"])},innerNortheast:function(){return o(t,n,["top","alignLeft"])},innerNorth:function(){return o(-t/2,n,["top","alignCentre"])},innerSouthwest:function(){return o(-t,-n,["bottom","alignRight"])},innerSoutheast:function(){return o(t,-n,["bottom","alignLeft"])},innerSouth:function(){return o(-t/2,-n,["bottom","alignCentre"])},innerWest:function(){return o(t,-n/2,["valignCentre","right"])},innerEast:function(){return o(-t,-n/2,["valignCentre","left"])}}},Sc=function(){return wc(0,0,{})},kc=function(n,e){return function(t){return"rtl"===Cc(t)?e:n}},Cc=function(t){return"rtl"===Fi(t,"direction")?"rtl":"ltr"};(Pu=Hu=Hu||{}).TopToBottom="toptobottom",Pu.BottomToTop="bottomtotop";var Oc="data-alloy-vertical-dir",_c=function(t){return Bu(t,function(t){return _r(t)&&Dr(t,Oc)===Hu.BottomToTop})},Tc=function(){return Qn("layouts",[zn("onLtr"),zn("onRtl"),Yn("onBottomLtr"),Yn("onBottomRtl")])},Ec=function(n,t,e,o,r,i,u){var a=u.map(_c).getOr(!1),c=t.layouts.map(function(t){return t.onLtr(n)}),s=t.layouts.map(function(t){return t.onRtl(n)}),l=a?t.layouts.bind(function(t){return t.onBottomLtr.map(function(t){return t(n)})}).or(c).getOr(r):c.getOr(e),f=a?t.layouts.bind(function(t){return t.onBottomRtl.map(function(t){return t(n)})}).or(s).getOr(i):s.getOr(o);return kc(l,f)(n)},Bc=[zn("hotspot"),Yn("bubble"),Zn("overrides",{}),Tc(),na("placement",function(t,n,e){var o=n.hotspot,r=oc(e,o.element()),i=Ec(t.element(),n,Aa(),Fa(),Ma(),[Ca,ka,Sa,wa,Oa,_a],st.some(n.hotspot.element()));return st.some({anchorBox:r,bubble:n.bubble.getOr(Sc()),overrides:n.overrides,layouts:i,placer:st.none()})})],Dc=[zn("x"),zn("y"),Zn("height",0),Zn("width",0),Zn("bubble",Sc()),Zn("overrides",{}),Tc(),na("placement",function(t,n,e){var o=rc(e,n.x,n.y),r=xu(o.left(),o.top(),n.width,n.height),i=Ec(t.element(),n,Ba(),Da(),Ba(),Da(),st.none());return st.some({anchorBox:r,bubble:n.bubble,overrides:n.overrides,layouts:i,placer:st.none()})})],Mc=function(t,n,e,o){return{start:at(t),soffset:at(n),finish:at(e),foffset:at(o)}},Ac=wt([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Fc=(Ac.before,Ac.on,Ac.after,function(t){return t.fold(ct,ct,ct)}),Ic=wt([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Rc={domRange:Ic.domRange,relative:Ic.relative,exact:Ic.exact,exactFromRange:function(t){return Ic.exact(t.start(),t.soffset(),t.finish(),t.foffset())},getWin:function(t){var n=t.match({domRange:function(t){return le.fromDom(t.startContainer)},relative:function(t,n){return Fc(t)},exact:function(t,n,e,o){return t}});return sr(n)},range:Mc},Vc=function(t,n,e){var o,r,i=t.document.createRange();return o=i,n.fold(function(t){o.setStartBefore(t.dom())},function(t,n){o.setStart(t.dom(),n)},function(t){o.setStartAfter(t.dom())}),r=i,e.fold(function(t){r.setEndBefore(t.dom())},function(t,n){r.setEnd(t.dom(),n)},function(t){r.setEndAfter(t.dom())}),i},Hc=function(t,n,e,o,r){var i=t.document.createRange();return i.setStart(n.dom(),e),i.setEnd(o.dom(),r),i},Pc=function(t){return{left:at(t.left),top:at(t.top),right:at(t.right),bottom:at(t.bottom),width:at(t.width),height:at(t.height)}},zc=wt([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Nc=function(t,n,e){return n(le.fromDom(e.startContainer),e.startOffset,le.fromDom(e.endContainer),e.endOffset)},Lc=function(t,n){var r,e,o,i=(r=t,n.match({domRange:function(t){return{ltr:at(t),rtl:st.none}},relative:function(t,n){return{ltr:_t(function(){return Vc(r,t,n)}),rtl:_t(function(){return st.some(Vc(r,n,t))})}},exact:function(t,n,e,o){return{ltr:_t(function(){return Hc(r,t,n,e,o)}),rtl:_t(function(){return st.some(Hc(r,e,o,t,n))})}}}));return(o=(e=i).ltr()).collapsed?e.rtl().filter(function(t){return!1===t.collapsed}).map(function(t){return zc.rtl(le.fromDom(t.endContainer),t.endOffset,le.fromDom(t.startContainer),t.startOffset)}).getOrThunk(function(){return Nc(0,zc.ltr,o)}):Nc(0,zc.ltr,o)};zc.ltr,zc.rtl;var jc=function PF(e,o){var n=function(t){return e(t)?st.from(t.dom().nodeValue):st.none()};return{get:function(t){if(!e(t))throw new Error("Can only get "+o+" value of a "+o+" node");return n(t).getOr("")},getOption:n,set:function(t,n){if(!e(t))throw new Error("Can only set raw "+o+" value of a "+o+" node");t.dom().nodeValue=n}}}(Tr,"text"),Uc=function(t){return jc.getOption(t)},Wc=["img","br"],Gc=function(t){return Uc(t).filter(function(t){return 0!==t.trim().length||-1<t.indexOf("\xa0")}).isSome()||F(Wc,Cr(t))},Xc=function(t,i){var u=function(t){for(var n=dr(t),e=n.length-1;0<=e;e--){var o=n[e];if(i(o))return st.some(o);var r=u(o);if(r.isSome())return r}return st.none()};return u(t)},Yc=function(t,n){return e=n,r=(o=t)===undefined?nt.document:o.dom(),Ne(r)?[]:V(r.querySelectorAll(e),le.fromDom);var e,o,r},qc=function(t,n,e,o){var r,i,u,a,c,s=(i=n,u=e,a=o,(c=ar(r=t).dom().createRange()).setStart(r.dom(),i),c.setEnd(u.dom(),a),c),l=Le(t,e)&&n===o;return s.collapsed&&!l},Kc=function(t){var n=le.fromDom(t.anchorNode),e=le.fromDom(t.focusNode);return qc(n,t.anchorOffset,e,t.focusOffset)?st.some(Mc(n,t.anchorOffset,e,t.focusOffset)):function(t){if(0<t.rangeCount){var n=t.getRangeAt(0),e=t.getRangeAt(t.rangeCount-1);return st.some(Mc(le.fromDom(n.startContainer),n.startOffset,le.fromDom(e.endContainer),e.endOffset))}return st.none()}(t)},Jc=function(t,n){var i,e,o,r,u=Lc(i=t,n).match({ltr:function(t,n,e,o){var r=i.document.createRange();return r.setStart(t.dom(),n),r.setEnd(e.dom(),o),r},rtl:function(t,n,e,o){var r=i.document.createRange();return r.setStart(e.dom(),o),r.setEnd(t.dom(),n),r}});return o=(e=u).getClientRects(),0<(r=0<o.length?o[0]:e.getBoundingClientRect()).width||0<r.height?st.some(r).map(Pc):st.none()},$c=function(t,n){return{element:t,offset:n}},Qc=function(t,n){var e=dr(t);if(0===e.length)return $c(t,n);if(n<e.length)return $c(e[n],0);var o,r=e[e.length-1],i=Tr(r)?(o=r,jc.get(o).length):dr(r).length;return $c(r,i)},Zc=wt([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),ts=function(t){return t.fold(ct,function(t,n,e){return t.translate(-n,-e)})},ns=function(t){return t.fold(ct,ct)},es=function(t){return N(t,function(t,n){return t.translate(n.left(),n.top())},ou(0,0))},os=function(t){var n=V(t,ns);return es(n)},rs=Zc.screen,is=Zc.absolute,us=function(t,n,e){var o,r,i=ar(t.element()),u=mu(i),a=(o=t,r=sr(e.root).dom(),st.from(r.frameElement).map(le.fromDom).filter(function(t){var n=ar(t),e=ar(o.element());return Le(n,e)}).map(iu).getOr(u));return is(a,u.left(),u.top())},as=function(t,n,e,o){var r=t,i=n,u=e,a=o;t<0&&(r=0,u=e+t),n<0&&(i=0,a=o+n);var c=rs(ou(r,i));return st.some({point:c,width:u,height:a})},cs=function(t,l,f,d,m){return t.map(function(t){var n,e,o,r=[l,t.point],i=(n=function(){return os(r)},e=function(){return os(r)},o=function(){return t=V(r,ts),es(t);var t},d.fold(n,e,o)),u={x:i.left(),y:i.top(),width:t.width,height:t.height},a=(f.showAbove?Ma:Aa)(),c=(f.showAbove,Fa()),s=Ec(m,f,a,c,a,c,st.none());return{anchorBox:u,bubble:f.bubble.getOr(Sc()),overrides:f.overrides,layouts:s,placer:st.none()}})},ss=function(t,n){return Tr(t)?{element:t,offset:n}:Qc(t,n)},ls=function(n,t){return t.getSelection.getOrThunk(function(){return function(){return t=n,st.from(t.getSelection()).filter(function(t){return 0<t.rangeCount}).bind(Kc);var t}})().map(function(t){var n=ss(t.start(),t.soffset()),e=ss(t.finish(),t.foffset());return Rc.range(n.element,n.offset,e.element,e.offset)})},fs=[Yn("getSelection"),zn("root"),Yn("bubble"),Tc(),Zn("overrides",{}),Zn("showAbove",!1),na("placement",function(t,n,e){var o=sr(n.root).dom(),r=us(t,0,n),i=ls(o,n).bind(function(t){return Jc(o,Rc.exactFromRange(t)).orThunk(function(){var n=le.fromText("\ufeff");return gr(t.start(),n),Jc(o,Rc.exact(n,0,n,1)).map(function(t){return xr(n),t})}).bind(function(t){return as(t.left(),t.top(),t.width(),t.height())})}),u=ls(o,n).bind(function(t){return _r(t.start())?st.some(t.start()):lr(t.start())}).getOr(t.element());return cs(i,r,n,e,u)})],ds=[zn("node"),zn("root"),Yn("bubble"),Tc(),Zn("overrides",{}),Zn("showAbove",!1),na("placement",function(r,i,u){var a=us(r,0,i);return i.node.bind(function(t){var n=t.dom().getBoundingClientRect(),e=as(n.left,n.top,n.width,n.height),o=i.node.getOr(r.element());return cs(e,a,i,u,o)})})],ms=function(t){return t.x+t.width},gs=function(t,n){return t.x-n.width},ps=function(t,n){return t.y-n.height+t.height},hs=function(t){return t.y},vs=function(t,n,e){return ra(ms(t),hs(t),e.southeast(),ua(),ga(t,{left:0,top:2}),"link-layout-se")},bs=function(t,n,e){return ra(gs(t,n),hs(t),e.southwest(),aa(),ga(t,{right:1,top:2}),"link-layout-sw")},ys=function(t,n,e){return ra(ms(t),ps(t,n),e.northeast(),ca(),ga(t,{left:0,bottom:3}),"link-layout-ne")},xs=function(t,n,e){return ra(gs(t,n),ps(t,n),e.northwest(),sa(),ga(t,{right:1,bottom:3}),"link-layout-nw")},ws=function(){return[vs,bs,ys,xs]},Ss=function(){return[bs,vs,xs,ys]},ks=[zn("item"),Tc(),Zn("overrides",{}),na("placement",function(t,n,e){var o=oc(e,n.item.element()),r=Ec(t.element(),n,ws(),Ss(),ws(),Ss(),st.none());return st.some({anchorBox:o,bubble:Sc(),overrides:n.overrides,layouts:r,placer:st.none()})})],Cs=Bn("anchor",{selection:fs,node:ds,hotspot:Bc,submenu:ks,makeshift:Dc}),Os=function(t,n,e,o,r){var i=ac(e.anchorBox,n);bc(i,r.element(),e.bubble,e.layouts,o,e.overrides)},_s=function(t,n,e,o,r,i){var u=i.map(wu);return Ts(t,n,e,o,r,u)},Ts=function(c,s,t,n,l,f){var d=_n("positioning anchor.info",Cs,n);Qa(function(){Di(l.element(),"position","fixed");var t=Ri(l.element(),"visibility");Di(l.element(),"visibility","hidden");var n,e,o,r,i=s.useFixed()?(r=nt.document.documentElement,uc(0,0,r.clientWidth,r.clientHeight)):(e=iu((n=c).element()),o=n.element().dom().getBoundingClientRect(),ic(e.left(),e.top(),o.width,o.height)),u=d.placement,a=f.map(at).or(s.getBounds);u(c,d,i).each(function(t){t.placer.getOr(Os)(c,i,t,a,l)}),t.fold(function(){Hi(l.element(),"visibility")},function(t){Di(l.element(),"visibility",t)}),Ri(l.element(),"left").isNone()&&Ri(l.element(),"top").isNone()&&Ri(l.element(),"right").isNone()&&Ri(l.element(),"bottom").isNone()&&Ri(l.element(),"position").is("fixed")&&Hi(l.element(),"position")},l.element())},Es=/* */Object.freeze({__proto__:null,position:function(t,n,e,o,r){_s(t,n,e,o,r,st.none())},positionWithin:_s,positionWithinBounds:Ts,getMode:function(t,n,e){return n.useFixed()?"fixed":"absolute"}}),Bs=[Zn("useFixed",c),Yn("getBounds")],Ds=La({fields:Bs,name:"positioning",active:qa,apis:Es}),Ms=function(t){Lo(t,Ao());var n=t.components();it(n,Ms)},As=function(t){var n=t.components();it(n,As),Lo(t,Mo())},Fs=function(t,n){vr(t.element(),n.element())},Is=function(n,t){var e,o=n.components();it((e=n).components(),function(t){return xr(t.element())}),yr(e.element()),e.syncComponents();var r=X(o,t);it(r,function(t){Ms(t),n.getSystem().removeFromWorld(t)}),it(t,function(t){t.getSystem().isConnected()?Fs(n,t):(n.getSystem().addToWorld(t),Fs(n,t),Oi(n.element())&&As(t)),n.syncComponents()})},Rs=function(t,n){Vs(t,n,vr)},Vs=function(t,n,e){t.getSystem().addToWorld(n),e(t.element(),n.element()),Oi(t.element())&&As(n),t.syncComponents()},Hs=function(t){Ms(t),xr(t.element()),t.getSystem().removeFromWorld(t)},Ps=function(n){var t=lr(n.element()).bind(function(t){return n.getSystem().getByDom(t).toOption()});Hs(n),t.each(function(t){t.syncComponents()})},zs=function(t){var n=t.components();it(n,Hs),yr(t.element()),t.syncComponents()},Ns=function(t,n){Ls(t,n,vr)},Ls=function(t,n,e){e(t,n.element());var o=dr(n.element());it(o,function(t){n.getByDom(t).each(As)})},js=function(n){var t=dr(n.element());it(t,function(t){n.getByDom(t).each(Ms)}),xr(n.element())},Us=function(n,t,e,o){e.get().each(function(t){zs(n)});var r=t.getAttachPoint(n);Rs(r,n);var i=n.getSystem().build(o);return Rs(n,i),e.set(i),i},Ws=function(t,n,e,o){var r=Us(t,n,e,o);return n.onOpen(t,r),r},Gs=function(n,e,o){o.get().each(function(t){zs(n),Ps(n),e.onClose(n,t),o.clear()})},Xs=function(t,n,e){return e.isOpen()},Ys=function(t,n,e){var o,r,i,u,a=n.getAttachPoint(t);Di(t.element(),"position",Ds.getMode(a)),o=t,r="visibility",i=n.cloakVisibilityAttr,u="hidden",Ri(o.element(),r).fold(function(){Fr(o.element(),i)},function(t){Br(o.element(),i,t)}),Di(o.element(),r,u)},qs=function(t,n,e){var o,r,i,u;o=t.element(),I(["top","left","right","bottom"],function(t){return Ri(o,t).isSome()})||Hi(t.element(),"position"),r=t,i="visibility",u=n.cloakVisibilityAttr,Mr(r.element(),u).fold(function(){return Hi(r.element(),i)},function(t){return Di(r.element(),i,t)})},Ks=/* */Object.freeze({__proto__:null,cloak:Ys,decloak:qs,open:Ws,openWhileCloaked:function(t,n,e,o,r){Ys(t,n),Ws(t,n,e,o),r(),qs(t,n)},close:Gs,isOpen:Xs,isPartOf:function(n,e,t,o){return Xs(0,0,t)&&t.get().exists(function(t){return e.isPartOf(n,t,o)})},getState:function(t,n,e){return e.get()},setContent:function(t,n,e,o){return e.get().map(function(){return Us(t,n,e,o)})}}),Js=/* */Object.freeze({__proto__:null,events:function(e,o){return Yo([Jo(Co(),function(t,n){Gs(t,e,o)})])}}),$s=[$u("onOpen"),$u("onClose"),zn("isPartOf"),zn("getAttachPoint"),Zn("cloakVisibilityAttr","data-precloak-visibility")],Qs=La({fields:$s,name:"sandboxing",active:Js,apis:Ks,state:/* */Object.freeze({__proto__:null,init:function(){var n=ce(st.none()),t=at("not-implemented");return oi({readState:t,isOpen:function(){return n.get().isSome()},clear:function(){n.set(st.none())},set:function(t){n.set(st.some(t))},get:function(){return n.get()}})}})}),Zs=at("dismiss.popups"),tl=at("reposition.popups"),nl=at("mouse.released"),el=sn([Zn("isExtraPart",at(!1)),Qn("fireEventInstead",[Zn("event",Fo())])]),ol=function(t){var n,e=_n("Dismissal",el,t);return(n={})[Zs()]={schema:sn([zn("target")]),onReceive:function(n,t){Qs.isOpen(n)&&(Qs.isPartOf(n,t.target)||e.isExtraPart(n,t.target)||e.fireEventInstead.fold(function(){return Qs.close(n)},function(t){return Lo(n,t.event)}))}},n},rl=sn([Qn("fireEventInstead",[Zn("event",Io())]),Un("doReposition")]),il=function(t){var n,e=_n("Reposition",rl,t);return(n={})[tl()]={onReceive:function(n){Qs.isOpen(n)&&e.fireEventInstead.fold(function(){return e.doReposition(n)},function(t){return Lo(n,t.event)})}},n},ul=function(t,n,e){n.store.manager.onLoad(t,n,e)},al=function(t,n,e){n.store.manager.onUnload(t,n,e)},cl=/* */Object.freeze({__proto__:null,onLoad:ul,onUnload:al,setValue:function(t,n,e,o){n.store.manager.setValue(t,n,e,o)},getValue:function(t,n,e){return n.store.manager.getValue(t,n,e)},getState:function(t,n,e){return e}}),sl=/* */Object.freeze({__proto__:null,events:function(e,o){var t=e.resetOnDom?[or(function(t,n){ul(t,e,o)}),rr(function(t,n){al(t,e,o)})]:[Ia(e,o,ul)];return Yo(t)}}),ll=function(){var t=ce(null);return oi({set:t.set,get:t.get,isNotSet:function(){return null===t.get()},clear:function(){t.set(null)},readState:function(){return{mode:"memory",value:t.get()}}})},fl=function(){var i=ce({}),u=ce({});return oi({readState:function(){return{mode:"dataset",dataByValue:i.get(),dataByText:u.get()}},lookup:function(t){return bt(i.get(),t).orThunk(function(){return bt(u.get(),t)})},update:function(t){var n=i.get(),e=u.get(),o={},r={};it(t,function(n){o[n.value]=n,bt(n,"meta").each(function(t){bt(t,"text").each(function(t){r[t]=n})})}),i.set(et(et({},n),o)),u.set(et(et({},e),r))},clear:function(){i.set({}),u.set({})}})},dl=/* */Object.freeze({__proto__:null,memory:ll,dataset:fl,manual:function(){return oi({readState:function(){}})},init:function(t){return t.store.manager.state(t)}}),ml=function(t,n,e,o){var r=n.store;e.update([o]),r.setValue(t,o),n.onSetValue(t,o)},gl=[Yn("initialValue"),zn("getFallbackEntry"),zn("getDataKey"),zn("setValue"),na("manager",{setValue:ml,getValue:function(t,n,e){var o=n.store,r=o.getDataKey(t);return e.lookup(r).fold(function(){return o.getFallbackEntry(r)},function(t){return t})},onLoad:function(n,e,o){e.store.initialValue.each(function(t){ml(n,e,o,t)})},onUnload:function(t,n,e){e.clear()},state:fl})],pl=[zn("getValue"),Zn("setValue",Z),Yn("initialValue"),na("manager",{setValue:function(t,n,e,o){n.store.setValue(t,o),n.onSetValue(t,o)},getValue:function(t,n,e){return n.store.getValue(t)},onLoad:function(n,e,t){e.store.initialValue.each(function(t){e.store.setValue(n,t)})},onUnload:Z,state:ei.init})],hl=[Yn("initialValue"),na("manager",{setValue:function(t,n,e,o){e.set(o),n.onSetValue(t,o)},getValue:function(t,n,e){return e.get()},onLoad:function(t,n,e){n.store.initialValue.each(function(t){e.isNotSet()&&e.set(t)})},onUnload:function(t,n,e){e.clear()},state:ll})],vl=[te("store",{mode:"memory"},Bn("mode",{memory:hl,manual:pl,dataset:gl})),$u("onSetValue"),Zn("resetOnDom",!1)],bl=La({fields:vl,name:"representing",active:sl,apis:cl,extra:{setValueFrom:function(t,n){var e=bl.getValue(n);bl.setValue(t,e)}},state:dl}),yl=function(o,t){return ue(o,{},V(t,function(t){return n=t.name(),e="Cannot configure "+t.name()+" for "+o,hn(n,n,Wt(),cn(function(t){return Vt("The field: "+n+" is forbidden. "+e)}));var n,e}).concat([ae("dump",ct)]))},xl=function(t){return t.dump},wl=function(t,n){return et(et({},t.dump),za(n))},Sl=yl,kl=wl,Cl="placeholder",Ol=wt([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),_l=function(t){return yt(t,"uiType")},Tl=function(t,n,e,o){return _l(e)&&e.uiType===Cl?(i=e,u=o,(r=t).exists(function(t){return t!==i.owner})?Ol.single(!0,at(i)):bt(u,i.name).fold(function(){throw new Error("Unknown placeholder component: "+i.name+"\nKnown: ["+lt(u)+"]\nNamespace: "+r.getOr("none")+"\nSpec: "+JSON.stringify(i,null,2))},function(t){return t.replace()})):Ol.single(!1,at(e));var r,i,u},El=function(i,u,a,c){return Tl(i,0,a,c).fold(function(t,n){var e=_l(a)?n(u,a.config,a.validated):n(u),o=bt(e,"components").getOr([]),r=U(o,function(t){return El(i,u,t,c)});return[et(et({},e),{components:r})]},function(t,n){if(_l(a)){var e=n(u,a.config,a.validated);return a.validated.preprocess.getOr(ct)(e)}return n(u)})},Bl=function(n,e,t,o){var r,i,u,a=dt(o,function(t,n){return o=t,r=!1,{name:at(e=n),required:function(){return o.fold(function(t,n){return t},function(t,n){return t})},used:function(){return r},replace:function(){if(r)throw new Error("Trying to use the same placeholder more than once: "+e);return r=!0,o}};var e,o,r}),c=(r=n,i=e,u=a,U(t,function(t){return El(r,i,t,u)}));return ft(a,function(t){if(!1===t.used()&&t.required())throw new Error("Placeholder: "+t.name()+" was not found in components list\nNamespace: "+n.getOr("none")+"\nComponents: "+JSON.stringify(e.components,null,2))}),c},Dl=Ol.single,Ml=Ol.multiple,Al=at(Cl),Fl=wt([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),Il=Zn("factory",{sketch:ct}),Rl=Zn("schema",[]),Vl=zn("name"),Hl=hn("pname","pname",Gt(function(t){return"<alloy."+Nr(t.name)+">"}),Dn()),Pl=ae("schema",function(){return[Yn("preprocess")]}),zl=Zn("defaults",at({})),Nl=Zn("overrides",at({})),Ll=ln([Il,Rl,Vl,Hl,zl,Nl]),jl=ln([Il,Rl,Vl,zl,Nl]),Ul=ln([Il,Rl,Vl,Hl,zl,Nl]),Wl=ln([Il,Pl,Vl,zn("unit"),Hl,zl,Nl]),Gl=function(t){return t.fold(st.some,st.none,st.some,st.some)},Xl=function(t){var n=function(t){return t.name};return t.fold(n,n,n,n)},Yl=function(e,o){return function(t){var n=_n("Converting part type",o,t);return e(n)}},ql=Yl(Fl.required,Ll),Kl=Yl(Fl.external,jl),Jl=Yl(Fl.optional,Ul),$l=Yl(Fl.group,Wl),Ql=at("entirety"),Zl=/* */Object.freeze({__proto__:null,required:ql,external:Kl,optional:Jl,group:$l,asNamedPart:Gl,name:Xl,asCommon:function(t){return t.fold(ct,ct,ct,ct)},original:Ql}),tf=function(t,n,e,o){return Ct(n.defaults(t,e,o),e,{uid:t.partUids[n.name]},n.overrides(t,e,o))},nf=function(r,t){var n={};return it(t,function(t){Gl(t).each(function(e){var o=ef(r,e.pname);n[e.name]=function(t){var n=_n("Part: "+e.name+" in "+r,ln(e.schema),t);return et(et({},o),{config:t,validated:n})}})}),n},ef=function(t,n){return{uiType:Al(),owner:t,name:n}},of=function(t,n,e){return{uiType:Al(),owner:t,name:n,config:e,validated:{}}},rf=function(t){return U(t,function(t){return t.fold(st.none,st.some,st.none,st.none).map(function(t){return Wn(t.name,t.schema.concat([ea(Ql())]))}).toArray()})},uf=function(t){return V(t,Xl)},af=function(t,n,e){return o=n,i={},r={},it(e,function(t){t.fold(function(o){i[o.pname]=Dl(!0,function(t,n,e){return o.factory.sketch(tf(t,o,n,e))})},function(t){var n=o.parts[t.name];r[t.name]=at(t.factory.sketch(tf(o,t,n[Ql()]),n))},function(o){i[o.pname]=Dl(!1,function(t,n,e){return o.factory.sketch(tf(t,o,n,e))})},function(r){i[r.pname]=Ml(!0,function(n,t,e){var o=n[r.name];return V(o,function(t){return r.factory.sketch(Ct(r.defaults(n,t,e),t,r.overrides(n,t)))})})})}),{internals:at(i),externals:at(r)};var o,i,r},cf=function(t,n,e){return Bl(st.some(t),n,n.components,e)},sf=function(t,n,e){var o=n.partUids[e];return t.getSystem().getByUid(o).toOption()},lf=function(t,n,e){return sf(t,n,e).getOrDie("Could not find part: "+e)},ff=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return it(e,function(t){o[t]=at(i.getByUid(r[t]))}),o},df=function(t,n){var e=t.getSystem();return dt(n.partUids,function(t,n){return at(e.getByUid(t))})},mf=function(t){return lt(t.partUids)},gf=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return it(e,function(t){o[t]=at(i.getByUid(r[t]).getOrDie())}),o},pf=function(n,t){var e=uf(t);return Jt(V(e,function(t){return{key:t,value:n+"-"+t}}))},hf=function(n){return hn("partUids","partUids",Xt(function(t){return pf(t.uid,n)}),Dn())},vf=/* */Object.freeze({__proto__:null,generate:nf,generateOne:of,schemas:rf,names:uf,substitutes:af,components:cf,defaultUids:pf,defaultUidsSchema:hf,getAllParts:df,getAllPartNames:mf,getPart:sf,getPartOrDie:lf,getParts:ff,getPartsOrDie:gf}),bf=function(t,n,e,o,r){var i,u,a=(u=r,(0<(i=o).length?[Wn("parts",i)]:[]).concat([zn("uid"),Zn("dom",{}),Zn("components",[]),ea("originalSpec"),Zn("debug.sketcher",{})]).concat(u));return _n(t+" [SpecSchema]",sn(a.concat(n)),e)},yf=function(t,n,e,o,r){var i=xf(r),u=rf(e),a=hf(e),c=bf(t,n,i,u,[a]),s=af(0,c,e);return o(c,cf(t,c,s.internals()),i,s.externals())},xf=function(t){return yt(t,"uid")?t:et(et({},t),{uid:Yr("uid")})};var wf,Sf,kf=sn([zn("name"),zn("factory"),zn("configFields"),Zn("apis",{}),Zn("extraApis",{})]),Cf=sn([zn("name"),zn("factory"),zn("configFields"),zn("partFields"),Zn("apis",{}),Zn("extraApis",{})]),Of=function(t){var i=_n("Sketcher for "+t.name,kf,t),n=dt(i.apis,ni),e=dt(i.extraApis,function(t,n){return Qr(t,n)});return et(et({name:at(i.name),configFields:at(i.configFields),sketch:function(t){return n=i.name,e=i.configFields,o=i.factory,r=xf(t),o(bf(n,e,r,[],[]),r);var n,e,o,r}},n),e)},_f=function(t){var n=_n("Sketcher for "+t.name,Cf,t),e=nf(n.name,n.partFields),o=dt(n.apis,ni),r=dt(n.extraApis,function(t,n){return Qr(t,n)});return et(et({name:at(n.name),partFields:at(n.partFields),configFields:at(n.configFields),sketch:function(t){return yf(n.name,n.configFields,n.partFields,n.factory,t)},parts:at(e)},o),r)},Tf=function(t){for(var n=[],e=function(t){n.push(t)},o=0;o<t.length;o++)t[o].each(e);return n},Ef=function(t){return"input"===Cr(t)&&"radio"!==Dr(t,"type")||"textarea"===Cr(t)},Bf=/* */Object.freeze({__proto__:null,getCurrent:function(t,n,e){return n.find(t)}}),Df=[zn("find")],Mf=La({fields:Df,name:"composing",apis:Bf}),Af=function(e,o,t,r){var n=Yc(e.element(),"."+o.highlightClass);it(n,function(n){I(r,function(t){return t.element()===n})||(xi(n,o.highlightClass),e.getSystem().getByDom(n).each(function(t){o.onDehighlight(e,t),Lo(t,No())}))})},Ff=function(t,n,e,o){Af(t,n,0,[o]),If(t,n,e,o)||(bi(o.element(),n.highlightClass),n.onHighlight(t,o),Lo(o,zo()))},If=function(t,n,e,o){return wi(o.element(),n.highlightClass)},Rf=function(t,n,e,o){var r=Yc(t.element(),"."+n.itemClass);return st.from(r[o]).fold(function(){return ot.error("No element found with index "+o)},t.getSystem().getByDom)},Vf=function(n,t,e){return Mu(n.element(),"."+t.itemClass).bind(function(t){return n.getSystem().getByDom(t).toOption()})},Hf=function(n,t,e){var o=Yc(n.element(),"."+t.itemClass);return(0<o.length?st.some(o[o.length-1]):st.none()).bind(function(t){return n.getSystem().getByDom(t).toOption()})},Pf=function(e,n,t,o){var r=Yc(e.element(),"."+n.itemClass);return j(r,function(t){return wi(t,n.highlightClass)}).bind(function(t){var n=cc(t,o,0,r.length-1);return e.getSystem().getByDom(r[n]).toOption()})},zf=function(n,t,e){var o=Yc(n.element(),"."+t.itemClass);return Tf(V(o,function(t){return n.getSystem().getByDom(t).toOption()}))},Nf=/* */Object.freeze({__proto__:null,dehighlightAll:function(t,n,e){return Af(t,n,0,[])},dehighlight:function(t,n,e,o){If(t,n,e,o)&&(xi(o.element(),n.highlightClass),n.onDehighlight(t,o),Lo(o,No()))},highlight:Ff,highlightFirst:function(n,e,o){Vf(n,e).each(function(t){Ff(n,e,o,t)})},highlightLast:function(n,e,o){Hf(n,e).each(function(t){Ff(n,e,o,t)})},highlightAt:function(n,e,o,t){Rf(n,e,o,t).fold(function(t){throw new Error(t)},function(t){Ff(n,e,o,t)})},highlightBy:function(n,e,o,t){var r=zf(n,e);L(r,t).each(function(t){Ff(n,e,o,t)})},isHighlighted:If,getHighlighted:function(n,t,e){return Mu(n.element(),"."+t.highlightClass).bind(function(t){return n.getSystem().getByDom(t).toOption()})},getFirst:Vf,getLast:Hf,getPrevious:function(t,n,e){return Pf(t,n,0,-1)},getNext:function(t,n,e){return Pf(t,n,0,1)},getCandidates:zf}),Lf=[zn("highlightClass"),zn("itemClass"),$u("onHighlight"),$u("onDehighlight")],jf=La({fields:Lf,name:"highlighting",apis:Nf}),Uf=function(){return[13]},Wf=function(){return[27]},Gf=function(){return[32]},Xf=function(){return[37]},Yf=function(){return[38]},qf=function(){return[39]},Kf=function(){return[40]},Jf=function(t,n,e){var o=G(t.slice(0,n)),r=G(t.slice(n+1));return L(o.concat(r),e)},$f=function(t,n,e){var o=G(t.slice(0,n));return L(o,e)},Qf=function(t,n,e){var o=t.slice(0,n),r=t.slice(n+1);return L(r.concat(o),e)},Zf=function(t,n,e){var o=t.slice(n+1);return L(o,e)},td=function(e){return function(t){var n=t.raw();return F(e,n.which)}},nd=function(t){return function(n){return W(t,function(t){return t(n)})}},ed=function(t){return!0===t.raw().shiftKey},od=function(t){return!0===t.raw().ctrlKey},rd=x(ed),id=function(t,n){return{matches:t,classification:n}},ud=function(t,n,e){n.exists(function(n){return e.exists(function(t){return Le(t,n)})})||jo(t,Ro(),{prevFocus:n,newFocus:e})},ad=function(){var r=function(t){return $a(t.element())};return{get:r,set:function(t,n){var e=r(t);t.getSystem().triggerFocus(n,t.element());var o=r(t);ud(t,e,o)}}},cd=function(){var r=function(t){return jf.getHighlighted(t).map(function(t){return t.element()})};return{get:r,set:function(n,t){var e=r(n);n.getSystem().getByDom(t).fold(Z,function(t){jf.highlight(n,t)});var o=r(n);ud(n,e,o)}}};(Sf=wf=wf||{}).OnFocusMode="onFocus",Sf.OnEnterOrSpaceMode="onEnterOrSpace",Sf.OnApiMode="onApi";var sd,ld=function(t,n,e,o,a){var c=function(n,e,t,o,r){var i,u,a=t(n,e,o,r);return i=a,u=e.event(),L(i,function(t){return t.matches(u)}).map(function(t){return t.classification}).bind(function(t){return t(n,e,o,r)})},r={schema:function(){return t.concat([Zn("focusManager",ad()),te("focusInside","onFocus",Sn(function(t){return F(["onFocus","onEnterOrSpace","onApi"],t)?ot.value(t):ot.error("Invalid value for focusInside")})),na("handler",r),na("state",n),na("sendFocusIn",a)])},processKey:c,toEvents:function(i,u){var t=i.focusInside!==wf.OnFocusMode?st.none():a(i).map(function(e){return Jo(ho(),function(t,n){e(t,i,u),n.stop()})}),n=[Jo(ao(),function(o,r){c(o,r,e,i,u).fold(function(){var n,e,t;n=o,e=r,t=td(Gf().concat(Uf()))(e.event()),i.focusInside===wf.OnEnterOrSpaceMode&&t&&Ye(n,e)&&a(i).each(function(t){t(n,i,u),e.stop()})},function(t){r.stop()})}),Jo(co(),function(t,n){c(t,n,o,i,u).each(function(t){n.stop()})})];return Yo(t.toArray().concat(n))}};return r},fd=function(t){var n=[Yn("onEscape"),Yn("onEnter"),Zn("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Zn("firstTabstop",0),Zn("useTabstopAt",at(!0)),Yn("visibilitySelector")].concat([t]),u=function(t,n){var e=t.visibilitySelector.bind(function(t){return Au(n,t)}).getOr(n);return 0<tu(e)},e=function(n,e,t){var o,r,i;o=e,r=Yc(n.element(),o.selector),i=P(r,function(t){return u(o,t)}),st.from(i[o.firstTabstop]).each(function(t){e.focusManager.set(n,t)})},a=function(n,t,e,o,r){return r(t,e,function(t){return u(n=o,e=t)&&n.useTabstopAt(e);var n,e}).fold(function(){return o.cyclic?st.some(!0):st.none()},function(t){return o.focusManager.set(n,t),st.some(!0)})},r=function(n,t,e,o){var r,i,u=Yc(n.element(),e.selector);return r=n,(i=e).focusManager.get(r).bind(function(t){return Au(t,i.selector)}).bind(function(t){return j(u,g(Le,t)).bind(function(t){return a(n,u,t,e,o)})})},o=at([id(nd([ed,td([9])]),function(t,n,e){var o=e.cyclic?Jf:$f;return r(t,0,e,o)}),id(td([9]),function(t,n,e){var o=e.cyclic?Qf:Zf;return r(t,0,e,o)}),id(td(Wf()),function(n,e,t){return t.onEscape.bind(function(t){return t(n,e)})}),id(nd([rd,td(Uf())]),function(n,e,t){return t.onEnter.bind(function(t){return t(n,e)})})]),i=at([]);return ld(n,ei.init,o,i,function(){return st.some(e)})},dd=fd(ae("cyclic",at(!1))),md=fd(ae("cyclic",at(!0))),gd=function(t,n,e){return Ef(e)&&td(Gf())(n.event())?st.none():(Wo(t,e,xo()),st.some(!0))},pd=function(t,n){return st.some(!0)},hd=[Zn("execute",gd),Zn("useSpace",!1),Zn("useEnter",!0),Zn("useControlEnter",!1),Zn("useDown",!1)],vd=function(t,n,e){return e.execute(t,n,t.element())},bd=ld(hd,ei.init,function(t,n,e,o){var r=e.useSpace&&!Ef(t.element())?Gf():[],i=e.useEnter?Uf():[],u=e.useDown?Kf():[],a=r.concat(i).concat(u);return[id(td(a),vd)].concat(e.useControlEnter?[id(nd([od,td(Uf())]),vd)]:[])},function(t,n,e,o){return e.useSpace&&!Ef(t.element())?[id(td(Gf()),pd)]:[]},function(){return st.none()}),yd=function(){var e=ce(st.none());return oi({readState:function(){return e.get().map(function(t){return{numRows:String(t.numRows),numColumns:String(t.numColumns)}}).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(t,n){e.set(st.some({numRows:t,numColumns:n}))},getNumRows:function(){return e.get().map(function(t){return t.numRows})},getNumColumns:function(){return e.get().map(function(t){return t.numColumns})}})},xd=/* */Object.freeze({__proto__:null,flatgrid:yd,init:function(t){return t.state(t)}}),wd=function(i){return function(t,n,e,o){var r=i(t.element());return Od(r,t,n,e,o)}},Sd=function(t,n){var e=kc(t,n);return wd(e)},kd=function(t,n){var e=kc(n,t);return wd(e)},Cd=function(r){return function(t,n,e,o){return Od(r,t,n,e,o)}},Od=function(n,e,t,o,r){return o.focusManager.get(e).bind(function(t){return n(e.element(),t,o,r)}).map(function(t){return o.focusManager.set(e,t),!0})},_d=Cd,Td=Cd,Ed=Cd,Bd=function(t){return!((n=t.dom()).offsetWidth<=0&&n.offsetHeight<=0);var n},Dd=function(t,n,e){var o,r=Yc(t,e),i=P(r,Bd);return j(o=i,function(t){return Le(t,n)}).map(function(t){return{index:at(t),candidates:at(o)}})},Md=function(t,n){return j(t,function(t){return Le(n,t)})},Ad=function(e,t,o,n){return n(Math.floor(t/o),t%o).bind(function(t){var n=t.row()*o+t.column();return 0<=n&&n<e.length?st.some(e[n]):st.none()})},Fd=function(r,t,i,u,a){return Ad(r,t,u,function(t,n){var e=t===i-1?r.length-t*u:u,o=cc(n,a,0,e-1);return st.some({row:at(t),column:at(o)})})},Id=function(i,t,u,a,c){return Ad(i,t,a,function(t,n){var e=cc(t,c,0,u-1),o=e===u-1?i.length-e*a:a,r=sc(n,0,o-1);return st.some({row:at(e),column:at(r)})})},Rd=[zn("selector"),Zn("execute",gd),Qu("onEscape"),Zn("captureTab",!1),oa()],Vd=function(n,e,t){Mu(n.element(),e.selector).each(function(t){e.focusManager.set(n,t)})},Hd=function(r){return function(t,n,e,o){return Dd(t,n,e.selector).bind(function(t){return r(t.candidates(),t.index(),o.getNumRows().getOr(e.initSize.numRows),o.getNumColumns().getOr(e.initSize.numColumns))})}},Pd=function(t,n,e){return e.captureTab?st.some(!0):st.none()},zd=Hd(function(t,n,e,o){return Fd(t,n,e,o,-1)}),Nd=Hd(function(t,n,e,o){return Fd(t,n,e,o,1)}),Ld=Hd(function(t,n,e,o){return Id(t,n,e,o,-1)}),jd=Hd(function(t,n,e,o){return Id(t,n,e,o,1)}),Ud=at([id(td(Xf()),Sd(zd,Nd)),id(td(qf()),kd(zd,Nd)),id(td(Yf()),_d(Ld)),id(td(Kf()),Td(jd)),id(nd([ed,td([9])]),Pd),id(nd([rd,td([9])]),Pd),id(td(Wf()),function(t,n,e){return e.onEscape(t,n)}),id(td(Gf().concat(Uf())),function(n,e,o,t){return r=n,(i=o).focusManager.get(r).bind(function(t){return Au(t,i.selector)}).bind(function(t){return o.execute(n,e,t)});var r,i})]),Wd=at([id(td(Gf()),pd)]),Gd=ld(Rd,yd,Ud,Wd,function(){return st.some(Vd)}),Xd=function(t,n,e,i){var u=function(t,n,e){var o,r=cc(n,i,0,e.length-1);return r===t?st.none():(o=e[r],"button"===Cr(o)&&"disabled"===Dr(o,"disabled")?u(t,r,e):st.from(e[r]))};return Dd(t,e,n).bind(function(t){var n=t.index(),e=t.candidates();return u(n,n,e)})},Yd=[zn("selector"),Zn("getInitial",st.none),Zn("execute",gd),Qu("onEscape"),Zn("executeOnMove",!1),Zn("allowVertical",!0)],qd=function(n,e,o){return t=n,(r=o).focusManager.get(t).bind(function(t){return Au(t,r.selector)}).bind(function(t){return o.execute(n,e,t)});var t,r},Kd=function(n,e,t){e.getInitial(n).orThunk(function(){return Mu(n.element(),e.selector)}).each(function(t){e.focusManager.set(n,t)})},Jd=function(t,n,e){return Xd(t,e.selector,n,-1)},$d=function(t,n,e){return Xd(t,e.selector,n,1)},Qd=function(r){return function(t,n,e,o){return r(t,n,e,o).bind(function(){return e.executeOnMove?qd(t,n,e):st.some(!0)})}},Zd=function(t,n,e){return e.onEscape(t,n)},tm=at([id(td(Gf()),pd)]),nm=ld(Yd,ei.init,function(t,n,e,o){var r=Xf().concat(e.allowVertical?Yf():[]),i=qf().concat(e.allowVertical?Kf():[]);return[id(td(r),Qd(Sd(Jd,$d))),id(td(i),Qd(kd(Jd,$d))),id(td(Uf()),qd),id(td(Gf()),qd),id(td(Wf()),Zd)]},tm,function(){return st.some(Kd)}),em=function(t,n,e){return st.from(t[n]).bind(function(t){return st.from(t[e]).map(function(t){return{rowIndex:n,columnIndex:e,cell:t}})})},om=function(t,n,e,o){var r=t[n].length,i=cc(e,o,0,r-1);return em(t,n,i)},rm=function(t,n,e,o){var r=cc(e,o,0,t.length-1),i=t[r].length,u=sc(n,0,i-1);return em(t,r,u)},im=function(t,n,e,o){var r=t[n].length,i=sc(e+o,0,r-1);return em(t,n,i)},um=function(t,n,e,o){var r=sc(e+o,0,t.length-1),i=t[r].length,u=sc(n,0,i-1);return em(t,r,u)},am=[Wn("selectors",[zn("row"),zn("cell")]),Zn("cycles",!0),Zn("previousSelector",st.none),Zn("execute",gd)],cm=function(n,e,t){e.previousSelector(n).orThunk(function(){var t=e.selectors;return Mu(n.element(),t.cell)}).each(function(t){e.focusManager.set(n,t)})},sm=function(t,n){return function(e,o,i){var u=i.cycles?t:n;return Au(o,i.selectors.row).bind(function(t){var n=Yc(t,i.selectors.cell);return Md(n,o).bind(function(o){var r=Yc(e,i.selectors.row);return Md(r,t).bind(function(t){var n,e=(n=i,V(r,function(t){return Yc(t,n.selectors.cell)}));return u(e,t,o).map(function(t){return t.cell})})})})}},lm=sm(function(t,n,e){return om(t,n,e,-1)},function(t,n,e){return im(t,n,e,-1)}),fm=sm(function(t,n,e){return om(t,n,e,1)},function(t,n,e){return im(t,n,e,1)}),dm=sm(function(t,n,e){return rm(t,e,n,-1)},function(t,n,e){return um(t,e,n,-1)}),mm=sm(function(t,n,e){return rm(t,e,n,1)},function(t,n,e){return um(t,e,n,1)}),gm=at([id(td(Xf()),Sd(lm,fm)),id(td(qf()),kd(lm,fm)),id(td(Yf()),_d(dm)),id(td(Kf()),Td(mm)),id(td(Gf().concat(Uf())),function(n,e,o){return $a(n.element()).bind(function(t){return o.execute(n,e,t)})})]),pm=at([id(td(Gf()),pd)]),hm=ld(am,ei.init,gm,pm,function(){return st.some(cm)}),vm=[zn("selector"),Zn("execute",gd),Zn("moveOnTab",!1)],bm=function(n,e,o){return o.focusManager.get(n).bind(function(t){return o.execute(n,e,t)})},ym=function(n,e,t){Mu(n.element(),e.selector).each(function(t){e.focusManager.set(n,t)})},xm=function(t,n,e){return Xd(t,e.selector,n,-1)},wm=function(t,n,e){return Xd(t,e.selector,n,1)},Sm=at([id(td(Yf()),Ed(xm)),id(td(Kf()),Ed(wm)),id(nd([ed,td([9])]),function(t,n,e,o){return e.moveOnTab?Ed(xm)(t,n,e,o):st.none()}),id(nd([rd,td([9])]),function(t,n,e,o){return e.moveOnTab?Ed(wm)(t,n,e,o):st.none()}),id(td(Uf()),bm),id(td(Gf()),bm)]),km=at([id(td(Gf()),pd)]),Cm=ld(vm,ei.init,Sm,km,function(){return st.some(ym)}),Om=[Qu("onSpace"),Qu("onEnter"),Qu("onShiftEnter"),Qu("onLeft"),Qu("onRight"),Qu("onTab"),Qu("onShiftTab"),Qu("onUp"),Qu("onDown"),Qu("onEscape"),Zn("stopSpaceKeyup",!1),Yn("focusIn")],_m=ld(Om,ei.init,function(t,n,e){return[id(td(Gf()),e.onSpace),id(nd([rd,td(Uf())]),e.onEnter),id(nd([ed,td(Uf())]),e.onShiftEnter),id(nd([ed,td([9])]),e.onShiftTab),id(nd([rd,td([9])]),e.onTab),id(td(Yf()),e.onUp),id(td(Kf()),e.onDown),id(td(Xf()),e.onLeft),id(td(qf()),e.onRight),id(td(Gf()),e.onSpace),id(td(Wf()),e.onEscape)]},function(t,n,e){return e.stopSpaceKeyup?[id(td(Gf()),pd)]:[]},function(t){return t.focusIn}),Tm=dd.schema(),Em=md.schema(),Bm=nm.schema(),Dm=Gd.schema(),Mm=hm.schema(),Am=bd.schema(),Fm=Cm.schema(),Im=_m.schema(),Rm=Ua({branchKey:"mode",branches:/* */Object.freeze({__proto__:null,acyclic:Tm,cyclic:Em,flow:Bm,flatgrid:Dm,matrix:Mm,execution:Am,menu:Fm,special:Im}),name:"keying",active:{events:function(t,n){return t.handler.toEvents(t,n)}},apis:{focusIn:function(n,e,o){e.sendFocusIn(e).fold(function(){n.getSystem().triggerFocus(n.element(),n.element())},function(t){t(n,e,o)})},setGridSize:function(t,n,e,o,r){xt(e,"setGridSize")?e.setGridSize(o,r):nt.console.error("Layout does not support setGridSize")}},state:xd}),Vm=function(t,n,e,o){var r=t.getSystem().build(o);Vs(t,r,e)},Hm=function(t,n,e,o){var r=Pm(t);L(r,function(t){return Le(o.element(),t.element())}).each(Ps)},Pm=function(t,n){return t.components()},zm=function(n,t,e,r,o){var i=Pm(n);return st.from(i[r]).map(function(t){return Hm(n,0,0,t),o.each(function(t){Vm(n,0,function(t,n){var e,o;o=n,mr(e=t,r).fold(function(){vr(e,o)},function(t){gr(t,o)})},t)}),t})},Nm=La({fields:[],name:"replacing",apis:/* */Object.freeze({__proto__:null,append:function(t,n,e,o){Vm(t,0,vr,o)},prepend:function(t,n,e,o){Vm(t,0,hr,o)},remove:Hm,replaceAt:zm,replaceBy:function(n,t,e,o,r){var i=Pm(n);return j(i,o).bind(function(t){return zm(n,0,0,t,r)})},set:function(n,t,e,o){Qa(function(){var t=V(o,n.getSystem().build);Is(n,t)},n.element())},contents:Pm})}),Lm=function(t,n){var e,o;return{key:t,value:{config:{},me:(e=t,o=Yo(n),La({fields:[zn("enabled")],name:e,active:{events:at(o)}})),configAsRaw:at({}),initialConfig:{},state:ei}}},jm=function(t,n){n.ignore||(Ka(t.element()),n.onFocus(t))},Um=/* */Object.freeze({__proto__:null,focus:jm,blur:function(t,n){n.ignore||t.element().dom().blur()},isFocused:function(t){return n=t.element(),e=ar(n).dom(),n.dom()===e.activeElement;var n,e}}),Wm=/* */Object.freeze({__proto__:null,exhibit:function(t,n){var e=n.ignore?{}:{attributes:{tabindex:"-1"}};return ii(e)},events:function(e){return Yo([Jo(ho(),function(t,n){jm(t,e),n.stop()})].concat(e.stopMousedown?[Jo(to(),function(t,n){n.event().prevent()})]:[]))}}),Gm=[$u("onFocus"),Zn("stopMousedown",!1),Zn("ignore",!1)],Xm=La({fields:Gm,name:"focusing",active:Wm,apis:Um}),Ym=function(t,n,e){var o=n.aria;o.update(t,o,e.get())},qm=function(n,t,e){t.toggleClass.each(function(t){(e.get()?bi:xi)(n.element(),t)})},Km=function(t,n,e){Qm(t,n,e,!e.get())},Jm=function(t,n,e){e.set(!0),qm(t,n,e),Ym(t,n,e)},$m=function(t,n,e){e.set(!1),qm(t,n,e),Ym(t,n,e)},Qm=function(t,n,e,o){(o?Jm:$m)(t,n,e)},Zm=function(t,n,e){Qm(t,n,e,n.selected)},tg=/* */Object.freeze({__proto__:null,onLoad:Zm,toggle:Km,isOn:function(t,n,e){return e.get()},on:Jm,off:$m,set:Qm}),ng=/* */Object.freeze({__proto__:null,exhibit:function(){return ii({})},events:function(t,n){var e,o,r,i=(e=t,o=n,r=Km,ur(function(t){r(t,e,o)})),u=Ia(t,n,Zm);return Yo(ut([t.toggleOnExecute?[i]:[],[u]]))}}),eg=function(t,n,e){Br(t.element(),"aria-expanded",e)},og=[Zn("selected",!1),Yn("toggleClass"),Zn("toggleOnExecute",!0),te("aria",{mode:"none"},Bn("mode",{pressed:[Zn("syncWithExpanded",!1),na("update",function(t,n,e){Br(t.element(),"aria-pressed",e),n.syncWithExpanded&&eg(t,n,e)})],checked:[na("update",function(t,n,e){Br(t.element(),"aria-checked",e)})],expanded:[na("update",eg)],selected:[na("update",function(t,n,e){Br(t.element(),"aria-selected",e)})],none:[na("update",Z)]}))],rg=La({fields:og,name:"toggling",active:ng,apis:tg,state:(sd=!1,{init:function(){var n=ce(sd);return{get:function(){return n.get()},set:function(t){return n.set(t)},clear:function(){return n.set(sd)},readState:function(){return n.get()}}}})}),ig=function(){var t=function(t,n){n.stop(),Uo(t)};return[Jo(fo(),t),Jo(So(),t),nr(Je()),nr(to())]},ug=function(t){return Yo(ut([t.map(function(e){return ur(function(t,n){e(t),n.stop()})}).toArray(),ig()]))},ag="alloy.item-hover",cg="alloy.item-focus",sg=function(t){($a(t.element()).isNone()||Xm.isFocused(t))&&(Xm.isFocused(t)||Xm.focus(t),jo(t,ag,{item:t}))},lg=function(t){jo(t,cg,{item:t})},fg=at(ag),dg=at(cg),mg=[zn("data"),zn("components"),zn("dom"),Zn("hasSubmenu",!1),Yn("toggling"),Sl("itemBehaviours",[rg,Xm,Rm,bl]),Zn("ignoreFocus",!1),Zn("domModification",{}),na("builder",function(t){return{dom:t.dom,domModification:et(et({},t.domModification),{attributes:et(et(et({role:t.toggling.isSome()?"menuitemcheckbox":"menuitem"},t.domModification.attributes),{"aria-haspopup":t.hasSubmenu}),t.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:kl(t.itemBehaviours,[t.toggling.fold(rg.revoke,function(t){return rg.config(et({aria:{mode:"checked"}},t))}),Xm.config({ignore:t.ignoreFocus,stopMousedown:t.ignoreFocus,onFocus:function(t){lg(t)}}),Rm.config({mode:"execution"}),bl.config({store:{mode:"memory",initialValue:t.data}}),Lm("item-type-events",b(ig(),[Jo(ro(),sg),Jo(wo(),Xm.focus)]))]),components:t.components,eventOrder:t.eventOrder}}),Zn("eventOrder",{})],gg=[zn("dom"),zn("components"),na("builder",function(t){return{dom:t.dom,components:t.components,events:Yo([(n=wo(),Jo(n,function(t,n){n.stop()}))])};var n})],pg=function(){return"item-widget"},hg=at([ql({name:"widget",overrides:function(n){return{behaviours:za([bl.config({store:{mode:"manual",getValue:function(t){return n.data},setValue:function(){}}})])}}})]),vg=[zn("uid"),zn("data"),zn("components"),zn("dom"),Zn("autofocus",!1),Zn("ignoreFocus",!1),Sl("widgetBehaviours",[bl,Xm,Rm]),Zn("domModification",{}),hf(hg()),na("builder",function(e){var t=af(pg(),e,hg()),n=cf(pg(),e,t.internals()),o=function(t){return sf(t,e,"widget").map(function(t){return Rm.focusIn(t),t})},r=function(t,n){return Ef(n.event().target())||e.autofocus&&n.setSource(t.element()),st.none()};return{dom:e.dom,components:n,domModification:e.domModification,events:Yo([ur(function(t,n){o(t).each(function(t){n.stop()})}),Jo(ro(),sg),Jo(wo(),function(t,n){e.autofocus?o(t):Xm.focus(t)})]),behaviours:kl(e.widgetBehaviours,[bl.config({store:{mode:"memory",initialValue:e.data}}),Xm.config({ignore:e.ignoreFocus,onFocus:function(t){lg(t)}}),Rm.config({mode:"special",focusIn:e.autofocus?function(t){o(t)}:Wa(),onLeft:r,onRight:r,onEscape:function(t,n){return Xm.isFocused(t)||e.autofocus?(e.autofocus&&n.setSource(t.element()),st.none()):(Xm.focus(t),st.some(!0))}})])}})],bg=Bn("type",{widget:vg,item:mg,separator:gg}),yg=at([$l({factory:{sketch:function(t){var n=_n("menu.spec item",bg,t);return n.builder(n)}},name:"items",unit:"item",defaults:function(t,n){return n.hasOwnProperty("uid")?n:et(et({},n),{uid:Yr("item")})},overrides:function(t,n){return{type:n.type,ignoreFocus:t.fakeFocus,domModification:{classes:[t.markers.item]}}}})]),xg=at([zn("value"),zn("items"),zn("dom"),zn("components"),Zn("eventOrder",{}),yl("menuBehaviours",[jf,bl,Mf,Rm]),te("movement",{mode:"menu",moveOnTab:!0},Bn("mode",{grid:[oa(),na("config",function(t,n){return{mode:"flatgrid",selector:"."+t.markers.item,initSize:{numColumns:n.initSize.numColumns,numRows:n.initSize.numRows},focusManager:t.focusManager}})],matrix:[na("config",function(t,n){return{mode:"matrix",selectors:{row:n.rowSelector,cell:"."+t.markers.item},focusManager:t.focusManager}}),zn("rowSelector")],menu:[Zn("moveOnTab",!0),na("config",function(t,n){return{mode:"menu",selector:"."+t.markers.item,moveOnTab:n.moveOnTab,focusManager:t.focusManager}})]})),Nn("markers",Xu()),Zn("fakeFocus",!1),Zn("focusManager",ad()),$u("onHighlight")]),wg=at("alloy.menu-focus"),Sg=_f({name:"Menu",configFields:xg(),partFields:yg(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:wl(t.menuBehaviours,[jf.config({highlightClass:t.markers.selectedItem,itemClass:t.markers.item,onHighlight:t.onHighlight}),bl.config({store:{mode:"memory",initialValue:t.value}}),Mf.config({find:st.some}),Rm.config(t.movement.config(t,t.movement))]),events:Yo([Jo(dg(),function(n,e){var t=e.event();n.getSystem().getByDom(t.target()).each(function(t){jf.highlight(n,t),e.stop(),jo(n,wg(),{menu:n,item:t})})}),Jo(fg(),function(t,n){var e=n.event().item();jf.highlight(t,e)})]),components:n,eventOrder:t.eventOrder,domModification:{attributes:{role:"menu"}}}}}),kg=function(e,o,r,t){return bt(r,t).bind(function(t){return bt(e,t).bind(function(t){var n=kg(e,o,r,t);return st.some([t].concat(n))})}).getOr([])},Cg=function(t,n){var e={};ft(t,function(t,n){it(t,function(t){e[t]=n})});var o=n,r=mt(n,function(t,n){return{k:t,v:n}}),i=dt(r,function(t,n){return[n].concat(kg(e,o,r,n))});return dt(e,function(t){return bt(i,t).getOr([t])})},Og=function(t){return"prepared"===t.type?st.some(t.menu):st.none()},_g={init:function(){var i=ce({}),u=ce({}),a=ce({}),c=ce(st.none()),s=ce({}),r=function(t,o,r){return e(t).bind(function(n){return e=t,ht(i.get(),function(t,n){return t===e}).bind(function(t){return o(t).map(function(t){return{triggeredMenu:n,triggeringItem:t,triggeringPath:r}})});var e})},e=function(t){return n(t).bind(Og)},n=function(t){return bt(u.get(),t)},l=function(t){return bt(i.get(),t)};return{setMenuBuilt:function(t,n){var e;u.set(et(et({},u.get()),((e={})[t]={type:"prepared",menu:n},e)))},setContents:function(t,n,e,o){c.set(st.some(t)),i.set(e),u.set(n),s.set(o);var r=Cg(o,e);a.set(r)},expand:function(e){return bt(i.get(),e).map(function(t){var n=bt(a.get(),e).getOr([]);return[t].concat(n)})},refresh:function(t){return bt(a.get(),t)},collapse:function(t){return bt(a.get(),t).bind(function(t){return 1<t.length?st.some(t.slice(1)):st.none()})},lookupMenu:n,lookupItem:l,otherMenus:function(t){var n=s.get();return X(lt(n),t)},getPrimary:function(){return c.get().bind(e)},getMenus:function(){return u.get()},clear:function(){i.set({}),u.set({}),a.set({}),c.set(st.none())},isClear:function(){return c.get().isNone()},getTriggeringPath:function(t,o){var n=P(l(t).toArray(),function(t){return e(t).isSome()});return bt(a.get(),t).bind(function(t){var e=G(n.concat(t));return function(t){for(var n=[],e=0;e<t.length;e++){var o=t[e];if(!o.isSome())return st.none();n.push(o.getOrDie())}return st.some(n)}(U(e,function(t,n){return r(t,o,e.slice(0,n+1)).fold(function(){return c.get().is(t)?[]:[st.none()]},function(t){return[st.some(t)]})}))})}}},extractPreparedMenu:Og},Tg=at("collapse-item"),Eg=Of({name:"TieredMenu",configFields:[ta("onExecute"),ta("onEscape"),Zu("onOpenMenu"),Zu("onOpenSubmenu"),$u("onRepositionMenu"),$u("onCollapseMenu"),Zn("highlightImmediately",!0),Wn("data",[zn("primary"),zn("menus"),zn("expansions")]),Zn("fakeFocus",!1),$u("onHighlight"),$u("onHover"),qu(),zn("dom"),Zn("navigateOnHover",!0),Zn("stayInDom",!1),yl("tmenuBehaviours",[Rm,jf,Mf,Nm]),Zn("eventOrder",{})],apis:{collapseMenu:function(t,n){t.collapseMenu(n)},highlightPrimary:function(t,n){t.highlightPrimary(n)},repositionMenus:function(t,n){t.repositionMenus(n)}},factory:function(a,t){var c,n,i=ce(st.none()),s=_g.init(),e=function(t){var o,r,n,e=(o=t,r=a.data.primary,n=a.data.menus,dt(n,function(t,n){var e=function(){return Sg.sketch(et(et({dom:t.dom},t),{value:n,items:t.items,markers:a.markers,fakeFocus:a.fakeFocus,onHighlight:a.onHighlight,focusManager:(a.fakeFocus?cd:ad)()}))};return n===r?{type:"prepared",menu:o.getSystem().build(e())}:{type:"notbuilt",nbMenu:e}})),i=u();return s.setContents(a.data.primary,e,a.data.expansions,i),s.getPrimary()},l=function(t){return bl.getValue(t).value},u=function(t){return dt(a.data.menus,function(t,n){return U(t.items,function(t){return"separator"===t.type?[]:[t.data.value]})})},f=function(n,t){jf.highlight(n,t),jf.getHighlighted(t).orThunk(function(){return jf.getFirst(t)}).each(function(t){Wo(n,t.element(),wo())})},d=function(n,t){return Tf(V(t,function(t){return n.lookupMenu(t).bind(function(t){return"prepared"===t.type?st.some(t.menu):st.none()})}))},m=function(n,t,e){var o=d(t,t.otherMenus(e));it(o,function(t){ki(t.element(),[a.markers.backgroundMenu]),a.stayInDom||Nm.remove(n,t)})},g=function(t,o){var r,n=(r=t,i.get().getOrThunk(function(){var e={},t=Yc(r.element(),"."+a.markers.item),n=P(t,function(t){return"true"===Dr(t,"aria-haspopup")});return it(n,function(t){r.getSystem().getByDom(t).each(function(t){var n=l(t);e[n]=t})}),i.set(st.some(e)),e}));ft(n,function(t,n){var e=F(o,n);Br(t.element(),"aria-expanded",e)})},p=function(o,r,i){return st.from(i[0]).bind(function(t){return r.lookupMenu(t).bind(function(t){if("notbuilt"===t.type)return st.none();var n=t.menu,e=d(r,i.slice(1));return it(e,function(t){bi(t.element(),a.markers.backgroundMenu)}),Oi(n.element())||Nm.append(o,$i(n)),ki(n.element(),[a.markers.backgroundMenu]),f(o,n),m(o,r,i),st.some(n)})})};(n=c=c||{})[n.HighlightSubmenu=0]="HighlightSubmenu",n[n.HighlightParent=1]="HighlightParent";var h=function(r,i,u){void 0===u&&(u=c.HighlightSubmenu);var t=l(i);return s.expand(t).bind(function(o){return g(r,o),st.from(o[0]).bind(function(e){return s.lookupMenu(e).bind(function(t){var n=function(t,n,e){if("notbuilt"!==e.type)return e.menu;var o=t.getSystem().build(e.nbMenu());return s.setMenuBuilt(n,o),o}(r,e,t);return Oi(n.element())||Nm.append(r,$i(n)),a.onOpenSubmenu(r,i,n,G(o)),u===c.HighlightSubmenu?(jf.highlightFirst(n),p(r,s,o)):(jf.dehighlightAll(n),st.some(i))})})})},o=function(n,e){var t=l(e);return s.collapse(t).bind(function(t){return g(n,t),p(n,s,t).map(function(t){return a.onCollapseMenu(n,e,t),t})})},r=function(e){return function(n,t){return Au(t.getSource(),"."+a.markers.item).bind(function(t){return n.getSystem().getByDom(t).toOption().bind(function(t){return e(n,t).map(function(){return!0})})})}},v=Yo([Jo(wg(),function(e,o){var t=o.event().item();s.lookupItem(l(t)).each(function(){var t=o.event().menu();jf.highlight(e,t);var n=l(o.event().item());s.refresh(n).each(function(t){return m(e,s,t)})})}),ur(function(n,t){var e=t.event().target();n.getSystem().getByDom(e).each(function(t){0===l(t).indexOf("collapse-item")&&o(n,t),h(n,t,c.HighlightSubmenu).fold(function(){a.onExecute(n,t)},function(){})})}),or(function(n,t){e(n).each(function(t){Nm.append(n,$i(t)),a.onOpenMenu(n,t),a.highlightImmediately&&f(n,t)})})].concat(a.navigateOnHover?[Jo(fg(),function(t,n){var e,o,r=n.event().item();e=t,o=l(r),s.refresh(o).bind(function(t){return g(e,t),p(e,s,t)}),h(t,r,c.HighlightParent),a.onHover(t,r)})]:[])),b=function(t){return jf.getHighlighted(t).bind(jf.getHighlighted)},y={collapseMenu:function(n){b(n).each(function(t){o(n,t)})},highlightPrimary:function(n){s.getPrimary().each(function(t){f(n,t)})},repositionMenus:function(o){s.getPrimary().bind(function(n){return b(o).bind(function(t){var n=l(t),e=vt(s.getMenus()),o=Tf(V(e,_g.extractPreparedMenu));return s.getTriggeringPath(n,function(t){return e=t,Q(o,function(t){if(!t.getSystem().isConnected())return st.none();var n=jf.getCandidates(t);return L(n,function(t){return l(t)===e})});var e})}).map(function(t){return{primary:n,triggeringPath:t}})}).fold(function(){var t;t=o,st.from(t.components()[0]).filter(function(t){return"menu"===Dr(t.element(),"role")}).each(function(t){a.onRepositionMenu(o,t,[])})},function(t){var n=t.primary,e=t.triggeringPath;a.onRepositionMenu(o,n,e)})}};return{uid:a.uid,dom:a.dom,markers:a.markers,behaviours:wl(a.tmenuBehaviours,[Rm.config({mode:"special",onRight:r(function(t,n){return Ef(n.element())?st.none():h(t,n,c.HighlightSubmenu)}),onLeft:r(function(t,n){return Ef(n.element())?st.none():o(t,n)}),onEscape:r(function(t,n){return o(t,n).orThunk(function(){return a.onEscape(t,n).map(function(){return t})})}),focusIn:function(n,t){s.getPrimary().each(function(t){Wo(n,t.element(),wo())})}}),jf.config({highlightClass:a.markers.selectedMenu,itemClass:a.markers.menu}),Mf.config({find:function(t){return jf.getHighlighted(t)}}),Nm.config({})]),eventOrder:a.eventOrder,apis:y,events:v}},extraApis:{tieredData:function(t,n,e){return{primary:t,menus:n,expansions:e}},singleData:function(t,n){return{primary:t,menus:Kt(t,n),expansions:{}}},collapseItem:function(t){return{value:Nr(Tg()),meta:{text:t}}}}}),Bg=Of({name:"InlineView",configFields:[zn("lazySink"),$u("onShow"),$u("onHide"),$n("onEscape"),yl("inlineBehaviours",[Qs,bl,Ya]),Qn("fireDismissalEventInstead",[Zn("event",Fo())]),Qn("fireRepositionEventInstead",[Zn("event",Io())]),Zn("getRelated",st.none),Zn("isExtraPart",c),Zn("eventOrder",st.none)],factory:function(m,t){var o=function(t,n,e,o){r(t,n,e,function(){return o.map(function(t){return wu(t)})})},r=function(t,n,e,o){var r=m.lazySink(t).getOrDie();Qs.openWhileCloaked(t,e,function(){return Ds.positionWithinBounds(r,n,t,o())}),bl.setValue(t,st.some({mode:"position",anchor:n,getBounds:o}))},i=function(t,n,e,o){var r,i,u,a,c,s,l,f,d=(r=m,i=t,u=n,c=o,s=function(){return r.lazySink(i)},l="horizontal"===(a=e).type?{layouts:{onLtr:function(){return Aa()},onRtl:function(){return Fa()}}}:{},f=function(t){return 2===t.length?l:{}},Eg.sketch({dom:{tag:"div"},data:a.data,markers:a.menu.markers,highlightImmediately:a.menu.highlightImmediately,onEscape:function(){return Qs.close(i),r.onEscape.map(function(t){return t(i)}),st.some(!0)},onExecute:function(){return st.some(!0)},onOpenMenu:function(t,n){Ds.positionWithinBounds(s().getOrDie(),u,n,c())},onOpenSubmenu:function(t,n,e,o){var r=s().getOrDie();Ds.position(r,et({anchor:"submenu",item:n},f(o)),e)},onRepositionMenu:function(t,n,e){var o=s().getOrDie();Ds.positionWithinBounds(o,u,n,c()),it(e,function(t){var n=f(t.triggeringPath);Ds.position(o,et({anchor:"submenu",item:t.triggeringItem},n),t.triggeredMenu)})}}));Qs.open(t,d),bl.setValue(t,st.some({mode:"menu",menu:d}))},n=function(e){Qs.isOpen(e)&&bl.getValue(e).each(function(t){switch(t.mode){case"menu":Qs.getState(e).each(function(t){Eg.repositionMenus(t)});break;case"position":var n=m.lazySink(e).getOrDie();Ds.positionWithinBounds(n,t.anchor,e,t.getBounds())}})},e={setContent:function(t,n){Qs.setContent(t,n)},showAt:function(t,n,e){o(t,n,e,st.none())},showWithin:o,showWithinBounds:r,showMenuAt:function(t,n,e){i(t,n,e,function(){return st.none()})},showMenuWithinBounds:i,hide:function(t){Qs.isOpen(t)&&(bl.setValue(t,st.none()),Qs.close(t))},getContent:function(t){return Qs.getState(t)},reposition:n,isOpen:Qs.isOpen};return{uid:m.uid,dom:m.dom,behaviours:wl(m.inlineBehaviours,[Qs.config({isPartOf:function(t,n,e){return Ru(n,e)||(o=t,r=e,m.getRelated(o).exists(function(t){return Ru(t,r)}));var o,r},getAttachPoint:function(t){return m.lazySink(t).getOrDie()},onOpen:function(t){m.onShow(t)},onClose:function(t){m.onHide(t)}}),bl.config({store:{mode:"memory",initialValue:st.none()}}),Ya.config({channels:et(et({},ol(et({isExtraPart:t.isExtraPart},m.fireDismissalEventInstead.map(function(t){return{fireEventInstead:{event:t.event}}}).getOr({})))),il(et(et({},m.fireRepositionEventInstead.map(function(t){return{fireEventInstead:{event:t.event}}}).getOr({})),{doReposition:n})))})]),eventOrder:m.eventOrder,apis:e}},apis:{showAt:function(t,n,e,o){t.showAt(n,e,o)},showWithin:function(t,n,e,o,r){t.showWithin(n,e,o,r)},showWithinBounds:function(t,n,e,o,r){t.showWithinBounds(n,e,o,r)},showMenuAt:function(t,n,e,o){t.showMenuAt(n,e,o)},showMenuWithinBounds:function(t,n,e,o,r){t.showMenuWithinBounds(n,e,o,r)},hide:function(t,n){t.hide(n)},isOpen:function(t,n){return t.isOpen(n)},getContent:function(t,n){return t.getContent(n)},setContent:function(t,n,e){t.setContent(n,e)},reposition:function(t,n){t.reposition(n)}}}),Dg=function(t){return t.x},Mg=function(t,n){return t.x+t.width/2-n.width/2},Ag=function(t,n){return t.x+t.width-n.width},Fg=function(t){return t.y},Ig=function(t,n){return t.y+t.height-n.height},Rg=function(t,n,e){return ra(Ag(t,n),Ig(t,n),e.innerSoutheast(),sa(),ga(t,{right:0,bottom:3}),"layout-inner-se")},Vg=function(t,n,e){return ra(Dg(t),Ig(t,n),e.innerSouthwest(),ca(),ga(t,{left:1,bottom:3}),"layout-inner-sw")},Hg=function(t,n,e){return ra(Ag(t,n),Fg(t),e.innerNortheast(),aa(),ga(t,{right:0,top:2}),"layout-inner-ne")},Pg=function(t,n,e){return ra(Dg(t),Fg(t),e.innerNorthwest(),ua(),ga(t,{left:1,top:2}),"layout-inner-nw")},zg=function(t,n,e){return ra(Mg(t,n),Fg(t),e.innerNorth(),la(),ga(t,{top:2}),"layout-inner-n")},Ng=function(t,n,e){return ra(Mg(t,n),Ig(t,n),e.innerSouth(),fa(),ga(t,{bottom:3}),"layout-inner-s")},Lg=tinymce.util.Tools.resolve("tinymce.util.Delay"),jg=Of({name:"Button",factory:function(t){var n=ug(t.action),e=t.dom.tag,o=function(n){return bt(t.dom,"attributes").bind(function(t){return bt(t,n)})};return{uid:t.uid,dom:t.dom,components:t.components,events:n,behaviours:kl(t.buttonBehaviours,[Xm.config({}),Rm.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"!==e)return{role:o("role").getOr("button")};var t=o("type").getOr("button"),n=o("role").map(function(t){return{role:t}}).getOr({});return et({type:t},n)}()},eventOrder:t.eventOrder}},configFields:[Zn("uid",undefined),zn("dom"),Zn("components",[]),Sl("buttonBehaviours",[Xm,Rm]),Yn("action"),Yn("role"),Zn("eventOrder",{})]}),Ug=function(t){var n=function e(t){return t.uid!==undefined}(t)&&xt(t,"uid")?t.uid:Yr("memento");return{get:function(t){return t.getSystem().getByUid(n).getOrDie()},getOpt:function(t){return t.getSystem().getByUid(n).toOption()},asSpec:function(){return et(et({},t),{uid:n})}}},Wg=function(t){return st.from(t()["temporary-placeholder"]).getOr("!not found!")},Gg=function(t,n){return st.from(n()[t]).getOrThunk(function(){return Wg(n)})},Xg={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},Yg=Of({name:"Notification",factory:function(n){var t,e,o=Ug({dom:{tag:"p",innerHtml:n.translationProvider(n.text)},behaviours:za([Nm.config({})])}),r=function(t){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+t+"%"}}}},i=function(t){return{dom:{tag:"div",classes:["tox-text"],innerHtml:t+"%"}}},u=Ug({dom:{tag:"div",classes:n.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[r(0)]},i(0)],behaviours:za([Nm.config({})])}),a={updateProgress:function(t,n){t.getSystem().isConnected()&&u.getOpt(t).each(function(t){Nm.set(t,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[r(n)]},i(n)])})},updateText:function(t,n){if(t.getSystem().isConnected()){var e=o.get(t);Nm.set(e,[Yi(n)])}}},c=ut([n.icon.toArray(),n.level.toArray(),n.level.bind(function(t){return st.from(Xg[t])}).toArray()]);return{uid:n.uid,dom:{tag:"div",attributes:{role:"alert"},classes:n.level.map(function(t){return["tox-notification","tox-notification--in","tox-notification--"+t]}).getOr(["tox-notification","tox-notification--in"])},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:(t=c,e=n.iconProvider,Q(t,function(t){return st.from(e()[t])}).getOrThunk(function(){return Wg(e)}))}},{dom:{tag:"div",classes:["tox-notification__body"]},components:[o.asSpec()],behaviours:za([Nm.config({})])}].concat(n.progress?[u.asSpec()]:[]).concat(n.closeButton?[jg.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:Gg("close",n.iconProvider),attributes:{"aria-label":n.translationProvider("Close")}}}],action:function(t){n.onAction(t)}})]:[]),apis:a}},configFields:[Yn("level"),zn("progress"),zn("icon"),zn("onAction"),zn("text"),zn("iconProvider"),zn("translationProvider"),re("closeButton",!0)],apis:{updateProgress:function(t,n,e){t.updateProgress(n,e)},updateText:function(t,n,e){t.updateText(n,e)}}});function qg(t,u,a){var c=u.backstage;return{open:function(t,n){var e=!t.closeButton&&t.timeout&&(0<t.timeout||t.timeout<0),o=function(){n(),Bg.hide(i)},r=Ji(Yg.sketch({text:t.text,level:F(["success","error","warning","warn","info"],t.type)?t.type:undefined,progress:!0===t.progressBar,icon:st.from(t.icon),closeButton:!e,onAction:o,iconProvider:c.shared.providers.icons,translationProvider:c.shared.providers.translate})),i=Ji(Bg.sketch(et({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:u.backstage.shared.getSink,fireDismissalEventInstead:{}},c.shared.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}})));return a.add(i),0<t.timeout&&Lg.setTimeout(function(){o()},t.timeout),{close:o,moveTo:function(t,n){Bg.showAt(i,{anchor:"makeshift",x:t,y:n},$i(r))},moveRel:function(t,n){if("banner"!==n){var e=function(t){switch(t){case"bc-bc":return Ng;case"tc-tc":return zg;case"tc-bc":return Oa;case"bc-tc":default:return _a}}(n),o={anchor:"node",root:_i(),node:st.some(le.fromDom(t)),layouts:{onRtl:function(){return[e]},onLtr:function(){return[e]}}};Bg.showAt(i,o,$i(r))}else Bg.showAt(i,u.backstage.shared.anchors.banner(),$i(r))},text:function(t){Yg.updateText(r,t)},settings:t,getEl:function(){return r.element().dom()},progressBar:{value:function(t){Yg.updateProgress(r,t)}}}},close:function(t){t.close()},reposition:function(t){var e;it(t,function(t){return t.moveTo(0,0)}),0<(e=t).length&&(K(e).each(function(t){return t.moveRel(null,"banner")}),it(e,function(t,n){0<n&&t.moveRel(e[n-1].getEl(),"bc-tc")}))},getArgs:function(t){return t.settings}}}var Kg,Jg,$g=function(e,o){var r=null;return{cancel:function(){null!==r&&(nt.clearTimeout(r),r=null)},throttle:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];null!==r&&nt.clearTimeout(r),r=nt.setTimeout(function(){e.apply(null,t),r=null},o)}}},Qg=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),Zg=function(o,t,n,e,r){var i=Qg(o,function(t){return e=t,(n=o).isBlock(e)||F(["BR","IMG","HR","INPUT"],e.nodeName)||"false"===n.getContentEditable(e);var n,e});return st.from(i.backwards(t,n,e,r))},tp=function(e,n){return np(le.fromDom(e.selection.getNode())).getOrThunk(function(){var t=le.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',e.getDoc());return vr(t,le.fromDom(n.extractContents())),n.insertNode(t.dom()),lr(t).each(function(t){return t.dom().normalize()}),Xc(t,Gc).map(function(t){var n;e.selection.setCursorLocation(t.dom(),"img"===Cr(n=t)?1:Uc(n).fold(function(){return dr(n).length},function(t){return t.length}))}),t})},np=function(t){return Au(t,"[data-mce-autocompleter]")},ep=function(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},op=function(t){return""!==t&&-1!==" \xa0\f\n\r\t\x0B".indexOf(t)},rp=function(t,n){return t.substring(n.length)},ip=function(t,o,r,i){if(void 0===i&&(i=0),!(n=o).collapsed||3!==n.startContainer.nodeType)return st.none();var n,e=t.getParent(o.startContainer,t.isBlock)||t.getRoot();return Zg(t,o.startContainer,o.startOffset,function(t,n,e){return function(t,n,e){var o;for(o=n-1;0<=o;o--){var r=t.charAt(o);if(op(r))return st.none();if(r===e)break}return st.some(o)}(e,n,r).getOr(n)},e).bind(function(t){var n=o.cloneRange();if(n.setStart(t.container,t.offset),n.setEnd(o.endContainer,o.endOffset),n.collapsed)return st.none();var e=ep(n);return 0!==e.lastIndexOf(r)||rp(e,r).length<i?st.none():st.some({text:rp(e,r),range:n,triggerChar:r})})},up=function(o,t,r,n){return void 0===n&&(n=0),np(le.fromDom(t.startContainer)).fold(function(){return ip(o,t,r,n)},function(t){var n=o.createRng();n.selectNode(t.dom());var e=ep(n);return st.some({range:n,text:rp(e,r),triggerChar:r})})},ap=function(e,t){t.on("keypress compositionend",e.onKeypress.throttle),t.on("remove",e.onKeypress.cancel);var o=function(t,n){jo(t,ao(),{raw:n})};t.on("keydown",function(n){var t=function(){return e.getView().bind(jf.getHighlighted)};8===n.which&&e.onKeypress.throttle(n),e.isActive()&&(27===n.which&&e.cancelIfNecessary(),e.isMenuOpen()?13===n.which?(t().each(Uo),n.preventDefault()):40===n.which?(t().fold(function(){e.getView().each(jf.highlightFirst)},function(t){o(t,n)}),n.preventDefault(),n.stopImmediatePropagation()):37!==n.which&&38!==n.which&&39!==n.which||t().each(function(t){o(t,n),n.preventDefault(),n.stopImmediatePropagation()}):13!==n.which&&38!==n.which&&40!==n.which||e.cancelIfNecessary())}),t.on("NodeChange",function(t){e.isActive()&&!e.isProcessingAction()&&np(le.fromDom(t.element)).isNone()&&e.cancelIfNecessary()})},cp=tinymce.util.Tools.resolve("tinymce.util.Promise"),sp=function(t,n){return{container:t,offset:n}},lp=function(t){if(t.nodeType===nt.Node.TEXT_NODE)return sp(t,t.data.length);var n=t.childNodes;return 0<n.length?lp(n[n.length-1]):sp(t,n.length)},fp=function(t,n){var e=t.childNodes;return 0<e.length&&n<e.length?fp(e[n],0):0<e.length&&t.nodeType===nt.Node.ELEMENT_NODE&&e.length===n?lp(e[e.length-1]):sp(t,n)},dp=function(r){return function(t){var n,e,o=fp(t.startContainer,t.startOffset);return!Zg(n=r,(e=o).container,e.offset,function(t,n){return 0===n?-1:n},n.getRoot()).filter(function(t){var n=t.container.data.charAt(t.offset-1);return!op(n)}).isSome()}},mp=function(n,e){var o,r,t=e(),i=n.selection.getRng();return o=n.dom,r=i,Q(t.triggerChars,function(t){return up(o,r,t)}).bind(function(t){return gp(n,e,t)})},gp=function(n,t,e,o){void 0===o&&(o={});var r=t(),i=n.selection.getRng().startContainer.nodeValue,u=P(r.lookupByChar(e.triggerChar),function(t){return e.text.length>=t.minChars&&t.matches.getOrThunk(function(){return dp(n.dom)})(e.range,i,e.text)});if(0===u.length)return st.none();var a=cp.all(V(u,function(n){return n.fetch(e.text,n.maxResults,o).then(function(t){return{matchText:e.text,items:t,columns:n.columns,onAction:n.onAction}})}));return st.some({lookupData:a,context:e})},pp=ln([Ln("type"),Jn("text")]),hp=ln([ae("type",function(){return"autocompleteitem"}),ae("active",function(){return!1}),ae("disabled",function(){return!1}),Zn("meta",{}),Ln("value"),Jn("text"),Jn("icon")]),vp=ln([Ln("type"),Ln("ch"),ne("minChars",1),Zn("columns",1),ne("maxResults",10),$n("matches"),Un("fetch"),Un("onAction")]),bp=function(t){var n,e,o=t.ui.registry.getAll().popups,r=dt(o,function(t){return Cn("Autocompleter",vp,t).fold(function(t){throw new Error(Tn(t))},function(t){return t})}),i=(n=pt(r,function(t){return t.ch}),e={},it(n,function(t){e[t]={}}),lt(e)),u=vt(r);return{dataset:r,triggerChars:i,lookupByChar:function(n){return P(u,function(t){return t.ch===n})}}},yp=[re("disabled",!1),Jn("text"),Jn("shortcut"),hn("value","value",Gt(function(){return Nr("menuitem-value")}),Dn()),Zn("meta",{})],xp=ln([Ln("type"),ie("onSetup",function(){return Z}),ie("onAction",Z),Jn("icon")].concat(yp)),wp=ln([Ln("type"),Un("getSubmenuItems"),ie("onSetup",function(){return Z}),Jn("icon")].concat(yp)),Sp=ln([Ln("type"),Jn("icon"),re("active",!1),ie("onSetup",function(){return Z}),Un("onAction")].concat(yp)),kp=ln([Ln("type"),re("active",!1),Jn("icon")].concat(yp)),Cp=ln([Ln("type"),jn("fancytype",["inserttable","colorswatch"]),ie("onAction",Z)]),Op=function(t,o,n){var r=Yc(t.element(),"."+n);if(0<r.length){var e=j(r,function(t){var n=t.dom().getBoundingClientRect().top,e=r[0].dom().getBoundingClientRect().top;return Math.abs(n-e)>o}).getOr(r.length);return st.some({numColumns:e,numRows:Math.ceil(r.length/e)})}return st.none()},_p=function(t,n){return za([Lm(t,n)])},Tp=function(t){return _p(Nr("unnamed-events"),t)},Ep=[zn("lazySink"),zn("tooltipDom"),Zn("exclusive",!0),Zn("tooltipComponents",[]),Zn("delay",300),oe("mode","normal",["normal","follow-highlight"]),Zn("anchor",function(t){return{anchor:"hotspot",hotspot:t,layouts:{onLtr:at([_a,Oa,wa,ka,Sa,Ca]),onRtl:at([_a,Oa,wa,ka,Sa,Ca])}}}),$u("onHide"),$u("onShow")],Bp=/* */Object.freeze({__proto__:null,init:function(){var e=ce(st.none()),n=ce(st.none()),o=function(){e.get().each(function(t){nt.clearTimeout(t)})},t=at("not-implemented");return oi({getTooltip:function(){return n.get()},isShowing:function(){return n.get().isSome()},setTooltip:function(t){n.set(st.some(t))},clearTooltip:function(){n.set(st.none())},clearTimer:o,resetTimer:function(t,n){o(),e.set(st.some(nt.setTimeout(function(){t()},n)))},readState:t})}}),Dp=Nr("tooltip.exclusive"),Mp=Nr("tooltip.show"),Ap=Nr("tooltip.hide"),Fp=function(t,n,e){t.getSystem().broadcastOn([Dp],{})},Ip=/* */Object.freeze({__proto__:null,hideAllExclusive:Fp,setComponents:function(t,n,e,o){e.getTooltip().each(function(t){t.getSystem().isConnected()&&Nm.set(t,o)})}}),Rp=La({fields:Ep,name:"tooltipping",active:/* */Object.freeze({__proto__:null,events:function(o,r){var e=function(n){r.getTooltip().each(function(t){Ps(t),o.onHide(n,t),r.clearTooltip()}),r.clearTimer()};return Yo(ut([[Jo(Mp,function(t){r.resetTimer(function(){!function(n){if(!r.isShowing()){Fp(n);var t=o.lazySink(n).getOrDie(),e=n.getSystem().build({dom:o.tooltipDom,components:o.tooltipComponents,events:Yo("normal"===o.mode?[Jo(ro(),function(t){Lo(n,Mp)}),Jo(eo(),function(t){Lo(n,Ap)})]:[]),behaviours:za([Nm.config({})])});r.setTooltip(e),Rs(t,e),o.onShow(n,e),Ds.position(t,o.anchor(n),e)}}(t)},o.delay)}),Jo(Ap,function(t){r.resetTimer(function(){e(t)},o.delay)}),Jo(yo(),function(t,n){F(n.channels(),Dp)&&e(t)}),rr(function(t){e(t)})],"normal"===o.mode?[Jo(io(),function(t){Lo(t,Mp)}),Jo(vo(),function(t){Lo(t,Ap)}),Jo(ro(),function(t){Lo(t,Mp)}),Jo(eo(),function(t){Lo(t,Ap)})]:[Jo(zo(),function(t,n){Lo(t,Mp)}),Jo(No(),function(t){Lo(t,Ap)})]]))}}),state:Bp,apis:Ip}),Vp=tinymce.util.Tools.resolve("tinymce.util.I18n"),Hp="tox-menu-nav__js",Pp="tox-collection__item",zp="tox-swatch",Np={normal:Hp,color:zp},Lp="tox-collection__item--enabled",jp="tox-collection__item-label",Up="tox-collection__item-caret",Wp="tox-collection__item--active",Gp=function(t){return bt(Np,t).getOr(Hp)},Xp=tinymce.util.Tools.resolve("tinymce.Env"),Yp=function(t){return{dom:{tag:"div",classes:["tox-collection__item-icon"],innerHtml:t}}},qp=function(t){return{dom:{tag:"div",classes:[jp]},components:[Yi(Vp.translate(t))]}},Kp=function(t,n){return{dom:{tag:"div",classes:[jp]},components:[{dom:{tag:t.tag,styles:t.styles},components:[Yi(Vp.translate(n))]}]}},Jp=function(t){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:(n=t,e=Xp.mac?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl",access:"Shift+Alt"},o=n.split("+"),r=V(o,function(t){var n=t.toLowerCase().trim();return yt(e,n)?e[n]:t}),Xp.mac?r.join(""):r.join("+"))}};var n,e,o,r},$p=function(t){return{dom:{tag:"div",classes:["tox-collection__item-checkmark"],innerHtml:Gg("checkmark",t)}}},Qp=function(t,n,e,o,r){var i=e?n.or(st.some("")).map(Yp):st.none(),u=t.checkMark,a=t.ariaLabel.map(function(t){return{attributes:{title:Vp.translate(t)}}}).getOr({});return{dom:et({tag:"div",classes:[Hp,Pp].concat(r?["tox-collection__item-icon-rtl"]:[])},a),optComponents:[i,t.htmlContent.fold(function(){return t.textContent.map(o)},function(t){return st.some({dom:{tag:"div",classes:[jp],innerHtml:t}})}),t.shortcutContent.map(Jp),u,t.caret]}},Zp=["list-num-default","list-num-lower-alpha","list-num-lower-greek","list-num-lower-roman","list-num-upper-alpha","list-num-upper-roman"],th=["list-bull-circle","list-bull-default","list-bull-square"],nh=function(t,r,n,i){void 0===i&&(i=st.none());var e,o,u,a,c,s=Vp.isRtl()&&t.iconContent.exists(function(t){return F(th,t)}),l=t.iconContent.map(function(t){return Vp.isRtl()&&F(Zp,t)?t+"-rtl":t}).map(function(t){return n=t,e=r.icons,o=i,st.from(e()[n]).or(o).getOrThunk(function(){return Wg(e)});var n,e,o}),f=st.from(t.meta).fold(function(){return qp},function(t){return yt(t,"style")?g(Kp,t.style):qp});return"color"===t.presets?(e=t.ariaLabel,o=t.value,u=r,{dom:(a=l.getOr(""),c={tag:"div",attributes:e.map(function(t){return{title:u.translate(t)}}).getOr({}),classes:["tox-swatch"]},et(et({},c),"custom"===o?{tag:"button",classes:b(c.classes,["tox-swatches__picker-btn"]),innerHtml:a}:"remove"===o?{classes:b(c.classes,["tox-swatch--remove"]),innerHtml:a}:{attributes:et(et({},c.attributes),{"data-mce-color":o}),styles:{"background-color":o}})),optComponents:[]}):Qp(t,l,n,f,s)},eh=["input","button","textarea","select"],oh=function(t,n,e){(n.disabled()?sh:lh)(t,n,e)},rh=function(t,n){return!0===n.useNative&&F(eh,Cr(t.element()))},ih=function(t){Br(t.element(),"disabled","disabled")},uh=function(t){Fr(t.element(),"disabled")},ah=function(t){Br(t.element(),"aria-disabled","true")},ch=function(t){Br(t.element(),"aria-disabled","false")},sh=function(n,t,e){t.disableClass.each(function(t){bi(n.element(),t)}),(rh(n,t)?ih:ah)(n),t.onDisabled(n)},lh=function(n,t,e){t.disableClass.each(function(t){xi(n.element(),t)}),(rh(n,t)?uh:ch)(n),t.onEnabled(n)},fh=function(t,n){return rh(t,n)?Ar(t.element(),"disabled"):"true"===Dr(t.element(),"aria-disabled")},dh=/* */Object.freeze({__proto__:null,enable:lh,disable:sh,isDisabled:fh,onLoad:oh,set:function(t,n,e,o){(o?sh:lh)(t,n,e)}}),mh=/* */Object.freeze({__proto__:null,exhibit:function(t,n){return ii({classes:n.disabled?n.disableClass.map(Y).getOr([]):[]})},events:function(e,t){return Yo([qo(xo(),function(t,n){return fh(t,e)}),Ia(e,t,oh)])}}),gh=[ie("disabled",c),Zn("useNative",!0),Yn("disableClass"),$u("onDisabled"),$u("onEnabled")],ph=La({fields:gh,name:"disabling",active:mh,apis:dh}),hh=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),vh=tinymce.util.Tools.resolve("tinymce.EditorManager"),bh=function(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))},yh=function(t){return t.getParam("width",hh.DOM.getStyle(t.getElement(),"width"))},xh=function(t){return st.from(t.settings.min_width).filter(rt)},wh=function(t){return st.from(t.settings.min_height).filter(rt)},Sh=function(t){return st.from(t.getParam("max_width")).filter(rt)},kh=function(t){return st.from(t.getParam("max_height")).filter(rt)},Ch=function(t){return!1!==t.getParam("menubar",!0,"boolean")},Oh=function(t){var n=t.getParam("toolbar",!0),e=!0===n,o=S(n),r=C(n)&&0<n.length;return!Th(t)&&(r||o||e)},_h=function(n){var t=lt(n.settings),e=P(t,function(t){return/^toolbar([1-9])$/.test(t)}),o=V(e,function(t){return n.getParam(t,!1,"string")}),r=P(o,function(t){return"string"==typeof t});return 0<r.length?st.some(r):st.none()},Th=function(t){return _h(t).fold(function(){return 0<t.getParam("toolbar",[],"string[]").length},function(){return!0})};(Jg=Kg=Kg||{})["default"]="wrap",Jg.floating="floating",Jg.sliding="sliding",Jg.scrolling="scrolling";var Eh,Bh,Dh=function(t){return t.getParam("toolbar_mode","","string")};(Bh=Eh=Eh||{}).auto="auto",Bh.top="top",Bh.bottom="bottom";var Mh,Ah,Fh=function(t){return t.getParam("toolbar_location",Eh.auto,"string")},Ih=function(t){return Fh(t)===Eh.bottom},Rh=function(t){var n=t.getParam("fixed_toolbar_container","","string");return 0<n.length&&t.inline?Mu(_i(),n):st.none()},Vh=function(t){return t.inline&&Rh(t).isSome()},Hh=function(t){return t.inline&&!Ch(t)&&!Oh(t)&&!Th(t)},Ph=function(t){return(t.getParam("toolbar_sticky",!1,"boolean")||t.inline)&&!Vh(t)&&!Hh(t)},zh="silver.readonly",Nh=ln([Nn("readonly",In)]),Lh=function(t,n){var e=t.outerContainer.element();n&&(t.mothership.broadcastOn([Zs()],{target:e}),t.uiMothership.broadcastOn([Zs()],{target:e})),t.mothership.broadcastOn([zh],{readonly:n}),t.uiMothership.broadcastOn([zh],{readonly:n})},jh=function(t,n){t.on("init",function(){t.mode.isReadOnly()&&Lh(n,!0)}),t.on("SwitchMode",function(){return Lh(n,t.mode.isReadOnly())}),t.getParam("readonly",!1,"boolean")&&t.setMode("readonly")},Uh=function(){var t;return Ya.config({channels:((t={})[zh]={schema:Nh,onReceive:function(t,n){ph.set(t,n.readonly)}},t)})},Wh=function(t){return ph.config({disabled:t,disableClass:"tox-collection__item--state-disabled"})},Gh=function(t){return ph.config({disabled:t})},Xh=function(t){return ph.config({disabled:t,disableClass:"tox-tbtn--disabled"})},Yh=function(t){return ph.config({disabled:t,disableClass:"tox-tbtn--disabled",useNative:!1})},qh=function(t,n){var e=t.getApi(n);return function(t){t(e)}},Kh=function(e,o){return or(function(t){qh(e,t)(function(t){var n=e.onSetup(t);null!==n&&n!==undefined&&o.set(n)})})},Jh=function(n,e){return rr(function(t){return qh(n,t)(e.get())})};(Ah=Mh=Mh||{})[Ah.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",Ah[Ah.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX";var $h=Mh,Qh={"alloy.execute":["disabling","alloy.base.behaviour","toggling","item-events"]},Zh=function(t){return U(t,function(t){return t.toArray()})},tv=function(t,n,e,o){var r,i,u=ce(Z);return{type:"item",dom:n.dom,components:Zh(n.optComponents),data:t.data,eventOrder:Qh,hasSubmenu:t.triggersSubmenu,itemBehaviours:za([Lm("item-events",[(r=t,i=e,ur(function(t,n){qh(r,t)(r.onAction),r.triggersSubmenu||i!==$h.CLOSE_ON_EXECUTE||(Lo(t,Co()),n.stop())})),Kh(t,u),Jh(t,u)]),Wh(function(){return t.disabled||o.isReadOnly()}),Uh(),Nm.config({})].concat(t.itemBehaviours))}},nv=function(t){return{value:t.value,meta:et({text:t.text.getOr("")},t.meta)}},ev=function(t,n){var e,o=Vp.translate(t),r=(e=o,hh.DOM.encode(e));if(0<n.length){var i=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");return r.replace(i,function(t){return'<span class="tox-autocompleter-highlight">'+t+"</span>"})}return r},ov=at(nf(pg(),hg())),rv=Nr("cell-over"),iv=Nr("cell-execute"),uv=function(n,e,t){var o,r=function(t){return jo(t,iv,{row:n,col:e})},i=function(t,n){n.stop(),r(t)};return Ji({dom:{tag:"div",attributes:((o={role:"button"})["aria-labelledby"]=t,o)},behaviours:za([Lm("insert-table-picker-cell",[Jo(ro(),Xm.focus),Jo(xo(),r),Jo(fo(),i),Jo(So(),i)]),rg.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Xm.config({onFocus:function(t){return jo(t,rv,{row:n,col:e})}})])})},av=function(t){return{value:t}},cv=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,sv=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,lv=function(t){return cv.test(t)||sv.test(t)},fv=function(t){var n={value:t.value.replace(cv,function(t,n,e,o){return n+n+e+e+o+o})},e=sv.exec(n.value);return null===e?["FFFFFF","FF","FF","FF"]:e},dv=function(t){var n=t.toString(16);return 1===n.length?"0"+n:n},mv=function(t){var n=dv(t.red)+dv(t.green)+dv(t.blue);return av(n)},gv=Math.min,pv=Math.max,hv=Math.round,vv=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,bv=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,yv=function(t,n,e,o){return{red:t,green:n,blue:e,alpha:o}},xv=function(t){var n=parseInt(t,10);return n.toString()===t&&0<=n&&n<=255},wv=function(t){var n,e,o,r=(t.hue||0)%360,i=t.saturation/100,u=t.value/100;if(i=pv(0,gv(i,1)),u=pv(0,gv(u,1)),0===i)return n=e=o=hv(255*u),yv(n,e,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),l=u-c;switch(Math.floor(a)){case 0:n=c,e=s,o=0;break;case 1:n=s,e=c,o=0;break;case 2:n=0,e=c,o=s;break;case 3:n=0,e=s,o=c;break;case 4:n=s,e=0,o=c;break;case 5:n=c,e=0,o=s;break;default:n=e=o=0}return n=hv(255*(n+l)),e=hv(255*(e+l)),o=hv(255*(o+l)),yv(n,e,o,1)},Sv=function(t){var n=fv(t),e=parseInt(n[1],16),o=parseInt(n[2],16),r=parseInt(n[3],16);return yv(e,o,r,1)},kv=function(t,n,e,o){var r=parseInt(t,10),i=parseInt(n,10),u=parseInt(e,10),a=parseFloat(o);return yv(r,i,u,a)},Cv=function(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"},Ov=yv(255,0,0,1),_v=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),Tv="tinymce-custom-colors";var Ev="choiceitem",Bv=[{type:Ev,text:"Light Green",value:"#BFEDD2"},{type:Ev,text:"Light Yellow",value:"#FBEEB8"},{type:Ev,text:"Light Red",value:"#F8CAC6"},{type:Ev,text:"Light Purple",value:"#ECCAFA"},{type:Ev,text:"Light Blue",value:"#C2E0F4"},{type:Ev,text:"Green",value:"#2DC26B"},{type:Ev,text:"Yellow",value:"#F1C40F"},{type:Ev,text:"Red",value:"#E03E2D"},{type:Ev,text:"Purple",value:"#B96AD9"},{type:Ev,text:"Blue",value:"#3598DB"},{type:Ev,text:"Dark Turquoise",value:"#169179"},{type:Ev,text:"Orange",value:"#E67E23"},{type:Ev,text:"Dark Red",value:"#BA372A"},{type:Ev,text:"Dark Purple",value:"#843FA1"},{type:Ev,text:"Dark Blue",value:"#236FA1"},{type:Ev,text:"Light Gray",value:"#ECF0F1"},{type:Ev,text:"Medium Gray",value:"#CED4D9"},{type:Ev,text:"Gray",value:"#95A5A6"},{type:Ev,text:"Dark Gray",value:"#7E8C8D"},{type:Ev,text:"Navy Blue",value:"#34495E"},{type:Ev,text:"Black",value:"#000000"},{type:Ev,text:"White",value:"#ffffff"}],Dv=function zF(e){void 0===e&&(e=10);var t,n=_v.getItem(Tv),o=S(n)?JSON.parse(n):[],r=e-(t=o).length<0?t.slice(0,e):t,i=function(t){r.splice(t,1)};return{add:function(t){var n;(-1===(n=A(r,t))?st.none():st.some(n)).each(i),r.unshift(t),r.length>e&&r.pop(),_v.setItem(Tv,JSON.stringify(r))},state:function(){return r.slice(0)}}}(10),Mv=function(t){return!1!==t.getParam("custom_colors")},Av=function(t){var n=t.getParam("color_map");return n!==undefined?function(t){var n=[],u=nt.document.createElement("canvas");u.height=1,u.width=1;for(var a=u.getContext("2d"),c=function(t,n){var e=n/255;return("0"+Math.round(t*e+255*(1-e)).toString(16)).slice(-2).toUpperCase()},e=function(t){if(/^[0-9A-Fa-f]{6}$/.test(t))return"#"+t.toUpperCase();a.clearRect(0,0,u.width,u.height),a.fillStyle="#FFFFFF",a.fillStyle=t,a.fillRect(0,0,1,1);var n=a.getImageData(0,0,1,1).data,e=n[0],o=n[1],r=n[2],i=n[3];return"#"+c(e,i)+c(o,i)+c(r,i)},o=0;o<t.length;o+=2)n.push({text:t[o+1],value:e(t[o]),type:"choiceitem"});return n}(n):Bv},Fv=function(t){Dv.add(t)},Iv=function(t,n){return t.fire("ResizeContent",n)},Rv=function(i){i.addCommand("mceApplyTextcolor",function(t,n){var e,o,r;o=t,r=n,(e=i).undoManager.transact(function(){e.focus(),e.formatter.apply(o,{value:r}),e.nodeChanged()})}),i.addCommand("mceRemoveTextcolor",function(t){var n,e;e=t,(n=i).undoManager.transact(function(){n.focus(),n.formatter.remove(e,{value:null},null,!0),n.nodeChanged()})})},Vv=function(t){var n,e,o=Av(t),r=(n=o.length,Math.max(5,Math.ceil(Math.sqrt(n))));return e=r,t.getParam("color_cols",e,"number")},Hv=function(n,e,t,o){"custom"===t?Uv(n)(function(t){t.each(function(t){Fv(t),n.execCommand("mceApplyTextcolor",e,t),o(t)})},"#000000"):"remove"===t?(o(""),n.execCommand("mceRemoveTextcolor",e)):(o(t),n.execCommand("mceApplyTextcolor",e,t))},Pv=function(t,n){return t.concat(V(Dv.state(),function(t){return{type:Ev,text:t,value:t}}).concat((o={type:e="choiceitem",text:"Remove color",icon:"color-swatch-remove-color",value:"remove"},n?[o,{type:e,text:"Custom color",icon:"color-picker",value:"custom"}]:[o])));var e,o},zv=function(n,e){return function(t){t(Pv(n,e))}},Nv=function(t,n,e){var o,r;o="forecolor"===n?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color",r=e,t.setIconFill(o,r),t.setIconStroke(o,r)},Lv=function(i,e,u,t,o){i.ui.registry.addSplitButton(e,{tooltip:t,presets:"color",icon:"forecolor"===e?"text-color":"highlight-bg-color",select:function(e){var t,o,r;return st.from((o=u,(t=i).dom.getParents(t.selection.getStart(),function(t){var n;(n=t.style["forecolor"===o?"color":"background-color"])&&(r=r||n)}),r)).bind(function(t){return function(t){if("transparent"===t)return st.some(yv(0,0,0,0));var n=vv.exec(t);if(null!==n)return st.some(kv(n[1],n[2],n[3],"1"));var e=bv.exec(t);return null!==e?st.some(kv(e[1],e[2],e[3],e[4])):st.none()}(t).map(function(t){var n=mv(t).value;return Ee(e.toLowerCase(),n)})}).getOr(!1)},columns:Vv(i),fetch:zv(Av(i),Mv(i)),onAction:function(t){null!==o.get()&&Hv(i,u,o.get(),function(){})},onItemAction:function(t,n){Hv(i,u,n,function(t){var n;o.set(t),n={name:e,color:t},i.fire("TextColorChange",n)})},onSetup:function(n){null!==o.get()&&Nv(n,e,o.get());var t=function(t){t.name===e&&Nv(n,t.name,t.color)};return i.on("TextColorChange",t),function(){i.off("TextColorChange",t)}}})},jv=function(n,t,e,o){n.ui.registry.addNestedMenuItem(t,{text:o,icon:"forecolor"===t?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(t){Hv(n,e,t.value,Z)}}]}})},Uv=function(i){return function(t,n){var e,o={colorpicker:n},r=(e=t,function(t){var n=t.getData();e(st.from(n.colorpicker)),t.close()});i.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o,onAction:function(t,n){"hex-valid"===n.name&&(n.value?t.enable("ok"):t.disable("ok"))},onSubmit:r,onClose:function(){},onCancel:function(){t(st.none())}})}},Wv=function(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:"color"===t?"tox-swatches":"tox-menu",tieredMenu:"tox-tiered-menu"}},Gv=function(t){var n=Wv(t);return{backgroundMenu:n.backgroundMenu,selectedMenu:n.selectedMenu,menu:n.menu,selectedItem:n.selectedItem,item:Gp(t)}},Xv=[Sg.parts().items({})],Yv=function(t,n,e){var o=Wv(e);return{dom:{tag:"div",classes:ut([[o.tieredMenu]])},markers:Gv(e)}},qv=function(e,o){return function(t){var n=R(t,o);return V(n,function(t){return{dom:e,components:t}})}},Kv=function(t,e){var o=[],r=[];return it(t,function(t,n){e(t,n)?(0<r.length&&o.push(r),r=[],yt(t.dom,"innerHtml")&&r.push(t)):r.push(t)}),0<r.length&&o.push(r),V(o,function(t){return{dom:{tag:"div",classes:["tox-collection__group"]},components:t}})},Jv=function(n,e,t){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===n?["tox-collection--list"]:["tox-collection--grid"])},components:[Sg.parts().items({preprocess:function(t){return"auto"!==n&&1<n?qv({tag:"div",classes:["tox-collection__group"]},n)(t):Kv(t,function(t,n){return"separator"===e[n].type})}})]}},$v=function(t){return I(t,function(t){return"icon"in t&&t.icon!==undefined})},Qv=function(t){return nt.console.error(Tn(t)),nt.console.log(t),st.none()},Zv=function(t,n,e,o,r){var i,u=(i=e,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[Sg.parts().items({preprocess:function(t){return Kv(t,function(t,n){return"separator"===i[n].type})}})]});return{value:t,dom:u.dom,components:u.components,items:e}},tb=function(t,n,e,o,r){var i,u,a,c,s,l;return"color"===r?{value:t,dom:(l=(i=o,{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[Sg.parts().items({preprocess:"auto"!==i?qv({tag:"div",classes:["tox-swatches__row"]},i):ct})]}]})).dom,components:l.components,items:e}:"normal"===r&&"auto"===o?{value:t,dom:(l=Jv(o,e)).dom,components:l.components,items:e}:"normal"===r&&1===o?{value:t,dom:(l=Jv(1,e)).dom,components:l.components,items:e}:"normal"===r?{value:t,dom:(l=Jv(o,e)).dom,components:l.components,items:e}:"listpreview"!==r||"auto"===o?{value:t,dom:(a=n,c=o,s=Wv(r),{tag:"div",classes:ut([[s.menu,"tox-menu-"+c+"-column"],a?[s.hasIcons]:[]])}),components:Xv,items:e}:{value:t,dom:(l=(u=o,{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[Sg.parts().items({preprocess:qv({tag:"div",classes:["tox-collection__group"]},u)})]})).dom,components:l.components,items:e}},nb=function(t,n,e,o,r,i,u,a){var c=$v(n),s=eb(n,e,o,"color"!==r?"normal":"color",i,u,a);return tb(t,c,s,o,r)},eb=function(e,o,r,i,u,a,c){return Tf(V(e,function(n){return"choiceitem"===n.type?Cn("choicemenuitem",kp,n).fold(Qv,function(t){return st.some(function(n,t,e,o,r,i,u,a){void 0===a&&(a=!0);var c=nh({presets:e,textContent:t?n.text:st.none(),htmlContent:st.none(),ariaLabel:n.text,iconContent:n.icon,shortcutContent:t?n.shortcut:st.none(),checkMark:t?st.some($p(u.icons)):st.none(),caret:st.none(),value:n.value},u,a);return Ct(tv({data:nv(n),disabled:n.disabled,getApi:function(n){return{setActive:function(t){rg.set(n,t)},isActive:function(){return rg.isOn(n)},isDisabled:function(){return ph.isDisabled(n)},setDisabled:function(t){return ph.set(n,t)}}},onAction:function(t){return o(n.value)},onSetup:function(t){return t.setActive(r),function(){}},triggersSubmenu:!1,itemBehaviours:[]},c,i,u),{toggling:{toggleClass:Lp,toggleOnExecute:!1,selected:n.active}})}(t,1===r,i,o,a(n.value),u,c,$v(e)))}):st.none()}))},ob=function(t,n){var e=Gv(n);return 1===t?{mode:"menu",moveOnTab:!0}:"auto"===t?{mode:"grid",selector:"."+e.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===n?"tox-swatches__row":"tox-collection__group")}};var rb,ib,ub={inserttable:function(o){var t=Nr("size-label"),i=function(t,n,e){for(var o=[],r=0;r<n;r++){for(var i=[],u=0;u<e;u++)i.push(uv(r,u,t));o.push(i)}return o}(t,10,10),u=Ug({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:t}},components:[Yi("0x0")],behaviours:za([Nm.config({})])});return{type:"widget",data:{value:Nr("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[ov().widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:U(i,function(t){return V(t,$i)}).concat(u.asSpec()),behaviours:za([Lm("insert-table-picker",[tr(rv,function(t,n,e){var o=e.event().row(),r=e.event().col();!function(t,n,e,o,r){for(var i=0;i<o;i++)for(var u=0;u<r;u++)rg.set(t[i][u],i<=n&&u<=e)}(i,o,r,10,10),Nm.set(u.get(t),[Yi(r+1+"x"+(o+1))])}),tr(iv,function(t,n,e){o.onAction({numRows:e.event().row()+1,numColumns:e.event().col()+1}),Lo(t,Co())})]),Rm.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function NF(n,t){var e=Pv(t.colorinput.getColors(),t.colorinput.hasCustomColors()),o=t.colorinput.getColorCols(),r=nb(Nr("menu-value"),e,function(t){n.onAction({value:t})},o,"color",$h.CLOSE_ON_EXECUTE,function(){return!1},t.shared.providers),i=et(et({},r),{markers:Gv("color"),movement:ob(o,"color")});return{type:"widget",data:{value:Nr("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[ov().widget(Sg.sketch(i))]}}},ab=function(n,e,t,o,r,i,u,a){void 0===a&&(a=!0);var c,s,l=nh({presets:o,textContent:st.none(),htmlContent:t?n.text.map(function(t){return ev(t,e)}):st.none(),ariaLabel:n.text,iconContent:n.icon,shortcutContent:st.none(),checkMark:st.none(),caret:st.none(),value:n.value},u.providers,a,n.icon);return tv({data:nv(n),disabled:n.disabled,getApi:function(){return{}},onAction:function(t){return r(n.value,n.meta)},onSetup:function(){return function(){}},triggersSubmenu:!1,itemBehaviours:(c=n.meta,s=u,bt(c,"tooltipWorker").map(function(e){return[Rp.config({lazySink:s.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(t){return{anchor:"submenu",item:t,overrides:{maxHeightFunction:hc}}},mode:"follow-highlight",onShow:function(n,t){e(function(t){Rp.setComponents(n,[qi({element:le.fromDom(t)})])})}})]}).getOr([]))},l,i,u.providers)},cb=function(t){var n=t.text.fold(function(){return{}},function(t){return{innerHtml:t}});return{type:"separator",dom:et({tag:"div",classes:[Pp,"tox-collection__group-heading"]},n),components:[]}},sb=function(t,n,e,o){void 0===o&&(o=!0);var r=nh({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:st.none(),ariaLabel:t.text,caret:st.none(),checkMark:st.none(),shortcutContent:t.shortcut},e,o);return tv({data:nv(t),getApi:function(n){return{isDisabled:function(){return ph.isDisabled(n)},setDisabled:function(t){return ph.set(n,t)}}},disabled:t.disabled,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,n,e)},lb=function(t,n,e,o,r){void 0===o&&(o=!0),void 0===r&&(r=!1);var i,u,a=r?(u=e.icons,{dom:{tag:"div",classes:[Up],innerHtml:Gg("chevron-down",u)}}):(i=e.icons,{dom:{tag:"div",classes:[Up],innerHtml:Gg("chevron-right",i)}}),c=nh({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:st.none(),ariaLabel:t.text,caret:st.some(a),checkMark:st.none(),shortcutContent:t.shortcut},e,o);return tv({data:nv(t),getApi:function(n){return{isDisabled:function(){return ph.isDisabled(n)},setDisabled:function(t){return ph.set(n,t)}}},disabled:t.disabled,onAction:Z,onSetup:t.onSetup,triggersSubmenu:!0,itemBehaviours:[]},c,n,e)},fb=function(t,n,e,o){void 0===o&&(o=!0);var r=nh({iconContent:t.icon,textContent:t.text,htmlContent:st.none(),ariaLabel:t.text,checkMark:st.some($p(e.icons)),caret:st.none(),shortcutContent:t.shortcut,presets:"normal",meta:t.meta},e,o);return Ct(tv({data:nv(t),disabled:t.disabled,getApi:function(n){return{setActive:function(t){rg.set(n,t)},isActive:function(){return rg.isOn(n)},isDisabled:function(){return ph.isDisabled(n)},setDisabled:function(t){return ph.set(n,t)}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,n,e),{toggling:{toggleClass:Lp,toggleOnExecute:!1,selected:t.active}})},db=function(n,e){return t=ub,o=n.fancytype,(Object.prototype.hasOwnProperty.call(t,o)?st.some(t[o]):st.none()).map(function(t){return t(n,e)});var t,o};(ib=rb=rb||{})[ib.ContentFocus=0]="ContentFocus",ib[ib.UiFocus=1]="UiFocus";var mb=function(t,n,e,o,r){var i=e.shared.providers,u=function(t){return r?et(et({},t),{shortcut:st.none(),icon:t.text.isSome()?st.none():t.icon}):t};switch(t.type){case"menuitem":return Cn("menuitem",xp,t).fold(Qv,function(t){return st.some(sb(u(t),n,i,o))});case"nestedmenuitem":return Cn("nestedmenuitem",wp,t).fold(Qv,function(t){return st.some(lb(u(t),n,i,o,r))});case"togglemenuitem":return Cn("togglemenuitem",Sp,t).fold(Qv,function(t){return st.some(fb(u(t),n,i,o))});case"separator":return Cn("separatormenuitem",pp,t).fold(Qv,function(t){return st.some(cb(t))});case"fancymenuitem":return Cn("fancymenuitem",Cp,t).fold(Qv,function(t){return db(u(t),e)});default:return nt.console.error("Unknown item in general menu",t),st.none()}},gb=function(t,n,e,o,r,i){var u=1===o,a=!u||$v(t);return Tf(V(t,function(t){return"separator"===t.type?Cn("Autocompleter.Separator",pp,t).fold(Qv,function(t){return st.some(cb(t))}):Cn("Autocompleter.Item",hp,t).fold(Qv,function(t){return st.some(ab(t,n,u,"normal",e,r,i,a))})}))},pb=function(t,n,e,o,r){var i=$v(n),u=Tf(V(n,function(t){var n=function(t){return mb(t,e,o,(n=t,r?!n.hasOwnProperty("text"):i),r);var n};return"nestedmenuitem"===t.type&&t.getSubmenuItems().length<=0?n(et(et({},t),{disabled:!0})):n(t)}));return(r?Zv:tb)(t,i,u,1,"normal")},hb=function(t){return Eg.singleData(t.value,t)},vb=function(d,c){var e=ce(st.none()),s=ce(!1),m=Ji(Bg.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:za([Lm("dismissAutocompleter",[Jo(Fo(),function(){return f()})])]),lazySink:c.getSink})),o=function(){return e.get().isSome()},l=function(){o()&&Bg.hide(m)},f=function(){if(o()){var t=e.get().map(function(t){return t.element});np(t.getOr(le.fromDom(d.selection.getNode()))).each(wr),l(),e.set(st.none()),s.set(!1)}},r=_t(function(){return bp(d)}),g=function(t,n,e,o){t.matchLength=n.text.length;var r,i,u,a,c,s,l,f=Q(e,function(t){return st.from(t.columns)}).getOr(1);Bg.showAt(m,{anchor:"node",root:le.fromDom(d.getBody()),node:st.from(t.element)},Sg.sketch((r=tb("autocompleter-value",!0,o,f,"normal"),i=f,u=rb.ContentFocus,a="normal",c=(u===rb.ContentFocus?cd:ad)(),s=ob(i,a),l=Gv(a),{dom:r.dom,components:r.components,items:r.items,value:r.value,markers:{selectedItem:l.selectedItem,item:l.item},movement:s,fakeFocus:u===rb.ContentFocus,focusManager:c,menuBehaviours:Tp("auto"!==i?[]:[or(function(o,t){Op(o,4,l.item).each(function(t){var n=t.numColumns,e=t.numRows;Rm.setGridSize(o,e,n)})})])}))),Bg.getContent(m).each(jf.highlightFirst)},p=function(t){var n;n=t,e.get().map(function(t){return up(d.dom,d.selection.getRng(),t.triggerChar).bind(function(t){return gp(d,r,t,n)})}).getOrThunk(function(){return mp(d,r)}).fold(f,function(a){!function(t){if(!o()){var n=tp(d,t.range);e.set(st.some({triggerChar:t.triggerChar,element:n,matchLength:t.text.length})),s.set(!1)}}(a.context),a.lookupData.then(function(u){e.get().map(function(t){var n,e,o,r=a.context;if(t.triggerChar===r.triggerChar){var i=(n=r.triggerChar,o=Q(e=u,function(t){return st.from(t.columns)}).getOr(1),U(e,function(i){var t=i.items;return gb(t,i.matchText,function(o,r){var t=d.selection.getRng();up(d.dom,t,n).fold(function(){return nt.console.error("Lost context. Cursor probably moved")},function(t){var n=t.range,e={hide:function(){f()},reload:function(t){l(),p(t)}};s.set(!0),i.onAction(e,n,o,r),s.set(!1)})},o,$h.BUBBLE_TO_SANDBOX,c)}));0<i.length?g(t,r,u,i):(10<=r.text.length-t.matchLength?f:l)()}})})})},t={onKeypress:$g(function(t){27!==t.which&&p()},50),cancelIfNecessary:f,isMenuOpen:function(){return Bg.isOpen(m)},isActive:o,isProcessingAction:s.get,getView:function(){return Bg.getContent(m)}};ap(t,d)},bb=at(!0),yb=function(t,n,e){return fu(t,n,bb,e,!1)},xb=function(t,n,e){return fu(t,n,bb,e,!0)},wb=lu,Sb=function(t,n,e){return Au(t,n,e).isSome()};function kb(e,o){var r=null;return{cancel:function(){null!==r&&(nt.clearTimeout(r),r=null)},schedule:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];r=nt.setTimeout(function(){e.apply(null,t),r=null},o)}}}var Cb=function(t){var n=t.raw();return n.touches===undefined||1!==n.touches.length?st.none():st.some(n.touches[0])},Ob=function(e){var u=ce(st.none()),o=ce(!1),r=kb(function(t){e.triggerEvent(ko(),t),o.set(!0)},400),i=Jt([{key:Je(),value:function(e){return Cb(e).each(function(t){r.cancel();var n={x:t.clientX,y:t.clientY,target:e.target()};r.schedule(e),o.set(!1),u.set(st.some(n))}),st.none()}},{key:$e(),value:function(t){return r.cancel(),Cb(t).each(function(i){u.get().each(function(t){var n,e,o,r;n=i,e=t,o=Math.abs(n.clientX-e.x),r=Math.abs(n.clientY-e.y),(5<o||5<r)&&u.set(st.none())})}),st.none()}},{key:Qe(),value:function(n){r.cancel();return u.get().filter(function(t){return Le(t.target,n.target())}).map(function(t){return o.get()?(n.prevent(),!1):e.triggerEvent(So(),n)})}}]);return{fireIfReady:function(n,t){return bt(i,t).bind(function(t){return t(n)})}}},_b=function(){return Pe().browser.isFirefox()},Tb=sn([Un("triggerEvent"),Zn("stopBackspace",!0)]),Eb=function(n,t){var e,o,r,i,u=_n("Getting GUI events settings",Tb,t),a=Ob(u),c=V(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),function(t){return yb(n,t,function(n){a.fireIfReady(n,t).each(function(t){t&&n.kill()}),u.triggerEvent(t,n)&&n.kill()})}),s=ce(st.none()),l=yb(n,"paste",function(n){a.fireIfReady(n,"paste").each(function(t){t&&n.kill()}),u.triggerEvent("paste",n)&&n.kill(),s.set(st.some(nt.setTimeout(function(){u.triggerEvent(bo(),n)},0)))}),f=yb(n,"keydown",function(t){var n;u.triggerEvent("keydown",t)?t.kill():!0!==u.stopBackspace||(8!==(n=t).raw().which||F(["input","textarea"],Cr(n.target()))||Sb(n.target(),'[contenteditable="true"]'))||t.prevent()}),d=(e=n,o=function(t){u.triggerEvent("focusin",t)&&t.kill()},_b()?xb(e,"focus",o):yb(e,"focusin",o)),m=ce(st.none()),g=(r=n,i=function(t){u.triggerEvent("focusout",t)&&t.kill(),m.set(st.some(nt.setTimeout(function(){u.triggerEvent(vo(),t)},0)))},_b()?xb(r,"blur",i):yb(r,"focusout",i));return{unbind:function(){it(c,function(t){t.unbind()}),f.unbind(),d.unbind(),g.unbind(),l.unbind(),s.get().each(nt.clearTimeout),m.get().each(nt.clearTimeout)}}},Bb=function(t,n){var e=bt(t,"target").map(function(t){return t()}).getOr(n);return ce(e)},Db=wt([{stopped:[]},{resume:["element"]},{complete:[]}]),Mb=function(t,o,n,e,r,i){var u,a,c,s,l=t(o,e),f=(u=n,a=r,c=ce(!1),s=ce(!1),{stop:function(){c.set(!0)},cut:function(){s.set(!0)},isStopped:c.get,isCut:s.get,event:at(u),setSource:a.set,getSource:a.get});return l.fold(function(){return i.logEventNoHandlers(o,e),Db.complete()},function(n){var e=n.descHandler;return ai(e)(f),f.isStopped()?(i.logEventStopped(o,n.element,e.purpose()),Db.stopped()):f.isCut()?(i.logEventCut(o,n.element,e.purpose()),Db.complete()):lr(n.element).fold(function(){return i.logNoParent(o,n.element,e.purpose()),Db.complete()},function(t){return i.logEventResponse(o,n.element,e.purpose()),Db.resume(t)})})},Ab=function(n,e,o,t,r,i){return Mb(n,e,o,t,r,i).fold(function(){return!0},function(t){return Ab(n,e,o,t,r,i)},function(){return!1})},Fb=function(t,n,e){var o,r,i=(o=n,r=ce(!1),{stop:function(){r.set(!0)},cut:Z,isStopped:r.get,isCut:at(!1),event:at(o),setSource:u("Cannot set source of a broadcasted event"),getSource:u("Cannot get source of a broadcasted event")});return it(t,function(t){var n=t.descHandler();ai(n)(i)}),i.isStopped()},Ib=function(t,n,e,o,r){var i=Bb(e,o);return Ab(t,n,e,o,i,r)},Rb=function(t,n){return{element:t,descHandler:n}},Vb=function(t,n){return{id:at(t),descHandler:at(n)}};function Hb(){var i={};return{registerId:function(o,r,t){ft(t,function(t,n){var e=i[n]!==undefined?i[n]:{};e[r]=ui(t,o),i[n]=e})},unregisterId:function(e){ft(i,function(t,n){t.hasOwnProperty(e)&&delete t[e]})},filterByType:function(t){return bt(i,t).map(function(t){return pt(t,function(t,n){return Vb(n,t)})}).getOr([])},find:function(t,n,e){var r=bt(i,n);return Xe(e,function(t){return e=r,Xr(o=t).fold(function(){return st.none()},function(n){return e.bind(function(t){return bt(t,n)}).map(function(t){return Rb(o,t)})});var e,o},t)}}}function Pb(){var o=Hb(),r={},i=function(o){var t=o.element();return Xr(t).fold(function(){return t="uid-",n=o.element(),e=Nr(Ur+t),Gr(n,e),e;var t,n,e},function(t){return t})},u=function(t){Xr(t.element()).each(function(t){delete r[t],o.unregisterId(t)})};return{find:function(t,n,e){return o.find(t,n,e)},filter:function(t){return o.filterByType(t)},register:function(t){var n=i(t);xt(r,n)&&function(t,n){var e=r[n];if(e!==t)throw new Error('The tagId "'+n+'" is already used by: '+Vr(e.element())+"\nCannot use it for: "+Vr(t.element())+"\nThe conflicting element is"+(Oi(e.element())?" ":" not ")+"already in the DOM");u(t)}(t,n);var e=[t];o.registerId(e,n,t.events()),r[n]=t},unregister:u,getById:function(t){return bt(r,t)}}}var zb,Nb,Lb,jb,Ub=Of({name:"Container",factory:function(t){var n=t.dom,e=n.attributes,o=y(n,["attributes"]);return{uid:t.uid,dom:et({tag:"div",attributes:et({role:"presentation"},e)},o),components:t.components,behaviours:xl(t.containerBehaviours),events:t.events,domModification:t.domModification,eventOrder:t.eventOrder}},configFields:[Zn("components",[]),yl("containerBehaviours",[]),Zn("events",{}),Zn("domModification",{}),Zn("eventOrder",{})]}),Wb=function(e){var o=function(n){return lr(e.element()).fold(function(){return!0},function(t){return Le(n,t)})},r=Pb(),s=function(t,n){return r.find(o,t,n)},t=Eb(e.element(),{triggerEvent:function(u,a){return ju(u,a.target(),function(t){return n=s,e=u,r=t,i=(o=a).target(),Ib(n,e,o,i,r);var n,e,o,r,i})}}),i={debugInfo:at("real"),triggerEvent:function(n,e,o){ju(n,e,function(t){return Ib(s,n,o,e,t)})},triggerFocus:function(a,c){Xr(a).fold(function(){Ka(a)},function(t){ju(ho(),a,function(t){var n,e,o,r,i,u;return n=s,e=ho(),o={originator:at(c),kill:Z,prevent:Z,target:at(a)},i=t,u=Bb(o,r=a),Mb(n,e,o,r,u,i),!1})})},triggerEscape:function(t,n){i.triggerEvent("keydown",t.element(),n.event())},getByUid:function(t){return g(t)},getByDom:function(t){return p(t)},build:Ji,addToGui:function(t){a(t)},removeFromGui:function(t){c(t)},addToWorld:function(t){n(t)},removeFromWorld:function(t){u(t)},broadcast:function(t){f(t)},broadcastOn:function(t,n){d(t,n)},broadcastEvent:function(t,n){m(t,n)},isConnected:at(!0)},n=function(t){t.connect(i),Tr(t.element())||(r.register(t),it(t.components(),n),i.triggerEvent(_o(),t.element(),{target:at(t.element())}))},u=function(t){Tr(t.element())||(it(t.components(),u),r.unregister(t)),t.disconnect()},a=function(t){Rs(e,t)},c=function(t){Ps(t)},l=function(e){var t=r.filter(yo());it(t,function(t){var n=t.descHandler();ai(n)(e)})},f=function(t){l({universal:at(!0),data:at(t)})},d=function(t,n){l({universal:at(!1),channels:at(t),data:at(n)})},m=function(t,n){var e=r.filter(t);return Fb(e,n)},g=function(t){return r.getById(t).fold(function(){return ot.error(new Error('Could not find component with uid: "'+t+'" in system.'))},ot.value)},p=function(t){var n=Xr(t).getOr("not found");return g(n)};return n(e),{root:at(e),element:e.element,destroy:function(){t.unbind(),xr(e.element())},add:a,remove:c,getByUid:g,getByDom:p,addToWorld:n,removeFromWorld:u,broadcast:f,broadcastOn:d,broadcastEvent:m}},Gb=Nr("form-component-change"),Xb=Nr("form-close"),Yb=Nr("form-cancel"),qb=Nr("form-action"),Kb=Nr("form-submit"),Jb=Nr("form-block"),$b=Nr("form-unblock"),Qb=Nr("form-tabchange"),Zb=Nr("form-resize"),ty=at([Zn("prefix","form-field"),yl("fieldBehaviours",[Mf,bl])]),ny=at([Jl({schema:[zn("dom")],name:"label"}),Jl({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[zn("text")],name:"aria-descriptor"}),ql({factory:{sketch:function(t){var n=qt(t,["factory"]);return t.factory.sketch(n)}},schema:[zn("factory")],name:"field"})]),ey=_f({name:"FormField",configFields:ty(),partFields:ny(),factory:function(r,t,n,e){var o=wl(r.fieldBehaviours,[Mf.config({find:function(t){return sf(t,r,"field")}}),bl.config({store:{mode:"manual",getValue:function(t){return Mf.getCurrent(t).bind(bl.getValue)},setValue:function(t,n){Mf.getCurrent(t).each(function(t){bl.setValue(t,n)})}}})]),i=Yo([or(function(t,n){var o=ff(t,r,["label","field","aria-descriptor"]);o.field().each(function(e){var n=Nr(r.prefix);o.label().each(function(t){Br(t.element(),"for",n),Br(e.element(),"id",n)}),o["aria-descriptor"]().each(function(t){var n=Nr(r.prefix);Br(t.element(),"id",n),Br(e.element(),"aria-describedby",n)})})})]),u={getField:function(t){return sf(t,r,"field")},getLabel:function(t){return sf(t,r,"label")}};return{uid:r.uid,dom:r.dom,components:t,behaviours:o,events:i,apis:u}},apis:{getField:function(t,n){return t.getField(n)},getLabel:function(t,n){return t.getLabel(n)}}}),oy=at([Yn("data"),Zn("inputAttributes",{}),Zn("inputStyles",{}),Zn("tag","input"),Zn("inputClasses",[]),$u("onSetValue"),Zn("styles",{}),Zn("eventOrder",{}),yl("inputBehaviours",[bl,Xm]),Zn("selectOnFocus",!0)]),ry=function(t){return za([Xm.config({onFocus:t.selectOnFocus?function(t){var n=t.element(),e=zi(n);n.dom().setSelectionRange(0,e.length)}:Z})])},iy=function(t){return{tag:t.tag,attributes:et({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}},uy=Of({name:"Input",configFields:oy(),factory:function(t,n){return{uid:t.uid,dom:iy(t),components:[],behaviours:et(et({},ry(e=t)),wl(e.inputBehaviours,[bl.config({store:et(et({mode:"manual"},e.data.map(function(t){return{initialValue:t}}).getOr({})),{getValue:function(t){return zi(t.element())},setValue:function(t,n){zi(t.element())!==n&&Ni(t.element(),n)}}),onSetValue:e.onSetValue})])),eventOrder:t.eventOrder};var e}}),ay={},cy={exports:ay};zb=undefined,Nb=ay,Lb=cy,jb=undefined,function(t){if("object"==typeof Nb&&void 0!==Lb)Lb.exports=t();else if("function"==typeof zb&&zb.amd)zb([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}}(function(){return function l(i,u,a){function c(n,t){if(!u[n]){if(!i[n]){var e="function"==typeof jb&&jb;if(!t&&e)return e(n,!0);if(s)return s(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var r=u[n]={exports:{}};i[n][0].call(r.exports,function(t){return c(i[n][1][t]||t)},r,r.exports,l,i,u,a)}return u[n].exports}for(var s="function"==typeof jb&&jb,t=0;t<a.length;t++)c(a[t]);return c}({1:[function(t,n,e){var o,r,i=n.exports={};function u(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(t){if(o===setTimeout)return setTimeout(t,0);if((o===u||!o)&&setTimeout)return o=setTimeout,setTimeout(t,0);try{return o(t,0)}catch(n){try{return o.call(null,t,0)}catch(n){return o.call(this,t,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:u}catch(t){o=u}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,l=[],f=!1,d=-1;function m(){f&&s&&(f=!1,s.length?l=s.concat(l):d=-1,l.length&&g())}function g(){if(!f){var t=c(m);f=!0;for(var n=l.length;n;){for(s=l,l=[];++d<n;)s&&s[d].run();d=-1,n=l.length}s=null,f=!1,function e(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(n){try{return r.call(null,t)}catch(n){return r.call(this,t)}}}(t)}}function p(t,n){this.fun=t,this.array=n}function h(){}i.nextTick=function(t){var n=new Array(arguments.length-1);if(1<arguments.length)for(var e=1;e<arguments.length;e++)n[e-1]=arguments[e];l.push(new p(t,n)),1!==l.length||f||c(g)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(t,f,n){(function(n){function o(){}function i(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(t,this)}function r(o,r){for(;3===o._state;)o=o._value;0!==o._state?(o._handled=!0,i._immediateFn(function(){var t=1===o._state?r.onFulfilled:r.onRejected;if(null!==t){var n;try{n=t(o._value)}catch(e){return void a(r.promise,e)}u(r.promise,n)}else(1===o._state?u:a)(r.promise,o._value)})):o._deferreds.push(r)}function u(t,n){try{if(n===t)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var e=n.then;if(n instanceof i)return t._state=3,t._value=n,void c(t);if("function"==typeof e)return void l(function o(t,n){return function(){t.apply(n,arguments)}}(e,n),t)}t._state=1,t._value=n,c(t)}catch(r){a(t,r)}}function a(t,n){t._state=2,t._value=n,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&i._immediateFn(function(){t._handled||i._unhandledRejectionFn(t._value)});for(var n=0,e=t._deferreds.length;n<e;n++)r(t,t._deferreds[n]);t._deferreds=null}function s(t,n,e){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=e}function l(t,n){var e=!1;try{t(function(t){e||(e=!0,u(n,t))},function(t){e||(e=!0,a(n,t))})}catch(o){if(e)return;e=!0,a(n,o)}}var t,e;t=this,e=setTimeout,i.prototype["catch"]=function(t){return this.then(null,t)},i.prototype.then=function(t,n){var e=new this.constructor(o);return r(this,new s(t,n,e)),e},i.all=function(t){var c=Array.prototype.slice.call(t);return new i(function(r,i){if(0===c.length)return r([]);var u=c.length;function a(n,t){try{if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void e.call(t,function(t){a(n,t)},i)}c[n]=t,0==--u&&r(c)}catch(o){i(o)}}for(var t=0;t<c.length;t++)a(t,c[t])})},i.resolve=function(n){return n&&"object"==typeof n&&n.constructor===i?n:new i(function(t){t(n)})},i.reject=function(e){return new i(function(t,n){n(e)})},i.race=function(r){return new i(function(t,n){for(var e=0,o=r.length;e<o;e++)r[e].then(t,n)})},i._immediateFn="function"==typeof n?function(t){n(t)}:function(t){e(t,0)},i._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},i._setImmediateFn=function(t){i._immediateFn=t},i._setUnhandledRejectionFn=function(t){i._unhandledRejectionFn=t},void 0!==f&&f.exports?f.exports=i:t.Promise||(t.Promise=i)}).call(this,t("timers").setImmediate)},{timers:3}],3:[function(c,t,s){(function(t,n){var o=c("process/browser.js").nextTick,e=Function.prototype.apply,r=Array.prototype.slice,i={},u=0;function a(t,n){this._id=t,this._clearFn=n}s.setTimeout=function(){return new a(e.call(setTimeout,window,arguments),clearTimeout)},s.setInterval=function(){return new a(e.call(setInterval,window,arguments),clearInterval)},s.clearTimeout=s.clearInterval=function(t){t.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(window,this._id)},s.enroll=function(t,n){clearTimeout(t._idleTimeoutId),t._idleTimeout=n},s.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},s._unrefActive=s.active=function(t){clearTimeout(t._idleTimeoutId);var n=t._idleTimeout;0<=n&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},n))},s.setImmediate="function"==typeof t?t:function(t){var n=u++,e=!(arguments.length<2)&&r.call(arguments,1);return i[n]=!0,o(function(){i[n]&&(e?t.apply(null,e):t.call(null),s.clearImmediate(n))}),n},s.clearImmediate="function"==typeof n?n:function(t){delete i[t]}}).call(this,c("timers").setImmediate,c("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(t,n,e){var o=t("promise-polyfill"),r="undefined"!=typeof window?window:Function("return this;")();n.exports={boltExport:r.Promise||o}},{"promise-polyfill":2}]},{},[4])(4)});var sy,ly,fy=cy.exports.boltExport,dy=function(t){var e=st.none(),n=[],o=function(t){r()?u(t):n.push(t)},r=function(){return e.isSome()},i=function(t){it(t,u)},u=function(n){e.each(function(t){nt.setTimeout(function(){n(t)},0)})};return t(function(t){e=st.some(t),i(n),n=[]}),{get:o,map:function(e){return dy(function(n){o(function(t){n(e(t))})})},isReady:r}},my={nu:dy,pure:function(n){return dy(function(t){t(n)})}},gy=function(t){nt.setTimeout(function(){throw t},0)},py=function(e){var t=function(t){e().then(t,gy)};return{map:function(t){return py(function(){return e().then(t)})},bind:function(n){return py(function(){return e().then(function(t){return n(t).toPromise()})})},anonBind:function(t){return py(function(){return e().then(function(){return t.toPromise()})})},toLazy:function(){return my.nu(t)},toCached:function(){var t=null;return py(function(){return null===t&&(t=e()),t})},toPromise:e,get:t}},hy=function(t){return py(function(){return new fy(t)})},vy=function(t){return py(function(){return fy.resolve(t)})},by=["input","textarea"],yy=function(t){var n=Cr(t);return F(by,n)},xy=function(t,n){var e=n.getRoot(t).getOr(t.element());xi(e,n.invalidClass),n.notify.each(function(n){yy(t.element())&&Br(t.element(),"aria-invalid",!1),n.getContainer(t).each(function(t){kr(t,n.validHtml)}),n.onValid(t)})},wy=function(n,t,e,o){var r=t.getRoot(n).getOr(n.element());bi(r,t.invalidClass),t.notify.each(function(t){yy(n.element())&&Br(n.element(),"aria-invalid",!0),t.getContainer(n).each(function(t){kr(t,o)}),t.onInvalid(n,o)})},Sy=function(n,t,e){return t.validator.fold(function(){return vy(ot.value(!0))},function(t){return t.validate(n)})},ky=function(n,e,t){return e.notify.each(function(t){t.onValidate(n)}),Sy(n,e).map(function(t){return n.getSystem().isConnected()?t.fold(function(t){return wy(n,e,0,t),ot.error(t)},function(t){return xy(n,e),ot.value(t)}):ot.error("No longer in system")})},Cy=/* */Object.freeze({__proto__:null,markValid:xy,markInvalid:wy,query:Sy,run:ky,isInvalid:function(t,n){var e=n.getRoot(t).getOr(t.element());return wi(e,n.invalidClass)}}),Oy=/* */Object.freeze({__proto__:null,events:function(n,t){return n.validator.map(function(t){return Yo([Jo(t.onEvent,function(t){ky(t,n).get(ct)})].concat(t.validateOnLoad?[or(function(t){ky(t,n).get(Z)})]:[]))}).getOr({})}}),_y=[zn("invalidClass"),Zn("getRoot",st.none),Qn("notify",[Zn("aria","alert"),Zn("getContainer",st.none),Zn("validHtml",""),$u("onValid"),$u("onInvalid"),$u("onValidate")]),Qn("validator",[zn("validate"),Zn("onEvent","input"),Zn("validateOnLoad",!0)])],Ty=La({fields:_y,name:"invalidating",active:Oy,apis:Cy,extra:{validation:function(e){return function(t){var n=bl.getValue(t);return vy(e(n))}}}}),Ey=/* */Object.freeze({__proto__:null,exhibit:function(t,n){return ii({attributes:Jt([{key:n.tabAttr,value:"true"}])})}}),By=[Zn("tabAttr","data-alloy-tabstop")],Dy=La({fields:By,name:"tabstopping",active:Ey}),My=function(t,n,e,o){var r=Ay(t,n,e,o);return ey.sketch(r)},Ay=function(t,n,e,o){return{dom:Fy(e),components:t.toArray().concat([n]),fieldBehaviours:za(o)}},Fy=function(t){return{tag:"div",classes:["tox-form__group"].concat(t)}},Iy=function(t,n){return ey.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:n.translate(t)}})},Ry=/* */Object.freeze({__proto__:null,getCoupled:function(t,n,e,o){return e.getOrCreate(t,n,o)}}),Vy=[Nn("others",kn(ot.value,Dn()))],Hy=La({fields:Vy,name:"coupling",apis:Ry,state:/* */Object.freeze({__proto__:null,init:function(){var i={},t=at({});return oi({readState:t,getOrCreate:function(e,o,r){var t=lt(o.others);if(t)return bt(i,r).getOrThunk(function(){var t=bt(o.others,r).getOrDie("No information found for coupled component: "+r)(e),n=e.getSystem().build(t);return i[r]=n});throw new Error("Cannot find coupled component: "+r+". Known coupled components: "+JSON.stringify(t,null,2))}})}})}),Py=at("sink"),zy=at(Jl({name:Py(),overrides:at({dom:{tag:"div"},behaviours:za([Ds.config({useFixed:i})]),events:Yo([nr(ao()),nr(to()),nr(fo())])})}));(ly=sy=sy||{})[ly.HighlightFirst=0]="HighlightFirst",ly[ly.HighlightNone=1]="HighlightNone";var Ny=function(t,n){var e=t.getHotspot(n).getOr(n),o=t.getAnchorOverrides();return t.layouts.fold(function(){return{anchor:"hotspot",hotspot:e,overrides:o}},function(t){return{anchor:"hotspot",hotspot:e,overrides:o,layouts:t}})},Ly=function(t,n,e,o,r,i,u){var a,c,s,l,f,d,m,g,p,h,v=Ny(t,e);return(c=v,l=o,f=r,d=u,m=n,g=s=e,p=(0,(a=t).fetch)(g).map(m),h=Gy(s,a),p.map(function(t){return t.bind(function(t){return st.from(Eg.sketch(et(et({},f.menu()),{uid:Yr(""),data:t,highlightImmediately:d===sy.HighlightFirst,onOpenMenu:function(t,n){var e=h().getOrDie();Ds.position(e,c,n),Qs.decloak(l)},onOpenSubmenu:function(t,n,e){var o=h().getOrDie();Ds.position(o,{anchor:"submenu",item:n},e),Qs.decloak(l)},onRepositionMenu:function(t,n,e){var o=h().getOrDie();Ds.position(o,c,n),it(e,function(t){Ds.position(o,{anchor:"submenu",item:t.triggeringItem},t.triggeredMenu)})},onEscape:function(){return Xm.focus(s),Qs.close(l),st.some(!0)}})))})})).map(function(t){return t.fold(function(){Qs.isOpen(o)&&Qs.close(o)},function(t){Qs.cloak(o),Qs.open(o,t),i(o)}),o})},jy=function(t,n,e,o,r,i,u){return Qs.close(o),vy(o)},Uy=function(t,n,e,o,r,i){var u=Hy.getCoupled(e,"sandbox");return(Qs.isOpen(u)?jy:Ly)(t,n,e,u,o,r,i)},Wy=function(t,n,e){var o,r,i=Mf.getCurrent(n).getOr(n),u=cu(t.element());e?Di(i.element(),"min-width",u+"px"):(o=i.element(),r=u,au.set(o,r))},Gy=function(n,t){return n.getSystem().getByUid(t.uid+"-"+Py()).map(function(t){return function(){return ot.value(t)}}).getOrThunk(function(){return t.lazySink.fold(function(){return function(){return ot.error(new Error("No internal sink is specified, nor could an external sink be found"))}},function(t){return function(){return t(n)}})})},Xy=function(t){Qs.getState(t).each(function(t){Eg.repositionMenus(t)})},Yy=function(o,r,i){var u=Fu(),t=Gy(r,o);return{dom:{tag:"div",classes:o.sandboxClasses,attributes:{id:u.id,role:"listbox"}},behaviours:kl(o.sandboxBehaviours,[bl.config({store:{mode:"memory",initialValue:r}}),Qs.config({onOpen:function(t,n){var e=Ny(o,r);u.link(r.element()),o.matchWidth&&Wy(e.hotspot,n,o.useMinWidth),o.onOpen(e,t,n),i!==undefined&&i.onOpen!==undefined&&i.onOpen(t,n)},onClose:function(t,n){u.unlink(r.element()),i!==undefined&&i.onClose!==undefined&&i.onClose(t,n)},isPartOf:function(t,n,e){return Ru(n,e)||Ru(r,e)},getAttachPoint:function(){return t().getOrDie()}}),Mf.config({find:function(t){return Qs.getState(t).bind(function(t){return Mf.getCurrent(t)})}}),Ya.config({channels:et(et({},ol({isExtraPart:c})),il({doReposition:Xy}))})])}},qy=function(t){var n=Hy.getCoupled(t,"sandbox");Xy(n)},Ky=function(){return[Zn("sandboxClasses",[]),Sl("sandboxBehaviours",[Mf,Ya,Qs,bl])]},Jy=at([zn("dom"),zn("fetch"),$u("onOpen"),Qu("onExecute"),Zn("getHotspot",st.some),Zn("getAnchorOverrides",at({})),Tc(),yl("dropdownBehaviours",[rg,Hy,Rm,Xm]),zn("toggleClass"),Zn("eventOrder",{}),Yn("lazySink"),Zn("matchWidth",!1),Zn("useMinWidth",!1),Yn("role")].concat(Ky())),$y=at([Kl({schema:[qu()],name:"menu",defaults:function(t){return{onExecute:t.onExecute}}}),zy()]),Qy=_f({name:"Dropdown",configFields:Jy(),partFields:$y(),factory:function(n,t,e,o){var r,i,u=function(t){Qs.getState(t).each(function(t){Eg.highlightPrimary(t)})},a={expand:function(t){rg.isOn(t)||Uy(n,function(t){return t},t,o,Z,sy.HighlightNone).get(Z)},open:function(t){rg.isOn(t)||Uy(n,function(t){return t},t,o,Z,sy.HighlightFirst).get(Z)},isOpen:rg.isOn,close:function(t){rg.isOn(t)&&Uy(n,function(t){return t},t,o,Z,sy.HighlightFirst).get(Z)},repositionMenus:function(t){rg.isOn(t)&&qy(t)}},c=function(t,n){return Uo(t),st.some(!0)};return{uid:n.uid,dom:n.dom,components:t,behaviours:wl(n.dropdownBehaviours,[rg.config({toggleClass:n.toggleClass,aria:{mode:"expanded"}}),Hy.config({others:{sandbox:function(t){return Yy(n,t,{onOpen:function(){rg.on(t)},onClose:function(){rg.off(t)}})}}}),Rm.config({mode:"special",onSpace:c,onEnter:c,onDown:function(t,n){if(Qy.isOpen(t)){var e=Hy.getCoupled(t,"sandbox");u(e)}else Qy.open(t);return st.some(!0)},onEscape:function(t,n){return Qy.isOpen(t)?(Qy.close(t),st.some(!0)):st.none()}}),Xm.config({})]),events:ug(st.some(function(t){Uy(n,function(t){return t},t,o,u,sy.HighlightFirst).get(Z)})),eventOrder:et(et({},n.eventOrder),((r={})[xo()]=["disabling","toggling","alloy.base.behaviour"],r)),apis:a,domModification:{attributes:et(et({"aria-haspopup":"true"},n.role.fold(function(){return{}},function(t){return{role:t}})),"button"===n.dom.tag?{type:(i="type",bt(n.dom,"attributes").bind(function(t){return bt(t,i)}).getOr("button"))}:{})}}},apis:{open:function(t,n){return t.open(n)},expand:function(t,n){return t.expand(n)},close:function(t,n){return t.close(n)},isOpen:function(t,n){return t.isOpen(n)},repositionMenus:function(t,n){return t.repositionMenus(n)}}}),Zy=La({fields:[],name:"unselecting",active:/* */Object.freeze({__proto__:null,events:function(){return Yo([qo(go(),at(!0))])},exhibit:function(){return ii({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}})}),tx=Nr("color-input-change"),nx=Nr("color-swatch-change"),ex=Nr("color-picker-cancel"),ox=function(e,n,o){var r,i,t=ey.parts().field({factory:uy,inputClasses:["tox-textfield"],onSetValue:function(t){return Ty.run(t).get(function(){})},inputBehaviours:za([ph.config({disabled:n.providers.isReadOnly}),Uh(),Dy.config({}),Ty.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return lr(t.element())},notify:{onValid:function(t){var n=bl.getValue(t);jo(t,tx,{color:n})}},validator:{validateOnLoad:!1,validate:function(t){var n=bl.getValue(t);if(0===n.length)return vy(ot.value(!0));var e=le.fromTag("span");Di(e,"background-color",n);var o=Ri(e,"background-color").fold(function(){return ot.error("blah")},function(t){return ot.value(n)});return vy(o)}}})]),selectOnFocus:!1}),u=e.label.map(function(t){return Iy(t,n.providers)}),a=function(t,n){jo(t,nx,{value:n})},c=Ug((r={dom:{tag:"span",attributes:{"aria-label":n.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[Sa,wa,_a]},onLtr:function(){return[wa,Sa,_a]}},components:[],fetch:zv(o.getColors(),o.hasCustomColors()),columns:o.getColorCols(),presets:"color",onItemAction:function(t,e){c.getOpt(t).each(function(n){"custom"===e?o.colorPicker(function(t){t.fold(function(){return Lo(n,ex)},function(t){a(n,t),Fv(t)})},"#ffffff"):a(n,"remove"===e?"":e)})}},i=n,Qy.sketch({dom:r.dom,components:r.components,toggleClass:"mce-active",dropdownBehaviours:za([Gh(i.providers.isReadOnly),Uh(),Zy.config({}),Dy.config({})]),layouts:r.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:i.getSink,fetch:function(n){return hy(function(t){return r.fetch(t)}).map(function(t){return st.from(hb(Ct(nb(Nr("menu-value"),t,function(t){r.onItemAction(n,t)},r.columns,r.presets,$h.CLOSE_ON_EXECUTE,function(){return!1},i.providers),{movement:ob(r.columns,r.presets)})))})},parts:{menu:Yv(0,0,r.presets)}})));return ey.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:u.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[t,c.asSpec()]}]),fieldBehaviours:za([Lm("form-field-events",[Jo(tx,function(t,n){c.getOpt(t).each(function(t){Di(t.element(),"background-color",n.event().color())}),jo(t,Gb,{name:e.name})}),Jo(nx,function(n,e){ey.getField(n).each(function(t){bl.setValue(t,e.event().value()),Mf.getCurrent(n).each(Xm.focus)})}),Jo(ex,function(n,t){ey.getField(n).each(function(t){Mf.getCurrent(n).each(Xm.focus)})})])])})},rx=function(t,n,e){return{hue:t,saturation:n,value:e}},ix=Nr("rgb-hex-update"),ux=Nr("slider-update"),ax=Nr("palette-update"),cx=Jl({schema:[zn("dom")],name:"label"}),sx=function(n){return Jl({name:n+"-edge",overrides:function(t){return t.model.manager.edgeActions[n].fold(function(){return{}},function(o){return{events:Yo([$o(Je(),function(t,n,e){return o(t,e)},[t]),$o(to(),function(t,n,e){return o(t,e)},[t]),$o(no(),function(t,n,e){e.mouseIsDown.get()&&o(t,e)},[t])])}})}})},lx=sx("top-left"),fx=sx("top"),dx=sx("top-right"),mx=sx("right"),gx=sx("bottom-right"),px=sx("bottom"),hx=sx("bottom-left"),vx=[cx,sx("left"),mx,fx,px,lx,dx,hx,gx,ql({name:"thumb",defaults:at({dom:{styles:{position:"absolute"}}}),overrides:function(t){return{events:Yo([Zo(Je(),t,"spectrum"),Zo($e(),t,"spectrum"),Zo(Qe(),t,"spectrum"),Zo(to(),t,"spectrum"),Zo(no(),t,"spectrum"),Zo(oo(),t,"spectrum")])}}}),ql({schema:[ae("mouseIsDown",function(){return ce(!1)})],name:"spectrum",overrides:function(e){var o=e.model.manager,r=function(n,t){return o.getValueFromEvent(t).map(function(t){return o.setValueFrom(n,e,t)})};return{behaviours:za([Rm.config({mode:"special",onLeft:function(t){return o.onLeft(t,e)},onRight:function(t){return o.onRight(t,e)},onUp:function(t){return o.onUp(t,e)},onDown:function(t){return o.onDown(t,e)}}),Xm.config({})]),events:Yo([Jo(Je(),r),Jo($e(),r),Jo(to(),r),Jo(no(),function(t,n){e.mouseIsDown.get()&&r(t,n)})])}}})],bx=at("slider.change.value"),yx=function(t){var n=t.event().raw();if(-1!==n.type.indexOf("touch")){return n.touches!==undefined&&1===n.touches.length?st.some(n.touches[0]).map(function(t){return ou(t.clientX,t.clientY)}):st.none()}return n.clientX!==undefined?st.some(n).map(function(t){return ou(t.clientX,t.clientY)}):st.none()},xx=function(t){return t.model.minX},wx=function(t){return t.model.minY},Sx=function(t){return t.model.minX-1},kx=function(t){return t.model.minY-1},Cx=function(t){return t.model.maxX},Ox=function(t){return t.model.maxY},_x=function(t){return t.model.maxX+1},Tx=function(t){return t.model.maxY+1},Ex=function(t,n,e){return n(t)-e(t)},Bx=function(t){return Ex(t,Cx,xx)},Dx=function(t){return Ex(t,Ox,wx)},Mx=function(t){return Bx(t)/2},Ax=function(t){return Dx(t)/2},Fx=function(t){return t.stepSize},Ix=function(t){return t.snapToGrid},Rx=function(t){return t.snapStart},Vx=function(t){return t.rounded},Hx=function(t,n){return t[n+"-edge"]!==undefined},Px=function(t){return Hx(t,"left")},zx=function(t){return Hx(t,"right")},Nx=function(t){return Hx(t,"top")},Lx=function(t){return Hx(t,"bottom")},jx=function(t){return t.model.value.get()},Ux=function(t){return{x:at(t)}},Wx=function(t){return{y:at(t)}},Gx=function(t,n){return{x:at(t),y:at(n)}},Xx=function(t,n){jo(t,bx(),{value:n})},Yx=function(t,n,e,o){return t<n?t:e<t?e:t===n?n-1:Math.max(n,t-o)},qx=function(t,n,e,o){return e<t?t:t<n?n:t===e?e+1:Math.min(e,t+o)},Kx=function(t,n,e){return Math.max(n,Math.min(e,t))},Jx=function(t){var n=t.min,e=t.max,o=t.range,r=t.value,i=t.step,u=t.snap,a=t.snapStart,c=t.rounded,s=t.hasMinEdge,l=t.hasMaxEdge,f=t.minBound,d=t.maxBound,m=t.screenRange,g=s?n-1:n,p=l?e+1:e;if(r<f)return g;if(d<r)return p;var h,v,b,y,x,w,S,k=(x=r,w=f,S=d,Math.min(S,Math.max(x,w))-w),C=Kx(k/m*o+n,g,p);return u&&n<=C&&C<=e?(h=C,v=n,b=e,y=i,a.fold(function(){var t=h-v,n=Math.round(t/y)*y;return Kx(v+n,v-1,b+1)},function(t){var n=(h-t)%y,e=Math.round(n/y),o=Math.floor((h-t)/y),r=Math.floor((b-t)/y),i=t+Math.min(r,o+e)*y;return Math.max(t,i)})):c?Math.round(C):C},$x=function(t){var n=t.min,e=t.max,o=t.range,r=t.value,i=t.hasMinEdge,u=t.hasMaxEdge,a=t.maxBound,c=t.maxOffset,s=t.centerMinEdge,l=t.centerMaxEdge;return r<n?i?0:s:e<r?u?a:l:(r-n)/o*c},Qx="left",Zx=function(t){return t.element().dom().getBoundingClientRect()},tw=function(t,n){return t[n]},nw=function(t){var n=Zx(t);return tw(n,Qx)},ew=function(t){var n=Zx(t);return tw(n,"right")},ow=function(t){var n=Zx(t);return tw(n,"top")},rw=function(t){var n=Zx(t);return tw(n,"bottom")},iw=function(t){var n=Zx(t);return tw(n,"width")},uw=function(t){var n=Zx(t);return tw(n,"height")},aw=function(t,n,e){return(t+n)/2-e},cw=function(t,n){var e=Zx(t),o=Zx(n),r=tw(e,Qx),i=tw(e,"right"),u=tw(o,Qx);return aw(r,i,u)},sw=function(t,n){var e=Zx(t),o=Zx(n),r=tw(e,"top"),i=tw(e,"bottom"),u=tw(o,"top");return aw(r,i,u)},lw=function(t,n){jo(t,bx(),{value:n})},fw=function(t){return{x:at(t)}},dw=function(t,n,e){var o={min:xx(n),max:Cx(n),range:Bx(n),value:e,step:Fx(n),snap:Ix(n),snapStart:Rx(n),rounded:Vx(n),hasMinEdge:Px(n),hasMaxEdge:zx(n),minBound:nw(t),maxBound:ew(t),screenRange:iw(t)};return Jx(o)},mw=function(i){return function(t,n){return e=t,r=(0<i?qx:Yx)(jx(o=n).x(),xx(o),Cx(o),Fx(o)),lw(e,fw(r)),st.some(r).map(function(){return!0});var e,o,r}},gw=function(t,n,e,o,r,i){var u,a,c,s,l,f,d,m,g,p=(a=i,c=e,s=o,l=r,f=iw(u=n),d=s.bind(function(t){return st.some(cw(t,u))}).getOr(0),m=l.bind(function(t){return st.some(cw(t,u))}).getOr(f),g={min:xx(a),max:Cx(a),range:Bx(a),value:c,hasMinEdge:Px(a),hasMaxEdge:zx(a),minBound:nw(u),minOffset:0,maxBound:ew(u),maxOffset:f,centerMinEdge:d,centerMaxEdge:m},$x(g));return nw(n)-nw(t)+p},pw=mw(-1),hw=mw(1),vw=st.none,bw=st.none,yw={"top-left":st.none(),top:st.none(),"top-right":st.none(),right:st.some(function(t,n){Xx(t,Ux(_x(n)))}),"bottom-right":st.none(),bottom:st.none(),"bottom-left":st.none(),left:st.some(function(t,n){Xx(t,Ux(Sx(n)))})},xw=/* */Object.freeze({__proto__:null,setValueFrom:function(t,n,e){var o=dw(t,n,e),r=fw(o);return lw(t,r),o},setToMin:function(t,n){var e=xx(n);lw(t,fw(e))},setToMax:function(t,n){var e=Cx(n);lw(t,fw(e))},findValueOfOffset:dw,getValueFromEvent:function(t){return yx(t).map(function(t){return t.left()})},findPositionOfValue:gw,setPositionFromValue:function(t,n,e,o){var r=jx(e),i=gw(t,o.getSpectrum(t),r.x(),o.getLeftEdge(t),o.getRightEdge(t),e),u=cu(n.element())/2;Di(n.element(),"left",i-u+"px")},onLeft:pw,onRight:hw,onUp:vw,onDown:bw,edgeActions:yw}),ww=function(t,n){jo(t,bx(),{value:n})},Sw=function(t){return{y:at(t)}},kw=function(t,n,e){var o={min:wx(n),max:Ox(n),range:Dx(n),value:e,step:Fx(n),snap:Ix(n),snapStart:Rx(n),rounded:Vx(n),hasMinEdge:Nx(n),hasMaxEdge:Lx(n),minBound:ow(t),maxBound:rw(t),screenRange:uw(t)};return Jx(o)},Cw=function(i){return function(t,n){return e=t,r=(0<i?qx:Yx)(jx(o=n).y(),wx(o),Ox(o),Fx(o)),ww(e,Sw(r)),st.some(r).map(function(){return!0});var e,o,r}},Ow=function(t,n,e,o,r,i){var u,a,c,s,l,f,d,m,g,p=(a=i,c=e,s=o,l=r,f=uw(u=n),d=s.bind(function(t){return st.some(sw(t,u))}).getOr(0),m=l.bind(function(t){return st.some(sw(t,u))}).getOr(f),g={min:wx(a),max:Ox(a),range:Dx(a),value:c,hasMinEdge:Nx(a),hasMaxEdge:Lx(a),minBound:ow(u),minOffset:0,maxBound:rw(u),maxOffset:f,centerMinEdge:d,centerMaxEdge:m},$x(g));return ow(n)-ow(t)+p},_w=st.none,Tw=st.none,Ew=Cw(-1),Bw=Cw(1),Dw={"top-left":st.none(),top:st.some(function(t,n){Xx(t,Wx(kx(n)))}),"top-right":st.none(),right:st.none(),"bottom-right":st.none(),bottom:st.some(function(t,n){Xx(t,Wx(Tx(n)))}),"bottom-left":st.none(),left:st.none()},Mw=/* */Object.freeze({__proto__:null,setValueFrom:function(t,n,e){var o=kw(t,n,e),r=Sw(o);return ww(t,r),o},setToMin:function(t,n){var e=wx(n);ww(t,Sw(e))},setToMax:function(t,n){var e=Ox(n);ww(t,Sw(e))},findValueOfOffset:kw,getValueFromEvent:function(t){return yx(t).map(function(t){return t.top()})},findPositionOfValue:Ow,setPositionFromValue:function(t,n,e,o){var r=jx(e),i=Ow(t,o.getSpectrum(t),r.y(),o.getTopEdge(t),o.getBottomEdge(t),e),u=tu(n.element())/2;Di(n.element(),"top",i-u+"px")},onLeft:_w,onRight:Tw,onUp:Ew,onDown:Bw,edgeActions:Dw}),Aw=function(t,n){jo(t,bx(),{value:n})},Fw=function(t,n){return{x:at(t),y:at(n)}},Iw=function(c,s){return function(t,n){return o=t,r=n,i=0<c?qx:Yx,u=(e=s)?jx(r).x():i(jx(r).x(),xx(r),Cx(r),Fx(r)),a=e?i(jx(r).y(),wx(r),Ox(r),Fx(r)):jx(r).y(),Aw(o,Fw(u,a)),st.some(u).map(function(){return!0});var e,o,r,i,u,a}},Rw=Iw(-1,!1),Vw=Iw(1,!1),Hw=Iw(-1,!0),Pw=Iw(1,!0),zw={"top-left":st.some(function(t,n){Xx(t,Gx(Sx(n),kx(n)))}),top:st.some(function(t,n){Xx(t,Gx(Mx(n),kx(n)))}),"top-right":st.some(function(t,n){Xx(t,Gx(_x(n),kx(n)))}),right:st.some(function(t,n){Xx(t,Gx(_x(n),Ax(n)))}),"bottom-right":st.some(function(t,n){Xx(t,Gx(_x(n),Tx(n)))}),bottom:st.some(function(t,n){Xx(t,Gx(Mx(n),Tx(n)))}),"bottom-left":st.some(function(t,n){Xx(t,Gx(Sx(n),Tx(n)))}),left:st.some(function(t,n){Xx(t,Gx(Sx(n),Ax(n)))})},Nw=/* */Object.freeze({__proto__:null,setValueFrom:function(t,n,e){var o=dw(t,n,e.left()),r=kw(t,n,e.top()),i=Fw(o,r);return Aw(t,i),i},setToMin:function(t,n){var e=xx(n),o=wx(n);Aw(t,Fw(e,o))},setToMax:function(t,n){var e=Cx(n),o=Ox(n);Aw(t,Fw(e,o))},getValueFromEvent:function(t){return yx(t)},setPositionFromValue:function(t,n,e,o){var r=jx(e),i=gw(t,o.getSpectrum(t),r.x(),o.getLeftEdge(t),o.getRightEdge(t),e),u=Ow(t,o.getSpectrum(t),r.y(),o.getTopEdge(t),o.getBottomEdge(t),e),a=cu(n.element())/2,c=tu(n.element())/2;Di(n.element(),"left",i-a+"px"),Di(n.element(),"top",u-c+"px")},onLeft:Rw,onRight:Vw,onUp:Hw,onDown:Pw,edgeActions:zw}),Lw=_f({name:"Slider",configFields:[Zn("stepSize",1),Zn("onChange",Z),Zn("onChoose",Z),Zn("onInit",Z),Zn("onDragStart",Z),Zn("onDragEnd",Z),Zn("snapToGrid",!1),Zn("rounded",!0),Yn("snapStart"),Nn("model",Bn("mode",{x:[Zn("minX",0),Zn("maxX",100),ae("value",function(t){return ce(t.mode.minX)}),zn("getInitialValue"),na("manager",xw)],y:[Zn("minY",0),Zn("maxY",100),ae("value",function(t){return ce(t.mode.minY)}),zn("getInitialValue"),na("manager",Mw)],xy:[Zn("minX",0),Zn("maxX",100),Zn("minY",0),Zn("maxY",100),ae("value",function(t){return ce({x:at(t.mode.minX),y:at(t.mode.minY)})}),zn("getInitialValue"),na("manager",Nw)]})),yl("sliderBehaviours",[Rm,bl]),ae("mouseIsDown",function(){return ce(!1)})],partFields:vx,factory:function(i,t,n,e){var o,u=function(t){return lf(t,i,"thumb")},a=function(t){return lf(t,i,"spectrum")},r=function(t){return sf(t,i,"left-edge")},c=function(t){return sf(t,i,"right-edge")},s=function(t){return sf(t,i,"top-edge")},l=function(t){return sf(t,i,"bottom-edge")},f=i.model,d=f.manager,m=function(t,n){d.setPositionFromValue(t,n,i,{getLeftEdge:r,getRightEdge:c,getTopEdge:s,getBottomEdge:l,getSpectrum:a})},g=function(t,n){f.value.set(n);var e=u(t);return m(t,e),i.onChange(t,e,n),st.some(!0)},p=function(e){var t=i.mouseIsDown.get();i.mouseIsDown.set(!1),t&&sf(e,i,"thumb").each(function(t){var n=f.value.get();i.onChoose(e,t,n)})},h=function(t,n){n.stop(),i.mouseIsDown.set(!0),i.onDragStart(t,u(t))},v=function(t,n){n.stop(),i.onDragEnd(t,u(t)),p(t)};return{uid:i.uid,dom:i.dom,components:t,behaviours:wl(i.sliderBehaviours,[Rm.config({mode:"special",focusIn:function(t){return sf(t,i,"spectrum").map(Rm.focusIn).map(at(!0))}}),bl.config({store:{mode:"manual",getValue:function(t){return f.value.get()}}}),Ya.config({channels:((o={})[nl()]={onReceive:p},o)})]),events:Yo([Jo(bx(),function(t,n){g(t,n.event().value())}),or(function(t,n){var e=f.getInitialValue();f.value.set(e);var o=u(t);m(t,o);var r=a(t);i.onInit(t,o,r,f.value.get())}),Jo(Je(),h),Jo(Qe(),v),Jo(to(),h),Jo(oo(),v)]),apis:{resetToMin:function(t){d.setToMin(t,i)},resetToMax:function(t){d.setToMax(t,i)},changeValue:g,refresh:m},domModification:{styles:{position:"relative"}}}},apis:{resetToMin:function(t,n){t.resetToMin(n)},resetToMax:function(t,n){t.resetToMax(n)},refresh:function(t,n){t.refresh(n)}}}),jw=[yl("formBehaviours",[bl])],Uw=function(t){return"<alloy.field."+t+">"},Ww=function(o,t){return{uid:o.uid,dom:o.dom,components:t,behaviours:wl(o.formBehaviours,[bl.config({store:{mode:"manual",getValue:function(t){var n=df(t,o);return dt(n,function(t,r){return t().bind(function(t){var n,e,o=Mf.getCurrent(t);return n=o,e=new Error("Cannot find a current component to extract the value from for form part '"+r+"': "+Vr(t.element())),n.fold(function(){return ot.error(e)},ot.value)}).map(bl.getValue)})},setValue:function(e,t){ft(t,function(n,t){sf(e,o,t).each(function(t){Mf.getCurrent(t).each(function(t){bl.setValue(t,n)})})})}}})]),apis:{getField:function(t,n){return sf(t,o,n).bind(Mf.getCurrent)}}}},Gw={getField:ni(function(t,n,e){return t.getField(n,e)}),sketch:function(t){var e,n=(e=[],{field:function(t,n){return e.push(t),of("form",Uw(t),n)},record:function(){return e}}),o=t(n),r=n.record(),i=V(r,function(t){return ql({name:t,pname:Uw(t)})});return yf("form",jw,i,Ww,o)}},Xw=Nr("valid-input"),Yw=Nr("invalid-input"),qw=Nr("validating-input"),Kw="colorcustom.rgb.",Jw=function(d,m,g,p){var h=function(t,n,e,o,r){var i,u,a=d(Kw+"range"),c=[ey.parts().label({dom:{tag:"label",innerHtml:e,attributes:{"aria-label":o}}}),ey.parts().field({data:r,factory:uy,inputAttributes:et({type:"text"},"hex"===n?{"aria-live":"polite"}:{}),inputClasses:[m("textfield")],inputBehaviours:za([(i=n,u=t,Ty.config({invalidClass:m("invalid"),notify:{onValidate:function(t){jo(t,qw,{type:i})},onValid:function(t){jo(t,Xw,{type:i,value:bl.getValue(t)})},onInvalid:function(t){jo(t,Yw,{type:i,value:bl.getValue(t)})}},validator:{validate:function(t){var n=bl.getValue(t),e=u(n)?ot.value(!0):ot.error(d("aria.input.invalid"));return vy(e)},validateOnLoad:!1}})),Dy.config({})]),onSetValue:function(t){Ty.isInvalid(t)&&Ty.run(t).get(Z)}})],s="hex"!==n?[ey.parts()["aria-descriptor"]({text:a})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:c.concat(s)}},v=function(t,n){var e=n.red,o=n.green,r=n.blue;bl.setValue(t,{red:e,green:o,blue:r})},b=Ug({dom:{tag:"div",classes:[m("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),y=function(t,n){b.getOpt(t).each(function(t){Di(t.element(),"background-color","#"+n.value)})};return Of({factory:function(){var e={red:ce(st.some(255)),green:ce(st.some(255)),blue:ce(st.some(255)),hex:ce(st.some("ffffff"))},o=function(t){return e[t].get()},i=function(t,n){e[t].set(n)},r=function(t){var n=t.red,e=t.green,o=t.blue;i("red",st.some(n)),i("green",st.some(e)),i("blue",st.some(o))},n=function(t,n){var e=n.event();"hex"!==e.type()?i(e.type(),st.none()):p(t)},u=function(r,t,n){var e=parseInt(n,10);i(t,st.some(e)),o("red").bind(function(e){return o("green").bind(function(n){return o("blue").map(function(t){return yv(e,n,t,1)})})}).each(function(t){var n,e,o=(n=r,e=mv(t),Gw.getField(n,"hex").each(function(t){Xm.isFocused(t)||bl.setValue(n,{hex:e.value})}),e);y(r,o)})},a=function(t,n){var e=n.event();"hex"===e.type()?function(t,n){g(t);var e=av(n);i("hex",st.some(n));var o=Sv(e);v(t,o),r(o),jo(t,ix,{hex:e}),y(t,e)}(t,e.value()):u(t,e.type(),e.value())},t=function(t){return{label:d(Kw+t+".label"),description:d(Kw+t+".description")}},c=t("red"),s=t("green"),l=t("blue"),f=t("hex");return Ct(Gw.sketch(function(t){return{dom:{tag:"form",classes:[m("rgb-form")],attributes:{"aria-label":d("aria.color.picker")}},components:[t.field("red",ey.sketch(h(xv,"red",c.label,c.description,255))),t.field("green",ey.sketch(h(xv,"green",s.label,s.description,255))),t.field("blue",ey.sketch(h(xv,"blue",l.label,l.description,255))),t.field("hex",ey.sketch(h(lv,"hex",f.label,f.description,"ffffff"))),b.asSpec()],formBehaviours:za([Ty.config({invalidClass:m("form-invalid")}),Lm("rgb-form-events",[Jo(Xw,a),Jo(Yw,n),Jo(qw,n)])])}}),{apis:{updateHex:function(t,n){var e,o;bl.setValue(t,{hex:n.value}),e=t,o=Sv(n),v(e,o),r(o),y(t,n)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,n,e){t.updateHex(n,e)}},extraApis:{}})},$w=function(t,o){var r=Lw.parts().spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[o("sv-palette-spectrum")]}}),i=Lw.parts().thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette-thumb")],innerHtml:"<div class="+o("sv-palette-inner-thumb")+' role="presentation"></div>'}}),u=function(t,n){var e=t.width,o=t.height,r=t.getContext("2d");if(null!==r){r.fillStyle=n,r.fillRect(0,0,e,o);var i=r.createLinearGradient(0,0,e,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=i,r.fillRect(0,0,e,o);var u=r.createLinearGradient(0,0,0,o);u.addColorStop(0,"rgba(0,0,0,0)"),u.addColorStop(1,"rgba(0,0,0,1)"),r.fillStyle=u,r.fillRect(0,0,e,o)}};return Of({factory:function(t){var n=at({x:at(0),y:at(0)}),e=za([Mf.config({find:st.some}),Xm.config({})]);return Lw.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette")]},model:{mode:"xy",getInitialValue:n},rounded:!1,components:[r,i],onChange:function(t,n,e){jo(t,ax,{value:e})},onInit:function(t,n,e,o){u(e.element().dom(),Cv(Ov))},sliderBehaviours:e})},name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(t,n,e){var o,r;o=e,r=n.components()[0].element().dom(),u(r,Cv(o))}},extraApis:{}})},Qw=function(f,d){return Of({name:"ColourPicker",configFields:[zn("dom"),Zn("onValidHex",Z),Zn("onInvalidHex",Z)],factory:function(t){var a,v,n,e,o,r=Jw(f,d,t.onValidHex,t.onInvalidHex),i=$w(0,d),b={paletteRgba:ce(Ov)},u=Ug(i.sketch({})),c=Ug(r.sketch({})),s=function(t,e){u.getOpt(t).each(function(t){var n=Sv(e);b.paletteRgba.set(n),i.setRgba(t,n)})},l=function(t,n){c.getOpt(t).each(function(t){r.updateHex(t,n)})},y=function(n,e,t){it(t,function(t){t(n,e)})};return{uid:t.uid,dom:t.dom,components:[u.asSpec(),(n=d,e=Lw.parts().spectrum({dom:{tag:"div",classes:[n("hue-slider-spectrum")],attributes:{role:"presentation"}}}),o=Lw.parts().thumb({dom:{tag:"div",classes:[n("hue-slider-thumb")],attributes:{role:"presentation"}}}),Lw.sketch({dom:{tag:"div",classes:[n("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:at({y:at(0)})},components:[e,o],sliderBehaviours:za([Xm.config({})]),onChange:function(t,n,e){jo(t,ux,{value:e})}})),c.asSpec()],behaviours:za([Lm("colour-picker-events",[Jo(ax,(v=[l],function(t,n){var e,o,r,i,u,a,c,s,l,f=n.event().value(),d=b.paletteRgba.get(),m=(i=r=0,u=(e=d).red/255,a=e.green/255,c=e.blue/255,s=Math.min(u,Math.min(a,c)),l=Math.max(u,Math.max(a,c)),s===l?rx(0,0,100*(i=s)):(r=60*((r=u===s?3:c===s?1:5)-(u===s?a-c:c===s?u-a:c-u)/(l-s)),o=(l-s)/l,i=l,rx(Math.round(r),Math.round(100*o),Math.round(100*i)))),g=rx(m.hue,f.x(),100-f.y()),p=wv(g),h=mv(p);y(t,h,v)})),Jo(ux,(a=[s,l],function(t,n){var e,o,r,i=n.event().value(),u=(e=i.y(),o=rx((100-e)/100*360,100,100),r=wv(o),mv(r));y(t,u,a)}))]),Mf.config({find:function(t){return c.getOpt(t)}}),Rm.config({mode:"acyclic"})])}}})},Zw=function(){return Mf.config({find:st.some})},tS=function(t){return Mf.config({find:t.getOpt})},nS=function(t){return Mf.config({find:function(n){return mr(n.element(),t).bind(function(t){return n.getSystem().getByDom(t).toOption()})}})},eS={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},oS=function(t){return eS[t]},rS=tinymce.util.Tools.resolve("tinymce.Resource"),iS=ln([Zn("preprocess",ct),Zn("postprocess",ct)]),uS=function(t,n,e){return bl.config(Ct({store:{mode:"manual",getValue:n,setValue:e}},t.map(function(t){return{store:{initialValue:t}}}).getOr({})))},aS=function(t,n,e){return uS(t,function(t){return n(t.element())},function(t,n){return e(t.element(),n)})},cS=function(r,t){var i=_n("RepresentingConfigs.memento processors",iS,t);return bl.config({store:{mode:"manual",getValue:function(t){var n=r.get(t),e=bl.getValue(n);return i.postprocess(e)},setValue:function(t,n){var e=i.preprocess(n),o=r.get(t);bl.setValue(o,e)}}})},sS=uS,lS=function(t){return aS(t,Sr,kr)},fS=function(t){return bl.config({store:{mode:"memory",initialValue:t}})},dS=function(r,n){var e=function(t,n){n.stop()},o=function(t){return function(n,e){it(t,function(t){t(n,e)})}},i=function(t,n){if(!ph.isDisabled(t)){var e=n.event().raw();a(t,e.dataTransfer.files)}},u=function(t,n){var e=n.event().raw().target.files;a(t,e)},a=function(t,n){var e,o;bl.setValue(t,(e=n,o=new RegExp("("+".jpg,.jpeg,.png,.gif".split(/\s*,\s*/).join("|")+")$","i"),P($(e),function(t){return o.test(t.name)}))),jo(t,Gb,{name:r.name})},c=Ug({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:za([Lm("input-file-events",[nr(fo()),nr(So())])])}),t=r.label.map(function(t){return Iy(t,n)}),s=ey.parts().field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:za([fS([]),Zw(),ph.config({}),rg.config({toggleClass:"dragenter",toggleOnExecute:!1}),Lm("dropzone-events",[Jo("dragenter",o([e,rg.toggle])),Jo("dragleave",o([e,rg.toggle])),Jo("dragover",e),Jo("drop",o([e,i])),Jo(lo(),u)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:n.translate("Drop an image here")}},jg.sketch({dom:{tag:"button",innerHtml:n.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[c.asSpec()],action:function(t){c.get(t).element().dom().click()},buttonBehaviours:za([Dy.config({}),Gh(n.isReadOnly),Uh()])})]}]}}}});return My(t,s,["tox-form__group--stretched"],[])},mS=Nr("alloy-fake-before-tabstop"),gS=Nr("alloy-fake-after-tabstop"),pS=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:za([Xm.config({ignore:!0}),Dy.config({})])}},hS=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[pS([mS]),t,pS([gS])],behaviours:za([nS(1)])}},vS=function(t,n){jo(t,ao(),{raw:{which:9,shiftKey:n}})},bS=function(t,n){var e=n.element();wi(e,mS)?vS(t,!0):wi(e,gS)&&vS(t,!1)},yS=function(t){return Sb(t,["."+mS,"."+gS].join(","),at(!1))},xS=!(Pe().browser.isIE()||Pe().browser.isEdge()),wS=function(t,n){var o,r,e=xS&&t.sandboxed,i=et(et({},t.label.map(function(t){return{title:t}}).getOr({})),e?{sandbox:"allow-scripts allow-same-origin"}:{}),u=(o=e,r=ce(""),{getValue:function(t){return r.get()},setValue:function(t,n){if(o)Br(t.element(),"srcdoc",n);else{Br(t.element(),"src","javascript:''");var e=t.element().dom().contentWindow.document;e.open(),e.write(n),e.close()}r.set(n)}}),a=t.label.map(function(t){return Iy(t,n)}),c=ey.parts().field({factory:{sketch:function(t){return hS({uid:t.uid,dom:{tag:"iframe",attributes:i},behaviours:za([Dy.config({}),Xm.config({}),sS(st.none(),u.getValue,u.setValue)])})}}});return My(a,c,["tox-form__group--stretched"],[])};function SS(t,n){return OS(nt.document.createElement("canvas"),t,n)}function kS(t){var n=SS(t.width,t.height);return CS(n).drawImage(t,0,0),n}function CS(t){return t.getContext("2d")}function OS(t,n,e){return t.width=n,t.height=e,t}function _S(t){return t.naturalWidth||t.width}function TS(t){return t.naturalHeight||t.height}var ES,BS,DS,MS=window.Promise?window.Promise:(BS=(ES=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],PS(t,AS(IS,this),AS(RS,this))}).immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(t){nt.setTimeout(t,1)},DS=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},ES.prototype["catch"]=function(t){return this.then(null,t)},ES.prototype.then=function(e,o){var r=this;return new ES(function(t,n){FS.call(r,new HS(e,o,t,n))})},ES.all=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var c=Array.prototype.slice.call(1===t.length&&DS(t[0])?t[0]:t);return new ES(function(r,i){if(0===c.length)return r([]);var u=c.length;function a(n,t){try{if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void e.call(t,function(t){a(n,t)},i)}c[n]=t,0==--u&&r(c)}catch(o){i(o)}}for(var t=0;t<c.length;t++)a(t,c[t])})},ES.resolve=function(n){return n&&"object"==typeof n&&n.constructor===ES?n:new ES(function(t){t(n)})},ES.reject=function(e){return new ES(function(t,n){n(e)})},ES.race=function(r){return new ES(function(t,n){for(var e=0,o=r;e<o.length;e++)o[e].then(t,n)})},ES);function AS(t,n){return function(){return t.apply(n,arguments)}}function FS(o){var r=this;null!==this._state?BS(function(){var t=r._state?o.onFulfilled:o.onRejected;if(null!==t){var n;try{n=t(r._value)}catch(e){return void o.reject(e)}o.resolve(n)}else(r._state?o.resolve:o.reject)(r._value)}):this._deferreds.push(o)}function IS(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void PS(AS(n,t),AS(IS,this),AS(RS,this))}this._state=!0,this._value=t,VS.call(this)}catch(e){RS.call(this,e)}}function RS(t){this._state=!1,this._value=t,VS.call(this)}function VS(){for(var t=0,n=this._deferreds;t<n.length;t++){var e=n[t];FS.call(this,e)}this._deferreds=[]}function HS(t,n,e,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.resolve=e,this.reject=o}function PS(t,n,e){var o=!1;try{t(function(t){o||(o=!0,n(t))},function(t){o||(o=!0,e(t))})}catch(r){if(o)return;o=!0,e(r)}}function zS(e){return new MS(function(t,n){(function p(t){var n=t.split(","),e=/data:([^;]+)/.exec(n[0]);if(!e)return st.none();for(var o=e[1],r=n[1],i=nt.atob(r),u=i.length,a=Math.ceil(u/1024),c=new Array(a),s=0;s<a;++s){for(var l=1024*s,f=Math.min(1024+l,u),d=new Array(f-l),m=l,g=0;m<f;++g,++m)d[g]=i[m].charCodeAt(0);c[s]=new Uint8Array(d)}return st.some(new nt.Blob(c,{type:o}))})(e).fold(function(){n("uri is not base64: "+e)},t)})}function NS(t,o,r){return o=o||"image/png",nt.HTMLCanvasElement.prototype.toBlob?new MS(function(n,e){t.toBlob(function(t){t?n(t):e()},o,r)}):zS(t.toDataURL(o,r))}function LS(t){return function n(a){return new MS(function(t,n){var e=nt.URL.createObjectURL(a),o=new nt.Image,r=function(){o.removeEventListener("load",i),o.removeEventListener("error",u)};function i(){r(),t(o)}function u(){r(),n("Unable to load data of type "+a.type+": "+e)}o.addEventListener("load",i),o.addEventListener("error",u),o.src=e,o.complete&&i()})}(t).then(function(t){!function e(t){nt.URL.revokeObjectURL(t.src)}(t);var n=SS(_S(t),TS(t));return CS(n).drawImage(t,0,0),n})}function jS(t,n,e){var o=n.type;function r(n,e){return t.then(function(t){return function o(t,n,e){return n=n||"image/png",t.toDataURL(n,e)}(t,n,e)})}return{getType:at(o),toBlob:function i(){return MS.resolve(n)},toDataURL:at(e),toBase64:function u(){return e.split(",")[1]},toAdjustedBlob:function a(n,e){return t.then(function(t){return NS(t,n,e)})},toAdjustedDataURL:r,toAdjustedBase64:function c(t,n){return r(t,n).then(function(t){return t.split(",")[1]})},toCanvas:function s(){return t.then(kS)}}}function US(n){return function t(e){return new MS(function(t){var n=new nt.FileReader;n.onloadend=function(){t(n.result)},n.readAsDataURL(e)})}(n).then(function(t){return jS(LS(n),n,t)})}function WS(n,t){return NS(n,t).then(function(t){return jS(MS.resolve(n),t,n.toDataURL())})}function GS(t,n,e){var o="string"==typeof t?parseFloat(t):t;return e<o?o=e:o<n&&(o=n),o}function XS(){return[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1]}var YS=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10];function qS(t,n){for(var e,o=[],r=new Array(25),i=0;i<5;i++){for(var u=0;u<5;u++)o[u]=n[u+5*i];for(u=0;u<5;u++){for(var a=e=0;a<5;a++)e+=t[u+5*a]*o[a];r[u+5*i]=e}}return r}function KS(n,e){return n.toCanvas().then(function(t){return function i(t,n,e){var o=CS(t);var r=function E(t,n){for(var e,o,r,i,u=t.data,a=n[0],c=n[1],s=n[2],l=n[3],f=n[4],d=n[5],m=n[6],g=n[7],p=n[8],h=n[9],v=n[10],b=n[11],y=n[12],x=n[13],w=n[14],S=n[15],k=n[16],C=n[17],O=n[18],_=n[19],T=0;T<u.length;T+=4)e=u[T],o=u[T+1],r=u[T+2],i=u[T+3],u[T]=e*a+o*c+r*s+i*l+f,u[T+1]=e*d+o*m+r*g+i*p+h,u[T+2]=e*v+o*b+r*y+i*x+w,u[T+3]=e*S+o*k+r*C+i*O+_;return t}(o.getImageData(0,0,t.width,t.height),e);return o.putImageData(r,0,0),WS(t,n)}(t,n.getType(),e)})}function JS(n,e){return n.toCanvas().then(function(t){return function u(t,n,e){var o=CS(t);var r=o.getImageData(0,0,t.width,t.height),i=o.getImageData(0,0,t.width,t.height);return i=function w(t,n,e){function o(t,n,e){return e<t?t=e:t<n&&(t=n),t}for(var r=Math.round(Math.sqrt(e.length)),i=Math.floor(r/2),u=t.data,a=n.data,c=t.width,s=t.height,l=0;l<s;l++)for(var f=0;f<c;f++){for(var d=0,m=0,g=0,p=0;p<r;p++)for(var h=0;h<r;h++){var v=o(f+h-i,0,c-1),b=4*(o(l+p-i,0,s-1)*c+v),y=e[p*r+h];d+=u[b]*y,m+=u[1+b]*y,g+=u[2+b]*y}var x=4*(l*c+f);a[x]=o(d,0,255),a[1+x]=o(m,0,255),a[2+x]=o(g,0,255)}return n}(r,i,e),o.putImageData(i,0,0),WS(t,n)}(t,n.getType(),e)})}function $S(e){return function(t,n){return KS(t,e(XS(),n))}}var QS=function LF(n){return function(t){return KS(t,n)}}([-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0,0,0,0,0,1]),ZS=$S(function jF(t,n){return qS(t,[1,0,0,0,n=GS(255*n,-255,255),0,1,0,0,n,0,0,1,0,n,0,0,0,1,0,0,0,0,0,1])}),tk=$S(function UF(t,n){var e;return n=GS(n,-1,1),qS(t,[(e=(n*=100)<0?127+n/100*127:127*(e=0===(e=n%1)?YS[n]:YS[Math.floor(n)]*(1-e)+YS[Math.floor(n)+1]*e)+127)/127,0,0,0,.5*(127-e),0,e/127,0,0,.5*(127-e),0,0,e/127,0,.5*(127-e),0,0,0,1,0,0,0,0,0,1])}),nk=function(t,n,e,o){return KS(t,function r(t,n,e,o){return qS(t,[n=GS(n,0,2),0,0,0,0,0,e=GS(e,0,2),0,0,0,0,0,o=GS(o,0,2),0,0,0,0,0,1,0,0,0,0,0,1])}(XS(),n,e,o))},ek=function WF(n){return function(t){return JS(t,n)}}([0,-1,0,-1,5,-1,0,-1,0]),ok=function GF(c){var o=function(t,n,e){var o=CS(t),r=new Array(256);for(var i=0;i<r.length;i++)r[i]=c(i,e);var u=function a(t,n){for(var e=t.data,o=0;o<e.length;o+=4)e[o]=n[e[o]],e[o+1]=n[e[o+1]],e[o+2]=n[e[o+2]];return t}(o.getImageData(0,0,t.width,t.height),r);return o.putImageData(u,0,0),WS(t,n)};return function(n,e){return n.toCanvas().then(function(t){return o(t,n.getType(),e)})}}(function(t,n){return 255*Math.pow(t/255,1-n)});function rk(t,n,e){var o=_S(t),r=TS(t),i=n/o,u=e/r,a=!1;(i<.5||2<i)&&(i=i<.5?.5:2,a=!0),(u<.5||2<u)&&(u=u<.5?.5:2,a=!0);var c=function s(u,a,c){return new MS(function(t){var n=_S(u),e=TS(u),o=Math.floor(n*a),r=Math.floor(e*c),i=SS(o,r);CS(i).drawImage(u,0,0,n,e,0,0,o,r),t(i)})}(t,i,u);return a?c.then(function(t){return rk(t,n,e)}):c}function ik(n,e){return n.toCanvas().then(function(t){return function a(t,n,e){var o=SS(t.width,t.height),r=CS(o),i=0,u=0;90!==(e=e<0?360+e:e)&&270!==e||OS(o,o.height,o.width);90!==e&&180!==e||(i=o.width);270!==e&&180!==e||(u=o.height);return r.translate(i,u),r.rotate(e*Math.PI/180),r.drawImage(t,0,0),WS(o,n)}(t,n.getType(),e)})}function uk(n,e){return n.toCanvas().then(function(t){return function i(t,n,e){var o=SS(t.width,t.height),r=CS(o);"v"===e?(r.scale(1,-1),r.drawImage(t,0,-o.height)):(r.scale(-1,1),r.drawImage(t,-o.width,0));return WS(o,n)}(t,n.getType(),e)})}function ak(n,e,o,r,i){return n.toCanvas().then(function(t){return function a(t,n,e,o,r,i){var u=SS(r,i);return CS(u).drawImage(t,-e,-o),WS(u,n)}(t,n.getType(),e,o,r,i)})}var ck=function(t){return QS(t)},sk=function(t){return ek(t)},lk=function(t,n){return ok(t,n)},fk=function(t,n){return ZS(t,n)},dk=function(t,n){return tk(t,n)},mk=function(t,n){return uk(t,n)},gk=function(t,n,e){return function r(n,e,o){return n.toCanvas().then(function(t){return rk(t,e,o).then(function(t){return WS(t,n.getType())})})}(t,n,e)},pk=function(t,n){return ik(t,n)},hk=function(t,n){return et({dom:{tag:"span",innerHtml:t,classes:["tox-icon","tox-tbtn__icon-wrap"]}},n)},vk=function(t,n){return hk(Gg(t,n),{})},bk=function(t,n){return hk(Gg(t,n),{behaviours:za([Nm.config({})])})},yk=function(t,n,e){return{dom:{tag:"span",innerHtml:e.translate(t),classes:[n+"__select-label"]},behaviours:za([Nm.config({})])}},xk=Nr("toolbar.button.execute"),wk={"alloy.execute":["disabling","alloy.base.behaviour","toggling","toolbar-button-events"]},Sk=Nr("update-menu-text"),kk=Nr("update-menu-icon"),Ck=function(t,n,o){var e=ce(Z),r=t.text.map(function(t){return Ug(yk(t,n,o.providers))}),i=t.icon.map(function(t){return Ug(bk(t,o.providers.icons))}),u=function(t,n){var e=bl.getValue(t);return Xm.focus(e),jo(e,"keydown",{raw:n.event().raw()}),Qy.close(e),st.some(!0)},a=t.role.fold(function(){return{}},function(t){return{role:t}}),c=t.tooltip.fold(function(){return{}},function(t){var n=o.providers.translate(t);return{title:n,"aria-label":n}});return Ug(Qy.sketch(et(et({},a),{dom:{tag:"button",classes:[n,n+"--select"].concat(V(t.classes,function(t){return n+"--"+t})),attributes:et({},c)},components:Zh([i.map(function(t){return t.asSpec()}),r.map(function(t){return t.asSpec()}),st.some({dom:{tag:"div",classes:[n+"__select-chevron"],innerHtml:Gg("chevron-down",o.providers.icons)}})]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:za(b(t.dropdownBehaviours,[Gh(function(){return t.disabled||o.providers.isReadOnly()}),Uh(),Zy.config({}),Nm.config({}),Lm("dropdown-events",[Kh(t,e),Jh(t,e)]),Lm("menubutton-update-display-text",[Jo(Sk,function(n,e){r.bind(function(t){return t.getOpt(n)}).each(function(t){Nm.set(t,[Yi(o.providers.translate(e.event().text()))])})}),Jo(kk,function(n,e){i.bind(function(t){return t.getOpt(n)}).each(function(t){Nm.set(t,[bk(e.event().icon(),o.providers.icons)])})})])])),eventOrder:Ct(wk,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:za([Rm.config({mode:"special",onLeft:u,onRight:u})]),lazySink:o.getSink,toggleClass:n+"--active",parts:{menu:Yv(0,t.columns,t.presets)},fetch:function(){return hy(t.fetch)}}))).asSpec()},Ok=function(t){return"separator"===t.type},_k={type:"separator"},Tk=function(t,e){var n=N(t,function(t,n){return S(n)?""===n?t:"|"===n?0<t.length&&!Ok(t[t.length-1])?t.concat([_k]):t:yt(e,n.toLowerCase())?t.concat([e[n.toLowerCase()]]):t:t.concat([n])},[]);return 0<n.length&&Ok(n[n.length-1])&&n.pop(),n},Ek=function(t,n){return yt(t,"getSubmenuItems")?(o=n,r=(e=t).getSubmenuItems(),i=Bk(r,o),{item:e,menus:Ct(i.menus,Kt(e.value,i.items)),expansions:Ct(i.expansions,Kt(e.value,e.value))}):{item:t,menus:{},expansions:{}};var e,o,r,i},Bk=function(t,r){var n=Tk(S(t)?t.split(" "):t,r);return z(n,function(t,n){var e=function(t){if(Ok(t))return t;var n=bt(t,"value").getOrThunk(function(){return Nr("generated-menu-item")});return Ct({value:n},t)}(n),o=Ek(e,r);return{menus:Ct(t.menus,o.menus),items:[o.item].concat(t.items),expansions:Ct(t.expansions,o.expansions)}},{menus:{},expansions:{},items:[]})},Dk=function(t,e,o,n){var r=Nr("primary-menu"),i=Bk(t,o.shared.providers.menuItems());if(0===i.items.length)return st.none();var u=pb(r,i.items,e,o,n),a=dt(i.menus,function(t,n){return pb(n,t,e,o,!1)}),c=Ct(a,Kt(r,u));return st.from(Eg.tieredData(r,c,i.expansions))},Mk=function(e){return{isDisabled:function(){return ph.isDisabled(e)},setDisabled:function(t){return ph.set(e,t)},setActive:function(t){var n=e.element();t?(bi(n,"tox-tbtn--enabled"),Br(n,"aria-pressed",!0)):(xi(n,"tox-tbtn--enabled"),Fr(n,"aria-pressed"))},isActive:function(){return wi(e.element(),"tox-tbtn--enabled")}}},Ak=function(t,n,e,o){return Ck({text:t.text,icon:t.icon,tooltip:t.tooltip,role:o,fetch:function(n){t.fetch(function(t){n(Dk(t,$h.CLOSE_ON_EXECUTE,e,!1))})},onSetup:t.onSetup,getApi:Mk,columns:1,presets:"normal",classes:[],dropdownBehaviours:[Dy.config({})]},n,e.shared)},Fk=function(n,r,i){return function(t){t(V(n,function(t){var n,e,o=t.text.fold(function(){return{}},function(t){return{text:t}});return et(et({type:t.type,active:!1},o),{onAction:function(t){var n=!t.isActive();t.setActive(n),e.storage.set(n),i.shared.getSink().each(function(t){r().getOpt(t).each(function(t){Ka(t.element()),jo(t,qb,{name:e.name,value:e.storage.get()})})})},onSetup:(n=e=t,function(t){t.setActive(n.storage.get())})})}))}},Ik=function(t,n,e,o,r,i){void 0===e&&(e=[]);var u=n.fold(function(){return{}},function(t){return{action:t}}),a=et({buttonBehaviours:za([Gh(function(){return t.disabled||i.isReadOnly()}),Uh(),Dy.config({}),Lm("button press",[Ko("click"),Ko("mousedown")])].concat(e)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},u),c=Ct(a,{dom:o});return Ct(c,{components:r})},Rk=function(t,n,e,o){void 0===o&&(o=[]);var r={tag:"button",classes:["tox-tbtn"],attributes:t.tooltip.map(function(t){return{"aria-label":e.translate(t),title:e.translate(t)}}).getOr({})},i=t.icon.map(function(t){return vk(t,e.icons)}),u=Zh([i]);return Ik(t,n,o,r,u,e)},Vk=function(t,n,e,o){void 0===o&&(o=[]);var r=Rk(t,st.some(n),e,o);return jg.sketch(r)},Hk=function(t,n,e,o,r){void 0===o&&(o=[]),void 0===r&&(r=[]);var i=e.translate(t.text),u=t.icon?t.icon.map(function(t){return vk(t,e.icons)}):st.none(),a=u.isSome()?Zh([u]):[],c=u.isSome()?{}:{innerHtml:i},s=b(t.primary||t.borderless?["tox-button"]:["tox-button","tox-button--secondary"],u.isSome()?["tox-button--icon"]:[],t.borderless?["tox-button--naked"]:[],r),l=et(et({tag:"button",classes:s},c),{attributes:{title:i}});return Ik(t,n,o,l,a,e)},Pk=function(t,n,e,o,r){void 0===o&&(o=[]),void 0===r&&(r=[]);var i=Hk(t,st.some(n),e,o,r);return jg.sketch(i)},zk=function(n,e){return function(t){"custom"===e?jo(t,qb,{name:n,value:{}}):"submit"===e?Lo(t,Kb):"cancel"===e?Lo(t,Yb):nt.console.error("Unknown button type: ",e)}},Nk=function(n,t,e){if("menu"===t){var o=n,r=et(et({},n),{onSetup:function(t){return t.setDisabled(n.disabled),Z},fetch:Fk(o.items,function(){return i},e)}),i=Ug(Ak(r,"tox-tbtn",e,st.none()));return i.asSpec()}if("custom"===(c=t)||"cancel"===c||"submit"===c){var u=zk(n.name,t),a=et(et({},n),{borderless:!1});return Pk(a,u,e.shared.providers,[])}var c;nt.console.error("Unknown footer button type: ",t)},Lk=function(t,n){var e,o,r=zk(t.name,"custom");return e=st.none(),o=ey.parts().field(et({factory:jg},Hk(t,st.some(r),n,[fS(""),Zw()]))),My(e,o,[],[])},jk=at([Zn("field1Name","field1"),Zn("field2Name","field2"),Zu("onLockedChange"),Ku(["lockClass"]),Zn("locked",!1),Sl("coupledFieldBehaviours",[Mf,bl])]),Uk=function(t,n){return ql({factory:ey,name:t,overrides:function(o){return{fieldBehaviours:za([Lm("coupled-input-behaviour",[Jo(so(),function(e){sf(e,o,n).bind(Mf.getCurrent).each(function(n){sf(e,o,"lock").each(function(t){rg.isOn(t)&&o.onLockedChange(e,n,t)})})})])])}}})},Wk=at([Uk("field1","field2"),Uk("field2","field1"),ql({factory:jg,schema:[zn("dom")],name:"lock",overrides:function(t){return{buttonBehaviours:za([rg.config({selected:t.locked,toggleClass:t.markers.lockClass,aria:{mode:"pressed"}})])}}})]),Gk=_f({name:"FormCoupledInputs",configFields:jk(),partFields:Wk(),factory:function(o,t,n,e){return{uid:o.uid,dom:o.dom,components:t,behaviours:kl(o.coupledFieldBehaviours,[Mf.config({find:st.some}),bl.config({store:{mode:"manual",getValue:function(t){var n,e=gf(t,o,["field1","field2"]);return(n={})[o.field1Name]=bl.getValue(e.field1()),n[o.field2Name]=bl.getValue(e.field2()),n},setValue:function(t,n){var e=gf(t,o,["field1","field2"]);xt(n,o.field1Name)&&bl.setValue(e.field1(),n[o.field1Name]),xt(n,o.field2Name)&&bl.setValue(e.field2(),n[o.field2Name])}}})]),apis:{getField1:function(t){return sf(t,o,"field1")},getField2:function(t){return sf(t,o,"field2")},getLock:function(t){return sf(t,o,"lock")}}}},apis:{getField1:function(t,n){return t.getField1(n)},getField2:function(t,n){return t.getField2(n)},getLock:function(t,n){return t.getLock(n)}}}),Xk=function(t){var n=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(t);if(null===n)return ot.error(t);var e=parseFloat(n[1]),o=n[2];return ot.value({value:e,unit:o})},Yk=function(t,n){var e={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,"in":1},o=function(t){return Object.prototype.hasOwnProperty.call(e,t)};return t.unit===n?st.some(t.value):o(t.unit)&&o(n)?e[t.unit]===e[n]?st.some(t.value):st.some(t.value/e[t.unit]*e[n]):st.none()},qk=function(t){return st.none()},Kk=function(t,n){var e,o,r,i=Xk(t).toOption(),u=Xk(n).toOption();return o=u,r=function(t,o){return Yk(t,o.unit).map(function(t){return o.value/t}).map(function(t){return n=t,e=o.unit,function(t){return Yk(t,e).map(function(t){return{value:t*n,unit:e}})};var n,e}).getOr(qk)},((e=i).isSome()&&o.isSome()?st.some(r(e.getOrDie(),o.getOrDie())):st.none()).getOr(qk)},Jk=function(o,n){var a=qk,r=Nr("ratio-event"),t=Gk.parts().lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:n.translate(o.label.getOr("Constrain proportions"))}},components:[{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__lock"],innerHtml:Gg("lock",n.icons)}},{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__unlock"],innerHtml:Gg("unlock",n.icons)}}],buttonBehaviours:za([ph.config({disabled:function(){return o.disabled||n.isReadOnly()}}),Uh(),Dy.config({})])}),e=function(t){return{dom:{tag:"div",classes:["tox-form__group"]},components:t}},i=function(e){return ey.parts().field({factory:uy,inputClasses:["tox-textfield"],inputBehaviours:za([ph.config({disabled:function(){return o.disabled||n.isReadOnly()}}),Uh(),Dy.config({}),Lm("size-input-events",[Jo(io(),function(t,n){jo(t,r,{isField1:e})}),Jo(lo(),function(t,n){jo(t,Gb,{name:o.name})})])]),selectOnFocus:!1})},u=function(t){return{dom:{tag:"label",classes:["tox-label"],innerHtml:n.translate(t)}}},c=Gk.parts().field1(e([ey.parts().label(u("Width")),i(!0)])),s=Gk.parts().field2(e([ey.parts().label(u("Height")),i(!1)]));return Gk.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[c,s,e([u("&nbsp;"),t])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(t,i,n){Xk(bl.getValue(t)).each(function(t){a(t).each(function(t){var n,e,o,r;bl.setValue(i,(o={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,"in":4,"%":4},-1!==(r=(n=t).value.toFixed((e=n.unit)in o?o[e]:1)).indexOf(".")&&(r=r.replace(/\.?0*$/,"")),r+n.unit))})})},coupledFieldBehaviours:za([ph.config({disabled:function(){return o.disabled||n.isReadOnly()},onDisabled:function(t){Gk.getField1(t).bind(ey.getField).each(ph.disable),Gk.getField2(t).bind(ey.getField).each(ph.disable),Gk.getLock(t).each(ph.disable)},onEnabled:function(t){Gk.getField1(t).bind(ey.getField).each(ph.enable),Gk.getField2(t).bind(ey.getField).each(ph.enable),Gk.getLock(t).each(ph.enable)}}),Uh(),Lm("size-input-events2",[Jo(r,function(t,n){var e=n.event().isField1(),o=e?Gk.getField1(t):Gk.getField2(t),r=e?Gk.getField2(t):Gk.getField1(t),i=o.map(bl.getValue).getOr(""),u=r.map(bl.getValue).getOr("");a=Kk(i,u)})])])})},$k={undo:at(Nr("undo")),redo:at(Nr("redo")),zoom:at(Nr("zoom")),back:at(Nr("back")),apply:at(Nr("apply")),swap:at(Nr("swap")),transform:at(Nr("transform")),tempTransform:at(Nr("temp-transform")),transformApply:at(Nr("transform-apply"))},Qk=at("save-state"),Zk=at("disable"),tC=at("enable"),nC={formActionEvent:qb,saveState:Qk,disable:Zk,enable:tC},eC=function(a,c){var t=function(t,n,e,o){return Ug(Pk({name:t,text:t,disabled:e,primary:o,icon:st.none(),borderless:!1},n,c))},n=function(t,n,e,o){return Ug(Vk({name:t,icon:st.some(t),tooltip:st.some(n),disabled:o,primary:!1,borderless:!1},e,c))},u=function(t,e){t.map(function(t){var n=t.get(e);n.hasConfigured(ph)&&ph.disable(n)})},s=function(t,e){t.map(function(t){var n=t.get(e);n.hasConfigured(ph)&&ph.enable(n)})},l={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},e=Z,r=function(t,n,e){jo(t,n,e)},i=function(t){return Lo(t,nC.disable())},f=function(t){return Lo(t,nC.enable())},d=function(t,n){i(t),r(t,$k.transform(),{transform:n}),f(t)},o=function(t){return function(){Q.getOpt(t).each(function(t){Nm.set(t,[J])})}},m=function(t,n){i(t),r(t,$k.transformApply(),{transform:n,swap:o(t)}),f(t)},g=function(){return t("Back",function(t){return r(t,$k.back(),{swap:o(t)})},!1,!1)},p=function(){return Ug({dom:{tag:"div",classes:["tox-spacer"]},behaviours:za([ph.config({})])})},h=function(){return t("Apply",function(t){return r(t,$k.apply(),{swap:o(t)})},!0,!0)},v=function(){return function(t){var n,e,o,r,i,u=a.getRect();return n=t,e=u.x,o=u.y,r=u.w,i=u.h,ak(n,e,o,r,i)}},b=[g(),p(),t("Apply",function(t){var n=v();m(t,n),a.hideCrop()},!1,!0)],y=Ub.sketch({dom:l,components:b.map(function(t){return t.asSpec()}),containerBehaviours:za([Lm("image-tools-crop-buttons-events",[Jo(nC.disable(),function(t,n){u(b,t)}),Jo(nC.enable(),function(t,n){s(b,t)})])])}),x=Ug(Jk({name:"size",label:st.none(),constrain:!0,disabled:!1},c)),w=[g(),p(),x,p(),t("Apply",function(a){x.getOpt(a).each(function(t){var n,e,o=bl.getValue(t),r=parseInt(o.width,10),i=parseInt(o.height,10),u=(n=r,e=i,function(t){return gk(t,n,e)});m(a,u)})},!1,!0)],S=Ub.sketch({dom:l,components:w.map(function(t){return t.asSpec()}),containerBehaviours:za([Lm("image-tools-resize-buttons-events",[Jo(nC.disable(),function(t,n){u(w,t)}),Jo(nC.enable(),function(t,n){s(w,t)})])])}),k=function(n,e){return function(t){return n(t,e)}},C=k(mk,"h"),O=k(mk,"v"),_=k(pk,-90),T=k(pk,90),E=function(t,n){var e,o;o=n,i(e=t),r(e,$k.tempTransform(),{transform:o}),f(e)},B=[g(),p(),n("flip-horizontally","Flip horizontally",function(t){E(t,C)},!1),n("flip-vertically","Flip vertically",function(t){E(t,O)},!1),n("rotate-left","Rotate counterclockwise",function(t){E(t,_)},!1),n("rotate-right","Rotate clockwise",function(t){E(t,T)},!1),p(),h()],D=Ub.sketch({dom:l,components:B.map(function(t){return t.asSpec()}),containerBehaviours:za([Lm("image-tools-fliprotate-buttons-events",[Jo(nC.disable(),function(t,n){u(B,t)}),Jo(nC.enable(),function(t,n){s(B,t)})])])}),M=function(t,n,e,o,r){var i=Lw.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:c.translate(t)}}),u=Lw.parts().spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),a=Lw.parts().thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return Ug(Lw.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:e,maxX:r,getInitialValue:at({x:at(o)})},components:[i,u,a],sliderBehaviours:za([Xm.config({})]),onChoose:n}))},A=function(t,n,e,o,r){return[g(),(i=n,M(t,function(t,n,e){var o=k(i,e.x()/100);d(t,o)},e,o,r)),h()];var i},F=function(t,n,e,o,r){var i=A(t,n,e,o,r);return Ub.sketch({dom:l,components:i.map(function(t){return t.asSpec()}),containerBehaviours:za([Lm("image-tools-filter-panel-buttons-events",[Jo(nC.disable(),function(t,n){u(i,t)}),Jo(nC.enable(),function(t,n){s(i,t)})])])})},I=[g(),p(),h()],R=Ub.sketch({dom:l,components:I.map(function(t){return t.asSpec()})}),V=F("Brightness",fk,-100,0,100),H=F("Contrast",dk,-100,0,100),P=F("Gamma",lk,-100,0,100),z=function(n,e,o){return function(t){return nk(t,n,e,o)}},N=function(t){return M(t,function(a,t,n){var e=L.getOpt(a),o=U.getOpt(a),r=j.getOpt(a);e.each(function(u){o.each(function(i){r.each(function(t){var n=bl.getValue(u).x()/100,e=bl.getValue(t).x()/100,o=bl.getValue(i).x()/100,r=z(n,e,o);d(a,r)})})})},0,100,200)},L=N("R"),j=N("G"),U=N("B"),W=[g(),L,j,U,h()],G=Ub.sketch({dom:l,components:W.map(function(t){return t.asSpec()})}),X=function(n,e,o){return function(t){r(t,$k.swap(),{transform:e,swap:function(){Q.getOpt(t).each(function(t){Nm.set(t,[n]),o(t)})}})}},Y=st.some(sk),q=st.some(ck),K=[n("crop","Crop",X(y,st.none(),function(t){a.showCrop()}),!1),n("resize","Resize",X(S,st.none(),function(t){x.getOpt(t).each(function(t){var n=a.getMeasurements(),e=n.width,o=n.height;bl.setValue(t,{width:e,height:o})})}),!1),n("orientation","Orientation",X(D,st.none(),e),!1),n("brightness","Brightness",X(V,st.none(),e),!1),n("sharpen","Sharpen",X(R,Y,e),!1),n("contrast","Contrast",X(H,st.none(),e),!1),n("color-levels","Color levels",X(G,st.none(),e),!1),n("gamma","Gamma",X(P,st.none(),e),!1),n("invert","Invert",X(R,q,e),!1)],J=Ub.sketch({dom:l,components:K.map(function(t){return t.asSpec()})}),$=Ub.sketch({dom:{tag:"div"},components:[J],containerBehaviours:za([Nm.config({})])}),Q=Ug($);return{memContainer:Q,getApplyButton:function(t){return Q.getOpt(t).map(function(t){var n=t.components()[0];return n.components()[n.components().length-1]})}}},oC=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),rC=tinymce.util.Tools.resolve("tinymce.geom.Rect"),iC=tinymce.util.Tools.resolve("tinymce.util.Observable"),uC=tinymce.util.Tools.resolve("tinymce.util.Tools"),aC=tinymce.util.Tools.resolve("tinymce.util.VK");function cC(t){var n,e;if(t.changedTouches)for(n="screenX screenY pageX pageY clientX clientY".split(" "),e=0;e<n.length;e++)t[n[e]]=t.changedTouches[0][n[e]]}function sC(t,r){var i,u,n,a,c,l,f,d=r.document||nt.document;r=r||{};var m=d.getElementById(r.handle||t);n=function(t){var n,e,o=function s(t){var n,e,o,r,i,u,a,c=Math.max;return n=t.documentElement,e=t.body,o=c(n.scrollWidth,e.scrollWidth),r=c(n.clientWidth,e.clientWidth),i=c(n.offsetWidth,e.offsetWidth),u=c(n.scrollHeight,e.scrollHeight),a=c(n.clientHeight,e.clientHeight),{width:o<i?r:o,height:u<c(n.offsetHeight,e.offsetHeight)?a:u}}(d);cC(t),t.preventDefault(),u=t.button,n=m,l=t.screenX,f=t.screenY,e=nt.window.getComputedStyle?nt.window.getComputedStyle(n,null).getPropertyValue("cursor"):n.runtimeStyle.cursor,i=oC("<div></div>").css({position:"absolute",top:0,left:0,width:o.width,height:o.height,zIndex:2147483647,opacity:1e-4,cursor:e}).appendTo(d.body),oC(d).on("mousemove touchmove",c).on("mouseup touchend",a),r.start(t)},c=function(t){if(cC(t),t.button!==u)return a(t);t.deltaX=t.screenX-l,t.deltaY=t.screenY-f,t.preventDefault(),r.drag(t)},a=function(t){cC(t),oC(d).off("mousemove touchmove",c).off("mouseup touchend",a),i.remove(),r.stop&&r.stop(t)},this.destroy=function(){oC(m).off()},oC(m).on("mousedown touchstart",n)}var lC=0,fC=function(s,e,l,o,r){var f,n,i,u="tox-",a="tox-crid-"+lC++,c=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}];i=["top","right","bottom","left"];var d=function(t,n){return{x:n.x+t.x,y:n.y+t.y,w:n.w,h:n.h}},m=function(t,n){return{x:n.x-t.x,y:n.y-t.y,w:n.w,h:n.h}};function g(t,n,e,o){var r,i,u,a,c;r=n.x,i=n.y,u=n.w,a=n.h,r+=e*t.deltaX,i+=o*t.deltaY,(u+=e*t.deltaW)<20&&(u=20),(a+=o*t.deltaH)<20&&(a=20),c=s=rC.clamp({x:r,y:i,w:u,h:a},l,"move"===t.name),c=m(l,c),f.fire("updateRect",{rect:c}),v(c)}function p(n){function t(t,n){n.h<0&&(n.h=0),n.w<0&&(n.w=0),oC("#"+a+"-"+t,o).css({left:n.x,top:n.y,width:n.w,height:n.h})}uC.each(c,function(t){oC("#"+a+"-"+t.name,o).css({left:n.w*t.xMul+n.x,top:n.h*t.yMul+n.y})}),t("top",{x:e.x,y:e.y,w:e.w,h:n.y-e.y}),t("right",{x:n.x+n.w,y:n.y,w:e.w-n.x-n.w+e.x,h:n.h}),t("bottom",{x:e.x,y:n.y+n.h,w:e.w,h:e.h-n.y-n.h+e.y}),t("left",{x:e.x,y:n.y,w:n.x-e.x,h:n.h}),t("move",n)}function h(t){p(s=t)}function v(t){h(d(l,t))}return function b(){oC('<div id="'+a+'" class="'+u+'croprect-container" role="grid" aria-dropeffect="execute">').appendTo(o),uC.each(i,function(t){oC("#"+a,o).append('<div id="'+a+"-"+t+'"class="'+u+'croprect-block" style="display: none" data-mce-bogus="all">')}),uC.each(c,function(t){oC("#"+a,o).append('<div id="'+a+"-"+t.name+'" class="'+u+"croprect-handle "+u+"croprect-handle-"+t.name+'"style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1" aria-label="'+t.label+'" aria-grabbed="false" title="'+t.label+'">')}),n=uC.map(c,function t(n){var e;return new sC(a,{document:o.ownerDocument,handle:a+"-"+n.name,start:function(){e=s},drag:function(t){g(n,e,t.deltaX,t.deltaY)}})}),p(s),oC(o).on("focusin focusout",function(t){oC(t.target).attr("aria-grabbed","focus"===t.type?"true":"false")}),oC(o).on("keydown",function(n){var i;function t(t,n,e,o,r){t.stopPropagation(),t.preventDefault(),g(i,e,o,r)}switch(uC.each(c,function(t){if(n.target.id===a+"-"+t.name)return i=t,!1}),n.keyCode){case aC.LEFT:t(n,0,s,-10,0);break;case aC.RIGHT:t(n,0,s,10,0);break;case aC.UP:t(n,0,s,0,-10);break;case aC.DOWN:t(n,0,s,0,10);break;case aC.ENTER:case aC.SPACEBAR:n.preventDefault(),r()}})}(),f=uC.extend({toggleVisibility:function y(t){var n;n=uC.map(c,function(t){return"#"+a+"-"+t.name}).concat(uC.map(i,function(t){return"#"+a+"-"+t})).join(","),t?oC(n,o).show():oC(n,o).hide()},setClampRect:function x(t){l=t,p(s)},setRect:h,getInnerRect:function(){return m(l,s)},setInnerRect:v,setViewPortRect:function w(t){e=t,p(s)},destroy:function t(){uC.each(n,function(t){t.destroy()}),n=[]}},iC)},dC=function(n){var l=Ug({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),f=ce(1),d=ce(st.none()),m=ce({x:0,y:0,w:1,h:1}),c=ce({x:0,y:0,w:1,h:1}),s=function(t,s){g.getOpt(t).each(function(t){var e=f.get(),o=cu(t.element()),r=tu(t.element()),i=s.dom().naturalWidth*e,u=s.dom().naturalHeight*e,a=Math.max(0,o/2-i/2),c=Math.max(0,r/2-u/2),n={left:a.toString()+"px",top:c.toString()+"px",width:i.toString()+"px",height:u.toString()+"px",position:"absolute"};Mi(s,n),l.getOpt(t).each(function(t){Mi(t.element(),n)}),d.get().each(function(t){var n=m.get();t.setRect({x:n.x*e+a,y:n.y*e+c,w:n.w*e,h:n.h*e}),t.setClampRect({x:a,y:c,w:i,h:u}),t.setViewPortRect({x:0,y:0,w:o,h:r})})})},e=function(t,n){var e,a=le.fromTag("img");return Br(a,"src",n),e=a.dom(),new cp(function(t){var n=function(){e.removeEventListener("load",n),t(e)};e.complete?t(e):e.addEventListener("load",n)}).then(function(){return g.getOpt(t).map(function(t){var n=qi({element:a});Nm.replaceAt(t,1,st.some(n));var e=c.get(),o={x:0,y:0,w:a.dom().naturalWidth,h:a.dom().naturalHeight};c.set(o);var r,u,i=rC.inflate(o,-20,-20);return m.set(i),e.w===o.w&&e.h===o.h||(r=t,u=a,g.getOpt(r).each(function(t){var n=cu(t.element()),e=tu(t.element()),o=u.dom().naturalWidth,r=u.dom().naturalHeight,i=Math.min(n/o,e/r);1<=i?f.set(1):f.set(i)})),s(t,a),a})})},t=Ub.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[l.asSpec(),{dom:{tag:"img",attributes:{src:n}}},{dom:{tag:"div"},behaviours:za([Lm("image-panel-crop-events",[or(function(t){g.getOpt(t).each(function(t){var n=t.element().dom(),e=fC({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},n,function(){});e.toggleVisibility(!1),e.on("updateRect",function(t){var n=t.rect,e=f.get(),o={x:Math.round(n.x/e),y:Math.round(n.y/e),w:Math.round(n.w/e),h:Math.round(n.h/e)};m.set(o)}),d.set(st.some(e))})})])])}],containerBehaviours:za([Nm.config({}),Lm("image-panel-events",[or(function(t){e(t,n)})])])}),g=Ug(t);return{memContainer:g,updateSrc:e,zoom:function(t,n){var e=f.get(),o=0<n?Math.min(2,e+.1):Math.max(.1,e-.1);f.set(o),g.getOpt(t).each(function(t){var n=t.components()[1].element();s(t,n)})},showCrop:function(){d.get().each(function(t){t.toggleVisibility(!0)})},hideCrop:function(){d.get().each(function(t){t.toggleVisibility(!1)})},getRect:function(){return m.get()},getMeasurements:function(){var t=c.get();return{width:t.w,height:t.h}}}},mC=function(t,n,e,o,r){return Vk({name:t,icon:st.some(n),disabled:e,tooltip:st.some(t),primary:!1,borderless:!1},o,r)},gC=function(t,n){n?ph.enable(t):ph.disable(t)};function pC(){var e=[],o=-1;function t(){return 0<o}function n(){return-1!==o&&o<e.length-1}return{data:e,add:function r(t){var n;return n=e.splice(++o),e.push(t),{state:t,removed:n}},undo:function i(){if(t())return e[--o]},redo:function u(){if(n())return e[++o]},canUndo:t,canRedo:n}}var hC,vC,bC,yC,xC=function(t){var n=ce(t),e=ce(st.none()),r=pC();r.add(t);var i=function(t){n.set(t)},u=function(t){return{blob:t,url:nt.URL.createObjectURL(t)}},a=function(t){nt.URL.revokeObjectURL(t.url)},o=function(){e.get().each(a),e.set(st.none())},c=function(t){var n=u(t);i(n);var e,o=r.add(n).removed;return e=o,uC.each(e,a),n.url};return{getBlobState:function(){return n.get()},setBlobState:i,addBlobState:c,getTempState:function(){return e.get().fold(function(){return n.get()},function(t){return t})},updateTempState:function(t){var n=u(t);return o(),e.set(st.some(n)),n.url},addTempState:function(t){var n=u(t);return e.set(st.some(n)),n.url},applyTempState:function(n){return e.get().fold(function(){},function(t){c(t.blob),n()})},destroyTempState:o,undo:function(){var t=r.undo();return i(t),t.url},redo:function(){var t=r.redo();return i(t),t.url},getHistoryStates:function(){return{undoEnabled:r.canUndo(),redoEnabled:r.canRedo()}}}},wC=function(t,n){var e,o,r,u=xC(t.currentState),i=function(t){var n=u.getHistoryStates();p.updateButtonUndoStates(t,n.undoEnabled,n.redoEnabled),jo(t,nC.formActionEvent,{name:nC.saveState(),value:n.undoEnabled})},a=function(t){return t.toBlob()},c=function(t){jo(t,nC.formActionEvent,{name:nC.disable(),value:{}})},s=function(t){h.getApplyButton(t).each(function(t){ph.enable(t)}),jo(t,nC.formActionEvent,{name:nC.enable(),value:{}})},l=function(t,n){return c(t),g.updateSrc(t,n)},f=function(n,t,e,o,r){return c(n),US(t).then(e).then(a).then(o).then(function(t){return l(n,t).then(function(t){return i(n),r(),s(n),t})})["catch"](function(t){return nt.console.log(t),s(n),t})},d=function(t,n,e){var o=u.getBlobState().blob;f(t,o,n,function(t){return u.updateTempState(t)},e)},m=function(t){var n=u.getBlobState().url;return u.destroyTempState(),i(t),n},g=dC(t.currentState.url),p=(o=Ug(mC("Undo","undo",!0,function(t){jo(t,$k.undo(),{direction:1})},e=n)),r=Ug(mC("Redo","redo",!0,function(t){jo(t,$k.redo(),{direction:1})},e)),{container:Ub.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[o.asSpec(),r.asSpec(),mC("Zoom in","zoom-in",!1,function(t){jo(t,$k.zoom(),{direction:1})},e),mC("Zoom out","zoom-out",!1,function(t){jo(t,$k.zoom(),{direction:-1})},e)]}),updateButtonUndoStates:function(t,n,e){o.getOpt(t).each(function(t){gC(t,n)}),r.getOpt(t).each(function(t){gC(t,e)})}}),h=eC(g,n);return{dom:{tag:"div",attributes:{role:"presentation"}},components:[h.memContainer.asSpec(),g.memContainer.asSpec(),p.container],behaviours:za([bl.config({store:{mode:"manual",getValue:function(){return u.getBlobState()}}}),Lm("image-tools-events",[Jo($k.undo(),function(n,t){var e=u.undo();l(n,e).then(function(t){s(n),i(n)})}),Jo($k.redo(),function(n,t){var e=u.redo();l(n,e).then(function(t){s(n),i(n)})}),Jo($k.zoom(),function(t,n){var e=n.event().direction();g.zoom(t,e)}),Jo($k.back(),function(t,n){var e,o;o=m(e=t),l(e,o).then(function(t){s(e)}),n.event().swap()(),g.hideCrop()}),Jo($k.apply(),function(t,n){u.applyTempState(function(){m(t),n.event().swap()()})}),Jo($k.transform(),function(t,n){return d(t,n.event().transform(),Z)}),Jo($k.tempTransform(),function(t,n){return e=t,o=n.event().transform(),r=u.getTempState().blob,void f(e,r,o,function(t){return u.addTempState(t)},Z);var e,o,r}),Jo($k.transformApply(),function(t,n){return e=t,o=n.event().transform(),r=n.event().swap(),i=u.getBlobState().blob,void f(e,i,o,function(t){var n=u.addBlobState(t);return m(e),n},r);var e,o,r,i}),Jo($k.swap(),function(n,t){var e;e=n,p.updateButtonUndoStates(e,!1,!1);var o=t.event().transform(),r=t.event().swap();o.fold(function(){r()},function(t){d(n,t,r)})})]),Zw()])}},SC=Of({name:"HtmlSelect",configFields:[zn("options"),yl("selectBehaviours",[Xm,bl]),Zn("selectClasses",[]),Zn("selectAttributes",{}),Yn("data")],factory:function(e,t){var n=V(e.options,function(t){return{dom:{tag:"option",value:t.value,innerHtml:t.text}}}),o=e.data.map(function(t){return Kt("initialValue",t)}).getOr({});return{uid:e.uid,dom:{tag:"select",classes:e.selectClasses,attributes:e.selectAttributes},components:n,behaviours:wl(e.selectBehaviours,[Xm.config({}),bl.config({store:et({mode:"manual",getValue:function(t){return zi(t.element())},setValue:function(t,n){L(e.options,function(t){return t.value===n}).isSome()&&Ni(t.element(),n)}},o)})])}}}),kC=function(e,n){var t=e.label.map(function(t){return Iy(t,n)}),o=[ph.config({disabled:function(){return e.disabled||n.isReadOnly()}}),Uh(),Rm.config({mode:"execution",useEnter:!0!==e.multiline,useControlEnter:!0===e.multiline,execute:function(t){return Lo(t,Kb),st.some(!0)}}),Lm("textfield-change",[Jo(so(),function(t,n){jo(t,Gb,{name:e.name})}),Jo(bo(),function(t,n){jo(t,Gb,{name:e.name})})]),Dy.config({})],r=e.validation.map(function(o){return Ty.config({getRoot:function(t){return lr(t.element())},invalidClass:"tox-invalid",validator:{validate:function(t){var n=bl.getValue(t),e=o.validator(n);return vy(!0===e?ot.value(n):ot.error(e))},validateOnLoad:o.validateOnLoad}})}).toArray(),i=e.placeholder.fold(at({}),function(t){return{placeholder:n.translate(t)}}),u=e.inputMode.fold(at({}),function(t){return{inputmode:t}}),a=et(et({},i),u),c=ey.parts().field({tag:!0===e.multiline?"textarea":"input",inputAttributes:a,inputClasses:[e.classname],inputBehaviours:za(ut([o,r])),selectOnFocus:!1,factory:uy}),s=(e.flex?["tox-form__group--stretched"]:[]).concat(e.maximized?["tox-form-group--maximize"]:[]),l=[ph.config({disabled:function(){return e.disabled||n.isReadOnly()},onDisabled:function(t){ey.getField(t).each(ph.disable)},onEnabled:function(t){ey.getField(t).each(ph.enable)}}),Uh()];return My(t,c,s,l)},CC=/* */Object.freeze({__proto__:null,events:function(t,n){var e=t.stream.streams.setup(t,n);return Yo([Jo(t.event,e),rr(function(){return n.cancel()})].concat(t.cancelEvent.map(function(t){return[Jo(t,function(){return n.cancel()})]}).getOr([])))}}),OC=function(t){var n=ce(null);return oi({readState:function(){return{timer:null!==n.get()?"set":"unset"}},setTimer:function(t){n.set(t)},cancel:function(){var t=n.get();null!==t&&t.cancel()}})},_C=/* */Object.freeze({__proto__:null,throttle:OC,init:function(t){return t.stream.streams.state(t)}}),TC=[Nn("stream",Bn("mode",{throttle:[zn("delay"),Zn("stopEvent",!0),na("streams",{setup:function(t,n){var e=t.stream,o=$g(t.onStream,e.delay);return n.setTimer(o),function(t,n){o.throttle(t,n),e.stopEvent&&n.stop()}},state:OC})]})),Zn("event","input"),Yn("cancelEvent"),Zu("onStream")],EC=La({fields:TC,name:"streaming",active:CC,state:_C}),BC=function(t,n,e){var o=bl.getValue(e);bl.setValue(n,o),MC(n)},DC=function(t,n){var e=t.element(),o=zi(e),r=e.dom();"number"!==Dr(e,"type")&&n(r,o)},MC=function(t){DC(t,function(t,n){return t.setSelectionRange(n.length,n.length)})},AC=function(t,n,o){if(t.selectsOver){var e=bl.getValue(n),r=t.getDisplayText(e),i=bl.getValue(o);return 0===t.getDisplayText(i).indexOf(r)?st.some(function(){var t,e;BC(0,n,o),t=n,e=r.length,DC(t,function(t,n){return t.setSelectionRange(e,n.length)})}):st.none()}return st.none()},FC=at("alloy.typeahead.itemexecute"),IC=at([Yn("lazySink"),zn("fetch"),Zn("minChars",5),Zn("responseTime",1e3),$u("onOpen"),Zn("getHotspot",st.some),Zn("getAnchorOverrides",at({})),Zn("layouts",st.none()),Zn("eventOrder",{}),ue("model",{},[Zn("getDisplayText",function(t){return t.meta!==undefined&&t.meta.text!==undefined?t.meta.text:t.value}),Zn("selectsOver",!0),Zn("populateFromBrowse",!0)]),$u("onSetValue"),Qu("onExecute"),$u("onItemExecute"),Zn("inputClasses",[]),Zn("inputAttributes",{}),Zn("inputStyles",{}),Zn("matchWidth",!0),Zn("useMinWidth",!1),Zn("dismissOnBlur",!0),Ku(["openClass"]),Yn("initialData"),yl("typeaheadBehaviours",[Xm,bl,EC,Rm,rg,Hy]),ae("previewing",function(){return ce(!0)})].concat(oy()).concat(Ky())),RC=at([Kl({schema:[qu()],name:"menu",overrides:function(o){return{fakeFocus:!0,onHighlight:function(n,e){o.previewing.get()?n.getSystem().getByUid(o.uid).each(function(t){AC(o.model,t,e).fold(function(){return jf.dehighlight(n,e)},function(t){return t()})}):n.getSystem().getByUid(o.uid).each(function(t){o.model.populateFromBrowse&&BC(o.model,t,e)}),o.previewing.set(!1)},onExecute:function(t,n){return t.getSystem().getByUid(o.uid).toOption().map(function(t){return jo(t,FC(),{item:n}),!0})},onHover:function(t,n){o.previewing.set(!1),t.getSystem().getByUid(o.uid).each(function(t){o.model.populateFromBrowse&&BC(o.model,t,n)})}}}})]),VC=_f({name:"Typeahead",configFields:IC(),partFields:RC(),factory:function(r,t,n,i){var e=function(t,n,e){r.previewing.set(!1);var o=Hy.getCoupled(t,"sandbox");if(Qs.isOpen(o))Mf.getCurrent(o).each(function(t){jf.getHighlighted(t).fold(function(){e(t)},function(){Xo(o,t.element(),"keydown",n)})});else{Ly(r,u(t),t,o,i,function(t){Mf.getCurrent(t).each(e)},sy.HighlightFirst).get(Z)}},o=ry(r),u=function(o){return function(t){return t.map(function(t){var n=vt(t.menus),e=U(n,function(t){return P(t.items,function(t){return"item"===t.type})});return bl.getState(o).update(V(e,function(t){return t.data})),t})}},a=[Xm.config({}),bl.config({onSetValue:r.onSetValue,store:et({mode:"dataset",getDataKey:function(t){return zi(t.element())},getFallbackEntry:function(t){return{value:t,meta:{}}},setValue:function(t,n){Ni(t.element(),r.model.getDisplayText(n))}},r.initialData.map(function(t){return Kt("initialValue",t)}).getOr({}))}),EC.config({stream:{mode:"throttle",delay:r.responseTime,stopEvent:!1},onStream:function(t,n){var e=Hy.getCoupled(t,"sandbox");if(Xm.isFocused(t)&&zi(t.element()).length>=r.minChars){var o=Mf.getCurrent(e).bind(function(t){return jf.getHighlighted(t).map(bl.getValue)});r.previewing.set(!0);Ly(r,u(t),t,e,i,function(t){Mf.getCurrent(e).each(function(t){o.fold(function(){r.model.selectsOver&&jf.highlightFirst(t)},function(n){jf.highlightBy(t,function(t){return bl.getValue(t).value===n.value}),jf.getHighlighted(t).orThunk(function(){return jf.highlightFirst(t),st.none()})})})},sy.HighlightFirst).get(Z)}},cancelEvent:Oo()}),Rm.config({mode:"special",onDown:function(t,n){return e(t,n,jf.highlightFirst),st.some(!0)},onEscape:function(t){var n=Hy.getCoupled(t,"sandbox");return Qs.isOpen(n)?(Qs.close(n),st.some(!0)):st.none()},onUp:function(t,n){return e(t,n,jf.highlightLast),st.some(!0)},onEnter:function(n){var t=Hy.getCoupled(n,"sandbox"),e=Qs.isOpen(t);if(e&&!r.previewing.get())return Mf.getCurrent(t).bind(function(t){return jf.getHighlighted(t)}).map(function(t){return jo(n,FC(),{item:t}),!0});var o=bl.getValue(n);return Lo(n,Oo()),r.onExecute(t,n,o),e&&Qs.close(t),st.some(!0)}}),rg.config({toggleClass:r.markers.openClass,aria:{mode:"expanded"}}),Hy.config({others:{sandbox:function(t){return Yy(r,t,{onOpen:function(){return rg.on(t)},onClose:function(){return rg.off(t)}})}}}),Lm("typeaheadevents",[ur(function(t){var n=Z;Uy(r,u(t),t,i,n,sy.HighlightFirst).get(Z)}),Jo(FC(),function(t,n){var e=Hy.getCoupled(t,"sandbox");BC(r.model,t,n.event().item()),Lo(t,Oo()),r.onItemExecute(t,e,n.event().item(),bl.getValue(t)),Qs.close(e),MC(t)})].concat(r.dismissOnBlur?[Jo(vo(),function(t){var n=Hy.getCoupled(t,"sandbox");$a(n.element()).isNone()&&Qs.close(n)})]:[]))];return{uid:r.uid,dom:iy(Ct(r,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:et(et({},o),wl(r.typeaheadBehaviours,a)),eventOrder:r.eventOrder}}}),HC=function(i){return et(et({},i),{toCached:function(){return HC(i.toCached())},bindFuture:function(n){return HC(i.bind(function(t){return t.fold(function(t){return vy(ot.error(t))},function(t){return n(t)})}))},bindResult:function(n){return HC(i.map(function(t){return t.bind(n)}))},mapResult:function(n){return HC(i.map(function(t){return t.map(n)}))},mapError:function(n){return HC(i.map(function(t){return t.mapError(n)}))},foldResult:function(n,e){return i.map(function(t){return t.fold(n,e)})},withTimeout:function(t,r){return HC(hy(function(n){var e=!1,o=nt.setTimeout(function(){e=!0,n(ot.error(r()))},t);i.get(function(t){e||(nt.clearTimeout(o),n(t))})}))}})},PC=function(t){return HC(hy(t))},zC=PC,NC={type:"separator"},LC=function(t){return{type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:function(){}}},jC=function(t,n){return{type:"menuitem",value:n,text:t,meta:{attach:undefined},onAction:function(){}}},UC=function(t,n){return o=t,e=P(n,function(t){return t.type===o}),V(e,LC);var e,o},WC=function(t,n){var e=t.toLowerCase();return P(n,function(t){var n=t.meta!==undefined&&t.meta.text!==undefined?t.meta.text:t.text;return Ee(n.toLowerCase(),e)||Ee(t.value.toLowerCase(),e)})},GC=function(u,t,a){var n=bl.getValue(t),c=n.meta.text!==undefined?n.meta.text:n.value;return a.getLinkInformation().fold(function(){return[]},function(t){var n,e,o,r,i=WC(c,(n=a.getHistory(u),V(n,function(t){return jC(t,t)})));return"file"===u?(e=[i,WC(c,UC("header",t.targets)),WC(c,ut([(r=t,st.from(r.anchorTop).map(function(t){return jC("<top>",t)}).toArray()),UC("anchor",t.targets),(o=t,st.from(o.anchorBottom).map(function(t){return jC("<bottom>",t)}).toArray())]))],N(e,function(t,n){return 0===t.length||0===n.length?t.concat(n):t.concat(NC,n)},[])):i})},XC=Nr("aria-invalid"),YC=function(r,o,i){var t,n,e,u,a,c=o.shared.providers,s=function(t){var n=bl.getValue(t);i.addToHistory(n.value,r.filetype)},l=ey.parts().field({factory:VC,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":XC,type:"url"},minChars:0,responseTime:0,fetch:function(t){var n=GC(r.filetype,t,i),e=Dk(n,$h.BUBBLE_TO_SANDBOX,o,!1);return vy(e)},getHotspot:function(t){return h.getOpt(t)},onSetValue:function(t,n){t.hasConfigured(Ty)&&Ty.run(t).get(Z)},typeaheadBehaviours:za(ut([i.getValidationHandler().map(function(e){return Ty.config({getRoot:function(t){return lr(t.element())},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,n){d.getOpt(t).each(function(t){Br(t.element(),"title",c.translate(n))})}},validator:{validate:function(t){var n=bl.getValue(t);return zC(function(o){e({type:r.filetype,url:n.value},function(t){if("invalid"===t.status){var n=ot.error(t.message);o(n)}else{var e=ot.value(t.message);o(e)}})})},validateOnLoad:!1}})}).toArray(),[ph.config({disabled:function(){return r.disabled||c.isReadOnly()}}),Dy.config({}),Lm("urlinput-events",ut(["file"===r.filetype?[Jo(so(),function(t){jo(t,Gb,{name:r.name})})]:[],[Jo(lo(),function(t){jo(t,Gb,{name:r.name}),s(t)}),Jo(bo(),function(t){jo(t,Gb,{name:r.name}),s(t)})]]))]])),eventOrder:((t={})[so()]=["streaming","urlinput-events","invalidating"],t),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:o.shared.getSink,parts:{menu:Yv(0,0,"normal")},onExecute:function(t,n,e){jo(n,Kb,{})},onItemExecute:function(t,n,e,o){s(t),jo(t,Gb,{name:r.name})}}),f=r.label.map(function(t){return Iy(t,c)}),d=Ug((n="invalid",e=st.some(XC),void 0===(u="warning")&&(u=n),void 0===a&&(a=n),{dom:{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+n],innerHtml:Gg(u,c.icons),attributes:et({title:c.translate(a),"aria-live":"polite"},e.fold(function(){return{}},function(t){return{id:t}}))}})),m=Ug({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[d.asSpec()]}),g=i.getUrlPicker(r.filetype),p=Nr("browser.url.event"),h=Ug({dom:{tag:"div",classes:["tox-control-wrap"]},components:[l,m.asSpec()],behaviours:za([ph.config({disabled:function(){return r.disabled||c.isReadOnly()}})])}),v=Ug(Pk({name:r.name,icon:st.some("browse"),text:r.label.getOr(""),disabled:r.disabled,primary:!1,borderless:!0},function(t){return Lo(t,p)},c,[],["tox-browse-url"]));return ey.sketch({dom:Fy([]),components:f.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:ut([[h.asSpec()],g.map(function(){return v.asSpec()}).toArray()])}]),fieldBehaviours:za([ph.config({disabled:function(){return r.disabled||c.isReadOnly()},onDisabled:function(t){ey.getField(t).each(ph.disable),v.getOpt(t).each(ph.disable)},onEnabled:function(t){ey.getField(t).each(ph.enable),v.getOpt(t).each(ph.enable)}}),Uh(),Lm("url-input-events",[Jo(p,function(o){Mf.getCurrent(o).each(function(n){var t=bl.getValue(n),e=et({fieldname:r.name},t);g.each(function(t){t(e).get(function(t){bl.setValue(n,t),jo(o,Gb,{name:r.name})})})})})])])})},qC=function(a,c){var t,n,e=a.label.map(function(t){return Iy(t,c)}),o=function(o){return function(n,e){Au(e.event().target(),"[data-collection-item-value]").each(function(t){o(n,e,t,Dr(t,"data-collection-item-value"))})}},r=function(t,n){var e=V(n,function(t){var n,e=Vp.translate(t.text),o=1===a.columns?'<div class="tox-collection__item-label">'+e+"</div>":"",r='<div class="tox-collection__item-icon">'+t.icon+"</div>",i={_:" "," - ":" ","-":" "},u=e.replace(/\_| \- |\-/g,function(t){return i[t]});return'<div class="tox-collection__item'+(c.isReadOnly()?" tox-collection__item--state-disabled":"")+'" tabindex="-1" data-collection-item-value="'+('"'===(n=t.value)?"&quot;":n)+'" title="'+u+'" aria-label="'+u+'">'+r+o+"</div>"}),o=1<a.columns&&"auto"!==a.columns?R(e,a.columns):[e],r=V(o,function(t){return'<div class="tox-collection__group">'+t.join("")+"</div>"});kr(t.element(),r.join(""))},i=o(function(t,n,e,o){n.stop(),c.isReadOnly()||jo(t,qb,{name:a.name,value:o})}),u=[Jo(ro(),o(function(t,n,e){Ka(e)})),Jo(fo(),i),Jo(So(),i),Jo(io(),o(function(t,n,e){Mu(t.element(),"."+Wp).each(function(t){xi(t,Wp)}),bi(e,Wp)})),Jo(uo(),o(function(t){Mu(t.element(),"."+Wp).each(function(t){xi(t,Wp)})})),ur(o(function(t,n,e,o){jo(t,qb,{name:a.name,value:o})}))],s=function(t,n){return V(Yc(t.element(),".tox-collection__item"),n)},l=ey.parts().field({dom:{tag:"div",classes:["tox-collection"].concat(1!==a.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:ct},behaviours:za([ph.config({disabled:c.isReadOnly,onDisabled:function(t){s(t,function(t){bi(t,"tox-collection__item--state-disabled"),Br(t,"aria-disabled",!0)})},onEnabled:function(t){s(t,function(t){xi(t,"tox-collection__item--state-disabled"),Fr(t,"aria-disabled")})}}),Uh(),Nm.config({}),bl.config({store:{mode:"memory",initialValue:[]},onSetValue:function(o,t){r(o,t),"auto"===a.columns&&Op(o,5,"tox-collection__item").each(function(t){var n=t.numRows,e=t.numColumns;Rm.setGridSize(o,n,e)}),Lo(o,Zb)}}),Dy.config({}),Rm.config((t=a.columns,n="normal",1===t?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===t?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===n?".tox-swatches__row":".tox-collection__group",cell:"color"===n?"."+zp:"."+Pp}})),Lm("collection-events",u)]),eventOrder:{"alloy.execute":["disabling","alloy.base.behaviour","collection-events"]}});return My(e,l,["tox-form__group--collection"],[])},KC=function(r){return function(n,e,o){return bt(e,"name").fold(function(){return r(e,o)},function(t){return n.field(t,r(e,o))})}},JC={bar:KC(function(t,n){return e=t,o=n.shared,{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:V(e.items,o.interpreter)};var e,o}),collection:KC(function(t,n){return qC(t,n.shared.providers)}),alertbanner:KC(function(t,n){return e=t,o=n.shared.providers,Ub.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+e.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[jg.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:Gg(e.icon,o.icons),attributes:{title:o.translate(e.iconTooltip)}},action:function(t){jo(t,qb,{name:"alert-banner",value:e.url})}})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:o.translate(e.text)}}]});var e,o}),input:KC(function(t,n){return e=t,o=n.shared.providers,kC({name:e.name,multiline:!1,label:e.label,inputMode:e.inputMode,placeholder:e.placeholder,flex:!1,disabled:e.disabled,classname:"tox-textfield",validation:st.none(),maximized:e.maximized},o);var e,o}),textarea:KC(function(t,n){return e=t,o=n.shared.providers,kC({name:e.name,multiline:!0,label:e.label,inputMode:st.none(),placeholder:e.placeholder,flex:!0,disabled:e.disabled,classname:"tox-textarea",validation:st.none(),maximized:e.maximized},o);var e,o}),label:KC(function(t,n){return e=t,o=n.shared,r={dom:{tag:"label",innerHtml:o.providers.translate(e.label),classes:["tox-label"]}},i=V(e.items,o.interpreter),{dom:{tag:"div",classes:["tox-form__group"]},components:[r].concat(i),behaviours:za([Zw(),Nm.config({}),lS(st.none()),Rm.config({mode:"acyclic"})])};var e,o,r,i}),iframe:(hC=function(t,n){return wS(t,n.shared.providers)},function(t,n,e){var o=Ct(n,{source:"dynamic"});return KC(hC)(t,o,e)}),button:KC(function(t,n){return Lk(t,n.shared.providers)}),checkbox:KC(function(t,n){return e=t,o=n.shared.providers,r=bl.config({store:{mode:"manual",getValue:function(t){return t.element().dom().checked},setValue:function(t,n){t.element().dom().checked=n}}}),i=function(t){return t.element().dom().click(),st.some(!0)},u=ey.parts().field({factory:{sketch:ct},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:za([Zw(),ph.config({disabled:function(){return e.disabled||o.isReadOnly()}}),Dy.config({}),Xm.config({}),r,Rm.config({mode:"special",onEnter:i,onSpace:i,stopSpaceKeyup:!0}),Lm("checkbox-events",[Jo(lo(),function(t,n){jo(t,Gb,{name:e.name})})])])}),a=ey.parts().label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:o.translate(e.label)},behaviours:za([Zy.config({})])}),s=Ug({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[(c=function(t){return{dom:{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t],innerHtml:Gg("checked"===t?"selected":"unselected",o.icons)}}})("checked"),c("unchecked")]}),ey.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[u,s.asSpec(),a],fieldBehaviours:za([ph.config({disabled:function(){return e.disabled||o.isReadOnly()},disableClass:"tox-checkbox--disabled",onDisabled:function(t){ey.getField(t).each(ph.disable)},onEnabled:function(t){ey.getField(t).each(ph.enable)}}),Uh()])});var e,o,r,i,u,a,c,s}),colorinput:KC(function(t,n){return ox(t,n.shared,n.colorinput)}),colorpicker:KC(function(t){var n=function(t){return"tox-"+t},e=Qw(oS,n),r=Ug(e.sketch({dom:{tag:"div",classes:["tox-color-picker-container"],attributes:{role:"presentation"}},onValidHex:function(t){jo(t,qb,{name:"hex-valid",value:!0})},onInvalidHex:function(t){jo(t,qb,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[r.asSpec()],behaviours:za([bl.config({store:{mode:"manual",getValue:function(t){var n=r.get(t);return Mf.getCurrent(n).bind(function(t){return bl.getValue(t).hex}).map(function(t){return"#"+t}).getOr("")},setValue:function(t,n){var e=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(n),o=r.get(t);Mf.getCurrent(o).fold(function(){nt.console.log("Can not find form")},function(t){bl.setValue(t,{hex:st.from(e[1]).getOr("")}),Gw.getField(t,"hex").each(function(t){Lo(t,so())})})}}}),Zw()])}}),dropzone:KC(function(t,n){return dS(t,n.shared.providers)}),grid:KC(function(t,n){return e=t,o=n.shared,{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+e.columns+"col"]},components:V(e.items,o.interpreter)};var e,o}),selectbox:KC(function(t,n){return e=t,o=n.shared.providers,r=V(e.items,function(t){return{text:o.translate(t.text),value:t.value}}),i=e.label.map(function(t){return Iy(t,o)}),u=ey.parts().field({dom:{},selectAttributes:{size:e.size},options:r,factory:SC,selectBehaviours:za([ph.config({disabled:function(){return e.disabled||o.isReadOnly()}}),Dy.config({}),Lm("selectbox-change",[Jo(lo(),function(t,n){jo(t,Gb,{name:e.name})})])])}),a=1<e.size?st.none():st.some({dom:{tag:"div",classes:["tox-selectfield__icon-js"],innerHtml:Gg("chevron-down",o.icons)}}),c={dom:{tag:"div",classes:["tox-selectfield"]},components:ut([[u],a.toArray()])},ey.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:ut([i.toArray(),[c]]),fieldBehaviours:za([ph.config({disabled:function(){return e.disabled||o.isReadOnly()},onDisabled:function(t){ey.getField(t).each(ph.disable)},onEnabled:function(t){ey.getField(t).each(ph.enable)}}),Uh()])});var e,o,r,i,u,a,c}),sizeinput:KC(function(t,n){return Jk(t,n.shared.providers)}),urlinput:KC(function(t,n){return YC(t,n,n.urlinput)}),customeditor:KC(function(e){var o=ce(st.none()),n=Ug({dom:{tag:e.tag}}),r=ce(st.none());return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:za([Lm("editor-foo-events",[or(function(t){n.getOpt(t).each(function(n){var t;t=e,(Object.prototype.hasOwnProperty.call(t,"init")?e.init(n.element().dom()):rS.load(e.scriptId,e.scriptUrl).then(function(t){return t(n.element().dom(),e.settings)})).then(function(n){r.get().each(function(t){n.setValue(t)}),r.set(st.none()),o.set(st.some(n))})})})]),bl.config({store:{mode:"manual",getValue:function(){return o.get().fold(function(){return r.get().getOr("")},function(t){return t.getValue()})},setValue:function(t,n){o.get().fold(function(){r.set(st.some(n))},function(t){return t.setValue(n)})}}}),Zw()]),components:[n.asSpec()]}}),htmlpanel:KC(function(t){return"presentation"===t.presets?Ub.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html}}):Ub.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html,attributes:{role:"document"}},containerBehaviours:za([Dy.config({}),Xm.config({})])})}),imagetools:KC(function(t,n){return wC(t,n.shared.providers)}),table:KC(function(t,n){return e=t,o=n.shared.providers,u=function(t){return{dom:{tag:"th",innerHtml:o.translate(t)}}},a=function(t){return{dom:{tag:"td",innerHtml:o.translate(t)}}},c=function(t){return{dom:{tag:"tr"},components:V(t,a)}},{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(i=e.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:V(i,u)}]}),(r=e.cells,{dom:{tag:"tbody"},components:V(r,c)})],behaviours:za([Dy.config({}),Xm.config({})])};var e,o,r,i,u,a,c}),panel:KC(function(t,n){return o=n,{dom:{tag:"div",classes:(e=t).classes},components:V(e.items,o.shared.interpreter)};var e,o})},$C={field:function(t,n){return n}},QC=function(n,t,e){var o=Ct(e,{shared:{interpreter:function(t){return ZC(n,t,o)}}});return ZC(n,t,o)},ZC=function(n,e,o){return bt(JC,e.type).fold(function(){return nt.console.error('Unknown factory type "'+e.type+'", defaulting to container: ',e),e},function(t){return t(n,e,o)})},tO={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},nO=function(t,n,e){var o=wc(-12,12,tO),r={maxHeightFunction:hc()};return function(){return e()?{anchor:"node",root:Ti(ar(t())),node:st.from(t()),bubble:o,layouts:{onRtl:function(){return[Pg]},onLtr:function(){return[Hg]}},overrides:r}:{anchor:"hotspot",hotspot:n(),bubble:o,layouts:{onRtl:function(){return[wa]},onLtr:function(){return[Sa]}},overrides:r}}},eO=function(t,n,e){return function(){return e()?{anchor:"node",root:Ti(ar(t())),node:st.from(t()),layouts:{onRtl:function(){return[zg]},onLtr:function(){return[zg]}}}:{anchor:"hotspot",hotspot:n(),layouts:{onRtl:function(){return[_a]},onLtr:function(){return[_a]}}}}},oO=function(t,n,e){var o,r,i,u=Vh(t),a=function(){return le.fromDom(t.getBody())},c=function(){return le.fromDom(t.getContentAreaContainer())},s=function(){return u||!e()};return{inlineDialog:nO(c,n,s),banner:eO(c,n,s),cursor:(r=t,function(){return{anchor:"selection",root:i(),getSelection:function(){var t=r.selection.getRng();return st.some(Rc.range(le.fromDom(t.startContainer),t.startOffset,le.fromDom(t.endContainer),t.endOffset))}}}),node:(o=i=a,function(t){return{anchor:"node",root:o(),node:t}})}},rO=function(t){return{colorPicker:function(t,n){Uv(r)(t,n)},hasCustomColors:function(){return Mv(o)},getColors:function(){return Av(e)},getColorCols:(n=e=o=r=t,function(){return Vv(n)})};var n,e,o,r},iO=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],uO=function(t){return N(t,function(t,n){if(yt(n,"items")){var e=uO(n.items);return{customFormats:t.customFormats.concat(e.customFormats),formats:t.formats.concat([{title:n.title,items:e.formats}])}}if(yt(n,"inline")||yt(n,"block")||yt(n,"selector")){var o="custom-"+n.title.toLowerCase();return{customFormats:t.customFormats.concat([{name:o,format:n}]),formats:t.formats.concat([{title:n.title,format:o,icon:n.icon}])}}return et(et({},t),{formats:t.formats.concat(n)})},{customFormats:[],formats:[]})},aO=function(i){return t=i,st.from(t.getParam("style_formats")).filter(C).map(function(t){var n,e,o,r=(n=i,e=uO(t),o=function(t){it(t,function(t){n.formatter.has(t.name)||n.formatter.register(t.name,t.format)})},n.formatter?o(e.customFormats):n.on("init",function(){o(e.customFormats)}),e.formats);return i.getParam("style_formats_merge",!1,"boolean")?iO.concat(r):r}).getOr(iO);var t},cO=function(t,n,e){var o={type:"formatter",isSelected:n(t.format),getStylePreview:e(t.format)};return Ct(t,o)},sO=function(a,t,c,s){var l=function(t){return V(t,function(t){var n,e,o,r,i=lt(t);if(xt(t,"items")){var u=l(t.items);return Ct(Ct(t,{type:"submenu"}),{getStyleItems:function(){return u}})}return xt(t,"format")?cO(t,c,s):1===i.length&&F(i,"title")?Ct(t,{type:"separator"}):(e=Nr((n=t).title),o={type:"formatter",format:e,isSelected:c(e),getStylePreview:s(e)},r=Ct(n,o),a.formatter.register(e,r),r)})};return l(t)},lO=uC.trim,fO=function(n){return function(t){if(t&&1===t.nodeType){if(t.contentEditable===n)return!0;if(t.getAttribute("data-mce-contenteditable")===n)return!0}return!1}},dO=fO("true"),mO=fO("false"),gO=function(t,n,e,o,r){return{type:t,title:n,url:e,level:o,attach:r}},pO=function(t){return t.innerText||t.textContent},hO=function(t){return(n=t)&&"A"===n.nodeName&&(n.id||n.name)!==undefined&&bO(t);var n},vO=function(t){return t&&/^(H[1-6])$/.test(t.nodeName)},bO=function(t){return function(t){for(;t=t.parentNode;){var n=t.contentEditable;if(n&&"inherit"!==n)return dO(t)}return!1}(t)&&!mO(t)},yO=function(t){return vO(t)&&bO(t)},xO=function(t){var n,e,o=(n=t).id?n.id:Nr("h");return gO("header",pO(t),"#"+o,vO(e=t)?parseInt(e.nodeName.substr(1),10):0,function(){t.id=o})},wO=function(t){var n=t.id||t.name,e=pO(t);return gO("anchor",e||"#"+n,"#"+n,0,Z)},SO=function(t){var n,e;return n="h1,h2,h3,h4,h5,h6,a:not([href])",e=t,V(Yc(le.fromDom(e),n),function(t){return t.dom()})},kO=function(t){return 0<lO(t.title).length},CO=function(t){var n=SO(t);return P(V(P(n,yO),xO).concat(V(P(n,hO),wO)),kO)},OO="tinymce-url-history",_O=function(t){return S(t)&&/^https?/.test(t)},TO=function(t){return k(t)&&ht(t,function(t){return!(C(n=t)&&n.length<=5&&W(n,_O));var n}).isNone()},EO=function(){var t,n=_v.getItem(OO);if(null===n)return{};try{t=JSON.parse(n)}catch(e){if(e instanceof SyntaxError)return nt.console.log("Local storage "+OO+" was not valid JSON",e),{};throw e}return TO(t)?t:(nt.console.log("Local storage "+OO+" was not valid format",t),{})},BO=function(t){var n=EO();return Object.prototype.hasOwnProperty.call(n,t)?n[t]:[]},DO=function(n,t){if(_O(n)){var e=EO(),o=Object.prototype.hasOwnProperty.call(e,t)?e[t]:[],r=P(o,function(t){return t!==n});e[t]=[n].concat(r).slice(0,5),function(t){if(!TO(t))throw new Error("Bad format for history:\n"+JSON.stringify(t));_v.setItem(OO,JSON.stringify(t))}(e)}},MO=Object.prototype.hasOwnProperty,AO=function(t){return!!t},FO=function(t){return dt(uC.makeMap(t,/[, ]/),AO)},IO=function(t,n,e){var o,r,i=(o=t,r=n,(MO.call(o,r)?st.some(o[r]):st.none()).getOr(e));return S(i)?st.some(i):st.none()},RO=function(t){return st.some(t.file_picker_callback).filter(T)},VO=function(t,n){var e,o,r,i,u=(e=t,o=st.some(e.file_picker_types).filter(AO),r=st.some(e.file_browser_callback_types).filter(AO),i=o.or(r).map(FO),RO(e).fold(function(){return!1},function(t){return i.fold(function(){return!0},function(t){return 0<lt(t).length&&t})}));return O(u)?u?RO(t):st.none():u[n]?RO(t):st.none()},HO=function(n){return{getHistory:BO,addToHistory:DO,getLinkInformation:function(){return!1===(t=n).settings.typeahead_urls?st.none():st.some({targets:CO(t.getBody()),anchorTop:IO(t.settings,"anchor_top","#top").getOrUndefined(),anchorBottom:IO(t.settings,"anchor_bottom","#bottom").getOrUndefined()});var t},getValidationHandler:function(){return t=n,st.from(t.settings.file_picker_validator_handler).filter(T).orThunk(function(){return st.from(t.settings.filepicker_validator_handler).filter(T)});var t},getUrlPicker:function(t){return i=t,VO((r=n).settings,i).map(function(o){return function(n){return hy(function(e){var t=et({filetype:i,fieldname:n.fieldname},st.from(n.meta).getOr({}));o.call(r,function(t,n){if(!S(t))throw new Error("Expected value to be string");if(n!==undefined&&!k(n))throw new Error("Expected meta to be a object");e({value:t,meta:n})},n.value,t)})}});var r,i}}},PO=function(t,n,e){var o,r,i=ce(!1),u={isPositionedAtTop:function(){return"top"===o.get()},getDockingMode:(o=ce(Ih(n)?"bottom":"top")).get,setDockingMode:o.set},a={shared:{providers:{icons:function(){return n.ui.registry.getAll().icons},menuItems:function(){return n.ui.registry.getAll().menuItems},translate:Vp.translate,isReadOnly:function(){return n.mode.isReadOnly()}},interpreter:function(t){return ZC($C,t,a)},anchors:oO(n,e,u.isPositionedAtTop),header:u,getSink:function(){return ot.value(t)}},urlinput:HO(n),styleselect:function(o){var r=function(t){return function(){return o.formatter.match(t)}},i=function(n){return function(){var t=o.formatter.get(n);return t!==undefined?st.some({tag:0<t.length&&(t[0].inline||t[0].block)||"div",styles:o.dom.parseStyle(o.formatter.getCssText(n))}):st.none()}},u=function(t){var n=t.items;return n!==undefined&&0<n.length?U(n,u):[t.format]},a=ce([]),c=ce([]),e=ce([]),s=ce([]),l=ce(!1);o.on("PreInit",function(t){var n=aO(o),e=sO(o,n,r,i);a.set(e),c.set(U(e,u))}),o.on("addStyleModifications",function(t){var n=sO(o,t.items,r,i);e.set(n),l.set(t.replace),s.set(U(n,u))});return{getData:function(){var t=l.get()?[]:a.get(),n=e.get();return t.concat(n)},getFlattenedKeys:function(){var t=l.get()?[]:c.get(),n=s.get();return t.concat(n)}}}(n),colorinput:rO(n),dialog:{isDraggableModal:(r=n,function(){return r.getParam("draggable_modal",!1,"boolean")})},isContextMenuOpen:function(){return i.get()},setContextMenuState:function(t){return i.set(t)}};return a},zO=at(function(t,n){var e,o,r;e=t,o=Math.floor(n),r=au.max(e,o,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]),Di(e,"max-width",r+"px")}),NO="contexttoolbar-hide",LO=at([zn("items"),Ku(["itemSelector"]),yl("tgroupBehaviours",[Rm])]),jO=at([$l({name:"items",unit:"item"})]),UO=_f({name:"ToolbarGroup",configFields:LO(),partFields:jO(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,components:n,behaviours:wl(t.tgroupBehaviours,[Rm.config({mode:"flow",selector:t.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),WO=at([zn("dom"),Zn("shell",!0),yl("toolbarBehaviours",[Nm])]),GO=at([Jl({name:"groups",overrides:function(){return{behaviours:za([Nm.config({})])}}})]),XO=_f({name:"Toolbar",configFields:WO(),partFields:GO(),factory:function(n,t,e,o){var r=function(t){return n.shell?st.some(t):sf(t,n,"groups")},i=n.shell?{behaviours:[Nm.config({})],components:[]}:{behaviours:[],components:t};return{uid:n.uid,dom:n.dom,components:i.components,behaviours:wl(n.toolbarBehaviours,i.behaviours),apis:{setGroups:function(t,n){r(t).fold(function(){throw nt.console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")},function(t){Nm.set(t,n)})}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,n,e){t.setGroups(n,e)}}}),YO=function(t,n,e){return{within:at(t),extra:at(n),withinWidth:at(e)}},qO=function(t,n,o){var e,r=(e=function(t,n){var e=o(t);return st.some({element:at(t),start:at(n),finish:at(n+e),width:at(e)})},N(t,function(n,t){return e(t,n.len).fold(at(n),function(t){return{len:t.finish(),list:n.list.concat([t])}})},{len:0,list:[]}).list),i=P(r,function(t){return t.finish()<=n}),u=z(i,function(t,n){return t+n.width()},0),a=r.slice(i.length);return{within:at(i),extra:at(a),withinWidth:at(u)}},KO=function(t){return V(t,function(t){return t.element()})},JO=function(t,n,e,o){var r,i,u,a,c,s,l,f,d,m=(0===(r=qO(n,t,e)).extra().length?st.some(r):st.none()).getOrThunk(function(){return qO(n,t-e(o),e)}),g=m.within(),p=m.extra(),h=m.withinWidth();return 1===p.length&&p[0].width()<=e(o)?(l=p,f=h,d=KO(g.concat(l)),YO(d,[],f)):1<=p.length?(u=p,a=o,c=h,s=KO(g).concat([a]),YO(s,KO(u),c)):(i=h,YO(KO(g),[],i))},$O=function(t,n){var e=V(n,function(t){return $i(t)});XO.setGroups(t,e)},QO=function(t,n,e){var o=lf(t,n,"primary"),r=Hy.getCoupled(t,"overflowGroup");Di(o.element(),"visibility","hidden");var i=n.builtGroups.get().concat([r]),u=Q(i,function(n){return $a(n.element()).bind(function(t){return n.getSystem().getByDom(t).toOption()})});e([]),$O(o,i);var a=cu(o.element()),c=JO(a,n.builtGroups.get(),function(t){return cu(t.element())},r);0===c.extra().length?(Nm.remove(o,r),e([])):($O(o,c.within()),e(c.extra())),Hi(o.element(),"visibility"),Pi(o.element()),u.each(Xm.focus)},ZO=at([yl("splitToolbarBehaviours",[Hy]),ae("builtGroups",function(){return ce([])})]),t_=at([Ku(["overflowToggledClass"]),$n("getOverflowBounds"),zn("lazySink"),ae("overflowGroups",function(){return ce([])})].concat(ZO())),n_=at([ql({factory:XO,schema:WO(),name:"primary"}),Kl({schema:WO(),name:"overflow"}),Kl({name:"overflow-button"}),Kl({name:"overflow-group"})]),e_=at([Ku(["toggledClass"]),zn("lazySink"),Un("fetch"),$n("getBounds"),Qn("fireDismissalEventInstead",[Zn("event",Fo())]),Tc()]),o_=at([Kl({name:"button",overrides:function(t){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:za([rg.config({toggleClass:t.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),Kl({factory:XO,schema:WO(),name:"toolbar",overrides:function(n){return{toolbarBehaviours:za([Rm.config({mode:"cyclic",onEscape:function(t){return sf(t,n,"button").each(Xm.focus),st.none()}})])}}})]),r_=function(t,n){var e=Hy.getCoupled(t,"toolbarSandbox");Qs.isOpen(e)?Qs.close(e):Qs.open(e,n.toolbar())},i_=function(t,n,e,o){var r=e.getBounds.map(function(t){return t()}),i=e.lazySink(t).getOrDie();Ds.positionWithinBounds(i,{anchor:"hotspot",hotspot:t,layouts:o,overrides:{maxWidthFunction:zO()}},n,r)},u_=function(t,n,e,o,r){XO.setGroups(n,r),i_(t,n,e,o),rg.on(t)},a_=_f({name:"FloatingToolbarButton",factory:function(u,t,a,n){return et(et({},jg.sketch(et(et({},n.button()),{action:function(t){r_(t,n)},buttonBehaviours:kl({dump:n.button().buttonBehaviours},[Hy.config({others:{toolbarSandbox:function(t){return o=t,e=a,r=u,{dom:{tag:"div",attributes:{id:(i=Fu()).id}},behaviours:za([Rm.config({mode:"special",onEscape:function(t){return Qs.close(t),st.some(!0)}}),Qs.config({onOpen:function(t,n){r.fetch().get(function(t){u_(o,n,r,e.layouts,t),i.link(o.element()),Rm.focusIn(n)})},onClose:function(){rg.off(o),Xm.focus(o),i.unlink(o.element())},isPartOf:function(t,n,e){return Ru(n,e)||Ru(o,e)},getAttachPoint:function(){return r.lazySink(o).getOrDie()}}),Ya.config({channels:et(et({},ol(et({isExtraPart:c},r.fireDismissalEventInstead.map(function(t){return{fireEventInstead:{event:t.event}}}).getOr({})))),il({doReposition:function(){Qs.getState(Hy.getCoupled(o,"toolbarSandbox")).each(function(t){i_(o,t,r,e.layouts)})}}))})])};var o,e,r,i}}})])}))),{apis:{setGroups:function(n,e){Qs.getState(Hy.getCoupled(n,"toolbarSandbox")).each(function(t){u_(n,t,u,a.layouts,e)})},reposition:function(n){Qs.getState(Hy.getCoupled(n,"toolbarSandbox")).each(function(t){i_(n,t,u,a.layouts)})},toggle:function(t){r_(t,n)},getToolbar:function(t){return Qs.getState(Hy.getCoupled(t,"toolbarSandbox"))}}})},configFields:e_(),partFields:o_(),apis:{setGroups:function(t,n,e){t.setGroups(n,e)},reposition:function(t,n){t.reposition(n)},toggle:function(t,n){t.toggle(n)},getToolbar:function(t,n){return t.getToolbar(n)}}}),c_=function(t){return V(t,function(t){return $i(t)})},s_=function(t,e,o){QO(t,o,function(n){o.overflowGroups.set(n),e.getOpt(t).each(function(t){a_.setGroups(t,c_(n))})})},l_=_f({name:"SplitFloatingToolbar",configFields:t_(),partFields:n_(),factory:function(e,t,n,o){var r=Ug(a_.sketch({fetch:function(){return hy(function(t){t(c_(e.overflowGroups.get()))})},layouts:{onLtr:function(){return[Sa,wa]},onRtl:function(){return[wa,Sa]},onBottomLtr:function(){return[Ca,ka]},onBottomRtl:function(){return[ka,Ca]}},getBounds:n.getOverflowBounds,lazySink:e.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:e.markers.overflowToggledClass},parts:{button:o["overflow-button"](),toolbar:o.overflow()}}));return{uid:e.uid,dom:e.dom,components:t,behaviours:wl(e.splitToolbarBehaviours,[Hy.config({others:{overflowGroup:function(){return UO.sketch(et(et({},o["overflow-group"]()),{items:[r.asSpec()]}))}}})]),apis:{setGroups:function(t,n){e.builtGroups.set(V(n,t.getSystem().build)),s_(t,r,e)},refresh:function(t){return s_(t,r,e)},toggle:function(t){r.getOpt(t).each(function(t){a_.toggle(t)})},reposition:function(t){r.getOpt(t).each(function(t){a_.reposition(t)})},getOverflow:function(t){return r.getOpt(t).bind(function(t){return a_.getToolbar(t)})}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,n,e){t.setGroups(n,e)},refresh:function(t,n){t.refresh(n)},reposition:function(t,n){t.reposition(n)},toggle:function(t,n){t.toggle(n)},getOverflow:function(t,n){return t.getOverflow(n)}}}),f_=function(n,t){return t.getAnimationRoot.fold(function(){return n.element()},function(t){return t(n)})},d_=function(t){return t.dimension.property},m_=function(t,n){return t.dimension.getDimension(n)},g_=function(t,n){var e=f_(t,n);ki(e,[n.shrinkingClass,n.growingClass])},p_=function(t,n){xi(t.element(),n.openClass),bi(t.element(),n.closedClass),Di(t.element(),d_(n),"0px"),Pi(t.element())},h_=function(t,n){xi(t.element(),n.closedClass),bi(t.element(),n.openClass),Hi(t.element(),d_(n))},v_=function(t,n,e,o){e.setCollapsed(),Di(t.element(),d_(n),m_(n,t.element())),Pi(t.element()),g_(t,n),p_(t,n),n.onStartShrink(t),n.onShrunk(t)},b_=function(t,n,e,o){var r=o.getOrThunk(function(){return m_(n,t.element())});e.setCollapsed(),Di(t.element(),d_(n),r),Pi(t.element());var i=f_(t,n);xi(i,n.growingClass),bi(i,n.shrinkingClass),p_(t,n),n.onStartShrink(t)},y_=function(t,n,e){var o=m_(n,t.element());("0px"===o?v_:b_)(t,n,e,st.some(o))},x_=function(t,n,e){var o=f_(t,n),r=wi(o,n.shrinkingClass),i=m_(n,t.element());h_(t,n);var u=m_(n,t.element());(r?function(){Di(t.element(),d_(n),i),Pi(t.element())}:function(){p_(t,n)})(),xi(o,n.shrinkingClass),bi(o,n.growingClass),h_(t,n),Di(t.element(),d_(n),u),e.setExpanded(),n.onStartGrow(t)},w_=function(t,n,e){var o=f_(t,n);return!0===wi(o,n.growingClass)},S_=function(t,n,e){var o=f_(t,n);return!0===wi(o,n.shrinkingClass)},k_=/* */Object.freeze({__proto__:null,refresh:function(t,n,e){if(e.isExpanded()){Hi(t.element(),d_(n));var o=m_(n,t.element());Di(t.element(),d_(n),o)}},grow:function(t,n,e){e.isExpanded()||x_(t,n,e)},shrink:function(t,n,e){e.isExpanded()&&y_(t,n,e)},immediateShrink:function(t,n,e){e.isExpanded()&&v_(t,n,e,st.none())},hasGrown:function(t,n,e){return e.isExpanded()},hasShrunk:function(t,n,e){return e.isCollapsed()},isGrowing:w_,isShrinking:S_,isTransitioning:function(t,n,e){return!0===w_(t,n)||!0===S_(t,n)},toggleGrow:function(t,n,e){(e.isExpanded()?y_:x_)(t,n,e)},disableTransitions:g_}),C_=/* */Object.freeze({__proto__:null,exhibit:function(t,n,e){var o=n.expanded;return ii(o?{classes:[n.openClass],styles:{}}:{classes:[n.closedClass],styles:Kt(n.dimension.property,"0px")})},events:function(e,o){return Yo([er(mo(),function(t,n){n.event().raw().propertyName===e.dimension.property&&(g_(t,e),o.isExpanded()&&Hi(t.element(),e.dimension.property),(o.isExpanded()?e.onGrown:e.onShrunk)(t))})])}}),O_=[zn("closedClass"),zn("openClass"),zn("shrinkingClass"),zn("growingClass"),Yn("getAnimationRoot"),$u("onShrunk"),$u("onStartShrink"),$u("onGrown"),$u("onStartGrow"),Zn("expanded",!1),Nn("dimension",Bn("property",{width:[na("property","width"),na("getDimension",function(t){return cu(t)+"px"})],height:[na("property","height"),na("getDimension",function(t){return tu(t)+"px"})]}))],__=La({fields:O_,name:"sliding",active:C_,apis:k_,state:/* */Object.freeze({__proto__:null,init:function(t){var n=ce(t.expanded);return oi({isExpanded:function(){return!0===n.get()},isCollapsed:function(){return!1===n.get()},setCollapsed:g(n.set,!1),setExpanded:g(n.set,!0),readState:function(){return"expanded: "+n.get()}})}})}),T_=at([Ku(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),$u("onOpened"),$u("onClosed")].concat(ZO())),E_=at([ql({factory:XO,schema:WO(),name:"primary"}),ql({factory:XO,schema:WO(),name:"overflow",overrides:function(n){return{toolbarBehaviours:za([__.config({dimension:{property:"height"},closedClass:n.markers.closedClass,openClass:n.markers.openClass,shrinkingClass:n.markers.shrinkingClass,growingClass:n.markers.growingClass,onShrunk:function(t){sf(t,n,"overflow-button").each(function(t){rg.off(t),Xm.focus(t)}),n.onClosed(t)},onGrown:function(t){Rm.focusIn(t),n.onOpened(t)},onStartGrow:function(t){sf(t,n,"overflow-button").each(rg.on)}}),Rm.config({mode:"acyclic",onEscape:function(t){return sf(t,n,"overflow-button").each(Xm.focus),st.some(!0)}})])}}}),Kl({name:"overflow-button",overrides:function(t){return{buttonBehaviours:za([rg.config({toggleClass:t.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),Kl({name:"overflow-group"})]),B_=function(t,n){sf(t,n,"overflow").each(function(e){QO(t,n,function(t){var n=V(t,function(t){return $i(t)});XO.setGroups(e,n)}),sf(t,n,"overflow-button").each(function(t){__.hasGrown(e)&&rg.on(t)}),__.refresh(e)})},D_=_f({name:"SplitSlidingToolbar",configFields:T_(),partFields:E_(),factory:function(o,t,n,e){var r="alloy.toolbar.toggle";return{uid:o.uid,dom:o.dom,components:t,behaviours:wl(o.splitToolbarBehaviours,[Hy.config({others:{overflowGroup:function(n){return UO.sketch(et(et({},e["overflow-group"]()),{items:[jg.sketch(et(et({},e["overflow-button"]()),{action:function(t){Lo(n,r)}}))]}))}}}),Lm("toolbar-toggle-events",[Jo(r,function(n){sf(n,o,"overflow").each(function(t){B_(n,o),__.toggleGrow(t)})})])]),apis:{setGroups:function(t,n){var e;e=V(n,t.getSystem().build),o.builtGroups.set(e),B_(t,o)},refresh:function(t){return B_(t,o)},toggle:function(t){var n,e;sf(n=t,e=o,"overflow").each(function(t){B_(n,e),__.toggleGrow(t)})}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,n,e){t.setGroups(n,e)},refresh:function(t,n){t.refresh(n)},toggle:function(t,n){t.toggle(n)}}}),M_=at(Nr("toolbar-height-change")),A_=function(t){var n=t.title.fold(function(){return{}},function(t){return{attributes:{title:t}}});return{dom:et({tag:"div",classes:["tox-toolbar__group"]},n),components:[UO.parts().items({})],items:t.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:za([Dy.config({}),Xm.config({})])}},F_=function(t){return UO.sketch(A_(t))},I_=function(e,t){var n=or(function(t){var n=V(e.initGroups,F_);XO.setGroups(t,n)});return za([Yh(e.providers.isReadOnly),Uh(),Rm.config({mode:t,onEscape:e.onEscape,selector:".tox-toolbar__group"}),Lm("toolbar-events",[n])])},R_=function(t){var n=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":A_({title:st.none(),items:[]}),"overflow-button":Rk({name:"more",icon:st.some("more-drawer"),disabled:!1,tooltip:st.some("More..."),primary:!1,borderless:!1},st.none(),t.providers)},splitToolbarBehaviours:I_(t,n)}},V_=function(i){var t=R_(i),n=l_.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return l_.sketch(et(et({},t),{lazySink:i.getSink,getOverflowBounds:function(){var t=i.moreDrawerData.lazyHeader().element(),n=Su(t),e=cr(t),o=Su(e),r=Math.max(e.dom().scrollHeight,o.height);return xu(n.x+4,o.y,n.width-8,r)},parts:et(et({},t.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:i.attributes}}}),components:[n],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))},H_=function(t){var n=D_.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),e=D_.parts().overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),o=R_(t);return D_.sketch(et(et({},o),{components:[n,e],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(t){t.getSystem().broadcastOn([M_()],{type:"opened"})},onClosed:function(t){t.getSystem().broadcastOn([M_()],{type:"closed"})}}))},P_=function(t){var n=t.cyclicKeying?"cyclic":"acyclic";return XO.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===Kg.scrolling?["tox-toolbar--scrolling"]:[])},components:[XO.parts().groups({})],toolbarBehaviours:I_(t,n)})},z_=[re("disabled",!1),Jn("tooltip"),Jn("icon"),Jn("text"),ie("onSetup",function(){return Z})],N_=ln([Ln("type"),Un("onAction")].concat(z_)),L_=function(t){return Cn("toolbarbutton",N_,t)},j_=[Jn("text"),Jn("tooltip"),Jn("icon"),Un("fetch"),ie("onSetup",function(){return Z})],U_=ln(b([Ln("type")],j_)),W_=function(t){return Cn("menubutton",U_,t)},G_=ln([Ln("type"),Jn("tooltip"),Jn("icon"),Jn("text"),$n("select"),Un("fetch"),ie("onSetup",function(){return Z}),oe("presets","normal",["normal","color","listpreview"]),Zn("columns",1),Un("onAction"),Un("onItemAction")]),X_=[re("active",!1)].concat(z_),Y_=ln(X_.concat([Ln("type"),Un("onAction")])),q_=function(t){return Cn("ToggleButton",Y_,t)},K_=ln([Ln("type"),Nn("items",(vC=[xn([Ln("name"),Xn("items",Fn)]),Fn],{extract:function(t,n,e){for(var o=[],r=0,i=vC;r<i.length;r++){var u=i[r].extract(t,n,e);if(u.stype===a.Value)return u;o.push(u)}return tn(o)},toString:function(){return"oneOf("+V(vC,function(t){return t.toString()}).join(", ")+")"}}))].concat(z_)),J_=[ie("predicate",function(){return!1}),oe("scope","node",["node","editor"]),oe("position","selection",["node","selection","line"])],$_=z_.concat([Zn("type","contextformbutton"),Zn("primary",!1),Un("onAction"),ae("original",ct)]),Q_=X_.concat([Zn("type","contextformbutton"),Zn("primary",!1),Un("onAction"),ae("original",ct)]),Z_=z_.concat([Zn("type","contextformbutton")]),tT=X_.concat([Zn("type","contextformtogglebutton")]),nT=Bn("type",{contextformbutton:$_,contextformtogglebutton:Q_}),eT=ln([Zn("type","contextform"),ie("initValue",function(){return""}),Jn("label"),Xn("commands",nT),qn("launch",Bn("type",{contextformbutton:Z_,contextformtogglebutton:tT}))].concat(J_)),oT=ln([Zn("type","contexttoolbar"),Ln("items")].concat(J_)),rT=/* */Object.freeze({__proto__:null,getState:function(t,n,e){return e}}),iT=/* */Object.freeze({__proto__:null,events:function(i,u){var r=function(o,r){i.updateState.each(function(t){var n=t(o,r);u.set(n)}),i.renderComponents.each(function(t){var n=t(r,u.get()),e=V(n,o.getSystem().build);Is(o,e)})};return Yo([Jo(yo(),function(t,n){var e=n,o=i.channel;F(e.channels(),o)&&r(t,e.data())}),or(function(n,t){i.initialData.each(function(t){r(n,t)})})])}}),uT=/* */Object.freeze({__proto__:null,init:function(){var n=ce(st.none());return{readState:function(){return n.get().fold(function(){return"none"},function(t){return t})},get:function(){return n.get()},set:function(t){return n.set(t)},clear:function(){return n.set(st.none())}}}}),aT=[zn("channel"),Yn("renderComponents"),Yn("updateState"),Yn("initialData")],cT=La({fields:aT,name:"reflecting",active:iT,apis:rT,state:uT}),sT=at([zn("toggleClass"),zn("fetch"),Zu("onExecute"),Zn("getHotspot",st.some),Zn("getAnchorOverrides",at({})),Tc(),Zu("onItemExecute"),Yn("lazySink"),zn("dom"),$u("onOpen"),yl("splitDropdownBehaviours",[Hy,Rm,Xm]),Zn("matchWidth",!1),Zn("useMinWidth",!1),Zn("eventOrder",{}),Yn("role")].concat(Ky())),lT=ql({factory:jg,schema:[zn("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:za([Xm.revoke()])}},overrides:function(n){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(t){t.getSystem().getByUid(n.uid).each(Uo)},buttonBehaviours:za([rg.config({toggleOnExecute:!1,toggleClass:n.toggleClass})])}}}),fT=ql({factory:jg,schema:[zn("dom")],name:"button",defaults:function(){return{buttonBehaviours:za([Xm.revoke()])}},overrides:function(e){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(n){n.getSystem().getByUid(e.uid).each(function(t){e.onExecute(t,n)})}}}}),dT=at([lT,fT,Jl({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[zn("text")],name:"aria-descriptor"}),Kl({schema:[qu()],name:"menu",defaults:function(o){return{onExecute:function(n,e){n.getSystem().getByUid(o.uid).each(function(t){o.onItemExecute(t,n,e)})}}}}),zy()]),mT=_f({name:"SplitDropdown",configFields:sT(),partFields:dT(),factory:function(o,t,n,e){var r=function(t){Mf.getCurrent(t).each(function(t){jf.highlightFirst(t),Rm.focusIn(t)})},i=function(t){Uy(o,function(t){return t},t,e,r,sy.HighlightFirst).get(Z)},u=function(t){var n=lf(t,o,"button");return Uo(n),st.some(!0)},a=et(et({},Yo([or(function(e,t){sf(e,o,"aria-descriptor").each(function(t){var n=Nr("aria");Br(t.element(),"id",n),Br(e.element(),"aria-describedby",n)})})])),ug(st.some(i))),c={repositionMenus:function(t){rg.isOn(t)&&qy(t)}};return{uid:o.uid,dom:o.dom,components:t,apis:c,eventOrder:et(et({},o.eventOrder),{"alloy.execute":["disabling","toggling","alloy.base.behaviour"]}),events:a,behaviours:wl(o.splitDropdownBehaviours,[Hy.config({others:{sandbox:function(t){var n=lf(t,o,"arrow");return Yy(o,t,{onOpen:function(){rg.on(n),rg.on(t)},onClose:function(){rg.off(n),rg.off(t)}})}}}),Rm.config({mode:"special",onSpace:u,onEnter:u,onDown:function(t){return i(t),st.some(!0)}}),Xm.config({}),rg.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:o.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:function(t,n){return t.repositionMenus(n)}}}),gT=function(n){return{isDisabled:function(){return ph.isDisabled(n)},setDisabled:function(t){return ph.set(n,t)}}},pT=function(n){return{setActive:function(t){rg.set(n,t)},isActive:function(){return rg.isOn(n)},isDisabled:function(){return ph.isDisabled(n)},setDisabled:function(t){return ph.set(n,t)}}},hT=function(t,n){return t.map(function(t){return{"aria-label":n.translate(t),title:n.translate(t)}}).getOr({})},vT=Nr("focus-button"),bT=["checklist","ordered-list"],yT=["indent","outdent","table-insert-column-after","table-insert-column-before","unordered-list"],xT=function(n,e,t,o,r,i){var u,a=function(t){return Vp.isRtl()&&F(bT,t)?t+"-rtl":t},c=Vp.isRtl()&&n.exists(function(t){return F(yT,t)});return{dom:{tag:"button",classes:["tox-tbtn"].concat(e.isSome()?["tox-tbtn--select"]:[]).concat(c?["tox-tbtn__icon-rtl"]:[]),attributes:hT(t,i)},components:Zh([n.map(function(t){return vk(a(t),i.icons)}),e.map(function(t){return yk(t,"tox-tbtn",i)})]),eventOrder:((u={})[to()]=["focusing","alloy.base.behaviour","common-button-display-events"],u),buttonBehaviours:za([Yh(i.isReadOnly),Uh(),Lm("common-button-display-events",[Jo(to(),function(t,n){n.event().prevent(),Lo(t,vT)})])].concat(o.map(function(t){return cT.config({channel:t,initialData:{icon:n,text:e},renderComponents:function(t,n){return Zh([t.icon.map(function(t){return vk(a(t),i.icons)}),t.text.map(function(t){return yk(t,"tox-tbtn",i)})])}})}).toArray()).concat(r.getOr([])))}},wT=function(t,n,e){var o,r=ce(Z),i=xT(t.icon,t.text,t.tooltip,st.none(),st.none(),e);return jg.sketch({dom:i.dom,components:i.components,eventOrder:wk,buttonBehaviours:za([Lm("toolbar-button-events",[(o={onAction:t.onAction,getApi:n.getApi},ur(function(n,t){qh(o,n)(function(t){jo(n,xk,{buttonApi:t}),o.onAction(t)})})),Kh(n,r),Jh(n,r)]),Yh(function(){return t.disabled||e.isReadOnly()}),Uh()].concat(n.toolbarButtonBehaviours))})},ST=function(t,n,e){return wT(t,{toolbarButtonBehaviours:[].concat(0<e.length?[Lm("toolbarButtonWith",e)]:[]),getApi:gT,onSetup:t.onSetup},n)},kT=function(t,n,e){return Ct(wT(t,{toolbarButtonBehaviours:[Nm.config({}),rg.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(0<e.length?[Lm("toolbarToggleButtonWith",e)]:[]),getApi:pT,onSetup:t.onSetup},n))},CT=function(n,t){var e,o,r,i,u=Nr("channel-update-split-dropdown-display"),a=function(e){return{isDisabled:function(){return ph.isDisabled(e)},setDisabled:function(t){return ph.set(e,t)},setIconFill:function(t,n){Mu(e.element(),'svg path[id="'+t+'"], rect[id="'+t+'"]').each(function(t){Br(t,"fill",n)})},setIconStroke:function(t,n){Mu(e.element(),'svg path[id="'+t+'"], rect[id="'+t+'"]').each(function(t){Br(t,"stroke",n)})},setActive:function(n){Br(e.element(),"aria-pressed",n),Mu(e.element(),"span").each(function(t){e.getSystem().getByDom(t).each(function(t){return rg.set(t,n)})})},isActive:function(){return Mu(e.element(),"span").exists(function(t){return e.getSystem().getByDom(t).exists(rg.isOn)})}}},c=ce(Z),s={getApi:a,onSetup:n.onSetup};return mT.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:et({"aria-pressed":!1},hT(n.tooltip,t.providers))},onExecute:function(t){n.onAction(a(t))},onItemExecute:function(t,n,e){},splitDropdownBehaviours:za([Xh(t.providers.isReadOnly),Uh(),Lm("split-dropdown-events",[Jo(vT,Xm.focus),Kh(s,c),Jh(s,c)]),Zy.config({})]),eventOrder:((e={})[Mo()]=["alloy.base.behaviour","split-dropdown-events"],e),toggleClass:"tox-tbtn--enabled",lazySink:t.getSink,fetch:(o=a,r=n,i=t.providers,function(n){return hy(function(t){return r.fetch(t)}).map(function(t){return st.from(hb(Ct(nb(Nr("menu-value"),t,function(t){r.onItemAction(o(n),t)},r.columns,r.presets,$h.CLOSE_ON_EXECUTE,r.select.getOr(function(){return!1}),i),{movement:ob(r.columns,r.presets),menuBehaviours:Tp("auto"!==r.columns?[]:[or(function(o,t){Op(o,4,Gp(r.presets)).each(function(t){var n=t.numRows,e=t.numColumns;Rm.setGridSize(o,n,e)})})])})))})}),parts:{menu:Yv(0,n.columns,n.presets)},components:[mT.parts().button(xT(n.icon,n.text,st.none(),st.some(u),st.some([rg.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),t.providers)),mT.parts().arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:Gg("chevron-down",t.providers.icons)},buttonBehaviours:za([Xh(t.providers.isReadOnly),Uh()])}),mT.parts()["aria-descriptor"]({text:t.providers.translate("To open the popup, press Shift+Enter")})]})},OT=function(i,u){return Jo(xk,function(t,n){var e,o=i.get(t),r=(e=o,{hide:function(){return Lo(e,Co())},getValue:function(){return bl.getValue(e)}});u.onAction(r,n.event().buttonApi())})},_T=function(t,n,e){var o,r,i,u,a,c,s,l,f,d,m,g,p={backstage:{shared:{providers:e}}};return"contextformtogglebutton"===n.type?(s=t,f=p,(d=(l=n).original).primary,m=y(d,["primary"]),g=On(q_(et(et({},m),{type:"togglebutton",onAction:function(){}}))),kT(g,f.backstage.shared.providers,[OT(s,l)])):(o=t,i=p,(u=(r=n).original).primary,a=y(u,["primary"]),c=On(L_(et(et({},a),{type:"button",onAction:function(){}}))),ST(c,i.backstage.shared.providers,[OT(o,r)]))},TT=function(t,n){var e,o,r,i,u=t.label.fold(function(){return{}},function(t){return{"aria-label":t}}),a=Ug(uy.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:t.initValue(),inputAttributes:u,selectOnFocus:!0,inputBehaviours:za([Rm.config({mode:"special",onEnter:function(t){return c.findPrimary(t).map(function(t){return Uo(t),!0})},onLeft:function(t,n){return n.cut(),st.none()},onRight:function(t,n){return n.cut(),st.none()}})])})),c=(e=a,o=t.commands,r=n,i=V(o,function(t){return Ug(_T(e,t,r))}),{asSpecs:function(){return V(i,function(t){return t.asSpec()})},findPrimary:function(e){return Q(o,function(t,n){return t.primary?st.from(i[n]).bind(function(t){return t.getOpt(e)}).filter(x(ph.isDisabled)):st.none()})}});return[{title:st.none(),items:[a.asSpec()]},{title:st.none(),items:c.asSpecs()}]},ET=TT,BT=function(t,n){var e,o,r,i,u,a=hu(nt.window),c=wu(le.fromDom(t.getContentAreaContainer())),s=Ch(t)||Oh(t)||Th(t),l=(e=c,o=a,r=Math.max(o.x,e.x),i=e.right-r,u=o.width-(r-o.x),{x:r,width:Math.min(i,u)}),f=l.x,d=l.width;if(t.inline&&!s)return xu(f,a.y,d,a.height);var m=function(t,n,e,o){var r=le.fromDom(t.getContainer()),i=Mu(r,".tox-editor-header").getOr(r),u=wu(i),a=u.y>=n.bottom,c=o&&!a;if(t.inline&&c)return{y:Math.max(u.bottom,e.y),bottom:e.bottom};if(t.inline&&!c)return{y:e.y,bottom:Math.min(u.y,e.bottom)};var s=wu(r);return c?{y:Math.max(u.bottom,e.y),bottom:Math.min(s.bottom,e.bottom)}:{y:Math.max(s.y,e.y),bottom:Math.min(u.y,e.bottom)}}(t,c,a,n.header.isPositionedAtTop()),g=m.y,p=m.bottom;return xu(f,g,d,p-g)},DT=function(n,t){var e=P(t,function(t){return t.predicate(n.dom())}),o=H(e,function(t){return"contexttoolbar"===t.type});return{contextToolbars:o.pass,contextForms:o.fail}},MT=function(t,n,e){var o=DT(t,n);if(0<o.contextForms.length)return st.some({elem:t,toolbars:[o.contextForms[0]]});var r=DT(t,e);if(0<r.contextForms.length)return st.some({elem:t,toolbars:[r.contextForms[0]]});if(0<o.contextToolbars.length||0<r.contextToolbars.length){var i=function(t){if(t.length<=1)return t;var n=function(n){return I(t,function(t){return t.position===n})},e=function(n){return P(t,function(t){return t.position===n})},o=n("selection"),r=n("node");if(o||r){if(r&&o){var i=e("node"),u=V(e("selection"),function(t){return et(et({},t),{position:"node"})});return i.concat(u)}return e(o?"selection":"node")}return e("line")}(o.contextToolbars.concat(r.contextToolbars));return st.some({elem:t,toolbars:i})}return st.none()},AT=function(t,n,i){return t(n)?st.none():Ge(n,function(t){var n=DT(t,i.inNodeScope),e=n.contextToolbars,o=n.contextForms,r=0<o.length?o:function(t){if(t.length<=1)return t;var n=function(n){return L(t,function(t){return t.position===n})};return n("selection").orThunk(function(){return n("node")}).orThunk(function(){return n("line")}).map(function(t){return t.position}).fold(function(){return[]},function(n){return P(t,function(t){return t.position===n})})}(e);return 0<r.length?st.some({elem:t,toolbars:r}):st.none()},t)},FT=function(e,r){var t={},i=[],u=[],a={},c={},o=function(n,e){var o=On(Cn("ContextForm",eT,e));(t[n]=o).launch.map(function(t){a["form:"+n]=et(et({},e.launch),{type:"contextformtogglebutton"===t.type?"togglebutton":"button",onAction:function(){r(o)}})}),"editor"===o.scope?u.push(o):i.push(o),c[n]=o},s=function(n,e){Cn("ContextToolbar",oT,e).each(function(t){"editor"===e.scope?u.push(t):i.push(t),c[n]=t})},n=lt(e);return it(n,function(t){var n=e[t];"contextform"===n.type?o(t,n):"contexttoolbar"===n.type&&s(t,n)}),{forms:t,inNodeScope:i,inEditorScope:u,lookupTable:c,formNavigators:a}},IT=Nr("forward-slide"),RT=Nr("backward-slide"),VT=Nr("change-slide-event"),HT="tox-pop--resizing",PT=function(t,n,e){var u,a,r,c,i,o=e.dataset,s="basic"===o.type?function(){return V(o.data,function(t){return cO(t,e.isSelectedFor,e.getPreviewFor)})}:o.getData;return{items:(u=n,a=e,r=function(t,n,e,o){var r=u.shared.providers.translate(t.title);if("separator"===t.type)return st.some({type:"separator",text:r});if("submenu"!==t.type)return st.some(et({type:"togglemenuitem",text:r,icon:t.icon,active:t.isSelected(o),disabled:e,onAction:a.onAction(t)},t.getStylePreview().fold(function(){return{}},function(t){return{meta:{style:t}}})));var i=U(t.getStyleItems(),function(t){return c(t,n,o)});return 0===n&&i.length<=0?st.none():st.some({type:"nestedmenuitem",text:r,disabled:i.length<=0,getSubmenuItems:function(){return U(t.getStyleItems(),function(t){return c(t,n,o)})}})},c=function(t,n,e){var o="formatter"===t.type&&a.isInvalid(t);return 0===n?o?[]:r(t,n,!1,e).toArray():r(t,n,o,e).toArray()},{validateItems:i=function(t){var n=a.getCurrentValue(),e=a.shouldHide?0:1;return U(t,function(t){return c(t,e,n)})},getFetch:function(o,r){return function(t){var n=r(),e=i(n);t(Dk(e,$h.CLOSE_ON_EXECUTE,o,!1))}}}),getStyleItems:s}},zT=function(o,t,n){var e=PT(0,t,n),r=e.items,i=e.getStyleItems;return Ck({text:n.icon.isSome()?st.none():st.some(""),icon:n.icon,tooltip:st.from(n.tooltip),role:st.none(),fetch:r.getFetch(t,i),onSetup:function(e){return n.setInitialValue.each(function(t){return t(e.getComponent())}),n.nodeChangeHandler.map(function(t){var n=t(e.getComponent());return o.on("NodeChange",n),function(){o.off("NodeChange",n)}}).getOr(Z)},getApi:function(t){return{getComponent:function(){return t}}},columns:1,presets:"normal",classes:n.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",t.shared)};(yC=bC=bC||{})[yC.SemiColon=0]="SemiColon",yC[yC.Space=1]="Space";var NT,LT,jT=function(t,n,e,o){var r,i,u=bt(t.settings,n).getOr(e);return{type:"basic",data:(i=u,r=o===bC.SemiColon?i.replace(/;$/,"").split(";"):i.split(" "),V(r,function(t){var n=t,e=t,o=t.split("=");return 1<o.length&&(n=o[0],e=o[1]),{title:n,format:e}}))}},UT=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],WT=function(e){var n=function(t){var n=L(UT,function(t){return e.formatter.match(t.format)}).fold(function(){return"left"},function(t){return t.title.toLowerCase()});jo(t,kk,{icon:"align-"+n})},t=st.some(function(t){return function(){return n(t)}}),o=st.some(function(t){return n(t)}),r={type:"basic",data:UT};return{tooltip:"Align",icon:st.some("align-left"),isSelectedFor:function(t){return function(){return e.formatter.match(t)}},getCurrentValue:at(st.none()),getPreviewFor:function(t){return function(){return st.none()}},onAction:function(n){return function(){return L(UT,function(t){return t.format===n.format}).each(function(t){return e.execCommand(t.command)})}},setInitialValue:o,nodeChangeHandler:t,dataset:r,shouldHide:!1,isInvalid:function(t){return!e.formatter.canApply(t.format)}}},GT=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],XT=function(t){var n=t.split(/\s*,\s*/);return V(n,function(t){return t.replace(/^['"]+|['"]+$/g,"")})},YT=function(t){var n;return 0===t.indexOf("-apple-system")&&(n=XT(t.toLowerCase()),W(GT,function(t){return-1<n.indexOf(t.toLowerCase())}))},qT=function(r){var i=function(){var e=function(t){return t?XT(t)[0]:""},t=r.queryCommandValue("FontName"),n=u.data,o=t?t.toLowerCase():"";return{matchOpt:L(n,function(t){var n=t.format;return n.toLowerCase()===o||e(n).toLowerCase()===e(o).toLowerCase()}).orThunk(function(){return YT(o)?st.from({title:"System Font",format:o}):st.none()}),font:t}},n=function(t){var n=i(),e=n.matchOpt,o=n.font,r=e.fold(function(){return o},function(t){return t.title});jo(t,Sk,{text:r})},t=st.some(function(t){return function(){return n(t)}}),e=st.some(function(t){return n(t)}),u=jT(r,"font_formats","Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",bC.SemiColon);return{tooltip:"Fonts",icon:st.none(),isSelectedFor:function(n){return function(t){return t.exists(function(t){return t.format===n})}},getCurrentValue:function(){return i().matchOpt},getPreviewFor:function(t){return function(){return st.some({tag:"div",styles:-1===t.indexOf("dings")?{"font-family":t}:{}})}},onAction:function(t){return function(){r.undoManager.transact(function(){r.focus(),r.execCommand("FontName",!1,t.format)})}},setInitialValue:e,nodeChangeHandler:t,dataset:u,shouldHide:!1,isInvalid:function(){return!1}}},KT={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},JT=function(t,n){return/[0-9.]+px$/.test(t)?(e=72*parseInt(t,10)/96,o=n||0,r=Math.pow(10,o),Math.round(e*r)/r+"pt"):t;var e,o,r},$T=function(e){var i=function(){var o=st.none(),r=u.data,i=e.queryCommandValue("FontSize");if(i)for(var t=function(t){var n=JT(i,t),e=bt(KT,n).getOr("");o=L(r,function(t){return t.format===i||t.format===n||t.format===e})},n=3;o.isNone()&&0<=n;n--)t(n);return{matchOpt:o,size:i}},t=at(at(st.none())),n=function(t){var n=i(),e=n.matchOpt,o=n.size,r=e.fold(function(){return o},function(t){return t.title});jo(t,Sk,{text:r})},o=st.some(function(t){return function(){return n(t)}}),r=st.some(function(t){return n(t)}),u=jT(e,"fontsize_formats","8pt 10pt 12pt 14pt 18pt 24pt 36pt",bC.Space);return{tooltip:"Font sizes",icon:st.none(),isSelectedFor:function(n){return function(t){return t.exists(function(t){return t.format===n})}},getPreviewFor:t,getCurrentValue:function(){return i().matchOpt},onAction:function(t){return function(){e.undoManager.transact(function(){e.focus(),e.execCommand("FontSize",!1,t.format)})}},setInitialValue:r,nodeChangeHandler:o,dataset:u,shouldHide:!1,isInvalid:function(){return!1}}},QT=function(e,t,n){var o=t();return Q(n,function(n){return L(o,function(t){return e.formatter.matchNode(n,t.format)})}).orThunk(function(){return e.formatter.match("p")?st.some({title:"Paragraph",format:"p"}):st.none()})},ZT=function(t){var n=t.selection.getStart(!0)||t.getBody();return t.dom.getParents(n,function(){return!0},t.getBody())},tE=function(o,r){return function(n){var e=ce(st.none()),t=function(){n.setActive(o.formatter.match(r));var t=o.formatter.formatChanged(r,n.setActive).unbind;e.set(st.some(t))};return o.initialized?t():o.on("init",t),function(){return e.get().each(function(t){return t()})}}},nE=function(n){return function(t){return function(){n.undoManager.transact(function(){n.focus(),n.execCommand("mceToggleFormat",!1,t.format)})}}},eE=function(o){var e=function(t,n){var e=QT(o,function(){return r.data},t).fold(function(){return"Paragraph"},function(t){return t.title});jo(n,Sk,{text:e})},t=st.some(function(n){return function(t){return e(t.parents,n)}}),n=st.some(function(t){var n=ZT(o);e(n,t)}),r=jT(o,"block_formats","Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",bC.SemiColon);return{tooltip:"Blocks",icon:st.none(),isSelectedFor:function(t){return function(){return o.formatter.match(t)}},getCurrentValue:at(st.none()),getPreviewFor:function(n){return function(){var t=o.formatter.get(n);return st.some({tag:0<t.length&&(t[0].inline||t[0].block)||"div",styles:o.dom.parseStyle(o.formatter.getCssText(n))})}},onAction:nE(o),setInitialValue:n,nodeChangeHandler:t,dataset:r,shouldHide:!1,isInvalid:function(t){return!o.formatter.canApply(t.format)}}},oE=function(i,t){var e=function(t,n){var e=function(t){var n=t.items;return n!==undefined&&0<n.length?U(n,e):[{title:t.title,format:t.format}]},o=U(aO(i),e),r=QT(i,function(){return o},t).fold(function(){return"Paragraph"},function(t){return t.title});jo(n,Sk,{text:r})},n=st.some(function(n){return function(t){return e(t.parents,n)}}),o=st.some(function(t){var n=ZT(i);e(n,t)});return{tooltip:"Formats",icon:st.none(),isSelectedFor:function(t){return function(){return i.formatter.match(t)}},getCurrentValue:at(st.none()),getPreviewFor:function(n){return function(){var t=i.formatter.get(n);return t!==undefined?st.some({tag:0<t.length&&(t[0].inline||t[0].block)||"div",styles:i.dom.parseStyle(i.formatter.getCssText(n))}):st.none()}},onAction:nE(i),setInitialValue:o,nodeChangeHandler:n,shouldHide:i.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(t){return!i.formatter.canApply(t.format)},dataset:t}},rE=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styleselect"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],iE=function(r,i){return function(t,n,e){var o=r(t).mapError(function(t){return Tn(t)}).getOrDie();return i(o,n,e)}},uE={button:iE(L_,function(t,n){return e=t,o=n.backstage.shared.providers,ST(e,o,[]);var e,o}),togglebutton:iE(q_,function(t,n){return e=t,o=n.backstage.shared.providers,kT(e,o,[]);var e,o}),menubutton:iE(W_,function(t,n){return Ak(t,"tox-tbtn",n.backstage,st.none())}),splitbutton:iE(function(t){return Cn("SplitButton",G_,t)},function(t,n){return CT(t,n.backstage.shared)}),grouptoolbarbutton:iE(function(t){return Cn("GroupToolbarButton",K_,t)},function(t,n,e){var o,r,i,u,a,c,s=e.ui.registry.getAll().buttons,l=((o={})[Oc]=n.backstage.shared.header.isPositionedAtTop()?Hu.TopToBottom:Hu.BottomToTop,o);switch(Dh(e)){case Kg.floating:return r=t,i=n.backstage,u=function(t){return lE(e,{buttons:s,toolbar:t,allowToolbarGroups:!1},n,st.none())},a=l,c=i.shared,a_.sketch({lazySink:c.getSink,fetch:function(){return hy(function(t){t(V(u(r.items),F_))})},markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:xT(r.icon,r.text,r.tooltip,st.none(),st.none(),c.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:a}}}});default:throw new Error("Toolbar groups are only supported when using floating toolbar mode")}}),styleSelectButton:function(t,n){return e=t,o=n.backstage,r=et({type:"advanced"},o.styleselect),zT(e,o,oE(e,r));var e,o,r},fontsizeSelectButton:function(t,n){return e=t,o=n.backstage,zT(e,o,$T(e));var e,o},fontSelectButton:function(t,n){return e=t,o=n.backstage,zT(e,o,qT(e));var e,o},formatButton:function(t,n){return e=t,o=n.backstage,zT(e,o,eE(e));var e,o},alignMenuButton:function(t,n){return e=t,o=n.backstage,zT(e,o,WT(e));var e,o}},aE={styleselect:uE.styleSelectButton,fontsizeselect:uE.fontsizeSelectButton,fontselect:uE.fontSelectButton,formatselect:uE.formatButton,align:uE.alignMenuButton},cE=function(t){var n,e,o,r=t.toolbar,i=t.buttons;return!1===r?[]:r===undefined||!0===r?(e=i,o=V(rE,function(t){var n=P(t.items,function(t){return yt(e,t)||yt(aE,t)});return{name:t.name,items:n}}),P(o,function(t){return 0<t.items.length})):S(r)?(n=r.split("|"),V(n,function(t){return{items:t.trim().split(" ")}})):E(r,function(t){return yt(t,"name")&&yt(t,"items")})?r:(nt.console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},sE=function(r,n,i,u,a,t){return bt(n,i.toLowerCase()).orThunk(function(){return t.bind(function(t){return Q(t,function(t){return bt(n,t+i.toLowerCase())})})}).fold(function(){return bt(aE,i.toLowerCase()).map(function(t){return t(r,a)}).orThunk(function(){return st.none()})},function(t){return"grouptoolbarbutton"!==t.type||u?(e=a,o=r,bt(uE,(n=t).type).fold(function(){return nt.console.error("skipping button defined by",n),st.none()},function(t){return st.some(t(n,e,o))})):(nt.console.warn("Ignoring the '"+i+"' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested."),st.none());var n,e,o})},lE=function(e,o,r,i){var t=cE(o),n=V(t,function(t){var n=U(t.items,function(t){return 0===t.trim().length?[]:sE(e,o.buttons,t,o.allowToolbarGroups,r,i).toArray()});return{title:st.from(e.translate(t.name)),items:n}});return P(n,function(t){return 0<t.items.length})},fE={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},dE={maxHeightFunction:hc(),maxWidthFunction:zO()},mE={onLtr:function(){return[Oa,_a,ka,wa,Ca,Sa,zg,Ng,Hg,Rg,Pg,Vg]},onRtl:function(){return[Oa,_a,Ca,Sa,ka,wa,zg,Ng,Pg,Vg,Hg,Rg]}},gE={onLtr:function(){return[_a,wa,Sa,ka,Ca,Oa,zg,Ng,Hg,Rg,Pg,Vg]},onRtl:function(){return[_a,Sa,wa,Ca,ka,Oa,zg,Ng,Pg,Vg,Hg,Rg]}},pE=function(c,t,e,s){var o,r,l=Pe().deviceType.isTouch,a=Ji((o={sink:e,onEscape:function(){return c.focus(),st.some(!0)}},r=ce([]),Bg.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(t){r.set([]),Bg.getContent(t).each(function(t){Hi(t.element(),"visibility")}),xi(t.element(),HT),Hi(t.element(),"width")},inlineBehaviours:za([Lm("context-toolbar-events",[er(mo(),function(t,n){xi(t.element(),HT),Hi(t.element(),"width")}),Jo(VT,function(n,e){Hi(n.element(),"width");var t=cu(n.element());Bg.setContent(n,e.event().contents()),bi(n.element(),HT);var o=cu(n.element());Di(n.element(),"width",t+"px"),Bg.getContent(n).each(function(t){e.event().focus().bind(function(t){return Ka(t),$a(n.element())}).orThunk(function(){return Rm.focusIn(t),Ja()})}),Lg.setTimeout(function(){Di(n.element(),"width",o+"px")},0)}),Jo(IT,function(t,n){Bg.getContent(t).each(function(t){r.set(r.get().concat([{bar:t,focus:Ja()}]))}),jo(t,VT,{contents:n.event().forwardContents(),focus:st.none()})}),Jo(RT,function(n,t){J(r.get()).each(function(t){r.set(r.get().slice(0,r.get().length-1)),jo(n,VT,{contents:$i(t.bar),focus:t.focus})})})]),Rm.config({mode:"special",onEscape:function(n){return J(r.get()).fold(function(){return o.onEscape()},function(t){return Lo(n,RT),st.some(!0)})}})]),lazySink:function(){return ot.value(o.sink)}}))),f=function(){return BT(c,s.backstage.shared)},u=function(){if(l()&&s.backstage.isContextMenuOpen())return!0;var t,n,e,o,r,i,u=(t=m.get().map(function(t){return t.getBoundingClientRect()}).getOrThunk(function(){return c.selection.getRng().getBoundingClientRect()}),n=c.inline?mu().top():Su(le.fromDom(c.getBody())).y,{y:t.top+n,bottom:t.bottom+n}),a=f();return e=u.y,o=u.bottom,r=a.y,i=a.bottom,!(Math.max(e,r)<=Math.min(o,i))},n=function(){Bg.hide(a)},i=function(){d.get().each(function(t){var n=a.element();Hi(n,"display"),u()?Di(n,"display","none"):Ds.positionWithinBounds(e,t,a,st.some(f()))})},d=ce(st.none()),m=ce(st.none()),g=ce(null),p=function(t){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[t],behaviours:za([Rm.config({mode:"acyclic"}),Lm("pop-dialog-wrap-events",[or(function(t){c.shortcuts.add("ctrl+F9","focus statusbar",function(){return Rm.focusIn(t)})}),rr(function(t){c.shortcuts.remove("ctrl+F9")})])])}},h=_t(function(){return FT(t,function(t){var n=v([t]);jo(a,IT,{forwardContents:p(n)})})}),v=function(t){var n=c.ui.registry.getAll().buttons,e=h(),o=et(et({},n),e.formNavigators),r=Dh(c)===Kg.scrolling?Kg.scrolling:Kg["default"],i=ut(V(t,function(t){return"contexttoolbar"===t.type?lE(c,{buttons:o,toolbar:t.items,allowToolbarGroups:!1},s,st.some(["form:"])):(n=t,e=s.backstage.shared.providers,ET(n,e));var n,e}));return P_({type:r,uid:Nr("context-toolbar"),initGroups:i,onEscape:st.none,cyclicKeying:!0,providers:s.backstage.shared.providers})};c.on("contexttoolbar-show",function(n){var t=h();bt(t.lookupTable,n.toolbarKey).each(function(t){y([t],n.target===c?st.none():st.some(n)),Bg.getContent(a).each(Rm.focusIn)})});var b=function(t,n){var e,o,r="node"===t?s.backstage.shared.anchors.node(n):s.backstage.shared.anchors.cursor();return Ct(r,(e=t,o=l(),"line"===e?{bubble:wc(12,0,fE),layouts:{onLtr:function(){return[Ta]},onRtl:function(){return[Ea]}},overrides:dE}:{bubble:wc(0,12,fE),layouts:o?gE:mE,overrides:dE}))},y=function(t,n){if(w(),!l()||!s.backstage.isContextMenuOpen()){var e=v(t),o=n.map(le.fromDom),r=b(t[0].position,o);d.set(st.some(r)),m.set(n);var i=a.element();Hi(i,"display"),Bg.showWithinBounds(a,r,p(e),function(){return st.some(f())}),u()&&Di(i,"display","none")}},x=function(){if(c.hasFocus()){var t,n,e,o,r,i,u=h();t=u,n=c,o=le.fromDom(n.getBody()),r=function(t){return Le(t,o)},i=le.fromDom(n.selection.getNode()),(r(e=i)||Ue(o,e)?MT(i,t.inNodeScope,t.inEditorScope).orThunk(function(){return AT(r,i,t)}):st.none()).fold(function(){d.set(st.none()),Bg.hide(a)},function(t){y(t.toolbars,st.some(t.elem.dom()))})}},w=function(){var t=g.get();null!==t&&(Lg.clearTimeout(t),g.set(null))},S=function(t){w(),g.set(t)};c.on("init",function(){c.on(NO,n),c.on("ScrollContent ScrollWindow longpress",i),c.on("click keyup focus SetContent ObjectResized ResizeEditor",function(){S(Lg.setEditorTimeout(c,x,0))}),c.on("focusout",function(t){Lg.setEditorTimeout(c,function(){$a(e.element()).isNone()&&$a(a.element()).isNone()&&(d.set(st.none()),Bg.hide(a))},0)}),c.on("SwitchMode",function(){c.mode.isReadOnly()&&(d.set(st.none()),Bg.hide(a))}),c.on("NodeChange",function(t){$a(a.element()).fold(function(){S(Lg.setEditorTimeout(c,x,0))},function(t){})})})},hE=vf,vE=Zl,bE=at([Zn("shell",!1),zn("makeItem"),Zn("setupItem",Z),Sl("listBehaviours",[Nm])]),yE=Jl({name:"items",overrides:function(){return{behaviours:za([Nm.config({})])}}}),xE=at([yE]),wE=_f({name:at("CustomList")(),configFields:bE(),partFields:xE(),factory:function(s,t,n,e){var o=s.shell?{behaviours:[Nm.config({})],components:[]}:{behaviours:[],components:t},r=function(t){return s.shell?st.some(t):sf(t,s,"items")};return{uid:s.uid,dom:s.dom,components:o.components,behaviours:wl(s.listBehaviours,o.behaviours),apis:{setItems:function(a,c){r(a).fold(function(){throw nt.console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")},function(n){var t=Nm.contents(n),e=c.length,o=e-t.length,r=0<o?function(t,n){for(var e=[],o=0;o<t;o++)e.push(n(o));return e}(o,function(){return s.makeItem()}):[],i=t.slice(e);it(i,function(t){return Nm.remove(n,t)}),it(r,function(t){return Nm.append(n,t)});var u=Nm.contents(n);it(u,function(t,n){s.setupItem(a,t,c[n],n)})})}}}},apis:{setItems:function(t,n,e){t.setItems(n,e)}}}),SE=function(t){return(Ri(t,"position").is("fixed")?st.none():fr(t)).orThunk(function(){var e=le.fromTag("span");return lr(t).bind(function(t){vr(t,e);var n=fr(e);return xr(e),n})})},kE=function(t){return SE(t).map(iu).getOrThunk(function(){return ou(0,0)})},CE=wt([{"static":[]},{absolute:["positionCss"]},{fixed:["positionCss"]}]),OE=function(t,n){var e=t.element();bi(e,n.transitionClass),xi(e,n.fadeOutClass),bi(e,n.fadeInClass),n.onShow(t)},_E=function(t,n){var e=t.element();bi(e,n.transitionClass),xi(e,n.fadeInClass),bi(e,n.fadeOutClass),n.onHide(t)},TE=function(t,o,r){return W(t,function(t){switch(t){case"bottom":return e=r,o.bottom<=e.bottom;case"top":return n=r,o.y>=n.y}var n,e})},EE=function(n,t){return t.getInitialPosition().map(function(t){return xu(t.bounds.x,t.bounds.y,cu(n),tu(n))})},BE=function(t,n,e){e.setInitialPosition(st.some({style:function(t){var n={},e=t.dom();if(Ci(e))for(var o=0;o<e.style.length;o++){var r=e.style.item(o);n[r]=e.style[r]}return n}(t),position:Fi(t,"position")||"static",bounds:n}))},DE=function(e,o,r){return r.getInitialPosition().bind(function(t){switch(r.setInitialPosition(st.none()),t.position){case"static":return st.some(CE["static"]());case"absolute":var n=SE(e).map(wu).getOrThunk(function(){return wu(_i())});return st.some(CE.absolute(Za("absolute",bt(t.style,"left").map(function(t){return o.x-n.x}),bt(t.style,"top").map(function(t){return o.y-n.y}),bt(t.style,"right").map(function(t){return n.right-o.right}),bt(t.style,"bottom").map(function(t){return n.bottom-o.bottom}))));default:return st.none()}})},ME=function(t,n,e){var o,r,i,u=t.element();return Ri(u,"position").is("fixed")?(r=n,EE(o=u,i=e).filter(function(t){return TE(i.getModes(),t,r)}).bind(function(t){return DE(o,t,i)})):function(t,n,e){var o=wu(t);if(TE(e.getModes(),o,n))return st.none();BE(t,o,e);var r=ku(),i=o.x-r.x,u=n.y-r.y,a=r.bottom-n.bottom,c=o.y<=n.y;return st.some(CE.fixed(Za("fixed",st.some(i),c?st.some(u):st.none(),st.none(),c?st.none():st.some(a))))}(u,n,e)},AE=function(n,t){it(["left","right","top","bottom","position"],function(t){return Hi(n.element(),t)}),t.onUndocked(n)},FE=function(t,n,e){tc(t.element(),e),("fixed"===e.position()?n.onDocked:n.onUndocked)(t)},IE=function(i,t,u,a,c){void 0===c&&(c=!1),t.contextual.each(function(r){r.lazyContext(i).each(function(t){var n,e,o=(e=a,(n=t).y<e.bottom&&n.bottom>e.y);o!==u.isVisible()&&(u.setVisible(o),c&&!o?(Si(i.element(),[r.fadeOutClass]),r.onHide(i)):(o?OE:_E)(i,r))})})},RE=function(n,e,t){var o,r,i=n.element();t.setDocked(!1),o=t,r=n.element(),EE(r,o).bind(function(t){return DE(r,t,o)}).each(function(t){t.fold(function(){return AE(n,e)},function(t){return FE(n,e,t)},Z)}),t.setVisible(!0),e.contextual.each(function(t){ki(i,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(n)}),VE(n,e,t)},VE=function(t,n,e){var o,r,i,u,a;t.getSystem().isConnected()&&(o=t,i=e,u=(r=n).lazyViewport(o),(a=i.isDocked())&&IE(o,r,i,u),ME(o,u,i).each(function(t){i.setDocked(!a),t.fold(function(){return AE(o,r)},function(t){return FE(o,r,t)},function(t){IE(o,r,i,u,!0),FE(o,r,t)})}))},HE=function(t,n,e){e.isDocked()&&RE(t,n,e)},PE=/* */Object.freeze({__proto__:null,refresh:VE,reset:HE,isDocked:function(t,n,e){return e.isDocked()},getModes:function(t,n,e){return e.getModes()},setModes:function(t,n,e,o){return e.setModes(o)}}),zE=/* */Object.freeze({__proto__:null,events:function(o,r){return Yo([er(mo(),function(n,e){o.contextual.each(function(t){wi(n.element(),t.transitionClass)&&(ki(n.element(),[t.transitionClass,t.fadeInClass]),(r.isVisible()?t.onShown:t.onHidden)(n));e.stop()})}),Jo(Bo(),function(t,n){VE(t,o,r)}),Jo(Do(),function(t,n){HE(t,o,r)})])}}),NE=[Qn("contextual",[Ln("fadeInClass"),Ln("fadeOutClass"),Ln("transitionClass"),Un("lazyContext"),$u("onShow"),$u("onShown"),$u("onHide"),$u("onHidden")]),ie("lazyViewport",ku),te("modes",["top","bottom"],fn(Fn)),$u("onDocked"),$u("onUndocked")],LE=La({fields:NE,name:"docking",active:zE,apis:PE,state:/* */Object.freeze({__proto__:null,init:function(t){var n=ce(!1),e=ce(!0),o=ce(st.none()),r=ce(t.modes);return oi({isDocked:n.get,setDocked:n.set,getInitialPosition:o.get,setInitialPosition:o.set,isVisible:e.get,setVisible:e.set,getModes:r.get,setModes:r.set,readState:function(){return"docked:  "+n.get()+", visible: "+e.get()+", modes: "+r.get().join(",")}})}})}),jE={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},UE="tox-tinymce--toolbar-sticky-on",WE="tox-tinymce--toolbar-sticky-off",GE=function(r){var i=r.element();lr(i).each(function(t){var n,e="padding-"+LE.getModes(r)[0];if(LE.isDocked(r)){var o=cu(t);Di(i,"width",o+"px"),Di(t,e,nu(n=i)+(parseInt(Fi(n,"margin-top"),10)||0)+(parseInt(Fi(n,"margin-bottom"),10)||0)+"px")}else Hi(i,"width"),Hi(t,e)})},XE=function(t,n){n?(xi(t,jE.fadeOutClass),Si(t,[jE.transitionClass,jE.fadeInClass])):(xi(t,jE.fadeInClass),Si(t,[jE.fadeOutClass,jE.transitionClass]))},YE=function(t,n){var e=le.fromDom(t.getContainer());n?(bi(e,UE),xi(e,WE)):(bi(e,WE),xi(e,UE))},qE=function(c,t){var n,i=ce(st.none()),o=t.getSink,u=function(n){o().each(function(t){return n(t.element())})},e=function(t){c.inline||GE(t),YE(c,LE.isDocked(t)),t.getSystem().broadcastOn([tl()],{}),o().each(function(t){return t.getSystem().broadcastOn([tl()],{})})},r=c.inline?[]:[Ya.config({channels:((n={})[M_()]={onReceive:GE},n)})];return b([Xm.config({}),LE.config({contextual:et({lazyContext:function(t){var n,e,o=nu(t.element()),r=c.inline?c.getContentAreaContainer():c.getContainer(),i=wu(le.fromDom(r)),u=i.height-o,a=i.y+(n=t,e="top",F(LE.getModes(n),e)?0:o);return st.some(xu(i.x,a,i.width,u))},onShow:function(){u(function(t){return XE(t,!0)})},onShown:function(r){u(function(t){return ki(t,[jE.transitionClass,jE.fadeInClass])}),i.get().each(function(t){var n,e,o;n=r.element(),o=ar(e=t),Ja(o).filter(function(t){return!Le(e,t)}).filter(function(t){return Le(t,le.fromDom(o.dom().body))||Ue(n,t)}).each(function(){return Ka(e)}),i.set(st.none())})},onHide:function(t){var n,e;i.set((n=t.element(),e=o,$a(n).orThunk(function(){return e().toOption().bind(function(t){return $a(t.element())})}))),u(function(t){return XE(t,!1)})},onHidden:function(){u(function(t){return ki(t,[jE.transitionClass])})}},jE),modes:[t.header.getDockingMode()],onDocked:e,onUndocked:e})],r)},KE=/* */Object.freeze({__proto__:null,setup:function(t,n,o){t.inline||(n.header.isPositionedAtTop()||t.on("ResizeEditor",function(){o().each(LE.reset)}),t.on("ResizeWindow ResizeEditor",function(){o().each(GE)}),t.on("SkinLoaded",function(){o().each(function(t){LE.isDocked(t)?LE.reset(t):LE.refresh(t)})}),t.on("FullscreenStateChanged",function(){o().each(LE.reset)})),t.on("AfterScrollIntoView",function(e){o().each(function(t){LE.refresh(t);var n=t.element();Bd(n)&&function(t,n){var e=ar(n),o=e.dom().defaultView.innerHeight,r=mu(e),i=le.fromDom(t.elm),u=Su(i),a=tu(i),c=u.y,s=c+a,l=iu(n),f=tu(n),d=l.top(),m=d+f,g=Math.abs(d-r.top())<2,p=Math.abs(m-(r.top()+o))<2;if(g&&c<m)gu(r.left(),c-f,e);else if(p&&d<s){var h=c-o+a+f;gu(r.left(),h,e)}}(e,n)})}),t.on("PostRender",function(){YE(t,!1)})},isDocked:function(t){return t().map(LE.isDocked).getOr(!1)},getBehaviours:qE}),JE=Z,$E=c,QE=at([]),ZE=/* */Object.freeze({__proto__:null,setup:JE,isDocked:$E,getBehaviours:QE}),tB=Of({factory:function(n,o){var t={focus:Rm.focusIn,setMenus:function(t,n){var e=V(n,function(n){var t={type:"menubutton",text:n.text,fetch:function(t){t(n.getItems())}},e=W_(t).mapError(function(t){return Tn(t)}).getOrDie();return Ak(e,"tox-mbtn",o.backstage,st.some("menuitem"))});Nm.set(t,e)}};return{uid:n.uid,dom:n.dom,components:[],behaviours:za([Nm.config({}),Lm("menubar-events",[or(function(t){n.onSetup(t)}),Jo(ro(),function(e,t){Mu(e.element(),".tox-mbtn--active").each(function(n){Au(t.event().target(),".tox-mbtn").each(function(t){Le(n,t)||e.getSystem().getByDom(n).each(function(n){e.getSystem().getByDom(t).each(function(t){Qy.expand(t),Qy.close(n),Xm.focus(t)})})})})}),Jo(Ro(),function(e,t){t.event().prevFocus().bind(function(t){return e.getSystem().getByDom(t).toOption()}).each(function(n){t.event().newFocus().bind(function(t){return e.getSystem().getByDom(t).toOption()}).each(function(t){Qy.isOpen(n)&&(Qy.expand(t),Qy.close(n))})})})]),Rm.config({mode:"flow",selector:".tox-mbtn",onEscape:function(t){return n.onEscape(t),st.some(!0)}}),Dy.config({})]),apis:t,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[zn("dom"),zn("uid"),zn("onEscape"),zn("backstage"),Zn("onSetup",Z)],apis:{focus:function(t,n){t.focus(n)},setMenus:function(t,n,e){t.setMenus(n,e)}}}),nB="container",eB=[yl("slotBehaviours",[])],oB=function(t){return"<alloy.field."+t+">"},rB=function(r,t){var e,n=function(t){return mf(r)},o=function(e,o){return function(t,n){return sf(t,r,n).map(function(t){return e(t,n)}).getOr(o)}},i=function(t,n){return"true"!==Dr(t.element(),"aria-hidden")},u=o(i,!1),a=o(function(t,n){if(i(t)){var e=t.element();Di(e,"display","none"),Br(e,"aria-hidden","true"),jo(t,Vo(),{name:n,visible:!1})}}),c=function(n,t){it(t,function(t){return e(n,t)})},s=o(function(t,n){if(!i(t)){var e=t.element();Hi(e,"display"),Fr(e,"aria-hidden"),jo(t,Vo(),{name:n,visible:!0})}}),l={getSlotNames:n,getSlot:function(t,n){return sf(t,r,n)},isShowing:u,hideSlot:e=a,hideAllSlots:function(t){return c(t,n())},showSlot:s};return{uid:r.uid,dom:r.dom,components:t,behaviours:xl(r.slotBehaviours),apis:l}},iB=dt({getSlotNames:function(t,n){return t.getSlotNames(n)},getSlot:function(t,n,e){return t.getSlot(n,e)},isShowing:function(t,n,e){return t.isShowing(n,e)},hideSlot:function(t,n,e){return t.hideSlot(n,e)},hideAllSlots:function(t,n){return t.hideAllSlots(n)},showSlot:function(t,n,e){return t.showSlot(n,e)}},function(t){return ni(t)}),uB=et(et({},iB),{sketch:function(t){var e,n=(e=[],{slot:function(t,n){return e.push(t),of(nB,oB(t),n)},record:function(){return e}}),o=t(n),r=n.record(),i=V(r,function(t){return ql({name:t,pname:oB(t)})});return yf(nB,eB,i,rB,o)}}),aB=ln([Jn("icon"),Jn("tooltip"),ie("onShow",Z),ie("onHide",Z),ie("onSetup",function(){return Z})]),cB=function(t){return{element:function(){return t.element().dom()}}},sB=function(e,o){var r=V(lt(o),function(t){var n=o[t],e=On(Cn("sidebar",aB,n));return{name:t,getApi:cB,onSetup:e.onSetup,onShow:e.onShow,onHide:e.onHide}});return V(r,function(t){var n=ce(Z);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Tp([Kh(t,n),Jh(t,n),Jo(Vo(),function(n,t){var e=t.event();L(r,function(t){return t.name===e.name()}).each(function(t){(e.visible()?t.onShow:t.onHide)(t.getApi(n))})})])})})},lB=function(t,e){Mf.getCurrent(t).each(function(t){return Nm.set(t,[(n=e,uB.sketch(function(t){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:sB(t,n),slotBehaviours:Tp([or(function(t){return uB.hideAllSlots(t)})])}}))]);var n})},fB=function(t){return Mf.getCurrent(t).bind(function(t){return __.isGrowing(t)||__.hasGrown(t)?Mf.getCurrent(t).bind(function(n){return L(uB.getSlotNames(n),function(t){return uB.isShowing(n,t)})}):st.none()})},dB=Nr("FixSizeEvent"),mB=Nr("AutoSizeEvent"),gB=function(t){var n,e,o,r=le.fromHtml(t),i=dr(r),u=(e=(n=r).dom().attributes!==undefined?n.dom().attributes:[],N(e,function(t,n){var e;return"class"===n.name?t:et(et({},t),((e={})[n.name]=n.value,e))},{})),a=(o=r,Array.prototype.slice.call(o.dom().classList,0)),c=0===i.length?{}:{innerHtml:Sr(r)};return et({tag:Cr(r),classes:a,attributes:u},c)},pB=function(t,n,e){var o=t.element();!0===n?(Nm.set(t,[{dom:{tag:"div",attributes:{"aria-label":e.translate("Loading...")},classes:["tox-throbber__busy-spinner"]},components:[{dom:gB('<div class="tox-spinner"><div></div><div></div><div></div></div>')}],behaviours:za([Rm.config({mode:"special",onTab:function(){return st.some(!0)},onShiftTab:function(){return st.some(!0)}}),Xm.config({})])}]),Hi(o,"display"),Fr(o,"aria-hidden")):(Nm.set(t,[]),Di(o,"display","none"),Br(o,"aria-hidden","true"))},hB=vE.optional({factory:tB,name:"menubar",schema:[zn("backstage")]}),vB=vE.optional({factory:{sketch:function(t){return wE.sketch({uid:t.uid,dom:t.dom,listBehaviours:za([Rm.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return P_({type:t.type,uid:Nr("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:t.providers,onEscape:function(){return st.none()}})},setupItem:function(t,n,e,o){XO.setGroups(n,e)},shell:!0})}},name:"multiple-toolbar",schema:[zn("dom"),zn("onEscape")]}),bB=vE.optional({factory:{sketch:function(t){var n;return((n=t).type===Kg.sliding?H_:n.type===Kg.floating?V_:P_)({type:t.type,uid:t.uid,onEscape:function(){return t.onEscape(),st.some(!0)},cyclicKeying:!1,initGroups:[],getSink:t.getSink,providers:t.providers,moreDrawerData:{lazyToolbar:t.lazyToolbar,lazyMoreButton:t.lazyMoreButton,lazyHeader:t.lazyHeader},attributes:t.attributes})}},name:"toolbar",schema:[zn("dom"),zn("onEscape"),zn("getSink")]}),yB=vE.optional({factory:{sketch:function(t){var n=t.editor,e=t.sticky?qE:QE;return{uid:t.uid,dom:t.dom,components:t.components,behaviours:za(e(n,t.sharedBackstage))}}},name:"header",schema:[zn("dom")]}),xB=vE.optional({name:"socket",schema:[zn("dom")]}),wB=vE.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:za([Dy.config({}),Xm.config({}),__.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(t){Mf.getCurrent(t).each(uB.hideAllSlots),Lo(t,mB)},onGrown:function(t){Lo(t,mB)},onStartGrow:function(t){jo(t,dB,{width:Ri(t.element(),"width").getOr("")})},onStartShrink:function(t){jo(t,dB,{width:cu(t.element())+"px"})}}),Nm.config({}),Mf.config({find:function(t){var n=Nm.contents(t);return K(n)}})])}],behaviours:za([nS(0),Lm("sidebar-sliding-events",[Jo(dB,function(t,n){Di(t.element(),"width",n.event().width())}),Jo(mB,function(t,n){Hi(t.element(),"width")})])])}}},name:"sidebar",schema:[zn("dom")]}),SB=vE.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:za([Nm.config({})]),components:[]}}},name:"throbber",schema:[zn("dom")]}),kB=_f({name:"OuterContainer",factory:function(e,t,n){var o={getSocket:function(t){return hE.getPart(t,e,"socket")},setSidebar:function(t,n){hE.getPart(t,e,"sidebar").each(function(t){return lB(t,n)})},toggleSidebar:function(t,o){hE.getPart(t,e,"sidebar").each(function(t){return n=t,e=o,void Mf.getCurrent(n).each(function(n){Mf.getCurrent(n).each(function(t){__.hasGrown(n)?uB.isShowing(t,e)?__.shrink(n):(uB.hideAllSlots(t),uB.showSlot(t,e)):(uB.hideAllSlots(t),uB.showSlot(t,e),__.grow(n))})});var n,e})},whichSidebar:function(t){return hE.getPart(t,e,"sidebar").bind(fB).getOrNull()},getHeader:function(t){return hE.getPart(t,e,"header")},getToolbar:function(t){return hE.getPart(t,e,"toolbar")},setToolbar:function(t,n){hE.getPart(t,e,"toolbar").each(function(t){t.getApis().setGroups(t,n)})},setToolbars:function(t,n){hE.getPart(t,e,"multiple-toolbar").each(function(t){wE.setItems(t,n)})},refreshToolbar:function(t){hE.getPart(t,e,"toolbar").each(function(t){return t.getApis().refresh(t)})},getThrobber:function(t){return hE.getPart(t,e,"throbber")},focusToolbar:function(t){hE.getPart(t,e,"toolbar").orThunk(function(){return hE.getPart(t,e,"multiple-toolbar")}).each(function(t){Rm.focusIn(t)})},setMenubar:function(t,n){hE.getPart(t,e,"menubar").each(function(t){tB.setMenus(t,n)})},focusMenubar:function(t){hE.getPart(t,e,"menubar").each(function(t){tB.focus(t)})}};return{uid:e.uid,dom:e.dom,components:t,apis:o,behaviours:e.behaviours}},configFields:[zn("dom"),zn("behaviours")],partFields:[yB,hB,bB,vB,xB,wB,SB],apis:{getSocket:function(t,n){return t.getSocket(n)},setSidebar:function(t,n,e){t.setSidebar(n,e)},toggleSidebar:function(t,n,e){t.toggleSidebar(n,e)},whichSidebar:function(t,n){return t.whichSidebar(n)},getHeader:function(t,n){return t.getHeader(n)},getToolbar:function(t,n){return t.getToolbar(n)},setToolbar:function(t,n,e){var o=V(e,function(t){return F_(t)});t.setToolbar(n,o)},setToolbars:function(t,n,e){var o=V(e,function(t){return V(t,F_)});t.setToolbars(n,o)},refreshToolbar:function(t,n){return t.refreshToolbar(n)},getThrobber:function(t,n){return t.getThrobber(n)},setMenubar:function(t,n,e){t.setMenubar(n,e)},focusMenubar:function(t,n){t.focusMenubar(n)},focusToolbar:function(t,n){t.focusToolbar(n)}}}),CB={file:{title:"File",items:"newdocument restoredraft | preview | print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align | forecolor backcolor | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},OB=function(t){return"string"==typeof t?t.split(" "):t},_B=function(i,u){var a=et(et({},CB),u.menus),n=0<lt(u.menus).length,t=u.menubar===undefined||!0===u.menubar?OB("file edit view insert format tools table help"):OB(!1===u.menubar?"":u.menubar),e=P(t,function(t){return n&&u.menus.hasOwnProperty(t)&&u.menus[t].hasOwnProperty("items")||CB.hasOwnProperty(t)}),o=V(e,function(t){var n,e,o,r=a[t];return n={title:r.title,items:OB(r.items)},e=u,o=i.getParam("removed_menuitems","").split(/[ ,]/),{text:n.title,getItems:function(){return U(n.items,function(t){var n=t.toLowerCase();return 0===n.trim().length||I(o,function(t){return t===n})?[]:"separator"===n||"|"===n?[{type:"separator"}]:e.menuItems[n]?[e.menuItems[n]]:[]})}}});return P(o,function(t){return 0<t.getItems().length&&I(t.getItems(),function(t){return"separator"!==t.type})})},TB=function(t){var n=function(){t._skinLoaded=!0,t.fire("SkinLoaded")};return function(){t.initialized?n():t.on("init",n)}},EB=function(n,e){return function(){return t={message:e},n.fire("SkinLoadError",t);var t}},BB=function(t,n){var e,o=function(t){var n=t.settings,e=n.skin,o=n.skin_url;if(!1!==e){var r=e||"oxide";o=o?t.documentBaseURI.toAbsolute(o):vh.baseURL+"/skins/ui/"+r}return o}(n);o&&(e=o+"/skin.min.css",n.contentCSS.push(o+(t?"/content.inline":"/content")+".min.css")),!1==(!1===n.getParam("skin"))&&e?hh.DOM.styleSheetLoader.load(e,TB(n),EB(n,"Skin could not be loaded")):TB(n)()},DB=g(BB,!1),MB=g(BB,!0),AB=function(e,t,o,r){var n=t.outerContainer,i=o.toolbar,u=o.buttons;if(E(i,S)){var a=i.map(function(t){var n={toolbar:t,buttons:u,allowToolbarGroups:o.allowToolbarGroups};return lE(e,n,{backstage:r},st.none())});kB.setToolbars(n,a)}else kB.setToolbar(n,lE(e,o,{backstage:r},st.none()))},FB=hh.DOM,IB=Pe(),RB=IB.os.isiOS()&&IB.os.version.major<=12,VB=function(o){var e=o.getWin(),t=o.getDoc().documentElement,r=ce(ou(e.innerWidth,e.innerHeight)),i=ce(ou(t.offsetWidth,t.offsetHeight)),n=function(t){var n=r.get();n.left()===e.innerWidth&&n.top()===e.innerHeight||(r.set(ou(e.innerWidth,e.innerHeight)),Iv(o,t))},u=function(t){var n=o.getDoc().documentElement,e=i.get();e.left()===n.offsetWidth&&e.top()===n.offsetHeight||(i.set(ou(n.offsetWidth,n.offsetHeight)),Iv(o,t))},a=function(t){return n=t,o.fire("ScrollContent",n);var n};FB.bind(e,"resize",n),FB.bind(e,"scroll",a);var c=xb(le.fromDom(o.getBody()),"load",u);o.on("NodeChange",u),o.on("remove",function(){c.unbind(),FB.unbind(e,"resize",n),FB.unbind(e,"scroll",a)})},HB=/* */Object.freeze({__proto__:null,render:function(e,o,t,n,r){var i,u,a=ce(0);DB(e),i=le.fromDom(r.targetNode),u=o.mothership,Ls(i,u,pr),Ns(_i(),o.uiMothership),e.on("PostRender",function(){AB(e,o,t,n),a.set(e.getWin().innerWidth),kB.setMenubar(o.outerContainer,_B(e,t)),kB.setSidebar(o.outerContainer,t.sidebar),VB(e)});var c,s,l,f=kB.getSocket(o.outerContainer).getOrDie("Could not find expected socket element");if(!0===RB){Mi(f.element(),{overflow:"scroll","-webkit-overflow-scrolling":"touch"});var d=(c=function(){e.fire("ScrollContent")},s=20,l=null,{cancel:function(){null!==l&&(nt.clearTimeout(l),l=null)},throttle:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];null===l&&(l=nt.setTimeout(function(){c.apply(null,t),l=null},s))}});yb(f.element(),"scroll",d.throttle)}jh(e,o),e.addCommand("ToggleSidebar",function(t,n){kB.toggleSidebar(o.outerContainer,n),e.fire("ToggleSidebar")}),e.addQueryValueHandler("ToggleSidebar",function(){return kB.whichSidebar(o.outerContainer)});var m=Dh(e);return m!==Kg.sliding&&m!==Kg.floating||e.on("ResizeWindow ResizeEditor ResizeContent",function(){var t=e.getWin().innerWidth;t!==a.get()&&(kB.refreshToolbar(o.outerContainer),a.set(t))}),{iframeContainer:f.element().dom(),editorContainer:o.outerContainer.element().dom()}}}),PB=function(){return t=function(t){t.unbind()},n=ce(st.none()),e=function(){n.get().each(t)},{clear:function(){e(),n.set(st.none())},isSet:function(){return n.get().isSome()},set:function(t){e(),n.set(st.some(t))}};var t,n,e},zB=function(t){return/^[0-9\.]+(|px)$/i.test(""+t)?st.some(parseInt(""+t,10)):st.none()},NB=function(t){return rt(t)?t+"px":t},LB=function(n,t,e){var o=t.filter(function(t){return n<t}),r=e.filter(function(t){return t<n});return o.or(r).getOr(n)},jB=function(t){var n,e,o,r;return(e=bh(n=t),o=wh(n),r=kh(n),zB(e).map(function(t){return LB(t,o,r)})).getOr(bh(t))},UB=function(t){var n=yh(t),e=xh(t),o=Sh(t);return zB(n).map(function(t){return LB(t,e,o)})},WB=function(a,c,t,n,s){var e=t.uiMothership,l=t.outerContainer,o=hh.DOM,f=Vh(a),d=Ph(a),m=Sh(a).or(UB(a)),r=n.shared.header,g=r.isPositionedAtTop,i=Dh(a),p=i===Kg.sliding||i===Kg.floating,u=ce(!1),h=function(){return u.get()&&!a.removed},v=function(t){return p?t.fold(function(){return 0},function(t){return 1<t.components().length?tu(t.components()[1].element()):0}):0},b=function(){e.broadcastOn([tl()],{})},y=function(t){if(void 0===t&&(t=!1),h()){var n,e,o,r,i;if(f||(n=m.getOrThunk(function(){var t=zB(Fi(_i(),"margin-left")).getOr(0);return cu(_i())-iu(c).left()+t}),Di(s.get().element(),"max-width",n+"px")),p&&kB.refreshToolbar(l),f||(e=kB.getToolbar(l),o=v(e),r=wu(c),i=g()?Math.max(r.y-tu(s.get().element())+o,0):r.bottom,Mi(l.element(),{position:"absolute",top:Math.round(i)+"px",left:Math.round(r.x)+"px"})),d){var u=s.get();t?LE.reset(u):LE.refresh(u)}b()}},x=function(t){if(void 0===t&&(t=!0),!f&&d&&h()){var n=r.getDockingMode(),e=function(t){switch(Fh(a)){case Eh.auto:var n=kB.getToolbar(l),e=v(n),o=tu(t.element())-e,r=wu(c);if(r.y>o)return"top";var i=cr(c),u=Math.max(i.dom().scrollHeight,tu(i));return r.bottom<u-o||ku().bottom<r.bottom-o?"bottom":"top";case Eh.bottom:return"bottom";case Eh.top:default:return"top"}}(s.get());e!==n&&(function(t){var n=s.get();LE.setModes(n,[t]),r.setDockingMode(t);var e=g()?Hu.TopToBottom:Hu.BottomToTop;Br(n.element(),Oc,e)}(e),t&&y(!0))}};return{isVisible:h,isPositionedAtTop:g,show:function(){u.set(!0),Di(l.element(),"display","flex"),o.addClass(a.getBody(),"mce-edit-focus"),Hi(e.element(),"display"),x(!1),y()},hide:function(){u.set(!1),t.outerContainer&&(Di(l.element(),"display","none"),o.removeClass(a.getBody(),"mce-edit-focus")),Di(e.element(),"display","none")},update:y,updateMode:x,repositionPopups:b}},GB=function(t,n){var e=wu(t);return{pos:n?e.y:e.bottom,bounds:e}},XB=/* */Object.freeze({__proto__:null,render:function(n,e,o,r,t){var i=e.mothership,u=e.uiMothership,a=e.outerContainer,c=ce(null),s=le.fromDom(t.targetNode),l=WB(n,s,e,r,c);MB(n);var f=function(){if(c.get())l.show();else{c.set(kB.getHeader(a).getOrDie());var t=Rh(n).getOr(_i());Ns(t,i),Ns(t,u),AB(n,e,o,r),kB.setMenubar(a,_B(n,o)),l.show(),function(c,s,l){var f=ce(GB(s,l.isPositionedAtTop())),n=function(t){var n=GB(s,l.isPositionedAtTop()),e=n.pos,o=n.bounds,r=f.get(),i=r.pos,u=r.bounds,a=o.height!==u.height||o.width!==u.width;f.set({pos:e,bounds:o}),a&&Iv(c,t),l.isVisible()&&(i!==e?l.update(!0):a&&(l.updateMode(),l.repositionPopups()))};c.on("activate",l.show),c.on("deactivate",l.hide),c.on("SkinLoaded ResizeWindow",function(){return l.update(!0)}),c.on("NodeChange keydown",function(t){Lg.requestAnimationFrame(function(){return n(t)})}),c.on("ScrollWindow",function(){return l.updateMode()});var t=PB();t.set(xb(le.fromDom(c.getBody()),"load",n)),c.on("remove",function(){t.clear()})}(n,s,l),n.nodeChanged()}};return n.on("focus",f),n.on("blur hide",l.hide),n.on("init",function(){n.hasFocus()&&f()}),jh(n,e),{editorContainer:a.element().dom()}}}),YB=function(t,n){return function(){t.execCommand("mceToggleFormat",!1,n)}},qB=function(t){var n,e;!function(e){uC.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],function(t,n){e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onSetup:tE(e,t.name),onAction:YB(e,t.name)})});for(var t=1;t<=6;t++){var n="h"+t;e.ui.registry.addToggleButton(n,{text:n.toUpperCase(),tooltip:"Heading "+t,onSetup:tE(e,n),onAction:YB(e,n)})}}(t),n=t,uC.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"}],function(t){n.ui.registry.addButton(t.name,{tooltip:t.text,icon:t.icon,onAction:function(){return n.execCommand(t.action)}})}),e=t,uC.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],function(t){e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:function(){return e.execCommand(t.action)},onSetup:tE(e,t.name)})})},KB=function(t){var n;qB(t),n=t,uC.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through",shortcut:""},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript",shortcut:""},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript",shortcut:""},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting",shortcut:""},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document",shortcut:""},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"}],function(t){n.ui.registry.addMenuItem(t.name,{text:t.text,icon:t.icon,shortcut:t.shortcut,onAction:function(){return n.execCommand(t.action)}})}),n.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:YB(n,"code")})},JB=function(t,n,e){var o=function(){return!!n.undoManager&&n.undoManager[e]()},r=function(){t.setDisabled(n.mode.isReadOnly()||!o())};return t.setDisabled(!o()),n.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",r),function(){return n.off("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",r)}},$B=function(t){var n,e;(n=t).ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:function(t){return JB(t,n,"hasUndo")},onAction:function(){return n.execCommand("undo")}}),n.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:function(t){return JB(t,n,"hasRedo")},onAction:function(){return n.execCommand("redo")}}),(e=t).ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",onSetup:function(t){return JB(t,e,"hasUndo")},onAction:function(){return e.execCommand("undo")}}),e.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",onSetup:function(t){return JB(t,e,"hasRedo")},onAction:function(){return e.execCommand("redo")}})},QB=function(t,n){var e,o,r,i,u,a,c,s,l,f,d,m,g,p;r=PT(0,o=n,WT(e=t)),e.ui.registry.addNestedMenuItem("align",{text:o.shared.providers.translate("Align"),getSubmenuItems:function(){return r.items.validateItems(r.getStyleItems())}}),a=PT(0,u=n,qT(i=t)),i.ui.registry.addNestedMenuItem("fontformats",{text:u.shared.providers.translate("Fonts"),getSubmenuItems:function(){return a.items.validateItems(a.getStyleItems())}}),c=t,l=et({type:"advanced"},(s=n).styleselect),f=PT(0,s,oE(c,l)),c.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return f.items.validateItems(f.getStyleItems())}}),m=PT(0,n,eE(d=t)),d.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return m.items.validateItems(m.getStyleItems())}}),p=PT(0,n,$T(g=t)),g.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return p.items.validateItems(p.getStyleItems())}})},ZB=function(t,n){var e,o,r,i;!function(n){uC.each([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],function(t){n.ui.registry.addToggleButton(t.name,{tooltip:t.text,onAction:function(){return n.execCommand(t.cmd)},icon:t.icon,onSetup:tE(n,t.name)})});var t="alignnone",e="No alignment",o="JustifyNone",r="align-none";n.ui.registry.addButton(t,{tooltip:e,onAction:function(){return n.execCommand(o)},icon:r})}(t),KB(t),QB(t,n),$B(t),function(t){Rv(t);var n=ce(null),e=ce(null);Lv(t,"forecolor","forecolor","Text color",n),Lv(t,"backcolor","hilitecolor","Background color",e),jv(t,"forecolor","forecolor","Text color"),jv(t,"backcolor","hilitecolor","Background color")}(t),(o=e=t).ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:function(){return o.execCommand("mceToggleVisualAid")}}),(r=e).ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:function(t){return function(n,t){n.setActive(t.hasVisual);var e=function(t){n.setActive(t.hasVisual)};return t.on("VisualAid",e),function(){return t.off("VisualAid",e)}}(t,r)},onAction:function(){r.execCommand("mceToggleVisualAid")}}),(i=t).ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:function(t){return function(t,n){t.setDisabled(!n.queryCommandState("outdent"));var e=function(){t.setDisabled(!n.queryCommandState("outdent"))};return n.on("NodeChange",e),function(){return n.off("NodeChange",e)}}(t,i)},onAction:function(){return i.execCommand("outdent")}}),i.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:function(){return i.execCommand("indent")}})},tD=function(t,n){return{anchor:"makeshift",x:t,y:n}},nD=function(t){return"longpress"===t.type||0===t.type.indexOf("touch")},eD=function(t,n){var e,o,r,i=hh.DOM.getPos(t);return e=n,o=i.x,r=i.y,tD(e.x+o,e.y+r)},oD=function(t,n){return"contextmenu"===n.type||"longpress"===n.type?t.inline?function(t){if(nD(t)){var n=t.touches[0];return tD(n.pageX,n.pageY)}return tD(t.pageX,t.pageY)}(n):eD(t.getContentAreaContainer(),function(t){if(nD(t)){var n=t.touches[0];return tD(n.clientX,n.clientY)}return tD(t.clientX,t.clientY)}(n)):rD(t)},rD=function(t){return{anchor:"selection",root:le.fromDom(t.selection.getNode())}},iD=function(t){return{anchor:"node",node:st.some(le.fromDom(t.selection.getNode())),root:le.fromDom(t.getBody())}},uD=function(t,n,e,o,r,i){var u,a,c=e(),s=(u=t,a=n,i?iD(u):oD(u,a));Dk(c,$h.CLOSE_ON_EXECUTE,o,!1).map(function(t){n.preventDefault(),Bg.showMenuAt(r,s,{menu:{markers:Gv("normal")},data:t})})},aD={onLtr:function(){return[_a,wa,Sa,ka,Ca,Oa,zg,Ng,Hg,Rg,Pg,Vg]},onRtl:function(){return[_a,Sa,wa,Ca,ka,Oa,zg,Ng,Pg,Vg,Hg,Rg]}},cD={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},sD=function(n,e,t,o,r,i,u){var a,c,s,l=(a=n,c=e,s=i?iD(a):oD(a,c),et({bubble:wc(0,12,cD),layouts:aD,overrides:{maxWidthFunction:zO(),maxHeightFunction:hc()}},s));Dk(t,$h.CLOSE_ON_EXECUTE,o,!0).map(function(t){e.preventDefault(),Bg.showMenuWithinBounds(r,l,{menu:{markers:Gv("normal"),highlightImmediately:u},data:t,type:"horizontal"},function(){return st.some(BT(n,o.shared))}),n.fire(NO)})},lD=function(n,e,o,r,i,u){var t=Pe(),a=t.os.isiOS(),c=t.os.isOSX(),s=t.os.isAndroid(),l=t.deviceType.isTouch(),f=function(){var t=o();sD(n,e,t,r,i,u,!(s||a||c&&l))};if(!c&&!a||u)s&&!u&&n.selection.setCursorLocation(e.target,0),f();else{var d=function(){!function(t){var n=t.selection.getRng(),e=function(){Lg.setEditorTimeout(t,function(){t.selection.setRng(n)},10),i()};t.once("touchend",e);var o=function(t){t.preventDefault(),t.stopImmediatePropagation()};t.on("mousedown",o,!0);var r=function(){return i()};t.once("longpresscancel",r);var i=function(){t.off("touchend",e),t.off("longpresscancel",r),t.off("mousedown",o)}}(n),f()};!function(t,n){var e=t.selection;if(e.isCollapsed()||n.touches.length<1)return!1;var o=n.touches[0],r=e.getRng();return Jc(t.getWin(),Rc.domRange(r)).exists(function(t){return t.left()<=o.clientX&&t.right()>=o.clientX&&t.top()<=o.clientY&&t.bottom()>=o.clientY})}(n,e)?(n.once("selectionchange",d),n.once("touchend",function(){return n.off("selectionchange",d)})):d()}},fD=function(t){return"string"==typeof t?t.split(/[ ,]/):t},dD=function(t){return t.settings.contextmenu_never_use_native||!1},mD=function(t){return e="contextmenu",o="link linkchecker image imagetools table spellchecker configurepermanentpen",r=(n=t).ui.registry.getAll().contextMenus,bt(n.settings,e).map(fD).getOrThunk(function(){return P(fD(o),function(t){return yt(r,t)})});var n,e,o,r},gD=function(t){return S(t)?"|"===t:"separator"===t.type},pD={type:"separator"},hD=function(n){if(S(n))return n;switch(n.type){case"separator":return pD;case"submenu":return{type:"nestedmenuitem",text:n.text,icon:n.icon,getSubmenuItems:function(){var t=n.getSubmenuItems();return S(t)?t:V(t,hD)}};default:return{type:"menuitem",text:n.text,icon:n.icon,onAction:(t=n.onAction,function(){return t()})}}var t},vD=function(t,n){if(0===n.length)return t;var e=J(t).filter(function(t){return!gD(t)}).fold(function(){return[]},function(t){return[pD]});return t.concat(e).concat(n).concat([pD])},bD=function(c,t,o){var r=Pe().deviceType.isTouch,i=Ji(Bg.sketch({dom:{tag:"div"},lazySink:t,onEscape:function(){return c.focus()},onShow:function(){return o.setContextMenuState(!0)},onHide:function(){return o.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:za([Lm("dismissContextMenu",[Jo(Fo(),function(t,n){Qs.close(t),c.focus()})])])})),n=function(t){return Bg.hide(i)},e=function(u){if(dD(c)&&u.preventDefault(),t=c,(!u.ctrlKey||dD(t))&&!1!==c.getParam("contextmenu")){var t,n,e,a=(n=c,"longpress"!==(e=u).type&&(2!==e.button||e.target===n.getBody()&&""===e.pointerType));(r()?lD:uD)(c,u,function(){var r,i,t,n=a?c.selection.getStart(!0):u.target,e=c.ui.registry.getAll(),o=mD(c);return r=e.contextMenus,i=n,0<(t=N(o,function(t,n){if(yt(r,n)){var e=r[n].update(i);if(S(e))return vD(t,e.split(" "));if(0<e.length){var o=V(e,hD);return vD(t,o)}return t}return t.concat([n])},[])).length&&gD(t[t.length-1])&&t.pop(),t},o,i,a)}};c.on("init",function(){var t="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(r()?"":" ResizeWindow");c.on(t,n),c.on("longpress contextmenu",e)})},yD=wt([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),xD=function(n){return function(t){return t.translate(-n.left(),-n.top())}},wD=function(n){return function(t){return t.translate(n.left(),n.top())}},SD=function(e){return function(t,n){return N(e,function(t,n){return n(t)},ou(t,n))}},kD=function(t,n,e){return t.fold(SD([wD(e),xD(n)]),SD([xD(n)]),SD([]))},CD=function(t,n,e){return t.fold(SD([wD(e)]),SD([]),SD([wD(n)]))},OD=function(t,n,e){return t.fold(SD([]),SD([xD(e)]),SD([wD(n),xD(e)]))},_D=function(t,n,e){var o=t.fold(function(t,n){return{position:st.some("absolute"),left:st.some(t+"px"),top:st.some(n+"px")}},function(t,n){return{position:st.some("absolute"),left:st.some(t-e.left()+"px"),top:st.some(n-e.top()+"px")}},function(t,n){return{position:st.some("fixed"),left:st.some(t+"px"),top:st.some(n+"px")}});return et({right:st.none(),bottom:st.none()},o)},TD=function(t,i,u,a){var n=function(o,r){return function(t,n){var e=o(i,u,a);return r(t.getOr(e.left()),n.getOr(e.top()))}};return t.fold(n(OD,ED),n(CD,BD),n(kD,DD))},ED=yD.offset,BD=yD.absolute,DD=yD.fixed,MD=function(t,n){var e=Dr(t,n);return _(e)?NaN:parseInt(e,10)},AD=function(t,n,e,o){return r=n,i=t.element(),u=MD(i,r.leftAttr),a=MD(i,r.topAttr),(isNaN(u)||isNaN(a)?st.none():st.some(ou(u,a))).fold(function(){return e},function(t){return DD(t.left()+o.left(),t.top()+o.top())});var r,i,u,a},FD=function(t,n,e,o,r,i){var u,a,c,s=AD(t,n,e,o),l=(n.mustSnap?VD:HD)(t,n,s,r,i),f=kD(s,r,i);return u=n,a=f,c=t.element(),Br(c,u.leftAttr,a.left()+"px"),Br(c,u.topAttr,a.top()+"px"),l.fold(function(){return{coord:DD(f.left(),f.top()),extra:st.none()}},function(t){return{coord:t.output,extra:t.extra}})},ID=function(t,n){var e,o;e=n,o=t.element(),Fr(o,e.leftAttr),Fr(o,e.topAttr)},RD=function(t,l,f,d){return Q(t,function(t){var n,e,o,r,i,u,a,c,s=t.sensor;return(n=l,e=s,o=t.range.left(),r=t.range.top(),a=CD(n,i=f,u=d),c=CD(e,i,u),Math.abs(a.left()-c.left())<=o&&Math.abs(a.top()-c.top())<=r)?st.some({output:TD(t.output,l,f,d),extra:t.extra}):st.none()})},VD=function(t,n,d,m,g){var e=n.getSnapPoints(t);return RD(e,d,m,g).orThunk(function(){return N(e,function(n,e){var t,o,r,i,u,a,c,s,l=e.sensor,f=(t=d,o=l,e.range.left(),e.range.top(),u=CD(t,r=m,i=g),a=CD(o,r,i),c=Math.abs(u.left()-a.left()),s=Math.abs(u.top()-a.top()),ou(c,s));return n.deltas.fold(function(){return{deltas:st.some(f),snap:st.some(e)}},function(t){return(f.left()+f.top())/2<=(t.left()+t.top())/2?{deltas:st.some(f),snap:st.some(e)}:n})},{deltas:st.none(),snap:st.none()}).snap.map(function(t){return{output:TD(t.output,d,m,g),extra:t.extra}})})},HD=function(t,n,e,o,r){var i=n.getSnapPoints(t);return RD(i,e,o,r)},PD=/* */Object.freeze({__proto__:null,snapTo:function(t,n,e,o){var r,i,u,a=n.getTarget(t.element());if(n.repositionTarget){var c=ar(t.element()),s=mu(c),l=kE(a),f=(i=s,u=l,{coord:TD((r=o).output,r.output,i,u),extra:r.extra}),d=_D(f.coord,0,l);Ai(a,d)}}}),zD="data-initial-z-index",ND=function(t,n){var e;t.getSystem().addToGui(n),lr((e=n).element()).filter(_r).each(function(n){Ri(n,"z-index").each(function(t){Br(n,zD,t)}),Di(n,"z-index",Fi(e.element(),"z-index"))})},LD=function(t){lr(t.element()).filter(_r).each(function(n){Mr(n,zD).fold(function(){return Hi(n,"z-index")},function(t){return Di(n,"z-index",t)}),Fr(n,zD)}),t.getSystem().removeFromGui(t)},jD=function(t,n,e){return t.getSystem().build(Ub.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[n]},events:e}))},UD=Qn("snaps",[zn("getSnapPoints"),$u("onSensor"),zn("leftAttr"),zn("topAttr"),Zn("lazyViewport",ku),Zn("mustSnap",!1)]),WD=[Zn("useFixed",c),zn("blockerClass"),Zn("getTarget",ct),Zn("onDrag",Z),Zn("repositionTarget",!0),Zn("onDrop",Z),ie("getBounds",ku),UD],GD=function(n){return t=Ri(n,"left"),e=Ri(n,"top"),o=Ri(n,"position"),r=function(t,n,e){return("fixed"===e?DD:ED)(parseInt(t,10),parseInt(n,10))},(t.isSome()&&e.isSome()&&o.isSome()?st.some(r(t.getOrDie(),e.getOrDie(),o.getOrDie())):st.none()).getOrThunk(function(){var t=iu(n);return BD(t.left(),t.top())});var t,e,o,r},XD=function(e,t,i,u,a,c,n){var o,r,s,l,f,d,m,g,p,h=t.fold(function(){var t,e,o,n=(t=i,e=c.left(),o=c.top(),t.fold(function(t,n){return ED(t+e,n+o)},function(t,n){return BD(t+e,n+o)},function(t,n){return DD(t+e,n+o)})),r=kD(n,u,a);return DD(r.left(),r.top())},function(n){var t=FD(e,n,i,c,u,a);return t.extra.each(function(t){n.onSensor(e,t)}),t.coord});return o=h,r=u,s=a,f=(l=n).bounds,d=CD(o,r,s),m=sc(d.left(),f.x,f.x+f.width-l.width),g=sc(d.top(),f.y,f.y+f.height-l.height),p=BD(m,g),o.fold(function(){var t=OD(p,r,s);return ED(t.left(),t.top())},function(){return p},function(){var t=kD(p,r,s);return DD(t.left(),t.top())})},YD=function(t,n){return{bounds:t.getBounds(),height:nu(n.element()),width:su(n.element())}},qD=function(n,e,t,o,r){var i=t.update(o,r),u=t.getStartData().getOrThunk(function(){return YD(e,n)});i.each(function(t){!function(t,n,e,o){var r=n.getTarget(t.element());if(n.repositionTarget){var i=ar(t.element()),u=mu(i),a=kE(r),c=GD(r),s=XD(t,n.snaps,c,u,a,o,e),l=_D(s,0,a);Ai(r,l)}n.onDrag(t,r,o)}(n,e,u,t)})},KD=function(n,t,e,o){t.each(LD),e.snaps.each(function(t){ID(n,t)});var r=e.getTarget(n.element());o.reset(),e.onDrop(n,r)},JD=function(t){return function(n,e){var o=function(t){e.setStartData(YD(n,t))};return Yo(b([Jo(Bo(),function(t){e.getStartData().each(function(){return o(t)})})],t(n,e,o)))}},$D=/* */Object.freeze({__proto__:null,getData:function(t){return st.from(ou(t.x(),t.y()))},getDelta:function(t,n){return ou(n.left()-t.left(),n.top()-t.top())}}),QD=function(a,c,s){return[Jo(to(),function(n,t){if(0===t.event().raw().button){t.stop();var e,o=function(){return KD(n,st.some(u),a,c)},r=kb(o,200),i={drop:o,delayDrop:r.schedule,forceDrop:o,move:function(t){r.cancel(),qD(n,a,c,$D,t)}},u=jD(n,a.blockerClass,(e=i,Yo([Jo(to(),e.forceDrop),Jo(oo(),e.drop),Jo(no(),function(t,n){e.move(n.event())}),Jo(eo(),e.delayDrop)])));s(n),ND(n,u)}})]},ZD=b(WD,[na("dragger",{handlers:JD(QD)})]),tM=/* */Object.freeze({__proto__:null,getData:function(t){var n,e=t.raw().touches;return 1===e.length?(n=e[0],st.some(ou(n.clientX,n.clientY))):st.none()},getDelta:function(t,n){return ou(n.left()-t.left(),n.top()-t.top())}}),nM=function(u,a,c){var s=ce(st.none());return[Jo(Je(),function(n,t){t.stop();var e,o=function(){KD(n,s.get(),u,a),s.set(st.none())},r={drop:o,delayDrop:function(){},forceDrop:o,move:function(t){qD(n,u,a,tM,t)}},i=jD(n,u.blockerClass,(e=r,Yo([Jo(Je(),e.forceDrop),Jo(Qe(),e.drop),Jo(Ze(),e.drop),Jo($e(),function(t,n){e.move(n.event())})])));s.set(st.some(i));c(n),ND(n,i)}),Jo($e(),function(t,n){n.stop(),qD(t,u,a,tM,n.event())}),Jo(Qe(),function(t,n){n.stop(),KD(t,s.get(),u,a),s.set(st.none())}),Jo(Ze(),function(t){KD(t,s.get(),u,a),s.set(st.none())})]},eM=ZD,oM=b(WD,[na("dragger",{handlers:JD(nM)})]),rM=b(WD,[na("dragger",{handlers:JD(function(t,n,e){return b(QD(t,n,e),nM(t,n,e))})})]),iM=Ua({branchKey:"mode",branches:/* */Object.freeze({__proto__:null,mouse:eM,touch:oM,mouseOrTouch:rM}),name:"dragging",active:{events:function(t,n){return t.dragger.handlers(t,n)}},extra:{snap:function(t){return{sensor:t.sensor,range:t.range,output:t.output,extra:st.from(t.extra)}}},state:/* */Object.freeze({__proto__:null,init:function(){var i=st.none(),n=st.none(),t=at({});return oi({readState:t,reset:function(){i=st.none(),n=st.none()},update:function(r,t){return r.getData(t).bind(function(t){return n=r,e=t,o=i.map(function(t){return n.getDelta(t,e)}),i=st.some(e),o;var n,e,o})},getStartData:function(){return n},setStartData:function(t){n=st.some(t)}})}}),apis:PD}),uM=function(t,r,i,u,n,e){return t.fold(function(){return iM.snap({sensor:BD(i-20,u-20),range:ou(n,e),output:BD(st.some(i),st.some(u)),extra:{td:r}})},function(t){var n=i-20,e=u-20,o=t.element().dom().getBoundingClientRect();return iM.snap({sensor:BD(n,e),range:ou(40,40),output:BD(st.some(i-o.width/2),st.some(u-o.height/2)),extra:{td:r}})})},aM=function(t,i,u){return{getSnapPoints:t,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,n){var e,o,r=n.td;e=i.get(),o=r,e.exists(function(t){return Le(t,o)})||(i.set(st.some(r)),u(r))},mustSnap:!0}},cM=function(t){return Ug(jg.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:za([iM.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:t}),Zy.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))},sM=function(c,e){var o=ce([]),r=ce([]),t=ce(!1),i=ce(st.none()),u=ce(st.none()),n=function(t){var n=Su(t);return uM(f.getOpt(e),t,n.x,n.y,n.width,n.height)},a=function(t){var n=Su(t);return uM(d.getOpt(e),t,n.right,n.bottom,n.width,n.height)},s=aM(function(){return V(o.get(),function(t){return n(t)})},i,function(n){u.get().each(function(t){c.fire("TableSelectorChange",{start:n,finish:t})})}),l=aM(function(){return V(r.get(),function(t){return a(t)})},u,function(n){i.get().each(function(t){c.fire("TableSelectorChange",{start:t,finish:n})})}),f=cM(s),d=cM(l),m=Ji(f.asSpec()),g=Ji(d.asSpec()),p=function(t,n,e,o){var r=e(n);iM.snapTo(t,r);!function(t,n,e,o){var r=n.dom().getBoundingClientRect();Hi(t.element(),"display");var i=sr(le.fromDom(c.getBody())).dom().innerHeight,u=e(r),a=o(r,i);(u||a)&&Di(t.element(),"display","none")}(t,n,function(t){return t[o]<0},function(t,n){return t[o]>n})},h=function(t){return p(m,t,n,"top")},v=function(t){return p(g,t,a,"bottom")};Pe().deviceType.isTouch()&&(c.on("TableSelectionChange",function(n){t.get()||(Rs(e,m),Rs(e,g),t.set(!0)),i.set(st.some(n.start)),u.set(st.some(n.finish)),n.otherCells.each(function(t){o.set(t.upOrLeftCells),r.set(t.downOrRightCells),h(n.start),v(n.finish)})}),c.on("ResizeEditor ResizeWindow ScrollContent",function(){i.get().each(h),u.get().each(v)}),c.on("TableSelectionClear",function(){t.get()&&(Ps(m),Ps(g),t.set(!1)),i.set(st.none()),u.set(st.none())}))};(LT=NT=NT||{})[LT.None=0]="None",LT[LT.Both=1]="Both",LT[LT.Vertical=2]="Vertical";var lM,fM=function(t,n,e){var o,r,i,u,a,c,s=le.fromDom(t.getContainer()),l=(o=t,r=n,i=e,u=tu(s),a=cu(s),(c={}).height=LB(u+r.top(),wh(o),kh(o)),i===NT.Both&&(c.width=LB(a+r.left(),xh(o),Sh(o))),c);ft(l,function(t,n){return Di(s,n,NB(t))}),t.fire("ResizeEditor")},dM=function(t){if(1===t.nodeType){if("BR"===t.nodeName||t.getAttribute("data-mce-bogus"))return!0;if("bookmark"===t.getAttribute("data-mce-type"))return!0}return!1},mM=function(i,u,a){u.delimiter||(u.delimiter="\xbb");return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:za([Rm.config({mode:"flow",selector:"div[role=button]"}),ph.config({disabled:a.isReadOnly}),Uh(),Dy.config({}),Nm.config({}),Lm("elementPathEvents",[or(function(r,t){i.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return Rm.focusIn(r)}),i.on("NodeChange",function(t){var n,o,e=function(t){for(var n=[],e=t.length;0<e--;){var o=t[e];if(1===o.nodeType&&!dM(o)){var r=i.fire("ResolveName",{name:o.nodeName.toLowerCase(),target:o});if(r.isDefaultPrevented()||n.push({name:r.name,element:o}),r.isPropagationStopped())break}}return n}(t.parents);0<e.length?Nm.set(r,(n=V(e||[],function(n,t){return jg.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":t,"tab-index":-1,"aria-level":t+1},innerHtml:n.name},action:function(t){i.focus(),i.selection.select(n.element),i.nodeChanged()},buttonBehaviours:za([Gh(a.isReadOnly),Uh()])})}),o={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+u.delimiter+" "}},N(n.slice(1),function(t,n){var e=t;return e.push(o),e.push(n),e},[n[0]]))):Nm.set(r,[])})})])]),components:[]}},gM=function(i,u){var t,n,e,o,r,a;return{dom:{tag:"div",classes:["tox-statusbar"]},components:(r=function(){var t,o,r,n,e=[];return i.getParam("elementpath",!0,"boolean")&&e.push(mM(i,{},u)),Ee(i.settings.plugins,"wordcount")&&e.push((t=i,o=u,r=function(t,n,e){return Nm.set(t,[Yi(o.translate(["{0} "+e,n[e]]))])},jg.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:za([Gh(o.isReadOnly),Uh(),Dy.config({}),Nm.config({}),bl.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Lm("wordcount-events",[ur(function(t){var n=bl.getValue(t),e="words"===n.mode?"characters":"words";bl.setValue(t,{mode:e,count:n.count}),r(t,n.count,e)}),or(function(e){t.on("wordCountUpdate",function(t){var n=bl.getValue(e).mode;bl.setValue(e,{mode:n,count:t.wordCount}),r(e,t.wordCount,n)})})])]),eventOrder:{"alloy.execute":["disabling","alloy.base.behaviour","wordcount-events"]}}))),i.getParam("branding",!0,"boolean")&&e.push({dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:'<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce&amp;utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+(n=Vp.translate(["Powered by {0}","Tiny"]))+'">'+n+"</a>"}}),0<e.length?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:e}]:[]}(),n=!Ee((t=i).settings.plugins,"autoresize"),(a=!1===(e=t.getParam("resize",n))?NT.None:"both"===e?NT.Both:NT.Vertical)!==NT.None&&r.push((o=a,{dom:{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:u.translate("Resize"),"aria-hidden":"true"},innerHtml:Gg("resize-handle",u.icons)},behaviours:za([iM.config({mode:"mouse",repositionTarget:!1,onDrag:function(t,n,e){fM(i,e,o)},blockerClass:"tox-blocker"})])})),r)}},pM=function(y){var t,n=y.inline,x=n?XB:HB,w=Ph(y)?KE:ZE,e=st.none(),o=Pe(),r=o.browser.isIE()?["tox-platform-ie"]:[],i=o.deviceType.isTouch()?["tox-platform-touch"]:[],u=Ih(y),a=Vp.isRtl()?{attributes:{dir:"rtl"}}:{},c={attributes:((t={})[Oc]=u?Hu.BottomToTop:Hu.TopToBottom,t)},S=function(){return e.bind(kB.getHeader)},k=Ji({dom:et({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(r).concat(i)},a),behaviours:za([Ds.config({useFixed:function(){return w.isDocked(S)}})])}),C=function(){return ot.value(k)},s=Ug({dom:{tag:"div",classes:["tox-anchorbar"]}}),O=function(){return e.bind(function(t){return kB.getThrobber(t)}).getOrDie("Could not find throbber element")},_=PO(k,y,function(){return e.bind(function(t){return s.getOpt(t)}).getOrDie("Could not find a anchor bar element")}),l=kB.parts().menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:_,onEscape:function(){y.focus()}}),T=Dh(y),f=kB.parts().toolbar(et({dom:{tag:"div",classes:["tox-toolbar"]},getSink:C,providers:_.shared.providers,onEscape:function(){y.focus()},type:T,lazyToolbar:function(){return e.bind(function(t){return kB.getToolbar(t)}).getOrDie("Could not find more toolbar element")},lazyHeader:function(){return S().getOrDie("Could not find header element")}},c)),d=kB.parts()["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:_.shared.providers,onEscape:function(){},type:T}),m=kB.parts().socket({dom:{tag:"div",classes:["tox-edit-area"]}}),g=kB.parts().sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),p=kB.parts().throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:_}),h=y.getParam("statusbar",!0,"boolean")&&!n?st.some(gM(y,_.shared.providers)):st.none(),v={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[m,g]},b=Th(y),E=Oh(y),B=Ch(y),D=kB.parts().header({dom:et({tag:"div",classes:["tox-editor-header"]},c),components:ut([B?[l]:[],b?[d]:E?[f]:[],Vh(y)?[]:[s.asSpec()]]),sticky:Ph(y),editor:y,sharedBackstage:_.shared}),M=ut([u?[]:[D],n?[]:[v],u?[D]:[]]),A=ut([[{dom:{tag:"div",classes:["tox-editor-container"]},components:M}],n?[]:h.toArray(),[p]]),F=Hh(y),I=et(et({role:"application"},Vp.isRtl()?{dir:"rtl"}:{}),F?{"aria-hidden":"true"}:{}),R=Ji(kB.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(n?["tox-tinymce-inline"]:[]).concat(u?["tox-tinymce--toolbar-bottom"]:[]).concat(i).concat(r),styles:et({visibility:"hidden"},F?{opacity:"0",border:"0"}:{}),attributes:I},components:A,behaviours:za([Rm.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a"})])}));e=st.some(R),y.shortcuts.add("alt+F9","focus menubar",function(){kB.focusMenubar(R)}),y.shortcuts.add("alt+F10","focus toolbar",function(){kB.focusToolbar(R)});var V,H,P,z,N,L,j,U,W,G,X,Y,q,K,J,$,Q=Wb(R),Z=Wb(k);V=y,H=Q,P=Z,z=function(n,e){it([H,P],function(t){t.broadcastEvent(n,e)})},N=function(n,e){it([H,P],function(t){t.broadcastOn([n],e)})},L=function(t){return N(Zs(),{target:t.target()})},j=yb(le.fromDom(nt.document),"touchstart",L),U=yb(le.fromDom(nt.document),"touchmove",function(t){return z(To(),t)}),W=yb(le.fromDom(nt.document),"touchend",function(t){return z(Eo(),t)}),G=yb(le.fromDom(nt.document),"mousedown",L),X=yb(le.fromDom(nt.document),"mouseup",function(t){0===t.raw().button&&N(nl(),{target:t.target()})}),Y=function(t){return N(Zs(),{target:le.fromDom(t.target)})},q=function(t){0===t.button&&N(nl(),{target:le.fromDom(t.target)})},K=function(t){return z(Bo(),wb(t))},J=function(t){N(tl(),{}),z(Do(),wb(t))},$=function(){return N(tl(),{})},V.on("PostRender",function(){V.on("click",Y),V.on("tap",Y),V.on("mouseup",q),V.on("ScrollWindow",K),V.on("ResizeWindow",J),V.on("ResizeEditor",$)}),V.on("remove",function(){V.off("click",Y),V.off("tap",Y),V.off("mouseup",q),V.off("ScrollWindow",K),V.off("ResizeWindow",J),V.off("ResizeEditor",$),G.unbind(),j.unbind(),U.unbind(),W.unbind(),X.unbind()}),V.on("detach",function(){js(H),js(P),H.destroy(),P.destroy()});var tt=function(){var t,n=NB(jB(y)),e=NB(UB(t=y).getOr(yh(t)));return y.inline||(Vi("div","width",e)&&Di(R.element(),"width",e),Vi("div","height",n)?Di(R.element(),"height",n):Di(R.element(),"height","200px")),n};return{mothership:Q,uiMothership:Z,backstage:_,renderUI:function(){var o,r,e,n,i,u,a,c;w.setup(y,_.shared,S),ZB(y,_),bD(y,C,_),r=(o=y).ui.registry.getAll().sidebars,it(lt(r),function(n){var t=r[n],e=function(){return st.from(o.queryCommandValue("ToggleSidebar")).is(n)};o.ui.registry.addToggleButton(n,{icon:t.icon,tooltip:t.tooltip,onAction:function(t){o.execCommand("ToggleSidebar",!1,n),t.setActive(e())},onSetup:function(t){var n=function(){return t.setActive(e())};return o.on("ToggleSidebar",n),function(){o.off("ToggleSidebar",n)}}})}),e=y,n=O,i=_.shared,u=ce(!1),a=ce(st.none()),c=function(t){t!==u.get()&&(pB(n(),t,i.providers),u.set(t))},e.on("ProgressState",function(t){if(a.get().each(Lg.clearTimeout),rt(t.time)){var n=Lg.setEditorTimeout(e,function(){return c(t.state)},t.time);a.set(st.some(n))}else c(t.state),a.set(st.none())}),dt(y.getParam("toolbar_groups",{},"object"),function(t,n){y.ui.registry.addGroupToolbarButton(n,t)});var t=y.ui.registry.getAll(),s=t.buttons,l=t.menuItems,f=t.contextToolbars,d=t.sidebars,m=_h(y),g={menuItems:l,menus:y.settings.menu?dt(y.settings.menu,function(t){return et(et({},t),{items:t.items})}):{},menubar:y.settings.menubar,toolbar:m.getOrThunk(function(){return y.getParam("toolbar",!0)}),allowToolbarGroups:T===Kg.floating,buttons:s,sidebar:d};pE(y,f,k,{backstage:_}),sM(y,k);var p=y.getElement(),h=tt(),v={mothership:Q,uiMothership:Z,outerContainer:R},b={targetNode:p,height:h};return x.render(y,v,g,_,b)},getUi:function(){return{channels:{broadcastAll:Z.broadcast,broadcastOn:Z.broadcastOn,register:function(){}}}}}},hM=at([zn("lazySink"),Yn("dragBlockClass"),ie("getBounds",ku),Zn("useTabstopAt",at(!0)),Zn("eventOrder",{}),yl("modalBehaviours",[Rm]),Qu("onExecute"),ta("onEscape")]),vM={sketch:ct},bM=at([Jl({name:"draghandle",overrides:function(t,n){return{behaviours:za([iM.config({mode:"mouse",getTarget:function(t){return Du(t,'[role="dialog"]').getOr(t)},blockerClass:t.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(n,null,2)).message),getBounds:t.getDragBounds})])}}}),ql({schema:[zn("dom")],name:"title"}),ql({factory:vM,schema:[zn("dom")],name:"close"}),ql({factory:vM,schema:[zn("dom")],name:"body"}),Jl({factory:vM,schema:[zn("dom")],name:"footer"}),Kl({factory:{sketch:function(t,n){return et(et({},t),{dom:n.dom,components:n.components})}},schema:[Zn("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Zn("components",[])],name:"blocker"})]),yM=_f({name:"ModalDialog",configFields:hM(),partFields:bM(),factory:function(a,t,n,o){var r=Nr("alloy.dialog.busy"),c=Nr("alloy.dialog.idle"),s=za([Rm.config({mode:"special",onTab:function(){return st.some(!0)},onShiftTab:function(){return st.some(!0)}}),Xm.config({})]),e=Nr("modal-events"),i=et(et({},a.eventOrder),{"alloy.system.attached":[e].concat(a.eventOrder["alloy.system.attached"]||[])});return{uid:a.uid,dom:a.dom,components:t,apis:{show:function(i){var t=a.lazySink(i).getOrDie(),u=ce(st.none()),n=o.blocker(),e=t.getSystem().build(et(et({},n),{components:n.components.concat([$i(i)]),behaviours:za([Xm.config({}),Lm("dialog-blocker-events",[er(io(),function(){Rm.focusIn(i)}),Jo(c,function(t,n){Ar(i.element(),"aria-busy")&&(Fr(i.element(),"aria-busy"),u.get().each(function(t){return Nm.remove(i,t)}))}),Jo(r,function(t,n){Br(i.element(),"aria-busy","true");var e=n.event().getBusySpec();u.get().each(function(t){Nm.remove(i,t)});var o=e(i,s),r=t.getSystem().build(o);u.set(st.some(r)),Nm.append(i,$i(r)),r.hasConfigured(Rm)&&Rm.focusIn(r)})])])}));Rs(t,e),Rm.focusIn(i)},hide:function(n){lr(n.element()).each(function(t){n.getSystem().getByDom(t).each(function(t){Ps(t)})})},getBody:function(t){return lf(t,a,"body")},getFooter:function(t){return lf(t,a,"footer")},setIdle:function(t){Lo(t,c)},setBusy:function(t,n){jo(t,r,{getBusySpec:n})}},eventOrder:i,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:wl(a.modalBehaviours,[Nm.config({}),Rm.config({mode:"cyclic",onEnter:a.onExecute,onEscape:a.onEscape,useTabstopAt:a.useTabstopAt}),Lm(e,[or(function(t){var n,e,o,r,i,u;n=t.element(),e=lf(t,a,"title").element(),o=st.from(Dr(n,"id")).fold(function(){var t=Nr("dialog-label");return Br(e,"id",t),t},ct),Br(n,"aria-labelledby",o),r=t.element(),i=lf(t,a,"body").element(),u=st.from(Dr(r,"id")).fold(function(){var t=Nr("dialog-describe");return Br(i,"id",t),t},ct),Br(r,"aria-describedby",u)})])])}},apis:{show:function(t,n){t.show(n)},hide:function(t,n){t.hide(n)},getBody:function(t,n){return t.getBody(n)},getFooter:function(t,n){return t.getFooter(n)},setBusy:function(t,n,e){t.setBusy(n,e)},setIdle:function(t,n){t.setIdle(n)}}}),xM=[Ln("type"),Ln("text"),jn("level",["info","warn","error","success"]),Ln("icon"),Zn("url","")],wM=ln(xM),SM=[Ln("type"),Ln("text"),re("disabled",!1),re("primary",!1),hn("name","name",Gt(function(){return Nr("button-name")}),Fn),Jn("icon"),re("borderless",!1)],kM=ln(SM),CM=[Ln("type"),Ln("name"),Ln("label"),re("disabled",!1)],OM=ln(CM),_M=In,TM=[Ln("type"),Ln("name")],EM=TM.concat([Jn("label")]),BM=ln(EM),DM=Fn,MM=ln(EM),AM=Fn,FM=ln(EM),IM=fn(yn),RM=function(t){return[Ln("type"),Nn("columns",An),t]},VM=EM.concat([re("sandboxed",!0)]),HM=ln(VM),PM=Fn,zM=EM.concat([Jn("inputMode"),Jn("placeholder"),re("maximized",!1),re("disabled",!1)]),NM=ln(zM),LM=Fn,jM=EM.concat([Gn("items",[Ln("text"),Ln("value")]),ne("size",1),re("disabled",!1)]),UM=ln(jM),WM=Fn,GM=EM.concat([re("constrain",!0),re("disabled",!1)]),XM=ln(GM),YM=ln([Ln("width"),Ln("height")]),qM=EM.concat([Jn("placeholder"),re("maximized",!1),re("disabled",!1)]),KM=ln(qM),JM=Fn,$M=EM.concat([oe("filetype","file",["image","media","file"]),Zn("disabled",!1)]),QM=ln($M),ZM=ln([Ln("value"),Zn("meta",{})]),tA=TM.concat([ee("tag","textarea"),Ln("scriptId"),Ln("scriptUrl"),(lM=undefined,te("settings",lM,Hn))]),nA=TM.concat([ee("tag","textarea"),Un("init")]),eA=Sn(function(t){return Cn("customeditor.old",sn(nA),t).orThunk(function(){return Cn("customeditor.new",sn(tA),t)})}),oA=Fn,rA=[Ln("type"),Ln("html"),oe("presets","presentation",["presentation","document"])],iA=ln(rA),uA=EM.concat([Nn("currentState",ln([zn("blob"),Ln("url")]))]),aA=ln(uA),cA=EM.concat([Zn("columns","auto")]),sA=ln(cA),lA=xn([Ln("value"),Ln("text"),Ln("icon")]),fA=[Ln("type"),Xn("header",Fn),Xn("cells",fn(Fn))],dA=ln(fA),mA=function(n){return hn("items","items",Ut(),fn(Sn(function(t){return Cn("Checking item of "+n,gA,t).fold(function(t){return ot.error(Tn(t))},function(t){return ot.value(t)})})))},gA=wn(function(){return En("type",{alertbanner:wM,bar:ln((n=mA("bar"),[Ln("type"),n])),button:kM,checkbox:OM,colorinput:BM,colorpicker:MM,dropzone:FM,grid:ln(RM(mA("grid"))),iframe:HM,input:NM,selectbox:UM,sizeinput:XM,textarea:KM,urlinput:QM,customeditor:eA,htmlpanel:iA,imagetools:aA,collection:sA,label:ln((t=mA("label"),[Ln("type"),Ln("label"),t])),table:dA,panel:hA});var t,n}),pA=[Ln("type"),Zn("classes",[]),Xn("items",gA)],hA=ln(pA),vA=[hn("name","name",Gt(function(){return Nr("tab-name")}),Fn),Ln("title"),Xn("items",gA)],bA=[Ln("type"),Gn("tabs",vA)],yA=ln(bA),xA=ln([Ln("type"),Ln("name")].concat(yp)),wA=In,SA=[hn("name","name",Gt(function(){return Nr("button-name")}),Fn),Jn("icon"),oe("align","end",["start","end"]),re("primary",!1),re("disabled",!1)],kA=b(SA,[Ln("text")]),CA=b([jn("type",["submit","cancel","custom"])],kA),OA=b([jn("type",["menu"]),Jn("text"),Jn("tooltip"),Jn("icon"),Xn("items",xA)],SA),_A=kA,TA=Bn("type",{submit:CA,cancel:CA,custom:CA,menu:OA}),EA=ln([Ln("title"),Nn("body",En("type",{panel:hA,tabpanel:yA})),ee("size","normal"),Xn("buttons",TA),Zn("initialData",{}),ie("onAction",Z),ie("onChange",Z),ie("onSubmit",Z),ie("onClose",Z),ie("onCancel",Z),Zn("onTabChange",Z)]),BA=function(t){return k(t)?[t].concat(U(vt(t),BA)):C(t)?U(t,BA):[]},DA=function(t){return S(t.type)&&S(t.name)},MA={checkbox:_M,colorinput:DM,colorpicker:AM,dropzone:IM,input:LM,iframe:PM,sizeinput:YM,selectbox:WM,size:YM,textarea:JM,urlinput:ZM,customeditor:oA,collection:lA,togglemenuitem:wA},AA=function(t){var n=P(BA(t),DA),e=U(n,function(n){return t=n,st.from(MA[t.type]).fold(function(){return[]},function(t){return[Nn(n.name,t)]});var t});return ln(e)},FA=ln(b([jn("type",["cancel","custom"])],_A)),IA=ln([Ln("title"),Ln("url"),Kn("height"),Kn("width"),qn("buttons",fn(FA)),ie("onAction",Z),ie("onCancel",Z),ie("onClose",Z),ie("onMessage",Z)]),RA=function(t){return{internalDialog:On(Cn("dialog",EA,t)),dataValidator:AA(t),initialData:t.initialData}},VA={open:function(t,n){var e=RA(n);return t(e.internalDialog,e.initialData,e.dataValidator)},openUrl:function(t,n){return t(On(Cn("dialog",IA,n)))},redial:function(t){return RA(t)}},HA=function(t){var e=[],o={};return ft(t,function(t,n){t.fold(function(){e.push(n)},function(t){o[n]=t})}),0<e.length?ot.error(e):ot.value(o)},PA=Of({name:"TabButton",configFields:[Zn("uid",undefined),zn("value"),hn("dom","dom",Xt(function(){return{attributes:{role:"tab",id:Nr("aria"),"aria-selected":"false"}}}),Dn()),Yn("action"),Zn("domModification",{}),yl("tabButtonBehaviours",[Xm,Rm,bl]),zn("view")],factory:function(t,n){return{uid:t.uid,dom:t.dom,components:t.components,events:ug(t.action),behaviours:wl(t.tabButtonBehaviours,[Xm.config({}),Rm.config({mode:"execution",useSpace:!0,useEnter:!0}),bl.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}}}),zA=at([zn("tabs"),zn("dom"),Zn("clickToDismiss",!1),yl("tabbarBehaviours",[jf,Rm]),Ku(["tabClass","selectedClass"])]),NA=$l({factory:PA,name:"tabs",unit:"tab",overrides:function(o){var r=function(t,n){jf.dehighlight(t,n),jo(t,Po(),{tabbar:t,button:n})},i=function(t,n){jf.highlight(t,n),jo(t,Ho(),{tabbar:t,button:n})};return{action:function(t){var n=t.getSystem().getByUid(o.uid).getOrDie(),e=jf.isHighlighted(n,t);(e&&o.clickToDismiss?r:e?Z:i)(n,t)},domModification:{classes:[o.markers.tabClass]}}}}),LA=at([NA]),jA=_f({name:"Tabbar",configFields:zA(),partFields:LA(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,components:n,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:wl(t.tabbarBehaviours,[jf.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,n){Br(n.element(),"aria-selected","true")},onDehighlight:function(t,n){Br(n.element(),"aria-selected","false")}}),Rm.config({mode:"flow",getInitial:function(t){return jf.getHighlighted(t).map(function(t){return t.element()})},selector:"."+t.markers.tabClass,executeOnMove:!0})])}}}),UA=Of({name:"Tabview",configFields:[yl("tabviewBehaviours",[Nm])],factory:function(t,n){return{uid:t.uid,dom:t.dom,behaviours:wl(t.tabviewBehaviours,[Nm.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),WA=at([Zn("selectFirst",!0),$u("onChangeTab"),$u("onDismissTab"),Zn("tabs",[]),yl("tabSectionBehaviours",[])]),GA=ql({factory:jA,schema:[zn("dom"),Wn("markers",[zn("tabClass"),zn("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),XA=ql({factory:UA,name:"tabview"}),YA=at([GA,XA]),qA=_f({name:"TabSection",configFields:WA(),partFields:YA(),factory:function(i,t,n,e){var o=function(t,n){sf(t,i,"tabbar").each(function(t){n(t).each(Uo)})};return{uid:i.uid,dom:i.dom,components:t,behaviours:xl(i.tabSectionBehaviours),events:Yo(ut([i.selectFirst?[or(function(t,n){o(t,jf.getFirst)})]:[],[Jo(Ho(),function(t,n){var o,r,e=n.event().button();o=e,r=bl.getValue(o),sf(o,i,"tabview").each(function(e){L(i.tabs,function(t){return t.value===r}).each(function(t){var n=t.view();Mr(o.element(),"id").each(function(t){Br(e.element(),"aria-labelledby",t)}),Nm.set(e,n),i.onChangeTab(e,o,n)})})}),Jo(Po(),function(t,n){var e=n.event().button();i.onDismissTab(t,e)})]])),apis:{getViewItems:function(t){return sf(t,i,"tabview").map(function(t){return Nm.contents(t)}).getOr([])},showTab:function(t,e){o(t,function(n){var t=jf.getCandidates(n);return L(t,function(t){return bl.getValue(t)===e}).filter(function(t){return!jf.isHighlighted(n,t)})})}}}},apis:{getViewItems:function(t,n){return t.getViewItems(n)},showTab:function(t,n,e){t.showTab(n,e)}}}),KA=function(t,n){Di(t,"height",n+"px"),Pe().browser.isIE()?Hi(t,"flex-basis"):Di(t,"flex-basis",n+"px")},JA=function(t,o,r){Du(t,'[role="dialog"]').each(function(e){Mu(e,'[role="tablist"]').each(function(n){r.get().map(function(t){return Di(o,"height","0"),Di(o,"flex-basis","0"),Math.min(t,function(t,n,e){var o,r=cr(t).dom(),i=Du(t,".tox-dialog-wrap").getOr(t);o="fixed"===Fi(i,"position")?Math.max(r.clientHeight,nt.window.innerHeight):Math.max(r.offsetHeight,r.scrollHeight);var u=tu(n),a=n.dom().offsetLeft>=e.dom().offsetLeft+cu(e)?Math.max(tu(e),u):u,c=parseInt(Fi(t,"margin-top"),10)||0,s=parseInt(Fi(t,"margin-bottom"),10)||0;return o-(tu(t)+c+s-a)}(e,o,n))}).each(function(t){KA(o,t)})})})},$A=function(t){return Mu(t,'[role="tabpanel"]')},QA=function(a){var c;return{smartTabHeight:(c=ce(st.none()),{extraEvents:[or(function(t){var e=t.element();$A(e).each(function(u){var n;Di(u,"visibility","hidden"),t.getSystem().getByDom(u).toOption().each(function(t){var o,r,i,n=(r=u,i=t,V(o=a,function(t,n){Nm.set(i,o[n].view());var e=r.dom().getBoundingClientRect();return Nm.set(i,[]),e.height})),e=K(q(n,function(t,n){return n<t?-1:t<n?1:0}));c.set(e)}),JA(e,u,c),Hi(u,"visibility"),n=t,K(a).each(function(t){return qA.showTab(n,t.value)}),Lg.requestAnimationFrame(function(){JA(e,u,c)})})}),Jo(Do(),function(t){var n=t.element();$A(n).each(function(t){JA(n,t,c)})}),Jo(Zb,function(t,n){var r=t.element();$A(r).each(function(n){var t=Ja();Di(n,"visibility","hidden");var e=Ri(n,"height").map(function(t){return parseInt(t,10)});Hi(n,"height"),Hi(n,"flex-basis");var o=n.dom().getBoundingClientRect().height;e.forall(function(t){return t<o})?(c.set(st.from(o)),JA(r,n,c)):e.each(function(t){KA(n,t)}),Hi(n,"visibility"),t.each(Ka)})})],selectFirst:!1}),naiveTabHeight:{extraEvents:[],selectFirst:!0}}},ZA="send-data-to-section",tF="send-data-to-view",nF=Nr("update-dialog"),eF=Nr("update-title"),oF=Nr("update-body"),rF=Nr("update-footer"),iF=Nr("body-send-message"),uF=function(t,n,d,e){return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:et(et({},n.map(function(t){return{id:t}}).getOr({})),e?{"aria-live":"polite"}:{})},components:[],behaviours:za([nS(0),cT.config({channel:oF,updateState:function(t,n){return st.some({isTabPanel:function(){return"tabpanel"===n.body.type}})},renderComponents:function(t){switch(t.body.type){case"tabpanel":return[(r=t.body,i=d,u=ce({}),a=function(t){var n=bl.getValue(t),e=HA(n).getOr({}),o=u.get(),r=Ct(o,e);u.set(r)},c=function(t){var n=u.get();bl.setValue(t,n)},s=ce(null),l=V(r.tabs,function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:i.shared.providers.translate(t.title)},view:function(){return[Gw.sketch(function(n){return{dom:{tag:"div",classes:["tox-form"]},components:V(t.items,function(t){return QC(n,t,i)}),formBehaviours:za([Rm.config({mode:"acyclic",useTabstopAt:x(yS)}),Lm("TabView.form.events",[or(c),rr(a)]),Ya.config({channels:Jt([{key:ZA,value:{onReceive:a}},{key:tF,value:{onReceive:c}}])})])}})]}}}),f=QA(l).smartTabHeight,qA.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(t,n,e){var o=bl.getValue(n);jo(t,Qb,{name:o,oldName:s.get()}),s.set(o)},tabs:l,components:[qA.parts().tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[jA.parts().tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:za([Dy.config({})])}),qA.parts().tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:f.selectFirst,tabSectionBehaviours:za([Lm("tabpanel",f.extraEvents),Rm.config({mode:"acyclic"}),Mf.config({find:function(t){return K(qA.getViewItems(t))}}),bl.config({store:{mode:"manual",getValue:function(t){return t.getSystem().broadcastOn([ZA],{}),u.get()},setValue:function(t,n){u.set(n),t.getSystem().broadcastOn([tF],{})}}})])}))];default:return[(e=t.body,o=d,{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[(n=Ug(Gw.sketch(function(n){return{dom:{tag:"div",classes:["tox-form"].concat(e.classes)},components:V(e.items,function(t){return QC(n,t,o)})}}))).asSpec()]}],behaviours:za([Rm.config({mode:"acyclic",useTabstopAt:x(yS)}),tS(n),cS(n,{postprocess:function(t){return HA(t).fold(function(t){return nt.console.error(t),{}},function(t){return t})}})])})]}var e,o,n,r,i,u,a,c,s,l,f},initialData:t})])}},aF=Xp.deviceType.isTouch(),cF=function(t,n){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[t,n]}},sF=function(t,n){return yM.parts().close(jg.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":n.translate("Close")}},action:t,buttonBehaviours:za([Dy.config({})])}))},lF=function(){return yM.parts().title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},fF=function(t,n){return yM.parts().body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:gB("<p>"+n.translate(t)+"</p>")}]}]})},dF=function(t){return yM.parts().footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})},mF=function(t,n){return[Ub.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),Ub.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:n})]},gF=function(n){var t,e="tox-dialog",o=e+"-wrap",r=o+"__backdrop",i=e+"__disable-scroll";return yM.sketch({lazySink:n.lazySink,onEscape:function(t){return n.onEscape(t),st.some(!0)},useTabstopAt:function(t){return!yS(t)},dom:{tag:"div",classes:[e].concat(n.extraClasses),styles:et({position:"relative"},n.extraStyles)},components:b([n.header,n.body],n.footer.toArray()),parts:{blocker:{dom:gB('<div class="'+o+'"></div>'),components:[{dom:{tag:"div",classes:aF?[r,r+"--opaque"]:[r]}}]}},dragBlockClass:o,modalBehaviours:za(b([Xm.config({}),Lm("dialog-events",n.dialogEvents.concat([er(io(),function(t,n){Rm.focusIn(t)})])),Lm("scroll-lock",[or(function(){bi(_i(),i)}),rr(function(){xi(_i(),i)})])],n.extraBehaviours)),eventOrder:et(((t={})[xo()]=["dialog-events"],t[Mo()]=["scroll-lock","dialog-events","alloy.base.behaviour"],t[Ao()]=["alloy.base.behaviour","dialog-events","scroll-lock"],t),n.eventOrder)})},pF=function(t){return jg.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),title:t.translate("Close")}},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:'<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path d="M17.953 7.453L13.422 12l4.531 4.547-1.406 1.406L12 13.422l-4.547 4.531-1.406-1.406L10.578 12 6.047 7.453l1.406-1.406L12 10.578l4.547-4.531z" fill-rule="evenodd"></path></svg>'}}],action:function(t){Lo(t,Yb)}})},hF=function(t,n,e){var o=function(t){return[Yi(e.translate(t.title))]};return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:et({},n.map(function(t){return{id:t}}).getOr({}))},components:o(t),behaviours:za([cT.config({channel:eF,renderComponents:o})])}},vF=function(){return{dom:gB('<div class="tox-dialog__draghandle"></div>')}},bF=function(t,n){return e={title:n.shared.providers.translate(t),draggable:n.dialog.isDraggableModal()},o=n.shared.providers,r=yM.parts().title(hF(e,st.none(),o)),i=yM.parts().draghandle(vF()),u=yM.parts().close(pF(o)),a=[r].concat(e.draggable?[i]:[]).concat([u]),Ub.sketch({dom:gB('<div class="tox-dialog__header"></div>'),components:a});var e,o,r,i,u,a},yF=function(t,n){return{onClose:function(){return n.closeWindow()},onBlock:function(e){yM.setBusy(t(),function(t,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":e.message()},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:n,components:[{dom:gB('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}})},onUnblock:function(){yM.setIdle(t())}}},xF=function(t,n,e,o){var r;return Ji(gF(et(et({},t),{lazySink:o.shared.getSink,extraBehaviours:b([cT.config({channel:nF,updateState:function(t,n){return st.some(n)},initialData:n}),fS({})],t.extraBehaviours),onEscape:function(t){Lo(t,Yb)},dialogEvents:e,eventOrder:((r={})[yo()]=["reflecting","receiving"],r[Mo()]=["scroll-lock","reflecting","messages","dialog-events","alloy.base.behaviour"],r[Ao()]=["alloy.base.behaviour","dialog-events","messages","reflecting","scroll-lock"],r)})))},wF=function(t){return V(t,function(t){return"menu"===t.type?(e=V((n=t).items,function(t){var n=ce(!1);return et(et({},t),{storage:n})}),et(et({},n),{items:e})):t;var n,e})},SF=function(t){return N(t,function(t,n){return"menu"!==n.type?t:N(n.items,function(t,n){return t[n.name]=n.storage,t},t)},{})},kF=function(t,e){return[tr(io(),bS),t(Xb,function(t,n){e.onClose(),n.onClose()}),t(Yb,function(t,n,e,o){n.onCancel(t),Lo(o,Xb)}),Jo($b,function(t,n){return e.onUnblock()}),Jo(Jb,function(t,n){return e.onBlock(n.event())})]},CF=function(i,t){var n=function(t,r){return Jo(t,function(e,o){u(e,function(t,n){r(i(),t,o.event(),e)})})},u=function(n,e){cT.getState(n).get().each(function(t){e(t,n)})};return b(kF(n,t),[n(qb,function(t,n,e){n.onAction(t,{name:e.name()})})])},OF=function(i,t,a){var n=function(t,r){return Jo(t,function(e,o){u(e,function(t,n){r(i(),t,o.event(),e)})})},u=function(n,e){cT.getState(n).get().each(function(t){e(t.internalDialog,n)})};return b(kF(n,t),[n(Kb,function(t,n){return n.onSubmit(t)}),n(Gb,function(t,n,e){n.onChange(t,{name:e.name()})}),n(qb,function(t,n,e,o){var r=function(){return Rm.focusIn(o)},i=function(t){return Ar(t,"disabled")||Mr(t,"aria-disabled").exists(function(t){return"true"===t})},u=Ja();n.onAction(t,{name:e.name(),value:e.value()}),Ja().fold(r,function(n){i(n)||u.exists(function(t){return Ue(n,t)&&i(t)})?r():a().toOption().filter(function(t){return!Ue(t.element(),n)}).each(r)})}),n(Qb,function(t,n,e){n.onTabChange(t,{newTabName:e.name(),oldTabName:e.oldName()})}),rr(function(t){var n=i();bl.setValue(t,n.getData())})])},_F=function(t,n){var e=n.map(function(t){return t.footerButtons}).getOr([]),o=H(e,function(t){return"start"===t.align}),r=function(t,n){return Ub.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:V(n,function(t){return t.memento.asSpec()})})};return[r("start",o.pass),r("end",o.fail)]},TF=function(t,i){return{dom:gB('<div class="tox-dialog__footer"></div>'),components:[],behaviours:za([cT.config({channel:rF,initialData:t,updateState:function(t,n){var r=V(n.buttons,function(t){var n,e,o=Ug((e=i,Nk(n=t,n.type,e)));return{name:t.name,align:t.align,memento:o}});return st.some({lookupByName:function(t,n){return e=t,o=n,L(r,function(t){return t.name===o}).bind(function(t){return t.memento.getOpt(e)});var e,o},footerButtons:r})},renderComponents:_F})])}},EF=function(t,n){return yM.parts().footer(TF(t,n))},BF=function(n,e){if(n.getRoot().getSystem().isConnected()){var o=Mf.getCurrent(n.getFormWrapper()).getOr(n.getFormWrapper());return Gw.getField(o,e).fold(function(){var t=n.getFooter();return cT.getState(t).get().bind(function(t){return t.lookupByName(o,e)})},function(t){return st.some(t)})}return st.none()},DF=function(c,o,s){var t=function(t){var n=c.getRoot();n.getSystem().isConnected()&&t(n)},l={getData:function(){var t=c.getRoot(),n=t.getSystem().isConnected()?c.getFormWrapper():t,e=bl.getValue(n),o=dt(s,function(t){return t.get()});return et(et({},e),o)},setData:function(a){t(function(t){var n,e,o=l.getData(),r=et(et({},o),a),i=(n=r,e=c.getRoot(),cT.getState(e).get().map(function(t){return On(Cn("data",t.dataValidator,n))}).getOr(n)),u=c.getFormWrapper();bl.setValue(u,i),ft(s,function(t,n){yt(r,n)&&t.set(r[n])})})},disable:function(t){BF(c,t).each(ph.disable)},enable:function(t){BF(c,t).each(ph.enable)},focus:function(t){BF(c,t).each(Xm.focus)},block:function(n){if(!S(n))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");t(function(t){jo(t,Jb,{message:n})})},unblock:function(){t(function(t){Lo(t,$b)})},showTab:function(e){t(function(t){var n=c.getBody();cT.getState(n).get().exists(function(t){return t.isTabPanel()})&&Mf.getCurrent(n).each(function(t){qA.showTab(t,e)})})},redial:function(e){t(function(t){var n=o(e);t.getSystem().broadcastOn([nF],n),t.getSystem().broadcastOn([eF],n.internalDialog),t.getSystem().broadcastOn([oF],n.internalDialog),t.getSystem().broadcastOn([rF],n.internalDialog),l.setData(n.initialData)})},close:function(){t(function(t){Lo(t,Xb)})}};return l},MF=function(t,n,e){var o,r,i,u=bF(t.internalDialog.title,e),a=(o={body:t.internalDialog.body},r=e,i=uF(o,st.none(),r,!1),yM.parts().body(i)),c=wF(t.internalDialog.buttons),s=SF(c),l=EF({buttons:c},e),f=OF(function(){return p},yF(function(){return g},n),e.shared.getSink),d="normal"!==t.internalDialog.size?"large"===t.internalDialog.size?["tox-dialog--width-lg"]:["tox-dialog--width-md"]:[],m={header:u,body:a,footer:st.some(l),extraClasses:d,extraBehaviours:[],extraStyles:{}},g=xF(m,t,f,e),p=DF({getRoot:function(){return g},getBody:function(){return yM.getBody(g)},getFooter:function(){return yM.getFooter(g)},getFormWrapper:function(){var t=yM.getBody(g);return Mf.getCurrent(t).getOr(t)}},n.redial,s);return{dialog:g,instanceApi:p}},AF=function(t,n,e,o){var r,i,u,a,c,s,l,f,d,m=Nr("dialog-label"),g=Nr("dialog-content"),p=Ug((u={title:t.internalDialog.title,draggable:!0},a=m,c=e.shared.providers,Ub.sketch({dom:gB('<div class="tox-dialog__header"></div>'),components:[hF(u,st.some(a),c),vF(),pF(c)],containerBehaviours:za([iM.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return Au(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))),h=Ug((s={body:t.internalDialog.body},l=g,f=e,d=o,uF(s,st.some(l),f,d))),v=wF(t.internalDialog.buttons),b=SF(v),y=Ug(TF({buttons:v},e)),x=OF(function(){return S},{onBlock:function(){},onUnblock:function(){},onClose:function(){return n.closeWindow()}},e.shared.getSink),w=Ji({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:((r={role:"dialog"})["aria-labelledby"]=m,r["aria-describedby"]=""+g,r)},eventOrder:((i={})[yo()]=[cT.name(),Ya.name()],i[xo()]=["execute-on-form"],i[Mo()]=["reflecting","execute-on-form"],i),behaviours:za([Rm.config({mode:"cyclic",onEscape:function(t){return Lo(t,Xb),st.some(!0)},useTabstopAt:function(t){return!yS(t)&&("button"!==Cr(t)||"disabled"!==Dr(t,"disabled"))}}),cT.config({channel:nF,updateState:function(t,n){return st.some(n)},initialData:t}),Xm.config({}),Lm("execute-on-form",x.concat([er(io(),function(t,n){Rm.focusIn(t)})])),fS({})]),components:[p.asSpec(),h.asSpec(),y.asSpec()]}),S=DF({getRoot:function(){return w},getFooter:function(){return y.get(w)},getBody:function(){return h.get(w)},getFormWrapper:function(){var t=h.get(w);return Mf.getCurrent(t).getOr(t)}},n.redial,b);return{dialog:w,instanceApi:S}},FF=tinymce.util.Tools.resolve("tinymce.util.URI"),IF=["insertContent","setContent","execCommand","close","block","unblock"],RF=function(t){return k(t)&&-1!==IF.indexOf(t.mceAction)},VF=function(o,t,r,n){var e,i,u,a,c=bF(o.title,n),s=(i={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[hS({dom:{tag:"iframe",attributes:{src:o.url}},behaviours:za([Dy.config({}),Xm.config({})])})]}],behaviours:za([Rm.config({mode:"acyclic",useTabstopAt:x(yS)})])},yM.parts().body(i)),l=o.buttons.bind(function(t){return 0===t.length?st.none():st.some(EF({buttons:t},n))}),f=CF(function(){return y},yF(function(){return b},t)),d=et(et({},o.height.fold(function(){return{}},function(t){return{height:t+"px","max-height":t+"px"}})),o.width.fold(function(){return{}},function(t){return{width:t+"px","max-width":t+"px"}})),m=o.width.isNone()&&o.height.isNone()?["tox-dialog--width-lg"]:[],g=new FF(o.url,{base_uri:new FF(nt.window.location.href)}),p=g.protocol+"://"+g.host+(g.port?":"+g.port:""),h=ce(st.none()),v=[Lm("messages",[or(function(){var t=yb(le.fromDom(nt.window),"message",function(t){if(g.isSameOrigin(new FF(t.raw().origin))){var n=t.raw().data;RF(n)?function(t,n,e){switch(e.mceAction){case"insertContent":t.insertContent(e.content);break;case"setContent":t.setContent(e.content);break;case"execCommand":var o=!!O(e.ui)&&e.ui;t.execCommand(e.cmd,o,e.value);break;case"close":n.close();break;case"block":n.block(e.message);break;case"unblock":n.unblock()}}(r,y,n):!RF(e=n)&&k(e)&&yt(e,"mceAction")&&o.onMessage(y,n)}var e});h.set(st.some(t))}),rr(function(){h.get().each(function(t){return t.unbind()})})]),Ya.config({channels:((e={})[iF]={onReceive:function(t,n){Mu(t.element(),"iframe").each(function(t){t.dom().contentWindow.postMessage(n,p)})}},e)})],b=xF({header:c,body:s,footer:l,extraClasses:m,extraBehaviours:v,extraStyles:d},o,f,n),y=(a=function(t){u.getSystem().isConnected()&&t(u)},{block:function(n){if(!S(n))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");a(function(t){jo(t,Jb,{message:n})})},unblock:function(){a(function(t){Lo(t,$b)})},close:function(){a(function(t){Lo(t,Xb)})},sendMessage:function(n){a(function(t){t.getSystem().broadcastOn([iF],n)})}});return{dialog:u=b,instanceApi:y}},HF=function(t){var c,s,l,f,p=t.backstage,h=t.editor,v=Ph(h),e=(s=(c=t).backstage.shared,{open:function(t,n){var e=function(){yM.hide(u),n()},o=Ug(Nk({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:st.none()},"cancel",c.backstage)),r=lF(),i=sF(e,s.providers),u=Ji(gF({lazySink:function(){return s.getSink()},header:cF(r,i),body:fF(t,s.providers),footer:st.some(dF(mF([],[o.asSpec()]))),onEscape:e,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Jo(Yb,e)],eventOrder:{}}));yM.show(u);var a=o.get(u);Xm.focus(a)}}),o=(f=(l=t).backstage.shared,{open:function(t,n){var e=function(t){yM.hide(a),n(t)},o=Ug(Nk({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:st.none()},"submit",l.backstage)),r=Nk({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:st.none()},"cancel",l.backstage),i=lF(),u=sF(function(){return e(!1)},f.providers),a=Ji(gF({lazySink:function(){return f.getSink()},header:cF(i,u),body:fF(t,f.providers),footer:st.some(dF(mF([],[r,o.asSpec()]))),onEscape:function(){return e(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Jo(Yb,function(){return e(!1)}),Jo(Kb,function(){return e(!0)})],eventOrder:{}}));yM.show(a);var c=o.get(a);Xm.focus(c)}}),r=function(t,e){return VA.openUrl(function(t){var n=VF(t,{closeWindow:function(){yM.hide(n.dialog),e(n.instanceApi)}},h,p);return yM.show(n.dialog),n.instanceApi},t)},i=function(t,i){return VA.open(function(t,n,e){var o=n,r=MF({dataValidator:e,initialData:o,internalDialog:t},{redial:VA.redial,closeWindow:function(){yM.hide(r.dialog),i(r.instanceApi)}},p);return yM.show(r.dialog),r.instanceApi.setData(o),r.instanceApi},t)},u=function(t,d,m,g){return VA.open(function(t,n,e){var o,r,i,u=On(Cn("data",e,n)),a=(o=ce(st.none()),{clear:function(){o.set(st.none())},set:function(t){o.set(st.some(t))},isSet:function(){return o.get().isSome()},on:function(t){o.get().each(t)}}),c=p.shared.header.isPositionedAtTop(),s=function(){return a.on(function(t){Bg.reposition(t),LE.refresh(t)})},l=AF({dataValidator:e,initialData:u,internalDialog:t},{redial:VA.redial,closeWindow:function(){a.on(Bg.hide),h.off("ResizeEditor",s),a.clear(),m(l.instanceApi)}},p,g),f=Ji(Bg.sketch(et(et({lazySink:p.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},c?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:za(b([Lm("window-manager-inline-events",[Jo(Fo(),function(t,n){Lo(l.dialog,Yb)})])],(r=h,i=c,v&&i?[]:[LE.config({contextual:{lazyContext:function(){return st.some(wu(le.fromDom(r.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]))),isExtraPart:function(t,n){return Sb(e=n,".tox-alert-dialog")||Sb(e,".tox-confirm-dialog");var e}})));return a.set(f),Bg.showWithin(f,d,$i(l.dialog),st.some(_i())),v&&c||(LE.refresh(f),h.on("ResizeEditor",s)),l.instanceApi.setData(u),Rm.focusIn(l.dialog),l.instanceApi},t)};return{open:function(t,n,e){return n!==undefined&&"toolbar"===n.inline?u(t,p.shared.anchors.inlineDialog(),e,n.ariaAttrs):n!==undefined&&"cursor"===n.inline?u(t,p.shared.anchors.cursor(),e,n.ariaAttrs):i(t,e)},openUrl:function(t,n){return r(t,n)},alert:function(t,n){e.open(t,function(){n()})},close:function(t){t.close()},confirm:function(t,n){o.open(t,function(t){n(t)})}}};!function XF(){t.add("silver",function(t){var n=pM(t),e=n.uiMothership,o=n.backstage,r=n.renderUI,i=n.getUi;vb(t,o.shared);var u=HF({editor:t,backstage:o});return{renderUI:r,getWindowManagerImpl:at(u),getNotificationManagerImpl:function(){return qg(0,{backstage:o},e)},ui:i()}})}()}(window);

--- /dev/null
+++ b/tinymce/5/js/tinymce/tinymce.js
@@ -1,1 +1,29027 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+(function (domGlobals) {
+    'use strict';
+
+    var typeOf = function (x) {
+      if (x === null) {
+        return 'null';
+      }
+      if (x === undefined) {
+        return 'undefined';
+      }
+      var t = typeof x;
+      if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      }
+      if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      }
+      return t;
+    };
+    var isEquatableType = function (x) {
+      return [
+        'undefined',
+        'boolean',
+        'number',
+        'string',
+        'function',
+        'xml',
+        'null'
+      ].indexOf(x) !== -1;
+    };
+
+    var sort = function (xs, compareFn) {
+      var clone = Array.prototype.slice.call(xs);
+      return clone.sort(compareFn);
+    };
+
+    var contramap = function (eqa, f) {
+      return eq(function (x, y) {
+        return eqa.eq(f(x), f(y));
+      });
+    };
+    var eq = function (f) {
+      return { eq: f };
+    };
+    var tripleEq = eq(function (x, y) {
+      return x === y;
+    });
+    var eqString = tripleEq;
+    var eqArray = function (eqa) {
+      return eq(function (x, y) {
+        if (x.length !== y.length) {
+          return false;
+        }
+        var len = x.length;
+        for (var i = 0; i < len; i++) {
+          if (!eqa.eq(x[i], y[i])) {
+            return false;
+          }
+        }
+        return true;
+      });
+    };
+    var eqSortedArray = function (eqa, compareFn) {
+      return contramap(eqArray(eqa), function (xs) {
+        return sort(xs, compareFn);
+      });
+    };
+    var eqRecord = function (eqa) {
+      return eq(function (x, y) {
+        var kx = Object.keys(x);
+        var ky = Object.keys(y);
+        if (!eqSortedArray(eqString).eq(kx, ky)) {
+          return false;
+        }
+        var len = kx.length;
+        for (var i = 0; i < len; i++) {
+          var q = kx[i];
+          if (!eqa.eq(x[q], y[q])) {
+            return false;
+          }
+        }
+        return true;
+      });
+    };
+    var eqAny = eq(function (x, y) {
+      if (x === y) {
+        return true;
+      }
+      var tx = typeOf(x);
+      var ty = typeOf(y);
+      if (tx !== ty) {
+        return false;
+      }
+      if (isEquatableType(tx)) {
+        return x === y;
+      } else if (tx === 'array') {
+        return eqArray(eqAny).eq(x, y);
+      } else if (tx === 'object') {
+        return eqRecord(eqAny).eq(x, y);
+      }
+      return false;
+    });
+
+    var noop = function () {
+    };
+    var compose = function (fa, fb) {
+      return function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        return fa(fb.apply(null, args));
+      };
+    };
+    var constant = function (value) {
+      return function () {
+        return value;
+      };
+    };
+    var identity = function (x) {
+      return x;
+    };
+    function curry(fn) {
+      var initialArgs = [];
+      for (var _i = 1; _i < arguments.length; _i++) {
+        initialArgs[_i - 1] = arguments[_i];
+      }
+      return function () {
+        var restArgs = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          restArgs[_i] = arguments[_i];
+        }
+        var all = initialArgs.concat(restArgs);
+        return fn.apply(null, all);
+      };
+    }
+    var not = function (f) {
+      return function (t) {
+        return !f(t);
+      };
+    };
+    var die = function (msg) {
+      return function () {
+        throw new Error(msg);
+      };
+    };
+    var never = constant(false);
+    var always = constant(true);
+
+    var none = function () {
+      return NONE;
+    };
+    var NONE = function () {
+      var eq = function (o) {
+        return o.isNone();
+      };
+      var call = function (thunk) {
+        return thunk();
+      };
+      var id = function (n) {
+        return n;
+      };
+      var me = {
+        fold: function (n, _s) {
+          return n();
+        },
+        is: never,
+        isSome: never,
+        isNone: always,
+        getOr: id,
+        getOrThunk: call,
+        getOrDie: function (msg) {
+          throw new Error(msg || 'error: getOrDie called on none.');
+        },
+        getOrNull: constant(null),
+        getOrUndefined: constant(undefined),
+        or: id,
+        orThunk: call,
+        map: none,
+        each: noop,
+        bind: none,
+        exists: never,
+        forall: always,
+        filter: none,
+        equals: eq,
+        equals_: eq,
+        toArray: function () {
+          return [];
+        },
+        toString: constant('none()')
+      };
+      return me;
+    }();
+    var some = function (a) {
+      var constant_a = constant(a);
+      var self = function () {
+        return me;
+      };
+      var bind = function (f) {
+        return f(a);
+      };
+      var me = {
+        fold: function (n, s) {
+          return s(a);
+        },
+        is: function (v) {
+          return a === v;
+        },
+        isSome: always,
+        isNone: never,
+        getOr: constant_a,
+        getOrThunk: constant_a,
+        getOrDie: constant_a,
+        getOrNull: constant_a,
+        getOrUndefined: constant_a,
+        or: self,
+        orThunk: self,
+        map: function (f) {
+          return some(f(a));
+        },
+        each: function (f) {
+          f(a);
+        },
+        bind: bind,
+        exists: bind,
+        forall: bind,
+        filter: function (f) {
+          return f(a) ? me : NONE;
+        },
+        toArray: function () {
+          return [a];
+        },
+        toString: function () {
+          return 'some(' + a + ')';
+        },
+        equals: function (o) {
+          return o.is(a);
+        },
+        equals_: function (o, elementEq) {
+          return o.fold(never, function (b) {
+            return elementEq(a, b);
+          });
+        }
+      };
+      return me;
+    };
+    var from = function (value) {
+      return value === null || value === undefined ? NONE : some(value);
+    };
+    var Option = {
+      some: some,
+      none: none,
+      from: from
+    };
+
+    var typeOf$1 = function (x) {
+      var t = typeof x;
+      if (x === null) {
+        return 'null';
+      } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
+        return 'array';
+      } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
+        return 'string';
+      } else {
+        return t;
+      }
+    };
+    var isType = function (type) {
+      return function (value) {
+        return typeOf$1(value) === type;
+      };
+    };
+    var isSimpleType = function (type) {
+      return function (value) {
+        return typeof value === type;
+      };
+    };
+    var eq$1 = function (t) {
+      return function (a) {
+        return t === a;
+      };
+    };
+    var isString = isType('string');
+    var isObject = isType('object');
+    var isArray = isType('array');
+    var isNull = eq$1(null);
+    var isBoolean = isSimpleType('boolean');
+    var isUndefined = eq$1(undefined);
+    var isFunction = isSimpleType('function');
+    var isNumber = isSimpleType('number');
+
+    var nativeSlice = Array.prototype.slice;
+    var nativeIndexOf = Array.prototype.indexOf;
+    var nativePush = Array.prototype.push;
+    var rawIndexOf = function (ts, t) {
+      return nativeIndexOf.call(ts, t);
+    };
+    var indexOf = function (xs, x) {
+      var r = rawIndexOf(xs, x);
+      return r === -1 ? Option.none() : Option.some(r);
+    };
+    var contains = function (xs, x) {
+      return rawIndexOf(xs, x) > -1;
+    };
+    var exists = function (xs, pred) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return true;
+        }
+      }
+      return false;
+    };
+    var map = function (xs, f) {
+      var len = xs.length;
+      var r = new Array(len);
+      for (var i = 0; i < len; i++) {
+        var x = xs[i];
+        r[i] = f(x, i);
+      }
+      return r;
+    };
+    var each = function (xs, f) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var eachr = function (xs, f) {
+      for (var i = xs.length - 1; i >= 0; i--) {
+        var x = xs[i];
+        f(x, i);
+      }
+    };
+    var partition = function (xs, pred) {
+      var pass = [];
+      var fail = [];
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        var arr = pred(x, i) ? pass : fail;
+        arr.push(x);
+      }
+      return {
+        pass: pass,
+        fail: fail
+      };
+    };
+    var filter = function (xs, pred) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          r.push(x);
+        }
+      }
+      return r;
+    };
+    var foldr = function (xs, f, acc) {
+      eachr(xs, function (x) {
+        acc = f(acc, x);
+      });
+      return acc;
+    };
+    var foldl = function (xs, f, acc) {
+      each(xs, function (x) {
+        acc = f(acc, x);
+      });
+      return acc;
+    };
+    var findUntil = function (xs, pred, until) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return Option.some(x);
+        } else if (until(x, i)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var find = function (xs, pred) {
+      return findUntil(xs, pred, never);
+    };
+    var findIndex = function (xs, pred) {
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        if (pred(x, i)) {
+          return Option.some(i);
+        }
+      }
+      return Option.none();
+    };
+    var flatten = function (xs) {
+      var r = [];
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        if (!isArray(xs[i])) {
+          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
+        }
+        nativePush.apply(r, xs[i]);
+      }
+      return r;
+    };
+    var bind = function (xs, f) {
+      return flatten(map(xs, f));
+    };
+    var forall = function (xs, pred) {
+      for (var i = 0, len = xs.length; i < len; ++i) {
+        var x = xs[i];
+        if (pred(x, i) !== true) {
+          return false;
+        }
+      }
+      return true;
+    };
+    var reverse = function (xs) {
+      var r = nativeSlice.call(xs, 0);
+      r.reverse();
+      return r;
+    };
+    var difference = function (a1, a2) {
+      return filter(a1, function (x) {
+        return !contains(a2, x);
+      });
+    };
+    var mapToObject = function (xs, f) {
+      var r = {};
+      for (var i = 0, len = xs.length; i < len; i++) {
+        var x = xs[i];
+        r[String(x)] = f(x, i);
+      }
+      return r;
+    };
+    var sort$1 = function (xs, comparator) {
+      var copy = nativeSlice.call(xs, 0);
+      copy.sort(comparator);
+      return copy;
+    };
+    var head = function (xs) {
+      return xs.length === 0 ? Option.none() : Option.some(xs[0]);
+    };
+    var last = function (xs) {
+      return xs.length === 0 ? Option.none() : Option.some(xs[xs.length - 1]);
+    };
+    var from$1 = isFunction(Array.from) ? Array.from : function (x) {
+      return nativeSlice.call(x);
+    };
+
+    var keys = Object.keys;
+    var hasOwnProperty = Object.hasOwnProperty;
+    var each$1 = function (obj, f) {
+      var props = keys(obj);
+      for (var k = 0, len = props.length; k < len; k++) {
+        var i = props[k];
+        var x = obj[i];
+        f(x, i);
+      }
+    };
+    var map$1 = function (obj, f) {
+      return tupleMap(obj, function (x, i) {
+        return {
+          k: i,
+          v: f(x, i)
+        };
+      });
+    };
+    var tupleMap = function (obj, f) {
+      var r = {};
+      each$1(obj, function (x, i) {
+        var tuple = f(x, i);
+        r[tuple.k] = tuple.v;
+      });
+      return r;
+    };
+    var objAcc = function (r) {
+      return function (x, i) {
+        r[i] = x;
+      };
+    };
+    var internalFilter = function (obj, pred, onTrue, onFalse) {
+      var r = {};
+      each$1(obj, function (x, i) {
+        (pred(x, i) ? onTrue : onFalse)(x, i);
+      });
+      return r;
+    };
+    var bifilter = function (obj, pred) {
+      var t = {};
+      var f = {};
+      internalFilter(obj, pred, objAcc(t), objAcc(f));
+      return {
+        t: t,
+        f: f
+      };
+    };
+    var filter$1 = function (obj, pred) {
+      var t = {};
+      internalFilter(obj, pred, objAcc(t), noop);
+      return t;
+    };
+    var mapToArray = function (obj, f) {
+      var r = [];
+      each$1(obj, function (value, name) {
+        r.push(f(value, name));
+      });
+      return r;
+    };
+    var values = function (obj) {
+      return mapToArray(obj, function (v) {
+        return v;
+      });
+    };
+    var get = function (obj, key) {
+      return has(obj, key) ? Option.from(obj[key]) : Option.none();
+    };
+    var has = function (obj, key) {
+      return hasOwnProperty.call(obj, key);
+    };
+    var equal = function (a1, a2, eq) {
+      if (eq === void 0) {
+        eq = eqAny;
+      }
+      return eqRecord(eq).eq(a1, a2);
+    };
+
+    var __assign = function () {
+      __assign = Object.assign || function __assign(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+          s = arguments[i];
+          for (var p in s)
+            if (Object.prototype.hasOwnProperty.call(s, p))
+              t[p] = s[p];
+        }
+        return t;
+      };
+      return __assign.apply(this, arguments);
+    };
+    function __rest(s, e) {
+      var t = {};
+      for (var p in s)
+        if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+          t[p] = s[p];
+      if (s != null && typeof Object.getOwnPropertySymbols === 'function')
+        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+          if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+            t[p[i]] = s[p[i]];
+        }
+      return t;
+    }
+    function __spreadArrays() {
+      for (var s = 0, i = 0, il = arguments.length; i < il; i++)
+        s += arguments[i].length;
+      for (var r = Array(s), k = 0, i = 0; i < il; i++)
+        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
+          r[k] = a[j];
+      return r;
+    }
+
+    var fromHtml = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      if (!div.hasChildNodes() || div.childNodes.length > 1) {
+        domGlobals.console.error('HTML does not have a single root node', html);
+        throw new Error('HTML must have a single root node');
+      }
+      return fromDom(div.childNodes[0]);
+    };
+    var fromTag = function (tag, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createElement(tag);
+      return fromDom(node);
+    };
+    var fromText = function (text, scope) {
+      var doc = scope || domGlobals.document;
+      var node = doc.createTextNode(text);
+      return fromDom(node);
+    };
+    var fromDom = function (node) {
+      if (node === null || node === undefined) {
+        throw new Error('Node cannot be null or undefined');
+      }
+      return { dom: constant(node) };
+    };
+    var fromPoint = function (docElm, x, y) {
+      var doc = docElm.dom();
+      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
+    };
+    var Element = {
+      fromHtml: fromHtml,
+      fromTag: fromTag,
+      fromText: fromText,
+      fromDom: fromDom,
+      fromPoint: fromPoint
+    };
+
+    var cached = function (f) {
+      var called = false;
+      var r;
+      return function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (!called) {
+          called = true;
+          r = f.apply(null, args);
+        }
+        return r;
+      };
+    };
+
+    var firstMatch = function (regexes, s) {
+      for (var i = 0; i < regexes.length; i++) {
+        var x = regexes[i];
+        if (x.test(s)) {
+          return x;
+        }
+      }
+      return undefined;
+    };
+    var find$1 = function (regexes, agent) {
+      var r = firstMatch(regexes, agent);
+      if (!r) {
+        return {
+          major: 0,
+          minor: 0
+        };
+      }
+      var group = function (i) {
+        return Number(agent.replace(r, '$' + i));
+      };
+      return nu(group(1), group(2));
+    };
+    var detect = function (versionRegexes, agent) {
+      var cleanedAgent = String(agent).toLowerCase();
+      if (versionRegexes.length === 0) {
+        return unknown();
+      }
+      return find$1(versionRegexes, cleanedAgent);
+    };
+    var unknown = function () {
+      return nu(0, 0);
+    };
+    var nu = function (major, minor) {
+      return {
+        major: major,
+        minor: minor
+      };
+    };
+    var Version = {
+      nu: nu,
+      detect: detect,
+      unknown: unknown
+    };
+
+    var edge = 'Edge';
+    var chrome = 'Chrome';
+    var ie = 'IE';
+    var opera = 'Opera';
+    var firefox = 'Firefox';
+    var safari = 'Safari';
+    var unknown$1 = function () {
+      return nu$1({
+        current: undefined,
+        version: Version.unknown()
+      });
+    };
+    var nu$1 = function (info) {
+      var current = info.current;
+      var version = info.version;
+      var isBrowser = function (name) {
+        return function () {
+          return current === name;
+        };
+      };
+      return {
+        current: current,
+        version: version,
+        isEdge: isBrowser(edge),
+        isChrome: isBrowser(chrome),
+        isIE: isBrowser(ie),
+        isOpera: isBrowser(opera),
+        isFirefox: isBrowser(firefox),
+        isSafari: isBrowser(safari)
+      };
+    };
+    var Browser = {
+      unknown: unknown$1,
+      nu: nu$1,
+      edge: constant(edge),
+      chrome: constant(chrome),
+      ie: constant(ie),
+      opera: constant(opera),
+      firefox: constant(firefox),
+      safari: constant(safari)
+    };
+
+    var windows = 'Windows';
+    var ios = 'iOS';
+    var android = 'Android';
+    var linux = 'Linux';
+    var osx = 'OSX';
+    var solaris = 'Solaris';
+    var freebsd = 'FreeBSD';
+    var chromeos = 'ChromeOS';
+    var unknown$2 = function () {
+      return nu$2({
+        current: undefined,
+        version: Version.unknown()
+      });
+    };
+    var nu$2 = function (info) {
+      var current = info.current;
+      var version = info.version;
+      var isOS = function (name) {
+        return function () {
+          return current === name;
+        };
+      };
+      return {
+        current: current,
+        version: version,
+        isWindows: isOS(windows),
+        isiOS: isOS(ios),
+        isAndroid: isOS(android),
+        isOSX: isOS(osx),
+        isLinux: isOS(linux),
+        isSolaris: isOS(solaris),
+        isFreeBSD: isOS(freebsd),
+        isChromeOS: isOS(chromeos)
+      };
+    };
+    var OperatingSystem = {
+      unknown: unknown$2,
+      nu: nu$2,
+      windows: constant(windows),
+      ios: constant(ios),
+      android: constant(android),
+      linux: constant(linux),
+      osx: constant(osx),
+      solaris: constant(solaris),
+      freebsd: constant(freebsd),
+      chromeos: constant(chromeos)
+    };
+
+    var DeviceType = function (os, browser, userAgent, mediaMatch) {
+      var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
+      var isiPhone = os.isiOS() && !isiPad;
+      var isMobile = os.isiOS() || os.isAndroid();
+      var isTouch = isMobile || mediaMatch('(pointer:coarse)');
+      var isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');
+      var isPhone = isiPhone || isMobile && !isTablet;
+      var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
+      var isDesktop = !isPhone && !isTablet && !iOSwebview;
+      return {
+        isiPad: constant(isiPad),
+        isiPhone: constant(isiPhone),
+        isTablet: constant(isTablet),
+        isPhone: constant(isPhone),
+        isTouch: constant(isTouch),
+        isAndroid: os.isAndroid,
+        isiOS: os.isiOS,
+        isWebView: constant(iOSwebview),
+        isDesktop: constant(isDesktop)
+      };
+    };
+
+    var detect$1 = function (candidates, userAgent) {
+      var agent = String(userAgent).toLowerCase();
+      return find(candidates, function (candidate) {
+        return candidate.search(agent);
+      });
+    };
+    var detectBrowser = function (browsers, userAgent) {
+      return detect$1(browsers, userAgent).map(function (browser) {
+        var version = Version.detect(browser.versionRegexes, userAgent);
+        return {
+          current: browser.name,
+          version: version
+        };
+      });
+    };
+    var detectOs = function (oses, userAgent) {
+      return detect$1(oses, userAgent).map(function (os) {
+        var version = Version.detect(os.versionRegexes, userAgent);
+        return {
+          current: os.name,
+          version: version
+        };
+      });
+    };
+    var UaString = {
+      detectBrowser: detectBrowser,
+      detectOs: detectOs
+    };
+
+    var checkRange = function (str, substr, start) {
+      return substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
+    };
+    var contains$1 = function (str, substr) {
+      return str.indexOf(substr) !== -1;
+    };
+    var startsWith = function (str, prefix) {
+      return checkRange(str, prefix, 0);
+    };
+    var blank = function (r) {
+      return function (s) {
+        return s.replace(r, '');
+      };
+    };
+    var trim = blank(/^\s+|\s+$/g);
+    var lTrim = blank(/^\s+/g);
+    var rTrim = blank(/\s+$/g);
+
+    var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
+    var checkContains = function (target) {
+      return function (uastring) {
+        return contains$1(uastring, target);
+      };
+    };
+    var browsers = [
+      {
+        name: 'Edge',
+        versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
+        search: function (uastring) {
+          return contains$1(uastring, 'edge/') && contains$1(uastring, 'chrome') && contains$1(uastring, 'safari') && contains$1(uastring, 'applewebkit');
+        }
+      },
+      {
+        name: 'Chrome',
+        versionRegexes: [
+          /.*?chrome\/([0-9]+)\.([0-9]+).*/,
+          normalVersionRegex
+        ],
+        search: function (uastring) {
+          return contains$1(uastring, 'chrome') && !contains$1(uastring, 'chromeframe');
+        }
+      },
+      {
+        name: 'IE',
+        versionRegexes: [
+          /.*?msie\ ?([0-9]+)\.([0-9]+).*/,
+          /.*?rv:([0-9]+)\.([0-9]+).*/
+        ],
+        search: function (uastring) {
+          return contains$1(uastring, 'msie') || contains$1(uastring, 'trident');
+        }
+      },
+      {
+        name: 'Opera',
+        versionRegexes: [
+          normalVersionRegex,
+          /.*?opera\/([0-9]+)\.([0-9]+).*/
+        ],
+        search: checkContains('opera')
+      },
+      {
+        name: 'Firefox',
+        versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
+        search: checkContains('firefox')
+      },
+      {
+        name: 'Safari',
+        versionRegexes: [
+          normalVersionRegex,
+          /.*?cpu os ([0-9]+)_([0-9]+).*/
+        ],
+        search: function (uastring) {
+          return (contains$1(uastring, 'safari') || contains$1(uastring, 'mobile/')) && contains$1(uastring, 'applewebkit');
+        }
+      }
+    ];
+    var oses = [
+      {
+        name: 'Windows',
+        search: checkContains('win'),
+        versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
+      },
+      {
+        name: 'iOS',
+        search: function (uastring) {
+          return contains$1(uastring, 'iphone') || contains$1(uastring, 'ipad');
+        },
+        versionRegexes: [
+          /.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
+          /.*cpu os ([0-9]+)_([0-9]+).*/,
+          /.*cpu iphone os ([0-9]+)_([0-9]+).*/
+        ]
+      },
+      {
+        name: 'Android',
+        search: checkContains('android'),
+        versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
+      },
+      {
+        name: 'OSX',
+        search: checkContains('mac os x'),
+        versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]
+      },
+      {
+        name: 'Linux',
+        search: checkContains('linux'),
+        versionRegexes: []
+      },
+      {
+        name: 'Solaris',
+        search: checkContains('sunos'),
+        versionRegexes: []
+      },
+      {
+        name: 'FreeBSD',
+        search: checkContains('freebsd'),
+        versionRegexes: []
+      },
+      {
+        name: 'ChromeOS',
+        search: checkContains('cros'),
+        versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/]
+      }
+    ];
+    var PlatformInfo = {
+      browsers: constant(browsers),
+      oses: constant(oses)
+    };
+
+    var detect$2 = function (userAgent, mediaMatch) {
+      var browsers = PlatformInfo.browsers();
+      var oses = PlatformInfo.oses();
+      var browser = UaString.detectBrowser(browsers, userAgent).fold(Browser.unknown, Browser.nu);
+      var os = UaString.detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
+      var deviceType = DeviceType(os, browser, userAgent, mediaMatch);
+      return {
+        browser: browser,
+        os: os,
+        deviceType: deviceType
+      };
+    };
+    var PlatformDetection = { detect: detect$2 };
+
+    var mediaMatch = function (query) {
+      return domGlobals.window.matchMedia(query).matches;
+    };
+    var platform = cached(function () {
+      return PlatformDetection.detect(domGlobals.navigator.userAgent, mediaMatch);
+    });
+    var detect$3 = function () {
+      return platform();
+    };
+
+    var toArray = function (target, f) {
+      var r = [];
+      var recurse = function (e) {
+        r.push(e);
+        return f(e);
+      };
+      var cur = f(target);
+      do {
+        cur = cur.bind(recurse);
+      } while (cur.isSome());
+      return r;
+    };
+
+    var compareDocumentPosition = function (a, b, match) {
+      return (a.compareDocumentPosition(b) & match) !== 0;
+    };
+    var documentPositionContainedBy = function (a, b) {
+      return compareDocumentPosition(a, b, domGlobals.Node.DOCUMENT_POSITION_CONTAINED_BY);
+    };
+
+    var COMMENT = 8;
+    var DOCUMENT = 9;
+    var ELEMENT = 1;
+    var TEXT = 3;
+
+    var ELEMENT$1 = ELEMENT;
+    var DOCUMENT$1 = DOCUMENT;
+    var is = function (element, selector) {
+      var dom = element.dom();
+      if (dom.nodeType !== ELEMENT$1) {
+        return false;
+      } else {
+        var elem = dom;
+        if (elem.matches !== undefined) {
+          return elem.matches(selector);
+        } else if (elem.msMatchesSelector !== undefined) {
+          return elem.msMatchesSelector(selector);
+        } else if (elem.webkitMatchesSelector !== undefined) {
+          return elem.webkitMatchesSelector(selector);
+        } else if (elem.mozMatchesSelector !== undefined) {
+          return elem.mozMatchesSelector(selector);
+        } else {
+          throw new Error('Browser lacks native selectors');
+        }
+      }
+    };
+    var bypassSelector = function (dom) {
+      return dom.nodeType !== ELEMENT$1 && dom.nodeType !== DOCUMENT$1 || dom.childElementCount === 0;
+    };
+    var all = function (selector, scope) {
+      var base = scope === undefined ? domGlobals.document : scope.dom();
+      return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), Element.fromDom);
+    };
+    var one = function (selector, scope) {
+      var base = scope === undefined ? domGlobals.document : scope.dom();
+      return bypassSelector(base) ? Option.none() : Option.from(base.querySelector(selector)).map(Element.fromDom);
+    };
+
+    var eq$2 = function (e1, e2) {
+      return e1.dom() === e2.dom();
+    };
+    var regularContains = function (e1, e2) {
+      var d1 = e1.dom();
+      var d2 = e2.dom();
+      return d1 === d2 ? false : d1.contains(d2);
+    };
+    var ieContains = function (e1, e2) {
+      return documentPositionContainedBy(e1.dom(), e2.dom());
+    };
+    var contains$2 = function (e1, e2) {
+      return detect$3().browser.isIE() ? ieContains(e1, e2) : regularContains(e1, e2);
+    };
+
+    var owner = function (element) {
+      return Element.fromDom(element.dom().ownerDocument);
+    };
+    var documentElement = function (element) {
+      return Element.fromDom(element.dom().ownerDocument.documentElement);
+    };
+    var defaultView = function (element) {
+      return Element.fromDom(element.dom().ownerDocument.defaultView);
+    };
+    var parent = function (element) {
+      return Option.from(element.dom().parentNode).map(Element.fromDom);
+    };
+    var parents = function (element, isRoot) {
+      var stop = isFunction(isRoot) ? isRoot : never;
+      var dom = element.dom();
+      var ret = [];
+      while (dom.parentNode !== null && dom.parentNode !== undefined) {
+        var rawParent = dom.parentNode;
+        var p = Element.fromDom(rawParent);
+        ret.push(p);
+        if (stop(p) === true) {
+          break;
+        } else {
+          dom = rawParent;
+        }
+      }
+      return ret;
+    };
+    var siblings = function (element) {
+      var filterSelf = function (elements) {
+        return filter(elements, function (x) {
+          return !eq$2(element, x);
+        });
+      };
+      return parent(element).map(children).map(filterSelf).getOr([]);
+    };
+    var prevSibling = function (element) {
+      return Option.from(element.dom().previousSibling).map(Element.fromDom);
+    };
+    var nextSibling = function (element) {
+      return Option.from(element.dom().nextSibling).map(Element.fromDom);
+    };
+    var prevSiblings = function (element) {
+      return reverse(toArray(element, prevSibling));
+    };
+    var nextSiblings = function (element) {
+      return toArray(element, nextSibling);
+    };
+    var children = function (element) {
+      return map(element.dom().childNodes, Element.fromDom);
+    };
+    var child = function (element, index) {
+      var cs = element.dom().childNodes;
+      return Option.from(cs[index]).map(Element.fromDom);
+    };
+    var firstChild = function (element) {
+      return child(element, 0);
+    };
+    var lastChild = function (element) {
+      return child(element, element.dom().childNodes.length - 1);
+    };
+    var childNodesCount = function (element) {
+      return element.dom().childNodes.length;
+    };
+
+    var before = function (marker, element) {
+      var parent$1 = parent(marker);
+      parent$1.each(function (v) {
+        v.dom().insertBefore(element.dom(), marker.dom());
+      });
+    };
+    var after = function (marker, element) {
+      var sibling = nextSibling(marker);
+      sibling.fold(function () {
+        var parent$1 = parent(marker);
+        parent$1.each(function (v) {
+          append(v, element);
+        });
+      }, function (v) {
+        before(v, element);
+      });
+    };
+    var prepend = function (parent, element) {
+      var firstChild$1 = firstChild(parent);
+      firstChild$1.fold(function () {
+        append(parent, element);
+      }, function (v) {
+        parent.dom().insertBefore(element.dom(), v.dom());
+      });
+    };
+    var append = function (parent, element) {
+      parent.dom().appendChild(element.dom());
+    };
+    var wrap = function (element, wrapper) {
+      before(element, wrapper);
+      append(wrapper, element);
+    };
+
+    var before$1 = function (marker, elements) {
+      each(elements, function (x) {
+        before(marker, x);
+      });
+    };
+    var append$1 = function (parent, elements) {
+      each(elements, function (x) {
+        append(parent, x);
+      });
+    };
+
+    var empty = function (element) {
+      element.dom().textContent = '';
+      each(children(element), function (rogue) {
+        remove(rogue);
+      });
+    };
+    var remove = function (element) {
+      var dom = element.dom();
+      if (dom.parentNode !== null) {
+        dom.parentNode.removeChild(dom);
+      }
+    };
+    var unwrap = function (wrapper) {
+      var children$1 = children(wrapper);
+      if (children$1.length > 0) {
+        before$1(wrapper, children$1);
+      }
+      remove(wrapper);
+    };
+
+    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
+
+    var name = function (element) {
+      var r = element.dom().nodeName;
+      return r.toLowerCase();
+    };
+    var type = function (element) {
+      return element.dom().nodeType;
+    };
+    var isType$1 = function (t) {
+      return function (element) {
+        return type(element) === t;
+      };
+    };
+    var isComment = function (element) {
+      return type(element) === COMMENT || name(element) === '#comment';
+    };
+    var isElement = isType$1(ELEMENT);
+    var isText = isType$1(TEXT);
+
+    var inBody = function (element) {
+      var dom = isText(element) ? element.dom().parentNode : element.dom();
+      return dom !== undefined && dom !== null && dom.ownerDocument.body.contains(dom);
+    };
+
+    var r = function (left, top) {
+      var translate = function (x, y) {
+        return r(left + x, top + y);
+      };
+      return {
+        left: constant(left),
+        top: constant(top),
+        translate: translate
+      };
+    };
+    var Position = r;
+
+    var boxPosition = function (dom) {
+      var box = dom.getBoundingClientRect();
+      return Position(box.left, box.top);
+    };
+    var firstDefinedOrZero = function (a, b) {
+      if (a !== undefined) {
+        return a;
+      } else {
+        return b !== undefined ? b : 0;
+      }
+    };
+    var absolute = function (element) {
+      var doc = element.dom().ownerDocument;
+      var body = doc.body;
+      var win = doc.defaultView;
+      var html = doc.documentElement;
+      if (body === element.dom()) {
+        return Position(body.offsetLeft, body.offsetTop);
+      }
+      var scrollTop = firstDefinedOrZero(win.pageYOffset, html.scrollTop);
+      var scrollLeft = firstDefinedOrZero(win.pageXOffset, html.scrollLeft);
+      var clientTop = firstDefinedOrZero(html.clientTop, body.clientTop);
+      var clientLeft = firstDefinedOrZero(html.clientLeft, body.clientLeft);
+      return viewport(element).translate(scrollLeft - clientLeft, scrollTop - clientTop);
+    };
+    var viewport = function (element) {
+      var dom = element.dom();
+      var doc = dom.ownerDocument;
+      var body = doc.body;
+      if (body === dom) {
+        return Position(body.offsetLeft, body.offsetTop);
+      }
+      if (!inBody(element)) {
+        return Position(0, 0);
+      }
+      return boxPosition(dom);
+    };
+
+    var get$1 = function (_DOC) {
+      var doc = _DOC !== undefined ? _DOC.dom() : domGlobals.document;
+      var x = doc.body.scrollLeft || doc.documentElement.scrollLeft;
+      var y = doc.body.scrollTop || doc.documentElement.scrollTop;
+      return Position(x, y);
+    };
+    var to = function (x, y, _DOC) {
+      var doc = _DOC !== undefined ? _DOC.dom() : domGlobals.document;
+      var win = doc.defaultView;
+      win.scrollTo(x, y);
+    };
+    var intoView = function (element, alignToTop) {
+      var isSafari = detect$3().browser.isSafari();
+      if (isSafari && isFunction(element.dom().scrollIntoViewIfNeeded)) {
+        element.dom().scrollIntoViewIfNeeded(false);
+      } else {
+        element.dom().scrollIntoView(alignToTop);
+      }
+    };
+
+    var get$2 = function (_win) {
+      var win = _win === undefined ? domGlobals.window : _win;
+      return Option.from(win['visualViewport']);
+    };
+    var bounds = function (x, y, width, height) {
+      return {
+        x: x,
+        y: y,
+        width: width,
+        height: height,
+        right: x + width,
+        bottom: y + height
+      };
+    };
+    var getBounds = function (_win) {
+      var win = _win === undefined ? domGlobals.window : _win;
+      var doc = win.document;
+      var scroll = get$1(Element.fromDom(doc));
+      return get$2(win).fold(function () {
+        var html = win.document.documentElement;
+        var width = html.clientWidth;
+        var height = html.clientHeight;
+        return bounds(scroll.left(), scroll.top(), width, height);
+      }, function (visualViewport) {
+        return bounds(Math.max(visualViewport.pageLeft, scroll.left()), Math.max(visualViewport.pageTop, scroll.top()), visualViewport.width, visualViewport.height);
+      });
+    };
+
+    var isNodeType = function (type) {
+      return function (node) {
+        return !!node && node.nodeType === type;
+      };
+    };
+    var isRestrictedNode = function (node) {
+      return !!node && !Object.getPrototypeOf(node);
+    };
+    var isElement$1 = isNodeType(1);
+    var matchNodeNames = function (names) {
+      var lowercasedNames = names.map(function (s) {
+        return s.toLowerCase();
+      });
+      return function (node) {
+        if (node && node.nodeName) {
+          var nodeName = node.nodeName.toLowerCase();
+          return contains(lowercasedNames, nodeName);
+        }
+        return false;
+      };
+    };
+    var matchStyleValues = function (name, values) {
+      var items = values.toLowerCase().split(' ');
+      return function (node) {
+        var i, cssValue;
+        if (isElement$1(node)) {
+          for (i = 0; i < items.length; i++) {
+            var computed = node.ownerDocument.defaultView.getComputedStyle(node, null);
+            cssValue = computed ? computed.getPropertyValue(name) : null;
+            if (cssValue === items[i]) {
+              return true;
+            }
+          }
+        }
+        return false;
+      };
+    };
+    var hasAttribute = function (attrName) {
+      return function (node) {
+        return isElement$1(node) && node.hasAttribute(attrName);
+      };
+    };
+    var hasAttributeValue = function (attrName, attrValue) {
+      return function (node) {
+        return isElement$1(node) && node.getAttribute(attrName) === attrValue;
+      };
+    };
+    var isBogus = function (node) {
+      return isElement$1(node) && node.hasAttribute('data-mce-bogus');
+    };
+    var isBogusAll = function (node) {
+      return isElement$1(node) && node.getAttribute('data-mce-bogus') === 'all';
+    };
+    var isTable = function (node) {
+      return isElement$1(node) && node.tagName === 'TABLE';
+    };
+    var hasContentEditableState = function (value) {
+      return function (node) {
+        if (isElement$1(node)) {
+          if (node.contentEditable === value) {
+            return true;
+          }
+          if (node.getAttribute('data-mce-contenteditable') === value) {
+            return true;
+          }
+        }
+        return false;
+      };
+    };
+    var isTextareaOrInput = matchNodeNames([
+      'textarea',
+      'input'
+    ]);
+    var isText$1 = isNodeType(3);
+    var isComment$1 = isNodeType(8);
+    var isDocument = isNodeType(9);
+    var isDocumentFragment = isNodeType(11);
+    var isBr = matchNodeNames(['br']);
+    var isContentEditableTrue = hasContentEditableState('true');
+    var isContentEditableFalse = hasContentEditableState('false');
+
+    var isSupported = function (dom) {
+      return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
+    };
+
+    var rawSet = function (dom, key, value) {
+      if (isString(value) || isBoolean(value) || isNumber(value)) {
+        dom.setAttribute(key, value + '');
+      } else {
+        domGlobals.console.error('Invalid call to Attr.set. Key ', key, ':: Value ', value, ':: Element ', dom);
+        throw new Error('Attribute value was not simple');
+      }
+    };
+    var set = function (element, key, value) {
+      rawSet(element.dom(), key, value);
+    };
+    var setAll = function (element, attrs) {
+      var dom = element.dom();
+      each$1(attrs, function (v, k) {
+        rawSet(dom, k, v);
+      });
+    };
+    var get$3 = function (element, key) {
+      var v = element.dom().getAttribute(key);
+      return v === null ? undefined : v;
+    };
+    var getOpt = function (element, key) {
+      return Option.from(get$3(element, key));
+    };
+    var has$1 = function (element, key) {
+      var dom = element.dom();
+      return dom && dom.hasAttribute ? dom.hasAttribute(key) : false;
+    };
+    var remove$1 = function (element, key) {
+      element.dom().removeAttribute(key);
+    };
+
+    var get$4 = function (element, property) {
+      var dom = element.dom();
+      var styles = domGlobals.window.getComputedStyle(dom);
+      var r = styles.getPropertyValue(property);
+      return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
+    };
+    var getUnsafeProperty = function (dom, property) {
+      return isSupported(dom) ? dom.style.getPropertyValue(property) : '';
+    };
+    var getRaw = function (element, property) {
+      var dom = element.dom();
+      var raw = getUnsafeProperty(dom, property);
+      return Option.from(raw).filter(function (r) {
+        return r.length > 0;
+      });
+    };
+    var getAllRaw = function (element) {
+      var css = {};
+      var dom = element.dom();
+      if (isSupported(dom)) {
+        for (var i = 0; i < dom.style.length; i++) {
+          var ruleName = dom.style.item(i);
+          css[ruleName] = dom.style[ruleName];
+        }
+      }
+      return css;
+    };
+    var reflow = function (e) {
+      return e.dom().offsetWidth;
+    };
+
+    var browser = detect$3().browser;
+    var firstElement = function (nodes) {
+      return find(nodes, isElement);
+    };
+    var getTableCaptionDeltaY = function (elm) {
+      if (browser.isFirefox() && name(elm) === 'table') {
+        return firstElement(children(elm)).filter(function (elm) {
+          return name(elm) === 'caption';
+        }).bind(function (caption) {
+          return firstElement(nextSiblings(caption)).map(function (body) {
+            var bodyTop = body.dom().offsetTop;
+            var captionTop = caption.dom().offsetTop;
+            var captionHeight = caption.dom().offsetHeight;
+            return bodyTop <= captionTop ? -captionHeight : 0;
+          });
+        }).getOr(0);
+      } else {
+        return 0;
+      }
+    };
+    var hasChild = function (elm, child) {
+      return elm.children && contains(elm.children, child);
+    };
+    var getPos = function (body, elm, rootElm) {
+      var x = 0, y = 0, offsetParent;
+      var doc = body.ownerDocument;
+      var pos;
+      rootElm = rootElm ? rootElm : body;
+      if (elm) {
+        if (rootElm === body && elm.getBoundingClientRect && get$4(Element.fromDom(body), 'position') === 'static') {
+          pos = elm.getBoundingClientRect();
+          x = pos.left + (doc.documentElement.scrollLeft || body.scrollLeft) - doc.documentElement.clientLeft;
+          y = pos.top + (doc.documentElement.scrollTop || body.scrollTop) - doc.documentElement.clientTop;
+          return {
+            x: x,
+            y: y
+          };
+        }
+        offsetParent = elm;
+        while (offsetParent && offsetParent !== rootElm && offsetParent.nodeType && !hasChild(offsetParent, rootElm)) {
+          x += offsetParent.offsetLeft || 0;
+          y += offsetParent.offsetTop || 0;
+          offsetParent = offsetParent.offsetParent;
+        }
+        offsetParent = elm.parentNode;
+        while (offsetParent && offsetParent !== rootElm && offsetParent.nodeType && !hasChild(offsetParent, rootElm)) {
+          x -= offsetParent.scrollLeft || 0;
+          y -= offsetParent.scrollTop || 0;
+          offsetParent = offsetParent.parentNode;
+        }
+        y += getTableCaptionDeltaY(Element.fromDom(elm));
+      }
+      return {
+        x: x,
+        y: y
+      };
+    };
+
+    var exports$1 = {}, module$1 = { exports: exports$1 };
+    (function (define, exports, module, require) {
+      (function (f) {
+        if (typeof exports === 'object' && typeof module !== 'undefined') {
+          module.exports = f();
+        } else if (typeof define === 'function' && define.amd) {
+          define([], f);
+        } else {
+          var g;
+          if (typeof window !== 'undefined') {
+            g = window;
+          } else if (typeof global !== 'undefined') {
+            g = global;
+          } else if (typeof self !== 'undefined') {
+            g = self;
+          } else {
+            g = this;
+          }
+          g.EphoxContactWrapper = f();
+        }
+      }(function () {
+        return function () {
+          function r(e, n, t) {
+            function o(i, f) {
+              if (!n[i]) {
+                if (!e[i]) {
+                  var c = 'function' == typeof require && require;
+                  if (!f && c)
+                    return c(i, !0);
+                  if (u)
+                    return u(i, !0);
+                  var a = new Error('Cannot find module \'' + i + '\'');
+                  throw a.code = 'MODULE_NOT_FOUND', a;
+                }
+                var p = n[i] = { exports: {} };
+                e[i][0].call(p.exports, function (r) {
+                  var n = e[i][1][r];
+                  return o(n || r);
+                }, p, p.exports, r, e, n, t);
+              }
+              return n[i].exports;
+            }
+            for (var u = 'function' == typeof require && require, i = 0; i < t.length; i++)
+              o(t[i]);
+            return o;
+          }
+          return r;
+        }()({
+          1: [
+            function (require, module, exports) {
+              var process = module.exports = {};
+              var cachedSetTimeout;
+              var cachedClearTimeout;
+              function defaultSetTimout() {
+                throw new Error('setTimeout has not been defined');
+              }
+              function defaultClearTimeout() {
+                throw new Error('clearTimeout has not been defined');
+              }
+              (function () {
+                try {
+                  if (typeof setTimeout === 'function') {
+                    cachedSetTimeout = setTimeout;
+                  } else {
+                    cachedSetTimeout = defaultSetTimout;
+                  }
+                } catch (e) {
+                  cachedSetTimeout = defaultSetTimout;
+                }
+                try {
+                  if (typeof clearTimeout === 'function') {
+                    cachedClearTimeout = clearTimeout;
+                  } else {
+                    cachedClearTimeout = defaultClearTimeout;
+                  }
+                } catch (e) {
+                  cachedClearTimeout = defaultClearTimeout;
+                }
+              }());
+              function runTimeout(fun) {
+                if (cachedSetTimeout === setTimeout) {
+                  return setTimeout(fun, 0);
+                }
+                if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+                  cachedSetTimeout = setTimeout;
+                  return setTimeout(fun, 0);
+                }
+                try {
+                  return cachedSetTimeout(fun, 0);
+                } catch (e) {
+                  try {
+                    return cachedSetTimeout.call(null, fun, 0);
+                  } catch (e) {
+                    return cachedSetTimeout.call(this, fun, 0);
+                  }
+                }
+              }
+              function runClearTimeout(marker) {
+                if (cachedClearTimeout === clearTimeout) {
+                  return clearTimeout(marker);
+                }
+                if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+                  cachedClearTimeout = clearTimeout;
+                  return clearTimeout(marker);
+                }
+                try {
+                  return cachedClearTimeout(marker);
+                } catch (e) {
+                  try {
+                    return cachedClearTimeout.call(null, marker);
+                  } catch (e) {
+                    return cachedClearTimeout.call(this, marker);
+                  }
+                }
+              }
+              var queue = [];
+              var draining = false;
+              var currentQueue;
+              var queueIndex = -1;
+              function cleanUpNextTick() {
+                if (!draining || !currentQueue) {
+                  return;
+                }
+                draining = false;
+                if (currentQueue.length) {
+                  queue = currentQueue.concat(queue);
+                } else {
+                  queueIndex = -1;
+                }
+                if (queue.length) {
+                  drainQueue();
+                }
+              }
+              function drainQueue() {
+                if (draining) {
+                  return;
+                }
+                var timeout = runTimeout(cleanUpNextTick);
+                draining = true;
+                var len = queue.length;
+                while (len) {
+                  currentQueue = queue;
+                  queue = [];
+                  while (++queueIndex < len) {
+                    if (currentQueue) {
+                      currentQueue[queueIndex].run();
+                    }
+                  }
+                  queueIndex = -1;
+                  len = queue.length;
+                }
+                currentQueue = null;
+                draining = false;
+                runClearTimeout(timeout);
+              }
+              process.nextTick = function (fun) {
+                var args = new Array(arguments.length - 1);
+                if (arguments.length > 1) {
+                  for (var i = 1; i < arguments.length; i++) {
+                    args[i - 1] = arguments[i];
+                  }
+                }
+                queue.push(new Item(fun, args));
+                if (queue.length === 1 && !draining) {
+                  runTimeout(drainQueue);
+                }
+              };
+              function Item(fun, array) {
+                this.fun = fun;
+                this.array = array;
+              }
+              Item.prototype.run = function () {
+                this.fun.apply(null, this.array);
+              };
+              process.title = 'browser';
+              process.browser = true;
+              process.env = {};
+              process.argv = [];
+              process.version = '';
+              process.versions = {};
+              function noop() {
+              }
+              process.on = noop;
+              process.addListener = noop;
+              process.once = noop;
+              process.off = noop;
+              process.removeListener = noop;
+              process.removeAllListeners = noop;
+              process.emit = noop;
+              process.prependListener = noop;
+              process.prependOnceListener = noop;
+              process.listeners = function (name) {
+                return [];
+              };
+              process.binding = function (name) {
+                throw new Error('process.binding is not supported');
+              };
+              process.cwd = function () {
+                return '/';
+              };
+              process.chdir = function (dir) {
+                throw new Error('process.chdir is not supported');
+              };
+              process.umask = function () {
+                return 0;
+              };
+            },
+            {}
+          ],
+          2: [
+            function (require, module, exports) {
+              (function (setImmediate) {
+                (function (root) {
+                  var setTimeoutFunc = setTimeout;
+                  function noop() {
+                  }
+                  function bind(fn, thisArg) {
+                    return function () {
+                      fn.apply(thisArg, arguments);
+                    };
+                  }
+                  function Promise(fn) {
+                    if (typeof this !== 'object')
+                      throw new TypeError('Promises must be constructed via new');
+                    if (typeof fn !== 'function')
+                      throw new TypeError('not a function');
+                    this._state = 0;
+                    this._handled = false;
+                    this._value = undefined;
+                    this._deferreds = [];
+                    doResolve(fn, this);
+                  }
+                  function handle(self, deferred) {
+                    while (self._state === 3) {
+                      self = self._value;
+                    }
+                    if (self._state === 0) {
+                      self._deferreds.push(deferred);
+                      return;
+                    }
+                    self._handled = true;
+                    Promise._immediateFn(function () {
+                      var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
+                      if (cb === null) {
+                        (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
+                        return;
+                      }
+                      var ret;
+                      try {
+                        ret = cb(self._value);
+                      } catch (e) {
+                        reject(deferred.promise, e);
+                        return;
+                      }
+                      resolve(deferred.promise, ret);
+                    });
+                  }
+                  function resolve(self, newValue) {
+                    try {
+                      if (newValue === self)
+                        throw new TypeError('A promise cannot be resolved with itself.');
+                      if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
+                        var then = newValue.then;
+                        if (newValue instanceof Promise) {
+                          self._state = 3;
+                          self._value = newValue;
+                          finale(self);
+                          return;
+                        } else if (typeof then === 'function') {
+                          doResolve(bind(then, newValue), self);
+                          return;
+                        }
+                      }
+                      self._state = 1;
+                      self._value = newValue;
+                      finale(self);
+                    } catch (e) {
+                      reject(self, e);
+                    }
+                  }
+                  function reject(self, newValue) {
+                    self._state = 2;
+                    self._value = newValue;
+                    finale(self);
+                  }
+                  function finale(self) {
+                    if (self._state === 2 && self._deferreds.length === 0) {
+                      Promise._immediateFn(function () {
+                        if (!self._handled) {
+                          Promise._unhandledRejectionFn(self._value);
+                        }
+                      });
+                    }
+                    for (var i = 0, len = self._deferreds.length; i < len; i++) {
+                      handle(self, self._deferreds[i]);
+                    }
+                    self._deferreds = null;
+                  }
+                  function Handler(onFulfilled, onRejected, promise) {
+                    this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
+                    this.onRejected = typeof onRejected === 'function' ? onRejected : null;
+                    this.promise = promise;
+                  }
+                  function doResolve(fn, self) {
+                    var done = false;
+                    try {
+                      fn(function (value) {
+                        if (done)
+                          return;
+                        done = true;
+                        resolve(self, value);
+                      }, function (reason) {
+                        if (done)
+                          return;
+                        done = true;
+                        reject(self, reason);
+                      });
+                    } catch (ex) {
+                      if (done)
+                        return;
+                      done = true;
+                      reject(self, ex);
+                    }
+                  }
+                  Promise.prototype['catch'] = function (onRejected) {
+                    return this.then(null, onRejected);
+                  };
+                  Promise.prototype.then = function (onFulfilled, onRejected) {
+                    var prom = new this.constructor(noop);
+                    handle(this, new Handler(onFulfilled, onRejected, prom));
+                    return prom;
+                  };
+                  Promise.all = function (arr) {
+                    var args = Array.prototype.slice.call(arr);
+                    return new Promise(function (resolve, reject) {
+                      if (args.length === 0)
+                        return resolve([]);
+                      var remaining = args.length;
+                      function res(i, val) {
+                        try {
+                          if (val && (typeof val === 'object' || typeof val === 'function')) {
+                            var then = val.then;
+                            if (typeof then === 'function') {
+                              then.call(val, function (val) {
+                                res(i, val);
+                              }, reject);
+                              return;
+                            }
+                          }
+                          args[i] = val;
+                          if (--remaining === 0) {
+                            resolve(args);
+                          }
+                        } catch (ex) {
+                          reject(ex);
+                        }
+                      }
+                      for (var i = 0; i < args.length; i++) {
+                        res(i, args[i]);
+                      }
+                    });
+                  };
+                  Promise.resolve = function (value) {
+                    if (value && typeof value === 'object' && value.constructor === Promise) {
+                      return value;
+                    }
+                    return new Promise(function (resolve) {
+                      resolve(value);
+                    });
+                  };
+                  Promise.reject = function (value) {
+                    return new Promise(function (resolve, reject) {
+                      reject(value);
+                    });
+                  };
+                  Promise.race = function (values) {
+                    return new Promise(function (resolve, reject) {
+                      for (var i = 0, len = values.length; i < len; i++) {
+                        values[i].then(resolve, reject);
+                      }
+                    });
+                  };
+                  Promise._immediateFn = typeof setImmediate === 'function' ? function (fn) {
+                    setImmediate(fn);
+                  } : function (fn) {
+                    setTimeoutFunc(fn, 0);
+                  };
+                  Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
+                    if (typeof console !== 'undefined' && console) {
+                      console.warn('Possible Unhandled Promise Rejection:', err);
+                    }
+                  };
+                  Promise._setImmediateFn = function _setImmediateFn(fn) {
+                    Promise._immediateFn = fn;
+                  };
+                  Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {
+                    Promise._unhandledRejectionFn = fn;
+                  };
+                  if (typeof module !== 'undefined' && module.exports) {
+                    module.exports = Promise;
+                  } else if (!root.Promise) {
+                    root.Promise = Promise;
+                  }
+                }(this));
+              }.call(this, require('timers').setImmediate));
+            },
+            { 'timers': 3 }
+          ],
+          3: [
+            function (require, module, exports) {
+              (function (setImmediate, clearImmediate) {
+                var nextTick = require('process/browser.js').nextTick;
+                var apply = Function.prototype.apply;
+                var slice = Array.prototype.slice;
+                var immediateIds = {};
+                var nextImmediateId = 0;
+                exports.setTimeout = function () {
+                  return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);
+                };
+                exports.setInterval = function () {
+                  return new Timeout(apply.call(setInterval, window, arguments), clearInterval);
+                };
+                exports.clearTimeout = exports.clearInterval = function (timeout) {
+                  timeout.close();
+                };
+                function Timeout(id, clearFn) {
+                  this._id = id;
+                  this._clearFn = clearFn;
+                }
+                Timeout.prototype.unref = Timeout.prototype.ref = function () {
+                };
+                Timeout.prototype.close = function () {
+                  this._clearFn.call(window, this._id);
+                };
+                exports.enroll = function (item, msecs) {
+                  clearTimeout(item._idleTimeoutId);
+                  item._idleTimeout = msecs;
+                };
+                exports.unenroll = function (item) {
+                  clearTimeout(item._idleTimeoutId);
+                  item._idleTimeout = -1;
+                };
+                exports._unrefActive = exports.active = function (item) {
+                  clearTimeout(item._idleTimeoutId);
+                  var msecs = item._idleTimeout;
+                  if (msecs >= 0) {
+                    item._idleTimeoutId = setTimeout(function onTimeout() {
+                      if (item._onTimeout)
+                        item._onTimeout();
+                    }, msecs);
+                  }
+                };
+                exports.setImmediate = typeof setImmediate === 'function' ? setImmediate : function (fn) {
+                  var id = nextImmediateId++;
+                  var args = arguments.length < 2 ? false : slice.call(arguments, 1);
+                  immediateIds[id] = true;
+                  nextTick(function onNextTick() {
+                    if (immediateIds[id]) {
+                      if (args) {
+                        fn.apply(null, args);
+                      } else {
+                        fn.call(null);
+                      }
+                      exports.clearImmediate(id);
+                    }
+                  });
+                  return id;
+                };
+                exports.clearImmediate = typeof clearImmediate === 'function' ? clearImmediate : function (id) {
+                  delete immediateIds[id];
+                };
+              }.call(this, require('timers').setImmediate, require('timers').clearImmediate));
+            },
+            {
+              'process/browser.js': 1,
+              'timers': 3
+            }
+          ],
+          4: [
+            function (require, module, exports) {
+              var promisePolyfill = require('promise-polyfill');
+              var Global = function () {
+                if (typeof window !== 'undefined') {
+                  return window;
+                } else {
+                  return Function('return this;')();
+                }
+              }();
+              module.exports = { boltExport: Global.Promise || promisePolyfill };
+            },
+            { 'promise-polyfill': 2 }
+          ]
+        }, {}, [4])(4);
+      }));
+    }(undefined, exports$1, module$1, undefined));
+    var Promise = module$1.exports.boltExport;
+
+    var nu$3 = function (baseFn) {
+      var data = Option.none();
+      var callbacks = [];
+      var map = function (f) {
+        return nu$3(function (nCallback) {
+          get(function (data) {
+            nCallback(f(data));
+          });
+        });
+      };
+      var get = function (nCallback) {
+        if (isReady()) {
+          call(nCallback);
+        } else {
+          callbacks.push(nCallback);
+        }
+      };
+      var set = function (x) {
+        data = Option.some(x);
+        run(callbacks);
+        callbacks = [];
+      };
+      var isReady = function () {
+        return data.isSome();
+      };
+      var run = function (cbs) {
+        each(cbs, call);
+      };
+      var call = function (cb) {
+        data.each(function (x) {
+          domGlobals.setTimeout(function () {
+            cb(x);
+          }, 0);
+        });
+      };
+      baseFn(set);
+      return {
+        get: get,
+        map: map,
+        isReady: isReady
+      };
+    };
+    var pure = function (a) {
+      return nu$3(function (callback) {
+        callback(a);
+      });
+    };
+    var LazyValue = {
+      nu: nu$3,
+      pure: pure
+    };
+
+    var errorReporter = function (err) {
+      domGlobals.setTimeout(function () {
+        throw err;
+      }, 0);
+    };
+    var make = function (run) {
+      var get = function (callback) {
+        run().then(callback, errorReporter);
+      };
+      var map = function (fab) {
+        return make(function () {
+          return run().then(fab);
+        });
+      };
+      var bind = function (aFutureB) {
+        return make(function () {
+          return run().then(function (v) {
+            return aFutureB(v).toPromise();
+          });
+        });
+      };
+      var anonBind = function (futureB) {
+        return make(function () {
+          return run().then(function () {
+            return futureB.toPromise();
+          });
+        });
+      };
+      var toLazy = function () {
+        return LazyValue.nu(get);
+      };
+      var toCached = function () {
+        var cache = null;
+        return make(function () {
+          if (cache === null) {
+            cache = run();
+          }
+          return cache;
+        });
+      };
+      var toPromise = run;
+      return {
+        map: map,
+        bind: bind,
+        anonBind: anonBind,
+        toLazy: toLazy,
+        toCached: toCached,
+        toPromise: toPromise,
+        get: get
+      };
+    };
+    var nu$4 = function (baseFn) {
+      return make(function () {
+        return new Promise(baseFn);
+      });
+    };
+    var pure$1 = function (a) {
+      return make(function () {
+        return Promise.resolve(a);
+      });
+    };
+    var Future = {
+      nu: nu$4,
+      pure: pure$1
+    };
+
+    var par = function (asyncValues, nu) {
+      return nu(function (callback) {
+        var r = [];
+        var count = 0;
+        var cb = function (i) {
+          return function (value) {
+            r[i] = value;
+            count++;
+            if (count >= asyncValues.length) {
+              callback(r);
+            }
+          };
+        };
+        if (asyncValues.length === 0) {
+          callback([]);
+        } else {
+          each(asyncValues, function (asyncValue, i) {
+            asyncValue.get(cb(i));
+          });
+        }
+      });
+    };
+
+    var par$1 = function (futures) {
+      return par(futures, Future.nu);
+    };
+
+    var value = function (o) {
+      var is = function (v) {
+        return o === v;
+      };
+      var or = function (_opt) {
+        return value(o);
+      };
+      var orThunk = function (_f) {
+        return value(o);
+      };
+      var map = function (f) {
+        return value(f(o));
+      };
+      var mapError = function (_f) {
+        return value(o);
+      };
+      var each = function (f) {
+        f(o);
+      };
+      var bind = function (f) {
+        return f(o);
+      };
+      var fold = function (_, onValue) {
+        return onValue(o);
+      };
+      var exists = function (f) {
+        return f(o);
+      };
+      var forall = function (f) {
+        return f(o);
+      };
+      var toOption = function () {
+        return Option.some(o);
+      };
+      return {
+        is: is,
+        isValue: always,
+        isError: never,
+        getOr: constant(o),
+        getOrThunk: constant(o),
+        getOrDie: constant(o),
+        or: or,
+        orThunk: orThunk,
+        fold: fold,
+        map: map,
+        mapError: mapError,
+        each: each,
+        bind: bind,
+        exists: exists,
+        forall: forall,
+        toOption: toOption
+      };
+    };
+    var error = function (message) {
+      var getOrThunk = function (f) {
+        return f();
+      };
+      var getOrDie = function () {
+        return die(String(message))();
+      };
+      var or = function (opt) {
+        return opt;
+      };
+      var orThunk = function (f) {
+        return f();
+      };
+      var map = function (_f) {
+        return error(message);
+      };
+      var mapError = function (f) {
+        return error(f(message));
+      };
+      var bind = function (_f) {
+        return error(message);
+      };
+      var fold = function (onError, _) {
+        return onError(message);
+      };
+      return {
+        is: never,
+        isValue: never,
+        isError: always,
+        getOr: identity,
+        getOrThunk: getOrThunk,
+        getOrDie: getOrDie,
+        or: or,
+        orThunk: orThunk,
+        fold: fold,
+        map: map,
+        mapError: mapError,
+        each: noop,
+        bind: bind,
+        exists: never,
+        forall: always,
+        toOption: Option.none
+      };
+    };
+    var fromOption = function (opt, err) {
+      return opt.fold(function () {
+        return error(err);
+      }, value);
+    };
+    var Result = {
+      value: value,
+      error: error,
+      fromOption: fromOption
+    };
+
+    var promise = function () {
+      function bind(fn, thisArg) {
+        return function () {
+          fn.apply(thisArg, arguments);
+        };
+      }
+      var isArray = Array.isArray || function (value) {
+        return Object.prototype.toString.call(value) === '[object Array]';
+      };
+      var Promise = function (fn) {
+        if (typeof this !== 'object') {
+          throw new TypeError('Promises must be constructed via new');
+        }
+        if (typeof fn !== 'function') {
+          throw new TypeError('not a function');
+        }
+        this._state = null;
+        this._value = null;
+        this._deferreds = [];
+        doResolve(fn, bind(resolve, this), bind(reject, this));
+      };
+      var asap = Promise.immediateFn || typeof domGlobals.setImmediate === 'function' && domGlobals.setImmediate || function (fn) {
+        domGlobals.setTimeout(fn, 1);
+      };
+      function handle(deferred) {
+        var me = this;
+        if (this._state === null) {
+          this._deferreds.push(deferred);
+          return;
+        }
+        asap(function () {
+          var cb = me._state ? deferred.onFulfilled : deferred.onRejected;
+          if (cb === null) {
+            (me._state ? deferred.resolve : deferred.reject)(me._value);
+            return;
+          }
+          var ret;
+          try {
+            ret = cb(me._value);
+          } catch (e) {
+            deferred.reject(e);
+            return;
+          }
+          deferred.resolve(ret);
+        });
+      }
+      function resolve(newValue) {
+        try {
+          if (newValue === this) {
+            throw new TypeError('A promise cannot be resolved with itself.');
+          }
+          if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
+            var then = newValue.then;
+            if (typeof then === 'function') {
+              doResolve(bind(then, newValue), bind(resolve, this), bind(reject, this));
+              return;
+            }
+          }
+          this._state = true;
+          this._value = newValue;
+          finale.call(this);
+        } catch (e) {
+          reject.call(this, e);
+        }
+      }
+      function reject(newValue) {
+        this._state = false;
+        this._value = newValue;
+        finale.call(this);
+      }
+      function finale() {
+        for (var i = 0, len = this._deferreds.length; i < len; i++) {
+          handle.call(this, this._deferreds[i]);
+        }
+        this._deferreds = null;
+      }
+      function Handler(onFulfilled, onRejected, resolve, reject) {
+        this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
+        this.onRejected = typeof onRejected === 'function' ? onRejected : null;
+        this.resolve = resolve;
+        this.reject = reject;
+      }
+      function doResolve(fn, onFulfilled, onRejected) {
+        var done = false;
+        try {
+          fn(function (value) {
+            if (done) {
+              return;
+            }
+            done = true;
+            onFulfilled(value);
+          }, function (reason) {
+            if (done) {
+              return;
+            }
+            done = true;
+            onRejected(reason);
+          });
+        } catch (ex) {
+          if (done) {
+            return;
+          }
+          done = true;
+          onRejected(ex);
+        }
+      }
+      Promise.prototype.catch = function (onRejected) {
+        return this.then(null, onRejected);
+      };
+      Promise.prototype.then = function (onFulfilled, onRejected) {
+        var me = this;
+        return new Promise(function (resolve, reject) {
+          handle.call(me, new Handler(onFulfilled, onRejected, resolve, reject));
+        });
+      };
+      Promise.all = function () {
+        var args = Array.prototype.slice.call(arguments.length === 1 && isArray(arguments[0]) ? arguments[0] : arguments);
+        return new Promise(function (resolve, reject) {
+          if (args.length === 0) {
+            return resolve([]);
+          }
+          var remaining = args.length;
+          function res(i, val) {
+            try {
+              if (val && (typeof val === 'object' || typeof val === 'function')) {
+                var then = val.then;
+                if (typeof then === 'function') {
+                  then.call(val, function (val) {
+                    res(i, val);
+                  }, reject);
+                  return;
+                }
+              }
+              args[i] = val;
+              if (--remaining === 0) {
+                resolve(args);
+              }
+            } catch (ex) {
+              reject(ex);
+            }
+          }
+          for (var i = 0; i < args.length; i++) {
+            res(i, args[i]);
+          }
+        });
+      };
+      Promise.resolve = function (value) {
+        if (value && typeof value === 'object' && value.constructor === Promise) {
+          return value;
+        }
+        return new Promise(function (resolve) {
+          resolve(value);
+        });
+      };
+      Promise.reject = function (value) {
+        return new Promise(function (resolve, reject) {
+          reject(value);
+        });
+      };
+      Promise.race = function (values) {
+        return new Promise(function (resolve, reject) {
+          for (var i = 0, len = values.length; i < len; i++) {
+            values[i].then(resolve, reject);
+          }
+        });
+      };
+      return Promise;
+    };
+    var promiseObj = window.Promise ? window.Promise : promise();
+
+    var requestAnimationFramePromise;
+    var requestAnimationFrame = function (callback, element) {
+      var i, requestAnimationFrameFunc = domGlobals.window.requestAnimationFrame;
+      var vendors = [
+        'ms',
+        'moz',
+        'webkit'
+      ];
+      var featurefill = function (callback) {
+        domGlobals.window.setTimeout(callback, 0);
+      };
+      for (i = 0; i < vendors.length && !requestAnimationFrameFunc; i++) {
+        requestAnimationFrameFunc = domGlobals.window[vendors[i] + 'RequestAnimationFrame'];
+      }
+      if (!requestAnimationFrameFunc) {
+        requestAnimationFrameFunc = featurefill;
+      }
+      requestAnimationFrameFunc(callback, element);
+    };
+    var wrappedSetTimeout = function (callback, time) {
+      if (typeof time !== 'number') {
+        time = 0;
+      }
+      return domGlobals.setTimeout(callback, time);
+    };
+    var wrappedSetInterval = function (callback, time) {
+      if (typeof time !== 'number') {
+        time = 1;
+      }
+      return domGlobals.setInterval(callback, time);
+    };
+    var wrappedClearTimeout = function (id) {
+      return domGlobals.clearTimeout(id);
+    };
+    var wrappedClearInterval = function (id) {
+      return domGlobals.clearInterval(id);
+    };
+    var debounce = function (callback, time) {
+      var timer, func;
+      func = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        domGlobals.clearTimeout(timer);
+        timer = wrappedSetTimeout(function () {
+          callback.apply(this, args);
+        }, time);
+      };
+      func.stop = function () {
+        domGlobals.clearTimeout(timer);
+      };
+      return func;
+    };
+    var Delay = {
+      requestAnimationFrame: function (callback, element) {
+        if (requestAnimationFramePromise) {
+          requestAnimationFramePromise.then(callback);
+          return;
+        }
+        requestAnimationFramePromise = new promiseObj(function (resolve) {
+          if (!element) {
+            element = domGlobals.document.body;
+          }
+          requestAnimationFrame(resolve, element);
+        }).then(callback);
+      },
+      setTimeout: wrappedSetTimeout,
+      setInterval: wrappedSetInterval,
+      setEditorTimeout: function (editor, callback, time) {
+        return wrappedSetTimeout(function () {
+          if (!editor.removed) {
+            callback();
+          }
+        }, time);
+      },
+      setEditorInterval: function (editor, callback, time) {
+        var timer;
+        timer = wrappedSetInterval(function () {
+          if (!editor.removed) {
+            callback();
+          } else {
+            domGlobals.clearInterval(timer);
+          }
+        }, time);
+        return timer;
+      },
+      debounce: debounce,
+      throttle: debounce,
+      clearInterval: wrappedClearInterval,
+      clearTimeout: wrappedClearTimeout
+    };
+
+    var userAgent = domGlobals.navigator.userAgent;
+    var platform$1 = detect$3();
+    var browser$1 = platform$1.browser;
+    var os = platform$1.os;
+    var deviceType = platform$1.deviceType;
+    var webkit = /WebKit/.test(userAgent) && !browser$1.isEdge();
+    var fileApi = 'FormData' in domGlobals.window && 'FileReader' in domGlobals.window && 'URL' in domGlobals.window && !!domGlobals.URL.createObjectURL;
+    var windowsPhone = userAgent.indexOf('Windows Phone') !== -1;
+    var Env = {
+      opera: browser$1.isOpera(),
+      webkit: webkit,
+      ie: browser$1.isIE() || browser$1.isEdge() ? browser$1.version.major : false,
+      gecko: browser$1.isFirefox(),
+      mac: os.isOSX() || os.isiOS(),
+      iOS: deviceType.isiPad() || deviceType.isiPhone(),
+      android: os.isAndroid(),
+      contentEditable: true,
+      transparentSrc: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',
+      caretAfter: true,
+      range: domGlobals.window.getSelection && 'Range' in domGlobals.window,
+      documentMode: browser$1.isIE() ? domGlobals.document.documentMode || 7 : 10,
+      fileApi: fileApi,
+      ceFalse: true,
+      cacheSuffix: null,
+      container: null,
+      experimentalShadowDom: false,
+      canHaveCSP: !browser$1.isIE(),
+      desktop: deviceType.isDesktop(),
+      windowsPhone: windowsPhone,
+      browser: {
+        current: browser$1.current,
+        version: browser$1.version,
+        isChrome: browser$1.isChrome,
+        isEdge: browser$1.isEdge,
+        isFirefox: browser$1.isFirefox,
+        isIE: browser$1.isIE,
+        isOpera: browser$1.isOpera,
+        isSafari: browser$1.isSafari
+      },
+      os: {
+        current: os.current,
+        version: os.version,
+        isAndroid: os.isAndroid,
+        isChromeOS: os.isChromeOS,
+        isFreeBSD: os.isFreeBSD,
+        isiOS: os.isiOS,
+        isLinux: os.isLinux,
+        isOSX: os.isOSX,
+        isSolaris: os.isSolaris,
+        isWindows: os.isWindows
+      },
+      deviceType: {
+        isDesktop: deviceType.isDesktop,
+        isiPad: deviceType.isiPad,
+        isiPhone: deviceType.isiPhone,
+        isPhone: deviceType.isPhone,
+        isTablet: deviceType.isTablet,
+        isTouch: deviceType.isTouch,
+        isWebView: deviceType.isWebView
+      }
+    };
+
+    var isArray$1 = Array.isArray;
+    var toArray$1 = function (obj) {
+      var array = obj, i, l;
+      if (!isArray$1(obj)) {
+        array = [];
+        for (i = 0, l = obj.length; i < l; i++) {
+          array[i] = obj[i];
+        }
+      }
+      return array;
+    };
+    var each$2 = function (o, cb, s) {
+      var n, l;
+      if (!o) {
+        return 0;
+      }
+      s = s || o;
+      if (o.length !== undefined) {
+        for (n = 0, l = o.length; n < l; n++) {
+          if (cb.call(s, o[n], n, o) === false) {
+            return 0;
+          }
+        }
+      } else {
+        for (n in o) {
+          if (o.hasOwnProperty(n)) {
+            if (cb.call(s, o[n], n, o) === false) {
+              return 0;
+            }
+          }
+        }
+      }
+      return 1;
+    };
+    var map$2 = function (array, callback) {
+      var out = [];
+      each$2(array, function (item, index) {
+        out.push(callback(item, index, array));
+      });
+      return out;
+    };
+    var filter$2 = function (a, f) {
+      var o = [];
+      each$2(a, function (v, index) {
+        if (!f || f(v, index, a)) {
+          o.push(v);
+        }
+      });
+      return o;
+    };
+    var indexOf$1 = function (a, v) {
+      var i, l;
+      if (a) {
+        for (i = 0, l = a.length; i < l; i++) {
+          if (a[i] === v) {
+            return i;
+          }
+        }
+      }
+      return -1;
+    };
+    var reduce = function (collection, iteratee, accumulator, thisArg) {
+      var i = 0;
+      if (arguments.length < 3) {
+        accumulator = collection[0];
+      }
+      for (; i < collection.length; i++) {
+        accumulator = iteratee.call(thisArg, accumulator, collection[i], i);
+      }
+      return accumulator;
+    };
+    var findIndex$1 = function (array, predicate, thisArg) {
+      var i, l;
+      for (i = 0, l = array.length; i < l; i++) {
+        if (predicate.call(thisArg, array[i], i, array)) {
+          return i;
+        }
+      }
+      return -1;
+    };
+    var last$1 = function (collection) {
+      return collection[collection.length - 1];
+    };
+
+    var whiteSpaceRegExp = /^\s*|\s*$/g;
+    var trim$1 = function (str) {
+      return str === null || str === undefined ? '' : ('' + str).replace(whiteSpaceRegExp, '');
+    };
+    var is$1 = function (obj, type) {
+      if (!type) {
+        return obj !== undefined;
+      }
+      if (type === 'array' && isArray$1(obj)) {
+        return true;
+      }
+      return typeof obj === type;
+    };
+    var makeMap = function (items, delim, map) {
+      var i;
+      items = items || [];
+      delim = delim || ',';
+      if (typeof items === 'string') {
+        items = items.split(delim);
+      }
+      map = map || {};
+      i = items.length;
+      while (i--) {
+        map[items[i]] = {};
+      }
+      return map;
+    };
+    var hasOwnProperty$1 = function (obj, prop) {
+      return Object.prototype.hasOwnProperty.call(obj, prop);
+    };
+    var create = function (s, p, root) {
+      var self = this;
+      var sp, ns, cn, scn, c, de = 0;
+      s = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(s);
+      cn = s[3].match(/(^|\.)(\w+)$/i)[2];
+      ns = self.createNS(s[3].replace(/\.\w+$/, ''), root);
+      if (ns[cn]) {
+        return;
+      }
+      if (s[2] === 'static') {
+        ns[cn] = p;
+        if (this.onCreate) {
+          this.onCreate(s[2], s[3], ns[cn]);
+        }
+        return;
+      }
+      if (!p[cn]) {
+        p[cn] = function () {
+        };
+        de = 1;
+      }
+      ns[cn] = p[cn];
+      self.extend(ns[cn].prototype, p);
+      if (s[5]) {
+        sp = self.resolve(s[5]).prototype;
+        scn = s[5].match(/\.(\w+)$/i)[1];
+        c = ns[cn];
+        if (de) {
+          ns[cn] = function () {
+            return sp[scn].apply(this, arguments);
+          };
+        } else {
+          ns[cn] = function () {
+            this.parent = sp[scn];
+            return c.apply(this, arguments);
+          };
+        }
+        ns[cn].prototype[cn] = ns[cn];
+        self.each(sp, function (f, n) {
+          ns[cn].prototype[n] = sp[n];
+        });
+        self.each(p, function (f, n) {
+          if (sp[n]) {
+            ns[cn].prototype[n] = function () {
+              this.parent = sp[n];
+              return f.apply(this, arguments);
+            };
+          } else {
+            if (n !== cn) {
+              ns[cn].prototype[n] = f;
+            }
+          }
+        });
+      }
+      self.each(p.static, function (f, n) {
+        ns[cn][n] = f;
+      });
+    };
+    var extend = function (obj) {
+      var exts = [];
+      for (var _i = 1; _i < arguments.length; _i++) {
+        exts[_i - 1] = arguments[_i];
+      }
+      for (var i = 0; i < exts.length; i++) {
+        var ext = exts[i];
+        for (var name_1 in ext) {
+          if (ext.hasOwnProperty(name_1)) {
+            var value = ext[name_1];
+            if (value !== undefined) {
+              obj[name_1] = value;
+            }
+          }
+        }
+      }
+      return obj;
+    };
+    var walk = function (o, f, n, s) {
+      s = s || this;
+      if (o) {
+        if (n) {
+          o = o[n];
+        }
+        each$2(o, function (o, i) {
+          if (f.call(s, o, i, n) === false) {
+            return false;
+          }
+          walk(o, f, n, s);
+        });
+      }
+    };
+    var createNS = function (n, o) {
+      var i, v;
+      o = o || domGlobals.window;
+      n = n.split('.');
+      for (i = 0; i < n.length; i++) {
+        v = n[i];
+        if (!o[v]) {
+          o[v] = {};
+        }
+        o = o[v];
+      }
+      return o;
+    };
+    var resolve = function (n, o) {
+      var i, l;
+      o = o || domGlobals.window;
+      n = n.split('.');
+      for (i = 0, l = n.length; i < l; i++) {
+        o = o[n[i]];
+        if (!o) {
+          break;
+        }
+      }
+      return o;
+    };
+    var explode = function (s, d) {
+      if (!s || is$1(s, 'array')) {
+        return s;
+      }
+      return map$2(s.split(d || ','), trim$1);
+    };
+    var _addCacheSuffix = function (url) {
+      var cacheSuffix = Env.cacheSuffix;
+      if (cacheSuffix) {
+        url += (url.indexOf('?') === -1 ? '?' : '&') + cacheSuffix;
+      }
+      return url;
+    };
+    var Tools = {
+      trim: trim$1,
+      isArray: isArray$1,
+      is: is$1,
+      toArray: toArray$1,
+      makeMap: makeMap,
+      each: each$2,
+      map: map$2,
+      grep: filter$2,
+      inArray: indexOf$1,
+      hasOwn: hasOwnProperty$1,
+      extend: extend,
+      create: create,
+      walk: walk,
+      createNS: createNS,
+      resolve: resolve,
+      explode: explode,
+      _addCacheSuffix: _addCacheSuffix
+    };
+
+    function StyleSheetLoader(document, settings) {
+      if (settings === void 0) {
+        settings = {};
+      }
+      var idCount = 0;
+      var loadedStates = {};
+      var maxLoadTime;
+      maxLoadTime = settings.maxLoadTime || 5000;
+      var _setReferrerPolicy = function (referrerPolicy) {
+        settings.referrerPolicy = referrerPolicy;
+      };
+      var appendToHead = function (node) {
+        document.getElementsByTagName('head')[0].appendChild(node);
+      };
+      var load = function (url, loadedCallback, errorCallback) {
+        var link, style, startTime, state;
+        var resolve = function (status) {
+          state.status = status;
+          state.passed = [];
+          state.failed = [];
+          if (link) {
+            link.onload = null;
+            link.onerror = null;
+            link = null;
+          }
+        };
+        var passed = function () {
+          var callbacks = state.passed;
+          var i = callbacks.length;
+          while (i--) {
+            callbacks[i]();
+          }
+          resolve(2);
+        };
+        var failed = function () {
+          var callbacks = state.failed;
+          var i = callbacks.length;
+          while (i--) {
+            callbacks[i]();
+          }
+          resolve(3);
+        };
+        var isOldWebKit = function () {
+          var webKitChunks = domGlobals.navigator.userAgent.match(/WebKit\/(\d*)/);
+          return !!(webKitChunks && parseInt(webKitChunks[1], 10) < 536);
+        };
+        var wait = function (testCallback, waitCallback) {
+          if (!testCallback()) {
+            if (new Date().getTime() - startTime < maxLoadTime) {
+              Delay.setTimeout(waitCallback);
+            } else {
+              failed();
+            }
+          }
+        };
+        var waitForWebKitLinkLoaded = function () {
+          wait(function () {
+            var styleSheets = document.styleSheets;
+            var styleSheet, i = styleSheets.length, owner;
+            while (i--) {
+              styleSheet = styleSheets[i];
+              owner = styleSheet.ownerNode ? styleSheet.ownerNode : styleSheet.owningElement;
+              if (owner && owner.id === link.id) {
+                passed();
+                return true;
+              }
+            }
+          }, waitForWebKitLinkLoaded);
+        };
+        var waitForGeckoLinkLoaded = function () {
+          wait(function () {
+            try {
+              var cssRules = style.sheet.cssRules;
+              passed();
+              return !!cssRules;
+            } catch (ex) {
+            }
+          }, waitForGeckoLinkLoaded);
+        };
+        url = Tools._addCacheSuffix(url);
+        if (!loadedStates[url]) {
+          state = {
+            passed: [],
+            failed: []
+          };
+          loadedStates[url] = state;
+        } else {
+          state = loadedStates[url];
+        }
+        if (loadedCallback) {
+          state.passed.push(loadedCallback);
+        }
+        if (errorCallback) {
+          state.failed.push(errorCallback);
+        }
+        if (state.status === 1) {
+          return;
+        }
+        if (state.status === 2) {
+          passed();
+          return;
+        }
+        if (state.status === 3) {
+          failed();
+          return;
+        }
+        state.status = 1;
+        link = document.createElement('link');
+        link.rel = 'stylesheet';
+        link.type = 'text/css';
+        link.id = 'u' + idCount++;
+        link.async = false;
+        link.defer = false;
+        startTime = new Date().getTime();
+        if (settings.contentCssCors) {
+          link.crossOrigin = 'anonymous';
+        }
+        if (settings.referrerPolicy) {
+          set(Element.fromDom(link), 'referrerpolicy', settings.referrerPolicy);
+        }
+        if ('onload' in link && !isOldWebKit()) {
+          link.onload = waitForWebKitLinkLoaded;
+          link.onerror = failed;
+        } else {
+          if (domGlobals.navigator.userAgent.indexOf('Firefox') > 0) {
+            style = document.createElement('style');
+            style.textContent = '@import "' + url + '"';
+            waitForGeckoLinkLoaded();
+            appendToHead(style);
+            return;
+          }
+          waitForWebKitLinkLoaded();
+        }
+        appendToHead(link);
+        link.href = url;
+      };
+      var loadF = function (url) {
+        return Future.nu(function (resolve) {
+          load(url, compose(resolve, constant(Result.value(url))), compose(resolve, constant(Result.error(url))));
+        });
+      };
+      var unbox = function (result) {
+        return result.fold(identity, identity);
+      };
+      var loadAll = function (urls, success, failure) {
+        par$1(map(urls, loadF)).get(function (result) {
+          var parts = partition(result, function (r) {
+            return r.isValue();
+          });
+          if (parts.fail.length > 0) {
+            failure(parts.fail.map(unbox));
+          } else {
+            success(parts.pass.map(unbox));
+          }
+        });
+      };
+      return {
+        load: load,
+        loadAll: loadAll,
+        _setReferrerPolicy: _setReferrerPolicy
+      };
+    }
+
+    var blocks = [
+      'article',
+      'aside',
+      'details',
+      'div',
+      'dt',
+      'figcaption',
+      'footer',
+      'form',
+      'fieldset',
+      'header',
+      'hgroup',
+      'html',
+      'main',
+      'nav',
+      'section',
+      'summary',
+      'body',
+      'p',
+      'dl',
+      'multicol',
+      'dd',
+      'figure',
+      'address',
+      'center',
+      'blockquote',
+      'h1',
+      'h2',
+      'h3',
+      'h4',
+      'h5',
+      'h6',
+      'listing',
+      'xmp',
+      'pre',
+      'plaintext',
+      'menu',
+      'dir',
+      'ul',
+      'ol',
+      'li',
+      'hr',
+      'table',
+      'tbody',
+      'thead',
+      'tfoot',
+      'th',
+      'tr',
+      'td',
+      'caption'
+    ];
+    var voids = [
+      'area',
+      'base',
+      'basefont',
+      'br',
+      'col',
+      'frame',
+      'hr',
+      'img',
+      'input',
+      'isindex',
+      'link',
+      'meta',
+      'param',
+      'embed',
+      'source',
+      'wbr',
+      'track'
+    ];
+    var tableCells = [
+      'td',
+      'th'
+    ];
+    var tableSections = [
+      'thead',
+      'tbody',
+      'tfoot'
+    ];
+    var textBlocks = [
+      'h1',
+      'h2',
+      'h3',
+      'h4',
+      'h5',
+      'h6',
+      'p',
+      'div',
+      'address',
+      'pre',
+      'form',
+      'blockquote',
+      'center',
+      'dir',
+      'fieldset',
+      'header',
+      'footer',
+      'article',
+      'section',
+      'hgroup',
+      'aside',
+      'nav',
+      'figure'
+    ];
+    var headings = [
+      'h1',
+      'h2',
+      'h3',
+      'h4',
+      'h5',
+      'h6'
+    ];
+    var listItems = [
+      'li',
+      'dd',
+      'dt'
+    ];
+    var lists = [
+      'ul',
+      'ol',
+      'dl'
+    ];
+    var wsElements = [
+      'pre',
+      'script',
+      'textarea',
+      'style'
+    ];
+    var lazyLookup = function (items) {
+      var lookup;
+      return function (node) {
+        lookup = lookup ? lookup : mapToObject(items, constant(true));
+        return lookup.hasOwnProperty(name(node));
+      };
+    };
+    var isHeading = lazyLookup(headings);
+    var isBlock = lazyLookup(blocks);
+    var isTable$1 = function (node) {
+      return name(node) === 'table';
+    };
+    var isInline = function (node) {
+      return isElement(node) && !isBlock(node);
+    };
+    var isBr$1 = function (node) {
+      return isElement(node) && name(node) === 'br';
+    };
+    var isTextBlock = lazyLookup(textBlocks);
+    var isList = lazyLookup(lists);
+    var isListItem = lazyLookup(listItems);
+    var isVoid = lazyLookup(voids);
+    var isTableSection = lazyLookup(tableSections);
+    var isTableCell = lazyLookup(tableCells);
+    var isWsPreserveElement = lazyLookup(wsElements);
+
+    var surroundedBySpans = function (node) {
+      var previousIsSpan = node.previousSibling && node.previousSibling.nodeName === 'SPAN';
+      var nextIsSpan = node.nextSibling && node.nextSibling.nodeName === 'SPAN';
+      return previousIsSpan && nextIsSpan;
+    };
+    var isBookmarkNode = function (node) {
+      return node && node.tagName === 'SPAN' && node.getAttribute('data-mce-type') === 'bookmark';
+    };
+    var trimNode = function (dom, node) {
+      var i, children = node.childNodes;
+      if (isElement$1(node) && isBookmarkNode(node)) {
+        return;
+      }
+      for (i = children.length - 1; i >= 0; i--) {
+        trimNode(dom, children[i]);
+      }
+      if (isDocument(node) === false) {
+        if (isText$1(node) && node.nodeValue.length > 0) {
+          var trimmedLength = Tools.trim(node.nodeValue).length;
+          if (dom.isBlock(node.parentNode) || trimmedLength > 0) {
+            return;
+          }
+          if (trimmedLength === 0 && surroundedBySpans(node)) {
+            return;
+          }
+        } else if (isElement$1(node)) {
+          children = node.childNodes;
+          if (children.length === 1 && isBookmarkNode(children[0])) {
+            node.parentNode.insertBefore(children[0], node);
+          }
+          if (children.length || isVoid(Element.fromDom(node))) {
+            return;
+          }
+        }
+        dom.remove(node);
+      }
+      return node;
+    };
+
+    var makeMap$1 = Tools.makeMap;
+    var namedEntities, baseEntities, reverseEntities;
+    var attrsCharsRegExp = /[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
+    var textCharsRegExp = /[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
+    var rawCharsRegExp = /[<>&\"\']/g;
+    var entityRegExp = /&#([a-z0-9]+);?|&([a-z0-9]+);/gi;
+    var asciiMap = {
+      128: '\u20AC',
+      130: '\u201A',
+      131: '\u0192',
+      132: '\u201E',
+      133: '\u2026',
+      134: '\u2020',
+      135: '\u2021',
+      136: '\u02c6',
+      137: '\u2030',
+      138: '\u0160',
+      139: '\u2039',
+      140: '\u0152',
+      142: '\u017d',
+      145: '\u2018',
+      146: '\u2019',
+      147: '\u201C',
+      148: '\u201D',
+      149: '\u2022',
+      150: '\u2013',
+      151: '\u2014',
+      152: '\u02DC',
+      153: '\u2122',
+      154: '\u0161',
+      155: '\u203A',
+      156: '\u0153',
+      158: '\u017e',
+      159: '\u0178'
+    };
+    baseEntities = {
+      '"': '&quot;',
+      '\'': '&#39;',
+      '<': '&lt;',
+      '>': '&gt;',
+      '&': '&amp;',
+      '`': '&#96;'
+    };
+    reverseEntities = {
+      '&lt;': '<',
+      '&gt;': '>',
+      '&amp;': '&',
+      '&quot;': '"',
+      '&apos;': '\''
+    };
+    var nativeDecode = function (text) {
+      var elm;
+      elm = Element.fromTag('div').dom();
+      elm.innerHTML = text;
+      return elm.textContent || elm.innerText || text;
+    };
+    var buildEntitiesLookup = function (items, radix) {
+      var i, chr, entity;
+      var lookup = {};
+      if (items) {
+        items = items.split(',');
+        radix = radix || 10;
+        for (i = 0; i < items.length; i += 2) {
+          chr = String.fromCharCode(parseInt(items[i], radix));
+          if (!baseEntities[chr]) {
+            entity = '&' + items[i + 1] + ';';
+            lookup[chr] = entity;
+            lookup[entity] = chr;
+          }
+        }
+        return lookup;
+      }
+    };
+    namedEntities = buildEntitiesLookup('50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,' + '5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,' + '5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,' + '5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,' + '68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,' + '6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,' + '6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,' + '75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,' + '7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,' + '7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,' + 'sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,' + 'st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,' + 't9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,' + 'tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,' + 'u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,' + '81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,' + '8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,' + '8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,' + '8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,' + '8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,' + 'nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,' + 'rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,' + 'Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,' + '80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,' + '811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro', 32);
+    var encodeRaw = function (text, attr) {
+      return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function (chr) {
+        return baseEntities[chr] || chr;
+      });
+    };
+    var encodeAllRaw = function (text) {
+      return ('' + text).replace(rawCharsRegExp, function (chr) {
+        return baseEntities[chr] || chr;
+      });
+    };
+    var encodeNumeric = function (text, attr) {
+      return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function (chr) {
+        if (chr.length > 1) {
+          return '&#' + ((chr.charCodeAt(0) - 55296) * 1024 + (chr.charCodeAt(1) - 56320) + 65536) + ';';
+        }
+        return baseEntities[chr] || '&#' + chr.charCodeAt(0) + ';';
+      });
+    };
+    var encodeNamed = function (text, attr, entities) {
+      entities = entities || namedEntities;
+      return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function (chr) {
+        return baseEntities[chr] || entities[chr] || chr;
+      });
+    };
+    var getEncodeFunc = function (name, entities) {
+      var entitiesMap = buildEntitiesLookup(entities) || namedEntities;
+      var encodeNamedAndNumeric = function (text, attr) {
+        return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function (chr) {
+          if (baseEntities[chr] !== undefined) {
+            return baseEntities[chr];
+          }
+          if (entitiesMap[chr] !== undefined) {
+            return entitiesMap[chr];
+          }
+          if (chr.length > 1) {
+            return '&#' + ((chr.charCodeAt(0) - 55296) * 1024 + (chr.charCodeAt(1) - 56320) + 65536) + ';';
+          }
+          return '&#' + chr.charCodeAt(0) + ';';
+        });
+      };
+      var encodeCustomNamed = function (text, attr) {
+        return encodeNamed(text, attr, entitiesMap);
+      };
+      var nameMap = makeMap$1(name.replace(/\+/g, ','));
+      if (nameMap.named && nameMap.numeric) {
+        return encodeNamedAndNumeric;
+      }
+      if (nameMap.named) {
+        if (entities) {
+          return encodeCustomNamed;
+        }
+        return encodeNamed;
+      }
+      if (nameMap.numeric) {
+        return encodeNumeric;
+      }
+      return encodeRaw;
+    };
+    var decode = function (text) {
+      return text.replace(entityRegExp, function (all, numeric) {
+        if (numeric) {
+          if (numeric.charAt(0).toLowerCase() === 'x') {
+            numeric = parseInt(numeric.substr(1), 16);
+          } else {
+            numeric = parseInt(numeric, 10);
+          }
+          if (numeric > 65535) {
+            numeric -= 65536;
+            return String.fromCharCode(55296 + (numeric >> 10), 56320 + (numeric & 1023));
+          }
+          return asciiMap[numeric] || String.fromCharCode(numeric);
+        }
+        return reverseEntities[all] || namedEntities[all] || nativeDecode(all);
+      });
+    };
+    var Entities = {
+      encodeRaw: encodeRaw,
+      encodeAllRaw: encodeAllRaw,
+      encodeNumeric: encodeNumeric,
+      encodeNamed: encodeNamed,
+      getEncodeFunc: getEncodeFunc,
+      decode: decode
+    };
+
+    var mapCache = {}, dummyObj = {};
+    var makeMap$2 = Tools.makeMap, each$3 = Tools.each, extend$1 = Tools.extend, explode$1 = Tools.explode, inArray = Tools.inArray;
+    var split = function (items, delim) {
+      items = Tools.trim(items);
+      return items ? items.split(delim || ' ') : [];
+    };
+    var compileSchema = function (type) {
+      var schema = {};
+      var globalAttributes, blockContent;
+      var phrasingContent, flowContent, html4BlockContent, html4PhrasingContent;
+      var add = function (name, attributes, children) {
+        var ni, attributesOrder, element;
+        var arrayToMap = function (array, obj) {
+          var map = {};
+          var i, l;
+          for (i = 0, l = array.length; i < l; i++) {
+            map[array[i]] = obj || {};
+          }
+          return map;
+        };
+        children = children || [];
+        attributes = attributes || '';
+        if (typeof children === 'string') {
+          children = split(children);
+        }
+        name = split(name);
+        ni = name.length;
+        while (ni--) {
+          attributesOrder = split([
+            globalAttributes,
+            attributes
+          ].join(' '));
+          element = {
+            attributes: arrayToMap(attributesOrder),
+            attributesOrder: attributesOrder,
+            children: arrayToMap(children, dummyObj)
+          };
+          schema[name[ni]] = element;
+        }
+      };
+      var addAttrs = function (name, attributes) {
+        var ni, schemaItem, i, l;
+        name = split(name);
+        ni = name.length;
+        attributes = split(attributes);
+        while (ni--) {
+          schemaItem = schema[name[ni]];
+          for (i = 0, l = attributes.length; i < l; i++) {
+            schemaItem.attributes[attributes[i]] = {};
+            schemaItem.attributesOrder.push(attributes[i]);
+          }
+        }
+      };
+      if (mapCache[type]) {
+        return mapCache[type];
+      }
+      globalAttributes = 'id accesskey class dir lang style tabindex title role';
+      blockContent = 'address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul';
+      phrasingContent = 'a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd ' + 'label map noscript object q s samp script select small span strong sub sup ' + 'textarea u var #text #comment';
+      if (type !== 'html4') {
+        globalAttributes += ' contenteditable contextmenu draggable dropzone ' + 'hidden spellcheck translate';
+        blockContent += ' article aside details dialog figure main header footer hgroup section nav';
+        phrasingContent += ' audio canvas command datalist mark meter output picture ' + 'progress time wbr video ruby bdi keygen';
+      }
+      if (type !== 'html5-strict') {
+        globalAttributes += ' xml:lang';
+        html4PhrasingContent = 'acronym applet basefont big font strike tt';
+        phrasingContent = [
+          phrasingContent,
+          html4PhrasingContent
+        ].join(' ');
+        each$3(split(html4PhrasingContent), function (name) {
+          add(name, '', phrasingContent);
+        });
+        html4BlockContent = 'center dir isindex noframes';
+        blockContent = [
+          blockContent,
+          html4BlockContent
+        ].join(' ');
+        flowContent = [
+          blockContent,
+          phrasingContent
+        ].join(' ');
+        each$3(split(html4BlockContent), function (name) {
+          add(name, '', flowContent);
+        });
+      }
+      flowContent = flowContent || [
+        blockContent,
+        phrasingContent
+      ].join(' ');
+      add('html', 'manifest', 'head body');
+      add('head', '', 'base command link meta noscript script style title');
+      add('title hr noscript br');
+      add('base', 'href target');
+      add('link', 'href rel media hreflang type sizes hreflang');
+      add('meta', 'name http-equiv content charset');
+      add('style', 'media type scoped');
+      add('script', 'src async defer type charset');
+      add('body', 'onafterprint onbeforeprint onbeforeunload onblur onerror onfocus ' + 'onhashchange onload onmessage onoffline ononline onpagehide onpageshow ' + 'onpopstate onresize onscroll onstorage onunload', flowContent);
+      add('address dt dd div caption', '', flowContent);
+      add('h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn', '', phrasingContent);
+      add('blockquote', 'cite', flowContent);
+      add('ol', 'reversed start type', 'li');
+      add('ul', '', 'li');
+      add('li', 'value', flowContent);
+      add('dl', '', 'dt dd');
+      add('a', 'href target rel media hreflang type', phrasingContent);
+      add('q', 'cite', phrasingContent);
+      add('ins del', 'cite datetime', flowContent);
+      add('img', 'src sizes srcset alt usemap ismap width height');
+      add('iframe', 'src name width height', flowContent);
+      add('embed', 'src type width height');
+      add('object', 'data type typemustmatch name usemap form width height', [
+        flowContent,
+        'param'
+      ].join(' '));
+      add('param', 'name value');
+      add('map', 'name', [
+        flowContent,
+        'area'
+      ].join(' '));
+      add('area', 'alt coords shape href target rel media hreflang type');
+      add('table', 'border', 'caption colgroup thead tfoot tbody tr' + (type === 'html4' ? ' col' : ''));
+      add('colgroup', 'span', 'col');
+      add('col', 'span');
+      add('tbody thead tfoot', '', 'tr');
+      add('tr', '', 'td th');
+      add('td', 'colspan rowspan headers', flowContent);
+      add('th', 'colspan rowspan headers scope abbr', flowContent);
+      add('form', 'accept-charset action autocomplete enctype method name novalidate target', flowContent);
+      add('fieldset', 'disabled form name', [
+        flowContent,
+        'legend'
+      ].join(' '));
+      add('label', 'form for', phrasingContent);
+      add('input', 'accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate ' + 'formtarget height list max maxlength min multiple name pattern readonly required size src step type value width');
+      add('button', 'disabled form formaction formenctype formmethod formnovalidate formtarget name type value', type === 'html4' ? flowContent : phrasingContent);
+      add('select', 'disabled form multiple name required size', 'option optgroup');
+      add('optgroup', 'disabled label', 'option');
+      add('option', 'disabled label selected value');
+      add('textarea', 'cols dirname disabled form maxlength name readonly required rows wrap');
+      add('menu', 'type label', [
+        flowContent,
+        'li'
+      ].join(' '));
+      add('noscript', '', flowContent);
+      if (type !== 'html4') {
+        add('wbr');
+        add('ruby', '', [
+          phrasingContent,
+          'rt rp'
+        ].join(' '));
+        add('figcaption', '', flowContent);
+        add('mark rt rp summary bdi', '', phrasingContent);
+        add('canvas', 'width height', flowContent);
+        add('video', 'src crossorigin poster preload autoplay mediagroup loop ' + 'muted controls width height buffered', [
+          flowContent,
+          'track source'
+        ].join(' '));
+        add('audio', 'src crossorigin preload autoplay mediagroup loop muted controls ' + 'buffered volume', [
+          flowContent,
+          'track source'
+        ].join(' '));
+        add('picture', '', 'img source');
+        add('source', 'src srcset type media sizes');
+        add('track', 'kind src srclang label default');
+        add('datalist', '', [
+          phrasingContent,
+          'option'
+        ].join(' '));
+        add('article section nav aside main header footer', '', flowContent);
+        add('hgroup', '', 'h1 h2 h3 h4 h5 h6');
+        add('figure', '', [
+          flowContent,
+          'figcaption'
+        ].join(' '));
+        add('time', 'datetime', phrasingContent);
+        add('dialog', 'open', flowContent);
+        add('command', 'type label icon disabled checked radiogroup command');
+        add('output', 'for form name', phrasingContent);
+        add('progress', 'value max', phrasingContent);
+        add('meter', 'value min max low high optimum', phrasingContent);
+        add('details', 'open', [
+          flowContent,
+          'summary'
+        ].join(' '));
+        add('keygen', 'autofocus challenge disabled form keytype name');
+      }
+      if (type !== 'html5-strict') {
+        addAttrs('script', 'language xml:space');
+        addAttrs('style', 'xml:space');
+        addAttrs('object', 'declare classid code codebase codetype archive standby align border hspace vspace');
+        addAttrs('embed', 'align name hspace vspace');
+        addAttrs('param', 'valuetype type');
+        addAttrs('a', 'charset name rev shape coords');
+        addAttrs('br', 'clear');
+        addAttrs('applet', 'codebase archive code object alt name width height align hspace vspace');
+        addAttrs('img', 'name longdesc align border hspace vspace');
+        addAttrs('iframe', 'longdesc frameborder marginwidth marginheight scrolling align');
+        addAttrs('font basefont', 'size color face');
+        addAttrs('input', 'usemap align');
+        addAttrs('select');
+        addAttrs('textarea');
+        addAttrs('h1 h2 h3 h4 h5 h6 div p legend caption', 'align');
+        addAttrs('ul', 'type compact');
+        addAttrs('li', 'type');
+        addAttrs('ol dl menu dir', 'compact');
+        addAttrs('pre', 'width xml:space');
+        addAttrs('hr', 'align noshade size width');
+        addAttrs('isindex', 'prompt');
+        addAttrs('table', 'summary width frame rules cellspacing cellpadding align bgcolor');
+        addAttrs('col', 'width align char charoff valign');
+        addAttrs('colgroup', 'width align char charoff valign');
+        addAttrs('thead', 'align char charoff valign');
+        addAttrs('tr', 'align char charoff valign bgcolor');
+        addAttrs('th', 'axis align char charoff valign nowrap bgcolor width height');
+        addAttrs('form', 'accept');
+        addAttrs('td', 'abbr axis scope align char charoff valign nowrap bgcolor width height');
+        addAttrs('tfoot', 'align char charoff valign');
+        addAttrs('tbody', 'align char charoff valign');
+        addAttrs('area', 'nohref');
+        addAttrs('body', 'background bgcolor text link vlink alink');
+      }
+      if (type !== 'html4') {
+        addAttrs('input button select textarea', 'autofocus');
+        addAttrs('input textarea', 'placeholder');
+        addAttrs('a', 'download');
+        addAttrs('link script img', 'crossorigin');
+        addAttrs('img', 'loading');
+        addAttrs('iframe', 'sandbox seamless allowfullscreen loading');
+      }
+      each$3(split('a form meter progress dfn'), function (name) {
+        if (schema[name]) {
+          delete schema[name].children[name];
+        }
+      });
+      delete schema.caption.children.table;
+      delete schema.script;
+      mapCache[type] = schema;
+      return schema;
+    };
+    var compileElementMap = function (value, mode) {
+      var styles;
+      if (value) {
+        styles = {};
+        if (typeof value === 'string') {
+          value = { '*': value };
+        }
+        each$3(value, function (value, key) {
+          styles[key] = styles[key.toUpperCase()] = mode === 'map' ? makeMap$2(value, /[, ]/) : explode$1(value, /[, ]/);
+        });
+      }
+      return styles;
+    };
+    function Schema(settings) {
+      var elements = {};
+      var children = {};
+      var patternElements = [];
+      var validStyles;
+      var invalidStyles;
+      var schemaItems;
+      var whiteSpaceElementsMap, selfClosingElementsMap, shortEndedElementsMap, boolAttrMap, validClasses;
+      var blockElementsMap, nonEmptyElementsMap, moveCaretBeforeOnEnterElementsMap, textBlockElementsMap, textInlineElementsMap;
+      var customElementsMap = {}, specialElements = {};
+      var createLookupTable = function (option, defaultValue, extendWith) {
+        var value = settings[option];
+        if (!value) {
+          value = mapCache[option];
+          if (!value) {
+            value = makeMap$2(defaultValue, ' ', makeMap$2(defaultValue.toUpperCase(), ' '));
+            value = extend$1(value, extendWith);
+            mapCache[option] = value;
+          }
+        } else {
+          value = makeMap$2(value, /[, ]/, makeMap$2(value.toUpperCase(), /[, ]/));
+        }
+        return value;
+      };
+      settings = settings || {};
+      schemaItems = compileSchema(settings.schema);
+      if (settings.verify_html === false) {
+        settings.valid_elements = '*[*]';
+      }
+      validStyles = compileElementMap(settings.valid_styles);
+      invalidStyles = compileElementMap(settings.invalid_styles, 'map');
+      validClasses = compileElementMap(settings.valid_classes, 'map');
+      whiteSpaceElementsMap = createLookupTable('whitespace_elements', 'pre script noscript style textarea video audio iframe object code');
+      selfClosingElementsMap = createLookupTable('self_closing_elements', 'colgroup dd dt li option p td tfoot th thead tr');
+      shortEndedElementsMap = createLookupTable('short_ended_elements', 'area base basefont br col frame hr img input isindex link ' + 'meta param embed source wbr track');
+      boolAttrMap = createLookupTable('boolean_attributes', 'checked compact declare defer disabled ismap multiple nohref noresize ' + 'noshade nowrap readonly selected autoplay loop controls');
+      nonEmptyElementsMap = createLookupTable('non_empty_elements', 'td th iframe video audio object ' + 'script pre code', shortEndedElementsMap);
+      moveCaretBeforeOnEnterElementsMap = createLookupTable('move_caret_before_on_enter_elements', 'table', nonEmptyElementsMap);
+      textBlockElementsMap = createLookupTable('text_block_elements', 'h1 h2 h3 h4 h5 h6 p div address pre form ' + 'blockquote center dir fieldset header footer article section hgroup aside main nav figure');
+      blockElementsMap = createLookupTable('block_elements', 'hr table tbody thead tfoot ' + 'th tr td li ol ul caption dl dt dd noscript menu isindex option ' + 'datalist select optgroup figcaption details summary', textBlockElementsMap);
+      textInlineElementsMap = createLookupTable('text_inline_elements', 'span strong b em i font strike u var cite ' + 'dfn code mark q sup sub samp');
+      each$3((settings.special || 'script noscript noframes noembed title style textarea xmp').split(' '), function (name) {
+        specialElements[name] = new RegExp('</' + name + '[^>]*>', 'gi');
+      });
+      var patternToRegExp = function (str) {
+        return new RegExp('^' + str.replace(/([?+*])/g, '.$1') + '$');
+      };
+      var addValidElements = function (validElements) {
+        var ei, el, ai, al, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder, prefix, outputName, globalAttributes, globalAttributesOrder, value;
+        var elementRuleRegExp = /^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/, attrRuleRegExp = /^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/, hasPatternsRegExp = /[*?+]/;
+        if (validElements) {
+          validElements = split(validElements, ',');
+          if (elements['@']) {
+            globalAttributes = elements['@'].attributes;
+            globalAttributesOrder = elements['@'].attributesOrder;
+          }
+          for (ei = 0, el = validElements.length; ei < el; ei++) {
+            matches = elementRuleRegExp.exec(validElements[ei]);
+            if (matches) {
+              prefix = matches[1];
+              elementName = matches[2];
+              outputName = matches[3];
+              attrData = matches[5];
+              attributes = {};
+              attributesOrder = [];
+              element = {
+                attributes: attributes,
+                attributesOrder: attributesOrder
+              };
+              if (prefix === '#') {
+                element.paddEmpty = true;
+              }
+              if (prefix === '-') {
+                element.removeEmpty = true;
+              }
+              if (matches[4] === '!') {
+                element.removeEmptyAttrs = true;
+              }
+              if (globalAttributes) {
+                each$1(globalAttributes, function (value, key) {
+                  attributes[key] = value;
+                });
+                attributesOrder.push.apply(attributesOrder, globalAttributesOrder);
+              }
+              if (attrData) {
+                attrData = split(attrData, '|');
+                for (ai = 0, al = attrData.length; ai < al; ai++) {
+                  matches = attrRuleRegExp.exec(attrData[ai]);
+                  if (matches) {
+                    attr = {};
+                    attrType = matches[1];
+                    attrName = matches[2].replace(/[\\:]:/g, ':');
+                    prefix = matches[3];
+                    value = matches[4];
+                    if (attrType === '!') {
+                      element.attributesRequired = element.attributesRequired || [];
+                      element.attributesRequired.push(attrName);
+                      attr.required = true;
+                    }
+                    if (attrType === '-') {
+                      delete attributes[attrName];
+                      attributesOrder.splice(inArray(attributesOrder, attrName), 1);
+                      continue;
+                    }
+                    if (prefix) {
+                      if (prefix === '=') {
+                        element.attributesDefault = element.attributesDefault || [];
+                        element.attributesDefault.push({
+                          name: attrName,
+                          value: value
+                        });
+                        attr.defaultValue = value;
+                      }
+                      if (prefix === ':') {
+                        element.attributesForced = element.attributesForced || [];
+                        element.attributesForced.push({
+                          name: attrName,
+                          value: value
+                        });
+                        attr.forcedValue = value;
+                      }
+                      if (prefix === '<') {
+                        attr.validValues = makeMap$2(value, '?');
+                      }
+                    }
+                    if (hasPatternsRegExp.test(attrName)) {
+                      element.attributePatterns = element.attributePatterns || [];
+                      attr.pattern = patternToRegExp(attrName);
+                      element.attributePatterns.push(attr);
+                    } else {
+                      if (!attributes[attrName]) {
+                        attributesOrder.push(attrName);
+                      }
+                      attributes[attrName] = attr;
+                    }
+                  }
+                }
+              }
+              if (!globalAttributes && elementName === '@') {
+                globalAttributes = attributes;
+                globalAttributesOrder = attributesOrder;
+              }
+              if (outputName) {
+                element.outputName = elementName;
+                elements[outputName] = element;
+              }
+              if (hasPatternsRegExp.test(elementName)) {
+                element.pattern = patternToRegExp(elementName);
+                patternElements.push(element);
+              } else {
+                elements[elementName] = element;
+              }
+            }
+          }
+        }
+      };
+      var setValidElements = function (validElements) {
+        elements = {};
+        patternElements = [];
+        addValidElements(validElements);
+        each$3(schemaItems, function (element, name) {
+          children[name] = element.children;
+        });
+      };
+      var addCustomElements = function (customElements) {
+        var customElementRegExp = /^(~)?(.+)$/;
+        if (customElements) {
+          mapCache.text_block_elements = mapCache.block_elements = null;
+          each$3(split(customElements, ','), function (rule) {
+            var matches = customElementRegExp.exec(rule), inline = matches[1] === '~', cloneName = inline ? 'span' : 'div', name = matches[2];
+            children[name] = children[cloneName];
+            customElementsMap[name] = cloneName;
+            if (!inline) {
+              blockElementsMap[name.toUpperCase()] = {};
+              blockElementsMap[name] = {};
+            }
+            if (!elements[name]) {
+              var customRule = elements[cloneName];
+              customRule = extend$1({}, customRule);
+              delete customRule.removeEmptyAttrs;
+              delete customRule.removeEmpty;
+              elements[name] = customRule;
+            }
+            each$3(children, function (element, elmName) {
+              if (element[cloneName]) {
+                children[elmName] = element = extend$1({}, children[elmName]);
+                element[name] = element[cloneName];
+              }
+            });
+          });
+        }
+      };
+      var addValidChildren = function (validChildren) {
+        var childRuleRegExp = /^([+\-]?)(\w+)\[([^\]]+)\]$/;
+        mapCache[settings.schema] = null;
+        if (validChildren) {
+          each$3(split(validChildren, ','), function (rule) {
+            var matches = childRuleRegExp.exec(rule);
+            var parent, prefix;
+            if (matches) {
+              prefix = matches[1];
+              if (prefix) {
+                parent = children[matches[2]];
+              } else {
+                parent = children[matches[2]] = { '#comment': {} };
+              }
+              parent = children[matches[2]];
+              each$3(split(matches[3], '|'), function (child) {
+                if (prefix === '-') {
+                  delete parent[child];
+                } else {
+                  parent[child] = {};
+                }
+              });
+            }
+          });
+        }
+      };
+      var getElementRule = function (name) {
+        var element = elements[name], i;
+        if (element) {
+          return element;
+        }
+        i = patternElements.length;
+        while (i--) {
+          element = patternElements[i];
+          if (element.pattern.test(name)) {
+            return element;
+          }
+        }
+      };
+      if (!settings.valid_elements) {
+        each$3(schemaItems, function (element, name) {
+          elements[name] = {
+            attributes: element.attributes,
+            attributesOrder: element.attributesOrder
+          };
+          children[name] = element.children;
+        });
+        if (settings.schema !== 'html5') {
+          each$3(split('strong/b em/i'), function (item) {
+            item = split(item, '/');
+            elements[item[1]].outputName = item[0];
+          });
+        }
+        each$3(split('ol ul sub sup blockquote span font a table tbody tr strong em b i'), function (name) {
+          if (elements[name]) {
+            elements[name].removeEmpty = true;
+          }
+        });
+        each$3(split('p h1 h2 h3 h4 h5 h6 th td pre div address caption li'), function (name) {
+          elements[name].paddEmpty = true;
+        });
+        each$3(split('span'), function (name) {
+          elements[name].removeEmptyAttrs = true;
+        });
+      } else {
+        setValidElements(settings.valid_elements);
+      }
+      addCustomElements(settings.custom_elements);
+      addValidChildren(settings.valid_children);
+      addValidElements(settings.extended_valid_elements);
+      addValidChildren('+ol[ul|ol],+ul[ul|ol]');
+      each$3({
+        dd: 'dl',
+        dt: 'dl',
+        li: 'ul ol',
+        td: 'tr',
+        th: 'tr',
+        tr: 'tbody thead tfoot',
+        tbody: 'table',
+        thead: 'table',
+        tfoot: 'table',
+        legend: 'fieldset',
+        area: 'map',
+        param: 'video audio object'
+      }, function (parents, item) {
+        if (elements[item]) {
+          elements[item].parentsRequired = split(parents);
+        }
+      });
+      if (settings.invalid_elements) {
+        each$3(explode$1(settings.invalid_elements), function (item) {
+          if (elements[item]) {
+            delete elements[item];
+          }
+        });
+      }
+      if (!getElementRule('span')) {
+        addValidElements('span[!data-mce-type|*]');
+      }
+      var getValidStyles = function () {
+        return validStyles;
+      };
+      var getInvalidStyles = function () {
+        return invalidStyles;
+      };
+      var getValidClasses = function () {
+        return validClasses;
+      };
+      var getBoolAttrs = function () {
+        return boolAttrMap;
+      };
+      var getBlockElements = function () {
+        return blockElementsMap;
+      };
+      var getTextBlockElements = function () {
+        return textBlockElementsMap;
+      };
+      var getTextInlineElements = function () {
+        return textInlineElementsMap;
+      };
+      var getShortEndedElements = function () {
+        return shortEndedElementsMap;
+      };
+      var getSelfClosingElements = function () {
+        return selfClosingElementsMap;
+      };
+      var getNonEmptyElements = function () {
+        return nonEmptyElementsMap;
+      };
+      var getMoveCaretBeforeOnEnterElements = function () {
+        return moveCaretBeforeOnEnterElementsMap;
+      };
+      var getWhiteSpaceElements = function () {
+        return whiteSpaceElementsMap;
+      };
+      var getSpecialElements = function () {
+        return specialElements;
+      };
+      var isValidChild = function (name, child) {
+        var parent = children[name.toLowerCase()];
+        return !!(parent && parent[child.toLowerCase()]);
+      };
+      var isValid = function (name, attr) {
+        var attrPatterns, i;
+        var rule = getElementRule(name);
+        if (rule) {
+          if (attr) {
+            if (rule.attributes[attr]) {
+              return true;
+            }
+            attrPatterns = rule.attributePatterns;
+            if (attrPatterns) {
+              i = attrPatterns.length;
+              while (i--) {
+                if (attrPatterns[i].pattern.test(name)) {
+                  return true;
+                }
+              }
+            }
+          } else {
+            return true;
+          }
+        }
+        return false;
+      };
+      var getCustomElements = function () {
+        return customElementsMap;
+      };
+      return {
+        children: children,
+        elements: elements,
+        getValidStyles: getValidStyles,
+        getValidClasses: getValidClasses,
+        getBlockElements: getBlockElements,
+        getInvalidStyles: getInvalidStyles,
+        getShortEndedElements: getShortEndedElements,
+        getTextBlockElements: getTextBlockElements,
+        getTextInlineElements: getTextInlineElements,
+        getBoolAttrs: getBoolAttrs,
+        getElementRule: getElementRule,
+        getSelfClosingElements: getSelfClosingElements,
+        getNonEmptyElements: getNonEmptyElements,
+        getMoveCaretBeforeOnEnterElements: getMoveCaretBeforeOnEnterElements,
+        getWhiteSpaceElements: getWhiteSpaceElements,
+        getSpecialElements: getSpecialElements,
+        isValidChild: isValidChild,
+        isValid: isValid,
+        getCustomElements: getCustomElements,
+        addValidElements: addValidElements,
+        setValidElements: setValidElements,
+        addCustomElements: addCustomElements,
+        addValidChildren: addValidChildren
+      };
+    }
+
+    var zeroWidth = '\uFEFF';
+    var nbsp = '\xA0';
+    var isZwsp = function (char) {
+      return char === zeroWidth;
+    };
+    var removeZwsp = function (s) {
+      return s.replace(/\uFEFF/g, '');
+    };
+
+    var toHex = function (match, r, g, b) {
+      var hex = function (val) {
+        val = parseInt(val, 10).toString(16);
+        return val.length > 1 ? val : '0' + val;
+      };
+      return '#' + hex(r) + hex(g) + hex(b);
+    };
+    var Styles = function (settings, schema) {
+      var rgbRegExp = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi;
+      var urlOrStrRegExp = /(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi;
+      var styleRegExp = /\s*([^:]+):\s*([^;]+);?/g;
+      var trimRightRegExp = /\s+$/;
+      var i;
+      var encodingLookup = {};
+      var encodingItems;
+      var validStyles;
+      var invalidStyles;
+      var invisibleChar = zeroWidth;
+      settings = settings || {};
+      if (schema) {
+        validStyles = schema.getValidStyles();
+        invalidStyles = schema.getInvalidStyles();
+      }
+      encodingItems = ('\\" \\\' \\; \\: ; : ' + invisibleChar).split(' ');
+      for (i = 0; i < encodingItems.length; i++) {
+        encodingLookup[encodingItems[i]] = invisibleChar + i;
+        encodingLookup[invisibleChar + i] = encodingItems[i];
+      }
+      return {
+        toHex: function (color) {
+          return color.replace(rgbRegExp, toHex);
+        },
+        parse: function (css) {
+          var styles = {};
+          var matches, name, value, isEncoded;
+          var urlConverter = settings.url_converter;
+          var urlConverterScope = settings.url_converter_scope || this;
+          var compress = function (prefix, suffix, noJoin) {
+            var top, right, bottom, left;
+            top = styles[prefix + '-top' + suffix];
+            if (!top) {
+              return;
+            }
+            right = styles[prefix + '-right' + suffix];
+            if (!right) {
+              return;
+            }
+            bottom = styles[prefix + '-bottom' + suffix];
+            if (!bottom) {
+              return;
+            }
+            left = styles[prefix + '-left' + suffix];
+            if (!left) {
+              return;
+            }
+            var box = [
+              top,
+              right,
+              bottom,
+              left
+            ];
+            i = box.length - 1;
+            while (i--) {
+              if (box[i] !== box[i + 1]) {
+                break;
+              }
+            }
+            if (i > -1 && noJoin) {
+              return;
+            }
+            styles[prefix + suffix] = i === -1 ? box[0] : box.join(' ');
+            delete styles[prefix + '-top' + suffix];
+            delete styles[prefix + '-right' + suffix];
+            delete styles[prefix + '-bottom' + suffix];
+            delete styles[prefix + '-left' + suffix];
+          };
+          var canCompress = function (key) {
+            var value = styles[key], i;
+            if (!value) {
+              return;
+            }
+            value = value.split(' ');
+            i = value.length;
+            while (i--) {
+              if (value[i] !== value[0]) {
+                return false;
+              }
+            }
+            styles[key] = value[0];
+            return true;
+          };
+          var compress2 = function (target, a, b, c) {
+            if (!canCompress(a)) {
+              return;
+            }
+            if (!canCompress(b)) {
+              return;
+            }
+            if (!canCompress(c)) {
+              return;
+            }
+            styles[target] = styles[a] + ' ' + styles[b] + ' ' + styles[c];
+            delete styles[a];
+            delete styles[b];
+            delete styles[c];
+          };
+          var encode = function (str) {
+            isEncoded = true;
+            return encodingLookup[str];
+          };
+          var decode = function (str, keepSlashes) {
+            if (isEncoded) {
+              str = str.replace(/\uFEFF[0-9]/g, function (str) {
+                return encodingLookup[str];
+              });
+            }
+            if (!keepSlashes) {
+              str = str.replace(/\\([\'\";:])/g, '$1');
+            }
+            return str;
+          };
+          var decodeSingleHexSequence = function (escSeq) {
+            return String.fromCharCode(parseInt(escSeq.slice(1), 16));
+          };
+          var decodeHexSequences = function (value) {
+            return value.replace(/\\[0-9a-f]+/gi, decodeSingleHexSequence);
+          };
+          var processUrl = function (match, url, url2, url3, str, str2) {
+            str = str || str2;
+            if (str) {
+              str = decode(str);
+              return '\'' + str.replace(/\'/g, '\\\'') + '\'';
+            }
+            url = decode(url || url2 || url3);
+            if (!settings.allow_script_urls) {
+              var scriptUrl = url.replace(/[\s\r\n]+/g, '');
+              if (/(java|vb)script:/i.test(scriptUrl)) {
+                return '';
+              }
+              if (!settings.allow_svg_data_urls && /^data:image\/svg/i.test(scriptUrl)) {
+                return '';
+              }
+            }
+            if (urlConverter) {
+              url = urlConverter.call(urlConverterScope, url, 'style');
+            }
+            return 'url(\'' + url.replace(/\'/g, '\\\'') + '\')';
+          };
+          if (css) {
+            css = css.replace(/[\u0000-\u001F]/g, '');
+            css = css.replace(/\\[\"\';:\uFEFF]/g, encode).replace(/\"[^\"]+\"|\'[^\']+\'/g, function (str) {
+              return str.replace(/[;:]/g, encode);
+            });
+            while (matches = styleRegExp.exec(css)) {
+              styleRegExp.lastIndex = matches.index + matches[0].length;
+              name = matches[1].replace(trimRightRegExp, '').toLowerCase();
+              value = matches[2].replace(trimRightRegExp, '');
+              if (name && value) {
+                name = decodeHexSequences(name);
+                value = decodeHexSequences(value);
+                if (name.indexOf(invisibleChar) !== -1 || name.indexOf('"') !== -1) {
+                  continue;
+                }
+                if (!settings.allow_script_urls && (name === 'behavior' || /expression\s*\(|\/\*|\*\//.test(value))) {
+                  continue;
+                }
+                if (name === 'font-weight' && value === '700') {
+                  value = 'bold';
+                } else if (name === 'color' || name === 'background-color') {
+                  value = value.toLowerCase();
+                }
+                value = value.replace(rgbRegExp, toHex);
+                value = value.replace(urlOrStrRegExp, processUrl);
+                styles[name] = isEncoded ? decode(value, true) : value;
+              }
+            }
+            compress('border', '', true);
+            compress('border', '-width');
+            compress('border', '-color');
+            compress('border', '-style');
+            compress('padding', '');
+            compress('margin', '');
+            compress2('border', 'border-width', 'border-style', 'border-color');
+            if (styles.border === 'medium none') {
+              delete styles.border;
+            }
+            if (styles['border-image'] === 'none') {
+              delete styles['border-image'];
+            }
+          }
+          return styles;
+        },
+        serialize: function (styles, elementName) {
+          var css = '';
+          var serializeStyles = function (name) {
+            var styleList, i, l, value;
+            styleList = validStyles[name];
+            if (styleList) {
+              for (i = 0, l = styleList.length; i < l; i++) {
+                name = styleList[i];
+                value = styles[name];
+                if (value) {
+                  css += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';';
+                }
+              }
+            }
+          };
+          var isValid = function (name, elementName) {
+            var styleMap = invalidStyles['*'];
+            if (styleMap && styleMap[name]) {
+              return false;
+            }
+            styleMap = invalidStyles[elementName];
+            return !(styleMap && styleMap[name]);
+          };
+          if (elementName && validStyles) {
+            serializeStyles('*');
+            serializeStyles(elementName);
+          } else {
+            each$1(styles, function (value, name) {
+              if (value && (!invalidStyles || isValid(name, elementName))) {
+                css += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';';
+              }
+            });
+          }
+          return css;
+        }
+      };
+    };
+
+    var eventExpandoPrefix = 'mce-data-';
+    var mouseEventRe = /^(?:mouse|contextmenu)|click/;
+    var deprecated = {
+      keyLocation: 1,
+      layerX: 1,
+      layerY: 1,
+      returnValue: 1,
+      webkitMovementX: 1,
+      webkitMovementY: 1,
+      keyIdentifier: 1,
+      mozPressure: 1
+    };
+    var hasIsDefaultPrevented = function (event) {
+      return event.isDefaultPrevented === returnTrue || event.isDefaultPrevented === returnFalse;
+    };
+    var returnFalse = function () {
+      return false;
+    };
+    var returnTrue = function () {
+      return true;
+    };
+    var addEvent = function (target, name, callback, capture) {
+      if (target.addEventListener) {
+        target.addEventListener(name, callback, capture || false);
+      } else if (target.attachEvent) {
+        target.attachEvent('on' + name, callback);
+      }
+    };
+    var removeEvent = function (target, name, callback, capture) {
+      if (target.removeEventListener) {
+        target.removeEventListener(name, callback, capture || false);
+      } else if (target.detachEvent) {
+        target.detachEvent('on' + name, callback);
+      }
+    };
+    var getTargetFromShadowDom = function (event, defaultTarget) {
+      if (event.composedPath) {
+        var composedPath = event.composedPath();
+        if (composedPath && composedPath.length > 0) {
+          return composedPath[0];
+        }
+      }
+      return defaultTarget;
+    };
+    var fix = function (originalEvent, data) {
+      var name;
+      var event = data || {};
+      for (name in originalEvent) {
+        if (!deprecated[name]) {
+          event[name] = originalEvent[name];
+        }
+      }
+      if (!event.target) {
+        event.target = event.srcElement || domGlobals.document;
+      }
+      if (Env.experimentalShadowDom) {
+        event.target = getTargetFromShadowDom(originalEvent, event.target);
+      }
+      if (originalEvent && mouseEventRe.test(originalEvent.type) && originalEvent.pageX === undefined && originalEvent.clientX !== undefined) {
+        var eventDoc = event.target.ownerDocument || domGlobals.document;
+        var doc = eventDoc.documentElement;
+        var body = eventDoc.body;
+        event.pageX = originalEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
+        event.pageY = originalEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
+      }
+      event.preventDefault = function () {
+        event.isDefaultPrevented = returnTrue;
+        if (originalEvent) {
+          if (originalEvent.preventDefault) {
+            originalEvent.preventDefault();
+          } else {
+            originalEvent.returnValue = false;
+          }
+        }
+      };
+      event.stopPropagation = function () {
+        event.isPropagationStopped = returnTrue;
+        if (originalEvent) {
+          if (originalEvent.stopPropagation) {
+            originalEvent.stopPropagation();
+          } else {
+            originalEvent.cancelBubble = true;
+          }
+        }
+      };
+      event.stopImmediatePropagation = function () {
+        event.isImmediatePropagationStopped = returnTrue;
+        event.stopPropagation();
+      };
+      if (hasIsDefaultPrevented(event) === false) {
+        event.isDefaultPrevented = returnFalse;
+        event.isPropagationStopped = returnFalse;
+        event.isImmediatePropagationStopped = returnFalse;
+      }
+      if (typeof event.metaKey === 'undefined') {
+        event.metaKey = false;
+      }
+      return event;
+    };
+    var bindOnReady = function (win, callback, eventUtils) {
+      var doc = win.document, event = { type: 'ready' };
+      if (eventUtils.domLoaded) {
+        callback(event);
+        return;
+      }
+      var isDocReady = function () {
+        return doc.readyState === 'complete' || doc.readyState === 'interactive' && doc.body;
+      };
+      var readyHandler = function () {
+        removeEvent(win, 'DOMContentLoaded', readyHandler);
+        removeEvent(win, 'load', readyHandler);
+        if (!eventUtils.domLoaded) {
+          eventUtils.domLoaded = true;
+          callback(event);
+        }
+      };
+      if (isDocReady()) {
+        readyHandler();
+      } else {
+        addEvent(win, 'DOMContentLoaded', readyHandler);
+      }
+      addEvent(win, 'load', readyHandler);
+    };
+    var EventUtils = function () {
+      function EventUtils() {
+        this.domLoaded = false;
+        this.events = {};
+        this.count = 1;
+        this.expando = eventExpandoPrefix + (+new Date()).toString(32);
+        this.hasMouseEnterLeave = 'onmouseenter' in domGlobals.document.documentElement;
+        this.hasFocusIn = 'onfocusin' in domGlobals.document.documentElement;
+        this.count = 1;
+      }
+      EventUtils.prototype.bind = function (target, names, callback, scope) {
+        var self = this;
+        var id, callbackList, i, name, fakeName, nativeHandler, capture;
+        var win = domGlobals.window;
+        var defaultNativeHandler = function (evt) {
+          self.executeHandlers(fix(evt || win.event), id);
+        };
+        if (!target || target.nodeType === 3 || target.nodeType === 8) {
+          return;
+        }
+        if (!target[self.expando]) {
+          id = self.count++;
+          target[self.expando] = id;
+          self.events[id] = {};
+        } else {
+          id = target[self.expando];
+        }
+        scope = scope || target;
+        var namesList = names.split(' ');
+        i = namesList.length;
+        while (i--) {
+          name = namesList[i];
+          nativeHandler = defaultNativeHandler;
+          fakeName = capture = false;
+          if (name === 'DOMContentLoaded') {
+            name = 'ready';
+          }
+          if (self.domLoaded && name === 'ready' && target.readyState === 'complete') {
+            callback.call(scope, fix({ type: name }));
+            continue;
+          }
+          if (!self.hasMouseEnterLeave) {
+            fakeName = self.mouseEnterLeave[name];
+            if (fakeName) {
+              nativeHandler = function (evt) {
+                var current, related;
+                current = evt.currentTarget;
+                related = evt.relatedTarget;
+                if (related && current.contains) {
+                  related = current.contains(related);
+                } else {
+                  while (related && related !== current) {
+                    related = related.parentNode;
+                  }
+                }
+                if (!related) {
+                  evt = fix(evt || win.event);
+                  evt.type = evt.type === 'mouseout' ? 'mouseleave' : 'mouseenter';
+                  evt.target = current;
+                  self.executeHandlers(evt, id);
+                }
+              };
+            }
+          }
+          if (!self.hasFocusIn && (name === 'focusin' || name === 'focusout')) {
+            capture = true;
+            fakeName = name === 'focusin' ? 'focus' : 'blur';
+            nativeHandler = function (evt) {
+              evt = fix(evt || win.event);
+              evt.type = evt.type === 'focus' ? 'focusin' : 'focusout';
+              self.executeHandlers(evt, id);
+            };
+          }
+          callbackList = self.events[id][name];
+          if (!callbackList) {
+            self.events[id][name] = callbackList = [{
+                func: callback,
+                scope: scope
+              }];
+            callbackList.fakeName = fakeName;
+            callbackList.capture = capture;
+            callbackList.nativeHandler = nativeHandler;
+            if (name === 'ready') {
+              bindOnReady(target, nativeHandler, self);
+            } else {
+              addEvent(target, fakeName || name, nativeHandler, capture);
+            }
+          } else {
+            if (name === 'ready' && self.domLoaded) {
+              callback(fix({ type: name }));
+            } else {
+              callbackList.push({
+                func: callback,
+                scope: scope
+              });
+            }
+          }
+        }
+        target = callbackList = 0;
+        return callback;
+      };
+      EventUtils.prototype.unbind = function (target, names, callback) {
+        var id, callbackList, i, ci, name, eventMap;
+        if (!target || target.nodeType === 3 || target.nodeType === 8) {
+          return this;
+        }
+        id = target[this.expando];
+        if (id) {
+          eventMap = this.events[id];
+          if (names) {
+            var namesList = names.split(' ');
+            i = namesList.length;
+            while (i--) {
+              name = namesList[i];
+              callbackList = eventMap[name];
+              if (callbackList) {
+                if (callback) {
+                  ci = callbackList.length;
+                  while (ci--) {
+                    if (callbackList[ci].func === callback) {
+                      var nativeHandler = callbackList.nativeHandler;
+                      var fakeName = callbackList.fakeName, capture = callbackList.capture;
+                      callbackList = callbackList.slice(0, ci).concat(callbackList.slice(ci + 1));
+                      callbackList.nativeHandler = nativeHandler;
+                      callbackList.fakeName = fakeName;
+                      callbackList.capture = capture;
+                      eventMap[name] = callbackList;
+                    }
+                  }
+                }
+                if (!callback || callbackList.length === 0) {
+                  delete eventMap[name];
+                  removeEvent(target, callbackList.fakeName || name, callbackList.nativeHandler, callbackList.capture);
+                }
+              }
+            }
+          } else {
+            each$1(eventMap, function (callbackList, name) {
+              removeEvent(target, callbackList.fakeName || name, callbackList.nativeHandler, callbackList.capture);
+            });
+            eventMap = {};
+          }
+          for (name in eventMap) {
+            if (has(eventMap, name)) {
+              return this;
+            }
+          }
+          delete this.events[id];
+          try {
+            delete target[this.expando];
+          } catch (ex) {
+            target[this.expando] = null;
+          }
+        }
+        return this;
+      };
+      EventUtils.prototype.fire = function (target, name, args) {
+        var id;
+        if (!target || target.nodeType === 3 || target.nodeType === 8) {
+          return this;
+        }
+        var event = fix(null, args);
+        event.type = name;
+        event.target = target;
+        do {
+          id = target[this.expando];
+          if (id) {
+            this.executeHandlers(event, id);
+          }
+          target = target.parentNode || target.ownerDocument || target.defaultView || target.parentWindow;
+        } while (target && !event.isPropagationStopped());
+        return this;
+      };
+      EventUtils.prototype.clean = function (target) {
+        var i, children;
+        if (!target || target.nodeType === 3 || target.nodeType === 8) {
+          return this;
+        }
+        if (target[this.expando]) {
+          this.unbind(target);
+        }
+        if (!target.getElementsByTagName) {
+          target = target.document;
+        }
+        if (target && target.getElementsByTagName) {
+          this.unbind(target);
+          children = target.getElementsByTagName('*');
+          i = children.length;
+          while (i--) {
+            target = children[i];
+            if (target[this.expando]) {
+              this.unbind(target);
+            }
+          }
+        }
+        return this;
+      };
+      EventUtils.prototype.destroy = function () {
+        this.events = {};
+      };
+      EventUtils.prototype.cancel = function (e) {
+        if (e) {
+          e.preventDefault();
+          e.stopImmediatePropagation();
+        }
+        return false;
+      };
+      EventUtils.prototype.executeHandlers = function (evt, id) {
+        var callbackList, i, l, callback;
+        var container = this.events[id];
+        callbackList = container && container[evt.type];
+        if (callbackList) {
+          for (i = 0, l = callbackList.length; i < l; i++) {
+            callback = callbackList[i];
+            if (callback && callback.func.call(callback.scope, evt) === false) {
+              evt.preventDefault();
+            }
+            if (evt.isImmediatePropagationStopped()) {
+              return;
+            }
+          }
+        }
+      };
+      EventUtils.Event = new EventUtils();
+      return EventUtils;
+    }();
+
+    var support, Expr, getText, isXML, tokenize, compile, select, outermostContext, sortInput, hasDuplicate, setDocument, document, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains$3, expando = 'sizzle' + -new Date(), preferredDoc = domGlobals.window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), sortOrder = function (a, b) {
+        if (a === b) {
+          hasDuplicate = true;
+        }
+        return 0;
+      }, strundefined = typeof undefined, MAX_NEGATIVE = 1 << 31, hasOwn = {}.hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push = arr.push, slice = arr.slice, indexOf$2 = arr.indexOf || function (elem) {
+        var i = 0, len = this.length;
+        for (; i < len; i++) {
+          if (this[i] === elem) {
+            return i;
+          }
+        }
+        return -1;
+      }, booleans = 'checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped', whitespace = '[\\x20\\t\\r\\n\\f]', identifier = '(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+', attributes = '\\[' + whitespace + '*(' + identifier + ')(?:' + whitespace + '*([*^$|!~]?=)' + whitespace + '*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|(' + identifier + '))|)' + whitespace + '*\\]', pseudos = ':(' + identifier + ')(?:\\((' + '(\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)")|' + '((?:\\\\.|[^\\\\()[\\]]|' + attributes + ')*)|' + '.*' + ')\\)|)', rtrim = new RegExp('^' + whitespace + '+|((?:^|[^\\\\])(?:\\\\.)*)' + whitespace + '+$', 'g'), rcomma = new RegExp('^' + whitespace + '*,' + whitespace + '*'), rcombinators = new RegExp('^' + whitespace + '*([>+~]|' + whitespace + ')' + whitespace + '*'), rattributeQuotes = new RegExp('=' + whitespace + '*([^\\]\'"]*?)' + whitespace + '*\\]', 'g'), rpseudo = new RegExp(pseudos), ridentifier = new RegExp('^' + identifier + '$'), matchExpr = {
+        ID: new RegExp('^#(' + identifier + ')'),
+        CLASS: new RegExp('^\\.(' + identifier + ')'),
+        TAG: new RegExp('^(' + identifier + '|[*])'),
+        ATTR: new RegExp('^' + attributes),
+        PSEUDO: new RegExp('^' + pseudos),
+        CHILD: new RegExp('^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' + whitespace + '*(even|odd|(([+-]|)(\\d*)n|)' + whitespace + '*(?:([+-]|)' + whitespace + '*(\\d+)|))' + whitespace + '*\\)|)', 'i'),
+        bool: new RegExp('^(?:' + booleans + ')$', 'i'),
+        needsContext: new RegExp('^' + whitespace + '*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' + whitespace + '*((?:-\\d)?\\d*)' + whitespace + '*\\)|)(?=[^-]|$)', 'i')
+      }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, rescape = /'|\\/g, runescape = new RegExp('\\\\([\\da-f]{1,6}' + whitespace + '?|(' + whitespace + ')|.)', 'ig'), funescape = function (_, escaped, escapedWhitespace) {
+        var high = '0x' + escaped - 65536;
+        return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
+      };
+    try {
+      push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes);
+      arr[preferredDoc.childNodes.length].nodeType;
+    } catch (e) {
+      push = {
+        apply: arr.length ? function (target, els) {
+          push_native.apply(target, slice.call(els));
+        } : function (target, els) {
+          var j = target.length, i = 0;
+          while (target[j++] = els[i++]) {
+          }
+          target.length = j - 1;
+        }
+      };
+    }
+    var Sizzle = function (selector, context, results, seed) {
+      var match, elem, m, nodeType, i, groups, old, nid, newContext, newSelector;
+      if ((context ? context.ownerDocument || context : preferredDoc) !== document) {
+        setDocument(context);
+      }
+      context = context || document;
+      results = results || [];
+      if (!selector || typeof selector !== 'string') {
+        return results;
+      }
+      if ((nodeType = context.nodeType) !== 1 && nodeType !== 9) {
+        return [];
+      }
+      if (documentIsHTML && !seed) {
+        if (match = rquickExpr.exec(selector)) {
+          if (m = match[1]) {
+            if (nodeType === 9) {
+              elem = context.getElementById(m);
+              if (elem && elem.parentNode) {
+                if (elem.id === m) {
+                  results.push(elem);
+                  return results;
+                }
+              } else {
+                return results;
+              }
+            } else {
+              if (context.ownerDocument && (elem = context.ownerDocument.getElementById(m)) && contains$3(context, elem) && elem.id === m) {
+                results.push(elem);
+                return results;
+              }
+            }
+          } else if (match[2]) {
+            push.apply(results, context.getElementsByTagName(selector));
+            return results;
+          } else if ((m = match[3]) && support.getElementsByClassName) {
+            push.apply(results, context.getElementsByClassName(m));
+            return results;
+          }
+        }
+        if (support.qsa && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
+          nid = old = expando;
+          newContext = context;
+          newSelector = nodeType === 9 && selector;
+          if (nodeType === 1 && context.nodeName.toLowerCase() !== 'object') {
+            groups = tokenize(selector);
+            if (old = context.getAttribute('id')) {
+              nid = old.replace(rescape, '\\$&');
+            } else {
+              context.setAttribute('id', nid);
+            }
+            nid = '[id=\'' + nid + '\'] ';
+            i = groups.length;
+            while (i--) {
+              groups[i] = nid + toSelector(groups[i]);
+            }
+            newContext = rsibling.test(selector) && testContext(context.parentNode) || context;
+            newSelector = groups.join(',');
+          }
+          if (newSelector) {
+            try {
+              push.apply(results, newContext.querySelectorAll(newSelector));
+              return results;
+            } catch (qsaError) {
+            } finally {
+              if (!old) {
+                context.removeAttribute('id');
+              }
+            }
+          }
+        }
+      }
+      return select(selector.replace(rtrim, '$1'), context, results, seed);
+    };
+    function createCache() {
+      var keys = [];
+      function cache(key, value) {
+        if (keys.push(key + ' ') > Expr.cacheLength) {
+          delete cache[keys.shift()];
+        }
+        return cache[key + ' '] = value;
+      }
+      return cache;
+    }
+    function markFunction(fn) {
+      fn[expando] = true;
+      return fn;
+    }
+    function siblingCheck(a, b) {
+      var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && (~b.sourceIndex || MAX_NEGATIVE) - (~a.sourceIndex || MAX_NEGATIVE);
+      if (diff) {
+        return diff;
+      }
+      if (cur) {
+        while (cur = cur.nextSibling) {
+          if (cur === b) {
+            return -1;
+          }
+        }
+      }
+      return a ? 1 : -1;
+    }
+    function createInputPseudo(type) {
+      return function (elem) {
+        var name = elem.nodeName.toLowerCase();
+        return name === 'input' && elem.type === type;
+      };
+    }
+    function createButtonPseudo(type) {
+      return function (elem) {
+        var name = elem.nodeName.toLowerCase();
+        return (name === 'input' || name === 'button') && elem.type === type;
+      };
+    }
+    function createPositionalPseudo(fn) {
+      return markFunction(function (argument) {
+        argument = +argument;
+        return markFunction(function (seed, matches) {
+          var j, matchIndexes = fn([], seed.length, argument), i = matchIndexes.length;
+          while (i--) {
+            if (seed[j = matchIndexes[i]]) {
+              seed[j] = !(matches[j] = seed[j]);
+            }
+          }
+        });
+      });
+    }
+    function testContext(context) {
+      return context && typeof context.getElementsByTagName !== strundefined && context;
+    }
+    support = Sizzle.support = {};
+    isXML = Sizzle.isXML = function (elem) {
+      var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+      return documentElement ? documentElement.nodeName !== 'HTML' : false;
+    };
+    setDocument = Sizzle.setDocument = function (node) {
+      var hasCompare, doc = node ? node.ownerDocument || node : preferredDoc, parent = doc.defaultView;
+      function getTop(win) {
+        try {
+          return win.top;
+        } catch (ex) {
+        }
+        return null;
+      }
+      if (doc === document || doc.nodeType !== 9 || !doc.documentElement) {
+        return document;
+      }
+      document = doc;
+      docElem = doc.documentElement;
+      documentIsHTML = !isXML(doc);
+      if (parent && parent !== getTop(parent)) {
+        if (parent.addEventListener) {
+          parent.addEventListener('unload', function () {
+            setDocument();
+          }, false);
+        } else if (parent.attachEvent) {
+          parent.attachEvent('onunload', function () {
+            setDocument();
+          });
+        }
+      }
+      support.attributes = true;
+      support.getElementsByTagName = true;
+      support.getElementsByClassName = rnative.test(doc.getElementsByClassName);
+      support.getById = true;
+      Expr.find.ID = function (id, context) {
+        if (typeof context.getElementById !== strundefined && documentIsHTML) {
+          var m = context.getElementById(id);
+          return m && m.parentNode ? [m] : [];
+        }
+      };
+      Expr.filter.ID = function (id) {
+        var attrId = id.replace(runescape, funescape);
+        return function (elem) {
+          return elem.getAttribute('id') === attrId;
+        };
+      };
+      Expr.find.TAG = support.getElementsByTagName ? function (tag, context) {
+        if (typeof context.getElementsByTagName !== strundefined) {
+          return context.getElementsByTagName(tag);
+        }
+      } : function (tag, context) {
+        var elem, tmp = [], i = 0, results = context.getElementsByTagName(tag);
+        if (tag === '*') {
+          while (elem = results[i++]) {
+            if (elem.nodeType === 1) {
+              tmp.push(elem);
+            }
+          }
+          return tmp;
+        }
+        return results;
+      };
+      Expr.find.CLASS = support.getElementsByClassName && function (className, context) {
+        if (documentIsHTML) {
+          return context.getElementsByClassName(className);
+        }
+      };
+      rbuggyMatches = [];
+      rbuggyQSA = [];
+      support.disconnectedMatch = true;
+      rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join('|'));
+      rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join('|'));
+      hasCompare = rnative.test(docElem.compareDocumentPosition);
+      contains$3 = hasCompare || rnative.test(docElem.contains) ? function (a, b) {
+        var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode;
+        return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));
+      } : function (a, b) {
+        if (b) {
+          while (b = b.parentNode) {
+            if (b === a) {
+              return true;
+            }
+          }
+        }
+        return false;
+      };
+      sortOrder = hasCompare ? function (a, b) {
+        if (a === b) {
+          hasDuplicate = true;
+          return 0;
+        }
+        var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+        if (compare) {
+          return compare;
+        }
+        compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1;
+        if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {
+          if (a === doc || a.ownerDocument === preferredDoc && contains$3(preferredDoc, a)) {
+            return -1;
+          }
+          if (b === doc || b.ownerDocument === preferredDoc && contains$3(preferredDoc, b)) {
+            return 1;
+          }
+          return sortInput ? indexOf$2.call(sortInput, a) - indexOf$2.call(sortInput, b) : 0;
+        }
+        return compare & 4 ? -1 : 1;
+      } : function (a, b) {
+        if (a === b) {
+          hasDuplicate = true;
+          return 0;
+        }
+        var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [a], bp = [b];
+        if (!aup || !bup) {
+          return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : sortInput ? indexOf$2.call(sortInput, a) - indexOf$2.call(sortInput, b) : 0;
+        } else if (aup === bup) {
+          return siblingCheck(a, b);
+        }
+        cur = a;
+        while (cur = cur.parentNode) {
+          ap.unshift(cur);
+        }
+        cur = b;
+        while (cur = cur.parentNode) {
+          bp.unshift(cur);
+        }
+        while (ap[i] === bp[i]) {
+          i++;
+        }
+        return i ? siblingCheck(ap[i], bp[i]) : ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0;
+      };
+      return doc;
+    };
+    Sizzle.matches = function (expr, elements) {
+      return Sizzle(expr, null, null, elements);
+    };
+    Sizzle.matchesSelector = function (elem, expr) {
+      if ((elem.ownerDocument || elem) !== document) {
+        setDocument(elem);
+      }
+      expr = expr.replace(rattributeQuotes, '=\'$1\']');
+      if (support.matchesSelector && documentIsHTML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
+        try {
+          var ret = matches.call(elem, expr);
+          if (ret || support.disconnectedMatch || elem.document && elem.document.nodeType !== 11) {
+            return ret;
+          }
+        } catch (e) {
+        }
+      }
+      return Sizzle(expr, document, null, [elem]).length > 0;
+    };
+    Sizzle.contains = function (context, elem) {
+      if ((context.ownerDocument || context) !== document) {
+        setDocument(context);
+      }
+      return contains$3(context, elem);
+    };
+    Sizzle.attr = function (elem, name) {
+      if ((elem.ownerDocument || elem) !== document) {
+        setDocument(elem);
+      }
+      var fn = Expr.attrHandle[name.toLowerCase()], val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined;
+      return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
+    };
+    Sizzle.error = function (msg) {
+      throw new Error('Syntax error, unrecognized expression: ' + msg);
+    };
+    Sizzle.uniqueSort = function (results) {
+      var elem, duplicates = [], j = 0, i = 0;
+      hasDuplicate = !support.detectDuplicates;
+      sortInput = !support.sortStable && results.slice(0);
+      results.sort(sortOrder);
+      if (hasDuplicate) {
+        while (elem = results[i++]) {
+          if (elem === results[i]) {
+            j = duplicates.push(i);
+          }
+        }
+        while (j--) {
+          results.splice(duplicates[j], 1);
+        }
+      }
+      sortInput = null;
+      return results;
+    };
+    getText = Sizzle.getText = function (elem) {
+      var node, ret = '', i = 0, nodeType = elem.nodeType;
+      if (!nodeType) {
+        while (node = elem[i++]) {
+          ret += getText(node);
+        }
+      } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
+        if (typeof elem.textContent === 'string') {
+          return elem.textContent;
+        } else {
+          for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
+            ret += getText(elem);
+          }
+        }
+      } else if (nodeType === 3 || nodeType === 4) {
+        return elem.nodeValue;
+      }
+      return ret;
+    };
+    Expr = Sizzle.selectors = {
+      cacheLength: 50,
+      createPseudo: markFunction,
+      match: matchExpr,
+      attrHandle: {},
+      find: {},
+      relative: {
+        '>': {
+          dir: 'parentNode',
+          first: true
+        },
+        ' ': { dir: 'parentNode' },
+        '+': {
+          dir: 'previousSibling',
+          first: true
+        },
+        '~': { dir: 'previousSibling' }
+      },
+      preFilter: {
+        ATTR: function (match) {
+          match[1] = match[1].replace(runescape, funescape);
+          match[3] = (match[3] || match[4] || match[5] || '').replace(runescape, funescape);
+          if (match[2] === '~=') {
+            match[3] = ' ' + match[3] + ' ';
+          }
+          return match.slice(0, 4);
+        },
+        CHILD: function (match) {
+          match[1] = match[1].toLowerCase();
+          if (match[1].slice(0, 3) === 'nth') {
+            if (!match[3]) {
+              Sizzle.error(match[0]);
+            }
+            match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === 'even' || match[3] === 'odd'));
+            match[5] = +(match[7] + match[8] || match[3] === 'odd');
+          } else if (match[3]) {
+            Sizzle.error(match[0]);
+          }
+          return match;
+        },
+        PSEUDO: function (match) {
+          var excess, unquoted = !match[6] && match[2];
+          if (matchExpr.CHILD.test(match[0])) {
+            return null;
+          }
+          if (match[3]) {
+            match[2] = match[4] || match[5] || '';
+          } else if (unquoted && rpseudo.test(unquoted) && (excess = tokenize(unquoted, true)) && (excess = unquoted.indexOf(')', unquoted.length - excess) - unquoted.length)) {
+            match[0] = match[0].slice(0, excess);
+            match[2] = unquoted.slice(0, excess);
+          }
+          return match.slice(0, 3);
+        }
+      },
+      filter: {
+        TAG: function (nodeNameSelector) {
+          var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
+          return nodeNameSelector === '*' ? function () {
+            return true;
+          } : function (elem) {
+            return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+          };
+        },
+        CLASS: function (className) {
+          var pattern = classCache[className + ' '];
+          return pattern || (pattern = new RegExp('(^|' + whitespace + ')' + className + '(' + whitespace + '|$)')) && classCache(className, function (elem) {
+            return pattern.test(typeof elem.className === 'string' && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute('class') || '');
+          });
+        },
+        ATTR: function (name, operator, check) {
+          return function (elem) {
+            var result = Sizzle.attr(elem, name);
+            if (result == null) {
+              return operator === '!=';
+            }
+            if (!operator) {
+              return true;
+            }
+            result += '';
+            return operator === '=' ? result === check : operator === '!=' ? result !== check : operator === '^=' ? check && result.indexOf(check) === 0 : operator === '*=' ? check && result.indexOf(check) > -1 : operator === '$=' ? check && result.slice(-check.length) === check : operator === '~=' ? (' ' + result + ' ').indexOf(check) > -1 : operator === '|=' ? result === check || result.slice(0, check.length + 1) === check + '-' : false;
+          };
+        },
+        CHILD: function (type, what, argument, first, last) {
+          var simple = type.slice(0, 3) !== 'nth', forward = type.slice(-4) !== 'last', ofType = what === 'of-type';
+          return first === 1 && last === 0 ? function (elem) {
+            return !!elem.parentNode;
+          } : function (elem, context, xml) {
+            var cache, outerCache, node, diff, nodeIndex, start, dir = simple !== forward ? 'nextSibling' : 'previousSibling', parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType;
+            if (parent) {
+              if (simple) {
+                while (dir) {
+                  node = elem;
+                  while (node = node[dir]) {
+                    if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {
+                      return false;
+                    }
+                  }
+                  start = dir = type === 'only' && !start && 'nextSibling';
+                }
+                return true;
+              }
+              start = [forward ? parent.firstChild : parent.lastChild];
+              if (forward && useCache) {
+                outerCache = parent[expando] || (parent[expando] = {});
+                cache = outerCache[type] || [];
+                nodeIndex = cache[0] === dirruns && cache[1];
+                diff = cache[0] === dirruns && cache[2];
+                node = nodeIndex && parent.childNodes[nodeIndex];
+                while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {
+                  if (node.nodeType === 1 && ++diff && node === elem) {
+                    outerCache[type] = [
+                      dirruns,
+                      nodeIndex,
+                      diff
+                    ];
+                    break;
+                  }
+                }
+              } else if (useCache && (cache = (elem[expando] || (elem[expando] = {}))[type]) && cache[0] === dirruns) {
+                diff = cache[1];
+              } else {
+                while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {
+                  if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) {
+                    if (useCache) {
+                      (node[expando] || (node[expando] = {}))[type] = [
+                        dirruns,
+                        diff
+                      ];
+                    }
+                    if (node === elem) {
+                      break;
+                    }
+                  }
+                }
+              }
+              diff -= last;
+              return diff === first || diff % first === 0 && diff / first >= 0;
+            }
+          };
+        },
+        PSEUDO: function (pseudo, argument) {
+          var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error('unsupported pseudo: ' + pseudo);
+          if (fn[expando]) {
+            return fn(argument);
+          }
+          if (fn.length > 1) {
+            args = [
+              pseudo,
+              pseudo,
+              '',
+              argument
+            ];
+            return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function (seed, matches) {
+              var idx, matched = fn(seed, argument), i = matched.length;
+              while (i--) {
+                idx = indexOf$2.call(seed, matched[i]);
+                seed[idx] = !(matches[idx] = matched[i]);
+              }
+            }) : function (elem) {
+              return fn(elem, 0, args);
+            };
+          }
+          return fn;
+        }
+      },
+      pseudos: {
+        not: markFunction(function (selector) {
+          var input = [], results = [], matcher = compile(selector.replace(rtrim, '$1'));
+          return matcher[expando] ? markFunction(function (seed, matches, context, xml) {
+            var elem, unmatched = matcher(seed, null, xml, []), i = seed.length;
+            while (i--) {
+              if (elem = unmatched[i]) {
+                seed[i] = !(matches[i] = elem);
+              }
+            }
+          }) : function (elem, context, xml) {
+            input[0] = elem;
+            matcher(input, null, xml, results);
+            return !results.pop();
+          };
+        }),
+        has: markFunction(function (selector) {
+          return function (elem) {
+            return Sizzle(selector, elem).length > 0;
+          };
+        }),
+        contains: markFunction(function (text) {
+          text = text.replace(runescape, funescape);
+          return function (elem) {
+            return (elem.textContent || elem.innerText || getText(elem)).indexOf(text) > -1;
+          };
+        }),
+        lang: markFunction(function (lang) {
+          if (!ridentifier.test(lang || '')) {
+            Sizzle.error('unsupported lang: ' + lang);
+          }
+          lang = lang.replace(runescape, funescape).toLowerCase();
+          return function (elem) {
+            var elemLang;
+            do {
+              if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute('xml:lang') || elem.getAttribute('lang')) {
+                elemLang = elemLang.toLowerCase();
+                return elemLang === lang || elemLang.indexOf(lang + '-') === 0;
+              }
+            } while ((elem = elem.parentNode) && elem.nodeType === 1);
+            return false;
+          };
+        }),
+        target: function (elem) {
+          var hash = domGlobals.window.location && domGlobals.window.location.hash;
+          return hash && hash.slice(1) === elem.id;
+        },
+        root: function (elem) {
+          return elem === docElem;
+        },
+        focus: function (elem) {
+          return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+        },
+        enabled: function (elem) {
+          return elem.disabled === false;
+        },
+        disabled: function (elem) {
+          return elem.disabled === true;
+        },
+        checked: function (elem) {
+          var nodeName = elem.nodeName.toLowerCase();
+          return nodeName === 'input' && !!elem.checked || nodeName === 'option' && !!elem.selected;
+        },
+        selected: function (elem) {
+          if (elem.parentNode) {
+            elem.parentNode.selectedIndex;
+          }
+          return elem.selected === true;
+        },
+        empty: function (elem) {
+          for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
+            if (elem.nodeType < 6) {
+              return false;
+            }
+          }
+          return true;
+        },
+        parent: function (elem) {
+          return !Expr.pseudos.empty(elem);
+        },
+        header: function (elem) {
+          return rheader.test(elem.nodeName);
+        },
+        input: function (elem) {
+          return rinputs.test(elem.nodeName);
+        },
+        button: function (elem) {
+          var name = elem.nodeName.toLowerCase();
+          return name === 'input' && elem.type === 'button' || name === 'button';
+        },
+        text: function (elem) {
+          var attr;
+          return elem.nodeName.toLowerCase() === 'input' && elem.type === 'text' && ((attr = elem.getAttribute('type')) == null || attr.toLowerCase() === 'text');
+        },
+        first: createPositionalPseudo(function () {
+          return [0];
+        }),
+        last: createPositionalPseudo(function (matchIndexes, length) {
+          return [length - 1];
+        }),
+        eq: createPositionalPseudo(function (matchIndexes, length, argument) {
+          return [argument < 0 ? argument + length : argument];
+        }),
+        even: createPositionalPseudo(function (matchIndexes, length) {
+          var i = 0;
+          for (; i < length; i += 2) {
+            matchIndexes.push(i);
+          }
+          return matchIndexes;
+        }),
+        odd: createPositionalPseudo(function (matchIndexes, length) {
+          var i = 1;
+          for (; i < length; i += 2) {
+            matchIndexes.push(i);
+          }
+          return matchIndexes;
+        }),
+        lt: createPositionalPseudo(function (matchIndexes, length, argument) {
+          var i = argument < 0 ? argument + length : argument;
+          for (; --i >= 0;) {
+            matchIndexes.push(i);
+          }
+          return matchIndexes;
+        }),
+        gt: createPositionalPseudo(function (matchIndexes, length, argument) {
+          var i = argument < 0 ? argument + length : argument;
+          for (; ++i < length;) {
+            matchIndexes.push(i);
+          }
+          return matchIndexes;
+        })
+      }
+    };
+    Expr.pseudos.nth = Expr.pseudos.eq;
+    each([
+      'radio',
+      'checkbox',
+      'file',
+      'password',
+      'image'
+    ], function (i) {
+      Expr.pseudos[i] = createInputPseudo(i);
+    });
+    each([
+      'submit',
+      'reset'
+    ], function (i) {
+      Expr.pseudos[i] = createButtonPseudo(i);
+    });
+    function setFilters() {
+    }
+    setFilters.prototype = Expr.filters = Expr.pseudos;
+    Expr.setFilters = new setFilters();
+    tokenize = Sizzle.tokenize = function (selector, parseOnly) {
+      var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + ' '];
+      if (cached) {
+        return parseOnly ? 0 : cached.slice(0);
+      }
+      soFar = selector;
+      groups = [];
+      preFilters = Expr.preFilter;
+      while (soFar) {
+        if (!matched || (match = rcomma.exec(soFar))) {
+          if (match) {
+            soFar = soFar.slice(match[0].length) || soFar;
+          }
+          groups.push(tokens = []);
+        }
+        matched = false;
+        if (match = rcombinators.exec(soFar)) {
+          matched = match.shift();
+          tokens.push({
+            value: matched,
+            type: match[0].replace(rtrim, ' ')
+          });
+          soFar = soFar.slice(matched.length);
+        }
+        for (type in Expr.filter) {
+          if (!Expr.filter.hasOwnProperty(type)) {
+            continue;
+          }
+          if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {
+            matched = match.shift();
+            tokens.push({
+              value: matched,
+              type: type,
+              matches: match
+            });
+            soFar = soFar.slice(matched.length);
+          }
+        }
+        if (!matched) {
+          break;
+        }
+      }
+      return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : tokenCache(selector, groups).slice(0);
+    };
+    function toSelector(tokens) {
+      var i = 0, len = tokens.length, selector = '';
+      for (; i < len; i++) {
+        selector += tokens[i].value;
+      }
+      return selector;
+    }
+    function addCombinator(matcher, combinator, base) {
+      var dir = combinator.dir, checkNonElements = base && dir === 'parentNode', doneName = done++;
+      return combinator.first ? function (elem, context, xml) {
+        while (elem = elem[dir]) {
+          if (elem.nodeType === 1 || checkNonElements) {
+            return matcher(elem, context, xml);
+          }
+        }
+      } : function (elem, context, xml) {
+        var oldCache, outerCache, newCache = [
+            dirruns,
+            doneName
+          ];
+        if (xml) {
+          while (elem = elem[dir]) {
+            if (elem.nodeType === 1 || checkNonElements) {
+              if (matcher(elem, context, xml)) {
+                return true;
+              }
+            }
+          }
+        } else {
+          while (elem = elem[dir]) {
+            if (elem.nodeType === 1 || checkNonElements) {
+              outerCache = elem[expando] || (elem[expando] = {});
+              if ((oldCache = outerCache[dir]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
+                return newCache[2] = oldCache[2];
+              } else {
+                outerCache[dir] = newCache;
+                if (newCache[2] = matcher(elem, context, xml)) {
+                  return true;
+                }
+              }
+            }
+          }
+        }
+      };
+    }
+    function elementMatcher(matchers) {
+      return matchers.length > 1 ? function (elem, context, xml) {
+        var i = matchers.length;
+        while (i--) {
+          if (!matchers[i](elem, context, xml)) {
+            return false;
+          }
+        }
+        return true;
+      } : matchers[0];
+    }
+    function multipleContexts(selector, contexts, results) {
+      var i = 0, len = contexts.length;
+      for (; i < len; i++) {
+        Sizzle(selector, contexts[i], results);
+      }
+      return results;
+    }
+    function condense(unmatched, map, filter, context, xml) {
+      var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null;
+      for (; i < len; i++) {
+        if (elem = unmatched[i]) {
+          if (!filter || filter(elem, context, xml)) {
+            newUnmatched.push(elem);
+            if (mapped) {
+              map.push(i);
+            }
+          }
+        }
+      }
+      return newUnmatched;
+    }
+    function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
+      if (postFilter && !postFilter[expando]) {
+        postFilter = setMatcher(postFilter);
+      }
+      if (postFinder && !postFinder[expando]) {
+        postFinder = setMatcher(postFinder, postSelector);
+      }
+      return markFunction(function (seed, results, context, xml) {
+        var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, elems = seed || multipleContexts(selector || '*', context.nodeType ? [context] : context, []), matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems, matcherOut = matcher ? postFinder || (seed ? preFilter : preexisting || postFilter) ? [] : results : matcherIn;
+        if (matcher) {
+          matcher(matcherIn, matcherOut, context, xml);
+        }
+        if (postFilter) {
+          temp = condense(matcherOut, postMap);
+          postFilter(temp, [], context, xml);
+          i = temp.length;
+          while (i--) {
+            if (elem = temp[i]) {
+              matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
+            }
+          }
+        }
+        if (seed) {
+          if (postFinder || preFilter) {
+            if (postFinder) {
+              temp = [];
+              i = matcherOut.length;
+              while (i--) {
+                if (elem = matcherOut[i]) {
+                  temp.push(matcherIn[i] = elem);
+                }
+              }
+              postFinder(null, matcherOut = [], temp, xml);
+            }
+            i = matcherOut.length;
+            while (i--) {
+              if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf$2.call(seed, elem) : preMap[i]) > -1) {
+                seed[temp] = !(results[temp] = elem);
+              }
+            }
+          }
+        } else {
+          matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);
+          if (postFinder) {
+            postFinder(null, results, matcherOut, xml);
+          } else {
+            push.apply(results, matcherOut);
+          }
+        }
+      });
+    }
+    function matcherFromTokens(tokens) {
+      var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[' '], i = leadingRelative ? 1 : 0, matchContext = addCombinator(function (elem) {
+          return elem === checkContext;
+        }, implicitRelative, true), matchAnyContext = addCombinator(function (elem) {
+          return indexOf$2.call(checkContext, elem) > -1;
+        }, implicitRelative, true), matchers = [function (elem, context, xml) {
+            return !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
+          }];
+      for (; i < len; i++) {
+        if (matcher = Expr.relative[tokens[i].type]) {
+          matchers = [addCombinator(elementMatcher(matchers), matcher)];
+        } else {
+          matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches);
+          if (matcher[expando]) {
+            j = ++i;
+            for (; j < len; j++) {
+              if (Expr.relative[tokens[j].type]) {
+                break;
+              }
+            }
+            return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector(tokens.slice(0, i - 1).concat({ value: tokens[i - 2].type === ' ' ? '*' : '' })).replace(rtrim, '$1'), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));
+          }
+          matchers.push(matcher);
+        }
+      }
+      return elementMatcher(matchers);
+    }
+    function matcherFromGroupMatchers(elementMatchers, setMatchers) {
+      var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function (seed, context, xml, results, outermost) {
+          var elem, j, matcher, matchedCount = 0, i = '0', unmatched = seed && [], setMatched = [], contextBackup = outermostContext, elems = seed || byElement && Expr.find.TAG('*', outermost), dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1, len = elems.length;
+          if (outermost) {
+            outermostContext = context !== document && context;
+          }
+          for (; i !== len && (elem = elems[i]) != null; i++) {
+            if (byElement && elem) {
+              j = 0;
+              while (matcher = elementMatchers[j++]) {
+                if (matcher(elem, context, xml)) {
+                  results.push(elem);
+                  break;
+                }
+              }
+              if (outermost) {
+                dirruns = dirrunsUnique;
+              }
+            }
+            if (bySet) {
+              if (elem = !matcher && elem) {
+                matchedCount--;
+              }
+              if (seed) {
+                unmatched.push(elem);
+              }
+            }
+          }
+          matchedCount += i;
+          if (bySet && i !== matchedCount) {
+            j = 0;
+            while (matcher = setMatchers[j++]) {
+              matcher(unmatched, setMatched, context, xml);
+            }
+            if (seed) {
+              if (matchedCount > 0) {
+                while (i--) {
+                  if (!(unmatched[i] || setMatched[i])) {
+                    setMatched[i] = pop.call(results);
+                  }
+                }
+              }
+              setMatched = condense(setMatched);
+            }
+            push.apply(results, setMatched);
+            if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
+              Sizzle.uniqueSort(results);
+            }
+          }
+          if (outermost) {
+            dirruns = dirrunsUnique;
+            outermostContext = contextBackup;
+          }
+          return unmatched;
+        };
+      return bySet ? markFunction(superMatcher) : superMatcher;
+    }
+    compile = Sizzle.compile = function (selector, match) {
+      var i, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + ' '];
+      if (!cached) {
+        if (!match) {
+          match = tokenize(selector);
+        }
+        i = match.length;
+        while (i--) {
+          cached = matcherFromTokens(match[i]);
+          if (cached[expando]) {
+            setMatchers.push(cached);
+          } else {
+            elementMatchers.push(cached);
+          }
+        }
+        cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers));
+        cached.selector = selector;
+      }
+      return cached;
+    };
+    select = Sizzle.select = function (selector, context, results, seed) {
+      var i, tokens, token, type, find, compiled = typeof selector === 'function' && selector, match = !seed && tokenize(selector = compiled.selector || selector);
+      results = results || [];
+      if (match.length === 1) {
+        tokens = match[0] = match[0].slice(0);
+        if (tokens.length > 2 && (token = tokens[0]).type === 'ID' && support.getById && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
+          context = (Expr.find.ID(token.matches[0].replace(runescape, funescape), context) || [])[0];
+          if (!context) {
+            return results;
+          } else if (compiled) {
+            context = context.parentNode;
+          }
+          selector = selector.slice(tokens.shift().value.length);
+        }
+        i = matchExpr.needsContext.test(selector) ? 0 : tokens.length;
+        while (i--) {
+          token = tokens[i];
+          if (Expr.relative[type = token.type]) {
+            break;
+          }
+          if (find = Expr.find[type]) {
+            if (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context)) {
+              tokens.splice(i, 1);
+              selector = seed.length && toSelector(tokens);
+              if (!selector) {
+                push.apply(results, seed);
+                return results;
+              }
+              break;
+            }
+          }
+        }
+      }
+      (compiled || compile(selector, match))(seed, context, !documentIsHTML, results, rsibling.test(selector) && testContext(context.parentNode) || context);
+      return results;
+    };
+    support.sortStable = expando.split('').sort(sortOrder).join('') === expando;
+    support.detectDuplicates = !!hasDuplicate;
+    setDocument();
+    support.sortDetached = true;
+
+    var doc = domGlobals.document, push$1 = Array.prototype.push, slice$1 = Array.prototype.slice;
+    var rquickExpr$1 = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/;
+    var Event = EventUtils.Event;
+    var skipUniques = Tools.makeMap('children,contents,next,prev');
+    var isDefined = function (obj) {
+      return typeof obj !== 'undefined';
+    };
+    var isString$1 = function (obj) {
+      return typeof obj === 'string';
+    };
+    var isWindow = function (obj) {
+      return obj && obj === obj.window;
+    };
+    var createFragment = function (html, fragDoc) {
+      var frag, node, container;
+      fragDoc = fragDoc || doc;
+      container = fragDoc.createElement('div');
+      frag = fragDoc.createDocumentFragment();
+      container.innerHTML = html;
+      while (node = container.firstChild) {
+        frag.appendChild(node);
+      }
+      return frag;
+    };
+    var domManipulate = function (targetNodes, sourceItem, callback, reverse) {
+      var i;
+      if (isString$1(sourceItem)) {
+        sourceItem = createFragment(sourceItem, getElementDocument(targetNodes[0]));
+      } else if (sourceItem.length && !sourceItem.nodeType) {
+        sourceItem = DomQuery.makeArray(sourceItem);
+        if (reverse) {
+          for (i = sourceItem.length - 1; i >= 0; i--) {
+            domManipulate(targetNodes, sourceItem[i], callback, reverse);
+          }
+        } else {
+          for (i = 0; i < sourceItem.length; i++) {
+            domManipulate(targetNodes, sourceItem[i], callback, reverse);
+          }
+        }
+        return targetNodes;
+      }
+      if (sourceItem.nodeType) {
+        i = targetNodes.length;
+        while (i--) {
+          callback.call(targetNodes[i], sourceItem);
+        }
+      }
+      return targetNodes;
+    };
+    var hasClass = function (node, className) {
+      return node && className && (' ' + node.className + ' ').indexOf(' ' + className + ' ') !== -1;
+    };
+    var wrap$1 = function (elements, wrapper, all) {
+      var lastParent, newWrapper;
+      wrapper = DomQuery(wrapper)[0];
+      elements.each(function () {
+        var self = this;
+        if (!all || lastParent !== self.parentNode) {
+          lastParent = self.parentNode;
+          newWrapper = wrapper.cloneNode(false);
+          self.parentNode.insertBefore(newWrapper, self);
+          newWrapper.appendChild(self);
+        } else {
+          newWrapper.appendChild(self);
+        }
+      });
+      return elements;
+    };
+    var numericCssMap = Tools.makeMap('fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom', ' ');
+    var booleanMap = Tools.makeMap('checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected', ' ');
+    var propFix = {
+      for: 'htmlFor',
+      class: 'className',
+      readonly: 'readOnly'
+    };
+    var cssFix = { float: 'cssFloat' };
+    var attrHooks = {}, cssHooks = {};
+    var DomQueryConstructor = function (selector, context) {
+      return new DomQuery.fn.init(selector, context);
+    };
+    var inArray$1 = function (item, array) {
+      var i;
+      if (array.indexOf) {
+        return array.indexOf(item);
+      }
+      i = array.length;
+      while (i--) {
+        if (array[i] === item) {
+          return i;
+        }
+      }
+      return -1;
+    };
+    var whiteSpaceRegExp$1 = /^\s*|\s*$/g;
+    var trim$2 = function (str) {
+      return str === null || str === undefined ? '' : ('' + str).replace(whiteSpaceRegExp$1, '');
+    };
+    var each$4 = function (obj, callback) {
+      var length, key, i, value;
+      if (obj) {
+        length = obj.length;
+        if (length === undefined) {
+          for (key in obj) {
+            if (obj.hasOwnProperty(key)) {
+              value = obj[key];
+              if (callback.call(value, key, value) === false) {
+                break;
+              }
+            }
+          }
+        } else {
+          for (i = 0; i < length; i++) {
+            value = obj[i];
+            if (callback.call(value, i, value) === false) {
+              break;
+            }
+          }
+        }
+      }
+      return obj;
+    };
+    var grep = function (array, callback) {
+      var out = [];
+      each$4(array, function (i, item) {
+        if (callback(item, i)) {
+          out.push(item);
+        }
+      });
+      return out;
+    };
+    var getElementDocument = function (element) {
+      if (!element) {
+        return doc;
+      }
+      if (element.nodeType === 9) {
+        return element;
+      }
+      return element.ownerDocument;
+    };
+    DomQueryConstructor.fn = DomQueryConstructor.prototype = {
+      constructor: DomQueryConstructor,
+      selector: '',
+      context: null,
+      length: 0,
+      init: function (selector, context) {
+        var self = this;
+        var match, node;
+        if (!selector) {
+          return self;
+        }
+        if (selector.nodeType) {
+          self.context = self[0] = selector;
+          self.length = 1;
+          return self;
+        }
+        if (context && context.nodeType) {
+          self.context = context;
+        } else {
+          if (context) {
+            return DomQuery(selector).attr(context);
+          }
+          self.context = context = domGlobals.document;
+        }
+        if (isString$1(selector)) {
+          self.selector = selector;
+          if (selector.charAt(0) === '<' && selector.charAt(selector.length - 1) === '>' && selector.length >= 3) {
+            match = [
+              null,
+              selector,
+              null
+            ];
+          } else {
+            match = rquickExpr$1.exec(selector);
+          }
+          if (match) {
+            if (match[1]) {
+              node = createFragment(selector, getElementDocument(context)).firstChild;
+              while (node) {
+                push$1.call(self, node);
+                node = node.nextSibling;
+              }
+            } else {
+              node = getElementDocument(context).getElementById(match[2]);
+              if (!node) {
+                return self;
+              }
+              if (node.id !== match[2]) {
+                return self.find(selector);
+              }
+              self.length = 1;
+              self[0] = node;
+            }
+          } else {
+            return DomQuery(context).find(selector);
+          }
+        } else {
+          this.add(selector, false);
+        }
+        return self;
+      },
+      toArray: function () {
+        return Tools.toArray(this);
+      },
+      add: function (items, sort) {
+        var self = this;
+        var nodes, i;
+        if (isString$1(items)) {
+          return self.add(DomQuery(items));
+        }
+        if (sort !== false) {
+          nodes = DomQuery.unique(self.toArray().concat(DomQuery.makeArray(items)));
+          self.length = nodes.length;
+          for (i = 0; i < nodes.length; i++) {
+            self[i] = nodes[i];
+          }
+        } else {
+          push$1.apply(self, DomQuery.makeArray(items));
+        }
+        return self;
+      },
+      attr: function (name, value) {
+        var self = this;
+        var hook;
+        if (typeof name === 'object') {
+          each$4(name, function (name, value) {
+            self.attr(name, value);
+          });
+        } else if (isDefined(value)) {
+          this.each(function () {
+            var hook;
+            if (this.nodeType === 1) {
+              hook = attrHooks[name];
+              if (hook && hook.set) {
+                hook.set(this, value);
+                return;
+              }
+              if (value === null) {
+                this.removeAttribute(name, 2);
+              } else {
+                this.setAttribute(name, value, 2);
+              }
+            }
+          });
+        } else {
+          if (self[0] && self[0].nodeType === 1) {
+            hook = attrHooks[name];
+            if (hook && hook.get) {
+              return hook.get(self[0], name);
+            }
+            if (booleanMap[name]) {
+              return self.prop(name) ? name : undefined;
+            }
+            value = self[0].getAttribute(name, 2);
+            if (value === null) {
+              value = undefined;
+            }
+          }
+          return value;
+        }
+        return self;
+      },
+      removeAttr: function (name) {
+        return this.attr(name, null);
+      },
+      prop: function (name, value) {
+        var self = this;
+        name = propFix[name] || name;
+        if (typeof name === 'object') {
+          each$4(name, function (name, value) {
+            self.prop(name, value);
+          });
+        } else if (isDefined(value)) {
+          this.each(function () {
+            if (this.nodeType === 1) {
+              this[name] = value;
+            }
+          });
+        } else {
+          if (self[0] && self[0].nodeType && name in self[0]) {
+            return self[0][name];
+          }
+          return value;
+        }
+        return self;
+      },
+      css: function (name, value) {
+        var self = this;
+        var elm, hook;
+        var camel = function (name) {
+          return name.replace(/-(\D)/g, function (a, b) {
+            return b.toUpperCase();
+          });
+        };
+        var dashed = function (name) {
+          return name.replace(/[A-Z]/g, function (a) {
+            return '-' + a;
+          });
+        };
+        if (typeof name === 'object') {
+          each$4(name, function (name, value) {
+            self.css(name, value);
+          });
+        } else {
+          if (isDefined(value)) {
+            name = camel(name);
+            if (typeof value === 'number' && !numericCssMap[name]) {
+              value = value.toString() + 'px';
+            }
+            self.each(function () {
+              var style = this.style;
+              hook = cssHooks[name];
+              if (hook && hook.set) {
+                hook.set(this, value);
+                return;
+              }
+              try {
+                this.style[cssFix[name] || name] = value;
+              } catch (ex) {
+              }
+              if (value === null || value === '') {
+                if (style.removeProperty) {
+                  style.removeProperty(dashed(name));
+                } else {
+                  style.removeAttribute(name);
+                }
+              }
+            });
+          } else {
+            elm = self[0];
+            hook = cssHooks[name];
+            if (hook && hook.get) {
+              return hook.get(elm);
+            }
+            if (elm.ownerDocument.defaultView) {
+              try {
+                return elm.ownerDocument.defaultView.getComputedStyle(elm, null).getPropertyValue(dashed(name));
+              } catch (ex) {
+                return undefined;
+              }
+            } else if (elm.currentStyle) {
+              return elm.currentStyle[camel(name)];
+            } else {
+              return '';
+            }
+          }
+        }
+        return self;
+      },
+      remove: function () {
+        var self = this;
+        var node, i = this.length;
+        while (i--) {
+          node = self[i];
+          Event.clean(node);
+          if (node.parentNode) {
+            node.parentNode.removeChild(node);
+          }
+        }
+        return this;
+      },
+      empty: function () {
+        var self = this;
+        var node, i = this.length;
+        while (i--) {
+          node = self[i];
+          while (node.firstChild) {
+            node.removeChild(node.firstChild);
+          }
+        }
+        return this;
+      },
+      html: function (value) {
+        var self = this;
+        var i;
+        if (isDefined(value)) {
+          i = self.length;
+          try {
+            while (i--) {
+              self[i].innerHTML = value;
+            }
+          } catch (ex) {
+            DomQuery(self[i]).empty().append(value);
+          }
+          return self;
+        }
+        return self[0] ? self[0].innerHTML : '';
+      },
+      text: function (value) {
+        var self = this;
+        var i;
+        if (isDefined(value)) {
+          i = self.length;
+          while (i--) {
+            if ('innerText' in self[i]) {
+              self[i].innerText = value;
+            } else {
+              self[0].textContent = value;
+            }
+          }
+          return self;
+        }
+        return self[0] ? self[0].innerText || self[0].textContent : '';
+      },
+      append: function () {
+        return domManipulate(this, arguments, function (node) {
+          if (this.nodeType === 1 || this.host && this.host.nodeType === 1) {
+            this.appendChild(node);
+          }
+        });
+      },
+      prepend: function () {
+        return domManipulate(this, arguments, function (node) {
+          if (this.nodeType === 1 || this.host && this.host.nodeType === 1) {
+            this.insertBefore(node, this.firstChild);
+          }
+        }, true);
+      },
+      before: function () {
+        var self = this;
+        if (self[0] && self[0].parentNode) {
+          return domManipulate(self, arguments, function (node) {
+            this.parentNode.insertBefore(node, this);
+          });
+        }
+        return self;
+      },
+      after: function () {
+        var self = this;
+        if (self[0] && self[0].parentNode) {
+          return domManipulate(self, arguments, function (node) {
+            this.parentNode.insertBefore(node, this.nextSibling);
+          }, true);
+        }
+        return self;
+      },
+      appendTo: function (val) {
+        DomQuery(val).append(this);
+        return this;
+      },
+      prependTo: function (val) {
+        DomQuery(val).prepend(this);
+        return this;
+      },
+      replaceWith: function (content) {
+        return this.before(content).remove();
+      },
+      wrap: function (content) {
+        return wrap$1(this, content);
+      },
+      wrapAll: function (content) {
+        return wrap$1(this, content, true);
+      },
+      wrapInner: function (content) {
+        this.each(function () {
+          DomQuery(this).contents().wrapAll(content);
+        });
+        return this;
+      },
+      unwrap: function () {
+        return this.parent().each(function () {
+          DomQuery(this).replaceWith(this.childNodes);
+        });
+      },
+      clone: function () {
+        var result = [];
+        this.each(function () {
+          result.push(this.cloneNode(true));
+        });
+        return DomQuery(result);
+      },
+      addClass: function (className) {
+        return this.toggleClass(className, true);
+      },
+      removeClass: function (className) {
+        return this.toggleClass(className, false);
+      },
+      toggleClass: function (className, state) {
+        var self = this;
+        if (typeof className !== 'string') {
+          return self;
+        }
+        if (className.indexOf(' ') !== -1) {
+          each$4(className.split(' '), function () {
+            self.toggleClass(this, state);
+          });
+        } else {
+          self.each(function (index, node) {
+            var existingClassName, classState;
+            classState = hasClass(node, className);
+            if (classState !== state) {
+              existingClassName = node.className;
+              if (classState) {
+                node.className = trim$2((' ' + existingClassName + ' ').replace(' ' + className + ' ', ' '));
+              } else {
+                node.className += existingClassName ? ' ' + className : className;
+              }
+            }
+          });
+        }
+        return self;
+      },
+      hasClass: function (className) {
+        return hasClass(this[0], className);
+      },
+      each: function (callback) {
+        return each$4(this, callback);
+      },
+      on: function (name, callback) {
+        return this.each(function () {
+          Event.bind(this, name, callback);
+        });
+      },
+      off: function (name, callback) {
+        return this.each(function () {
+          Event.unbind(this, name, callback);
+        });
+      },
+      trigger: function (name) {
+        return this.each(function () {
+          if (typeof name === 'object') {
+            Event.fire(this, name.type, name);
+          } else {
+            Event.fire(this, name);
+          }
+        });
+      },
+      show: function () {
+        return this.css('display', '');
+      },
+      hide: function () {
+        return this.css('display', 'none');
+      },
+      slice: function () {
+        return new DomQuery(slice$1.apply(this, arguments));
+      },
+      eq: function (index) {
+        return index === -1 ? this.slice(index) : this.slice(index, +index + 1);
+      },
+      first: function () {
+        return this.eq(0);
+      },
+      last: function () {
+        return this.eq(-1);
+      },
+      find: function (selector) {
+        var i, l;
+        var ret = [];
+        for (i = 0, l = this.length; i < l; i++) {
+          DomQuery.find(selector, this[i], ret);
+        }
+        return DomQuery(ret);
+      },
+      filter: function (selector) {
+        if (typeof selector === 'function') {
+          return DomQuery(grep(this.toArray(), function (item, i) {
+            return selector(i, item);
+          }));
+        }
+        return DomQuery(DomQuery.filter(selector, this.toArray()));
+      },
+      closest: function (selector) {
+        var result = [];
+        if (selector instanceof DomQuery) {
+          selector = selector[0];
+        }
+        this.each(function (i, node) {
+          while (node) {
+            if (typeof selector === 'string' && DomQuery(node).is(selector)) {
+              result.push(node);
+              break;
+            } else if (node === selector) {
+              result.push(node);
+              break;
+            }
+            node = node.parentNode;
+          }
+        });
+        return DomQuery(result);
+      },
+      offset: function (offset) {
+        var elm, doc, docElm;
+        var x = 0, y = 0, pos;
+        if (!offset) {
+          elm = this[0];
+          if (elm) {
+            doc = elm.ownerDocument;
+            docElm = doc.documentElement;
+            if (elm.getBoundingClientRect) {
+              pos = elm.getBoundingClientRect();
+              x = pos.left + (docElm.scrollLeft || doc.body.scrollLeft) - docElm.clientLeft;
+              y = pos.top + (docElm.scrollTop || doc.body.scrollTop) - docElm.clientTop;
+            }
+          }
+          return {
+            left: x,
+            top: y
+          };
+        }
+        return this.css(offset);
+      },
+      push: push$1,
+      sort: Array.prototype.sort,
+      splice: Array.prototype.splice
+    };
+    Tools.extend(DomQueryConstructor, {
+      extend: Tools.extend,
+      makeArray: function (object) {
+        if (isWindow(object) || object.nodeType) {
+          return [object];
+        }
+        return Tools.toArray(object);
+      },
+      inArray: inArray$1,
+      isArray: Tools.isArray,
+      each: each$4,
+      trim: trim$2,
+      grep: grep,
+      find: Sizzle,
+      expr: Sizzle.selectors,
+      unique: Sizzle.uniqueSort,
+      text: Sizzle.getText,
+      contains: Sizzle.contains,
+      filter: function (expr, elems, not) {
+        var i = elems.length;
+        if (not) {
+          expr = ':not(' + expr + ')';
+        }
+        while (i--) {
+          if (elems[i].nodeType !== 1) {
+            elems.splice(i, 1);
+          }
+        }
+        if (elems.length === 1) {
+          elems = DomQuery.find.matchesSelector(elems[0], expr) ? [elems[0]] : [];
+        } else {
+          elems = DomQuery.find.matches(expr, elems);
+        }
+        return elems;
+      }
+    });
+    var dir = function (el, prop, until) {
+      var matched = [];
+      var cur = el[prop];
+      if (typeof until !== 'string' && until instanceof DomQuery) {
+        until = until[0];
+      }
+      while (cur && cur.nodeType !== 9) {
+        if (until !== undefined) {
+          if (cur === until) {
+            break;
+          }
+          if (typeof until === 'string' && DomQuery(cur).is(until)) {
+            break;
+          }
+        }
+        if (cur.nodeType === 1) {
+          matched.push(cur);
+        }
+        cur = cur[prop];
+      }
+      return matched;
+    };
+    var sibling = function (node, siblingName, nodeType, until) {
+      var result = [];
+      if (until instanceof DomQuery) {
+        until = until[0];
+      }
+      for (; node; node = node[siblingName]) {
+        if (nodeType && node.nodeType !== nodeType) {
+          continue;
+        }
+        if (until !== undefined) {
+          if (node === until) {
+            break;
+          }
+          if (typeof until === 'string' && DomQuery(node).is(until)) {
+            break;
+          }
+        }
+        result.push(node);
+      }
+      return result;
+    };
+    var firstSibling = function (node, siblingName, nodeType) {
+      for (node = node[siblingName]; node; node = node[siblingName]) {
+        if (node.nodeType === nodeType) {
+          return node;
+        }
+      }
+      return null;
+    };
+    each$4({
+      parent: function (node) {
+        var parent = node.parentNode;
+        return parent && parent.nodeType !== 11 ? parent : null;
+      },
+      parents: function (node) {
+        return dir(node, 'parentNode');
+      },
+      next: function (node) {
+        return firstSibling(node, 'nextSibling', 1);
+      },
+      prev: function (node) {
+        return firstSibling(node, 'previousSibling', 1);
+      },
+      children: function (node) {
+        return sibling(node.firstChild, 'nextSibling', 1);
+      },
+      contents: function (node) {
+        return Tools.toArray((node.nodeName === 'iframe' ? node.contentDocument || node.contentWindow.document : node).childNodes);
+      }
+    }, function (name, fn) {
+      DomQueryConstructor.fn[name] = function (selector) {
+        var self = this;
+        var result = [];
+        self.each(function () {
+          var nodes = fn.call(result, this, selector, result);
+          if (nodes) {
+            if (DomQuery.isArray(nodes)) {
+              result.push.apply(result, nodes);
+            } else {
+              result.push(nodes);
+            }
+          }
+        });
+        if (this.length > 1) {
+          if (!skipUniques[name]) {
+            result = DomQuery.unique(result);
+          }
+          if (name.indexOf('parents') === 0) {
+            result = result.reverse();
+          }
+        }
+        var wrappedResult = DomQuery(result);
+        if (selector) {
+          return wrappedResult.filter(selector);
+        }
+        return wrappedResult;
+      };
+    });
+    each$4({
+      parentsUntil: function (node, until) {
+        return dir(node, 'parentNode', until);
+      },
+      nextUntil: function (node, until) {
+        return sibling(node, 'nextSibling', 1, until).slice(1);
+      },
+      prevUntil: function (node, until) {
+        return sibling(node, 'previousSibling', 1, until).slice(1);
+      }
+    }, function (name, fn) {
+      DomQueryConstructor.fn[name] = function (selector, filter) {
+        var self = this;
+        var result = [];
+        self.each(function () {
+          var nodes = fn.call(result, this, selector, result);
+          if (nodes) {
+            if (DomQuery.isArray(nodes)) {
+              result.push.apply(result, nodes);
+            } else {
+              result.push(nodes);
+            }
+          }
+        });
+        if (this.length > 1) {
+          result = DomQuery.unique(result);
+          if (name.indexOf('parents') === 0 || name === 'prevUntil') {
+            result = result.reverse();
+          }
+        }
+        var wrappedResult = DomQuery(result);
+        if (filter) {
+          return wrappedResult.filter(filter);
+        }
+        return wrappedResult;
+      };
+    });
+    DomQueryConstructor.fn.is = function (selector) {
+      return !!selector && this.filter(selector).length > 0;
+    };
+    DomQueryConstructor.fn.init.prototype = DomQueryConstructor.fn;
+    DomQueryConstructor.overrideDefaults = function (callback) {
+      var defaults;
+      var sub = function (selector, context) {
+        defaults = defaults || callback();
+        if (arguments.length === 0) {
+          selector = defaults.element;
+        }
+        if (!context) {
+          context = defaults.context;
+        }
+        return new sub.fn.init(selector, context);
+      };
+      DomQuery.extend(sub, this);
+      return sub;
+    };
+    DomQueryConstructor.attrHooks = attrHooks;
+    DomQueryConstructor.cssHooks = cssHooks;
+    var DomQuery = DomQueryConstructor;
+
+    var TreeWalker = function () {
+      function TreeWalker(startNode, rootNode) {
+        this.node = startNode;
+        this.rootNode = rootNode;
+        this.current = this.current.bind(this);
+        this.next = this.next.bind(this);
+        this.prev = this.prev.bind(this);
+        this.prev2 = this.prev2.bind(this);
+      }
+      TreeWalker.prototype.current = function () {
+        return this.node;
+      };
+      TreeWalker.prototype.next = function (shallow) {
+        this.node = this.findSibling(this.node, 'firstChild', 'nextSibling', shallow);
+        return this.node;
+      };
+      TreeWalker.prototype.prev = function (shallow) {
+        this.node = this.findSibling(this.node, 'lastChild', 'previousSibling', shallow);
+        return this.node;
+      };
+      TreeWalker.prototype.prev2 = function (shallow) {
+        this.node = this.findPreviousNode(this.node, 'lastChild', 'previousSibling', shallow);
+        return this.node;
+      };
+      TreeWalker.prototype.findSibling = function (node, startName, siblingName, shallow) {
+        var sibling, parent;
+        if (node) {
+          if (!shallow && node[startName]) {
+            return node[startName];
+          }
+          if (node !== this.rootNode) {
+            sibling = node[siblingName];
+            if (sibling) {
+              return sibling;
+            }
+            for (parent = node.parentNode; parent && parent !== this.rootNode; parent = parent.parentNode) {
+              sibling = parent[siblingName];
+              if (sibling) {
+                return sibling;
+              }
+            }
+          }
+        }
+      };
+      TreeWalker.prototype.findPreviousNode = function (node, startName, siblingName, shallow) {
+        var sibling, parent, child;
+        if (node) {
+          sibling = node[siblingName];
+          if (this.rootNode && sibling === this.rootNode) {
+            return;
+          }
+          if (sibling) {
+            if (!shallow) {
+              for (child = sibling[startName]; child; child = child[startName]) {
+                if (!child[startName]) {
+                  return child;
+                }
+              }
+            }
+            return sibling;
+          }
+          parent = node.parentNode;
+          if (parent && parent !== this.rootNode) {
+            return parent;
+          }
+        }
+      };
+      return TreeWalker;
+    }();
+
+    var each$5 = Tools.each;
+    var grep$1 = Tools.grep;
+    var isIE = Env.ie;
+    var simpleSelectorRe = /^([a-z0-9],?)+$/i;
+    var whiteSpaceRegExp$2 = /^[ \t\r\n]*$/;
+    var setupAttrHooks = function (styles, settings, getContext) {
+      var keepValues = settings.keep_values;
+      var keepUrlHook = {
+        set: function ($elm, value, name) {
+          if (settings.url_converter) {
+            value = settings.url_converter.call(settings.url_converter_scope || getContext(), value, name, $elm[0]);
+          }
+          $elm.attr('data-mce-' + name, value).attr(name, value);
+        },
+        get: function ($elm, name) {
+          return $elm.attr('data-mce-' + name) || $elm.attr(name);
+        }
+      };
+      var attrHooks = {
+        style: {
+          set: function ($elm, value) {
+            if (value !== null && typeof value === 'object') {
+              $elm.css(value);
+              return;
+            }
+            if (keepValues) {
+              $elm.attr('data-mce-style', value);
+            }
+            if (value !== null && typeof value === 'string') {
+              $elm.removeAttr('style');
+              $elm.css(styles.parse(value));
+            } else {
+              $elm.attr('style', value);
+            }
+          },
+          get: function ($elm) {
+            var value = $elm.attr('data-mce-style') || $elm.attr('style');
+            value = styles.serialize(styles.parse(value), $elm[0].nodeName);
+            return value;
+          }
+        }
+      };
+      if (keepValues) {
+        attrHooks.href = attrHooks.src = keepUrlHook;
+      }
+      return attrHooks;
+    };
+    var updateInternalStyleAttr = function (styles, $elm) {
+      var rawValue = $elm.attr('style');
+      var value = styles.serialize(styles.parse(rawValue), $elm[0].nodeName);
+      if (!value) {
+        value = null;
+      }
+      $elm.attr('data-mce-style', value);
+    };
+    var findNodeIndex = function (node, normalized) {
+      var idx = 0, lastNodeType, nodeType;
+      if (node) {
+        for (lastNodeType = node.nodeType, node = node.previousSibling; node; node = node.previousSibling) {
+          nodeType = node.nodeType;
+          if (normalized && nodeType === 3) {
+            if (nodeType === lastNodeType || !node.nodeValue.length) {
+              continue;
+            }
+          }
+          idx++;
+          lastNodeType = nodeType;
+        }
+      }
+      return idx;
+    };
+    function DOMUtils(doc, settings) {
+      var _this = this;
+      if (settings === void 0) {
+        settings = {};
+      }
+      var attrHooks;
+      var addedStyles = {};
+      var win = domGlobals.window;
+      var files = {};
+      var counter = 0;
+      var stdMode = true;
+      var boxModel = true;
+      var styleSheetLoader = StyleSheetLoader(doc, {
+        contentCssCors: settings.contentCssCors,
+        referrerPolicy: settings.referrerPolicy
+      });
+      var boundEvents = [];
+      var schema = settings.schema ? settings.schema : Schema({});
+      var styles = Styles({
+        url_converter: settings.url_converter,
+        url_converter_scope: settings.url_converter_scope
+      }, settings.schema);
+      var events = settings.ownEvents ? new EventUtils() : EventUtils.Event;
+      var blockElementsMap = schema.getBlockElements();
+      var $ = DomQuery.overrideDefaults(function () {
+        return {
+          context: doc,
+          element: self.getRoot()
+        };
+      });
+      var isBlock = function (node) {
+        if (typeof node === 'string') {
+          return !!blockElementsMap[node];
+        } else if (node) {
+          var type = node.nodeType;
+          if (type) {
+            return !!(type === 1 && blockElementsMap[node.nodeName]);
+          }
+        }
+        return false;
+      };
+      var get = function (elm) {
+        if (elm && doc && typeof elm === 'string') {
+          var node = doc.getElementById(elm);
+          if (node && node.id !== elm) {
+            return doc.getElementsByName(elm)[1];
+          } else {
+            return node;
+          }
+        }
+        return elm;
+      };
+      var $$ = function (elm) {
+        return $(typeof elm === 'string' ? get(elm) : elm);
+      };
+      var getAttrib = function (elm, name, defaultVal) {
+        var hook, value;
+        var $elm = $$(elm);
+        if ($elm.length) {
+          hook = attrHooks[name];
+          if (hook && hook.get) {
+            value = hook.get($elm, name);
+          } else {
+            value = $elm.attr(name);
+          }
+        }
+        if (typeof value === 'undefined') {
+          value = defaultVal || '';
+        }
+        return value;
+      };
+      var getAttribs = function (elm) {
+        var node = get(elm);
+        if (!node) {
+          return [];
+        }
+        return node.attributes;
+      };
+      var setAttrib = function (elm, name, value) {
+        var originalValue, hook;
+        if (value === '') {
+          value = null;
+        }
+        var $elm = $$(elm);
+        originalValue = $elm.attr(name);
+        if (!$elm.length) {
+          return;
+        }
+        hook = attrHooks[name];
+        if (hook && hook.set) {
+          hook.set($elm, value, name);
+        } else {
+          $elm.attr(name, value);
+        }
+        if (originalValue !== value && settings.onSetAttrib) {
+          settings.onSetAttrib({
+            attrElm: $elm,
+            attrName: name,
+            attrValue: value
+          });
+        }
+      };
+      var clone = function (node, deep) {
+        if (!isIE || node.nodeType !== 1 || deep) {
+          return node.cloneNode(deep);
+        } else {
+          var clone_1 = doc.createElement(node.nodeName);
+          each$5(getAttribs(node), function (attr) {
+            setAttrib(clone_1, attr.nodeName, getAttrib(node, attr.nodeName));
+          });
+          return clone_1;
+        }
+      };
+      var getRoot = function () {
+        return settings.root_element || doc.body;
+      };
+      var getViewPort = function (argWin) {
+        var vp = getBounds(argWin);
+        return {
+          x: vp.x,
+          y: vp.y,
+          w: vp.width,
+          h: vp.height
+        };
+      };
+      var getPos$1 = function (elm, rootElm) {
+        return getPos(doc.body, get(elm), rootElm);
+      };
+      var setStyle = function (elm, name, value) {
+        var $elm = isString(name) ? $$(elm).css(name, value) : $$(elm).css(name);
+        if (settings.update_styles) {
+          updateInternalStyleAttr(styles, $elm);
+        }
+      };
+      var setStyles = function (elm, stylesArg) {
+        var $elm = $$(elm).css(stylesArg);
+        if (settings.update_styles) {
+          updateInternalStyleAttr(styles, $elm);
+        }
+      };
+      var getStyle = function (elm, name, computed) {
+        var $elm = $$(elm);
+        if (computed) {
+          return $elm.css(name);
+        }
+        name = name.replace(/-(\D)/g, function (a, b) {
+          return b.toUpperCase();
+        });
+        if (name === 'float') {
+          name = Env.browser.isIE() ? 'styleFloat' : 'cssFloat';
+        }
+        return $elm[0] && $elm[0].style ? $elm[0].style[name] : undefined;
+      };
+      var getSize = function (elm) {
+        var w, h;
+        elm = get(elm);
+        w = getStyle(elm, 'width');
+        h = getStyle(elm, 'height');
+        if (w.indexOf('px') === -1) {
+          w = 0;
+        }
+        if (h.indexOf('px') === -1) {
+          h = 0;
+        }
+        return {
+          w: parseInt(w, 10) || elm.offsetWidth || elm.clientWidth,
+          h: parseInt(h, 10) || elm.offsetHeight || elm.clientHeight
+        };
+      };
+      var getRect = function (elm) {
+        var pos, size;
+        elm = get(elm);
+        pos = getPos$1(elm);
+        size = getSize(elm);
+        return {
+          x: pos.x,
+          y: pos.y,
+          w: size.w,
+          h: size.h
+        };
+      };
+      var is = function (elm, selector) {
+        var i;
+        if (!elm) {
+          return false;
+        }
+        if (!Array.isArray(elm)) {
+          if (selector === '*') {
+            return elm.nodeType === 1;
+          }
+          if (simpleSelectorRe.test(selector)) {
+            var selectors = selector.toLowerCase().split(/,/);
+            var elmName = elm.nodeName.toLowerCase();
+            for (i = selectors.length - 1; i >= 0; i--) {
+              if (selectors[i] === elmName) {
+                return true;
+              }
+            }
+            return false;
+          }
+          if (elm.nodeType && elm.nodeType !== 1) {
+            return false;
+          }
+        }
+        var elms = !Array.isArray(elm) ? [elm] : elm;
+        return Sizzle(selector, elms[0].ownerDocument || elms[0], null, elms).length > 0;
+      };
+      var getParents = function (elm, selector, root, collect) {
+        var result = [];
+        var selectorVal;
+        var node = get(elm);
+        collect = collect === undefined;
+        root = root || (getRoot().nodeName !== 'BODY' ? getRoot().parentNode : null);
+        if (Tools.is(selector, 'string')) {
+          selectorVal = selector;
+          if (selector === '*') {
+            selector = function (node) {
+              return node.nodeType === 1;
+            };
+          } else {
+            selector = function (node) {
+              return is(node, selectorVal);
+            };
+          }
+        }
+        while (node) {
+          if (node === root || !node.nodeType || node.nodeType === 9) {
+            break;
+          }
+          if (!selector || typeof selector === 'function' && selector(node)) {
+            if (collect) {
+              result.push(node);
+            } else {
+              return [node];
+            }
+          }
+          node = node.parentNode;
+        }
+        return collect ? result : null;
+      };
+      var getParent = function (node, selector, root) {
+        var parents = getParents(node, selector, root, false);
+        return parents && parents.length > 0 ? parents[0] : null;
+      };
+      var _findSib = function (node, selector, name) {
+        var func = selector;
+        if (node) {
+          if (typeof selector === 'string') {
+            func = function (node) {
+              return is(node, selector);
+            };
+          }
+          for (node = node[name]; node; node = node[name]) {
+            if (typeof func === 'function' && func(node)) {
+              return node;
+            }
+          }
+        }
+        return null;
+      };
+      var getNext = function (node, selector) {
+        return _findSib(node, selector, 'nextSibling');
+      };
+      var getPrev = function (node, selector) {
+        return _findSib(node, selector, 'previousSibling');
+      };
+      var select = function (selector, scope) {
+        return Sizzle(selector, get(scope) || settings.root_element || doc, []);
+      };
+      var run = function (elm, func, scope) {
+        var result;
+        var node = typeof elm === 'string' ? get(elm) : elm;
+        if (!node) {
+          return false;
+        }
+        if (Tools.isArray(node) && (node.length || node.length === 0)) {
+          result = [];
+          each$5(node, function (elm, i) {
+            if (elm) {
+              if (typeof elm === 'string') {
+                elm = get(elm);
+              }
+              result.push(func.call(scope, elm, i));
+            }
+          });
+          return result;
+        }
+        var context = scope ? scope : _this;
+        return func.call(context, node);
+      };
+      var setAttribs = function (elm, attrs) {
+        $$(elm).each(function (i, node) {
+          each$5(attrs, function (value, name) {
+            setAttrib(node, name, value);
+          });
+        });
+      };
+      var setHTML = function (elm, html) {
+        var $elm = $$(elm);
+        if (isIE) {
+          $elm.each(function (i, target) {
+            if (target.canHaveHTML === false) {
+              return;
+            }
+            while (target.firstChild) {
+              target.removeChild(target.firstChild);
+            }
+            try {
+              target.innerHTML = '<br>' + html;
+              target.removeChild(target.firstChild);
+            } catch (ex) {
+              DomQuery('<div></div>').html('<br>' + html).contents().slice(1).appendTo(target);
+            }
+            return html;
+          });
+        } else {
+          $elm.html(html);
+        }
+      };
+      var add = function (parentElm, name, attrs, html, create) {
+        return run(parentElm, function (parentElm) {
+          var newElm = typeof name === 'string' ? doc.createElement(name) : name;
+          setAttribs(newElm, attrs);
+          if (html) {
+            if (typeof html !== 'string' && html.nodeType) {
+              newElm.appendChild(html);
+            } else if (typeof html === 'string') {
+              setHTML(newElm, html);
+            }
+          }
+          return !create ? parentElm.appendChild(newElm) : newElm;
+        });
+      };
+      var create = function (name, attrs, html) {
+        return add(doc.createElement(name), name, attrs, html, true);
+      };
+      var decode = Entities.decode;
+      var encode = Entities.encodeAllRaw;
+      var createHTML = function (name, attrs, html) {
+        var outHtml = '', key;
+        outHtml += '<' + name;
+        for (key in attrs) {
+          if (attrs.hasOwnProperty(key) && attrs[key] !== null && typeof attrs[key] !== 'undefined') {
+            outHtml += ' ' + key + '="' + encode(attrs[key]) + '"';
+          }
+        }
+        if (typeof html !== 'undefined') {
+          return outHtml + '>' + html + '</' + name + '>';
+        }
+        return outHtml + ' />';
+      };
+      var createFragment = function (html) {
+        var node;
+        var container = doc.createElement('div');
+        var frag = doc.createDocumentFragment();
+        frag.appendChild(container);
+        if (html) {
+          container.innerHTML = html;
+        }
+        while (node = container.firstChild) {
+          frag.appendChild(node);
+        }
+        frag.removeChild(container);
+        return frag;
+      };
+      var remove = function (node, keepChildren) {
+        var $node = $$(node);
+        if (keepChildren) {
+          $node.each(function () {
+            var child;
+            while (child = this.firstChild) {
+              if (child.nodeType === 3 && child.data.length === 0) {
+                this.removeChild(child);
+              } else {
+                this.parentNode.insertBefore(child, this);
+              }
+            }
+          }).remove();
+        } else {
+          $node.remove();
+        }
+        return $node.length > 1 ? $node.toArray() : $node[0];
+      };
+      var removeAllAttribs = function (e) {
+        return run(e, function (e) {
+          var i;
+          var attrs = e.attributes;
+          for (i = attrs.length - 1; i >= 0; i--) {
+            e.removeAttributeNode(attrs.item(i));
+          }
+        });
+      };
+      var parseStyle = function (cssText) {
+        return styles.parse(cssText);
+      };
+      var serializeStyle = function (stylesArg, name) {
+        return styles.serialize(stylesArg, name);
+      };
+      var addStyle = function (cssText) {
+        var head, styleElm;
+        if (self !== DOMUtils.DOM && doc === domGlobals.document) {
+          if (addedStyles[cssText]) {
+            return;
+          }
+          addedStyles[cssText] = true;
+        }
+        styleElm = doc.getElementById('mceDefaultStyles');
+        if (!styleElm) {
+          styleElm = doc.createElement('style');
+          styleElm.id = 'mceDefaultStyles';
+          styleElm.type = 'text/css';
+          head = doc.getElementsByTagName('head')[0];
+          if (head.firstChild) {
+            head.insertBefore(styleElm, head.firstChild);
+          } else {
+            head.appendChild(styleElm);
+          }
+        }
+        if (styleElm.styleSheet) {
+          styleElm.styleSheet.cssText += cssText;
+        } else {
+          styleElm.appendChild(doc.createTextNode(cssText));
+        }
+      };
+      var loadCSS = function (url) {
+        var head;
+        if (self !== DOMUtils.DOM && doc === domGlobals.document) {
+          DOMUtils.DOM.loadCSS(url);
+          return;
+        }
+        if (!url) {
+          url = '';
+        }
+        head = doc.getElementsByTagName('head')[0];
+        each$5(url.split(','), function (url) {
+          var link;
+          url = Tools._addCacheSuffix(url);
+          if (files[url]) {
+            return;
+          }
+          files[url] = true;
+          link = create('link', __assign(__assign({
+            rel: 'stylesheet',
+            type: 'text/css',
+            href: url
+          }, settings.contentCssCors ? { crossOrigin: 'anonymous' } : {}), settings.referrerPolicy ? { referrerPolicy: settings.referrerPolicy } : {}));
+          head.appendChild(link);
+        });
+      };
+      var toggleClass = function (elm, cls, state) {
+        $$(elm).toggleClass(cls, state).each(function () {
+          if (this.className === '') {
+            DomQuery(this).attr('class', null);
+          }
+        });
+      };
+      var addClass = function (elm, cls) {
+        $$(elm).addClass(cls);
+      };
+      var removeClass = function (elm, cls) {
+        toggleClass(elm, cls, false);
+      };
+      var hasClass = function (elm, cls) {
+        return $$(elm).hasClass(cls);
+      };
+      var show = function (elm) {
+        $$(elm).show();
+      };
+      var hide = function (elm) {
+        $$(elm).hide();
+      };
+      var isHidden = function (elm) {
+        return $$(elm).css('display') === 'none';
+      };
+      var uniqueId = function (prefix) {
+        return (!prefix ? 'mce_' : prefix) + counter++;
+      };
+      var getOuterHTML = function (elm) {
+        var node = typeof elm === 'string' ? get(elm) : elm;
+        return isElement$1(node) ? node.outerHTML : DomQuery('<div></div>').append(DomQuery(node).clone()).html();
+      };
+      var setOuterHTML = function (elm, html) {
+        $$(elm).each(function () {
+          try {
+            if ('outerHTML' in this) {
+              this.outerHTML = html;
+              return;
+            }
+          } catch (ex) {
+          }
+          remove(DomQuery(this).html(html), true);
+        });
+      };
+      var insertAfter = function (node, reference) {
+        var referenceNode = get(reference);
+        return run(node, function (node) {
+          var parent, nextSibling;
+          parent = referenceNode.parentNode;
+          nextSibling = referenceNode.nextSibling;
+          if (nextSibling) {
+            parent.insertBefore(node, nextSibling);
+          } else {
+            parent.appendChild(node);
+          }
+          return node;
+        });
+      };
+      var replace = function (newElm, oldElm, keepChildren) {
+        return run(oldElm, function (oldElm) {
+          if (Tools.is(oldElm, 'array')) {
+            newElm = newElm.cloneNode(true);
+          }
+          if (keepChildren) {
+            each$5(grep$1(oldElm.childNodes), function (node) {
+              newElm.appendChild(node);
+            });
+          }
+          return oldElm.parentNode.replaceChild(newElm, oldElm);
+        });
+      };
+      var rename = function (elm, name) {
+        var newElm;
+        if (elm.nodeName !== name.toUpperCase()) {
+          newElm = create(name);
+          each$5(getAttribs(elm), function (attrNode) {
+            setAttrib(newElm, attrNode.nodeName, getAttrib(elm, attrNode.nodeName));
+          });
+          replace(newElm, elm, true);
+        }
+        return newElm || elm;
+      };
+      var findCommonAncestor = function (a, b) {
+        var ps = a, pe;
+        while (ps) {
+          pe = b;
+          while (pe && ps !== pe) {
+            pe = pe.parentNode;
+          }
+          if (ps === pe) {
+            break;
+          }
+          ps = ps.parentNode;
+        }
+        if (!ps && a.ownerDocument) {
+          return a.ownerDocument.documentElement;
+        }
+        return ps;
+      };
+      var toHex = function (rgbVal) {
+        return styles.toHex(Tools.trim(rgbVal));
+      };
+      var isNonEmptyElement = function (node) {
+        if (isElement$1(node)) {
+          var isNamedAnchor = node.nodeName.toLowerCase() === 'a' && !getAttrib(node, 'href') && getAttrib(node, 'id');
+          if (getAttrib(node, 'name') || getAttrib(node, 'data-mce-bookmark') || isNamedAnchor) {
+            return true;
+          }
+        }
+        return false;
+      };
+      var isEmpty = function (node, elements) {
+        var type, name, brCount = 0;
+        if (isNonEmptyElement(node)) {
+          return false;
+        }
+        node = node.firstChild;
+        if (node) {
+          var walker = new TreeWalker(node, node.parentNode);
+          var whitespace = schema ? schema.getWhiteSpaceElements() : {};
+          elements = elements || (schema ? schema.getNonEmptyElements() : null);
+          do {
+            type = node.nodeType;
+            if (isElement$1(node)) {
+              var bogusVal = node.getAttribute('data-mce-bogus');
+              if (bogusVal) {
+                node = walker.next(bogusVal === 'all');
+                continue;
+              }
+              name = node.nodeName.toLowerCase();
+              if (elements && elements[name]) {
+                if (name === 'br') {
+                  brCount++;
+                  node = walker.next();
+                  continue;
+                }
+                return false;
+              }
+              if (isNonEmptyElement(node)) {
+                return false;
+              }
+            }
+            if (type === 8) {
+              return false;
+            }
+            if (type === 3 && !whiteSpaceRegExp$2.test(node.nodeValue)) {
+              return false;
+            }
+            if (type === 3 && node.parentNode && whitespace[node.parentNode.nodeName] && whiteSpaceRegExp$2.test(node.nodeValue)) {
+              return false;
+            }
+            node = walker.next();
+          } while (node);
+        }
+        return brCount <= 1;
+      };
+      var createRng = function () {
+        return doc.createRange();
+      };
+      var split = function (parentElm, splitElm, replacementElm) {
+        var r = createRng(), bef, aft, pa;
+        if (parentElm && splitElm) {
+          r.setStart(parentElm.parentNode, findNodeIndex(parentElm));
+          r.setEnd(splitElm.parentNode, findNodeIndex(splitElm));
+          bef = r.extractContents();
+          r = createRng();
+          r.setStart(splitElm.parentNode, findNodeIndex(splitElm) + 1);
+          r.setEnd(parentElm.parentNode, findNodeIndex(parentElm) + 1);
+          aft = r.extractContents();
+          pa = parentElm.parentNode;
+          pa.insertBefore(trimNode(self, bef), parentElm);
+          if (replacementElm) {
+            pa.insertBefore(replacementElm, parentElm);
+          } else {
+            pa.insertBefore(splitElm, parentElm);
+          }
+          pa.insertBefore(trimNode(self, aft), parentElm);
+          remove(parentElm);
+          return replacementElm || splitElm;
+        }
+      };
+      var bind = function (target, name, func, scope) {
+        if (Tools.isArray(target)) {
+          var i = target.length;
+          var rv = [];
+          while (i--) {
+            rv[i] = bind(target[i], name, func, scope);
+          }
+          return rv;
+        }
+        if (settings.collect && (target === doc || target === win)) {
+          boundEvents.push([
+            target,
+            name,
+            func,
+            scope
+          ]);
+        }
+        return events.bind(target, name, func, scope || self);
+      };
+      var unbind = function (target, name, func) {
+        var i;
+        if (Tools.isArray(target)) {
+          i = target.length;
+          var rv = [];
+          while (i--) {
+            rv[i] = unbind(target[i], name, func);
+          }
+          return rv;
+        }
+        if (boundEvents.length > 0 && (target === doc || target === win)) {
+          i = boundEvents.length;
+          while (i--) {
+            var item = boundEvents[i];
+            if (target === item[0] && (!name || name === item[1]) && (!func || func === item[2])) {
+              events.unbind(item[0], item[1], item[2]);
+            }
+          }
+        }
+        return events.unbind(target, name, func);
+      };
+      var fire = function (target, name, evt) {
+        return events.fire(target, name, evt);
+      };
+      var getContentEditable = function (node) {
+        if (node && isElement$1(node)) {
+          var contentEditable = node.getAttribute('data-mce-contenteditable');
+          if (contentEditable && contentEditable !== 'inherit') {
+            return contentEditable;
+          }
+          return node.contentEditable !== 'inherit' ? node.contentEditable : null;
+        } else {
+          return null;
+        }
+      };
+      var getContentEditableParent = function (node) {
+        var root = getRoot();
+        var state = null;
+        for (; node && node !== root; node = node.parentNode) {
+          state = getContentEditable(node);
+          if (state !== null) {
+            break;
+          }
+        }
+        return state;
+      };
+      var destroy = function () {
+        if (boundEvents.length > 0) {
+          var i = boundEvents.length;
+          while (i--) {
+            var item = boundEvents[i];
+            events.unbind(item[0], item[1], item[2]);
+          }
+        }
+        if (Sizzle.setDocument) {
+          Sizzle.setDocument();
+        }
+      };
+      var isChildOf = function (node, parent) {
+        while (node) {
+          if (parent === node) {
+            return true;
+          }
+          node = node.parentNode;
+        }
+        return false;
+      };
+      var dumpRng = function (r) {
+        return 'startContainer: ' + r.startContainer.nodeName + ', startOffset: ' + r.startOffset + ', endContainer: ' + r.endContainer.nodeName + ', endOffset: ' + r.endOffset;
+      };
+      var self = {
+        doc: doc,
+        settings: settings,
+        win: win,
+        files: files,
+        stdMode: stdMode,
+        boxModel: boxModel,
+        styleSheetLoader: styleSheetLoader,
+        boundEvents: boundEvents,
+        styles: styles,
+        schema: schema,
+        events: events,
+        isBlock: isBlock,
+        $: $,
+        $$: $$,
+        root: null,
+        clone: clone,
+        getRoot: getRoot,
+        getViewPort: getViewPort,
+        getRect: getRect,
+        getSize: getSize,
+        getParent: getParent,
+        getParents: getParents,
+        get: get,
+        getNext: getNext,
+        getPrev: getPrev,
+        select: select,
+        is: is,
+        add: add,
+        create: create,
+        createHTML: createHTML,
+        createFragment: createFragment,
+        remove: remove,
+        setStyle: setStyle,
+        getStyle: getStyle,
+        setStyles: setStyles,
+        removeAllAttribs: removeAllAttribs,
+        setAttrib: setAttrib,
+        setAttribs: setAttribs,
+        getAttrib: getAttrib,
+        getPos: getPos$1,
+        parseStyle: parseStyle,
+        serializeStyle: serializeStyle,
+        addStyle: addStyle,
+        loadCSS: loadCSS,
+        addClass: addClass,
+        removeClass: removeClass,
+        hasClass: hasClass,
+        toggleClass: toggleClass,
+        show: show,
+        hide: hide,
+        isHidden: isHidden,
+        uniqueId: uniqueId,
+        setHTML: setHTML,
+        getOuterHTML: getOuterHTML,
+        setOuterHTML: setOuterHTML,
+        decode: decode,
+        encode: encode,
+        insertAfter: insertAfter,
+        replace: replace,
+        rename: rename,
+        findCommonAncestor: findCommonAncestor,
+        toHex: toHex,
+        run: run,
+        getAttribs: getAttribs,
+        isEmpty: isEmpty,
+        createRng: createRng,
+        nodeIndex: findNodeIndex,
+        split: split,
+        bind: bind,
+        unbind: unbind,
+        fire: fire,
+        getContentEditable: getContentEditable,
+        getContentEditableParent: getContentEditableParent,
+        destroy: destroy,
+        isChildOf: isChildOf,
+        dumpRng: dumpRng
+      };
+      attrHooks = setupAttrHooks(styles, settings, function () {
+        return self;
+      });
+      return self;
+    }
+    (function (DOMUtils) {
+      DOMUtils.DOM = DOMUtils(domGlobals.document);
+      DOMUtils.nodeIndex = findNodeIndex;
+    }(DOMUtils || (DOMUtils = {})));
+    var DOMUtils$1 = DOMUtils;
+
+    var DOM = DOMUtils$1.DOM;
+    var each$6 = Tools.each, grep$2 = Tools.grep;
+    var QUEUED = 0;
+    var LOADING = 1;
+    var LOADED = 2;
+    var FAILED = 3;
+    var ScriptLoader = function () {
+      function ScriptLoader(settings) {
+        if (settings === void 0) {
+          settings = {};
+        }
+        this.states = {};
+        this.queue = [];
+        this.scriptLoadedCallbacks = {};
+        this.queueLoadedCallbacks = [];
+        this.loading = 0;
+        this.settings = settings;
+      }
+      ScriptLoader.prototype._setReferrerPolicy = function (referrerPolicy) {
+        this.settings.referrerPolicy = referrerPolicy;
+      };
+      ScriptLoader.prototype.loadScript = function (url, success, failure) {
+        var dom = DOM;
+        var elm, id;
+        var done = function () {
+          dom.remove(id);
+          if (elm) {
+            elm.onreadystatechange = elm.onload = elm = null;
+          }
+          success();
+        };
+        var error = function () {
+          if (isFunction(failure)) {
+            failure();
+          } else {
+            if (typeof domGlobals.console !== 'undefined' && domGlobals.console.log) {
+              domGlobals.console.log('Failed to load script: ' + url);
+            }
+          }
+        };
+        id = dom.uniqueId();
+        elm = domGlobals.document.createElement('script');
+        elm.id = id;
+        elm.type = 'text/javascript';
+        elm.src = Tools._addCacheSuffix(url);
+        if (this.settings.referrerPolicy) {
+          dom.setAttrib(elm, 'referrerpolicy', this.settings.referrerPolicy);
+        }
+        elm.onload = done;
+        elm.onerror = error;
+        (domGlobals.document.getElementsByTagName('head')[0] || domGlobals.document.body).appendChild(elm);
+      };
+      ScriptLoader.prototype.isDone = function (url) {
+        return this.states[url] === LOADED;
+      };
+      ScriptLoader.prototype.markDone = function (url) {
+        this.states[url] = LOADED;
+      };
+      ScriptLoader.prototype.add = function (url, success, scope, failure) {
+        var state = this.states[url];
+        if (state === undefined) {
+          this.queue.push(url);
+          this.states[url] = QUEUED;
+        }
+        if (success) {
+          if (!this.scriptLoadedCallbacks[url]) {
+            this.scriptLoadedCallbacks[url] = [];
+          }
+          this.scriptLoadedCallbacks[url].push({
+            success: success,
+            failure: failure,
+            scope: scope || this
+          });
+        }
+      };
+      ScriptLoader.prototype.load = function (url, success, scope, failure) {
+        return this.add(url, success, scope, failure);
+      };
+      ScriptLoader.prototype.remove = function (url) {
+        delete this.states[url];
+        delete this.scriptLoadedCallbacks[url];
+      };
+      ScriptLoader.prototype.loadQueue = function (success, scope, failure) {
+        this.loadScripts(this.queue, success, scope, failure);
+      };
+      ScriptLoader.prototype.loadScripts = function (scripts, success, scope, failure) {
+        var self = this;
+        var loadScripts;
+        var failures = [];
+        var execCallbacks = function (name, url) {
+          each$6(self.scriptLoadedCallbacks[url], function (callback) {
+            if (isFunction(callback[name])) {
+              callback[name].call(callback.scope);
+            }
+          });
+          self.scriptLoadedCallbacks[url] = undefined;
+        };
+        self.queueLoadedCallbacks.push({
+          success: success,
+          failure: failure,
+          scope: scope || this
+        });
+        loadScripts = function () {
+          var loadingScripts = grep$2(scripts);
+          scripts.length = 0;
+          each$6(loadingScripts, function (url) {
+            if (self.states[url] === LOADED) {
+              execCallbacks('success', url);
+              return;
+            }
+            if (self.states[url] === FAILED) {
+              execCallbacks('failure', url);
+              return;
+            }
+            if (self.states[url] !== LOADING) {
+              self.states[url] = LOADING;
+              self.loading++;
+              self.loadScript(url, function () {
+                self.states[url] = LOADED;
+                self.loading--;
+                execCallbacks('success', url);
+                loadScripts();
+              }, function () {
+                self.states[url] = FAILED;
+                self.loading--;
+                failures.push(url);
+                execCallbacks('failure', url);
+                loadScripts();
+              });
+            }
+          });
+          if (!self.loading) {
+            var notifyCallbacks = self.queueLoadedCallbacks.slice(0);
+            self.queueLoadedCallbacks.length = 0;
+            each$6(notifyCallbacks, function (callback) {
+              if (failures.length === 0) {
+                if (isFunction(callback.success)) {
+                  callback.success.call(callback.scope);
+                }
+              } else {
+                if (isFunction(callback.failure)) {
+                  callback.failure.call(callback.scope, failures);
+                }
+              }
+            });
+          }
+        };
+        loadScripts();
+      };
+      ScriptLoader.ScriptLoader = new ScriptLoader();
+      return ScriptLoader;
+    }();
+
+    var Cell = function (initial) {
+      var value = initial;
+      var get = function () {
+        return value;
+      };
+      var set = function (v) {
+        value = v;
+      };
+      return {
+        get: get,
+        set: set
+      };
+    };
+
+    var isRaw = function (str) {
+      return isObject(str) && has(str, 'raw');
+    };
+    var isTokenised = function (str) {
+      return isArray(str) && str.length > 1;
+    };
+    var data = {};
+    var currentCode = Cell('en');
+    var getLanguageData = function () {
+      return get(data, currentCode.get());
+    };
+    var getData = function () {
+      return map$1(data, function (value) {
+        return __assign({}, value);
+      });
+    };
+    var setCode = function (newCode) {
+      if (newCode) {
+        currentCode.set(newCode);
+      }
+    };
+    var getCode = function () {
+      return currentCode.get();
+    };
+    var add = function (code, items) {
+      var langData = data[code];
+      if (!langData) {
+        data[code] = langData = {};
+      }
+      each$1(items, function (translation, name) {
+        langData[name.toLowerCase()] = translation;
+      });
+    };
+    var translate = function (text) {
+      var langData = getLanguageData().getOr({});
+      var toString = function (obj) {
+        if (isFunction(obj)) {
+          return Object.prototype.toString.call(obj);
+        }
+        return !isEmpty(obj) ? '' + obj : '';
+      };
+      var isEmpty = function (text) {
+        return text === '' || text === null || text === undefined;
+      };
+      var getLangData = function (text) {
+        var textstr = toString(text);
+        return get(langData, textstr.toLowerCase()).map(toString).getOr(textstr);
+      };
+      var removeContext = function (str) {
+        return str.replace(/{context:\w+}$/, '');
+      };
+      var translated = function (text) {
+        return text;
+      };
+      if (isEmpty(text)) {
+        return translated('');
+      }
+      if (isRaw(text)) {
+        return translated(toString(text.raw));
+      }
+      if (isTokenised(text)) {
+        var values_1 = text.slice(1);
+        var substitued = getLangData(text[0]).replace(/\{([0-9]+)\}/g, function ($1, $2) {
+          return has(values_1, $2) ? toString(values_1[$2]) : $1;
+        });
+        return translated(removeContext(substitued));
+      }
+      return translated(removeContext(getLangData(text)));
+    };
+    var isRtl = function () {
+      return getLanguageData().bind(function (items) {
+        return get(items, '_dir');
+      }).exists(function (dir) {
+        return dir === 'rtl';
+      });
+    };
+    var hasCode = function (code) {
+      return has(data, code);
+    };
+    var I18n = {
+      getData: getData,
+      setCode: setCode,
+      getCode: getCode,
+      add: add,
+      translate: translate,
+      isRtl: isRtl,
+      hasCode: hasCode
+    };
+
+    function AddOnManager() {
+      var _this = this;
+      var items = [];
+      var urls = {};
+      var lookup = {};
+      var _listeners = [];
+      var runListeners = function (name, state) {
+        var matchedListeners = filter(_listeners, function (listener) {
+          return listener.name === name && listener.state === state;
+        });
+        each(matchedListeners, function (listener) {
+          return listener.callback();
+        });
+      };
+      var get = function (name) {
+        if (lookup[name]) {
+          return lookup[name].instance;
+        }
+        return undefined;
+      };
+      var dependencies = function (name) {
+        var result;
+        if (lookup[name]) {
+          result = lookup[name].dependencies;
+        }
+        return result || [];
+      };
+      var requireLangPack = function (name, languages) {
+        if (AddOnManager.languageLoad !== false) {
+          waitFor(name, function () {
+            var language = I18n.getCode();
+            var wrappedLanguages = ',' + (languages || '') + ',';
+            if (!language || languages && wrappedLanguages.indexOf(',' + language + ',') === -1) {
+              return;
+            }
+            ScriptLoader.ScriptLoader.add(urls[name] + '/langs/' + language + '.js');
+          }, 'loaded');
+        }
+      };
+      var add = function (id, addOn, dependencies) {
+        var addOnConstructor = addOn;
+        items.push(addOnConstructor);
+        lookup[id] = {
+          instance: addOnConstructor,
+          dependencies: dependencies
+        };
+        runListeners(id, 'added');
+        return addOnConstructor;
+      };
+      var remove = function (name) {
+        delete urls[name];
+        delete lookup[name];
+      };
+      var createUrl = function (baseUrl, dep) {
+        if (typeof dep === 'object') {
+          return dep;
+        }
+        return typeof baseUrl === 'string' ? {
+          prefix: '',
+          resource: dep,
+          suffix: ''
+        } : {
+          prefix: baseUrl.prefix,
+          resource: dep,
+          suffix: baseUrl.suffix
+        };
+      };
+      var addComponents = function (pluginName, scripts) {
+        var pluginUrl = _this.urls[pluginName];
+        each(scripts, function (script) {
+          ScriptLoader.ScriptLoader.add(pluginUrl + '/' + script);
+        });
+      };
+      var loadDependencies = function (name, addOnUrl, success, scope) {
+        var deps = dependencies(name);
+        each(deps, function (dep) {
+          var newUrl = createUrl(addOnUrl, dep);
+          load(newUrl.resource, newUrl, undefined, undefined);
+        });
+        if (success) {
+          if (scope) {
+            success.call(scope);
+          } else {
+            success.call(ScriptLoader);
+          }
+        }
+      };
+      var load = function (name, addOnUrl, success, scope, failure) {
+        if (urls[name]) {
+          return;
+        }
+        var urlString = typeof addOnUrl === 'string' ? addOnUrl : addOnUrl.prefix + addOnUrl.resource + addOnUrl.suffix;
+        if (urlString.indexOf('/') !== 0 && urlString.indexOf('://') === -1) {
+          urlString = AddOnManager.baseURL + '/' + urlString;
+        }
+        urls[name] = urlString.substring(0, urlString.lastIndexOf('/'));
+        var done = function () {
+          runListeners(name, 'loaded');
+          loadDependencies(name, addOnUrl, success, scope);
+        };
+        if (lookup[name]) {
+          done();
+        } else {
+          ScriptLoader.ScriptLoader.add(urlString, done, scope, failure);
+        }
+      };
+      var waitFor = function (name, callback, state) {
+        if (state === void 0) {
+          state = 'added';
+        }
+        if (has(lookup, name) && state === 'added') {
+          callback();
+        } else if (has(urls, name) && state === 'loaded') {
+          callback();
+        } else {
+          _listeners.push({
+            name: name,
+            state: state,
+            callback: callback
+          });
+        }
+      };
+      return {
+        items: items,
+        urls: urls,
+        lookup: lookup,
+        _listeners: _listeners,
+        get: get,
+        dependencies: dependencies,
+        requireLangPack: requireLangPack,
+        add: add,
+        remove: remove,
+        createUrl: createUrl,
+        addComponents: addComponents,
+        load: load,
+        waitFor: waitFor
+      };
+    }
+    (function (AddOnManager) {
+      AddOnManager.PluginManager = AddOnManager();
+      AddOnManager.ThemeManager = AddOnManager();
+    }(AddOnManager || (AddOnManager = {})));
+    var AddOnManager$1 = AddOnManager;
+
+    var first = function (fn, rate) {
+      var timer = null;
+      var cancel = function () {
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+          timer = null;
+        }
+      };
+      var throttle = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (timer === null) {
+          timer = domGlobals.setTimeout(function () {
+            fn.apply(null, args);
+            timer = null;
+          }, rate);
+        }
+      };
+      return {
+        cancel: cancel,
+        throttle: throttle
+      };
+    };
+    var last$2 = function (fn, rate) {
+      var timer = null;
+      var cancel = function () {
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+          timer = null;
+        }
+      };
+      var throttle = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (timer !== null) {
+          domGlobals.clearTimeout(timer);
+        }
+        timer = domGlobals.setTimeout(function () {
+          fn.apply(null, args);
+          timer = null;
+        }, rate);
+      };
+      return {
+        cancel: cancel,
+        throttle: throttle
+      };
+    };
+
+    var read = function (element, attr) {
+      var value = get$3(element, attr);
+      return value === undefined || value === '' ? [] : value.split(' ');
+    };
+    var add$1 = function (element, attr, id) {
+      var old = read(element, attr);
+      var nu = old.concat([id]);
+      set(element, attr, nu.join(' '));
+      return true;
+    };
+    var remove$2 = function (element, attr, id) {
+      var nu = filter(read(element, attr), function (v) {
+        return v !== id;
+      });
+      if (nu.length > 0) {
+        set(element, attr, nu.join(' '));
+      } else {
+        remove$1(element, attr);
+      }
+      return false;
+    };
+
+    var supports = function (element) {
+      return element.dom().classList !== undefined;
+    };
+    var get$5 = function (element) {
+      return read(element, 'class');
+    };
+    var add$2 = function (element, clazz) {
+      return add$1(element, 'class', clazz);
+    };
+    var remove$3 = function (element, clazz) {
+      return remove$2(element, 'class', clazz);
+    };
+
+    var add$3 = function (element, clazz) {
+      if (supports(element)) {
+        element.dom().classList.add(clazz);
+      } else {
+        add$2(element, clazz);
+      }
+    };
+    var cleanClass = function (element) {
+      var classList = supports(element) ? element.dom().classList : get$5(element);
+      if (classList.length === 0) {
+        remove$1(element, 'class');
+      }
+    };
+    var remove$4 = function (element, clazz) {
+      if (supports(element)) {
+        var classList = element.dom().classList;
+        classList.remove(clazz);
+      } else {
+        remove$3(element, clazz);
+      }
+      cleanClass(element);
+    };
+    var has$2 = function (element, clazz) {
+      return supports(element) && element.dom().classList.contains(clazz);
+    };
+
+    var descendants = function (scope, predicate) {
+      var result = [];
+      each(children(scope), function (x) {
+        if (predicate(x)) {
+          result = result.concat([x]);
+        }
+        result = result.concat(descendants(x, predicate));
+      });
+      return result;
+    };
+
+    var descendants$1 = function (scope, selector) {
+      return all(selector, scope);
+    };
+
+    function ClosestOrAncestor (is, ancestor, scope, a, isRoot) {
+      return is(scope, a) ? Option.some(scope) : isFunction(isRoot) && isRoot(scope) ? Option.none() : ancestor(scope, a, isRoot);
+    }
+
+    var ancestor = function (scope, predicate, isRoot) {
+      var element = scope.dom();
+      var stop = isFunction(isRoot) ? isRoot : constant(false);
+      while (element.parentNode) {
+        element = element.parentNode;
+        var el = Element.fromDom(element);
+        if (predicate(el)) {
+          return Option.some(el);
+        } else if (stop(el)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var closest = function (scope, predicate, isRoot) {
+      var is = function (s, test) {
+        return test(s);
+      };
+      return ClosestOrAncestor(is, ancestor, scope, predicate, isRoot);
+    };
+
+    var ancestor$1 = function (scope, selector, isRoot) {
+      return ancestor(scope, function (e) {
+        return is(e, selector);
+      }, isRoot);
+    };
+    var descendant = function (scope, selector) {
+      return one(selector, scope);
+    };
+    var closest$1 = function (scope, selector, isRoot) {
+      var is$1 = function (element, selector) {
+        return is(element, selector);
+      };
+      return ClosestOrAncestor(is$1, ancestor$1, scope, selector, isRoot);
+    };
+
+    var annotation = constant('mce-annotation');
+    var dataAnnotation = constant('data-mce-annotation');
+    var dataAnnotationId = constant('data-mce-annotation-uid');
+
+    var identify = function (editor, annotationName) {
+      var rng = editor.selection.getRng();
+      var start = Element.fromDom(rng.startContainer);
+      var root = Element.fromDom(editor.getBody());
+      var selector = annotationName.fold(function () {
+        return '.' + annotation();
+      }, function (an) {
+        return '[' + dataAnnotation() + '="' + an + '"]';
+      });
+      var newStart = child(start, rng.startOffset).getOr(start);
+      var closest = closest$1(newStart, selector, function (n) {
+        return eq$2(n, root);
+      });
+      var getAttr = function (c, property) {
+        if (has$1(c, property)) {
+          return Option.some(get$3(c, property));
+        } else {
+          return Option.none();
+        }
+      };
+      return closest.bind(function (c) {
+        return getAttr(c, '' + dataAnnotationId()).bind(function (uid) {
+          return getAttr(c, '' + dataAnnotation()).map(function (name) {
+            var elements = findMarkers(editor, uid);
+            return {
+              uid: uid,
+              name: name,
+              elements: elements
+            };
+          });
+        });
+      });
+    };
+    var isAnnotation = function (elem) {
+      return isElement(elem) && has$2(elem, annotation());
+    };
+    var findMarkers = function (editor, uid) {
+      var body = Element.fromDom(editor.getBody());
+      return descendants$1(body, '[' + dataAnnotationId() + '="' + uid + '"]');
+    };
+    var findAll = function (editor, name) {
+      var body = Element.fromDom(editor.getBody());
+      var markers = descendants$1(body, '[' + dataAnnotation() + '="' + name + '"]');
+      var directory = {};
+      each(markers, function (m) {
+        var uid = get$3(m, dataAnnotationId());
+        var nodesAlready = directory.hasOwnProperty(uid) ? directory[uid] : [];
+        directory[uid] = nodesAlready.concat([m]);
+      });
+      return directory;
+    };
+
+    var setup = function (editor, _registry) {
+      var changeCallbacks = Cell({});
+      var initData = function () {
+        return {
+          listeners: [],
+          previous: Cell(Option.none())
+        };
+      };
+      var withCallbacks = function (name, f) {
+        updateCallbacks(name, function (data) {
+          f(data);
+          return data;
+        });
+      };
+      var updateCallbacks = function (name, f) {
+        var callbackMap = changeCallbacks.get();
+        var data = callbackMap.hasOwnProperty(name) ? callbackMap[name] : initData();
+        var outputData = f(data);
+        callbackMap[name] = outputData;
+        changeCallbacks.set(callbackMap);
+      };
+      var fireCallbacks = function (name, uid, elements) {
+        withCallbacks(name, function (data) {
+          each(data.listeners, function (f) {
+            return f(true, name, {
+              uid: uid,
+              nodes: map(elements, function (elem) {
+                return elem.dom();
+              })
+            });
+          });
+        });
+      };
+      var fireNoAnnotation = function (name) {
+        withCallbacks(name, function (data) {
+          each(data.listeners, function (f) {
+            return f(false, name);
+          });
+        });
+      };
+      var onNodeChange = last$2(function () {
+        var callbackMap = changeCallbacks.get();
+        var annotations = sort$1(keys(callbackMap));
+        each(annotations, function (name) {
+          updateCallbacks(name, function (data) {
+            var prev = data.previous.get();
+            identify(editor, Option.some(name)).fold(function () {
+              if (prev.isSome()) {
+                fireNoAnnotation(name);
+                data.previous.set(Option.none());
+              }
+            }, function (_a) {
+              var uid = _a.uid, name = _a.name, elements = _a.elements;
+              if (!prev.is(uid)) {
+                fireCallbacks(name, uid, elements);
+                data.previous.set(Option.some(uid));
+              }
+            });
+            return {
+              previous: data.previous,
+              listeners: data.listeners
+            };
+          });
+        });
+      }, 30);
+      editor.on('remove', function () {
+        onNodeChange.cancel();
+      });
+      editor.on('NodeChange', function () {
+        onNodeChange.throttle();
+      });
+      var addListener = function (name, f) {
+        updateCallbacks(name, function (data) {
+          return {
+            previous: data.previous,
+            listeners: data.listeners.concat([f])
+          };
+        });
+      };
+      return { addListener: addListener };
+    };
+
+    var setup$1 = function (editor, registry) {
+      var identifyParserNode = function (span) {
+        return Option.from(span.attr(dataAnnotation())).bind(registry.lookup);
+      };
+      editor.on('init', function () {
+        editor.serializer.addNodeFilter('span', function (spans) {
+          each(spans, function (span) {
+            identifyParserNode(span).each(function (settings) {
+              if (settings.persistent === false) {
+                span.unwrap();
+              }
+            });
+          });
+        });
+      });
+    };
+
+    var create$1 = function () {
+      var annotations = {};
+      var register = function (name, settings) {
+        annotations[name] = {
+          name: name,
+          settings: settings
+        };
+      };
+      var lookup = function (name) {
+        return annotations.hasOwnProperty(name) ? Option.from(annotations[name]).map(function (a) {
+          return a.settings;
+        }) : Option.none();
+      };
+      return {
+        register: register,
+        lookup: lookup
+      };
+    };
+
+    var unique = 0;
+    var generate = function (prefix) {
+      var date = new Date();
+      var time = date.getTime();
+      var random = Math.floor(Math.random() * 1000000000);
+      unique++;
+      return prefix + '_' + random + unique + String(time);
+    };
+
+    var add$4 = function (element, classes) {
+      each(classes, function (x) {
+        add$3(element, x);
+      });
+    };
+
+    var fromHtml$1 = function (html, scope) {
+      var doc = scope || domGlobals.document;
+      var div = doc.createElement('div');
+      div.innerHTML = html;
+      return children(Element.fromDom(div));
+    };
+
+    var get$6 = function (element) {
+      return element.dom().innerHTML;
+    };
+    var set$1 = function (element, content) {
+      var owner$1 = owner(element);
+      var docDom = owner$1.dom();
+      var fragment = Element.fromDom(docDom.createDocumentFragment());
+      var contentElements = fromHtml$1(content, docDom);
+      append$1(fragment, contentElements);
+      empty(element);
+      append(element, fragment);
+    };
+
+    var clone = function (original, isDeep) {
+      return Element.fromDom(original.dom().cloneNode(isDeep));
+    };
+    var shallow = function (original) {
+      return clone(original, false);
+    };
+    var deep = function (original) {
+      return clone(original, true);
+    };
+
+    var TextWalker = function (startNode, rootNode, isBoundary) {
+      if (isBoundary === void 0) {
+        isBoundary = never;
+      }
+      var walker = new TreeWalker(startNode, rootNode);
+      var walk = function (direction) {
+        var next;
+        do {
+          next = walker[direction]();
+        } while (next && !isText$1(next) && !isBoundary(next));
+        return Option.from(next).filter(isText$1);
+      };
+      return {
+        current: function () {
+          return Option.from(walker.current()).filter(isText$1);
+        },
+        next: function () {
+          return walk('next');
+        },
+        prev: function () {
+          return walk('prev');
+        },
+        prev2: function () {
+          return walk('prev2');
+        }
+      };
+    };
+
+    var TextSeeker = function (dom, isBoundary) {
+      var isBlockBoundary = isBoundary ? isBoundary : function (node) {
+        return dom.isBlock(node) || isBr(node) || isContentEditableFalse(node);
+      };
+      var walk = function (node, offset, walker, process) {
+        if (isText$1(node)) {
+          var newOffset = process(node, offset, node.data);
+          if (newOffset !== -1) {
+            return Option.some({
+              container: node,
+              offset: newOffset
+            });
+          }
+        }
+        return walker().bind(function (next) {
+          return walk(next.container, next.offset, walker, process);
+        });
+      };
+      var backwards = function (node, offset, process, root) {
+        var walker = TextWalker(node, root, isBlockBoundary);
+        return walk(node, offset, function () {
+          return walker.prev().map(function (prev) {
+            return {
+              container: prev,
+              offset: prev.length
+            };
+          });
+        }, process).getOrNull();
+      };
+      var forwards = function (node, offset, process, root) {
+        var walker = TextWalker(node, root, isBlockBoundary);
+        return walk(node, offset, function () {
+          return walker.next().map(function (next) {
+            return {
+              container: next,
+              offset: 0
+            };
+          });
+        }, process).getOrNull();
+      };
+      return {
+        backwards: backwards,
+        forwards: forwards
+      };
+    };
+
+    var ZWSP = zeroWidth;
+    var isZwsp$1 = isZwsp;
+    var trim$3 = removeZwsp;
+
+    var isElement$2 = isElement$1;
+    var isText$2 = isText$1;
+    var isCaretContainerBlock = function (node) {
+      if (isText$2(node)) {
+        node = node.parentNode;
+      }
+      return isElement$2(node) && node.hasAttribute('data-mce-caret');
+    };
+    var isCaretContainerInline = function (node) {
+      return isText$2(node) && isZwsp$1(node.data);
+    };
+    var isCaretContainer = function (node) {
+      return isCaretContainerBlock(node) || isCaretContainerInline(node);
+    };
+    var hasContent = function (node) {
+      return node.firstChild !== node.lastChild || !isBr(node.firstChild);
+    };
+    var insertInline = function (node, before) {
+      var doc, sibling, textNode, parentNode;
+      doc = node.ownerDocument;
+      textNode = doc.createTextNode(ZWSP);
+      parentNode = node.parentNode;
+      if (!before) {
+        sibling = node.nextSibling;
+        if (isText$2(sibling)) {
+          if (isCaretContainer(sibling)) {
+            return sibling;
+          }
+          if (startsWithCaretContainer(sibling)) {
+            sibling.splitText(1);
+            return sibling;
+          }
+        }
+        if (node.nextSibling) {
+          parentNode.insertBefore(textNode, node.nextSibling);
+        } else {
+          parentNode.appendChild(textNode);
+        }
+      } else {
+        sibling = node.previousSibling;
+        if (isText$2(sibling)) {
+          if (isCaretContainer(sibling)) {
+            return sibling;
+          }
+          if (endsWithCaretContainer(sibling)) {
+            return sibling.splitText(sibling.data.length - 1);
+          }
+        }
+        parentNode.insertBefore(textNode, node);
+      }
+      return textNode;
+    };
+    var isBeforeInline = function (pos) {
+      var container = pos.container();
+      if (!pos || !isText$1(container)) {
+        return false;
+      }
+      return container.data.charAt(pos.offset()) === ZWSP || pos.isAtStart() && isCaretContainerInline(container.previousSibling);
+    };
+    var isAfterInline = function (pos) {
+      var container = pos.container();
+      if (!pos || !isText$1(container)) {
+        return false;
+      }
+      return container.data.charAt(pos.offset() - 1) === ZWSP || pos.isAtEnd() && isCaretContainerInline(container.nextSibling);
+    };
+    var createBogusBr = function () {
+      var br = domGlobals.document.createElement('br');
+      br.setAttribute('data-mce-bogus', '1');
+      return br;
+    };
+    var insertBlock = function (blockName, node, before) {
+      var doc, blockNode, parentNode;
+      doc = node.ownerDocument;
+      blockNode = doc.createElement(blockName);
+      blockNode.setAttribute('data-mce-caret', before ? 'before' : 'after');
+      blockNode.setAttribute('data-mce-bogus', 'all');
+      blockNode.appendChild(createBogusBr());
+      parentNode = node.parentNode;
+      if (!before) {
+        if (node.nextSibling) {
+          parentNode.insertBefore(blockNode, node.nextSibling);
+        } else {
+          parentNode.appendChild(blockNode);
+        }
+      } else {
+        parentNode.insertBefore(blockNode, node);
+      }
+      return blockNode;
+    };
+    var startsWithCaretContainer = function (node) {
+      return isText$2(node) && node.data[0] === ZWSP;
+    };
+    var endsWithCaretContainer = function (node) {
+      return isText$2(node) && node.data[node.data.length - 1] === ZWSP;
+    };
+    var trimBogusBr = function (elm) {
+      var brs = elm.getElementsByTagName('br');
+      var lastBr = brs[brs.length - 1];
+      if (isBogus(lastBr)) {
+        lastBr.parentNode.removeChild(lastBr);
+      }
+    };
+    var showCaretContainerBlock = function (caretContainer) {
+      if (caretContainer && caretContainer.hasAttribute('data-mce-caret')) {
+        trimBogusBr(caretContainer);
+        caretContainer.removeAttribute('data-mce-caret');
+        caretContainer.removeAttribute('data-mce-bogus');
+        caretContainer.removeAttribute('style');
+        caretContainer.removeAttribute('_moz_abspos');
+        return caretContainer;
+      }
+      return null;
+    };
+    var isRangeInCaretContainerBlock = function (range) {
+      return isCaretContainerBlock(range.startContainer);
+    };
+
+    var isContentEditableTrue$1 = isContentEditableTrue;
+    var isContentEditableFalse$1 = isContentEditableFalse;
+    var isBr$2 = isBr;
+    var isText$3 = isText$1;
+    var isInvalidTextElement = matchNodeNames([
+      'script',
+      'style',
+      'textarea'
+    ]);
+    var isAtomicInline = matchNodeNames([
+      'img',
+      'input',
+      'textarea',
+      'hr',
+      'iframe',
+      'video',
+      'audio',
+      'object'
+    ]);
+    var isTable$2 = matchNodeNames(['table']);
+    var isCaretContainer$1 = isCaretContainer;
+    var isCaretCandidate = function (node) {
+      if (isCaretContainer$1(node)) {
+        return false;
+      }
+      if (isText$3(node)) {
+        if (isInvalidTextElement(node.parentNode)) {
+          return false;
+        }
+        return true;
+      }
+      return isAtomicInline(node) || isBr$2(node) || isTable$2(node) || isNonUiContentEditableFalse(node);
+    };
+    var isUnselectable = function (node) {
+      return isElement$1(node) && node.getAttribute('unselectable') === 'true';
+    };
+    var isNonUiContentEditableFalse = function (node) {
+      return isUnselectable(node) === false && isContentEditableFalse$1(node);
+    };
+    var isInEditable = function (node, root) {
+      for (node = node.parentNode; node && node !== root; node = node.parentNode) {
+        if (isNonUiContentEditableFalse(node)) {
+          return false;
+        }
+        if (isContentEditableTrue$1(node)) {
+          return true;
+        }
+      }
+      return true;
+    };
+    var isAtomicContentEditableFalse = function (node) {
+      if (!isNonUiContentEditableFalse(node)) {
+        return false;
+      }
+      return foldl(from$1(node.getElementsByTagName('*')), function (result, elm) {
+        return result || isContentEditableTrue$1(elm);
+      }, false) !== true;
+    };
+    var isAtomic = function (node) {
+      return isAtomicInline(node) || isAtomicContentEditableFalse(node);
+    };
+    var isEditableCaretCandidate = function (node, root) {
+      return isCaretCandidate(node) && isInEditable(node, root);
+    };
+
+    var round = Math.round;
+    var clone$1 = function (rect) {
+      if (!rect) {
+        return {
+          left: 0,
+          top: 0,
+          bottom: 0,
+          right: 0,
+          width: 0,
+          height: 0
+        };
+      }
+      return {
+        left: round(rect.left),
+        top: round(rect.top),
+        bottom: round(rect.bottom),
+        right: round(rect.right),
+        width: round(rect.width),
+        height: round(rect.height)
+      };
+    };
+    var collapse = function (rect, toStart) {
+      rect = clone$1(rect);
+      if (toStart) {
+        rect.right = rect.left;
+      } else {
+        rect.left = rect.left + rect.width;
+        rect.right = rect.left;
+      }
+      rect.width = 0;
+      return rect;
+    };
+    var isEqual = function (rect1, rect2) {
+      return rect1.left === rect2.left && rect1.top === rect2.top && rect1.bottom === rect2.bottom && rect1.right === rect2.right;
+    };
+    var isValidOverflow = function (overflowY, rect1, rect2) {
+      return overflowY >= 0 && overflowY <= Math.min(rect1.height, rect2.height) / 2;
+    };
+    var isAbove = function (rect1, rect2) {
+      if (rect1.bottom - rect1.height / 2 < rect2.top) {
+        return true;
+      }
+      if (rect1.top > rect2.bottom) {
+        return false;
+      }
+      return isValidOverflow(rect2.top - rect1.bottom, rect1, rect2);
+    };
+    var isBelow = function (rect1, rect2) {
+      if (rect1.top > rect2.bottom) {
+        return true;
+      }
+      if (rect1.bottom < rect2.top) {
+        return false;
+      }
+      return isValidOverflow(rect2.bottom - rect1.top, rect1, rect2);
+    };
+    var containsXY = function (rect, clientX, clientY) {
+      return clientX >= rect.left && clientX <= rect.right && clientY >= rect.top && clientY <= rect.bottom;
+    };
+
+    var getSelectedNode = function (range) {
+      var startContainer = range.startContainer, startOffset = range.startOffset;
+      if (startContainer.hasChildNodes() && range.endOffset === startOffset + 1) {
+        return startContainer.childNodes[startOffset];
+      }
+      return null;
+    };
+    var getNode = function (container, offset) {
+      if (container.nodeType === 1 && container.hasChildNodes()) {
+        if (offset >= container.childNodes.length) {
+          offset = container.childNodes.length - 1;
+        }
+        container = container.childNodes[offset];
+      }
+      return container;
+    };
+
+    var extendingChars = new RegExp('[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a' + '\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0' + '\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c' + '\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3' + '\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc' + '\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57' + '\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56' + '\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44' + '\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9' + '\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97' + '\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074' + '\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5' + '\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18' + '\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1ABE\u1b00-\u1b03\u1b34' + '\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9' + '\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9' + '\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20DD-\u20E0\u20e1\u20E2-\u20E4\u20e5-\u20f0\u2cef-\u2cf1' + '\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\uA670-\uA672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1' + '\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc' + '\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1' + '\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]');
+    var isExtendingChar = function (ch) {
+      return typeof ch === 'string' && ch.charCodeAt(0) >= 768 && extendingChars.test(ch);
+    };
+
+    var cat = function (arr) {
+      var r = [];
+      var push = function (x) {
+        r.push(x);
+      };
+      for (var i = 0; i < arr.length; i++) {
+        arr[i].each(push);
+      }
+      return r;
+    };
+    var lift2 = function (oa, ob, f) {
+      return oa.isSome() && ob.isSome() ? Option.some(f(oa.getOrDie(), ob.getOrDie())) : Option.none();
+    };
+    var lift3 = function (oa, ob, oc, f) {
+      return oa.isSome() && ob.isSome() && oc.isSome() ? Option.some(f(oa.getOrDie(), ob.getOrDie(), oc.getOrDie())) : Option.none();
+    };
+    var someIf = function (b, a) {
+      return b ? Option.some(a) : Option.none();
+    };
+
+    var or = function () {
+      var args = [];
+      for (var _i = 0; _i < arguments.length; _i++) {
+        args[_i] = arguments[_i];
+      }
+      return function (x) {
+        for (var i = 0; i < args.length; i++) {
+          if (args[i](x)) {
+            return true;
+          }
+        }
+        return false;
+      };
+    };
+    var and = function () {
+      var args = [];
+      for (var _i = 0; _i < arguments.length; _i++) {
+        args[_i] = arguments[_i];
+      }
+      return function (x) {
+        for (var i = 0; i < args.length; i++) {
+          if (!args[i](x)) {
+            return false;
+          }
+        }
+        return true;
+      };
+    };
+
+    var isElement$3 = isElement$1;
+    var isCaretCandidate$1 = isCaretCandidate;
+    var isBlock$1 = matchStyleValues('display', 'block table');
+    var isFloated = matchStyleValues('float', 'left right');
+    var isValidElementCaretCandidate = and(isElement$3, isCaretCandidate$1, not(isFloated));
+    var isNotPre = not(matchStyleValues('white-space', 'pre pre-line pre-wrap'));
+    var isText$4 = isText$1;
+    var isBr$3 = isBr;
+    var nodeIndex = DOMUtils$1.nodeIndex;
+    var resolveIndex = getNode;
+    var createRange = function (doc) {
+      return 'createRange' in doc ? doc.createRange() : DOMUtils$1.DOM.createRng();
+    };
+    var isWhiteSpace = function (chr) {
+      return chr && /[\r\n\t ]/.test(chr);
+    };
+    var isRange = function (rng) {
+      return !!rng.setStart && !!rng.setEnd;
+    };
+    var isHiddenWhiteSpaceRange = function (range) {
+      var container = range.startContainer;
+      var offset = range.startOffset;
+      var text;
+      if (isWhiteSpace(range.toString()) && isNotPre(container.parentNode) && isText$1(container)) {
+        text = container.data;
+        if (isWhiteSpace(text[offset - 1]) || isWhiteSpace(text[offset + 1])) {
+          return true;
+        }
+      }
+      return false;
+    };
+    var getBrClientRect = function (brNode) {
+      var doc = brNode.ownerDocument;
+      var rng = createRange(doc);
+      var nbsp$1 = doc.createTextNode(nbsp);
+      var parentNode = brNode.parentNode;
+      var clientRect;
+      parentNode.insertBefore(nbsp$1, brNode);
+      rng.setStart(nbsp$1, 0);
+      rng.setEnd(nbsp$1, 1);
+      clientRect = clone$1(rng.getBoundingClientRect());
+      parentNode.removeChild(nbsp$1);
+      return clientRect;
+    };
+    var getBoundingClientRectWebKitText = function (rng) {
+      var sc = rng.startContainer;
+      var ec = rng.endContainer;
+      var so = rng.startOffset;
+      var eo = rng.endOffset;
+      if (sc === ec && isText$1(ec) && so === 0 && eo === 1) {
+        var newRng = rng.cloneRange();
+        newRng.setEndAfter(ec);
+        return getBoundingClientRect(newRng);
+      } else {
+        return null;
+      }
+    };
+    var isZeroRect = function (r) {
+      return r.left === 0 && r.right === 0 && r.top === 0 && r.bottom === 0;
+    };
+    var getBoundingClientRect = function (item) {
+      var clientRect, clientRects;
+      clientRects = item.getClientRects();
+      if (clientRects.length > 0) {
+        clientRect = clone$1(clientRects[0]);
+      } else {
+        clientRect = clone$1(item.getBoundingClientRect());
+      }
+      if (!isRange(item) && isBr$3(item) && isZeroRect(clientRect)) {
+        return getBrClientRect(item);
+      }
+      if (isZeroRect(clientRect) && isRange(item)) {
+        return getBoundingClientRectWebKitText(item);
+      }
+      return clientRect;
+    };
+    var collapseAndInflateWidth = function (clientRect, toStart) {
+      var newClientRect = collapse(clientRect, toStart);
+      newClientRect.width = 1;
+      newClientRect.right = newClientRect.left + 1;
+      return newClientRect;
+    };
+    var getCaretPositionClientRects = function (caretPosition) {
+      var clientRects = [];
+      var beforeNode, node;
+      var addUniqueAndValidRect = function (clientRect) {
+        if (clientRect.height === 0) {
+          return;
+        }
+        if (clientRects.length > 0) {
+          if (isEqual(clientRect, clientRects[clientRects.length - 1])) {
+            return;
+          }
+        }
+        clientRects.push(clientRect);
+      };
+      var addCharacterOffset = function (container, offset) {
+        var range = createRange(container.ownerDocument);
+        if (offset < container.data.length) {
+          if (isExtendingChar(container.data[offset])) {
+            return clientRects;
+          }
+          if (isExtendingChar(container.data[offset - 1])) {
+            range.setStart(container, offset);
+            range.setEnd(container, offset + 1);
+            if (!isHiddenWhiteSpaceRange(range)) {
+              addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(range), false));
+              return clientRects;
+            }
+          }
+        }
+        if (offset > 0) {
+          range.setStart(container, offset - 1);
+          range.setEnd(container, offset);
+          if (!isHiddenWhiteSpaceRange(range)) {
+            addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(range), false));
+          }
+        }
+        if (offset < container.data.length) {
+          range.setStart(container, offset);
+          range.setEnd(container, offset + 1);
+          if (!isHiddenWhiteSpaceRange(range)) {
+            addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(range), true));
+          }
+        }
+      };
+      if (isText$4(caretPosition.container())) {
+        addCharacterOffset(caretPosition.container(), caretPosition.offset());
+        return clientRects;
+      }
+      if (isElement$3(caretPosition.container())) {
+        if (caretPosition.isAtEnd()) {
+          node = resolveIndex(caretPosition.container(), caretPosition.offset());
+          if (isText$4(node)) {
+            addCharacterOffset(node, node.data.length);
+          }
+          if (isValidElementCaretCandidate(node) && !isBr$3(node)) {
+            addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(node), false));
+          }
+        } else {
+          node = resolveIndex(caretPosition.container(), caretPosition.offset());
+          if (isText$4(node)) {
+            addCharacterOffset(node, 0);
+          }
+          if (isValidElementCaretCandidate(node) && caretPosition.isAtEnd()) {
+            addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(node), false));
+            return clientRects;
+          }
+          beforeNode = resolveIndex(caretPosition.container(), caretPosition.offset() - 1);
+          if (isValidElementCaretCandidate(beforeNode) && !isBr$3(beforeNode)) {
+            if (isBlock$1(beforeNode) || isBlock$1(node) || !isValidElementCaretCandidate(node)) {
+              addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(beforeNode), false));
+            }
+          }
+          if (isValidElementCaretCandidate(node)) {
+            addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(node), true));
+          }
+        }
+      }
+      return clientRects;
+    };
+    function CaretPosition(container, offset, clientRects) {
+      var isAtStart = function () {
+        if (isText$4(container)) {
+          return offset === 0;
+        }
+        return offset === 0;
+      };
+      var isAtEnd = function () {
+        if (isText$4(container)) {
+          return offset >= container.data.length;
+        }
+        return offset >= container.childNodes.length;
+      };
+      var toRange = function () {
+        var range;
+        range = createRange(container.ownerDocument);
+        range.setStart(container, offset);
+        range.setEnd(container, offset);
+        return range;
+      };
+      var getClientRects = function () {
+        if (!clientRects) {
+          clientRects = getCaretPositionClientRects(CaretPosition(container, offset));
+        }
+        return clientRects;
+      };
+      var isVisible = function () {
+        return getClientRects().length > 0;
+      };
+      var isEqual = function (caretPosition) {
+        return caretPosition && container === caretPosition.container() && offset === caretPosition.offset();
+      };
+      var getNode = function (before) {
+        return resolveIndex(container, before ? offset - 1 : offset);
+      };
+      return {
+        container: constant(container),
+        offset: constant(offset),
+        toRange: toRange,
+        getClientRects: getClientRects,
+        isVisible: isVisible,
+        isAtStart: isAtStart,
+        isAtEnd: isAtEnd,
+        isEqual: isEqual,
+        getNode: getNode
+      };
+    }
+    (function (CaretPosition) {
+      CaretPosition.fromRangeStart = function (range) {
+        return CaretPosition(range.startContainer, range.startOffset);
+      };
+      CaretPosition.fromRangeEnd = function (range) {
+        return CaretPosition(range.endContainer, range.endOffset);
+      };
+      CaretPosition.after = function (node) {
+        return CaretPosition(node.parentNode, nodeIndex(node) + 1);
+      };
+      CaretPosition.before = function (node) {
+        return CaretPosition(node.parentNode, nodeIndex(node));
+      };
+      CaretPosition.isAbove = function (pos1, pos2) {
+        return lift2(head(pos2.getClientRects()), last(pos1.getClientRects()), isAbove).getOr(false);
+      };
+      CaretPosition.isBelow = function (pos1, pos2) {
+        return lift2(last(pos2.getClientRects()), head(pos1.getClientRects()), isBelow).getOr(false);
+      };
+      CaretPosition.isAtStart = function (pos) {
+        return pos ? pos.isAtStart() : false;
+      };
+      CaretPosition.isAtEnd = function (pos) {
+        return pos ? pos.isAtEnd() : false;
+      };
+      CaretPosition.isTextPosition = function (pos) {
+        return pos ? isText$1(pos.container()) : false;
+      };
+      CaretPosition.isElementPosition = function (pos) {
+        return CaretPosition.isTextPosition(pos) === false;
+      };
+    }(CaretPosition || (CaretPosition = {})));
+    var CaretPosition$1 = CaretPosition;
+
+    var isText$5 = isText$1;
+    var isBogus$1 = isBogus;
+    var nodeIndex$1 = DOMUtils$1.nodeIndex;
+    var normalizedParent = function (node) {
+      var parentNode = node.parentNode;
+      if (isBogus$1(parentNode)) {
+        return normalizedParent(parentNode);
+      }
+      return parentNode;
+    };
+    var getChildNodes = function (node) {
+      if (!node) {
+        return [];
+      }
+      return reduce(node.childNodes, function (result, node) {
+        if (isBogus$1(node) && node.nodeName !== 'BR') {
+          result = result.concat(getChildNodes(node));
+        } else {
+          result.push(node);
+        }
+        return result;
+      }, []);
+    };
+    var normalizedTextOffset = function (node, offset) {
+      while (node = node.previousSibling) {
+        if (!isText$5(node)) {
+          break;
+        }
+        offset += node.data.length;
+      }
+      return offset;
+    };
+    var equal$1 = function (a) {
+      return function (b) {
+        return a === b;
+      };
+    };
+    var normalizedNodeIndex = function (node) {
+      var nodes, index, numTextFragments;
+      nodes = getChildNodes(normalizedParent(node));
+      index = findIndex$1(nodes, equal$1(node), node);
+      nodes = nodes.slice(0, index + 1);
+      numTextFragments = reduce(nodes, function (result, node, i) {
+        if (isText$5(node) && isText$5(nodes[i - 1])) {
+          result++;
+        }
+        return result;
+      }, 0);
+      nodes = filter$2(nodes, matchNodeNames([node.nodeName]));
+      index = findIndex$1(nodes, equal$1(node), node);
+      return index - numTextFragments;
+    };
+    var createPathItem = function (node) {
+      var name;
+      if (isText$5(node)) {
+        name = 'text()';
+      } else {
+        name = node.nodeName.toLowerCase();
+      }
+      return name + '[' + normalizedNodeIndex(node) + ']';
+    };
+    var parentsUntil = function (root, node, predicate) {
+      var parents = [];
+      for (node = node.parentNode; node !== root; node = node.parentNode) {
+        if (predicate && predicate(node)) {
+          break;
+        }
+        parents.push(node);
+      }
+      return parents;
+    };
+    var create$2 = function (root, caretPosition) {
+      var container, offset, path = [], outputOffset, childNodes, parents;
+      container = caretPosition.container();
+      offset = caretPosition.offset();
+      if (isText$5(container)) {
+        outputOffset = normalizedTextOffset(container, offset);
+      } else {
+        childNodes = container.childNodes;
+        if (offset >= childNodes.length) {
+          outputOffset = 'after';
+          offset = childNodes.length - 1;
+        } else {
+          outputOffset = 'before';
+        }
+        container = childNodes[offset];
+      }
+      path.push(createPathItem(container));
+      parents = parentsUntil(root, container);
+      parents = filter$2(parents, not(isBogus));
+      path = path.concat(map$2(parents, function (node) {
+        return createPathItem(node);
+      }));
+      return path.reverse().join('/') + ',' + outputOffset;
+    };
+    var resolvePathItem = function (node, name, index) {
+      var nodes = getChildNodes(node);
+      nodes = filter$2(nodes, function (node, index) {
+        return !isText$5(node) || !isText$5(nodes[index - 1]);
+      });
+      nodes = filter$2(nodes, matchNodeNames([name]));
+      return nodes[index];
+    };
+    var findTextPosition = function (container, offset) {
+      var node = container, targetOffset = 0, dataLen;
+      while (isText$5(node)) {
+        dataLen = node.data.length;
+        if (offset >= targetOffset && offset <= targetOffset + dataLen) {
+          container = node;
+          offset = offset - targetOffset;
+          break;
+        }
+        if (!isText$5(node.nextSibling)) {
+          container = node;
+          offset = dataLen;
+          break;
+        }
+        targetOffset += dataLen;
+        node = node.nextSibling;
+      }
+      if (isText$5(container) && offset > container.data.length) {
+        offset = container.data.length;
+      }
+      return CaretPosition$1(container, offset);
+    };
+    var resolve$1 = function (root, path) {
+      var parts, container, offset;
+      if (!path) {
+        return null;
+      }
+      parts = path.split(',');
+      path = parts[0].split('/');
+      offset = parts.length > 1 ? parts[1] : 'before';
+      container = reduce(path, function (result, value) {
+        value = /([\w\-\(\)]+)\[([0-9]+)\]/.exec(value);
+        if (!value) {
+          return null;
+        }
+        if (value[1] === 'text()') {
+          value[1] = '#text';
+        }
+        return resolvePathItem(result, value[1], parseInt(value[2], 10));
+      }, root);
+      if (!container) {
+        return null;
+      }
+      if (!isText$5(container)) {
+        if (offset === 'after') {
+          offset = nodeIndex$1(container) + 1;
+        } else {
+          offset = nodeIndex$1(container);
+        }
+        return CaretPosition$1(container.parentNode, offset);
+      }
+      return findTextPosition(container, parseInt(offset, 10));
+    };
+
+    var trimEmptyTextNode = function (dom, node) {
+      if (isText$1(node) && node.data.length === 0) {
+        dom.remove(node);
+      }
+    };
+    var insertNode = function (dom, rng, node) {
+      rng.insertNode(node);
+      trimEmptyTextNode(dom, node.previousSibling);
+      trimEmptyTextNode(dom, node.nextSibling);
+    };
+    var insertFragment = function (dom, rng, frag) {
+      var firstChild = Option.from(frag.firstChild);
+      var lastChild = Option.from(frag.lastChild);
+      rng.insertNode(frag);
+      firstChild.each(function (child) {
+        return trimEmptyTextNode(dom, child.previousSibling);
+      });
+      lastChild.each(function (child) {
+        return trimEmptyTextNode(dom, child.nextSibling);
+      });
+    };
+    var rangeInsertNode = function (dom, rng, node) {
+      if (isDocumentFragment(node)) {
+        insertFragment(dom, rng, node);
+      } else {
+        insertNode(dom, rng, node);
+      }
+    };
+
+    var isContentEditableFalse$2 = isContentEditableFalse;
+    var getNormalizedTextOffset = function (trim, container, offset) {
+      var node, trimmedOffset;
+      trimmedOffset = trim(container.data.slice(0, offset)).length;
+      for (node = container.previousSibling; node && isText$1(node); node = node.previousSibling) {
+        trimmedOffset += trim(node.data).length;
+      }
+      return trimmedOffset;
+    };
+    var getPoint = function (dom, trim, normalized, rng, start) {
+      var container = rng[start ? 'startContainer' : 'endContainer'];
+      var offset = rng[start ? 'startOffset' : 'endOffset'];
+      var point = [];
+      var childNodes, after = 0;
+      var root = dom.getRoot();
+      if (isText$1(container)) {
+        point.push(normalized ? getNormalizedTextOffset(trim, container, offset) : offset);
+      } else {
+        childNodes = container.childNodes;
+        if (offset >= childNodes.length && childNodes.length) {
+          after = 1;
+          offset = Math.max(0, childNodes.length - 1);
+        }
+        point.push(dom.nodeIndex(childNodes[offset], normalized) + after);
+      }
+      for (; container && container !== root; container = container.parentNode) {
+        point.push(dom.nodeIndex(container, normalized));
+      }
+      return point;
+    };
+    var getLocation = function (trim, selection, normalized, rng) {
+      var dom = selection.dom, bookmark = {};
+      bookmark.start = getPoint(dom, trim, normalized, rng, true);
+      if (!selection.isCollapsed()) {
+        bookmark.end = getPoint(dom, trim, normalized, rng, false);
+      }
+      return bookmark;
+    };
+    var findIndex$2 = function (dom, name, element) {
+      var count = 0;
+      Tools.each(dom.select(name), function (node) {
+        if (node.getAttribute('data-mce-bogus') === 'all') {
+          return;
+        }
+        if (node === element) {
+          return false;
+        }
+        count++;
+      });
+      return count;
+    };
+    var moveEndPoint = function (rng, start) {
+      var container, offset, childNodes;
+      var prefix = start ? 'start' : 'end';
+      container = rng[prefix + 'Container'];
+      offset = rng[prefix + 'Offset'];
+      if (isElement$1(container) && container.nodeName === 'TR') {
+        childNodes = container.childNodes;
+        container = childNodes[Math.min(start ? offset : offset - 1, childNodes.length - 1)];
+        if (container) {
+          offset = start ? 0 : container.childNodes.length;
+          rng['set' + (start ? 'Start' : 'End')](container, offset);
+        }
+      }
+    };
+    var normalizeTableCellSelection = function (rng) {
+      moveEndPoint(rng, true);
+      moveEndPoint(rng, false);
+      return rng;
+    };
+    var findSibling = function (node, offset) {
+      var sibling;
+      if (isElement$1(node)) {
+        node = getNode(node, offset);
+        if (isContentEditableFalse$2(node)) {
+          return node;
+        }
+      }
+      if (isCaretContainer(node)) {
+        if (isText$1(node) && isCaretContainerBlock(node)) {
+          node = node.parentNode;
+        }
+        sibling = node.previousSibling;
+        if (isContentEditableFalse$2(sibling)) {
+          return sibling;
+        }
+        sibling = node.nextSibling;
+        if (isContentEditableFalse$2(sibling)) {
+          return sibling;
+        }
+      }
+    };
+    var findAdjacentContentEditableFalseElm = function (rng) {
+      return findSibling(rng.startContainer, rng.startOffset) || findSibling(rng.endContainer, rng.endOffset);
+    };
+    var getOffsetBookmark = function (trim, normalized, selection) {
+      var element = selection.getNode();
+      var name = element ? element.nodeName : null;
+      var rng = selection.getRng();
+      if (isContentEditableFalse$2(element) || name === 'IMG') {
+        return {
+          name: name,
+          index: findIndex$2(selection.dom, name, element)
+        };
+      }
+      var sibling = findAdjacentContentEditableFalseElm(rng);
+      if (sibling) {
+        name = sibling.tagName;
+        return {
+          name: name,
+          index: findIndex$2(selection.dom, name, sibling)
+        };
+      }
+      return getLocation(trim, selection, normalized, rng);
+    };
+    var getCaretBookmark = function (selection) {
+      var rng = selection.getRng();
+      return {
+        start: create$2(selection.dom.getRoot(), CaretPosition$1.fromRangeStart(rng)),
+        end: create$2(selection.dom.getRoot(), CaretPosition$1.fromRangeEnd(rng))
+      };
+    };
+    var getRangeBookmark = function (selection) {
+      return { rng: selection.getRng() };
+    };
+    var createBookmarkSpan = function (dom, id, filled) {
+      var args = {
+        'data-mce-type': 'bookmark',
+        id: id,
+        'style': 'overflow:hidden;line-height:0px'
+      };
+      return filled ? dom.create('span', args, '&#xFEFF;') : dom.create('span', args);
+    };
+    var getPersistentBookmark = function (selection, filled) {
+      var dom = selection.dom;
+      var rng = selection.getRng();
+      var id = dom.uniqueId();
+      var collapsed = selection.isCollapsed();
+      var element = selection.getNode();
+      var name = element.nodeName;
+      if (name === 'IMG') {
+        return {
+          name: name,
+          index: findIndex$2(dom, name, element)
+        };
+      }
+      var rng2 = normalizeTableCellSelection(rng.cloneRange());
+      if (!collapsed) {
+        rng2.collapse(false);
+        var endBookmarkNode = createBookmarkSpan(dom, id + '_end', filled);
+        rangeInsertNode(dom, rng2, endBookmarkNode);
+      }
+      rng = normalizeTableCellSelection(rng);
+      rng.collapse(true);
+      var startBookmarkNode = createBookmarkSpan(dom, id + '_start', filled);
+      rangeInsertNode(dom, rng, startBookmarkNode);
+      selection.moveToBookmark({
+        id: id,
+        keep: true
+      });
+      return { id: id };
+    };
+    var getBookmark = function (selection, type, normalized) {
+      if (type === 2) {
+        return getOffsetBookmark(trim$3, normalized, selection);
+      } else if (type === 3) {
+        return getCaretBookmark(selection);
+      } else if (type) {
+        return getRangeBookmark(selection);
+      } else {
+        return getPersistentBookmark(selection, false);
+      }
+    };
+    var getUndoBookmark = curry(getOffsetBookmark, identity, true);
+
+    var CARET_ID = '_mce_caret';
+    var isCaretNode = function (node) {
+      return isElement$1(node) && node.id === CARET_ID;
+    };
+    var getParentCaretContainer = function (body, node) {
+      while (node && node !== body) {
+        if (node.id === CARET_ID) {
+          return node;
+        }
+        node = node.parentNode;
+      }
+      return null;
+    };
+
+    var DOM$1 = DOMUtils$1.DOM;
+    var getBodySetting = function (editor, name, defaultValue) {
+      var value = editor.getParam(name, defaultValue);
+      if (value.indexOf('=') !== -1) {
+        var bodyObj = editor.getParam(name, '', 'hash');
+        return bodyObj.hasOwnProperty(editor.id) ? bodyObj[editor.id] : defaultValue;
+      } else {
+        return value;
+      }
+    };
+    var getIframeAttrs = function (editor) {
+      return editor.getParam('iframe_attrs', {});
+    };
+    var getDocType = function (editor) {
+      return editor.getParam('doctype', '<!DOCTYPE html>');
+    };
+    var getDocumentBaseUrl = function (editor) {
+      return editor.getParam('document_base_url', '');
+    };
+    var getBodyId = function (editor) {
+      return getBodySetting(editor, 'body_id', 'tinymce');
+    };
+    var getBodyClass = function (editor) {
+      return getBodySetting(editor, 'body_class', '');
+    };
+    var getContentSecurityPolicy = function (editor) {
+      return editor.getParam('content_security_policy', '');
+    };
+    var shouldPutBrInPre = function (editor) {
+      return editor.getParam('br_in_pre', true);
+    };
+    var getForcedRootBlock = function (editor) {
+      if (editor.getParam('force_p_newlines', false)) {
+        return 'p';
+      }
+      var block = editor.getParam('forced_root_block', 'p');
+      if (block === false) {
+        return '';
+      } else if (block === true) {
+        return 'p';
+      } else {
+        return block;
+      }
+    };
+    var getForcedRootBlockAttrs = function (editor) {
+      return editor.getParam('forced_root_block_attrs', {});
+    };
+    var getBrNewLineSelector = function (editor) {
+      return editor.getParam('br_newline_selector', '.mce-toc h2,figcaption,caption');
+    };
+    var getNoNewLineSelector = function (editor) {
+      return editor.getParam('no_newline_selector', '');
+    };
+    var shouldKeepStyles = function (editor) {
+      return editor.getParam('keep_styles', true);
+    };
+    var shouldEndContainerOnEmptyBlock = function (editor) {
+      return editor.getParam('end_container_on_empty_block', false);
+    };
+    var getFontStyleValues = function (editor) {
+      return Tools.explode(editor.getParam('font_size_style_values', 'xx-small,x-small,small,medium,large,x-large,xx-large'));
+    };
+    var getFontSizeClasses = function (editor) {
+      return Tools.explode(editor.getParam('font_size_classes', ''));
+    };
+    var getImagesDataImgFilter = function (editor) {
+      return editor.getParam('images_dataimg_filter', constant(true), 'function');
+    };
+    var isAutomaticUploadsEnabled = function (editor) {
+      return editor.getParam('automatic_uploads', true, 'boolean');
+    };
+    var shouldReuseFileName = function (editor) {
+      return editor.getParam('images_reuse_filename', false, 'boolean');
+    };
+    var shouldReplaceBlobUris = function (editor) {
+      return editor.getParam('images_replace_blob_uris', true, 'boolean');
+    };
+    var getIconPackName = function (editor) {
+      return editor.getParam('icons', '', 'string');
+    };
+    var getIconsUrl = function (editor) {
+      return editor.getParam('icons_url', '', 'string');
+    };
+    var getImageUploadUrl = function (editor) {
+      return editor.getParam('images_upload_url', '', 'string');
+    };
+    var getImageUploadBasePath = function (editor) {
+      return editor.getParam('images_upload_base_path', '', 'string');
+    };
+    var getImagesUploadCredentials = function (editor) {
+      return editor.getParam('images_upload_credentials', false, 'boolean');
+    };
+    var getImagesUploadHandler = function (editor) {
+      return editor.getParam('images_upload_handler', null, 'function');
+    };
+    var shouldUseContentCssCors = function (editor) {
+      return editor.getParam('content_css_cors', false, 'boolean');
+    };
+    var getReferrerPolicy = function (editor) {
+      return editor.getParam('referrer_policy', '', 'string');
+    };
+    var getLanguageCode = function (editor) {
+      return editor.getParam('language', 'en', 'string');
+    };
+    var getLanguageUrl = function (editor) {
+      return editor.getParam('language_url', '', 'string');
+    };
+    var shouldIndentUseMargin = function (editor) {
+      return editor.getParam('indent_use_margin', false);
+    };
+    var getIndentation = function (editor) {
+      return editor.getParam('indentation', '40px', 'string');
+    };
+    var getContentCss = function (editor) {
+      var contentCss = editor.settings.content_css;
+      if (isString(contentCss)) {
+        return map(contentCss.split(','), trim);
+      } else if (isArray(contentCss)) {
+        return contentCss;
+      } else if (contentCss === false || editor.inline) {
+        return [];
+      } else {
+        return ['default'];
+      }
+    };
+    var getDirectionality = function (editor) {
+      return editor.getParam('directionality', I18n.isRtl() ? 'rtl' : undefined);
+    };
+    var getInlineBoundarySelector = function (editor) {
+      return editor.getParam('inline_boundaries_selector', 'a[href],code,.mce-annotation', 'string');
+    };
+    var getObjectResizing = function (editor) {
+      return editor.getParam('object_resizing');
+    };
+    var getResizeImgProportional = function (editor) {
+      return editor.getParam('resize_img_proportional', true, 'boolean');
+    };
+    var getPlaceholder = function (editor) {
+      return editor.getParam('placeholder', DOM$1.getAttrib(editor.getElement(), 'placeholder'), 'string');
+    };
+
+    var isElement$4 = isElement$1;
+    var isText$6 = isText$1;
+    var removeNode = function (node) {
+      var parentNode = node.parentNode;
+      if (parentNode) {
+        parentNode.removeChild(node);
+      }
+    };
+    var getNodeValue = function (node) {
+      try {
+        return node.nodeValue;
+      } catch (ex) {
+        return '';
+      }
+    };
+    var setNodeValue = function (node, text) {
+      if (text.length === 0) {
+        removeNode(node);
+      } else {
+        node.nodeValue = text;
+      }
+    };
+    var trimCount = function (text) {
+      var trimmedText = trim$3(text);
+      return {
+        count: text.length - trimmedText.length,
+        text: trimmedText
+      };
+    };
+    var removeUnchanged = function (caretContainer, pos) {
+      remove$5(caretContainer);
+      return pos;
+    };
+    var removeTextAndReposition = function (caretContainer, pos) {
+      var before = trimCount(caretContainer.data.substr(0, pos.offset()));
+      var after = trimCount(caretContainer.data.substr(pos.offset()));
+      var text = before.text + after.text;
+      if (text.length > 0) {
+        setNodeValue(caretContainer, text);
+        return CaretPosition$1(caretContainer, pos.offset() - before.count);
+      } else {
+        return pos;
+      }
+    };
+    var removeElementAndReposition = function (caretContainer, pos) {
+      var parentNode = pos.container();
+      var newPosition = indexOf(from$1(parentNode.childNodes), caretContainer).map(function (index) {
+        return index < pos.offset() ? CaretPosition$1(parentNode, pos.offset() - 1) : pos;
+      }).getOr(pos);
+      remove$5(caretContainer);
+      return newPosition;
+    };
+    var removeTextCaretContainer = function (caretContainer, pos) {
+      return isText$6(caretContainer) && pos.container() === caretContainer ? removeTextAndReposition(caretContainer, pos) : removeUnchanged(caretContainer, pos);
+    };
+    var removeElementCaretContainer = function (caretContainer, pos) {
+      return pos.container() === caretContainer.parentNode ? removeElementAndReposition(caretContainer, pos) : removeUnchanged(caretContainer, pos);
+    };
+    var removeAndReposition = function (container, pos) {
+      return CaretPosition$1.isTextPosition(pos) ? removeTextCaretContainer(container, pos) : removeElementCaretContainer(container, pos);
+    };
+    var remove$5 = function (caretContainerNode) {
+      if (isElement$4(caretContainerNode) && isCaretContainer(caretContainerNode)) {
+        if (hasContent(caretContainerNode)) {
+          caretContainerNode.removeAttribute('data-mce-caret');
+        } else {
+          removeNode(caretContainerNode);
+        }
+      }
+      if (isText$6(caretContainerNode)) {
+        var text = trim$3(getNodeValue(caretContainerNode));
+        setNodeValue(caretContainerNode, text);
+      }
+    };
+
+    var browser$2 = detect$3().browser;
+    var isContentEditableFalse$3 = isContentEditableFalse;
+    var isTableCell$1 = function (node) {
+      return isElement$1(node) && /^(TD|TH)$/i.test(node.tagName);
+    };
+    var getAbsoluteClientRect = function (root, element, before) {
+      var clientRect = collapse(element.getBoundingClientRect(), before);
+      var docElm, scrollX, scrollY, margin, rootRect;
+      if (root.tagName === 'BODY') {
+        docElm = root.ownerDocument.documentElement;
+        scrollX = root.scrollLeft || docElm.scrollLeft;
+        scrollY = root.scrollTop || docElm.scrollTop;
+      } else {
+        rootRect = root.getBoundingClientRect();
+        scrollX = root.scrollLeft - rootRect.left;
+        scrollY = root.scrollTop - rootRect.top;
+      }
+      clientRect.left += scrollX;
+      clientRect.right += scrollX;
+      clientRect.top += scrollY;
+      clientRect.bottom += scrollY;
+      clientRect.width = 1;
+      margin = element.offsetWidth - element.clientWidth;
+      if (margin > 0) {
+        if (before) {
+          margin *= -1;
+        }
+        clientRect.left += margin;
+        clientRect.right += margin;
+      }
+      return clientRect;
+    };
+    var trimInlineCaretContainers = function (root) {
+      var contentEditableFalseNodes, node, sibling, i, data;
+      contentEditableFalseNodes = descendants$1(Element.fromDom(root), '*[contentEditable=false]');
+      for (i = 0; i < contentEditableFalseNodes.length; i++) {
+        node = contentEditableFalseNodes[i].dom();
+        sibling = node.previousSibling;
+        if (endsWithCaretContainer(sibling)) {
+          data = sibling.data;
+          if (data.length === 1) {
+            sibling.parentNode.removeChild(sibling);
+          } else {
+            sibling.deleteData(data.length - 1, 1);
+          }
+        }
+        sibling = node.nextSibling;
+        if (startsWithCaretContainer(sibling)) {
+          data = sibling.data;
+          if (data.length === 1) {
+            sibling.parentNode.removeChild(sibling);
+          } else {
+            sibling.deleteData(0, 1);
+          }
+        }
+      }
+    };
+    var FakeCaret = function (editor, root, isBlock, hasFocus) {
+      var lastVisualCaret = Cell(Option.none());
+      var cursorInterval, caretContainerNode;
+      var rootBlock = getForcedRootBlock(editor);
+      var caretBlock = rootBlock.length > 0 ? rootBlock : 'p';
+      var show = function (before, element) {
+        var clientRect, rng;
+        hide();
+        if (isTableCell$1(element)) {
+          return null;
+        }
+        if (isBlock(element)) {
+          caretContainerNode = insertBlock(caretBlock, element, before);
+          clientRect = getAbsoluteClientRect(root, element, before);
+          DomQuery(caretContainerNode).css('top', clientRect.top);
+          var caret = DomQuery('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(clientRect).appendTo(root)[0];
+          lastVisualCaret.set(Option.some({
+            caret: caret,
+            element: element,
+            before: before
+          }));
+          lastVisualCaret.get().each(function (caretState) {
+            if (before) {
+              DomQuery(caretState.caret).addClass('mce-visual-caret-before');
+            }
+          });
+          startBlink();
+          rng = element.ownerDocument.createRange();
+          rng.setStart(caretContainerNode, 0);
+          rng.setEnd(caretContainerNode, 0);
+        } else {
+          caretContainerNode = insertInline(element, before);
+          rng = element.ownerDocument.createRange();
+          if (isContentEditableFalse$3(caretContainerNode.nextSibling)) {
+            rng.setStart(caretContainerNode, 0);
+            rng.setEnd(caretContainerNode, 0);
+          } else {
+            rng.setStart(caretContainerNode, 1);
+            rng.setEnd(caretContainerNode, 1);
+          }
+          return rng;
+        }
+        return rng;
+      };
+      var hide = function () {
+        trimInlineCaretContainers(root);
+        if (caretContainerNode) {
+          remove$5(caretContainerNode);
+          caretContainerNode = null;
+        }
+        lastVisualCaret.get().each(function (caretState) {
+          DomQuery(caretState.caret).remove();
+          lastVisualCaret.set(Option.none());
+        });
+        if (cursorInterval) {
+          Delay.clearInterval(cursorInterval);
+          cursorInterval = null;
+        }
+      };
+      var startBlink = function () {
+        cursorInterval = Delay.setInterval(function () {
+          if (hasFocus()) {
+            DomQuery('div.mce-visual-caret', root).toggleClass('mce-visual-caret-hidden');
+          } else {
+            DomQuery('div.mce-visual-caret', root).addClass('mce-visual-caret-hidden');
+          }
+        }, 500);
+      };
+      var reposition = function () {
+        lastVisualCaret.get().each(function (caretState) {
+          var clientRect = getAbsoluteClientRect(root, caretState.element, caretState.before);
+          DomQuery(caretState.caret).css(__assign({}, clientRect));
+        });
+      };
+      var destroy = function () {
+        return Delay.clearInterval(cursorInterval);
+      };
+      var getCss = function () {
+        return '.mce-visual-caret {' + 'position: absolute;' + 'background-color: black;' + 'background-color: currentcolor;' + '}' + '.mce-visual-caret-hidden {' + 'display: none;' + '}' + '*[data-mce-caret] {' + 'position: absolute;' + 'left: -1000px;' + 'right: auto;' + 'top: 0;' + 'margin: 0;' + 'padding: 0;' + '}';
+      };
+      return {
+        show: show,
+        hide: hide,
+        getCss: getCss,
+        reposition: reposition,
+        destroy: destroy
+      };
+    };
+    var isFakeCaretTableBrowser = function () {
+      return browser$2.isIE() || browser$2.isEdge() || browser$2.isFirefox();
+    };
+    var isFakeCaretTarget = function (node) {
+      return isContentEditableFalse$3(node) || isTable(node) && isFakeCaretTableBrowser();
+    };
+
+    var isContentEditableFalse$4 = isContentEditableFalse;
+    var isBlockLike = matchStyleValues('display', 'block table table-cell table-caption list-item');
+    var isCaretContainer$2 = isCaretContainer;
+    var isCaretContainerBlock$1 = isCaretContainerBlock;
+    var isElement$5 = isElement$1;
+    var isCaretCandidate$2 = isCaretCandidate;
+    var isForwards = function (direction) {
+      return direction > 0;
+    };
+    var isBackwards = function (direction) {
+      return direction < 0;
+    };
+    var skipCaretContainers = function (walk, shallow) {
+      var node;
+      while (node = walk(shallow)) {
+        if (!isCaretContainerBlock$1(node)) {
+          return node;
+        }
+      }
+      return null;
+    };
+    var findNode = function (node, direction, predicateFn, rootNode, shallow) {
+      var walker = new TreeWalker(node, rootNode);
+      if (isBackwards(direction)) {
+        if (isContentEditableFalse$4(node) || isCaretContainerBlock$1(node)) {
+          node = skipCaretContainers(walker.prev, true);
+          if (predicateFn(node)) {
+            return node;
+          }
+        }
+        while (node = skipCaretContainers(walker.prev, shallow)) {
+          if (predicateFn(node)) {
+            return node;
+          }
+        }
+      }
+      if (isForwards(direction)) {
+        if (isContentEditableFalse$4(node) || isCaretContainerBlock$1(node)) {
+          node = skipCaretContainers(walker.next, true);
+          if (predicateFn(node)) {
+            return node;
+          }
+        }
+        while (node = skipCaretContainers(walker.next, shallow)) {
+          if (predicateFn(node)) {
+            return node;
+          }
+        }
+      }
+      return null;
+    };
+    var getParentBlock = function (node, rootNode) {
+      while (node && node !== rootNode) {
+        if (isBlockLike(node)) {
+          return node;
+        }
+        node = node.parentNode;
+      }
+      return null;
+    };
+    var isInSameBlock = function (caretPosition1, caretPosition2, rootNode) {
+      return getParentBlock(caretPosition1.container(), rootNode) === getParentBlock(caretPosition2.container(), rootNode);
+    };
+    var getChildNodeAtRelativeOffset = function (relativeOffset, caretPosition) {
+      var container, offset;
+      if (!caretPosition) {
+        return null;
+      }
+      container = caretPosition.container();
+      offset = caretPosition.offset();
+      if (!isElement$5(container)) {
+        return null;
+      }
+      return container.childNodes[offset + relativeOffset];
+    };
+    var beforeAfter = function (before, node) {
+      var range = node.ownerDocument.createRange();
+      if (before) {
+        range.setStartBefore(node);
+        range.setEndBefore(node);
+      } else {
+        range.setStartAfter(node);
+        range.setEndAfter(node);
+      }
+      return range;
+    };
+    var isNodesInSameBlock = function (root, node1, node2) {
+      return getParentBlock(node1, root) === getParentBlock(node2, root);
+    };
+    var lean = function (left, root, node) {
+      var sibling, siblingName;
+      if (left) {
+        siblingName = 'previousSibling';
+      } else {
+        siblingName = 'nextSibling';
+      }
+      while (node && node !== root) {
+        sibling = node[siblingName];
+        if (isCaretContainer$2(sibling)) {
+          sibling = sibling[siblingName];
+        }
+        if (isContentEditableFalse$4(sibling)) {
+          if (isNodesInSameBlock(root, sibling, node)) {
+            return sibling;
+          }
+          break;
+        }
+        if (isCaretCandidate$2(sibling)) {
+          break;
+        }
+        node = node.parentNode;
+      }
+      return null;
+    };
+    var before$2 = curry(beforeAfter, true);
+    var after$1 = curry(beforeAfter, false);
+    var normalizeRange = function (direction, root, range) {
+      var node, container, offset, location;
+      var leanLeft = curry(lean, true, root);
+      var leanRight = curry(lean, false, root);
+      container = range.startContainer;
+      offset = range.startOffset;
+      if (isCaretContainerBlock(container)) {
+        if (!isElement$5(container)) {
+          container = container.parentNode;
+        }
+        location = container.getAttribute('data-mce-caret');
+        if (location === 'before') {
+          node = container.nextSibling;
+          if (isFakeCaretTarget(node)) {
+            return before$2(node);
+          }
+        }
+        if (location === 'after') {
+          node = container.previousSibling;
+          if (isFakeCaretTarget(node)) {
+            return after$1(node);
+          }
+        }
+      }
+      if (!range.collapsed) {
+        return range;
+      }
+      if (isText$1(container)) {
+        if (isCaretContainer$2(container)) {
+          if (direction === 1) {
+            node = leanRight(container);
+            if (node) {
+              return before$2(node);
+            }
+            node = leanLeft(container);
+            if (node) {
+              return after$1(node);
+            }
+          }
+          if (direction === -1) {
+            node = leanLeft(container);
+            if (node) {
+              return after$1(node);
+            }
+            node = leanRight(container);
+            if (node) {
+              return before$2(node);
+            }
+          }
+          return range;
+        }
+        if (endsWithCaretContainer(container) && offset >= container.data.length - 1) {
+          if (direction === 1) {
+            node = leanRight(container);
+            if (node) {
+              return before$2(node);
+            }
+          }
+          return range;
+        }
+        if (startsWithCaretContainer(container) && offset <= 1) {
+          if (direction === -1) {
+            node = leanLeft(container);
+            if (node) {
+              return after$1(node);
+            }
+          }
+          return range;
+        }
+        if (offset === container.data.length) {
+          node = leanRight(container);
+          if (node) {
+            return before$2(node);
+          }
+          return range;
+        }
+        if (offset === 0) {
+          node = leanLeft(container);
+          if (node) {
+            return after$1(node);
+          }
+          return range;
+        }
+      }
+      return range;
+    };
+    var getRelativeCefElm = function (forward, caretPosition) {
+      return Option.from(getChildNodeAtRelativeOffset(forward ? 0 : -1, caretPosition)).filter(isContentEditableFalse$4);
+    };
+    var getNormalizedRangeEndPoint = function (direction, root, range) {
+      var normalizedRange = normalizeRange(direction, root, range);
+      if (direction === -1) {
+        return CaretPosition.fromRangeStart(normalizedRange);
+      }
+      return CaretPosition.fromRangeEnd(normalizedRange);
+    };
+    var getElementFromPosition = function (pos) {
+      return Option.from(pos.getNode()).map(Element.fromDom);
+    };
+    var getElementFromPrevPosition = function (pos) {
+      return Option.from(pos.getNode(true)).map(Element.fromDom);
+    };
+    var getVisualCaretPosition = function (walkFn, caretPosition) {
+      while (caretPosition = walkFn(caretPosition)) {
+        if (caretPosition.isVisible()) {
+          return caretPosition;
+        }
+      }
+      return caretPosition;
+    };
+    var isMoveInsideSameBlock = function (from, to) {
+      var inSameBlock = isInSameBlock(from, to);
+      if (!inSameBlock && isBr(from.getNode())) {
+        return true;
+      }
+      return inSameBlock;
+    };
+
+    var HDirection;
+    (function (HDirection) {
+      HDirection[HDirection['Backwards'] = -1] = 'Backwards';
+      HDirection[HDirection['Forwards'] = 1] = 'Forwards';
+    }(HDirection || (HDirection = {})));
+    var isContentEditableFalse$5 = isContentEditableFalse;
+    var isText$7 = isText$1;
+    var isElement$6 = isElement$1;
+    var isBr$4 = isBr;
+    var isCaretCandidate$3 = isCaretCandidate;
+    var isAtomic$1 = isAtomic;
+    var isEditableCaretCandidate$1 = isEditableCaretCandidate;
+    var getParents = function (node, root) {
+      var parents = [];
+      while (node && node !== root) {
+        parents.push(node);
+        node = node.parentNode;
+      }
+      return parents;
+    };
+    var nodeAtIndex = function (container, offset) {
+      if (container.hasChildNodes() && offset < container.childNodes.length) {
+        return container.childNodes[offset];
+      }
+      return null;
+    };
+    var getCaretCandidatePosition = function (direction, node) {
+      if (isForwards(direction)) {
+        if (isCaretCandidate$3(node.previousSibling) && !isText$7(node.previousSibling)) {
+          return CaretPosition$1.before(node);
+        }
+        if (isText$7(node)) {
+          return CaretPosition$1(node, 0);
+        }
+      }
+      if (isBackwards(direction)) {
+        if (isCaretCandidate$3(node.nextSibling) && !isText$7(node.nextSibling)) {
+          return CaretPosition$1.after(node);
+        }
+        if (isText$7(node)) {
+          return CaretPosition$1(node, node.data.length);
+        }
+      }
+      if (isBackwards(direction)) {
+        if (isBr$4(node)) {
+          return CaretPosition$1.before(node);
+        }
+        return CaretPosition$1.after(node);
+      }
+      return CaretPosition$1.before(node);
+    };
+    var moveForwardFromBr = function (root, nextNode) {
+      var nextSibling = nextNode.nextSibling;
+      if (nextSibling && isCaretCandidate$3(nextSibling)) {
+        if (isText$7(nextSibling)) {
+          return CaretPosition$1(nextSibling, 0);
+        } else {
+          return CaretPosition$1.before(nextSibling);
+        }
+      } else {
+        return findCaretPosition(HDirection.Forwards, CaretPosition$1.after(nextNode), root);
+      }
+    };
+    var findCaretPosition = function (direction, startPos, root) {
+      var node, nextNode, innerNode;
+      var rootContentEditableFalseElm, caretPosition;
+      if (!isElement$6(root) || !startPos) {
+        return null;
+      }
+      if (startPos.isEqual(CaretPosition$1.after(root)) && root.lastChild) {
+        caretPosition = CaretPosition$1.after(root.lastChild);
+        if (isBackwards(direction) && isCaretCandidate$3(root.lastChild) && isElement$6(root.lastChild)) {
+          return isBr$4(root.lastChild) ? CaretPosition$1.before(root.lastChild) : caretPosition;
+        }
+      } else {
+        caretPosition = startPos;
+      }
+      var container = caretPosition.container();
+      var offset = caretPosition.offset();
+      if (isText$7(container)) {
+        if (isBackwards(direction) && offset > 0) {
+          return CaretPosition$1(container, --offset);
+        }
+        if (isForwards(direction) && offset < container.length) {
+          return CaretPosition$1(container, ++offset);
+        }
+        node = container;
+      } else {
+        if (isBackwards(direction) && offset > 0) {
+          nextNode = nodeAtIndex(container, offset - 1);
+          if (isCaretCandidate$3(nextNode)) {
+            if (!isAtomic$1(nextNode)) {
+              innerNode = findNode(nextNode, direction, isEditableCaretCandidate$1, nextNode);
+              if (innerNode) {
+                if (isText$7(innerNode)) {
+                  return CaretPosition$1(innerNode, innerNode.data.length);
+                }
+                return CaretPosition$1.after(innerNode);
+              }
+            }
+            if (isText$7(nextNode)) {
+              return CaretPosition$1(nextNode, nextNode.data.length);
+            }
+            return CaretPosition$1.before(nextNode);
+          }
+        }
+        if (isForwards(direction) && offset < container.childNodes.length) {
+          nextNode = nodeAtIndex(container, offset);
+          if (isCaretCandidate$3(nextNode)) {
+            if (isBr$4(nextNode)) {
+              return moveForwardFromBr(root, nextNode);
+            }
+            if (!isAtomic$1(nextNode)) {
+              innerNode = findNode(nextNode, direction, isEditableCaretCandidate$1, nextNode);
+              if (innerNode) {
+                if (isText$7(innerNode)) {
+                  return CaretPosition$1(innerNode, 0);
+                }
+                return CaretPosition$1.before(innerNode);
+              }
+            }
+            if (isText$7(nextNode)) {
+              return CaretPosition$1(nextNode, 0);
+            }
+            return CaretPosition$1.after(nextNode);
+          }
+        }
+        node = nextNode ? nextNode : caretPosition.getNode();
+      }
+      if (isForwards(direction) && caretPosition.isAtEnd() || isBackwards(direction) && caretPosition.isAtStart()) {
+        node = findNode(node, direction, constant(true), root, true);
+        if (isEditableCaretCandidate$1(node, root)) {
+          return getCaretCandidatePosition(direction, node);
+        }
+      }
+      nextNode = findNode(node, direction, isEditableCaretCandidate$1, root);
+      rootContentEditableFalseElm = last$1(filter(getParents(container, root), isContentEditableFalse$5));
+      if (rootContentEditableFalseElm && (!nextNode || !rootContentEditableFalseElm.contains(nextNode))) {
+        if (isForwards(direction)) {
+          caretPosition = CaretPosition$1.after(rootContentEditableFalseElm);
+        } else {
+          caretPosition = CaretPosition$1.before(rootContentEditableFalseElm);
+        }
+        return caretPosition;
+      }
+      if (nextNode) {
+        return getCaretCandidatePosition(direction, nextNode);
+      }
+      return null;
+    };
+    var CaretWalker = function (root) {
+      return {
+        next: function (caretPosition) {
+          return findCaretPosition(HDirection.Forwards, caretPosition, root);
+        },
+        prev: function (caretPosition) {
+          return findCaretPosition(HDirection.Backwards, caretPosition, root);
+        }
+      };
+    };
+
+    var walkToPositionIn = function (forward, root, start) {
+      var position = forward ? CaretPosition$1.before(start) : CaretPosition$1.after(start);
+      return fromPosition(forward, root, position);
+    };
+    var afterElement = function (node) {
+      return isBr(node) ? CaretPosition$1.before(node) : CaretPosition$1.after(node);
+    };
+    var isBeforeOrStart = function (position) {
+      if (CaretPosition$1.isTextPosition(position)) {
+        return position.offset() === 0;
+      } else {
+        return isCaretCandidate(position.getNode());
+      }
+    };
+    var isAfterOrEnd = function (position) {
+      if (CaretPosition$1.isTextPosition(position)) {
+        var container = position.container();
+        return position.offset() === container.data.length;
+      } else {
+        return isCaretCandidate(position.getNode(true));
+      }
+    };
+    var isBeforeAfterSameElement = function (from, to) {
+      return !CaretPosition$1.isTextPosition(from) && !CaretPosition$1.isTextPosition(to) && from.getNode() === to.getNode(true);
+    };
+    var isAtBr = function (position) {
+      return !CaretPosition$1.isTextPosition(position) && isBr(position.getNode());
+    };
+    var shouldSkipPosition = function (forward, from, to) {
+      if (forward) {
+        return !isBeforeAfterSameElement(from, to) && !isAtBr(from) && isAfterOrEnd(from) && isBeforeOrStart(to);
+      } else {
+        return !isBeforeAfterSameElement(to, from) && isBeforeOrStart(from) && isAfterOrEnd(to);
+      }
+    };
+    var fromPosition = function (forward, root, pos) {
+      var walker = CaretWalker(root);
+      return Option.from(forward ? walker.next(pos) : walker.prev(pos));
+    };
+    var navigate = function (forward, root, from) {
+      return fromPosition(forward, root, from).bind(function (to) {
+        if (isInSameBlock(from, to, root) && shouldSkipPosition(forward, from, to)) {
+          return fromPosition(forward, root, to);
+        } else {
+          return Option.some(to);
+        }
+      });
+    };
+    var navigateIgnore = function (forward, root, from, ignoreFilter) {
+      return navigate(forward, root, from).bind(function (pos) {
+        return ignoreFilter(pos) ? navigateIgnore(forward, root, pos, ignoreFilter) : Option.some(pos);
+      });
+    };
+    var positionIn = function (forward, element) {
+      var startNode = forward ? element.firstChild : element.lastChild;
+      if (isText$1(startNode)) {
+        return Option.some(CaretPosition$1(startNode, forward ? 0 : startNode.data.length));
+      } else if (startNode) {
+        if (isCaretCandidate(startNode)) {
+          return Option.some(forward ? CaretPosition$1.before(startNode) : afterElement(startNode));
+        } else {
+          return walkToPositionIn(forward, element, startNode);
+        }
+      } else {
+        return Option.none();
+      }
+    };
+    var nextPosition = curry(fromPosition, true);
+    var prevPosition = curry(fromPosition, false);
+    var firstPositionIn = curry(positionIn, true);
+    var lastPositionIn = curry(positionIn, false);
+
+    var isStringPathBookmark = function (bookmark) {
+      return typeof bookmark.start === 'string';
+    };
+    var isRangeBookmark = function (bookmark) {
+      return bookmark.hasOwnProperty('rng');
+    };
+    var isIdBookmark = function (bookmark) {
+      return bookmark.hasOwnProperty('id');
+    };
+    var isIndexBookmark = function (bookmark) {
+      return bookmark.hasOwnProperty('name');
+    };
+    var isPathBookmark = function (bookmark) {
+      return Tools.isArray(bookmark.start);
+    };
+
+    var addBogus = function (dom, node) {
+      if (isElement$1(node) && dom.isBlock(node) && !node.innerHTML && !Env.ie) {
+        node.innerHTML = '<br data-mce-bogus="1" />';
+      }
+      return node;
+    };
+    var resolveCaretPositionBookmark = function (dom, bookmark) {
+      var rng, pos;
+      rng = dom.createRng();
+      pos = resolve$1(dom.getRoot(), bookmark.start);
+      rng.setStart(pos.container(), pos.offset());
+      pos = resolve$1(dom.getRoot(), bookmark.end);
+      rng.setEnd(pos.container(), pos.offset());
+      return rng;
+    };
+    var insertZwsp = function (node, rng) {
+      var textNode = node.ownerDocument.createTextNode(ZWSP);
+      node.appendChild(textNode);
+      rng.setStart(textNode, 0);
+      rng.setEnd(textNode, 0);
+    };
+    var isEmpty = function (node) {
+      return node.hasChildNodes() === false;
+    };
+    var tryFindRangePosition = function (node, rng) {
+      return lastPositionIn(node).fold(function () {
+        return false;
+      }, function (pos) {
+        rng.setStart(pos.container(), pos.offset());
+        rng.setEnd(pos.container(), pos.offset());
+        return true;
+      });
+    };
+    var padEmptyCaretContainer = function (root, node, rng) {
+      if (isEmpty(node) && getParentCaretContainer(root, node)) {
+        insertZwsp(node, rng);
+        return true;
+      } else {
+        return false;
+      }
+    };
+    var setEndPoint = function (dom, start, bookmark, rng) {
+      var point = bookmark[start ? 'start' : 'end'];
+      var i, node, offset, children;
+      var root = dom.getRoot();
+      if (point) {
+        offset = point[0];
+        for (node = root, i = point.length - 1; i >= 1; i--) {
+          children = node.childNodes;
+          if (padEmptyCaretContainer(root, node, rng)) {
+            return true;
+          }
+          if (point[i] > children.length - 1) {
+            if (padEmptyCaretContainer(root, node, rng)) {
+              return true;
+            }
+            return tryFindRangePosition(node, rng);
+          }
+          node = children[point[i]];
+        }
+        if (node.nodeType === 3) {
+          offset = Math.min(point[0], node.nodeValue.length);
+        }
+        if (node.nodeType === 1) {
+          offset = Math.min(point[0], node.childNodes.length);
+        }
+        if (start) {
+          rng.setStart(node, offset);
+        } else {
+          rng.setEnd(node, offset);
+        }
+      }
+      return true;
+    };
+    var isValidTextNode = function (node) {
+      return isText$1(node) && node.data.length > 0;
+    };
+    var restoreEndPoint = function (dom, suffix, bookmark) {
+      var marker = dom.get(bookmark.id + '_' + suffix), node, idx, next, prev;
+      var keep = bookmark.keep;
+      var container, offset;
+      if (marker) {
+        node = marker.parentNode;
+        if (suffix === 'start') {
+          if (!keep) {
+            idx = dom.nodeIndex(marker);
+          } else {
+            if (marker.hasChildNodes()) {
+              node = marker.firstChild;
+              idx = 1;
+            } else if (isValidTextNode(marker.nextSibling)) {
+              node = marker.nextSibling;
+              idx = 0;
+            } else if (isValidTextNode(marker.previousSibling)) {
+              node = marker.previousSibling;
+              idx = marker.previousSibling.data.length;
+            } else {
+              node = marker.parentNode;
+              idx = dom.nodeIndex(marker) + 1;
+            }
+          }
+          container = node;
+          offset = idx;
+        } else {
+          if (!keep) {
+            idx = dom.nodeIndex(marker);
+          } else {
+            if (marker.hasChildNodes()) {
+              node = marker.firstChild;
+              idx = 1;
+            } else if (isValidTextNode(marker.previousSibling)) {
+              node = marker.previousSibling;
+              idx = marker.previousSibling.data.length;
+            } else {
+              node = marker.parentNode;
+              idx = dom.nodeIndex(marker);
+            }
+          }
+          container = node;
+          offset = idx;
+        }
+        if (!keep) {
+          prev = marker.previousSibling;
+          next = marker.nextSibling;
+          Tools.each(Tools.grep(marker.childNodes), function (node) {
+            if (isText$1(node)) {
+              node.nodeValue = node.nodeValue.replace(/\uFEFF/g, '');
+            }
+          });
+          while (marker = dom.get(bookmark.id + '_' + suffix)) {
+            dom.remove(marker, true);
+          }
+          if (prev && next && prev.nodeType === next.nodeType && isText$1(prev) && !Env.opera) {
+            idx = prev.nodeValue.length;
+            prev.appendData(next.nodeValue);
+            dom.remove(next);
+            if (suffix === 'start') {
+              container = prev;
+              offset = idx;
+            } else {
+              container = prev;
+              offset = idx;
+            }
+          }
+        }
+        return Option.some(CaretPosition$1(container, offset));
+      } else {
+        return Option.none();
+      }
+    };
+    var resolvePaths = function (dom, bookmark) {
+      var rng = dom.createRng();
+      if (setEndPoint(dom, true, bookmark, rng) && setEndPoint(dom, false, bookmark, rng)) {
+        return Option.some(rng);
+      } else {
+        return Option.none();
+      }
+    };
+    var resolveId = function (dom, bookmark) {
+      var startPos = restoreEndPoint(dom, 'start', bookmark);
+      var endPos = restoreEndPoint(dom, 'end', bookmark);
+      return lift2(startPos, endPos.or(startPos), function (spos, epos) {
+        var rng = dom.createRng();
+        rng.setStart(addBogus(dom, spos.container()), spos.offset());
+        rng.setEnd(addBogus(dom, epos.container()), epos.offset());
+        return rng;
+      });
+    };
+    var resolveIndex$1 = function (dom, bookmark) {
+      return Option.from(dom.select(bookmark.name)[bookmark.index]).map(function (elm) {
+        var rng = dom.createRng();
+        rng.selectNode(elm);
+        return rng;
+      });
+    };
+    var resolve$2 = function (selection, bookmark) {
+      var dom = selection.dom;
+      if (bookmark) {
+        if (isPathBookmark(bookmark)) {
+          return resolvePaths(dom, bookmark);
+        } else if (isStringPathBookmark(bookmark)) {
+          return Option.some(resolveCaretPositionBookmark(dom, bookmark));
+        } else if (isIdBookmark(bookmark)) {
+          return resolveId(dom, bookmark);
+        } else if (isIndexBookmark(bookmark)) {
+          return resolveIndex$1(dom, bookmark);
+        } else if (isRangeBookmark(bookmark)) {
+          return Option.some(bookmark.rng);
+        }
+      }
+      return Option.none();
+    };
+
+    var getBookmark$1 = function (selection, type, normalized) {
+      return getBookmark(selection, type, normalized);
+    };
+    var moveToBookmark = function (selection, bookmark) {
+      resolve$2(selection, bookmark).each(function (rng) {
+        selection.setRng(rng);
+      });
+    };
+    var isBookmarkNode$1 = function (node) {
+      return isElement$1(node) && node.tagName === 'SPAN' && node.getAttribute('data-mce-type') === 'bookmark';
+    };
+
+    var is$2 = function (expected) {
+      return function (actual) {
+        return expected === actual;
+      };
+    };
+    var isNbsp = is$2(nbsp);
+    var isWhiteSpace$1 = function (chr) {
+      return chr !== '' && ' \f\n\r\t\x0B'.indexOf(chr) !== -1;
+    };
+    var isContent = function (chr) {
+      return !isWhiteSpace$1(chr) && !isNbsp(chr);
+    };
+
+    var isNode = function (node) {
+      return !!node.nodeType;
+    };
+    var isInlineBlock = function (node) {
+      return node && /^(IMG)$/.test(node.nodeName);
+    };
+    var moveStart = function (dom, selection, rng) {
+      var offset = rng.startOffset;
+      var container = rng.startContainer, walker, node, nodes;
+      if (rng.startContainer === rng.endContainer) {
+        if (isInlineBlock(rng.startContainer.childNodes[rng.startOffset])) {
+          return;
+        }
+      }
+      if (container.nodeType === 1) {
+        nodes = container.childNodes;
+        if (offset < nodes.length) {
+          container = nodes[offset];
+          walker = new TreeWalker(container, dom.getParent(container, dom.isBlock));
+        } else {
+          container = nodes[nodes.length - 1];
+          walker = new TreeWalker(container, dom.getParent(container, dom.isBlock));
+          walker.next(true);
+        }
+        for (node = walker.current(); node; node = walker.next()) {
+          if (node.nodeType === 3 && !isWhiteSpaceNode(node)) {
+            rng.setStart(node, 0);
+            selection.setRng(rng);
+            return;
+          }
+        }
+      }
+    };
+    var getNonWhiteSpaceSibling = function (node, next, inc) {
+      if (node) {
+        var nextName = next ? 'nextSibling' : 'previousSibling';
+        for (node = inc ? node : node[nextName]; node; node = node[nextName]) {
+          if (node.nodeType === 1 || !isWhiteSpaceNode(node)) {
+            return node;
+          }
+        }
+      }
+    };
+    var isTextBlock$1 = function (editor, name) {
+      if (isNode(name)) {
+        name = name.nodeName;
+      }
+      return !!editor.schema.getTextBlockElements()[name.toLowerCase()];
+    };
+    var isValid = function (ed, parent, child) {
+      return ed.schema.isValidChild(parent, child);
+    };
+    var isWhiteSpaceNode = function (node) {
+      return node && isText$1(node) && /^([\t \r\n]+|)$/.test(node.nodeValue);
+    };
+    var isEmptyTextNode = function (node) {
+      return node && isText$1(node) && node.length === 0;
+    };
+    var replaceVars = function (value, vars) {
+      if (typeof value !== 'string') {
+        value = value(vars);
+      } else if (vars) {
+        value = value.replace(/%(\w+)/g, function (str, name) {
+          return vars[name] || str;
+        });
+      }
+      return value;
+    };
+    var isEq = function (str1, str2) {
+      str1 = str1 || '';
+      str2 = str2 || '';
+      str1 = '' + (str1.nodeName || str1);
+      str2 = '' + (str2.nodeName || str2);
+      return str1.toLowerCase() === str2.toLowerCase();
+    };
+    var normalizeStyleValue = function (dom, value, name) {
+      if (name === 'color' || name === 'backgroundColor') {
+        value = dom.toHex(value);
+      }
+      if (name === 'fontWeight' && value === 700) {
+        value = 'bold';
+      }
+      if (name === 'fontFamily') {
+        value = value.replace(/[\'\"]/g, '').replace(/,\s+/g, ',');
+      }
+      return '' + value;
+    };
+    var getStyle = function (dom, node, name) {
+      return normalizeStyleValue(dom, dom.getStyle(node, name), name);
+    };
+    var getTextDecoration = function (dom, node) {
+      var decoration;
+      dom.getParent(node, function (n) {
+        decoration = dom.getStyle(n, 'text-decoration');
+        return decoration && decoration !== 'none';
+      });
+      return decoration;
+    };
+    var getParents$1 = function (dom, node, selector) {
+      return dom.getParents(node, selector, dom.getRoot());
+    };
+    var isVariableFormatName = function (editor, formatName) {
+      var hasVariableValues = function (format) {
+        var isVariableValue = function (val) {
+          return val.length > 1 && val.charAt(0) === '%';
+        };
+        return exists([
+          'styles',
+          'attributes'
+        ], function (key) {
+          return get(format, key).exists(function (field) {
+            var fieldValues = isArray(field) ? field : values(field);
+            return exists(fieldValues, isVariableValue);
+          });
+        });
+      };
+      return exists(editor.formatter.get(formatName), hasVariableValues);
+    };
+    var areSimilarFormats = function (editor, formatName, otherFormatName) {
+      var validKeys = [
+        'inline',
+        'block',
+        'selector',
+        'attributes',
+        'styles',
+        'classes'
+      ];
+      var filterObj = function (format) {
+        return filter$1(format, function (_, key) {
+          return exists(validKeys, function (validKey) {
+            return validKey === key;
+          });
+        });
+      };
+      return exists(editor.formatter.get(formatName), function (fmt1) {
+        var filteredFmt1 = filterObj(fmt1);
+        return exists(editor.formatter.get(otherFormatName), function (fmt2) {
+          var filteredFmt2 = filterObj(fmt2);
+          return equal(filteredFmt1, filteredFmt2);
+        });
+      });
+    };
+
+    var isBookmarkNode$2 = isBookmarkNode$1;
+    var getParents$2 = getParents$1;
+    var isWhiteSpaceNode$1 = isWhiteSpaceNode;
+    var isTextBlock$2 = isTextBlock$1;
+    var isBogusBr = function (node) {
+      return node.nodeName === 'BR' && node.getAttribute('data-mce-bogus') && !node.nextSibling;
+    };
+    var findParentContentEditable = function (dom, node) {
+      var parent = node;
+      while (parent) {
+        if (isElement$1(parent) && dom.getContentEditable(parent)) {
+          return dom.getContentEditable(parent) === 'false' ? parent : node;
+        }
+        parent = parent.parentNode;
+      }
+      return node;
+    };
+    var walkText = function (start, node, offset, predicate) {
+      var str = node.data;
+      for (var i = offset; start ? i >= 0 : i < str.length; start ? i-- : i++) {
+        if (predicate(str.charAt(i))) {
+          return start ? i + 1 : i;
+        }
+      }
+      return -1;
+    };
+    var findSpace = function (start, node, offset) {
+      return walkText(start, node, offset, function (c) {
+        return isNbsp(c) || isWhiteSpace$1(c);
+      });
+    };
+    var findContent = function (start, node, offset) {
+      return walkText(start, node, offset, isContent);
+    };
+    var findWordEndPoint = function (dom, body, container, offset, start, includeTrailingSpaces) {
+      var lastTextNode;
+      var rootNode = dom.getParent(container, dom.isBlock) || body;
+      var walk = function (container, offset, pred) {
+        var textSeeker = TextSeeker(dom);
+        var walker = start ? textSeeker.backwards : textSeeker.forwards;
+        return Option.from(walker(container, offset, function (text, textOffset) {
+          if (isBookmarkNode$2(text.parentNode)) {
+            return -1;
+          } else {
+            lastTextNode = text;
+            return pred(start, text, textOffset);
+          }
+        }, rootNode));
+      };
+      var spaceResult = walk(container, offset, findSpace);
+      return spaceResult.bind(function (result) {
+        return includeTrailingSpaces ? walk(result.container, result.offset + (start ? -1 : 0), findContent) : Option.some(result);
+      }).orThunk(function () {
+        return lastTextNode ? Option.some({
+          container: lastTextNode,
+          offset: start ? 0 : lastTextNode.length
+        }) : Option.none();
+      });
+    };
+    var findSelectorEndPoint = function (dom, format, rng, container, siblingName) {
+      if (isText$1(container) && container.nodeValue.length === 0 && container[siblingName]) {
+        container = container[siblingName];
+      }
+      var parents = getParents$2(dom, container);
+      for (var i = 0; i < parents.length; i++) {
+        for (var y = 0; y < format.length; y++) {
+          var curFormat = format[y];
+          if ('collapsed' in curFormat && curFormat.collapsed !== rng.collapsed) {
+            continue;
+          }
+          if (dom.is(parents[i], curFormat.selector)) {
+            return parents[i];
+          }
+        }
+      }
+      return container;
+    };
+    var findBlockEndPoint = function (editor, format, container, siblingName) {
+      var node;
+      var dom = editor.dom;
+      var root = dom.getRoot();
+      if (!format[0].wrapper) {
+        node = dom.getParent(container, format[0].block, root);
+      }
+      if (!node) {
+        var scopeRoot = dom.getParent(container, 'LI,TD,TH');
+        node = dom.getParent(isText$1(container) ? container.parentNode : container, function (node) {
+          return node !== root && isTextBlock$2(editor, node);
+        }, scopeRoot);
+      }
+      if (node && format[0].wrapper) {
+        node = getParents$2(dom, node, 'ul,ol').reverse()[0] || node;
+      }
+      if (!node) {
+        node = container;
+        while (node[siblingName] && !dom.isBlock(node[siblingName])) {
+          node = node[siblingName];
+          if (isEq(node, 'br')) {
+            break;
+          }
+        }
+      }
+      return node || container;
+    };
+    var findParentContainer = function (dom, format, startContainer, startOffset, endContainer, endOffset, start) {
+      var container, parent, sibling, siblingName, root;
+      container = parent = start ? startContainer : endContainer;
+      siblingName = start ? 'previousSibling' : 'nextSibling';
+      root = dom.getRoot();
+      if (isText$1(container) && !isWhiteSpaceNode$1(container)) {
+        if (start ? startOffset > 0 : endOffset < container.nodeValue.length) {
+          return container;
+        }
+      }
+      while (true) {
+        if (!format[0].block_expand && dom.isBlock(parent)) {
+          return parent;
+        }
+        for (sibling = parent[siblingName]; sibling; sibling = sibling[siblingName]) {
+          if (!isBookmarkNode$2(sibling) && !isWhiteSpaceNode$1(sibling) && !isBogusBr(sibling)) {
+            return parent;
+          }
+        }
+        if (parent === root || parent.parentNode === root) {
+          container = parent;
+          break;
+        }
+        parent = parent.parentNode;
+      }
+      return container;
+    };
+    var expandRng = function (editor, rng, format, includeTrailingSpace) {
+      if (includeTrailingSpace === void 0) {
+        includeTrailingSpace = false;
+      }
+      var startContainer = rng.startContainer, startOffset = rng.startOffset, endContainer = rng.endContainer, endOffset = rng.endOffset;
+      var dom = editor.dom;
+      if (isElement$1(startContainer) && startContainer.hasChildNodes()) {
+        startContainer = getNode(startContainer, startOffset);
+        if (isText$1(startContainer)) {
+          startOffset = 0;
+        }
+      }
+      if (isElement$1(endContainer) && endContainer.hasChildNodes()) {
+        endContainer = getNode(endContainer, rng.collapsed ? endOffset : endOffset - 1);
+        if (isText$1(endContainer)) {
+          endOffset = endContainer.nodeValue.length;
+        }
+      }
+      startContainer = findParentContentEditable(dom, startContainer);
+      endContainer = findParentContentEditable(dom, endContainer);
+      if (isBookmarkNode$2(startContainer.parentNode) || isBookmarkNode$2(startContainer)) {
+        startContainer = isBookmarkNode$2(startContainer) ? startContainer : startContainer.parentNode;
+        if (rng.collapsed) {
+          startContainer = startContainer.previousSibling || startContainer;
+        } else {
+          startContainer = startContainer.nextSibling || startContainer;
+        }
+        if (isText$1(startContainer)) {
+          startOffset = rng.collapsed ? startContainer.length : 0;
+        }
+      }
+      if (isBookmarkNode$2(endContainer.parentNode) || isBookmarkNode$2(endContainer)) {
+        endContainer = isBookmarkNode$2(endContainer) ? endContainer : endContainer.parentNode;
+        if (rng.collapsed) {
+          endContainer = endContainer.nextSibling || endContainer;
+        } else {
+          endContainer = endContainer.previousSibling || endContainer;
+        }
+        if (isText$1(endContainer)) {
+          endOffset = rng.collapsed ? 0 : endContainer.length;
+        }
+      }
+      if (rng.collapsed) {
+        var startPoint = findWordEndPoint(dom, editor.getBody(), startContainer, startOffset, true, includeTrailingSpace);
+        startPoint.each(function (_a) {
+          var container = _a.container, offset = _a.offset;
+          startContainer = container;
+          startOffset = offset;
+        });
+        var endPoint = findWordEndPoint(dom, editor.getBody(), endContainer, endOffset, false, includeTrailingSpace);
+        endPoint.each(function (_a) {
+          var container = _a.container, offset = _a.offset;
+          endContainer = container;
+          endOffset = offset;
+        });
+      }
+      if (format[0].inline || format[0].block_expand) {
+        if (!format[0].inline || (!isText$1(startContainer) || startOffset === 0)) {
+          startContainer = findParentContainer(dom, format, startContainer, startOffset, endContainer, endOffset, true);
+        }
+        if (!format[0].inline || (!isText$1(endContainer) || endOffset === endContainer.nodeValue.length)) {
+          endContainer = findParentContainer(dom, format, startContainer, startOffset, endContainer, endOffset, false);
+        }
+      }
+      if (format[0].selector && format[0].expand !== false && !format[0].inline) {
+        startContainer = findSelectorEndPoint(dom, format, rng, startContainer, 'previousSibling');
+        endContainer = findSelectorEndPoint(dom, format, rng, endContainer, 'nextSibling');
+      }
+      if (format[0].block || format[0].selector) {
+        startContainer = findBlockEndPoint(editor, format, startContainer, 'previousSibling');
+        endContainer = findBlockEndPoint(editor, format, endContainer, 'nextSibling');
+        if (format[0].block) {
+          if (!dom.isBlock(startContainer)) {
+            startContainer = findParentContainer(dom, format, startContainer, startOffset, endContainer, endOffset, true);
+          }
+          if (!dom.isBlock(endContainer)) {
+            endContainer = findParentContainer(dom, format, startContainer, startOffset, endContainer, endOffset, false);
+          }
+        }
+      }
+      if (isElement$1(startContainer)) {
+        startOffset = dom.nodeIndex(startContainer);
+        startContainer = startContainer.parentNode;
+      }
+      if (isElement$1(endContainer)) {
+        endOffset = dom.nodeIndex(endContainer) + 1;
+        endContainer = endContainer.parentNode;
+      }
+      return {
+        startContainer: startContainer,
+        startOffset: startOffset,
+        endContainer: endContainer,
+        endOffset: endOffset
+      };
+    };
+
+    var clampToExistingChildren = function (container, index) {
+      var childNodes = container.childNodes;
+      if (index >= childNodes.length) {
+        index = childNodes.length - 1;
+      } else if (index < 0) {
+        index = 0;
+      }
+      return childNodes[index] || container;
+    };
+    var getEndChild = function (container, index) {
+      return clampToExistingChildren(container, index - 1);
+    };
+    var walk$1 = function (dom, rng, callback) {
+      var startContainer = rng.startContainer;
+      var startOffset = rng.startOffset;
+      var endContainer = rng.endContainer;
+      var endOffset = rng.endOffset;
+      var exclude = function (nodes) {
+        var node;
+        node = nodes[0];
+        if (node.nodeType === 3 && node === startContainer && startOffset >= node.nodeValue.length) {
+          nodes.splice(0, 1);
+        }
+        node = nodes[nodes.length - 1];
+        if (endOffset === 0 && nodes.length > 0 && node === endContainer && node.nodeType === 3) {
+          nodes.splice(nodes.length - 1, 1);
+        }
+        return nodes;
+      };
+      var collectSiblings = function (node, name, endNode) {
+        var siblings = [];
+        for (; node && node !== endNode; node = node[name]) {
+          siblings.push(node);
+        }
+        return siblings;
+      };
+      var findEndPoint = function (node, root) {
+        do {
+          if (node.parentNode === root) {
+            return node;
+          }
+          node = node.parentNode;
+        } while (node);
+      };
+      var walkBoundary = function (startNode, endNode, next) {
+        var siblingName = next ? 'nextSibling' : 'previousSibling';
+        for (var node = startNode, parent_1 = node.parentNode; node && node !== endNode; node = parent_1) {
+          parent_1 = node.parentNode;
+          var siblings_1 = collectSiblings(node === startNode ? node : node[siblingName], siblingName);
+          if (siblings_1.length) {
+            if (!next) {
+              siblings_1.reverse();
+            }
+            callback(exclude(siblings_1));
+          }
+        }
+      };
+      if (startContainer.nodeType === 1 && startContainer.hasChildNodes()) {
+        startContainer = clampToExistingChildren(startContainer, startOffset);
+      }
+      if (endContainer.nodeType === 1 && endContainer.hasChildNodes()) {
+        endContainer = getEndChild(endContainer, endOffset);
+      }
+      if (startContainer === endContainer) {
+        return callback(exclude([startContainer]));
+      }
+      var ancestor = dom.findCommonAncestor(startContainer, endContainer);
+      for (var node = startContainer; node; node = node.parentNode) {
+        if (node === endContainer) {
+          return walkBoundary(startContainer, ancestor, true);
+        }
+        if (node === ancestor) {
+          break;
+        }
+      }
+      for (var node = endContainer; node; node = node.parentNode) {
+        if (node === startContainer) {
+          return walkBoundary(endContainer, ancestor);
+        }
+        if (node === ancestor) {
+          break;
+        }
+      }
+      var startPoint = findEndPoint(startContainer, ancestor) || startContainer;
+      var endPoint = findEndPoint(endContainer, ancestor) || endContainer;
+      walkBoundary(startContainer, startPoint, true);
+      var siblings = collectSiblings(startPoint === startContainer ? startPoint : startPoint.nextSibling, 'nextSibling', endPoint === endContainer ? endPoint.nextSibling : endPoint);
+      if (siblings.length) {
+        callback(exclude(siblings));
+      }
+      walkBoundary(endContainer, endPoint);
+    };
+
+    var getRanges = function (selection) {
+      var ranges = [];
+      if (selection) {
+        for (var i = 0; i < selection.rangeCount; i++) {
+          ranges.push(selection.getRangeAt(i));
+        }
+      }
+      return ranges;
+    };
+    var getSelectedNodes = function (ranges) {
+      return bind(ranges, function (range) {
+        var node = getSelectedNode(range);
+        return node ? [Element.fromDom(node)] : [];
+      });
+    };
+    var hasMultipleRanges = function (selection) {
+      return getRanges(selection).length > 1;
+    };
+
+    var getCellsFromRanges = function (ranges) {
+      return filter(getSelectedNodes(ranges), isTableCell);
+    };
+    var getCellsFromElement = function (elm) {
+      return descendants$1(elm, 'td[data-mce-selected],th[data-mce-selected]');
+    };
+    var getCellsFromElementOrRanges = function (ranges, element) {
+      var selectedCells = getCellsFromElement(element);
+      return selectedCells.length > 0 ? selectedCells : getCellsFromRanges(ranges);
+    };
+    var getCellsFromEditor = function (editor) {
+      return getCellsFromElementOrRanges(getRanges(editor.selection.getSel()), Element.fromDom(editor.getBody()));
+    };
+
+    var getStartNode = function (rng) {
+      var sc = rng.startContainer, so = rng.startOffset;
+      if (isText$1(sc)) {
+        return so === 0 ? Option.some(Element.fromDom(sc)) : Option.none();
+      } else {
+        return Option.from(sc.childNodes[so]).map(Element.fromDom);
+      }
+    };
+    var getEndNode = function (rng) {
+      var ec = rng.endContainer, eo = rng.endOffset;
+      if (isText$1(ec)) {
+        return eo === ec.data.length ? Option.some(Element.fromDom(ec)) : Option.none();
+      } else {
+        return Option.from(ec.childNodes[eo - 1]).map(Element.fromDom);
+      }
+    };
+    var getFirstChildren = function (node) {
+      return firstChild(node).fold(constant([node]), function (child) {
+        return [node].concat(getFirstChildren(child));
+      });
+    };
+    var getLastChildren = function (node) {
+      return lastChild(node).fold(constant([node]), function (child) {
+        if (name(child) === 'br') {
+          return prevSibling(child).map(function (sibling) {
+            return [node].concat(getLastChildren(sibling));
+          }).getOr([]);
+        } else {
+          return [node].concat(getLastChildren(child));
+        }
+      });
+    };
+    var hasAllContentsSelected = function (elm, rng) {
+      return lift2(getStartNode(rng), getEndNode(rng), function (startNode, endNode) {
+        var start = find(getFirstChildren(elm), curry(eq$2, startNode));
+        var end = find(getLastChildren(elm), curry(eq$2, endNode));
+        return start.isSome() && end.isSome();
+      }).getOr(false);
+    };
+    var moveEndPoint$1 = function (dom, rng, node, start) {
+      var root = node, walker = new TreeWalker(node, root);
+      var nonEmptyElementsMap = dom.schema.getNonEmptyElements();
+      do {
+        if (node.nodeType === 3 && Tools.trim(node.nodeValue).length !== 0) {
+          if (start) {
+            rng.setStart(node, 0);
+          } else {
+            rng.setEnd(node, node.nodeValue.length);
+          }
+          return;
+        }
+        if (nonEmptyElementsMap[node.nodeName] && !/^(TD|TH)$/.test(node.nodeName)) {
+          if (start) {
+            rng.setStartBefore(node);
+          } else {
+            if (node.nodeName === 'BR') {
+              rng.setEndBefore(node);
+            } else {
+              rng.setEndAfter(node);
+            }
+          }
+          return;
+        }
+      } while (node = start ? walker.next() : walker.prev());
+      if (root.nodeName === 'BODY') {
+        if (start) {
+          rng.setStart(root, 0);
+        } else {
+          rng.setEnd(root, root.childNodes.length);
+        }
+      }
+    };
+    var hasAnyRanges = function (editor) {
+      var sel = editor.selection.getSel();
+      return sel && sel.rangeCount > 0;
+    };
+    var runOnRanges = function (editor, executor) {
+      var fakeSelectionNodes = getCellsFromEditor(editor);
+      if (fakeSelectionNodes.length > 0) {
+        each(fakeSelectionNodes, function (elem) {
+          var node = elem.dom();
+          var fakeNodeRng = editor.dom.createRng();
+          fakeNodeRng.setStartBefore(node);
+          fakeNodeRng.setEndAfter(node);
+          executor(fakeNodeRng, true);
+        });
+      } else {
+        executor(editor.selection.getRng(), false);
+      }
+    };
+    var preserve = function (selection, fillBookmark, executor) {
+      var bookmark = getPersistentBookmark(selection, fillBookmark);
+      executor(bookmark);
+      selection.moveToBookmark(bookmark);
+    };
+
+    function NodeValue (is, name) {
+      var get = function (element) {
+        if (!is(element)) {
+          throw new Error('Can only get ' + name + ' value of a ' + name + ' node');
+        }
+        return getOption(element).getOr('');
+      };
+      var getOption = function (element) {
+        return is(element) ? Option.from(element.dom().nodeValue) : Option.none();
+      };
+      var set = function (element, value) {
+        if (!is(element)) {
+          throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');
+        }
+        element.dom().nodeValue = value;
+      };
+      return {
+        get: get,
+        getOption: getOption,
+        set: set
+      };
+    }
+
+    var api = NodeValue(isText, 'text');
+    var get$7 = function (element) {
+      return api.get(element);
+    };
+
+    var isZeroWidth = function (elem) {
+      return isText(elem) && get$7(elem) === zeroWidth;
+    };
+    var context = function (editor, elem, wrapName, nodeName) {
+      return parent(elem).fold(function () {
+        return 'skipping';
+      }, function (parent) {
+        if (nodeName === 'br' || isZeroWidth(elem)) {
+          return 'valid';
+        } else if (isAnnotation(elem)) {
+          return 'existing';
+        } else if (isCaretNode(elem)) {
+          return 'caret';
+        } else if (!isValid(editor, wrapName, nodeName) || !isValid(editor, name(parent), wrapName)) {
+          return 'invalid-child';
+        } else {
+          return 'valid';
+        }
+      });
+    };
+
+    var applyWordGrab = function (editor, rng) {
+      var r = expandRng(editor, rng, [{ inline: true }]);
+      rng.setStart(r.startContainer, r.startOffset);
+      rng.setEnd(r.endContainer, r.endOffset);
+      editor.selection.setRng(rng);
+    };
+    var makeAnnotation = function (eDoc, _a, annotationName, decorate) {
+      var _b = _a.uid, uid = _b === void 0 ? generate('mce-annotation') : _b, data = __rest(_a, ['uid']);
+      var master = Element.fromTag('span', eDoc);
+      add$3(master, annotation());
+      set(master, '' + dataAnnotationId(), uid);
+      set(master, '' + dataAnnotation(), annotationName);
+      var _c = decorate(uid, data), _d = _c.attributes, attributes = _d === void 0 ? {} : _d, _e = _c.classes, classes = _e === void 0 ? [] : _e;
+      setAll(master, attributes);
+      add$4(master, classes);
+      return master;
+    };
+    var annotate = function (editor, rng, annotationName, decorate, data) {
+      var newWrappers = [];
+      var master = makeAnnotation(editor.getDoc(), data, annotationName, decorate);
+      var wrapper = Cell(Option.none());
+      var finishWrapper = function () {
+        wrapper.set(Option.none());
+      };
+      var getOrOpenWrapper = function () {
+        return wrapper.get().getOrThunk(function () {
+          var nu = shallow(master);
+          newWrappers.push(nu);
+          wrapper.set(Option.some(nu));
+          return nu;
+        });
+      };
+      var processElements = function (elems) {
+        each(elems, processElement);
+      };
+      var processElement = function (elem) {
+        var ctx = context(editor, elem, 'span', name(elem));
+        switch (ctx) {
+        case 'invalid-child': {
+            finishWrapper();
+            var children$1 = children(elem);
+            processElements(children$1);
+            finishWrapper();
+            break;
+          }
+        case 'valid': {
+            var w = getOrOpenWrapper();
+            wrap(elem, w);
+            break;
+          }
+        }
+      };
+      var processNodes = function (nodes) {
+        var elems = map(nodes, Element.fromDom);
+        processElements(elems);
+      };
+      walk$1(editor.dom, rng, function (nodes) {
+        finishWrapper();
+        processNodes(nodes);
+      });
+      return newWrappers;
+    };
+    var annotateWithBookmark = function (editor, name, settings, data) {
+      editor.undoManager.transact(function () {
+        var selection = editor.selection;
+        var initialRng = selection.getRng();
+        var hasFakeSelection = getCellsFromEditor(editor).length > 0;
+        if (initialRng.collapsed && !hasFakeSelection) {
+          applyWordGrab(editor, initialRng);
+        }
+        if (selection.getRng().collapsed && !hasFakeSelection) {
+          var wrapper = makeAnnotation(editor.getDoc(), data, name, settings.decorate);
+          set$1(wrapper, nbsp);
+          selection.getRng().insertNode(wrapper.dom());
+          selection.select(wrapper.dom());
+        } else {
+          preserve(selection, false, function () {
+            runOnRanges(editor, function (selectionRng) {
+              annotate(editor, selectionRng, name, settings.decorate, data);
+            });
+          });
+        }
+      });
+    };
+
+    var Annotator = function (editor) {
+      var registry = create$1();
+      setup$1(editor, registry);
+      var changes = setup(editor);
+      return {
+        register: function (name, settings) {
+          registry.register(name, settings);
+        },
+        annotate: function (name, data) {
+          registry.lookup(name).each(function (settings) {
+            annotateWithBookmark(editor, name, settings, data);
+          });
+        },
+        annotationChanged: function (name, callback) {
+          changes.addListener(name, callback);
+        },
+        remove: function (name) {
+          identify(editor, Option.some(name)).each(function (_a) {
+            var elements = _a.elements;
+            each(elements, unwrap);
+          });
+        },
+        getAll: function (name) {
+          var directory = findAll(editor, name);
+          return map$1(directory, function (elems) {
+            return map(elems, function (elem) {
+              return elem.dom();
+            });
+          });
+        }
+      };
+    };
+
+    var whiteSpaceRegExp$3 = /^[ \t\r\n]*$/;
+    var typeLookup = {
+      '#text': 3,
+      '#comment': 8,
+      '#cdata': 4,
+      '#pi': 7,
+      '#doctype': 10,
+      '#document-fragment': 11
+    };
+    var walk$2 = function (node, root, prev) {
+      var startName = prev ? 'lastChild' : 'firstChild';
+      var siblingName = prev ? 'prev' : 'next';
+      if (node[startName]) {
+        return node[startName];
+      }
+      if (node !== root) {
+        var sibling = node[siblingName];
+        if (sibling) {
+          return sibling;
+        }
+        for (var parent_1 = node.parent; parent_1 && parent_1 !== root; parent_1 = parent_1.parent) {
+          sibling = parent_1[siblingName];
+          if (sibling) {
+            return sibling;
+          }
+        }
+      }
+    };
+    var isEmptyTextNode$1 = function (node) {
+      if (!whiteSpaceRegExp$3.test(node.value)) {
+        return false;
+      }
+      var parentNode = node.parent;
+      if (parentNode && (parentNode.name !== 'span' || parentNode.attr('style')) && /^[ ]+$/.test(node.value)) {
+        return false;
+      }
+      return true;
+    };
+    var isNonEmptyElement = function (node) {
+      var isNamedAnchor = node.name === 'a' && !node.attr('href') && node.attr('id');
+      return node.attr('name') || node.attr('id') && !node.firstChild || node.attr('data-mce-bookmark') || isNamedAnchor;
+    };
+    var Node = function () {
+      function Node(name, type) {
+        this.name = name;
+        this.type = type;
+        if (type === 1) {
+          this.attributes = [];
+          this.attributes.map = {};
+        }
+      }
+      Node.create = function (name, attrs) {
+        var node = new Node(name, typeLookup[name] || 1);
+        if (attrs) {
+          each$1(attrs, function (value, attrName) {
+            node.attr(attrName, value);
+          });
+        }
+        return node;
+      };
+      Node.prototype.replace = function (node) {
+        var self = this;
+        if (node.parent) {
+          node.remove();
+        }
+        self.insert(node, self);
+        self.remove();
+        return self;
+      };
+      Node.prototype.attr = function (name, value) {
+        var self = this;
+        var attrs;
+        if (typeof name !== 'string') {
+          if (name !== undefined && name !== null) {
+            each$1(name, function (value, key) {
+              self.attr(key, value);
+            });
+          }
+          return self;
+        }
+        if (attrs = self.attributes) {
+          if (value !== undefined) {
+            if (value === null) {
+              if (name in attrs.map) {
+                delete attrs.map[name];
+                var i = attrs.length;
+                while (i--) {
+                  if (attrs[i].name === name) {
+                    attrs.splice(i, 1);
+                    return self;
+                  }
+                }
+              }
+              return self;
+            }
+            if (name in attrs.map) {
+              var i = attrs.length;
+              while (i--) {
+                if (attrs[i].name === name) {
+                  attrs[i].value = value;
+                  break;
+                }
+              }
+            } else {
+              attrs.push({
+                name: name,
+                value: value
+              });
+            }
+            attrs.map[name] = value;
+            return self;
+          }
+          return attrs.map[name];
+        }
+      };
+      Node.prototype.clone = function () {
+        var self = this;
+        var clone = new Node(self.name, self.type);
+        var selfAttrs;
+        if (selfAttrs = self.attributes) {
+          var cloneAttrs = [];
+          cloneAttrs.map = {};
+          for (var i = 0, l = selfAttrs.length; i < l; i++) {
+            var selfAttr = selfAttrs[i];
+            if (selfAttr.name !== 'id') {
+              cloneAttrs[cloneAttrs.length] = {
+                name: selfAttr.name,
+                value: selfAttr.value
+              };
+              cloneAttrs.map[selfAttr.name] = selfAttr.value;
+            }
+          }
+          clone.attributes = cloneAttrs;
+        }
+        clone.value = self.value;
+        clone.shortEnded = self.shortEnded;
+        return clone;
+      };
+      Node.prototype.wrap = function (wrapper) {
+        var self = this;
+        self.parent.insert(wrapper, self);
+        wrapper.append(self);
+        return self;
+      };
+      Node.prototype.unwrap = function () {
+        var self = this;
+        for (var node = self.firstChild; node;) {
+          var next = node.next;
+          self.insert(node, self, true);
+          node = next;
+        }
+        self.remove();
+      };
+      Node.prototype.remove = function () {
+        var self = this, parent = self.parent, next = self.next, prev = self.prev;
+        if (parent) {
+          if (parent.firstChild === self) {
+            parent.firstChild = next;
+            if (next) {
+              next.prev = null;
+            }
+          } else {
+            prev.next = next;
+          }
+          if (parent.lastChild === self) {
+            parent.lastChild = prev;
+            if (prev) {
+              prev.next = null;
+            }
+          } else {
+            next.prev = prev;
+          }
+          self.parent = self.next = self.prev = null;
+        }
+        return self;
+      };
+      Node.prototype.append = function (node) {
+        var self = this;
+        if (node.parent) {
+          node.remove();
+        }
+        var last = self.lastChild;
+        if (last) {
+          last.next = node;
+          node.prev = last;
+          self.lastChild = node;
+        } else {
+          self.lastChild = self.firstChild = node;
+        }
+        node.parent = self;
+        return node;
+      };
+      Node.prototype.insert = function (node, refNode, before) {
+        if (node.parent) {
+          node.remove();
+        }
+        var parent = refNode.parent || this;
+        if (before) {
+          if (refNode === parent.firstChild) {
+            parent.firstChild = node;
+          } else {
+            refNode.prev.next = node;
+          }
+          node.prev = refNode.prev;
+          node.next = refNode;
+          refNode.prev = node;
+        } else {
+          if (refNode === parent.lastChild) {
+            parent.lastChild = node;
+          } else {
+            refNode.next.prev = node;
+          }
+          node.next = refNode.next;
+          node.prev = refNode;
+          refNode.next = node;
+        }
+        node.parent = parent;
+        return node;
+      };
+      Node.prototype.getAll = function (name) {
+        var self = this;
+        var collection = [];
+        for (var node = self.firstChild; node; node = walk$2(node, self)) {
+          if (node.name === name) {
+            collection.push(node);
+          }
+        }
+        return collection;
+      };
+      Node.prototype.empty = function () {
+        var self = this;
+        if (self.firstChild) {
+          var nodes = [];
+          for (var node = self.firstChild; node; node = walk$2(node, self)) {
+            nodes.push(node);
+          }
+          var i = nodes.length;
+          while (i--) {
+            var node = nodes[i];
+            node.parent = node.firstChild = node.lastChild = node.next = node.prev = null;
+          }
+        }
+        self.firstChild = self.lastChild = null;
+        return self;
+      };
+      Node.prototype.isEmpty = function (elements, whitespace, predicate) {
+        if (whitespace === void 0) {
+          whitespace = {};
+        }
+        var self = this;
+        var node = self.firstChild;
+        if (isNonEmptyElement(self)) {
+          return false;
+        }
+        if (node) {
+          do {
+            if (node.type === 1) {
+              if (node.attr('data-mce-bogus')) {
+                continue;
+              }
+              if (elements[node.name]) {
+                return false;
+              }
+              if (isNonEmptyElement(node)) {
+                return false;
+              }
+            }
+            if (node.type === 8) {
+              return false;
+            }
+            if (node.type === 3 && !isEmptyTextNode$1(node)) {
+              return false;
+            }
+            if (node.type === 3 && node.parent && whitespace[node.parent.name] && whiteSpaceRegExp$3.test(node.value)) {
+              return false;
+            }
+            if (predicate && predicate(node)) {
+              return false;
+            }
+          } while (node = walk$2(node, self));
+        }
+        return true;
+      };
+      Node.prototype.walk = function (prev) {
+        return walk$2(this, null, prev);
+      };
+      return Node;
+    }();
+
+    var makeMap$3 = Tools.makeMap;
+    var Writer = function (settings) {
+      var html = [];
+      var indent, indentBefore, indentAfter, encode, htmlOutput;
+      settings = settings || {};
+      indent = settings.indent;
+      indentBefore = makeMap$3(settings.indent_before || '');
+      indentAfter = makeMap$3(settings.indent_after || '');
+      encode = Entities.getEncodeFunc(settings.entity_encoding || 'raw', settings.entities);
+      htmlOutput = settings.element_format === 'html';
+      return {
+        start: function (name, attrs, empty) {
+          var i, l, attr, value;
+          if (indent && indentBefore[name] && html.length > 0) {
+            value = html[html.length - 1];
+            if (value.length > 0 && value !== '\n') {
+              html.push('\n');
+            }
+          }
+          html.push('<', name);
+          if (attrs) {
+            for (i = 0, l = attrs.length; i < l; i++) {
+              attr = attrs[i];
+              html.push(' ', attr.name, '="', encode(attr.value, true), '"');
+            }
+          }
+          if (!empty || htmlOutput) {
+            html[html.length] = '>';
+          } else {
+            html[html.length] = ' />';
+          }
+          if (empty && indent && indentAfter[name] && html.length > 0) {
+            value = html[html.length - 1];
+            if (value.length > 0 && value !== '\n') {
+              html.push('\n');
+            }
+          }
+        },
+        end: function (name) {
+          var value;
+          html.push('</', name, '>');
+          if (indent && indentAfter[name] && html.length > 0) {
+            value = html[html.length - 1];
+            if (value.length > 0 && value !== '\n') {
+              html.push('\n');
+            }
+          }
+        },
+        text: function (text, raw) {
+          if (text.length > 0) {
+            html[html.length] = raw ? text : encode(text);
+          }
+        },
+        cdata: function (text) {
+          html.push('<![CDATA[', text, ']]>');
+        },
+        comment: function (text) {
+          html.push('<!--', text, '-->');
+        },
+        pi: function (name, text) {
+          if (text) {
+            html.push('<?', name, ' ', encode(text), '?>');
+          } else {
+            html.push('<?', name, '?>');
+          }
+          if (indent) {
+            html.push('\n');
+          }
+        },
+        doctype: function (text) {
+          html.push('<!DOCTYPE', text, '>', indent ? '\n' : '');
+        },
+        reset: function () {
+          html.length = 0;
+        },
+        getContent: function () {
+          return html.join('').replace(/\n$/, '');
+        }
+      };
+    };
+
+    var Serializer = function (settings, schema) {
+      if (schema === void 0) {
+        schema = Schema();
+      }
+      var writer = Writer(settings);
+      settings = settings || {};
+      settings.validate = 'validate' in settings ? settings.validate : true;
+      var serialize = function (node) {
+        var handlers, validate;
+        validate = settings.validate;
+        handlers = {
+          3: function (node) {
+            writer.text(node.value, node.raw);
+          },
+          8: function (node) {
+            writer.comment(node.value);
+          },
+          7: function (node) {
+            writer.pi(node.name, node.value);
+          },
+          10: function (node) {
+            writer.doctype(node.value);
+          },
+          4: function (node) {
+            writer.cdata(node.value);
+          },
+          11: function (node) {
+            if (node = node.firstChild) {
+              do {
+                walk(node);
+              } while (node = node.next);
+            }
+          }
+        };
+        writer.reset();
+        var walk = function (node) {
+          var handler = handlers[node.type];
+          var name, isEmpty, attrs, attrName, attrValue, sortedAttrs, i, l, elementRule;
+          if (!handler) {
+            name = node.name;
+            isEmpty = node.shortEnded;
+            attrs = node.attributes;
+            if (validate && attrs && attrs.length > 1) {
+              sortedAttrs = [];
+              sortedAttrs.map = {};
+              elementRule = schema.getElementRule(node.name);
+              if (elementRule) {
+                for (i = 0, l = elementRule.attributesOrder.length; i < l; i++) {
+                  attrName = elementRule.attributesOrder[i];
+                  if (attrName in attrs.map) {
+                    attrValue = attrs.map[attrName];
+                    sortedAttrs.map[attrName] = attrValue;
+                    sortedAttrs.push({
+                      name: attrName,
+                      value: attrValue
+                    });
+                  }
+                }
+                for (i = 0, l = attrs.length; i < l; i++) {
+                  attrName = attrs[i].name;
+                  if (!(attrName in sortedAttrs.map)) {
+                    attrValue = attrs.map[attrName];
+                    sortedAttrs.map[attrName] = attrValue;
+                    sortedAttrs.push({
+                      name: attrName,
+                      value: attrValue
+                    });
+                  }
+                }
+                attrs = sortedAttrs;
+              }
+            }
+            writer.start(node.name, attrs, isEmpty);
+            if (!isEmpty) {
+              if (node = node.firstChild) {
+                do {
+                  walk(node);
+                } while (node = node.next);
+              }
+              writer.end(name);
+            }
+          } else {
+            handler(node);
+          }
+        };
+        if (node.type === 1 && !settings.inner) {
+          walk(node);
+        } else {
+          handlers[11](node);
+        }
+        return writer.getContent();
+      };
+      return { serialize: serialize };
+    };
+
+    var extractBase64DataUris = function (html) {
+      var dataImageUri = /data:[^;]+;base64,([a-z0-9\+\/=]+)/gi;
+      var chunks = [];
+      var uris = {};
+      var prefix = generate('img');
+      var matches;
+      var index = 0;
+      var count = 0;
+      while (matches = dataImageUri.exec(html)) {
+        var uri = matches[0];
+        var imageId = prefix + '_' + count++;
+        uris[imageId] = uri;
+        if (index < matches.index) {
+          chunks.push(html.substr(index, matches.index - index));
+        }
+        chunks.push(imageId);
+        index = matches.index + uri.length;
+      }
+      if (index === 0) {
+        return {
+          prefix: prefix,
+          uris: uris,
+          html: html
+        };
+      } else {
+        if (index < html.length) {
+          chunks.push(html.substr(index));
+        }
+        return {
+          prefix: prefix,
+          uris: uris,
+          html: chunks.join('')
+        };
+      }
+    };
+    var restoreDataUris = function (html, result) {
+      return html.replace(new RegExp(result.prefix + '_[0-9]+', 'g'), function (imageId) {
+        return get(result.uris, imageId).getOr(imageId);
+      });
+    };
+    var parseDataUri = function (uri) {
+      var matches = /data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(uri);
+      if (matches) {
+        return Option.some({
+          type: matches[1],
+          data: decodeURIComponent(matches[2])
+        });
+      } else {
+        return Option.none();
+      }
+    };
+
+    var isValidPrefixAttrName = function (name) {
+      return name.indexOf('data-') === 0 || name.indexOf('aria-') === 0;
+    };
+    var isInvalidUri = function (settings, uri) {
+      if (settings.allow_html_data_urls) {
+        return false;
+      } else if (/^data:image\//i.test(uri)) {
+        return settings.allow_svg_data_urls === false && /^data:image\/svg\+xml/i.test(uri);
+      } else {
+        return /^data:/i.test(uri);
+      }
+    };
+    var findEndTagIndex = function (schema, html, startIndex) {
+      var count = 1, index, matches, tokenRegExp, shortEndedElements;
+      shortEndedElements = schema.getShortEndedElements();
+      tokenRegExp = /<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g;
+      tokenRegExp.lastIndex = index = startIndex;
+      while (matches = tokenRegExp.exec(html)) {
+        index = tokenRegExp.lastIndex;
+        if (matches[1] === '/') {
+          count--;
+        } else if (!matches[1]) {
+          if (matches[2] in shortEndedElements) {
+            continue;
+          }
+          count++;
+        }
+        if (count === 0) {
+          break;
+        }
+      }
+      return index;
+    };
+    var isConditionalComment = function (html, startIndex) {
+      return /^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(html.substr(startIndex));
+    };
+    var findCommentEndIndex = function (html, isBogus, startIndex) {
+      if (startIndex === void 0) {
+        startIndex = 0;
+      }
+      var lcHtml = html.toLowerCase();
+      if (lcHtml.indexOf('[if ', startIndex) !== -1 && isConditionalComment(lcHtml, startIndex)) {
+        var endIfIndex = lcHtml.indexOf('[endif]', startIndex);
+        return lcHtml.indexOf('>', endIfIndex);
+      } else {
+        if (isBogus) {
+          var endIndex = lcHtml.indexOf('>', startIndex);
+          return endIndex !== -1 ? endIndex : lcHtml.length;
+        } else {
+          var endCommentRegexp = /--!?>/;
+          endCommentRegexp.lastIndex = startIndex;
+          var match = endCommentRegexp.exec(html);
+          return match ? match.index + match[0].length : lcHtml.length;
+        }
+      }
+    };
+    var checkBogusAttribute = function (regExp, attrString) {
+      var matches = regExp.exec(attrString);
+      if (matches) {
+        var name_1 = matches[1];
+        var value = matches[2];
+        return typeof name_1 === 'string' && name_1.toLowerCase() === 'data-mce-bogus' ? value : null;
+      } else {
+        return null;
+      }
+    };
+    function SaxParser(settings, schema) {
+      if (schema === void 0) {
+        schema = Schema();
+      }
+      var noop = function () {
+      };
+      settings = settings || {};
+      if (settings.fix_self_closing !== false) {
+        settings.fix_self_closing = true;
+      }
+      var comment = settings.comment ? settings.comment : noop;
+      var cdata = settings.cdata ? settings.cdata : noop;
+      var text = settings.text ? settings.text : noop;
+      var start = settings.start ? settings.start : noop;
+      var end = settings.end ? settings.end : noop;
+      var pi = settings.pi ? settings.pi : noop;
+      var doctype = settings.doctype ? settings.doctype : noop;
+      var parseInternal = function (base64Extract, format) {
+        if (format === void 0) {
+          format = 'html';
+        }
+        var html = base64Extract.html;
+        var matches, index = 0, value, endRegExp;
+        var stack = [];
+        var attrList, i, textData, name;
+        var isInternalElement, removeInternalElements, shortEndedElements, fillAttrsMap, isShortEnded;
+        var validate, elementRule, isValidElement, attr, attribsValue, validAttributesMap, validAttributePatterns;
+        var attributesRequired, attributesDefault, attributesForced, processHtml;
+        var anyAttributesRequired, selfClosing, tokenRegExp, attrRegExp, specialElements, attrValue, idCount = 0;
+        var decode = Entities.decode;
+        var fixSelfClosing;
+        var filteredUrlAttrs = Tools.makeMap('src,href,data,background,formaction,poster,xlink:href');
+        var scriptUriRegExp = /((java|vb)script|mhtml):/i;
+        var parsingMode = format === 'html' ? 0 : 1;
+        var processEndTag = function (name) {
+          var pos, i;
+          pos = stack.length;
+          while (pos--) {
+            if (stack[pos].name === name) {
+              break;
+            }
+          }
+          if (pos >= 0) {
+            for (i = stack.length - 1; i >= pos; i--) {
+              name = stack[i];
+              if (name.valid) {
+                end(name.name);
+              }
+            }
+            stack.length = pos;
+          }
+        };
+        var processText = function (value, raw) {
+          return text(restoreDataUris(value, base64Extract), raw);
+        };
+        var processComment = function (value) {
+          if (value === '') {
+            return;
+          }
+          if (value.charAt(0) === '>') {
+            value = ' ' + value;
+          }
+          if (!settings.allow_conditional_comments && value.substr(0, 3).toLowerCase() === '[if') {
+            value = ' ' + value;
+          }
+          comment(restoreDataUris(value, base64Extract));
+        };
+        var processAttr = function (value) {
+          return get(base64Extract.uris, value).getOr(value);
+        };
+        var processMalformedComment = function (value, startIndex) {
+          var startTag = value || '';
+          var isBogus = !startsWith(startTag, '--');
+          var endIndex = findCommentEndIndex(html, isBogus, startIndex);
+          value = html.substr(startIndex, endIndex - startIndex);
+          processComment(isBogus ? startTag + value : value);
+          return endIndex + 1;
+        };
+        var parseAttribute = function (match, name, value, val2, val3) {
+          var attrRule, i;
+          var trimRegExp = /[\s\u0000-\u001F]+/g;
+          name = name.toLowerCase();
+          value = processAttr(name in fillAttrsMap ? name : decode(value || val2 || val3 || ''));
+          if (validate && !isInternalElement && isValidPrefixAttrName(name) === false) {
+            attrRule = validAttributesMap[name];
+            if (!attrRule && validAttributePatterns) {
+              i = validAttributePatterns.length;
+              while (i--) {
+                attrRule = validAttributePatterns[i];
+                if (attrRule.pattern.test(name)) {
+                  break;
+                }
+              }
+              if (i === -1) {
+                attrRule = null;
+              }
+            }
+            if (!attrRule) {
+              return;
+            }
+            if (attrRule.validValues && !(value in attrRule.validValues)) {
+              return;
+            }
+          }
+          if (filteredUrlAttrs[name] && !settings.allow_script_urls) {
+            var uri = value.replace(trimRegExp, '');
+            try {
+              uri = decodeURIComponent(uri);
+            } catch (ex) {
+              uri = unescape(uri);
+            }
+            if (scriptUriRegExp.test(uri)) {
+              return;
+            }
+            if (isInvalidUri(settings, uri)) {
+              return;
+            }
+          }
+          if (isInternalElement && (name in filteredUrlAttrs || name.indexOf('on') === 0)) {
+            return;
+          }
+          attrList.map[name] = value;
+          attrList.push({
+            name: name,
+            value: value
+          });
+        };
+        tokenRegExp = new RegExp('<(?:' + '(?:!--([\\w\\W]*?)--!?>)|' + '(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|' + '(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|' + '(?:!(--)?)|' + '(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|' + '(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|' + '(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\\/|\\s+)>)' + ')', 'g');
+        attrRegExp = /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g;
+        shortEndedElements = schema.getShortEndedElements();
+        selfClosing = settings.self_closing_elements || schema.getSelfClosingElements();
+        fillAttrsMap = schema.getBoolAttrs();
+        validate = settings.validate;
+        removeInternalElements = settings.remove_internals;
+        fixSelfClosing = settings.fix_self_closing;
+        specialElements = schema.getSpecialElements();
+        processHtml = html + '>';
+        while (matches = tokenRegExp.exec(processHtml)) {
+          var matchText = matches[0];
+          if (index < matches.index) {
+            processText(decode(html.substr(index, matches.index - index)));
+          }
+          if (value = matches[7]) {
+            value = value.toLowerCase();
+            if (value.charAt(0) === ':') {
+              value = value.substr(1);
+            }
+            processEndTag(value);
+          } else if (value = matches[8]) {
+            if (matches.index + matchText.length > html.length) {
+              processText(decode(html.substr(matches.index)));
+              index = matches.index + matchText.length;
+              continue;
+            }
+            value = value.toLowerCase();
+            if (value.charAt(0) === ':') {
+              value = value.substr(1);
+            }
+            isShortEnded = value in shortEndedElements;
+            if (fixSelfClosing && selfClosing[value] && stack.length > 0 && stack[stack.length - 1].name === value) {
+              processEndTag(value);
+            }
+            var bogusValue = checkBogusAttribute(attrRegExp, matches[9]);
+            if (bogusValue !== null) {
+              if (bogusValue === 'all') {
+                index = findEndTagIndex(schema, html, tokenRegExp.lastIndex);
+                tokenRegExp.lastIndex = index;
+                continue;
+              }
+              isValidElement = false;
+            }
+            if (!validate || (elementRule = schema.getElementRule(value))) {
+              isValidElement = true;
+              if (validate) {
+                validAttributesMap = elementRule.attributes;
+                validAttributePatterns = elementRule.attributePatterns;
+              }
+              if (attribsValue = matches[9]) {
+                isInternalElement = attribsValue.indexOf('data-mce-type') !== -1;
+                if (isInternalElement && removeInternalElements) {
+                  isValidElement = false;
+                }
+                attrList = [];
+                attrList.map = {};
+                attribsValue.replace(attrRegExp, parseAttribute);
+              } else {
+                attrList = [];
+                attrList.map = {};
+              }
+              if (validate && !isInternalElement) {
+                attributesRequired = elementRule.attributesRequired;
+                attributesDefault = elementRule.attributesDefault;
+                attributesForced = elementRule.attributesForced;
+                anyAttributesRequired = elementRule.removeEmptyAttrs;
+                if (anyAttributesRequired && !attrList.length) {
+                  isValidElement = false;
+                }
+                if (attributesForced) {
+                  i = attributesForced.length;
+                  while (i--) {
+                    attr = attributesForced[i];
+                    name = attr.name;
+                    attrValue = attr.value;
+                    if (attrValue === '{$uid}') {
+                      attrValue = 'mce_' + idCount++;
+                    }
+                    attrList.map[name] = attrValue;
+                    attrList.push({
+                      name: name,
+                      value: attrValue
+                    });
+                  }
+                }
+                if (attributesDefault) {
+                  i = attributesDefault.length;
+                  while (i--) {
+                    attr = attributesDefault[i];
+                    name = attr.name;
+                    if (!(name in attrList.map)) {
+                      attrValue = attr.value;
+                      if (attrValue === '{$uid}') {
+                        attrValue = 'mce_' + idCount++;
+                      }
+                      attrList.map[name] = attrValue;
+                      attrList.push({
+                        name: name,
+                        value: attrValue
+                      });
+                    }
+                  }
+                }
+                if (attributesRequired) {
+                  i = attributesRequired.length;
+                  while (i--) {
+                    if (attributesRequired[i] in attrList.map) {
+                      break;
+                    }
+                  }
+                  if (i === -1) {
+                    isValidElement = false;
+                  }
+                }
+                if (attr = attrList.map['data-mce-bogus']) {
+                  if (attr === 'all') {
+                    index = findEndTagIndex(schema, html, tokenRegExp.lastIndex);
+                    tokenRegExp.lastIndex = index;
+                    continue;
+                  }
+                  isValidElement = false;
+                }
+              }
+              if (isValidElement) {
+                start(value, attrList, isShortEnded);
+              }
+            } else {
+              isValidElement = false;
+            }
+            if (endRegExp = specialElements[value]) {
+              endRegExp.lastIndex = index = matches.index + matchText.length;
+              if (matches = endRegExp.exec(html)) {
+                if (isValidElement) {
+                  textData = html.substr(index, matches.index - index);
+                }
+                index = matches.index + matches[0].length;
+              } else {
+                textData = html.substr(index);
+                index = html.length;
+              }
+              if (isValidElement) {
+                if (textData.length > 0) {
+                  processText(textData, true);
+                }
+                end(value);
+              }
+              tokenRegExp.lastIndex = index;
+              continue;
+            }
+            if (!isShortEnded) {
+              if (!attribsValue || attribsValue.indexOf('/') !== attribsValue.length - 1) {
+                stack.push({
+                  name: value,
+                  valid: isValidElement
+                });
+              } else if (isValidElement) {
+                end(value);
+              }
+            }
+          } else if (value = matches[1]) {
+            processComment(value);
+          } else if (value = matches[2]) {
+            var isValidCdataSection = parsingMode === 1 || settings.preserve_cdata || stack.length > 0 && schema.isValidChild(stack[stack.length - 1].name, '#cdata');
+            if (isValidCdataSection) {
+              cdata(value);
+            } else {
+              index = processMalformedComment('', matches.index + 2);
+              tokenRegExp.lastIndex = index;
+              continue;
+            }
+          } else if (value = matches[3]) {
+            doctype(value);
+          } else if ((value = matches[4]) || matchText === '<!') {
+            index = processMalformedComment(value, matches.index + matchText.length);
+            tokenRegExp.lastIndex = index;
+            continue;
+          } else if (value = matches[5]) {
+            if (parsingMode === 1) {
+              pi(value, matches[6]);
+            } else {
+              index = processMalformedComment('?', matches.index + 2);
+              tokenRegExp.lastIndex = index;
+              continue;
+            }
+          }
+          index = matches.index + matchText.length;
+        }
+        if (index < html.length) {
+          processText(decode(html.substr(index)));
+        }
+        for (i = stack.length - 1; i >= 0; i--) {
+          value = stack[i];
+          if (value.valid) {
+            end(value.name);
+          }
+        }
+      };
+      var parse = function (html, format) {
+        if (format === void 0) {
+          format = 'html';
+        }
+        parseInternal(extractBase64DataUris(html), format);
+      };
+      return { parse: parse };
+    }
+    (function (SaxParser) {
+      SaxParser.findEndTag = findEndTagIndex;
+    }(SaxParser || (SaxParser = {})));
+    var SaxParser$1 = SaxParser;
+
+    var trimHtml = function (tempAttrs, html) {
+      var trimContentRegExp = new RegExp(['\\s?(' + tempAttrs.join('|') + ')="[^"]+"'].join('|'), 'gi');
+      return html.replace(trimContentRegExp, '');
+    };
+    var trimInternal = function (serializer, html) {
+      var content = html;
+      var bogusAllRegExp = /<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g;
+      var endTagIndex, index, matchLength, matches, shortEndedElements;
+      var schema = serializer.schema;
+      content = trimHtml(serializer.getTempAttrs(), content);
+      shortEndedElements = schema.getShortEndedElements();
+      while (matches = bogusAllRegExp.exec(content)) {
+        index = bogusAllRegExp.lastIndex;
+        matchLength = matches[0].length;
+        if (shortEndedElements[matches[1]]) {
+          endTagIndex = index;
+        } else {
+          endTagIndex = SaxParser$1.findEndTag(schema, content, index);
+        }
+        content = content.substring(0, index - matchLength) + content.substring(endTagIndex);
+        bogusAllRegExp.lastIndex = index - matchLength;
+      }
+      return trim$3(content);
+    };
+    var trimExternal = trimInternal;
+
+    var trimEmptyContents = function (editor, html) {
+      var blockName = getForcedRootBlock(editor);
+      var emptyRegExp = new RegExp('^(<' + blockName + '[^>]*>(&nbsp;|&#160;|\\s|\xA0|<br \\/>|)<\\/' + blockName + '>[\r\n]*|<br \\/>[\r\n]*)$');
+      return html.replace(emptyRegExp, '');
+    };
+    var getContentFromBody = function (editor, args, format, body) {
+      var content;
+      args.format = format;
+      args.get = true;
+      args.getInner = true;
+      if (!args.no_events) {
+        editor.fire('BeforeGetContent', args);
+      }
+      if (args.format === 'raw') {
+        content = Tools.trim(trimExternal(editor.serializer, body.innerHTML));
+      } else if (args.format === 'text') {
+        content = trim$3(body.innerText || body.textContent);
+      } else if (args.format === 'tree') {
+        return editor.serializer.serialize(body, args);
+      } else {
+        content = trimEmptyContents(editor, editor.serializer.serialize(body, args));
+      }
+      if (args.format !== 'text' && !isWsPreserveElement(Element.fromDom(body))) {
+        args.content = Tools.trim(content);
+      } else {
+        args.content = content;
+      }
+      if (!args.no_events) {
+        editor.fire('GetContent', args);
+      }
+      return args.content;
+    };
+    var getContentInternal = function (editor, args, format) {
+      return Option.from(editor.getBody()).fold(constant(args.format === 'tree' ? new Node('body', 11) : ''), function (body) {
+        return getContentFromBody(editor, args, format, body);
+      });
+    };
+
+    var each$7 = Tools.each;
+    var ElementUtils = function (dom) {
+      this.compare = function (node1, node2) {
+        if (node1.nodeName !== node2.nodeName) {
+          return false;
+        }
+        var getAttribs = function (node) {
+          var attribs = {};
+          each$7(dom.getAttribs(node), function (attr) {
+            var name = attr.nodeName.toLowerCase();
+            if (name.indexOf('_') !== 0 && name !== 'style' && name.indexOf('data-') !== 0) {
+              attribs[name] = dom.getAttrib(node, name);
+            }
+          });
+          return attribs;
+        };
+        var compareObjects = function (obj1, obj2) {
+          var value, name;
+          for (name in obj1) {
+            if (obj1.hasOwnProperty(name)) {
+              value = obj2[name];
+              if (typeof value === 'undefined') {
+                return false;
+              }
+              if (obj1[name] !== value) {
+                return false;
+              }
+              delete obj2[name];
+            }
+          }
+          for (name in obj2) {
+            if (obj2.hasOwnProperty(name)) {
+              return false;
+            }
+          }
+          return true;
+        };
+        if (!compareObjects(getAttribs(node1), getAttribs(node2))) {
+          return false;
+        }
+        if (!compareObjects(dom.parseStyle(dom.getAttrib(node1, 'style')), dom.parseStyle(dom.getAttrib(node2, 'style')))) {
+          return false;
+        }
+        return !isBookmarkNode$1(node1) && !isBookmarkNode$1(node2);
+      };
+    };
+
+    var isChar = function (forward, predicate, pos) {
+      return Option.from(pos.container()).filter(isText$1).exists(function (text) {
+        var delta = forward ? 0 : -1;
+        return predicate(text.data.charAt(pos.offset() + delta));
+      });
+    };
+    var isBeforeSpace = curry(isChar, true, isWhiteSpace$1);
+    var isAfterSpace = curry(isChar, false, isWhiteSpace$1);
+    var isEmptyText = function (pos) {
+      var container = pos.container();
+      return isText$1(container) && container.data.length === 0;
+    };
+    var matchesElementPosition = function (before, predicate) {
+      return function (pos) {
+        return Option.from(getChildNodeAtRelativeOffset(before ? 0 : -1, pos)).filter(predicate).isSome();
+      };
+    };
+    var isImageBlock = function (node) {
+      return node.nodeName === 'IMG' && get$4(Element.fromDom(node), 'display') === 'block';
+    };
+    var isCefNode = function (node) {
+      return isContentEditableFalse(node) && !isBogusAll(node);
+    };
+    var isBeforeImageBlock = matchesElementPosition(true, isImageBlock);
+    var isAfterImageBlock = matchesElementPosition(false, isImageBlock);
+    var isBeforeTable = matchesElementPosition(true, isTable);
+    var isAfterTable = matchesElementPosition(false, isTable);
+    var isBeforeContentEditableFalse = matchesElementPosition(true, isCefNode);
+    var isAfterContentEditableFalse = matchesElementPosition(false, isCefNode);
+
+    var ancestor$2 = function (scope, selector, isRoot) {
+      return ancestor$1(scope, selector, isRoot).isSome();
+    };
+
+    var hasWhitespacePreserveParent = function (rootNode, node) {
+      var rootElement = Element.fromDom(rootNode);
+      var startNode = Element.fromDom(node);
+      return ancestor$2(startNode, 'pre,code', curry(eq$2, rootElement));
+    };
+    var isWhitespace = function (rootNode, node) {
+      return isText$1(node) && /^[ \t\r\n]*$/.test(node.data) && hasWhitespacePreserveParent(rootNode, node) === false;
+    };
+    var isNamedAnchor = function (node) {
+      return isElement$1(node) && node.nodeName === 'A' && node.hasAttribute('name');
+    };
+    var isContent$1 = function (rootNode, node) {
+      return isCaretCandidate(node) && isWhitespace(rootNode, node) === false || isNamedAnchor(node) || isBookmark(node);
+    };
+    var isBookmark = hasAttribute('data-mce-bookmark');
+    var isBogus$2 = hasAttribute('data-mce-bogus');
+    var isBogusAll$1 = hasAttributeValue('data-mce-bogus', 'all');
+    var isEmptyNode = function (targetNode, skipBogus) {
+      var node, brCount = 0;
+      if (isContent$1(targetNode, targetNode)) {
+        return false;
+      } else {
+        node = targetNode.firstChild;
+        if (!node) {
+          return true;
+        }
+        var walker = new TreeWalker(node, targetNode);
+        do {
+          if (skipBogus) {
+            if (isBogusAll$1(node)) {
+              node = walker.next(true);
+              continue;
+            }
+            if (isBogus$2(node)) {
+              node = walker.next();
+              continue;
+            }
+          }
+          if (isBr(node)) {
+            brCount++;
+            node = walker.next();
+            continue;
+          }
+          if (isContent$1(targetNode, node)) {
+            return false;
+          }
+          node = walker.next();
+        } while (node);
+        return brCount <= 1;
+      }
+    };
+    var isEmpty$1 = function (elm, skipBogus) {
+      if (skipBogus === void 0) {
+        skipBogus = true;
+      }
+      return isEmptyNode(elm.dom(), skipBogus);
+    };
+
+    var getLastChildren$1 = function (elm) {
+      var children = [];
+      var rawNode = elm.dom();
+      while (rawNode) {
+        children.push(Element.fromDom(rawNode));
+        rawNode = rawNode.lastChild;
+      }
+      return children;
+    };
+    var removeTrailingBr = function (elm) {
+      var allBrs = descendants$1(elm, 'br');
+      var brs = filter(getLastChildren$1(elm).slice(-1), isBr$1);
+      if (allBrs.length === brs.length) {
+        each(brs, remove);
+      }
+    };
+    var fillWithPaddingBr = function (elm) {
+      empty(elm);
+      append(elm, Element.fromHtml('<br data-mce-bogus="1">'));
+    };
+    var trimBlockTrailingBr = function (elm) {
+      lastChild(elm).each(function (lastChild) {
+        prevSibling(lastChild).each(function (lastChildPrevSibling) {
+          if (isBlock(elm) && isBr$1(lastChild) && isBlock(lastChildPrevSibling)) {
+            remove(lastChild);
+          }
+        });
+      });
+    };
+
+    var dropLast = function (xs) {
+      return xs.slice(0, -1);
+    };
+    var parentsUntil$1 = function (start, root, predicate) {
+      if (contains$2(root, start)) {
+        return dropLast(parents(start, function (elm) {
+          return predicate(elm) || eq$2(elm, root);
+        }));
+      } else {
+        return [];
+      }
+    };
+    var parents$1 = function (start, root) {
+      return parentsUntil$1(start, root, constant(false));
+    };
+    var parentsAndSelf = function (start, root) {
+      return [start].concat(parents$1(start, root));
+    };
+
+    var normalizeContent = function (content, isStartOfContent, isEndOfContent) {
+      var result = foldl(content, function (acc, c) {
+        if (isWhiteSpace$1(c) || isNbsp(c)) {
+          if (acc.previousCharIsSpace || acc.str === '' && isStartOfContent || acc.str.length === content.length - 1 && isEndOfContent) {
+            return {
+              previousCharIsSpace: false,
+              str: acc.str + nbsp
+            };
+          } else {
+            return {
+              previousCharIsSpace: true,
+              str: acc.str + ' '
+            };
+          }
+        } else {
+          return {
+            previousCharIsSpace: false,
+            str: acc.str + c
+          };
+        }
+      }, {
+        previousCharIsSpace: false,
+        str: ''
+      });
+      return result.str;
+    };
+    var normalize = function (node, offset, count) {
+      if (count === 0) {
+        return;
+      }
+      var whitespace = node.data.slice(offset, offset + count);
+      var isEndOfContent = offset + count >= node.data.length;
+      var isStartOfContent = offset === 0;
+      node.replaceData(offset, count, normalizeContent(whitespace, isStartOfContent, isEndOfContent));
+    };
+    var normalizeWhitespaceAfter = function (node, offset) {
+      var content = node.data.slice(offset);
+      var whitespaceCount = content.length - lTrim(content).length;
+      return normalize(node, offset, whitespaceCount);
+    };
+    var normalizeWhitespaceBefore = function (node, offset) {
+      var content = node.data.slice(0, offset);
+      var whitespaceCount = content.length - rTrim(content).length;
+      return normalize(node, offset - whitespaceCount, whitespaceCount);
+    };
+    var mergeTextNodes = function (prevNode, nextNode, normalizeWhitespace) {
+      var whitespaceOffset = rTrim(prevNode.data).length;
+      prevNode.appendData(nextNode.data);
+      remove(Element.fromDom(nextNode));
+      if (normalizeWhitespace) {
+        normalizeWhitespaceAfter(prevNode, whitespaceOffset);
+      }
+      return prevNode;
+    };
+
+    var needsReposition = function (pos, elm) {
+      var container = pos.container();
+      var offset = pos.offset();
+      return CaretPosition$1.isTextPosition(pos) === false && container === elm.parentNode && offset > CaretPosition$1.before(elm).offset();
+    };
+    var reposition = function (elm, pos) {
+      return needsReposition(pos, elm) ? CaretPosition$1(pos.container(), pos.offset() - 1) : pos;
+    };
+    var beforeOrStartOf = function (node) {
+      return isText$1(node) ? CaretPosition$1(node, 0) : CaretPosition$1.before(node);
+    };
+    var afterOrEndOf = function (node) {
+      return isText$1(node) ? CaretPosition$1(node, node.data.length) : CaretPosition$1.after(node);
+    };
+    var getPreviousSiblingCaretPosition = function (elm) {
+      if (isCaretCandidate(elm.previousSibling)) {
+        return Option.some(afterOrEndOf(elm.previousSibling));
+      } else {
+        return elm.previousSibling ? lastPositionIn(elm.previousSibling) : Option.none();
+      }
+    };
+    var getNextSiblingCaretPosition = function (elm) {
+      if (isCaretCandidate(elm.nextSibling)) {
+        return Option.some(beforeOrStartOf(elm.nextSibling));
+      } else {
+        return elm.nextSibling ? firstPositionIn(elm.nextSibling) : Option.none();
+      }
+    };
+    var findCaretPositionBackwardsFromElm = function (rootElement, elm) {
+      var startPosition = CaretPosition$1.before(elm.previousSibling ? elm.previousSibling : elm.parentNode);
+      return prevPosition(rootElement, startPosition).fold(function () {
+        return nextPosition(rootElement, CaretPosition$1.after(elm));
+      }, Option.some);
+    };
+    var findCaretPositionForwardsFromElm = function (rootElement, elm) {
+      return nextPosition(rootElement, CaretPosition$1.after(elm)).fold(function () {
+        return prevPosition(rootElement, CaretPosition$1.before(elm));
+      }, Option.some);
+    };
+    var findCaretPositionBackwards = function (rootElement, elm) {
+      return getPreviousSiblingCaretPosition(elm).orThunk(function () {
+        return getNextSiblingCaretPosition(elm);
+      }).orThunk(function () {
+        return findCaretPositionBackwardsFromElm(rootElement, elm);
+      });
+    };
+    var findCaretPositionForward = function (rootElement, elm) {
+      return getNextSiblingCaretPosition(elm).orThunk(function () {
+        return getPreviousSiblingCaretPosition(elm);
+      }).orThunk(function () {
+        return findCaretPositionForwardsFromElm(rootElement, elm);
+      });
+    };
+    var findCaretPosition$1 = function (forward, rootElement, elm) {
+      return forward ? findCaretPositionForward(rootElement, elm) : findCaretPositionBackwards(rootElement, elm);
+    };
+    var findCaretPosOutsideElmAfterDelete = function (forward, rootElement, elm) {
+      return findCaretPosition$1(forward, rootElement, elm).map(curry(reposition, elm));
+    };
+    var setSelection = function (editor, forward, pos) {
+      pos.fold(function () {
+        editor.focus();
+      }, function (pos) {
+        editor.selection.setRng(pos.toRange(), forward);
+      });
+    };
+    var eqRawNode = function (rawNode) {
+      return function (elm) {
+        return elm.dom() === rawNode;
+      };
+    };
+    var isBlock$2 = function (editor, elm) {
+      return elm && editor.schema.getBlockElements().hasOwnProperty(name(elm));
+    };
+    var paddEmptyBlock = function (elm) {
+      if (isEmpty$1(elm)) {
+        var br = Element.fromHtml('<br data-mce-bogus="1">');
+        empty(elm);
+        append(elm, br);
+        return Option.some(CaretPosition$1.before(br.dom()));
+      } else {
+        return Option.none();
+      }
+    };
+    var deleteNormalized = function (elm, afterDeletePosOpt, normalizeWhitespace) {
+      var prevTextOpt = prevSibling(elm).filter(isText);
+      var nextTextOpt = nextSibling(elm).filter(isText);
+      remove(elm);
+      return lift3(prevTextOpt, nextTextOpt, afterDeletePosOpt, function (prev, next, pos) {
+        var prevNode = prev.dom(), nextNode = next.dom();
+        var offset = prevNode.data.length;
+        mergeTextNodes(prevNode, nextNode, normalizeWhitespace);
+        return pos.container() === nextNode ? CaretPosition$1(prevNode, offset) : pos;
+      }).orThunk(function () {
+        if (normalizeWhitespace) {
+          prevTextOpt.each(function (elm) {
+            return normalizeWhitespaceBefore(elm.dom(), elm.dom().length);
+          });
+          nextTextOpt.each(function (elm) {
+            return normalizeWhitespaceAfter(elm.dom(), 0);
+          });
+        }
+        return afterDeletePosOpt;
+      });
+    };
+    var isInlineElement = function (editor, element) {
+      return has(editor.schema.getTextInlineElements(), name(element));
+    };
+    var deleteElement = function (editor, forward, elm, moveCaret) {
+      if (moveCaret === void 0) {
+        moveCaret = true;
+      }
+      var afterDeletePos = findCaretPosOutsideElmAfterDelete(forward, editor.getBody(), elm.dom());
+      var parentBlock = ancestor(elm, curry(isBlock$2, editor), eqRawNode(editor.getBody()));
+      var normalizedAfterDeletePos = deleteNormalized(elm, afterDeletePos, isInlineElement(editor, elm));
+      if (editor.dom.isEmpty(editor.getBody())) {
+        editor.setContent('');
+        editor.selection.setCursorLocation();
+      } else {
+        parentBlock.bind(paddEmptyBlock).fold(function () {
+          if (moveCaret) {
+            setSelection(editor, forward, normalizedAfterDeletePos);
+          }
+        }, function (paddPos) {
+          if (moveCaret) {
+            setSelection(editor, forward, Option.some(paddPos));
+          }
+        });
+      }
+    };
+
+    var generate$1 = function (cases) {
+      if (!isArray(cases)) {
+        throw new Error('cases must be an array');
+      }
+      if (cases.length === 0) {
+        throw new Error('there must be at least one case');
+      }
+      var constructors = [];
+      var adt = {};
+      each(cases, function (acase, count) {
+        var keys$1 = keys(acase);
+        if (keys$1.length !== 1) {
+          throw new Error('one and only one name per case');
+        }
+        var key = keys$1[0];
+        var value = acase[key];
+        if (adt[key] !== undefined) {
+          throw new Error('duplicate key detected:' + key);
+        } else if (key === 'cata') {
+          throw new Error('cannot have a case named cata (sorry)');
+        } else if (!isArray(value)) {
+          throw new Error('case arguments must be an array');
+        }
+        constructors.push(key);
+        adt[key] = function () {
+          var argLength = arguments.length;
+          if (argLength !== value.length) {
+            throw new Error('Wrong number of arguments to case ' + key + '. Expected ' + value.length + ' (' + value + '), got ' + argLength);
+          }
+          var args = new Array(argLength);
+          for (var i = 0; i < args.length; i++) {
+            args[i] = arguments[i];
+          }
+          var match = function (branches) {
+            var branchKeys = keys(branches);
+            if (constructors.length !== branchKeys.length) {
+              throw new Error('Wrong number of arguments to match. Expected: ' + constructors.join(',') + '\nActual: ' + branchKeys.join(','));
+            }
+            var allReqd = forall(constructors, function (reqKey) {
+              return contains(branchKeys, reqKey);
+            });
+            if (!allReqd) {
+              throw new Error('Not all branches were specified when using match. Specified: ' + branchKeys.join(', ') + '\nRequired: ' + constructors.join(', '));
+            }
+            return branches[key].apply(null, args);
+          };
+          return {
+            fold: function () {
+              if (arguments.length !== cases.length) {
+                throw new Error('Wrong number of arguments to fold. Expected ' + cases.length + ', got ' + arguments.length);
+              }
+              var target = arguments[count];
+              return target.apply(null, args);
+            },
+            match: match,
+            log: function (label) {
+              domGlobals.console.log(label, {
+                constructors: constructors,
+                constructor: key,
+                params: args
+              });
+            }
+          };
+        };
+      });
+      return adt;
+    };
+    var Adt = { generate: generate$1 };
+
+    var tableCellRng = function (start, end) {
+      return {
+        start: start,
+        end: end
+      };
+    };
+    var tableSelection = function (rng, table, cells) {
+      return {
+        rng: rng,
+        table: table,
+        cells: cells
+      };
+    };
+    var deleteAction = Adt.generate([
+      { removeTable: ['element'] },
+      { emptyCells: ['cells'] },
+      {
+        deleteCellSelection: [
+          'rng',
+          'cell'
+        ]
+      }
+    ]);
+    var isRootFromElement = function (root) {
+      return function (cur) {
+        return eq$2(root, cur);
+      };
+    };
+    var getClosestCell = function (container, isRoot) {
+      return closest$1(Element.fromDom(container), 'td,th', isRoot);
+    };
+    var getClosestTable = function (cell, isRoot) {
+      return ancestor$1(cell, 'table', isRoot);
+    };
+    var isExpandedCellRng = function (cellRng) {
+      return !eq$2(cellRng.start, cellRng.end);
+    };
+    var getTableFromCellRng = function (cellRng, isRoot) {
+      return getClosestTable(cellRng.start, isRoot).bind(function (startParentTable) {
+        return getClosestTable(cellRng.end, isRoot).bind(function (endParentTable) {
+          return someIf(eq$2(startParentTable, endParentTable), startParentTable);
+        });
+      });
+    };
+    var isSingleCellTable = function (cellRng, isRoot) {
+      return !isExpandedCellRng(cellRng) && getTableFromCellRng(cellRng, isRoot).exists(function (table) {
+        var rows = table.dom().rows;
+        return rows.length === 1 && rows[0].cells.length === 1;
+      });
+    };
+    var getTableCells = function (table) {
+      return descendants$1(table, 'td,th');
+    };
+    var getCellRng = function (rng, isRoot) {
+      var startCell = getClosestCell(rng.startContainer, isRoot);
+      var endCell = getClosestCell(rng.endContainer, isRoot);
+      return lift2(startCell, endCell, tableCellRng);
+    };
+    var getCellRangeFromStartTable = function (cellRng, isRoot) {
+      return getClosestTable(cellRng.start, isRoot).bind(function (table) {
+        return last(getTableCells(table)).map(function (endCell) {
+          return tableCellRng(cellRng.start, endCell);
+        });
+      });
+    };
+    var partialSelection = function (isRoot, rng) {
+      var startCell = getClosestCell(rng.startContainer, isRoot);
+      var endCell = getClosestCell(rng.endContainer, isRoot);
+      return rng.collapsed ? Option.none() : lift2(startCell, endCell, tableCellRng).fold(function () {
+        return startCell.fold(function () {
+          return endCell.bind(function (endCell) {
+            return getClosestTable(endCell, isRoot).bind(function (table) {
+              return head(getTableCells(table)).map(function (startCell) {
+                return tableCellRng(startCell, endCell);
+              });
+            });
+          });
+        }, function (startCell) {
+          return getClosestTable(startCell, isRoot).bind(function (table) {
+            return last(getTableCells(table)).map(function (endCell) {
+              return tableCellRng(startCell, endCell);
+            });
+          });
+        });
+      }, function (cellRng) {
+        return isWithinSameTable(isRoot, cellRng) ? Option.none() : getCellRangeFromStartTable(cellRng, isRoot);
+      });
+    };
+    var isWithinSameTable = function (isRoot, cellRng) {
+      return getTableFromCellRng(cellRng, isRoot).isSome();
+    };
+    var getTableSelectionFromCellRng = function (cellRng, isRoot) {
+      return getTableFromCellRng(cellRng, isRoot).map(function (table) {
+        return tableSelection(cellRng, table, getTableCells(table));
+      });
+    };
+    var getTableSelection = function (optCellRng, rng, isRoot) {
+      return optCellRng.filter(function (cellRng) {
+        return isExpandedCellRng(cellRng) && isWithinSameTable(isRoot, cellRng);
+      }).orThunk(function () {
+        return partialSelection(isRoot, rng);
+      }).bind(function (cRng) {
+        return getTableSelectionFromCellRng(cRng, isRoot);
+      });
+    };
+    var getCellIndex = function (cells, cell) {
+      return findIndex(cells, function (x) {
+        return eq$2(x, cell);
+      });
+    };
+    var getSelectedCells = function (tableSelection) {
+      return lift2(getCellIndex(tableSelection.cells, tableSelection.rng.start), getCellIndex(tableSelection.cells, tableSelection.rng.end), function (startIndex, endIndex) {
+        return tableSelection.cells.slice(startIndex, endIndex + 1);
+      });
+    };
+    var isSingleCellTableContentSelected = function (optCellRng, rng, isRoot) {
+      return optCellRng.filter(function (cellRng) {
+        return isSingleCellTable(cellRng, isRoot) && hasAllContentsSelected(cellRng.start, rng);
+      }).map(function (cellRng) {
+        return cellRng.start;
+      });
+    };
+    var getAction = function (tableSelection) {
+      return getSelectedCells(tableSelection).map(function (selected) {
+        var cells = tableSelection.cells;
+        return selected.length === cells.length ? deleteAction.removeTable(tableSelection.table) : deleteAction.emptyCells(selected);
+      });
+    };
+    var getActionFromRange = function (root, rng) {
+      var isRoot = isRootFromElement(root);
+      var optCellRng = getCellRng(rng, isRoot);
+      return isSingleCellTableContentSelected(optCellRng, rng, isRoot).map(function (cell) {
+        return deleteAction.deleteCellSelection(rng, cell);
+      }).orThunk(function () {
+        return getTableSelection(optCellRng, rng, isRoot).bind(getAction);
+      });
+    };
+
+    var freefallRtl = function (root) {
+      var child = isComment(root) ? prevSibling(root) : lastChild(root);
+      return child.bind(freefallRtl).orThunk(function () {
+        return Option.some(root);
+      });
+    };
+    var emptyCells = function (editor, cells) {
+      each(cells, fillWithPaddingBr);
+      editor.selection.setCursorLocation(cells[0].dom(), 0);
+      return true;
+    };
+    var deleteCellContents = function (editor, rng, cell) {
+      rng.deleteContents();
+      var lastNode = freefallRtl(cell).getOr(cell);
+      var lastBlock = Element.fromDom(editor.dom.getParent(lastNode.dom(), editor.dom.isBlock));
+      if (isEmpty$1(lastBlock)) {
+        fillWithPaddingBr(lastBlock);
+        editor.selection.setCursorLocation(lastBlock.dom(), 0);
+      }
+      if (!eq$2(cell, lastBlock)) {
+        var additionalCleanupNodes = parent(lastBlock).is(cell) ? [] : siblings(lastBlock);
+        each(additionalCleanupNodes.concat(children(cell)), function (node) {
+          if (!eq$2(node, lastBlock) && !contains$2(node, lastBlock)) {
+            remove(node);
+          }
+        });
+      }
+      return true;
+    };
+    var deleteTableElement = function (editor, table) {
+      deleteElement(editor, false, table);
+      return true;
+    };
+    var deleteCellRange = function (editor, rootElm, rng) {
+      return getActionFromRange(rootElm, rng).map(function (action) {
+        return action.fold(curry(deleteTableElement, editor), curry(emptyCells, editor), curry(deleteCellContents, editor));
+      });
+    };
+    var deleteCaptionRange = function (editor, caption) {
+      return emptyElement(editor, caption);
+    };
+    var deleteTableRange = function (editor, rootElm, rng, startElm) {
+      return getParentCaption(rootElm, startElm).fold(function () {
+        return deleteCellRange(editor, rootElm, rng);
+      }, function (caption) {
+        return deleteCaptionRange(editor, caption);
+      }).getOr(false);
+    };
+    var deleteRange = function (editor, startElm) {
+      var rootNode = Element.fromDom(editor.getBody());
+      var rng = editor.selection.getRng();
+      var selectedCells = getCellsFromEditor(editor);
+      return selectedCells.length !== 0 ? emptyCells(editor, selectedCells) : deleteTableRange(editor, rootNode, rng, startElm);
+    };
+    var getParentCell = function (rootElm, elm) {
+      return find(parentsAndSelf(elm, rootElm), isTableCell);
+    };
+    var getParentCaption = function (rootElm, elm) {
+      return find(parentsAndSelf(elm, rootElm), function (elm) {
+        return name(elm) === 'caption';
+      });
+    };
+    var deleteBetweenCells = function (editor, rootElm, forward, fromCell, from) {
+      return navigate(forward, editor.getBody(), from).bind(function (to) {
+        return getParentCell(rootElm, Element.fromDom(to.getNode())).map(function (toCell) {
+          return eq$2(toCell, fromCell) === false;
+        });
+      });
+    };
+    var emptyElement = function (editor, elm) {
+      fillWithPaddingBr(elm);
+      editor.selection.setCursorLocation(elm.dom(), 0);
+      return Option.some(true);
+    };
+    var isDeleteOfLastCharPos = function (fromCaption, forward, from, to) {
+      return firstPositionIn(fromCaption.dom()).bind(function (first) {
+        return lastPositionIn(fromCaption.dom()).map(function (last) {
+          return forward ? from.isEqual(first) && to.isEqual(last) : from.isEqual(last) && to.isEqual(first);
+        });
+      }).getOr(true);
+    };
+    var emptyCaretCaption = function (editor, elm) {
+      return emptyElement(editor, elm);
+    };
+    var validateCaretCaption = function (rootElm, fromCaption, to) {
+      return getParentCaption(rootElm, Element.fromDom(to.getNode())).map(function (toCaption) {
+        return eq$2(toCaption, fromCaption) === false;
+      });
+    };
+    var deleteCaretInsideCaption = function (editor, rootElm, forward, fromCaption, from) {
+      return navigate(forward, editor.getBody(), from).bind(function (to) {
+        return isDeleteOfLastCharPos(fromCaption, forward, from, to) ? emptyCaretCaption(editor, fromCaption) : validateCaretCaption(rootElm, fromCaption, to);
+      }).or(Option.some(true));
+    };
+    var deleteCaretCells = function (editor, forward, rootElm, startElm) {
+      var from = CaretPosition$1.fromRangeStart(editor.selection.getRng());
+      return getParentCell(rootElm, startElm).bind(function (fromCell) {
+        return isEmpty$1(fromCell) ? emptyElement(editor, fromCell) : deleteBetweenCells(editor, rootElm, forward, fromCell, from);
+      }).getOr(false);
+    };
+    var deleteCaretCaption = function (editor, forward, rootElm, fromCaption) {
+      var from = CaretPosition$1.fromRangeStart(editor.selection.getRng());
+      return isEmpty$1(fromCaption) ? emptyElement(editor, fromCaption) : deleteCaretInsideCaption(editor, rootElm, forward, fromCaption, from);
+    };
+    var isNearTable = function (forward, pos) {
+      return forward ? isBeforeTable(pos) : isAfterTable(pos);
+    };
+    var isBeforeOrAfterTable = function (editor, forward) {
+      var fromPos = CaretPosition$1.fromRangeStart(editor.selection.getRng());
+      return isNearTable(forward, fromPos) || fromPosition(forward, editor.getBody(), fromPos).map(function (pos) {
+        return isNearTable(forward, pos);
+      }).getOr(false);
+    };
+    var deleteCaret = function (editor, forward, startElm) {
+      var rootElm = Element.fromDom(editor.getBody());
+      return getParentCaption(rootElm, startElm).fold(function () {
+        return deleteCaretCells(editor, forward, rootElm, startElm) || isBeforeOrAfterTable(editor, forward);
+      }, function (fromCaption) {
+        return deleteCaretCaption(editor, forward, rootElm, fromCaption).getOr(false);
+      });
+    };
+    var backspaceDelete = function (editor, forward) {
+      var startElm = Element.fromDom(editor.selection.getStart(true));
+      var cells = getCellsFromEditor(editor);
+      return editor.selection.isCollapsed() && cells.length === 0 ? deleteCaret(editor, forward, startElm) : deleteRange(editor, startElm);
+    };
+
+    var createRange$1 = function (sc, so, ec, eo) {
+      var rng = domGlobals.document.createRange();
+      rng.setStart(sc, so);
+      rng.setEnd(ec, eo);
+      return rng;
+    };
+    var normalizeBlockSelectionRange = function (rng) {
+      var startPos = CaretPosition$1.fromRangeStart(rng);
+      var endPos = CaretPosition$1.fromRangeEnd(rng);
+      var rootNode = rng.commonAncestorContainer;
+      return fromPosition(false, rootNode, endPos).map(function (newEndPos) {
+        if (!isInSameBlock(startPos, endPos, rootNode) && isInSameBlock(startPos, newEndPos, rootNode)) {
+          return createRange$1(startPos.container(), startPos.offset(), newEndPos.container(), newEndPos.offset());
+        } else {
+          return rng;
+        }
+      }).getOr(rng);
+    };
+    var normalize$1 = function (rng) {
+      return rng.collapsed ? rng : normalizeBlockSelectionRange(rng);
+    };
+
+    var hasOnlyOneChild = function (node) {
+      return node.firstChild && node.firstChild === node.lastChild;
+    };
+    var isPaddingNode = function (node) {
+      return node.name === 'br' || node.value === nbsp;
+    };
+    var isPaddedEmptyBlock = function (schema, node) {
+      var blockElements = schema.getBlockElements();
+      return blockElements[node.name] && hasOnlyOneChild(node) && isPaddingNode(node.firstChild);
+    };
+    var isEmptyFragmentElement = function (schema, node) {
+      var nonEmptyElements = schema.getNonEmptyElements();
+      return node && (node.isEmpty(nonEmptyElements) || isPaddedEmptyBlock(schema, node));
+    };
+    var isListFragment = function (schema, fragment) {
+      var firstChild = fragment.firstChild;
+      var lastChild = fragment.lastChild;
+      if (firstChild && firstChild.name === 'meta') {
+        firstChild = firstChild.next;
+      }
+      if (lastChild && lastChild.attr('id') === 'mce_marker') {
+        lastChild = lastChild.prev;
+      }
+      if (isEmptyFragmentElement(schema, lastChild)) {
+        lastChild = lastChild.prev;
+      }
+      if (!firstChild || firstChild !== lastChild) {
+        return false;
+      }
+      return firstChild.name === 'ul' || firstChild.name === 'ol';
+    };
+    var cleanupDomFragment = function (domFragment) {
+      var firstChild = domFragment.firstChild;
+      var lastChild = domFragment.lastChild;
+      if (firstChild && firstChild.nodeName === 'META') {
+        firstChild.parentNode.removeChild(firstChild);
+      }
+      if (lastChild && lastChild.id === 'mce_marker') {
+        lastChild.parentNode.removeChild(lastChild);
+      }
+      return domFragment;
+    };
+    var toDomFragment = function (dom, serializer, fragment) {
+      var html = serializer.serialize(fragment);
+      var domFragment = dom.createFragment(html);
+      return cleanupDomFragment(domFragment);
+    };
+    var listItems$1 = function (elm) {
+      return Tools.grep(elm.childNodes, function (child) {
+        return child.nodeName === 'LI';
+      });
+    };
+    var isPadding = function (node) {
+      return node.data === nbsp || isBr(node);
+    };
+    var isListItemPadded = function (node) {
+      return node && node.firstChild && node.firstChild === node.lastChild && isPadding(node.firstChild);
+    };
+    var isEmptyOrPadded = function (elm) {
+      return !elm.firstChild || isListItemPadded(elm);
+    };
+    var trimListItems = function (elms) {
+      return elms.length > 0 && isEmptyOrPadded(elms[elms.length - 1]) ? elms.slice(0, -1) : elms;
+    };
+    var getParentLi = function (dom, node) {
+      var parentBlock = dom.getParent(node, dom.isBlock);
+      return parentBlock && parentBlock.nodeName === 'LI' ? parentBlock : null;
+    };
+    var isParentBlockLi = function (dom, node) {
+      return !!getParentLi(dom, node);
+    };
+    var getSplit = function (parentNode, rng) {
+      var beforeRng = rng.cloneRange();
+      var afterRng = rng.cloneRange();
+      beforeRng.setStartBefore(parentNode);
+      afterRng.setEndAfter(parentNode);
+      return [
+        beforeRng.cloneContents(),
+        afterRng.cloneContents()
+      ];
+    };
+    var findFirstIn = function (node, rootNode) {
+      var caretPos = CaretPosition$1.before(node);
+      var caretWalker = CaretWalker(rootNode);
+      var newCaretPos = caretWalker.next(caretPos);
+      return newCaretPos ? newCaretPos.toRange() : null;
+    };
+    var findLastOf = function (node, rootNode) {
+      var caretPos = CaretPosition$1.after(node);
+      var caretWalker = CaretWalker(rootNode);
+      var newCaretPos = caretWalker.prev(caretPos);
+      return newCaretPos ? newCaretPos.toRange() : null;
+    };
+    var insertMiddle = function (target, elms, rootNode, rng) {
+      var parts = getSplit(target, rng);
+      var parentElm = target.parentNode;
+      parentElm.insertBefore(parts[0], target);
+      Tools.each(elms, function (li) {
+        parentElm.insertBefore(li, target);
+      });
+      parentElm.insertBefore(parts[1], target);
+      parentElm.removeChild(target);
+      return findLastOf(elms[elms.length - 1], rootNode);
+    };
+    var insertBefore = function (target, elms, rootNode) {
+      var parentElm = target.parentNode;
+      Tools.each(elms, function (elm) {
+        parentElm.insertBefore(elm, target);
+      });
+      return findFirstIn(target, rootNode);
+    };
+    var insertAfter = function (target, elms, rootNode, dom) {
+      dom.insertAfter(elms.reverse(), target);
+      return findLastOf(elms[0], rootNode);
+    };
+    var insertAtCaret = function (serializer, dom, rng, fragment) {
+      var domFragment = toDomFragment(dom, serializer, fragment);
+      var liTarget = getParentLi(dom, rng.startContainer);
+      var liElms = trimListItems(listItems$1(domFragment.firstChild));
+      var BEGINNING = 1, END = 2;
+      var rootNode = dom.getRoot();
+      var isAt = function (location) {
+        var caretPos = CaretPosition$1.fromRangeStart(rng);
+        var caretWalker = CaretWalker(dom.getRoot());
+        var newPos = location === BEGINNING ? caretWalker.prev(caretPos) : caretWalker.next(caretPos);
+        return newPos ? getParentLi(dom, newPos.getNode()) !== liTarget : true;
+      };
+      if (isAt(BEGINNING)) {
+        return insertBefore(liTarget, liElms, rootNode);
+      } else if (isAt(END)) {
+        return insertAfter(liTarget, liElms, rootNode, dom);
+      }
+      return insertMiddle(liTarget, liElms, rootNode, rng);
+    };
+
+    var isAfterNbsp = function (container, offset) {
+      return isText$1(container) && container.nodeValue[offset - 1] === nbsp;
+    };
+    var trimOrPadLeftRight = function (rng, html) {
+      var container, offset;
+      container = rng.startContainer;
+      offset = rng.startOffset;
+      var hasSiblingText = function (siblingName) {
+        return container[siblingName] && container[siblingName].nodeType === 3;
+      };
+      if (container.nodeType === 3) {
+        if (offset > 0) {
+          html = html.replace(/^&nbsp;/, ' ');
+        } else if (!hasSiblingText('previousSibling')) {
+          html = html.replace(/^ /, '&nbsp;');
+        }
+        if (offset < container.length) {
+          html = html.replace(/&nbsp;(<br>|)$/, ' ');
+        } else if (!hasSiblingText('nextSibling')) {
+          html = html.replace(/(&nbsp;| )(<br>|)$/, '&nbsp;');
+        }
+      }
+      return html;
+    };
+    var trimNbspAfterDeleteAndPadValue = function (rng, value) {
+      var container, offset;
+      container = rng.startContainer;
+      offset = rng.startOffset;
+      if (container.nodeType === 3 && rng.collapsed) {
+        if (container.data[offset] === nbsp) {
+          container.deleteData(offset, 1);
+          if (!/[\u00a0| ]$/.test(value)) {
+            value += ' ';
+          }
+        } else if (container.data[offset - 1] === nbsp) {
+          container.deleteData(offset - 1, 1);
+          if (!/[\u00a0| ]$/.test(value)) {
+            value = ' ' + value;
+          }
+        }
+      }
+      return value;
+    };
+
+    var isTableCell$2 = matchNodeNames([
+      'td',
+      'th'
+    ]);
+    var isTableCellContentSelected = function (dom, rng, cell) {
+      if (cell !== null) {
+        var endCell = dom.getParent(rng.endContainer, isTableCell$2);
+        return cell === endCell && hasAllContentsSelected(Element.fromDom(cell), rng);
+      } else {
+        return false;
+      }
+    };
+    var selectionSetContent = function (editor, content) {
+      var rng = editor.selection.getRng();
+      var container = rng.startContainer;
+      var offset = rng.startOffset;
+      if (rng.collapsed && isAfterNbsp(container, offset) && isText$1(container)) {
+        container.insertData(offset - 1, ' ');
+        container.deleteData(offset, 1);
+        rng.setStart(container, offset);
+        rng.setEnd(container, offset);
+        editor.selection.setRng(rng);
+      }
+      editor.selection.setContent(content);
+    };
+    var validInsertion = function (editor, value, parentNode) {
+      if (parentNode.getAttribute('data-mce-bogus') === 'all') {
+        parentNode.parentNode.insertBefore(editor.dom.createFragment(value), parentNode);
+      } else {
+        var node = parentNode.firstChild;
+        var node2 = parentNode.lastChild;
+        if (!node || node === node2 && node.nodeName === 'BR') {
+          editor.dom.setHTML(parentNode, value);
+        } else {
+          selectionSetContent(editor, value);
+        }
+      }
+    };
+    var trimBrsFromTableCell = function (dom, elm) {
+      Option.from(dom.getParent(elm, 'td,th')).map(Element.fromDom).each(trimBlockTrailingBr);
+    };
+    var reduceInlineTextElements = function (editor, merge) {
+      var textInlineElements = editor.schema.getTextInlineElements();
+      var dom = editor.dom;
+      if (merge) {
+        var root_1 = editor.getBody(), elementUtils_1 = new ElementUtils(dom);
+        Tools.each(dom.select('*[data-mce-fragment]'), function (node) {
+          for (var testNode = node.parentNode; testNode && testNode !== root_1; testNode = testNode.parentNode) {
+            if (textInlineElements[node.nodeName.toLowerCase()] && elementUtils_1.compare(testNode, node)) {
+              dom.remove(node, true);
+            }
+          }
+        });
+      }
+    };
+    var markFragmentElements = function (fragment) {
+      var node = fragment;
+      while (node = node.walk()) {
+        if (node.type === 1) {
+          node.attr('data-mce-fragment', '1');
+        }
+      }
+    };
+    var unmarkFragmentElements = function (elm) {
+      Tools.each(elm.getElementsByTagName('*'), function (elm) {
+        elm.removeAttribute('data-mce-fragment');
+      });
+    };
+    var isPartOfFragment = function (node) {
+      return !!node.getAttribute('data-mce-fragment');
+    };
+    var canHaveChildren = function (editor, node) {
+      return node && !editor.schema.getShortEndedElements()[node.nodeName];
+    };
+    var moveSelectionToMarker = function (editor, marker) {
+      var parentEditableFalseElm, parentBlock, nextRng;
+      var dom = editor.dom, selection = editor.selection;
+      var node, node2;
+      var getContentEditableFalseParent = function (node) {
+        var root = editor.getBody();
+        for (; node && node !== root; node = node.parentNode) {
+          if (editor.dom.getContentEditable(node) === 'false') {
+            return node;
+          }
+        }
+        return null;
+      };
+      if (!marker) {
+        return;
+      }
+      editor.selection.scrollIntoView(marker);
+      parentEditableFalseElm = getContentEditableFalseParent(marker);
+      if (parentEditableFalseElm) {
+        dom.remove(marker);
+        selection.select(parentEditableFalseElm);
+        return;
+      }
+      var rng = dom.createRng();
+      node = marker.previousSibling;
+      if (node && node.nodeType === 3) {
+        rng.setStart(node, node.nodeValue.length);
+        if (!Env.ie) {
+          node2 = marker.nextSibling;
+          if (node2 && node2.nodeType === 3) {
+            node.appendData(node2.data);
+            node2.parentNode.removeChild(node2);
+          }
+        }
+      } else {
+        rng.setStartBefore(marker);
+        rng.setEndBefore(marker);
+      }
+      var findNextCaretRng = function (rng) {
+        var caretPos = CaretPosition$1.fromRangeStart(rng);
+        var caretWalker = CaretWalker(editor.getBody());
+        caretPos = caretWalker.next(caretPos);
+        if (caretPos) {
+          return caretPos.toRange();
+        }
+      };
+      parentBlock = dom.getParent(marker, dom.isBlock);
+      dom.remove(marker);
+      if (parentBlock && dom.isEmpty(parentBlock)) {
+        editor.$(parentBlock).empty();
+        rng.setStart(parentBlock, 0);
+        rng.setEnd(parentBlock, 0);
+        if (!isTableCell$2(parentBlock) && !isPartOfFragment(parentBlock) && (nextRng = findNextCaretRng(rng))) {
+          rng = nextRng;
+          dom.remove(parentBlock);
+        } else {
+          dom.add(parentBlock, dom.create('br', { 'data-mce-bogus': '1' }));
+        }
+      }
+      selection.setRng(rng);
+    };
+    var deleteSelectedContent = function (editor) {
+      var dom = editor.dom;
+      var rng = normalize$1(editor.selection.getRng());
+      editor.selection.setRng(rng);
+      var startCell = dom.getParent(rng.startContainer, isTableCell$2);
+      if (isTableCellContentSelected(dom, rng, startCell)) {
+        deleteCellContents(editor, rng, Element.fromDom(startCell));
+      } else {
+        editor.getDoc().execCommand('Delete', false, null);
+      }
+    };
+    var insertHtmlAtCaret = function (editor, value, details) {
+      var parser, serializer, parentNode, rootNode, fragment, args;
+      var marker, rng, node, bookmarkHtml, merge;
+      var selection = editor.selection, dom = editor.dom;
+      if (/^ | $/.test(value)) {
+        value = trimOrPadLeftRight(selection.getRng(), value);
+      }
+      parser = editor.parser;
+      merge = details.merge;
+      serializer = Serializer({ validate: editor.settings.validate }, editor.schema);
+      bookmarkHtml = '<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>';
+      args = {
+        content: value,
+        format: 'html',
+        selection: true,
+        paste: details.paste
+      };
+      args = editor.fire('BeforeSetContent', args);
+      if (args.isDefaultPrevented()) {
+        editor.fire('SetContent', {
+          content: args.content,
+          format: 'html',
+          selection: true,
+          paste: details.paste
+        });
+        return;
+      }
+      value = args.content;
+      if (value.indexOf('{$caret}') === -1) {
+        value += '{$caret}';
+      }
+      value = value.replace(/\{\$caret\}/, bookmarkHtml);
+      rng = selection.getRng();
+      var caretElement = rng.startContainer || (rng.parentElement ? rng.parentElement() : null);
+      var body = editor.getBody();
+      if (caretElement === body && selection.isCollapsed()) {
+        if (dom.isBlock(body.firstChild) && canHaveChildren(editor, body.firstChild) && dom.isEmpty(body.firstChild)) {
+          rng = dom.createRng();
+          rng.setStart(body.firstChild, 0);
+          rng.setEnd(body.firstChild, 0);
+          selection.setRng(rng);
+        }
+      }
+      if (!selection.isCollapsed()) {
+        deleteSelectedContent(editor);
+        value = trimNbspAfterDeleteAndPadValue(editor.selection.getRng(), value);
+      }
+      parentNode = selection.getNode();
+      var parserArgs = {
+        context: parentNode.nodeName.toLowerCase(),
+        data: details.data,
+        insert: true
+      };
+      fragment = parser.parse(value, parserArgs);
+      if (details.paste === true && isListFragment(editor.schema, fragment) && isParentBlockLi(dom, parentNode)) {
+        rng = insertAtCaret(serializer, dom, editor.selection.getRng(), fragment);
+        editor.selection.setRng(rng);
+        editor.fire('SetContent', args);
+        return;
+      }
+      markFragmentElements(fragment);
+      node = fragment.lastChild;
+      if (node.attr('id') === 'mce_marker') {
+        marker = node;
+        for (node = node.prev; node; node = node.walk(true)) {
+          if (node.type === 3 || !dom.isBlock(node.name)) {
+            if (editor.schema.isValidChild(node.parent.name, 'span')) {
+              node.parent.insert(marker, node, node.name === 'br');
+            }
+            break;
+          }
+        }
+      }
+      editor._selectionOverrides.showBlockCaretContainer(parentNode);
+      if (!parserArgs.invalid) {
+        value = serializer.serialize(fragment);
+        validInsertion(editor, value, parentNode);
+      } else {
+        selectionSetContent(editor, bookmarkHtml);
+        parentNode = selection.getNode();
+        rootNode = editor.getBody();
+        if (parentNode.nodeType === 9) {
+          parentNode = node = rootNode;
+        } else {
+          node = parentNode;
+        }
+        while (node !== rootNode) {
+          parentNode = node;
+          node = node.parentNode;
+        }
+        value = parentNode === rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode);
+        value = serializer.serialize(parser.parse(value.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i, function () {
+          return serializer.serialize(fragment);
+        })));
+        if (parentNode === rootNode) {
+          dom.setHTML(rootNode, value);
+        } else {
+          dom.setOuterHTML(parentNode, value);
+        }
+      }
+      reduceInlineTextElements(editor, merge);
+      moveSelectionToMarker(editor, dom.get('mce_marker'));
+      unmarkFragmentElements(editor.getBody());
+      trimBrsFromTableCell(editor.dom, editor.selection.getStart());
+      editor.fire('SetContent', args);
+      editor.addVisual();
+    };
+
+    var hasFocus = function (element) {
+      var doc = owner(element).dom();
+      return element.dom() === doc.activeElement;
+    };
+    var active = function (_doc) {
+      var doc = _doc !== undefined ? _doc.dom() : domGlobals.document;
+      return Option.from(doc.activeElement).map(Element.fromDom);
+    };
+    var search = function (element) {
+      return active(owner(element)).filter(function (e) {
+        return element.dom().contains(e.dom());
+      });
+    };
+
+    var create$3 = function (start, soffset, finish, foffset) {
+      return {
+        start: constant(start),
+        soffset: constant(soffset),
+        finish: constant(finish),
+        foffset: constant(foffset)
+      };
+    };
+    var SimRange = { create: create$3 };
+
+    var adt = Adt.generate([
+      { before: ['element'] },
+      {
+        on: [
+          'element',
+          'offset'
+        ]
+      },
+      { after: ['element'] }
+    ]);
+    var cata = function (subject, onBefore, onOn, onAfter) {
+      return subject.fold(onBefore, onOn, onAfter);
+    };
+    var getStart = function (situ) {
+      return situ.fold(identity, identity, identity);
+    };
+    var before$3 = adt.before;
+    var on = adt.on;
+    var after$2 = adt.after;
+    var Situ = {
+      before: before$3,
+      on: on,
+      after: after$2,
+      cata: cata,
+      getStart: getStart
+    };
+
+    var adt$1 = Adt.generate([
+      { domRange: ['rng'] },
+      {
+        relative: [
+          'startSitu',
+          'finishSitu'
+        ]
+      },
+      {
+        exact: [
+          'start',
+          'soffset',
+          'finish',
+          'foffset'
+        ]
+      }
+    ]);
+    var exactFromRange = function (simRange) {
+      return adt$1.exact(simRange.start(), simRange.soffset(), simRange.finish(), simRange.foffset());
+    };
+    var getStart$1 = function (selection) {
+      return selection.match({
+        domRange: function (rng) {
+          return Element.fromDom(rng.startContainer);
+        },
+        relative: function (startSitu, _finishSitu) {
+          return Situ.getStart(startSitu);
+        },
+        exact: function (start, _soffset, _finish, _foffset) {
+          return start;
+        }
+      });
+    };
+    var domRange = adt$1.domRange;
+    var relative = adt$1.relative;
+    var exact = adt$1.exact;
+    var getWin = function (selection) {
+      var start = getStart$1(selection);
+      return defaultView(start);
+    };
+    var range = SimRange.create;
+    var Selection = {
+      domRange: domRange,
+      relative: relative,
+      exact: exact,
+      exactFromRange: exactFromRange,
+      getWin: getWin,
+      range: range
+    };
+
+    var browser$3 = detect$3().browser;
+    var clamp = function (offset, element) {
+      var max = isText(element) ? get$7(element).length : children(element).length + 1;
+      if (offset > max) {
+        return max;
+      } else if (offset < 0) {
+        return 0;
+      }
+      return offset;
+    };
+    var normalizeRng = function (rng) {
+      return Selection.range(rng.start(), clamp(rng.soffset(), rng.start()), rng.finish(), clamp(rng.foffset(), rng.finish()));
+    };
+    var isOrContains = function (root, elm) {
+      return !isRestrictedNode(elm.dom()) && (contains$2(root, elm) || eq$2(root, elm));
+    };
+    var isRngInRoot = function (root) {
+      return function (rng) {
+        return isOrContains(root, rng.start()) && isOrContains(root, rng.finish());
+      };
+    };
+    var shouldStore = function (editor) {
+      return editor.inline === true || browser$3.isIE();
+    };
+    var nativeRangeToSelectionRange = function (r) {
+      return Selection.range(Element.fromDom(r.startContainer), r.startOffset, Element.fromDom(r.endContainer), r.endOffset);
+    };
+    var readRange = function (win) {
+      var selection = win.getSelection();
+      var rng = !selection || selection.rangeCount === 0 ? Option.none() : Option.from(selection.getRangeAt(0));
+      return rng.map(nativeRangeToSelectionRange);
+    };
+    var getBookmark$2 = function (root) {
+      var win = defaultView(root);
+      return readRange(win.dom()).filter(isRngInRoot(root));
+    };
+    var validate = function (root, bookmark) {
+      return Option.from(bookmark).filter(isRngInRoot(root)).map(normalizeRng);
+    };
+    var bookmarkToNativeRng = function (bookmark) {
+      var rng = domGlobals.document.createRange();
+      try {
+        rng.setStart(bookmark.start().dom(), bookmark.soffset());
+        rng.setEnd(bookmark.finish().dom(), bookmark.foffset());
+        return Option.some(rng);
+      } catch (_) {
+        return Option.none();
+      }
+    };
+    var store = function (editor) {
+      var newBookmark = shouldStore(editor) ? getBookmark$2(Element.fromDom(editor.getBody())) : Option.none();
+      editor.bookmark = newBookmark.isSome() ? newBookmark : editor.bookmark;
+    };
+    var storeNative = function (editor, rng) {
+      var root = Element.fromDom(editor.getBody());
+      var range = shouldStore(editor) ? Option.from(rng) : Option.none();
+      var newBookmark = range.map(nativeRangeToSelectionRange).filter(isRngInRoot(root));
+      editor.bookmark = newBookmark.isSome() ? newBookmark : editor.bookmark;
+    };
+    var getRng = function (editor) {
+      var bookmark = editor.bookmark ? editor.bookmark : Option.none();
+      return bookmark.bind(function (x) {
+        return validate(Element.fromDom(editor.getBody()), x);
+      }).bind(bookmarkToNativeRng);
+    };
+    var restore = function (editor) {
+      getRng(editor).each(function (rng) {
+        editor.selection.setRng(rng);
+      });
+    };
+
+    var isEditorUIElement = function (elm) {
+      var className = elm.className.toString();
+      return className.indexOf('tox-') !== -1 || className.indexOf('mce-') !== -1;
+    };
+    var FocusManager = { isEditorUIElement: isEditorUIElement };
+
+    var isManualNodeChange = function (e) {
+      return e.type === 'nodechange' && e.selectionChange;
+    };
+    var registerPageMouseUp = function (editor, throttledStore) {
+      var mouseUpPage = function () {
+        throttledStore.throttle();
+      };
+      DOMUtils$1.DOM.bind(domGlobals.document, 'mouseup', mouseUpPage);
+      editor.on('remove', function () {
+        DOMUtils$1.DOM.unbind(domGlobals.document, 'mouseup', mouseUpPage);
+      });
+    };
+    var registerFocusOut = function (editor) {
+      editor.on('focusout', function () {
+        store(editor);
+      });
+    };
+    var registerMouseUp = function (editor, throttledStore) {
+      editor.on('mouseup touchend', function (_e) {
+        throttledStore.throttle();
+      });
+    };
+    var registerEditorEvents = function (editor, throttledStore) {
+      var browser = detect$3().browser;
+      if (browser.isIE()) {
+        registerFocusOut(editor);
+      } else {
+        registerMouseUp(editor, throttledStore);
+      }
+      editor.on('keyup NodeChange', function (e) {
+        if (!isManualNodeChange(e)) {
+          store(editor);
+        }
+      });
+    };
+    var register = function (editor) {
+      var throttledStore = first(function () {
+        store(editor);
+      }, 0);
+      editor.on('init', function () {
+        if (editor.inline) {
+          registerPageMouseUp(editor, throttledStore);
+        }
+        registerEditorEvents(editor, throttledStore);
+      });
+      editor.on('remove', function () {
+        throttledStore.cancel();
+      });
+    };
+
+    var documentFocusInHandler;
+    var DOM$2 = DOMUtils$1.DOM;
+    var isEditorUIElement$1 = function (elm) {
+      return FocusManager.isEditorUIElement(elm);
+    };
+    var isEditorContentAreaElement = function (elm) {
+      var classList = elm.classList;
+      if (classList !== undefined) {
+        return classList.contains('tox-edit-area') || classList.contains('tox-edit-area__iframe') || classList.contains('mce-content-body');
+      } else {
+        return false;
+      }
+    };
+    var isUIElement = function (editor, elm) {
+      var customSelector = editor ? editor.settings.custom_ui_selector : '';
+      var parent = DOM$2.getParent(elm, function (elm) {
+        return isEditorUIElement$1(elm) || (customSelector ? editor.dom.is(elm, customSelector) : false);
+      });
+      return parent !== null;
+    };
+    var getActiveElement = function () {
+      try {
+        return domGlobals.document.activeElement;
+      } catch (ex) {
+        return domGlobals.document.body;
+      }
+    };
+    var registerEvents = function (editorManager, e) {
+      var editor = e.editor;
+      register(editor);
+      editor.on('focusin', function () {
+        var self = this;
+        var focusedEditor = editorManager.focusedEditor;
+        if (focusedEditor !== self) {
+          if (focusedEditor) {
+            focusedEditor.fire('blur', { focusedEditor: self });
+          }
+          editorManager.setActive(self);
+          editorManager.focusedEditor = self;
+          self.fire('focus', { blurredEditor: focusedEditor });
+          self.focus(true);
+        }
+      });
+      editor.on('focusout', function () {
+        var self = this;
+        Delay.setEditorTimeout(self, function () {
+          var focusedEditor = editorManager.focusedEditor;
+          if (!isUIElement(self, getActiveElement()) && focusedEditor === self) {
+            self.fire('blur', { focusedEditor: null });
+            editorManager.focusedEditor = null;
+          }
+        });
+      });
+      if (!documentFocusInHandler) {
+        documentFocusInHandler = function (e) {
+          var activeEditor = editorManager.activeEditor;
+          var target;
+          target = e.target;
+          if (activeEditor && target.ownerDocument === domGlobals.document) {
+            if (target !== domGlobals.document.body && !isUIElement(activeEditor, target) && editorManager.focusedEditor === activeEditor) {
+              activeEditor.fire('blur', { focusedEditor: null });
+              editorManager.focusedEditor = null;
+            }
+          }
+        };
+        DOM$2.bind(domGlobals.document, 'focusin', documentFocusInHandler);
+      }
+    };
+    var unregisterDocumentEvents = function (editorManager, e) {
+      if (editorManager.focusedEditor === e.editor) {
+        editorManager.focusedEditor = null;
+      }
+      if (!editorManager.activeEditor) {
+        DOM$2.unbind(domGlobals.document, 'focusin', documentFocusInHandler);
+        documentFocusInHandler = null;
+      }
+    };
+    var setup$2 = function (editorManager) {
+      editorManager.on('AddEditor', curry(registerEvents, editorManager));
+      editorManager.on('RemoveEditor', curry(unregisterDocumentEvents, editorManager));
+    };
+
+    var getContentEditableHost = function (editor, node) {
+      return editor.dom.getParent(node, function (node) {
+        return editor.dom.getContentEditable(node) === 'true';
+      });
+    };
+    var getCollapsedNode = function (rng) {
+      return rng.collapsed ? Option.from(getNode(rng.startContainer, rng.startOffset)).map(Element.fromDom) : Option.none();
+    };
+    var getFocusInElement = function (root, rng) {
+      return getCollapsedNode(rng).bind(function (node) {
+        if (isTableSection(node)) {
+          return Option.some(node);
+        } else if (contains$2(root, node) === false) {
+          return Option.some(root);
+        } else {
+          return Option.none();
+        }
+      });
+    };
+    var normalizeSelection = function (editor, rng) {
+      getFocusInElement(Element.fromDom(editor.getBody()), rng).bind(function (elm) {
+        return firstPositionIn(elm.dom());
+      }).fold(function () {
+        editor.selection.normalize();
+        return;
+      }, function (caretPos) {
+        return editor.selection.setRng(caretPos.toRange());
+      });
+    };
+    var focusBody = function (body) {
+      if (body.setActive) {
+        try {
+          body.setActive();
+        } catch (ex) {
+          body.focus();
+        }
+      } else {
+        body.focus();
+      }
+    };
+    var hasElementFocus = function (elm) {
+      return hasFocus(elm) || search(elm).isSome();
+    };
+    var hasIframeFocus = function (editor) {
+      return editor.iframeElement && hasFocus(Element.fromDom(editor.iframeElement));
+    };
+    var hasInlineFocus = function (editor) {
+      var rawBody = editor.getBody();
+      return rawBody && hasElementFocus(Element.fromDom(rawBody));
+    };
+    var hasUiFocus = function (editor) {
+      return active().filter(function (elem) {
+        return !isEditorContentAreaElement(elem.dom()) && isUIElement(editor, elem.dom());
+      }).isSome();
+    };
+    var hasFocus$1 = function (editor) {
+      return editor.inline ? hasInlineFocus(editor) : hasIframeFocus(editor);
+    };
+    var hasEditorOrUiFocus = function (editor) {
+      return hasFocus$1(editor) || hasUiFocus(editor);
+    };
+    var focusEditor = function (editor) {
+      var selection = editor.selection;
+      var body = editor.getBody();
+      var rng = selection.getRng();
+      editor.quirks.refreshContentEditable();
+      if (editor.bookmark !== undefined && hasFocus$1(editor) === false) {
+        getRng(editor).each(function (bookmarkRng) {
+          editor.selection.setRng(bookmarkRng);
+          rng = bookmarkRng;
+        });
+      }
+      var contentEditableHost = getContentEditableHost(editor, selection.getNode());
+      if (editor.$.contains(body, contentEditableHost)) {
+        focusBody(contentEditableHost);
+        normalizeSelection(editor, rng);
+        activateEditor(editor);
+        return;
+      }
+      if (!editor.inline) {
+        if (!Env.opera) {
+          focusBody(body);
+        }
+        editor.getWin().focus();
+      }
+      if (Env.gecko || editor.inline) {
+        focusBody(body);
+        normalizeSelection(editor, rng);
+      }
+      activateEditor(editor);
+    };
+    var activateEditor = function (editor) {
+      return editor.editorManager.setActive(editor);
+    };
+    var focus = function (editor, skipFocus) {
+      if (editor.removed) {
+        return;
+      }
+      skipFocus ? activateEditor(editor) : focusEditor(editor);
+    };
+
+    var traverse = function (node, fn) {
+      fn(node);
+      if (node.firstChild) {
+        traverse(node.firstChild, fn);
+      }
+      if (node.next) {
+        traverse(node.next, fn);
+      }
+    };
+    var findMatchingNodes = function (nodeFilters, attributeFilters, node) {
+      var nodeMatches = {};
+      var attrMatches = {};
+      var matches = [];
+      if (node.firstChild) {
+        traverse(node.firstChild, function (node) {
+          each(nodeFilters, function (filter) {
+            if (filter.name === node.name) {
+              if (nodeMatches[filter.name]) {
+                nodeMatches[filter.name].nodes.push(node);
+              } else {
+                nodeMatches[filter.name] = {
+                  filter: filter,
+                  nodes: [node]
+                };
+              }
+            }
+          });
+          each(attributeFilters, function (filter) {
+            if (typeof node.attr(filter.name) === 'string') {
+              if (attrMatches[filter.name]) {
+                attrMatches[filter.name].nodes.push(node);
+              } else {
+                attrMatches[filter.name] = {
+                  filter: filter,
+                  nodes: [node]
+                };
+              }
+            }
+          });
+        });
+      }
+      for (var name_1 in nodeMatches) {
+        if (nodeMatches.hasOwnProperty(name_1)) {
+          matches.push(nodeMatches[name_1]);
+        }
+      }
+      for (var name_2 in attrMatches) {
+        if (attrMatches.hasOwnProperty(name_2)) {
+          matches.push(attrMatches[name_2]);
+        }
+      }
+      return matches;
+    };
+    var filter$3 = function (nodeFilters, attributeFilters, node) {
+      var matches = findMatchingNodes(nodeFilters, attributeFilters, node);
+      each(matches, function (match) {
+        each(match.filter.callbacks, function (callback) {
+          callback(match.nodes, match.filter.name, {});
+        });
+      });
+    };
+
+    var defaultFormat = 'html';
+    var isTreeNode = function (content) {
+      return content instanceof Node;
+    };
+    var moveSelection = function (editor) {
+      if (hasFocus$1(editor)) {
+        firstPositionIn(editor.getBody()).each(function (pos) {
+          var node = pos.getNode();
+          var caretPos = isTable(node) ? firstPositionIn(node).getOr(pos) : pos;
+          editor.selection.setRng(caretPos.toRange());
+        });
+      }
+    };
+    var setEditorHtml = function (editor, html) {
+      editor.dom.setHTML(editor.getBody(), html);
+      moveSelection(editor);
+    };
+    var setContentString = function (editor, body, content, args) {
+      var forcedRootBlockName, padd;
+      if (content.length === 0 || /^\s+$/.test(content)) {
+        padd = '<br data-mce-bogus="1">';
+        if (body.nodeName === 'TABLE') {
+          content = '<tr><td>' + padd + '</td></tr>';
+        } else if (/^(UL|OL)$/.test(body.nodeName)) {
+          content = '<li>' + padd + '</li>';
+        }
+        forcedRootBlockName = getForcedRootBlock(editor);
+        if (forcedRootBlockName && editor.schema.isValidChild(body.nodeName.toLowerCase(), forcedRootBlockName.toLowerCase())) {
+          content = padd;
+          content = editor.dom.createHTML(forcedRootBlockName, editor.settings.forced_root_block_attrs, content);
+        } else if (!content) {
+          content = '<br data-mce-bogus="1">';
+        }
+        setEditorHtml(editor, content);
+        editor.fire('SetContent', args);
+      } else {
+        if (args.format !== 'raw') {
+          content = Serializer({ validate: editor.validate }, editor.schema).serialize(editor.parser.parse(content, {
+            isRootContent: true,
+            insert: true
+          }));
+        }
+        args.content = isWsPreserveElement(Element.fromDom(body)) ? content : Tools.trim(content);
+        setEditorHtml(editor, args.content);
+        if (!args.no_events) {
+          editor.fire('SetContent', args);
+        }
+      }
+      return args.content;
+    };
+    var setContentTree = function (editor, body, content, args) {
+      filter$3(editor.parser.getNodeFilters(), editor.parser.getAttributeFilters(), content);
+      var html = Serializer({ validate: editor.validate }, editor.schema).serialize(content);
+      args.content = isWsPreserveElement(Element.fromDom(body)) ? html : Tools.trim(html);
+      setEditorHtml(editor, args.content);
+      if (!args.no_events) {
+        editor.fire('SetContent', args);
+      }
+      return content;
+    };
+    var setContentInternal = function (editor, content, args) {
+      args.format = args.format ? args.format : defaultFormat;
+      args.set = true;
+      args.content = isTreeNode(content) ? '' : content;
+      if (!isTreeNode(content) && !args.no_events) {
+        editor.fire('BeforeSetContent', args);
+        content = args.content;
+      }
+      return Option.from(editor.getBody()).fold(constant(content), function (body) {
+        return isTreeNode(content) ? setContentTree(editor, body, content, args) : setContentString(editor, body, content, args);
+      });
+    };
+
+    var splitText = function (node, offset) {
+      return node.splitText(offset);
+    };
+    var split$1 = function (rng) {
+      var startContainer = rng.startContainer, startOffset = rng.startOffset, endContainer = rng.endContainer, endOffset = rng.endOffset;
+      if (startContainer === endContainer && isText$1(startContainer)) {
+        if (startOffset > 0 && startOffset < startContainer.nodeValue.length) {
+          endContainer = splitText(startContainer, startOffset);
+          startContainer = endContainer.previousSibling;
+          if (endOffset > startOffset) {
+            endOffset = endOffset - startOffset;
+            startContainer = endContainer = splitText(endContainer, endOffset).previousSibling;
+            endOffset = endContainer.nodeValue.length;
+            startOffset = 0;
+          } else {
+            endOffset = 0;
+          }
+        }
+      } else {
+        if (isText$1(startContainer) && startOffset > 0 && startOffset < startContainer.nodeValue.length) {
+          startContainer = splitText(startContainer, startOffset);
+          startOffset = 0;
+        }
+        if (isText$1(endContainer) && endOffset > 0 && endOffset < endContainer.nodeValue.length) {
+          endContainer = splitText(endContainer, endOffset).previousSibling;
+          endOffset = endContainer.nodeValue.length;
+        }
+      }
+      return {
+        startContainer: startContainer,
+        startOffset: startOffset,
+        endContainer: endContainer,
+        endOffset: endOffset
+      };
+    };
+
+    var isEq$1 = isEq;
+    var matchesUnInheritedFormatSelector = function (ed, node, name) {
+      var formatList = ed.formatter.get(name);
+      if (formatList) {
+        for (var i = 0; i < formatList.length; i++) {
+          if (formatList[i].inherit === false && ed.dom.is(node, formatList[i].selector)) {
+            return true;
+          }
+        }
+      }
+      return false;
+    };
+    var matchParents = function (editor, node, name, vars) {
+      var root = editor.dom.getRoot();
+      if (node === root) {
+        return false;
+      }
+      node = editor.dom.getParent(node, function (node) {
+        if (matchesUnInheritedFormatSelector(editor, node, name)) {
+          return true;
+        }
+        return node.parentNode === root || !!matchNode(editor, node, name, vars, true);
+      });
+      return matchNode(editor, node, name, vars);
+    };
+    var matchName = function (dom, node, format) {
+      if (isEq$1(node, format.inline)) {
+        return true;
+      }
+      if (isEq$1(node, format.block)) {
+        return true;
+      }
+      if (format.selector) {
+        return node.nodeType === 1 && dom.is(node, format.selector);
+      }
+    };
+    var matchItems = function (dom, node, format, itemName, similar, vars) {
+      var key, value;
+      var items = format[itemName];
+      var i;
+      if (format.onmatch) {
+        return format.onmatch(node, format, itemName);
+      }
+      if (items) {
+        if (typeof items.length === 'undefined') {
+          for (key in items) {
+            if (items.hasOwnProperty(key)) {
+              if (itemName === 'attributes') {
+                value = dom.getAttrib(node, key);
+              } else {
+                value = getStyle(dom, node, key);
+              }
+              if (similar && !value && !format.exact) {
+                return;
+              }
+              if ((!similar || format.exact) && !isEq$1(value, normalizeStyleValue(dom, replaceVars(items[key], vars), key))) {
+                return;
+              }
+            }
+          }
+        } else {
+          for (i = 0; i < items.length; i++) {
+            if (itemName === 'attributes' ? dom.getAttrib(node, items[i]) : getStyle(dom, node, items[i])) {
+              return format;
+            }
+          }
+        }
+      }
+      return format;
+    };
+    var matchNode = function (ed, node, name, vars, similar) {
+      var formatList = ed.formatter.get(name);
+      var format, i, x, classes;
+      var dom = ed.dom;
+      if (formatList && node) {
+        for (i = 0; i < formatList.length; i++) {
+          format = formatList[i];
+          if (matchName(ed.dom, node, format) && matchItems(dom, node, format, 'attributes', similar, vars) && matchItems(dom, node, format, 'styles', similar, vars)) {
+            if (classes = format.classes) {
+              for (x = 0; x < classes.length; x++) {
+                if (!ed.dom.hasClass(node, classes[x])) {
+                  return;
+                }
+              }
+            }
+            return format;
+          }
+        }
+      }
+    };
+    var match = function (editor, name, vars, node) {
+      var startNode;
+      if (node) {
+        return matchParents(editor, node, name, vars);
+      }
+      node = editor.selection.getNode();
+      if (matchParents(editor, node, name, vars)) {
+        return true;
+      }
+      startNode = editor.selection.getStart();
+      if (startNode !== node) {
+        if (matchParents(editor, startNode, name, vars)) {
+          return true;
+        }
+      }
+      return false;
+    };
+    var matchAll = function (editor, names, vars) {
+      var matchedFormatNames = [];
+      var checkedMap = {};
+      var startElement = editor.selection.getStart();
+      editor.dom.getParent(startElement, function (node) {
+        for (var i = 0; i < names.length; i++) {
+          var name_1 = names[i];
+          if (!checkedMap[name_1] && matchNode(editor, node, name_1, vars)) {
+            checkedMap[name_1] = true;
+            matchedFormatNames.push(name_1);
+          }
+        }
+      }, editor.dom.getRoot());
+      return matchedFormatNames;
+    };
+    var canApply = function (editor, name) {
+      var formatList = editor.formatter.get(name);
+      var startNode, parents, i, x, selector;
+      var dom = editor.dom;
+      if (formatList) {
+        startNode = editor.selection.getStart();
+        parents = getParents$1(dom, startNode);
+        for (x = formatList.length - 1; x >= 0; x--) {
+          selector = formatList[x].selector;
+          if (!selector || formatList[x].defaultBlock) {
+            return true;
+          }
+          for (i = parents.length - 1; i >= 0; i--) {
+            if (dom.is(parents[i], selector)) {
+              return true;
+            }
+          }
+        }
+      }
+      return false;
+    };
+    var matchAllOnNode = function (editor, node, formatNames) {
+      return foldl(formatNames, function (acc, name) {
+        var matchSimilar = isVariableFormatName(editor, name);
+        if (editor.formatter.matchNode(node, name, {}, matchSimilar)) {
+          return acc.concat([name]);
+        } else {
+          return acc;
+        }
+      }, []);
+    };
+
+    var ZWSP$1 = ZWSP, CARET_ID$1 = '_mce_caret';
+    var importNode = function (ownerDocument, node) {
+      return ownerDocument.importNode(node, true);
+    };
+    var getEmptyCaretContainers = function (node) {
+      var nodes = [];
+      while (node) {
+        if (node.nodeType === 3 && node.nodeValue !== ZWSP$1 || node.childNodes.length > 1) {
+          return [];
+        }
+        if (node.nodeType === 1) {
+          nodes.push(node);
+        }
+        node = node.firstChild;
+      }
+      return nodes;
+    };
+    var isCaretContainerEmpty = function (node) {
+      return getEmptyCaretContainers(node).length > 0;
+    };
+    var findFirstTextNode = function (node) {
+      if (node) {
+        var walker = new TreeWalker(node, node);
+        for (node = walker.current(); node; node = walker.next()) {
+          if (isText$1(node)) {
+            return node;
+          }
+        }
+      }
+      return null;
+    };
+    var createCaretContainer = function (fill) {
+      var caretContainer = Element.fromTag('span');
+      setAll(caretContainer, {
+        'id': CARET_ID$1,
+        'data-mce-bogus': '1',
+        'data-mce-type': 'format-caret'
+      });
+      if (fill) {
+        append(caretContainer, Element.fromText(ZWSP$1));
+      }
+      return caretContainer;
+    };
+    var trimZwspFromCaretContainer = function (caretContainerNode) {
+      var textNode = findFirstTextNode(caretContainerNode);
+      if (textNode && textNode.nodeValue.charAt(0) === ZWSP$1) {
+        textNode.deleteData(0, 1);
+      }
+      return textNode;
+    };
+    var removeCaretContainerNode = function (editor, node, moveCaret) {
+      if (moveCaret === void 0) {
+        moveCaret = true;
+      }
+      var dom = editor.dom, selection = editor.selection;
+      if (isCaretContainerEmpty(node)) {
+        deleteElement(editor, false, Element.fromDom(node), moveCaret);
+      } else {
+        var rng = selection.getRng();
+        var block = dom.getParent(node, dom.isBlock);
+        var startContainer = rng.startContainer;
+        var startOffset = rng.startOffset;
+        var endContainer = rng.endContainer;
+        var endOffset = rng.endOffset;
+        var textNode = trimZwspFromCaretContainer(node);
+        dom.remove(node, true);
+        if (startContainer === textNode && startOffset > 0) {
+          rng.setStart(textNode, startOffset - 1);
+        }
+        if (endContainer === textNode && endOffset > 0) {
+          rng.setEnd(textNode, endOffset - 1);
+        }
+        if (block && dom.isEmpty(block)) {
+          fillWithPaddingBr(Element.fromDom(block));
+        }
+        selection.setRng(rng);
+      }
+    };
+    var removeCaretContainer = function (editor, node, moveCaret) {
+      if (moveCaret === void 0) {
+        moveCaret = true;
+      }
+      var dom = editor.dom, selection = editor.selection;
+      if (!node) {
+        node = getParentCaretContainer(editor.getBody(), selection.getStart());
+        if (!node) {
+          while (node = dom.get(CARET_ID$1)) {
+            removeCaretContainerNode(editor, node, false);
+          }
+        }
+      } else {
+        removeCaretContainerNode(editor, node, moveCaret);
+      }
+    };
+    var insertCaretContainerNode = function (editor, caretContainer, formatNode) {
+      var dom = editor.dom, block = dom.getParent(formatNode, curry(isTextBlock$1, editor));
+      if (block && dom.isEmpty(block)) {
+        formatNode.parentNode.replaceChild(caretContainer, formatNode);
+      } else {
+        removeTrailingBr(Element.fromDom(formatNode));
+        if (dom.isEmpty(formatNode)) {
+          formatNode.parentNode.replaceChild(caretContainer, formatNode);
+        } else {
+          dom.insertAfter(caretContainer, formatNode);
+        }
+      }
+    };
+    var appendNode = function (parentNode, node) {
+      parentNode.appendChild(node);
+      return node;
+    };
+    var insertFormatNodesIntoCaretContainer = function (formatNodes, caretContainer) {
+      var innerMostFormatNode = foldr(formatNodes, function (parentNode, formatNode) {
+        return appendNode(parentNode, formatNode.cloneNode(false));
+      }, caretContainer);
+      return appendNode(innerMostFormatNode, innerMostFormatNode.ownerDocument.createTextNode(ZWSP$1));
+    };
+    var cleanFormatNode = function (editor, caretContainer, formatNode, name, vars, similar) {
+      var formatter = editor.formatter;
+      var dom = editor.dom;
+      var validFormats = filter(keys(formatter.get()), function (formatName) {
+        return formatName !== 'removeformat' && formatName !== name;
+      });
+      var matchedFormats = matchAllOnNode(editor, formatNode, validFormats);
+      var uniqueFormats = filter(matchedFormats, function (fmtName) {
+        return !areSimilarFormats(editor, fmtName, name);
+      });
+      if (uniqueFormats.length > 0) {
+        var clonedFormatNode = formatNode.cloneNode(false);
+        dom.add(caretContainer, clonedFormatNode);
+        formatter.remove(name, vars, clonedFormatNode, similar);
+        dom.remove(clonedFormatNode);
+        return Option.some(clonedFormatNode);
+      } else {
+        return Option.none();
+      }
+    };
+    var applyCaretFormat = function (editor, name, vars) {
+      var caretContainer, textNode;
+      var selection = editor.selection;
+      var selectionRng = selection.getRng();
+      var offset = selectionRng.startOffset;
+      var container = selectionRng.startContainer;
+      var text = container.nodeValue;
+      caretContainer = getParentCaretContainer(editor.getBody(), selection.getStart());
+      if (caretContainer) {
+        textNode = findFirstTextNode(caretContainer);
+      }
+      var wordcharRegex = /[^\s\u00a0\u00ad\u200b\ufeff]/;
+      if (text && offset > 0 && offset < text.length && wordcharRegex.test(text.charAt(offset)) && wordcharRegex.test(text.charAt(offset - 1))) {
+        var bookmark = selection.getBookmark();
+        selectionRng.collapse(true);
+        var rng = expandRng(editor, selectionRng, editor.formatter.get(name));
+        rng = split$1(rng);
+        editor.formatter.apply(name, vars, rng);
+        selection.moveToBookmark(bookmark);
+      } else {
+        if (!caretContainer || textNode.nodeValue !== ZWSP$1) {
+          caretContainer = importNode(editor.getDoc(), createCaretContainer(true).dom());
+          textNode = caretContainer.firstChild;
+          selectionRng.insertNode(caretContainer);
+          offset = 1;
+          editor.formatter.apply(name, vars, caretContainer);
+        } else {
+          editor.formatter.apply(name, vars, caretContainer);
+        }
+        selection.setCursorLocation(textNode, offset);
+      }
+    };
+    var removeCaretFormat = function (editor, name, vars, similar) {
+      var dom = editor.dom;
+      var selection = editor.selection;
+      var hasContentAfter, node, formatNode;
+      var parents = [];
+      var rng = selection.getRng();
+      var container = rng.startContainer;
+      var offset = rng.startOffset;
+      node = container;
+      if (container.nodeType === 3) {
+        if (offset !== container.nodeValue.length) {
+          hasContentAfter = true;
+        }
+        node = node.parentNode;
+      }
+      while (node) {
+        if (matchNode(editor, node, name, vars, similar)) {
+          formatNode = node;
+          break;
+        }
+        if (node.nextSibling) {
+          hasContentAfter = true;
+        }
+        parents.push(node);
+        node = node.parentNode;
+      }
+      if (!formatNode) {
+        return;
+      }
+      if (hasContentAfter) {
+        var bookmark = selection.getBookmark();
+        rng.collapse(true);
+        var expandedRng = expandRng(editor, rng, editor.formatter.get(name), true);
+        expandedRng = split$1(expandedRng);
+        editor.formatter.remove(name, vars, expandedRng, similar);
+        selection.moveToBookmark(bookmark);
+      } else {
+        var caretContainer = getParentCaretContainer(editor.getBody(), formatNode);
+        var newCaretContainer = createCaretContainer(false).dom();
+        insertCaretContainerNode(editor, newCaretContainer, caretContainer !== null ? caretContainer : formatNode);
+        var cleanedFormatNode = cleanFormatNode(editor, newCaretContainer, formatNode, name, vars, similar);
+        var caretTextNode = insertFormatNodesIntoCaretContainer(parents.concat(cleanedFormatNode.toArray()), newCaretContainer);
+        removeCaretContainerNode(editor, caretContainer, false);
+        selection.setCursorLocation(caretTextNode, 1);
+        if (dom.isEmpty(formatNode)) {
+          dom.remove(formatNode);
+        }
+      }
+    };
+    var disableCaretContainer = function (editor, keyCode) {
+      var selection = editor.selection, body = editor.getBody();
+      removeCaretContainer(editor, null, false);
+      if ((keyCode === 8 || keyCode === 46) && selection.isCollapsed() && selection.getStart().innerHTML === ZWSP$1) {
+        removeCaretContainer(editor, getParentCaretContainer(body, selection.getStart()));
+      }
+      if (keyCode === 37 || keyCode === 39) {
+        removeCaretContainer(editor, getParentCaretContainer(body, selection.getStart()));
+      }
+    };
+    var setup$3 = function (editor) {
+      editor.on('mouseup keydown', function (e) {
+        disableCaretContainer(editor, e.keyCode);
+      });
+    };
+    var replaceWithCaretFormat = function (targetNode, formatNodes) {
+      var caretContainer = createCaretContainer(false);
+      var innerMost = insertFormatNodesIntoCaretContainer(formatNodes, caretContainer.dom());
+      before(Element.fromDom(targetNode), caretContainer);
+      remove(Element.fromDom(targetNode));
+      return CaretPosition$1(innerMost, 0);
+    };
+    var isFormatElement = function (editor, element) {
+      var inlineElements = editor.schema.getTextInlineElements();
+      return inlineElements.hasOwnProperty(name(element)) && !isCaretNode(element.dom()) && !isBogus(element.dom());
+    };
+    var isEmptyCaretFormatElement = function (element) {
+      return isCaretNode(element.dom()) && isCaretContainerEmpty(element.dom());
+    };
+
+    var postProcessHooks = {}, filter$4 = filter$2, each$8 = each$2;
+    var addPostProcessHook = function (name, hook) {
+      var hooks = postProcessHooks[name];
+      if (!hooks) {
+        postProcessHooks[name] = [];
+      }
+      postProcessHooks[name].push(hook);
+    };
+    var postProcess = function (name, editor) {
+      each$8(postProcessHooks[name], function (hook) {
+        hook(editor);
+      });
+    };
+    addPostProcessHook('pre', function (editor) {
+      var rng = editor.selection.getRng();
+      var isPre, blocks;
+      var hasPreSibling = function (pre) {
+        return isPre(pre.previousSibling) && indexOf$1(blocks, pre.previousSibling) !== -1;
+      };
+      var joinPre = function (pre1, pre2) {
+        DomQuery(pre2).remove();
+        DomQuery(pre1).append('<br><br>').append(pre2.childNodes);
+      };
+      isPre = matchNodeNames(['pre']);
+      if (!rng.collapsed) {
+        blocks = editor.selection.getSelectedBlocks();
+        each$8(filter$4(filter$4(blocks, isPre), hasPreSibling), function (pre) {
+          joinPre(pre.previousSibling, pre);
+        });
+      }
+    });
+
+    var MCE_ATTR_RE = /^(src|href|style)$/;
+    var each$9 = Tools.each;
+    var isEq$2 = isEq;
+    var isTableCell$3 = function (node) {
+      return /^(TH|TD)$/.test(node.nodeName);
+    };
+    var isChildOfInlineParent = function (dom, node, parent) {
+      return dom.isChildOf(node, parent) && node !== parent && !dom.isBlock(parent);
+    };
+    var getContainer = function (ed, rng, start) {
+      var container, offset;
+      container = rng[start ? 'startContainer' : 'endContainer'];
+      offset = rng[start ? 'startOffset' : 'endOffset'];
+      if (isElement$1(container)) {
+        var lastIdx = container.childNodes.length - 1;
+        if (!start && offset) {
+          offset--;
+        }
+        container = container.childNodes[offset > lastIdx ? lastIdx : offset];
+      }
+      if (isText$1(container) && start && offset >= container.nodeValue.length) {
+        container = new TreeWalker(container, ed.getBody()).next() || container;
+      }
+      if (isText$1(container) && !start && offset === 0) {
+        container = new TreeWalker(container, ed.getBody()).prev() || container;
+      }
+      return container;
+    };
+    var wrap$2 = function (dom, node, name, attrs) {
+      var wrapper = dom.create(name, attrs);
+      node.parentNode.insertBefore(wrapper, node);
+      wrapper.appendChild(node);
+      return wrapper;
+    };
+    var wrapWithSiblings = function (dom, node, next, name, attrs) {
+      var start = Element.fromDom(node);
+      var wrapper = Element.fromDom(dom.create(name, attrs));
+      var siblings = next ? nextSiblings(start) : prevSiblings(start);
+      append$1(wrapper, siblings);
+      if (next) {
+        before(start, wrapper);
+        prepend(wrapper, start);
+      } else {
+        after(start, wrapper);
+        append(wrapper, start);
+      }
+      return wrapper.dom();
+    };
+    var matchName$1 = function (dom, node, format) {
+      if (isEq$2(node, format.inline)) {
+        return true;
+      }
+      if (isEq$2(node, format.block)) {
+        return true;
+      }
+      if (format.selector) {
+        return isElement$1(node) && dom.is(node, format.selector);
+      }
+    };
+    var isColorFormatAndAnchor = function (node, format) {
+      return format.links && node.nodeName === 'A';
+    };
+    var find$2 = function (dom, node, next, inc) {
+      node = getNonWhiteSpaceSibling(node, next, inc);
+      return !node || (node.nodeName === 'BR' || dom.isBlock(node));
+    };
+    var removeNode$1 = function (ed, node, format) {
+      var parentNode = node.parentNode;
+      var rootBlockElm;
+      var dom = ed.dom, forcedRootBlock = getForcedRootBlock(ed);
+      if (format.block) {
+        if (!forcedRootBlock) {
+          if (dom.isBlock(node) && !dom.isBlock(parentNode)) {
+            if (!find$2(dom, node, false) && !find$2(dom, node.firstChild, true, true)) {
+              node.insertBefore(dom.create('br'), node.firstChild);
+            }
+            if (!find$2(dom, node, true) && !find$2(dom, node.lastChild, false, true)) {
+              node.appendChild(dom.create('br'));
+            }
+          }
+        } else {
+          if (parentNode === dom.getRoot()) {
+            if (!format.list_block || !isEq$2(node, format.list_block)) {
+              each(from$1(node.childNodes), function (node) {
+                if (isValid(ed, forcedRootBlock, node.nodeName.toLowerCase())) {
+                  if (!rootBlockElm) {
+                    rootBlockElm = wrap$2(dom, node, forcedRootBlock);
+                    dom.setAttribs(rootBlockElm, ed.settings.forced_root_block_attrs);
+                  } else {
+                    rootBlockElm.appendChild(node);
+                  }
+                } else {
+                  rootBlockElm = 0;
+                }
+              });
+            }
+          }
+        }
+      }
+      if (format.selector && format.inline && !isEq$2(format.inline, node)) {
+        return;
+      }
+      dom.remove(node, true);
+    };
+    var removeFormat = function (ed, format, vars, node, compareNode) {
+      var stylesModified;
+      var dom = ed.dom;
+      if (!matchName$1(dom, node, format) && !isColorFormatAndAnchor(node, format)) {
+        return false;
+      }
+      var elm = node;
+      if (format.inline && format.remove === 'all' && isArray(format.preserve_attributes)) {
+        var attrsToPreserve = filter(dom.getAttribs(elm), function (attr) {
+          return contains(format.preserve_attributes, attr.name.toLowerCase());
+        });
+        dom.removeAllAttribs(elm);
+        each(attrsToPreserve, function (attr) {
+          return dom.setAttrib(elm, attr.name, attr.value);
+        });
+        if (attrsToPreserve.length > 0) {
+          ed.dom.rename(node, 'span');
+          return true;
+        }
+      }
+      if (format.remove !== 'all') {
+        each$9(format.styles, function (value, name) {
+          value = normalizeStyleValue(dom, replaceVars(value, vars), name);
+          if (typeof name === 'number') {
+            name = value;
+            compareNode = null;
+          }
+          if (format.remove_similar || (!compareNode || isEq$2(getStyle(dom, compareNode, name), value))) {
+            dom.setStyle(elm, name, '');
+          }
+          stylesModified = true;
+        });
+        if (stylesModified && dom.getAttrib(elm, 'style') === '') {
+          elm.removeAttribute('style');
+          elm.removeAttribute('data-mce-style');
+        }
+        each$9(format.attributes, function (value, name) {
+          var valueOut;
+          value = replaceVars(value, vars);
+          if (typeof name === 'number') {
+            name = value;
+            compareNode = null;
+          }
+          if (format.remove_similar || (!compareNode || isEq$2(dom.getAttrib(compareNode, name), value))) {
+            if (name === 'class') {
+              value = dom.getAttrib(elm, name);
+              if (value) {
+                valueOut = '';
+                each(value.split(/\s+/), function (cls) {
+                  if (/mce\-\w+/.test(cls)) {
+                    valueOut += (valueOut ? ' ' : '') + cls;
+                  }
+                });
+                if (valueOut) {
+                  dom.setAttrib(elm, name, valueOut);
+                  return;
+                }
+              }
+            }
+            if (name === 'class') {
+              elm.removeAttribute('className');
+            }
+            if (MCE_ATTR_RE.test(name)) {
+              elm.removeAttribute('data-mce-' + name);
+            }
+            elm.removeAttribute(name);
+          }
+        });
+        each$9(format.classes, function (value) {
+          value = replaceVars(value, vars);
+          if (!compareNode || dom.hasClass(compareNode, value)) {
+            dom.removeClass(elm, value);
+          }
+        });
+        var attrs = dom.getAttribs(elm);
+        for (var i = 0; i < attrs.length; i++) {
+          var attrName = attrs[i].nodeName;
+          if (attrName.indexOf('_') !== 0 && attrName.indexOf('data-') !== 0) {
+            return false;
+          }
+        }
+      }
+      if (format.remove !== 'none') {
+        removeNode$1(ed, elm, format);
+        return true;
+      }
+    };
+    var findFormatRoot = function (editor, container, name, vars, similar) {
+      var formatRoot;
+      each(getParents$1(editor.dom, container.parentNode).reverse(), function (parent) {
+        if (!formatRoot && parent.id !== '_start' && parent.id !== '_end') {
+          var format = matchNode(editor, parent, name, vars, similar);
+          if (format && format.split !== false) {
+            formatRoot = parent;
+          }
+        }
+      });
+      return formatRoot;
+    };
+    var wrapAndSplit = function (editor, formatList, formatRoot, container, target, split, format, vars) {
+      var clone, lastClone, firstClone;
+      var dom = editor.dom;
+      if (formatRoot) {
+        var formatRootParent = formatRoot.parentNode;
+        for (var parent_1 = container.parentNode; parent_1 && parent_1 !== formatRootParent; parent_1 = parent_1.parentNode) {
+          clone = dom.clone(parent_1, false);
+          for (var i = 0; i < formatList.length; i++) {
+            if (removeFormat(editor, formatList[i], vars, clone, clone)) {
+              clone = 0;
+              break;
+            }
+          }
+          if (clone) {
+            if (lastClone) {
+              clone.appendChild(lastClone);
+            }
+            if (!firstClone) {
+              firstClone = clone;
+            }
+            lastClone = clone;
+          }
+        }
+        if (split && (!format.mixed || !dom.isBlock(formatRoot))) {
+          container = dom.split(formatRoot, container);
+        }
+        if (lastClone) {
+          target.parentNode.insertBefore(lastClone, target);
+          firstClone.appendChild(target);
+        }
+      }
+      return container;
+    };
+    var remove$6 = function (ed, name, vars, node, similar) {
+      var formatList = ed.formatter.get(name);
+      var format = formatList[0];
+      var contentEditable = true;
+      var dom = ed.dom;
+      var selection = ed.selection;
+      var splitToFormatRoot = function (container) {
+        var formatRoot = findFormatRoot(ed, container, name, vars, similar);
+        return wrapAndSplit(ed, formatList, formatRoot, container, container, true, format, vars);
+      };
+      var isRemoveBookmarkNode = function (node) {
+        return isBookmarkNode$1(node) && isElement$1(node) && (node.id === '_start' || node.id === '_end');
+      };
+      var process = function (node) {
+        var children, lastContentEditable, hasContentEditableState;
+        if (isElement$1(node) && dom.getContentEditable(node)) {
+          lastContentEditable = contentEditable;
+          contentEditable = dom.getContentEditable(node) === 'true';
+          hasContentEditableState = true;
+        }
+        children = from$1(node.childNodes);
+        if (contentEditable && !hasContentEditableState) {
+          for (var i = 0; i < formatList.length; i++) {
+            if (removeFormat(ed, formatList[i], vars, node, node)) {
+              break;
+            }
+          }
+        }
+        if (format.deep) {
+          if (children.length) {
+            for (var i = 0; i < children.length; i++) {
+              process(children[i]);
+            }
+            if (hasContentEditableState) {
+              contentEditable = lastContentEditable;
+            }
+          }
+        }
+      };
+      var unwrap = function (start) {
+        var node = dom.get(start ? '_start' : '_end');
+        var out = node[start ? 'firstChild' : 'lastChild'];
+        if (isRemoveBookmarkNode(out)) {
+          out = out[start ? 'firstChild' : 'lastChild'];
+        }
+        if (isText$1(out) && out.data.length === 0) {
+          out = start ? node.previousSibling || node.nextSibling : node.nextSibling || node.previousSibling;
+        }
+        dom.remove(node, true);
+        return out;
+      };
+      var removeRngStyle = function (rng) {
+        var startContainer, endContainer;
+        var commonAncestorContainer = rng.commonAncestorContainer;
+        var expandedRng = expandRng(ed, rng, formatList, true);
+        if (format.split) {
+          expandedRng = split$1(expandedRng);
+          startContainer = getContainer(ed, expandedRng, true);
+          endContainer = getContainer(ed, expandedRng);
+          if (startContainer !== endContainer) {
+            if (/^(TR|TH|TD)$/.test(startContainer.nodeName) && startContainer.firstChild) {
+              if (startContainer.nodeName === 'TR') {
+                startContainer = startContainer.firstChild.firstChild || startContainer;
+              } else {
+                startContainer = startContainer.firstChild || startContainer;
+              }
+            }
+            if (commonAncestorContainer && /^T(HEAD|BODY|FOOT|R)$/.test(commonAncestorContainer.nodeName) && isTableCell$3(endContainer) && endContainer.firstChild) {
+              endContainer = endContainer.firstChild || endContainer;
+            }
+            if (isChildOfInlineParent(dom, startContainer, endContainer)) {
+              var marker = Option.from(startContainer.firstChild).getOr(startContainer);
+              splitToFormatRoot(wrapWithSiblings(dom, marker, true, 'span', {
+                'id': '_start',
+                'data-mce-type': 'bookmark'
+              }));
+              unwrap(true);
+              return;
+            }
+            if (isChildOfInlineParent(dom, endContainer, startContainer)) {
+              var marker = Option.from(endContainer.lastChild).getOr(endContainer);
+              splitToFormatRoot(wrapWithSiblings(dom, marker, false, 'span', {
+                'id': '_end',
+                'data-mce-type': 'bookmark'
+              }));
+              unwrap(false);
+              return;
+            }
+            startContainer = wrap$2(dom, startContainer, 'span', {
+              'id': '_start',
+              'data-mce-type': 'bookmark'
+            });
+            endContainer = wrap$2(dom, endContainer, 'span', {
+              'id': '_end',
+              'data-mce-type': 'bookmark'
+            });
+            var newRng = dom.createRng();
+            newRng.setStartAfter(startContainer);
+            newRng.setEndBefore(endContainer);
+            walk$1(dom, newRng, function (nodes) {
+              each(nodes, function (n) {
+                if (!isBookmarkNode$1(n) && !isBookmarkNode$1(n.parentNode)) {
+                  splitToFormatRoot(n);
+                }
+              });
+            });
+            splitToFormatRoot(startContainer);
+            splitToFormatRoot(endContainer);
+            startContainer = unwrap(true);
+            endContainer = unwrap();
+          } else {
+            startContainer = endContainer = splitToFormatRoot(startContainer);
+          }
+          expandedRng.startContainer = startContainer.parentNode ? startContainer.parentNode : startContainer;
+          expandedRng.startOffset = dom.nodeIndex(startContainer);
+          expandedRng.endContainer = endContainer.parentNode ? endContainer.parentNode : endContainer;
+          expandedRng.endOffset = dom.nodeIndex(endContainer) + 1;
+        }
+        walk$1(dom, expandedRng, function (nodes) {
+          each(nodes, function (node) {
+            process(node);
+            var textDecorations = [
+              'underline',
+              'line-through',
+              'overline'
+            ];
+            each(textDecorations, function (decoration) {
+              if (isElement$1(node) && ed.dom.getStyle(node, 'text-decoration') === decoration && node.parentNode && getTextDecoration(dom, node.parentNode) === decoration) {
+                removeFormat(ed, {
+                  deep: false,
+                  exact: true,
+                  inline: 'span',
+                  styles: { textDecoration: decoration }
+                }, null, node);
+              }
+            });
+          });
+        });
+      };
+      if (node) {
+        if (isNode(node)) {
+          var rng = dom.createRng();
+          rng.setStartBefore(node);
+          rng.setEndAfter(node);
+          removeRngStyle(rng);
+        } else {
+          removeRngStyle(node);
+        }
+        return;
+      }
+      if (dom.getContentEditable(selection.getNode()) === 'false') {
+        node = selection.getNode();
+        for (var i = 0; i < formatList.length; i++) {
+          if (formatList[i].ceFalseOverride) {
+            if (removeFormat(ed, formatList[i], vars, node, node)) {
+              break;
+            }
+          }
+        }
+        return;
+      }
+      if (!selection.isCollapsed() || !format.inline || getCellsFromEditor(ed).length) {
+        preserve(selection, true, function () {
+          runOnRanges(ed, removeRngStyle);
+        });
+        if (format.inline && match(ed, name, vars, selection.getStart())) {
+          moveStart(dom, selection, selection.getRng());
+        }
+        ed.nodeChanged();
+      } else {
+        removeCaretFormat(ed, name, vars, similar);
+      }
+    };
+
+    var each$a = Tools.each;
+    var isElementNode = function (node) {
+      return isElement$1(node) && !isBookmarkNode$1(node) && !isCaretNode(node) && !isBogus(node);
+    };
+    var findElementSibling = function (node, siblingName) {
+      var sibling;
+      for (sibling = node; sibling; sibling = sibling[siblingName]) {
+        if (isText$1(sibling) && sibling.nodeValue.length !== 0) {
+          return node;
+        }
+        if (isElement$1(sibling) && !isBookmarkNode$1(sibling)) {
+          return sibling;
+        }
+      }
+      return node;
+    };
+    var mergeSiblingsNodes = function (dom, prev, next) {
+      var sibling, tmpSibling;
+      var elementUtils = new ElementUtils(dom);
+      if (prev && next) {
+        prev = findElementSibling(prev, 'previousSibling');
+        next = findElementSibling(next, 'nextSibling');
+        if (elementUtils.compare(prev, next)) {
+          for (sibling = prev.nextSibling; sibling && sibling !== next;) {
+            tmpSibling = sibling;
+            sibling = sibling.nextSibling;
+            prev.appendChild(tmpSibling);
+          }
+          dom.remove(next);
+          Tools.each(Tools.grep(next.childNodes), function (node) {
+            prev.appendChild(node);
+          });
+          return prev;
+        }
+      }
+      return next;
+    };
+    var processChildElements = function (node, filter, process) {
+      each$a(node.childNodes, function (node) {
+        if (isElementNode(node)) {
+          if (filter(node)) {
+            process(node);
+          }
+          if (node.hasChildNodes()) {
+            processChildElements(node, filter, process);
+          }
+        }
+      });
+    };
+    var hasStyle = function (dom, name) {
+      return function (node) {
+        return !!(node && getStyle(dom, node, name));
+      };
+    };
+    var applyStyle = function (dom, name, value) {
+      return function (node) {
+        dom.setStyle(node, name, value);
+        if (node.getAttribute('style') === '') {
+          node.removeAttribute('style');
+        }
+        unwrapEmptySpan(dom, node);
+      };
+    };
+    var unwrapEmptySpan = function (dom, node) {
+      if (node.nodeName === 'SPAN' && dom.getAttribs(node).length === 0) {
+        dom.remove(node, true);
+      }
+    };
+    var mergeTextDecorationsAndColor = function (dom, format, vars, node) {
+      var processTextDecorationsAndColor = function (n) {
+        if (n.nodeType === 1 && n.parentNode && n.parentNode.nodeType === 1) {
+          var textDecoration = getTextDecoration(dom, n.parentNode);
+          if (dom.getStyle(n, 'color') && textDecoration) {
+            dom.setStyle(n, 'text-decoration', textDecoration);
+          } else if (dom.getStyle(n, 'text-decoration') === textDecoration) {
+            dom.setStyle(n, 'text-decoration', null);
+          }
+        }
+      };
+      if (format.styles && (format.styles.color || format.styles.textDecoration)) {
+        Tools.walk(node, processTextDecorationsAndColor, 'childNodes');
+        processTextDecorationsAndColor(node);
+      }
+    };
+    var mergeBackgroundColorAndFontSize = function (dom, format, vars, node) {
+      if (format.styles && format.styles.backgroundColor) {
+        processChildElements(node, hasStyle(dom, 'fontSize'), applyStyle(dom, 'backgroundColor', replaceVars(format.styles.backgroundColor, vars)));
+      }
+    };
+    var mergeSubSup = function (dom, format, vars, node) {
+      if (format.inline === 'sub' || format.inline === 'sup') {
+        processChildElements(node, hasStyle(dom, 'fontSize'), applyStyle(dom, 'fontSize', ''));
+        dom.remove(dom.select(format.inline === 'sup' ? 'sub' : 'sup', node), true);
+      }
+    };
+    var mergeSiblings = function (dom, format, vars, node) {
+      if (node && format.merge_siblings !== false) {
+        node = mergeSiblingsNodes(dom, getNonWhiteSpaceSibling(node), node);
+        node = mergeSiblingsNodes(dom, node, getNonWhiteSpaceSibling(node, true));
+      }
+    };
+    var clearChildStyles = function (dom, format, node) {
+      if (format.clear_child_styles) {
+        var selector = format.links ? '*:not(a)' : '*';
+        each$a(dom.select(selector, node), function (node) {
+          if (isElementNode(node)) {
+            each$a(format.styles, function (value, name) {
+              dom.setStyle(node, name, '');
+            });
+          }
+        });
+      }
+    };
+    var mergeWithChildren = function (editor, formatList, vars, node) {
+      each$a(formatList, function (format) {
+        each$a(editor.dom.select(format.inline, node), function (child) {
+          if (!isElementNode(child)) {
+            return;
+          }
+          removeFormat(editor, format, vars, child, format.exact ? child : null);
+        });
+        clearChildStyles(editor.dom, format, node);
+      });
+    };
+    var mergeWithParents = function (editor, format, name, vars, node) {
+      if (matchNode(editor, node.parentNode, name, vars)) {
+        if (removeFormat(editor, format, vars, node)) {
+          return;
+        }
+      }
+      if (format.merge_with_parents) {
+        editor.dom.getParent(node.parentNode, function (parent) {
+          if (matchNode(editor, parent, name, vars)) {
+            removeFormat(editor, format, vars, node);
+            return true;
+          }
+        });
+      }
+    };
+
+    var each$b = Tools.each;
+    var isElementNode$1 = function (node) {
+      return node && node.nodeType === 1 && !isBookmarkNode$1(node) && !isCaretNode(node) && !isBogus(node);
+    };
+    var applyFormat = function (ed, name, vars, node) {
+      var formatList = ed.formatter.get(name);
+      var format = formatList[0];
+      var rng;
+      var isCollapsed = !node && ed.selection.isCollapsed();
+      var dom = ed.dom, selection = ed.selection;
+      var setElementFormat = function (elm, fmt) {
+        fmt = fmt || format;
+        if (elm) {
+          if (fmt.onformat) {
+            fmt.onformat(elm, fmt, vars, node);
+          }
+          each$b(fmt.styles, function (value, name) {
+            dom.setStyle(elm, name, replaceVars(value, vars));
+          });
+          if (fmt.styles) {
+            var styleVal = dom.getAttrib(elm, 'style');
+            if (styleVal) {
+              dom.setAttrib(elm, 'data-mce-style', styleVal);
+            }
+          }
+          each$b(fmt.attributes, function (value, name) {
+            dom.setAttrib(elm, name, replaceVars(value, vars));
+          });
+          each$b(fmt.classes, function (value) {
+            value = replaceVars(value, vars);
+            if (!dom.hasClass(elm, value)) {
+              dom.addClass(elm, value);
+            }
+          });
+        }
+      };
+      var applyNodeStyle = function (formatList, node) {
+        var found = false;
+        if (!format.selector) {
+          return false;
+        }
+        each$b(formatList, function (format) {
+          if ('collapsed' in format && format.collapsed !== isCollapsed) {
+            return;
+          }
+          if (dom.is(node, format.selector) && !isCaretNode(node)) {
+            setElementFormat(node, format);
+            found = true;
+            return false;
+          }
+        });
+        return found;
+      };
+      var applyRngStyle = function (dom, rng, bookmark, nodeSpecific) {
+        var newWrappers = [];
+        var wrapName, wrapElm, contentEditable = true;
+        wrapName = format.inline || format.block;
+        wrapElm = dom.create(wrapName);
+        setElementFormat(wrapElm);
+        walk$1(dom, rng, function (nodes) {
+          var currentWrapElm;
+          var process = function (node) {
+            var hasContentEditableState = false;
+            var lastContentEditable = contentEditable;
+            var nodeName = node.nodeName.toLowerCase();
+            var parentName = node.parentNode.nodeName.toLowerCase();
+            if (isElement$1(node) && dom.getContentEditable(node)) {
+              lastContentEditable = contentEditable;
+              contentEditable = dom.getContentEditable(node) === 'true';
+              hasContentEditableState = true;
+            }
+            if (isEq(nodeName, 'br')) {
+              currentWrapElm = 0;
+              if (format.block) {
+                dom.remove(node);
+              }
+              return;
+            }
+            if (format.wrapper && matchNode(ed, node, name, vars)) {
+              currentWrapElm = 0;
+              return;
+            }
+            if (contentEditable && !hasContentEditableState && format.block && !format.wrapper && isTextBlock$1(ed, nodeName) && isValid(ed, parentName, wrapName)) {
+              node = dom.rename(node, wrapName);
+              setElementFormat(node);
+              newWrappers.push(node);
+              currentWrapElm = 0;
+              return;
+            }
+            if (format.selector) {
+              var found = applyNodeStyle(formatList, node);
+              if (!format.inline || found) {
+                currentWrapElm = 0;
+                return;
+              }
+            }
+            if (contentEditable && !hasContentEditableState && isValid(ed, wrapName, nodeName) && isValid(ed, parentName, wrapName) && !(!nodeSpecific && node.nodeType === 3 && node.nodeValue.length === 1 && node.nodeValue.charCodeAt(0) === 65279) && !isCaretNode(node) && (!format.inline || !dom.isBlock(node))) {
+              if (!currentWrapElm) {
+                currentWrapElm = dom.clone(wrapElm, false);
+                node.parentNode.insertBefore(currentWrapElm, node);
+                newWrappers.push(currentWrapElm);
+              }
+              currentWrapElm.appendChild(node);
+            } else {
+              currentWrapElm = 0;
+              each$b(Tools.grep(node.childNodes), process);
+              if (hasContentEditableState) {
+                contentEditable = lastContentEditable;
+              }
+              currentWrapElm = 0;
+            }
+          };
+          each$b(nodes, process);
+        });
+        if (format.links === true) {
+          each$b(newWrappers, function (node) {
+            var process = function (node) {
+              if (node.nodeName === 'A') {
+                setElementFormat(node, format);
+              }
+              each$b(Tools.grep(node.childNodes), process);
+            };
+            process(node);
+          });
+        }
+        each$b(newWrappers, function (node) {
+          var childCount;
+          var getChildCount = function (node) {
+            var count = 0;
+            each$b(node.childNodes, function (node) {
+              if (!isEmptyTextNode(node) && !isBookmarkNode$1(node)) {
+                count++;
+              }
+            });
+            return count;
+          };
+          var getChildElementNode = function (root) {
+            var child = false;
+            each$b(root.childNodes, function (node) {
+              if (isElementNode$1(node)) {
+                child = node;
+                return false;
+              }
+            });
+            return child;
+          };
+          var mergeStyles = function (node) {
+            var child, clone;
+            child = getChildElementNode(node);
+            if (child && !isBookmarkNode$1(child) && matchName(dom, child, format)) {
+              clone = dom.clone(child, false);
+              setElementFormat(clone);
+              dom.replace(clone, node, true);
+              dom.remove(child, true);
+            }
+            return clone || node;
+          };
+          childCount = getChildCount(node);
+          if ((newWrappers.length > 1 || !dom.isBlock(node)) && childCount === 0) {
+            dom.remove(node, true);
+            return;
+          }
+          if (format.inline || format.wrapper) {
+            if (!format.exact && childCount === 1) {
+              node = mergeStyles(node);
+            }
+            mergeWithChildren(ed, formatList, vars, node);
+            mergeWithParents(ed, format, name, vars, node);
+            mergeBackgroundColorAndFontSize(dom, format, vars, node);
+            mergeTextDecorationsAndColor(dom, format, vars, node);
+            mergeSubSup(dom, format, vars, node);
+            mergeSiblings(dom, format, vars, node);
+          }
+        });
+      };
+      if (dom.getContentEditable(selection.getNode()) === 'false') {
+        node = selection.getNode();
+        for (var i = 0, l = formatList.length; i < l; i++) {
+          if (formatList[i].ceFalseOverride && dom.is(node, formatList[i].selector)) {
+            setElementFormat(node, formatList[i]);
+            return;
+          }
+        }
+        return;
+      }
+      if (format) {
+        if (node) {
+          if (isNode(node)) {
+            if (!applyNodeStyle(formatList, node)) {
+              rng = dom.createRng();
+              rng.setStartBefore(node);
+              rng.setEndAfter(node);
+              applyRngStyle(dom, expandRng(ed, rng, formatList), null, true);
+            }
+          } else {
+            applyRngStyle(dom, node, null, true);
+          }
+        } else {
+          if (!isCollapsed || !format.inline || getCellsFromEditor(ed).length) {
+            var curSelNode = selection.getNode();
+            if (!ed.settings.forced_root_block && formatList[0].defaultBlock && !dom.getParent(curSelNode, dom.isBlock)) {
+              applyFormat(ed, formatList[0].defaultBlock);
+            }
+            selection.setRng(normalize$1(selection.getRng()));
+            preserve(selection, true, function (bookmark) {
+              runOnRanges(ed, function (selectionRng, fake) {
+                var expandedRng = fake ? selectionRng : expandRng(ed, selectionRng, formatList);
+                applyRngStyle(dom, expandedRng);
+              });
+            });
+            moveStart(dom, selection, selection.getRng());
+            ed.nodeChanged();
+          } else {
+            applyCaretFormat(ed, name, vars);
+          }
+        }
+        postProcess(name, ed);
+      }
+    };
+
+    var toggle = function (editor, name, vars, node) {
+      var fmt = editor.formatter.get(name);
+      if (match(editor, name, vars, node) && (!('toggle' in fmt[0]) || fmt[0].toggle)) {
+        remove$6(editor, name, vars, node);
+      } else {
+        applyFormat(editor, name, vars, node);
+      }
+    };
+
+    var processRanges = function (editor, ranges) {
+      return map(ranges, function (range) {
+        var evt = editor.fire('GetSelectionRange', { range: range });
+        return evt.range !== range ? evt.range : range;
+      });
+    };
+
+    var fromElements = function (elements, scope) {
+      var doc = scope || domGlobals.document;
+      var fragment = doc.createDocumentFragment();
+      each(elements, function (element) {
+        fragment.appendChild(element.dom());
+      });
+      return Element.fromDom(fragment);
+    };
+
+    var tableModel = function (element, width, rows) {
+      return {
+        element: constant(element),
+        width: constant(width),
+        rows: constant(rows)
+      };
+    };
+    var tableRow = function (element, cells) {
+      return {
+        element: constant(element),
+        cells: constant(cells)
+      };
+    };
+    var cellPosition = function (x, y) {
+      return {
+        x: constant(x),
+        y: constant(y)
+      };
+    };
+    var getSpan = function (td, key) {
+      var value = parseInt(get$3(td, key), 10);
+      return isNaN(value) ? 1 : value;
+    };
+    var fillout = function (table, x, y, tr, td) {
+      var rowspan = getSpan(td, 'rowspan');
+      var colspan = getSpan(td, 'colspan');
+      var rows = table.rows();
+      for (var y2 = y; y2 < y + rowspan; y2++) {
+        if (!rows[y2]) {
+          rows[y2] = tableRow(deep(tr), []);
+        }
+        for (var x2 = x; x2 < x + colspan; x2++) {
+          var cells = rows[y2].cells();
+          cells[x2] = y2 === y && x2 === x ? td : shallow(td);
+        }
+      }
+    };
+    var cellExists = function (table, x, y) {
+      var rows = table.rows();
+      var cells = rows[y] ? rows[y].cells() : [];
+      return !!cells[x];
+    };
+    var skipCellsX = function (table, x, y) {
+      while (cellExists(table, x, y)) {
+        x++;
+      }
+      return x;
+    };
+    var getWidth = function (rows) {
+      return foldl(rows, function (acc, row) {
+        return row.cells().length > acc ? row.cells().length : acc;
+      }, 0);
+    };
+    var findElementPos = function (table, element) {
+      var rows = table.rows();
+      for (var y = 0; y < rows.length; y++) {
+        var cells = rows[y].cells();
+        for (var x = 0; x < cells.length; x++) {
+          if (eq$2(cells[x], element)) {
+            return Option.some(cellPosition(x, y));
+          }
+        }
+      }
+      return Option.none();
+    };
+    var extractRows = function (table, sx, sy, ex, ey) {
+      var newRows = [];
+      var rows = table.rows();
+      for (var y = sy; y <= ey; y++) {
+        var cells = rows[y].cells();
+        var slice = sx < ex ? cells.slice(sx, ex + 1) : cells.slice(ex, sx + 1);
+        newRows.push(tableRow(rows[y].element(), slice));
+      }
+      return newRows;
+    };
+    var subTable = function (table, startPos, endPos) {
+      var sx = startPos.x(), sy = startPos.y();
+      var ex = endPos.x(), ey = endPos.y();
+      var newRows = sy < ey ? extractRows(table, sx, sy, ex, ey) : extractRows(table, sx, ey, ex, sy);
+      return tableModel(table.element(), getWidth(newRows), newRows);
+    };
+    var createDomTable = function (table, rows) {
+      var tableElement = shallow(table.element());
+      var tableBody = Element.fromTag('tbody');
+      append$1(tableBody, rows);
+      append(tableElement, tableBody);
+      return tableElement;
+    };
+    var modelRowsToDomRows = function (table) {
+      return map(table.rows(), function (row) {
+        var cells = map(row.cells(), function (cell) {
+          var td = deep(cell);
+          remove$1(td, 'colspan');
+          remove$1(td, 'rowspan');
+          return td;
+        });
+        var tr = shallow(row.element());
+        append$1(tr, cells);
+        return tr;
+      });
+    };
+    var fromDom$1 = function (tableElm) {
+      var table = tableModel(shallow(tableElm), 0, []);
+      each(descendants$1(tableElm, 'tr'), function (tr, y) {
+        each(descendants$1(tr, 'td,th'), function (td, x) {
+          fillout(table, skipCellsX(table, x, y), y, tr, td);
+        });
+      });
+      return tableModel(table.element(), getWidth(table.rows()), table.rows());
+    };
+    var toDom = function (table) {
+      return createDomTable(table, modelRowsToDomRows(table));
+    };
+    var subsection = function (table, startElement, endElement) {
+      return findElementPos(table, startElement).bind(function (startPos) {
+        return findElementPos(table, endElement).map(function (endPos) {
+          return subTable(table, startPos, endPos);
+        });
+      });
+    };
+
+    var findParentListContainer = function (parents) {
+      return find(parents, function (elm) {
+        return name(elm) === 'ul' || name(elm) === 'ol';
+      });
+    };
+    var getFullySelectedListWrappers = function (parents, rng) {
+      return find(parents, function (elm) {
+        return name(elm) === 'li' && hasAllContentsSelected(elm, rng);
+      }).fold(constant([]), function (_li) {
+        return findParentListContainer(parents).map(function (listCont) {
+          return [
+            Element.fromTag('li'),
+            Element.fromTag(name(listCont))
+          ];
+        }).getOr([]);
+      });
+    };
+    var wrap$3 = function (innerElm, elms) {
+      var wrapped = foldl(elms, function (acc, elm) {
+        append(elm, acc);
+        return elm;
+      }, innerElm);
+      return elms.length > 0 ? fromElements([wrapped]) : wrapped;
+    };
+    var directListWrappers = function (commonAnchorContainer) {
+      if (isListItem(commonAnchorContainer)) {
+        return parent(commonAnchorContainer).filter(isList).fold(constant([]), function (listElm) {
+          return [
+            commonAnchorContainer,
+            listElm
+          ];
+        });
+      } else {
+        return isList(commonAnchorContainer) ? [commonAnchorContainer] : [];
+      }
+    };
+    var getWrapElements = function (rootNode, rng) {
+      var commonAnchorContainer = Element.fromDom(rng.commonAncestorContainer);
+      var parents = parentsAndSelf(commonAnchorContainer, rootNode);
+      var wrapElements = filter(parents, function (elm) {
+        return isInline(elm) || isHeading(elm);
+      });
+      var listWrappers = getFullySelectedListWrappers(parents, rng);
+      var allWrappers = wrapElements.concat(listWrappers.length ? listWrappers : directListWrappers(commonAnchorContainer));
+      return map(allWrappers, shallow);
+    };
+    var emptyFragment = function () {
+      return fromElements([]);
+    };
+    var getFragmentFromRange = function (rootNode, rng) {
+      return wrap$3(Element.fromDom(rng.cloneContents()), getWrapElements(rootNode, rng));
+    };
+    var getParentTable = function (rootElm, cell) {
+      return ancestor$1(cell, 'table', curry(eq$2, rootElm));
+    };
+    var getTableFragment = function (rootNode, selectedTableCells) {
+      return getParentTable(rootNode, selectedTableCells[0]).bind(function (tableElm) {
+        var firstCell = selectedTableCells[0];
+        var lastCell = selectedTableCells[selectedTableCells.length - 1];
+        var fullTableModel = fromDom$1(tableElm);
+        return subsection(fullTableModel, firstCell, lastCell).map(function (sectionedTableModel) {
+          return fromElements([toDom(sectionedTableModel)]);
+        });
+      }).getOrThunk(emptyFragment);
+    };
+    var getSelectionFragment = function (rootNode, ranges) {
+      return ranges.length > 0 && ranges[0].collapsed ? emptyFragment() : getFragmentFromRange(rootNode, ranges[0]);
+    };
+    var read$1 = function (rootNode, ranges) {
+      var selectedCells = getCellsFromElementOrRanges(ranges, rootNode);
+      return selectedCells.length > 0 ? getTableFragment(rootNode, selectedCells) : getSelectionFragment(rootNode, ranges);
+    };
+
+    var getTextContent = function (editor) {
+      return Option.from(editor.selection.getRng()).map(function (rng) {
+        var bin = editor.dom.add(editor.getBody(), 'div', {
+          'data-mce-bogus': 'all',
+          'style': 'overflow: hidden; opacity: 0;'
+        }, rng.cloneContents());
+        var text = trim$3(bin.innerText);
+        editor.dom.remove(bin);
+        return text;
+      }).getOr('');
+    };
+    var getSerializedContent = function (editor, args) {
+      var rng = editor.selection.getRng(), tmpElm = editor.dom.create('body');
+      var sel = editor.selection.getSel();
+      var ranges = processRanges(editor, getRanges(sel));
+      var fragment = args.contextual ? read$1(Element.fromDom(editor.getBody()), ranges).dom() : rng.cloneContents();
+      if (fragment) {
+        tmpElm.appendChild(fragment);
+      }
+      return editor.selection.serializer.serialize(tmpElm, args);
+    };
+    var getSelectedContentInternal = function (editor, format, args) {
+      if (args === void 0) {
+        args = {};
+      }
+      args.get = true;
+      args.format = format;
+      args.selection = true;
+      args = editor.fire('BeforeGetContent', args);
+      if (args.isDefaultPrevented()) {
+        editor.fire('GetContent', args);
+        return args.content;
+      }
+      if (args.format === 'text') {
+        return getTextContent(editor);
+      } else {
+        args.getInner = true;
+        var content = getSerializedContent(editor, args);
+        if (args.format === 'tree') {
+          return content;
+        } else {
+          args.content = editor.selection.isCollapsed() ? '' : content;
+          editor.fire('GetContent', args);
+          return args.content;
+        }
+      }
+    };
+
+    var KEEP = 0, INSERT = 1, DELETE = 2;
+    var diff = function (left, right) {
+      var size = left.length + right.length + 2;
+      var vDown = new Array(size);
+      var vUp = new Array(size);
+      var snake = function (start, end, diag) {
+        return {
+          start: start,
+          end: end,
+          diag: diag
+        };
+      };
+      var buildScript = function (start1, end1, start2, end2, script) {
+        var middle = getMiddleSnake(start1, end1, start2, end2);
+        if (middle === null || middle.start === end1 && middle.diag === end1 - end2 || middle.end === start1 && middle.diag === start1 - start2) {
+          var i = start1;
+          var j = start2;
+          while (i < end1 || j < end2) {
+            if (i < end1 && j < end2 && left[i] === right[j]) {
+              script.push([
+                KEEP,
+                left[i]
+              ]);
+              ++i;
+              ++j;
+            } else {
+              if (end1 - start1 > end2 - start2) {
+                script.push([
+                  DELETE,
+                  left[i]
+                ]);
+                ++i;
+              } else {
+                script.push([
+                  INSERT,
+                  right[j]
+                ]);
+                ++j;
+              }
+            }
+          }
+        } else {
+          buildScript(start1, middle.start, start2, middle.start - middle.diag, script);
+          for (var i2 = middle.start; i2 < middle.end; ++i2) {
+            script.push([
+              KEEP,
+              left[i2]
+            ]);
+          }
+          buildScript(middle.end, end1, middle.end - middle.diag, end2, script);
+        }
+      };
+      var buildSnake = function (start, diag, end1, end2) {
+        var end = start;
+        while (end - diag < end2 && end < end1 && left[end] === right[end - diag]) {
+          ++end;
+        }
+        return snake(start, end, diag);
+      };
+      var getMiddleSnake = function (start1, end1, start2, end2) {
+        var m = end1 - start1;
+        var n = end2 - start2;
+        if (m === 0 || n === 0) {
+          return null;
+        }
+        var delta = m - n;
+        var sum = n + m;
+        var offset = (sum % 2 === 0 ? sum : sum + 1) / 2;
+        vDown[1 + offset] = start1;
+        vUp[1 + offset] = end1 + 1;
+        var d, k, i, x, y;
+        for (d = 0; d <= offset; ++d) {
+          for (k = -d; k <= d; k += 2) {
+            i = k + offset;
+            if (k === -d || k !== d && vDown[i - 1] < vDown[i + 1]) {
+              vDown[i] = vDown[i + 1];
+            } else {
+              vDown[i] = vDown[i - 1] + 1;
+            }
+            x = vDown[i];
+            y = x - start1 + start2 - k;
+            while (x < end1 && y < end2 && left[x] === right[y]) {
+              vDown[i] = ++x;
+              ++y;
+            }
+            if (delta % 2 !== 0 && delta - d <= k && k <= delta + d) {
+              if (vUp[i - delta] <= vDown[i]) {
+                return buildSnake(vUp[i - delta], k + start1 - start2, end1, end2);
+              }
+            }
+          }
+          for (k = delta - d; k <= delta + d; k += 2) {
+            i = k + offset - delta;
+            if (k === delta - d || k !== delta + d && vUp[i + 1] <= vUp[i - 1]) {
+              vUp[i] = vUp[i + 1] - 1;
+            } else {
+              vUp[i] = vUp[i - 1];
+            }
+            x = vUp[i] - 1;
+            y = x - start1 + start2 - k;
+            while (x >= start1 && y >= start2 && left[x] === right[y]) {
+              vUp[i] = x--;
+              y--;
+            }
+            if (delta % 2 === 0 && -d <= k && k <= d) {
+              if (vUp[i] <= vDown[i + delta]) {
+                return buildSnake(vUp[i], k + start1 - start2, end1, end2);
+              }
+            }
+          }
+        }
+      };
+      var script = [];
+      buildScript(0, left.length, 0, right.length, script);
+      return script;
+    };
+
+    var getOuterHtml = function (elm) {
+      if (isElement$1(elm)) {
+        return elm.outerHTML;
+      } else if (isText$1(elm)) {
+        return Entities.encodeRaw(elm.data, false);
+      } else if (isComment$1(elm)) {
+        return '<!--' + elm.data + '-->';
+      }
+      return '';
+    };
+    var createFragment$1 = function (html) {
+      var frag, node, container;
+      container = domGlobals.document.createElement('div');
+      frag = domGlobals.document.createDocumentFragment();
+      if (html) {
+        container.innerHTML = html;
+      }
+      while (node = container.firstChild) {
+        frag.appendChild(node);
+      }
+      return frag;
+    };
+    var insertAt = function (elm, html, index) {
+      var fragment = createFragment$1(html);
+      if (elm.hasChildNodes() && index < elm.childNodes.length) {
+        var target = elm.childNodes[index];
+        target.parentNode.insertBefore(fragment, target);
+      } else {
+        elm.appendChild(fragment);
+      }
+    };
+    var removeAt = function (elm, index) {
+      if (elm.hasChildNodes() && index < elm.childNodes.length) {
+        var target = elm.childNodes[index];
+        target.parentNode.removeChild(target);
+      }
+    };
+    var applyDiff = function (diff, elm) {
+      var index = 0;
+      each(diff, function (action) {
+        if (action[0] === KEEP) {
+          index++;
+        } else if (action[0] === INSERT) {
+          insertAt(elm, action[1], index);
+          index++;
+        } else if (action[0] === DELETE) {
+          removeAt(elm, index);
+        }
+      });
+    };
+    var read$2 = function (elm) {
+      return filter(map(from$1(elm.childNodes), getOuterHtml), function (item) {
+        return item.length > 0;
+      });
+    };
+    var write = function (fragments, elm) {
+      var currentFragments = map(from$1(elm.childNodes), getOuterHtml);
+      applyDiff(diff(currentFragments, fragments), elm);
+      return elm;
+    };
+
+    var undoLevelDocument = Cell(Option.none());
+    var lazyTempDocument = function () {
+      return undoLevelDocument.get().getOrThunk(function () {
+        var doc = domGlobals.document.implementation.createHTMLDocument('undo');
+        undoLevelDocument.set(Option.some(doc));
+        return doc;
+      });
+    };
+    var hasIframes = function (html) {
+      return html.indexOf('</iframe>') !== -1;
+    };
+    var createFragmentedLevel = function (fragments) {
+      return {
+        type: 'fragmented',
+        fragments: fragments,
+        content: '',
+        bookmark: null,
+        beforeBookmark: null
+      };
+    };
+    var createCompleteLevel = function (content) {
+      return {
+        type: 'complete',
+        fragments: null,
+        content: content,
+        bookmark: null,
+        beforeBookmark: null
+      };
+    };
+    var createFromEditor = function (editor) {
+      var fragments, content, trimmedFragments;
+      fragments = read$2(editor.getBody());
+      trimmedFragments = bind(fragments, function (html) {
+        var trimmed = trimInternal(editor.serializer, html);
+        return trimmed.length > 0 ? [trimmed] : [];
+      });
+      content = trimmedFragments.join('');
+      return hasIframes(content) ? createFragmentedLevel(trimmedFragments) : createCompleteLevel(content);
+    };
+    var applyToEditor = function (editor, level, before) {
+      if (level.type === 'fragmented') {
+        write(level.fragments, editor.getBody());
+      } else {
+        editor.setContent(level.content, { format: 'raw' });
+      }
+      editor.selection.moveToBookmark(before ? level.beforeBookmark : level.bookmark);
+    };
+    var getLevelContent = function (level) {
+      return level.type === 'fragmented' ? level.fragments.join('') : level.content;
+    };
+    var getCleanLevelContent = function (level) {
+      var elm = Element.fromTag('body', lazyTempDocument());
+      set$1(elm, getLevelContent(level));
+      each(descendants$1(elm, '*[data-mce-bogus]'), unwrap);
+      return get$6(elm);
+    };
+    var hasEqualContent = function (level1, level2) {
+      return getLevelContent(level1) === getLevelContent(level2);
+    };
+    var hasEqualCleanedContent = function (level1, level2) {
+      return getCleanLevelContent(level1) === getCleanLevelContent(level2);
+    };
+    var isEq$3 = function (level1, level2) {
+      if (!level1 || !level2) {
+        return false;
+      } else if (hasEqualContent(level1, level2)) {
+        return true;
+      } else {
+        return hasEqualCleanedContent(level1, level2);
+      }
+    };
+
+    var isUnlocked = function (locks) {
+      return locks.get() === 0;
+    };
+
+    var setTyping = function (undoManager, typing, locks) {
+      if (isUnlocked(locks)) {
+        undoManager.typing = typing;
+      }
+    };
+    var endTyping = function (undoManager, locks) {
+      if (undoManager.typing) {
+        setTyping(undoManager, false, locks);
+        undoManager.add();
+      }
+    };
+    var endTypingLevelIgnoreLocks = function (undoManager) {
+      if (undoManager.typing) {
+        undoManager.typing = false;
+        undoManager.add();
+      }
+    };
+
+    var beforeChange = function (editor, locks, beforeBookmark) {
+      if (isUnlocked(locks)) {
+        beforeBookmark.set(Option.some(getUndoBookmark(editor.selection)));
+      }
+    };
+    var addUndoLevel = function (editor, undoManager, index, locks, beforeBookmark, level, event) {
+      var settings = editor.settings;
+      var currentLevel = createFromEditor(editor);
+      level = level || {};
+      level = Tools.extend(level, currentLevel);
+      if (isUnlocked(locks) === false || editor.removed) {
+        return null;
+      }
+      var lastLevel = undoManager.data[index.get()];
+      if (editor.fire('BeforeAddUndo', {
+          level: level,
+          lastLevel: lastLevel,
+          originalEvent: event
+        }).isDefaultPrevented()) {
+        return null;
+      }
+      if (lastLevel && isEq$3(lastLevel, level)) {
+        return null;
+      }
+      if (undoManager.data[index.get()]) {
+        beforeBookmark.get().each(function (bm) {
+          undoManager.data[index.get()].beforeBookmark = bm;
+        });
+      }
+      if (settings.custom_undo_redo_levels) {
+        if (undoManager.data.length > settings.custom_undo_redo_levels) {
+          for (var i = 0; i < undoManager.data.length - 1; i++) {
+            undoManager.data[i] = undoManager.data[i + 1];
+          }
+          undoManager.data.length--;
+          index.set(undoManager.data.length);
+        }
+      }
+      level.bookmark = getUndoBookmark(editor.selection);
+      if (index.get() < undoManager.data.length - 1) {
+        undoManager.data.length = index.get() + 1;
+      }
+      undoManager.data.push(level);
+      index.set(undoManager.data.length - 1);
+      var args = {
+        level: level,
+        lastLevel: lastLevel,
+        originalEvent: event
+      };
+      editor.fire('AddUndo', args);
+      if (index.get() > 0) {
+        editor.setDirty(true);
+        editor.fire('change', args);
+      }
+      return level;
+    };
+    var clear = function (editor, undoManager, index) {
+      undoManager.data = [];
+      index.set(0);
+      undoManager.typing = false;
+      editor.fire('ClearUndos');
+    };
+    var extra = function (editor, undoManager, index, callback1, callback2) {
+      if (undoManager.transact(callback1)) {
+        var bookmark = undoManager.data[index.get()].bookmark;
+        var lastLevel = undoManager.data[index.get() - 1];
+        applyToEditor(editor, lastLevel, true);
+        if (undoManager.transact(callback2)) {
+          undoManager.data[index.get() - 1].beforeBookmark = bookmark;
+        }
+      }
+    };
+    var redo = function (editor, index, data) {
+      var level;
+      if (index.get() < data.length - 1) {
+        index.set(index.get() + 1);
+        level = data[index.get()];
+        applyToEditor(editor, level, false);
+        editor.setDirty(true);
+        editor.fire('Redo', { level: level });
+      }
+      return level;
+    };
+    var undo = function (editor, undoManager, locks, index) {
+      var level;
+      if (undoManager.typing) {
+        undoManager.add();
+        undoManager.typing = false;
+        setTyping(undoManager, false, locks);
+      }
+      if (index.get() > 0) {
+        index.set(index.get() - 1);
+        level = undoManager.data[index.get()];
+        applyToEditor(editor, level, true);
+        editor.setDirty(true);
+        editor.fire('Undo', { level: level });
+      }
+      return level;
+    };
+    var reset = function (undoManager) {
+      undoManager.clear();
+      undoManager.add();
+    };
+    var hasUndo = function (editor, undoManager, index) {
+      return index.get() > 0 || undoManager.typing && undoManager.data[0] && !isEq$3(createFromEditor(editor), undoManager.data[0]);
+    };
+    var hasRedo = function (undoManager, index) {
+      return index.get() < undoManager.data.length - 1 && !undoManager.typing;
+    };
+    var transact = function (undoManager, locks, callback) {
+      endTyping(undoManager, locks);
+      undoManager.beforeChange();
+      undoManager.ignore(callback);
+      return undoManager.add();
+    };
+    var ignore = function (locks, callback) {
+      try {
+        locks.set(locks.get() + 1);
+        callback();
+      } finally {
+        locks.set(locks.get() - 1);
+      }
+    };
+
+    var isTreeNode$1 = function (content) {
+      return content instanceof Node;
+    };
+    var runSerializerFiltersOnFragment = function (editor, fragment) {
+      filter$3(editor.serializer.getNodeFilters(), editor.serializer.getAttributeFilters(), fragment);
+    };
+    var createDummyUndoLevel = function () {
+      return {
+        type: 'complete',
+        fragments: [],
+        content: '',
+        bookmark: null,
+        beforeBookmark: null
+      };
+    };
+    var makePlainAdaptor = function (editor) {
+      return {
+        undoManager: {
+          beforeChange: function (locks, beforeBookmark) {
+            return beforeChange(editor, locks, beforeBookmark);
+          },
+          addUndoLevel: function (undoManager, index, locks, beforeBookmark, level, event) {
+            return addUndoLevel(editor, undoManager, index, locks, beforeBookmark, level, event);
+          },
+          undo: function (undoManager, locks, index) {
+            return undo(editor, undoManager, locks, index);
+          },
+          redo: function (index, data) {
+            return redo(editor, index, data);
+          },
+          clear: function (undoManager, index) {
+            return clear(editor, undoManager, index);
+          },
+          reset: function (undoManager) {
+            return reset(undoManager);
+          },
+          hasUndo: function (undoManager, index) {
+            return hasUndo(editor, undoManager, index);
+          },
+          hasRedo: function (undoManager, index) {
+            return hasRedo(undoManager, index);
+          },
+          transact: function (undoManager, locks, callback) {
+            return transact(undoManager, locks, callback);
+          },
+          ignore: function (locks, callback) {
+            return ignore(locks, callback);
+          },
+          extra: function (undoManager, index, callback1, callback2) {
+            return extra(editor, undoManager, index, callback1, callback2);
+          }
+        },
+        formatter: {
+          apply: function (name, vars, node) {
+            return applyFormat(editor, name, vars, node);
+          },
+          remove: function (name, vars, node, similar) {
+            return remove$6(editor, name, vars, node, similar);
+          },
+          toggle: function (name, vars, node) {
+            return toggle(editor, name, vars, node);
+          }
+        },
+        editor: {
+          getContent: function (args, format) {
+            return getContentInternal(editor, args, format);
+          },
+          setContent: function (content, args) {
+            return setContentInternal(editor, content, args);
+          },
+          insertContent: function (value, details) {
+            return insertHtmlAtCaret(editor, value, details);
+          }
+        },
+        selection: {
+          getContent: function (format, args) {
+            return getSelectedContentInternal(editor, format, args);
+          }
+        },
+        raw: {
+          getModel: function () {
+            return Option.none();
+          }
+        }
+      };
+    };
+    var makeRtcAdaptor = function (tinymceEditor, rtcEditor) {
+      var defaultVars = function (vars) {
+        return isObject(vars) ? vars : {};
+      };
+      var unsupported = die('Unimplemented feature for rtc');
+      var ignore = noop;
+      return {
+        undoManager: {
+          beforeChange: ignore,
+          addUndoLevel: unsupported,
+          undo: function () {
+            rtcEditor.undo();
+            return createDummyUndoLevel();
+          },
+          redo: function () {
+            rtcEditor.redo();
+            return createDummyUndoLevel();
+          },
+          clear: unsupported,
+          reset: unsupported,
+          hasUndo: function () {
+            return rtcEditor.hasUndo();
+          },
+          hasRedo: function () {
+            return rtcEditor.hasRedo();
+          },
+          transact: function (_undoManager, _locks, fn) {
+            rtcEditor.transact(fn);
+            return createDummyUndoLevel();
+          },
+          ignore: unsupported,
+          extra: unsupported
+        },
+        formatter: {
+          apply: function (name, vars, _node) {
+            return rtcEditor.applyFormat(name, defaultVars(vars));
+          },
+          remove: function (name, vars, _node, _similar) {
+            return rtcEditor.removeFormat(name, defaultVars(vars));
+          },
+          toggle: function (name, vars, _node) {
+            return rtcEditor.toggleFormat(name, defaultVars(vars));
+          }
+        },
+        editor: {
+          getContent: function (args, format) {
+            if (format === 'html' || format === 'tree') {
+              var fragment = rtcEditor.getContent();
+              var serializer = Serializer({ inner: true });
+              runSerializerFiltersOnFragment(tinymceEditor, fragment);
+              return format === 'tree' ? fragment : serializer.serialize(fragment);
+            } else {
+              return makePlainAdaptor(tinymceEditor).editor.getContent(args, format);
+            }
+          },
+          setContent: function (content, _args) {
+            var fragment = isTreeNode$1(content) ? content : tinymceEditor.parser.parse(content, {
+              isRootContent: true,
+              insert: true
+            });
+            rtcEditor.setContent(fragment);
+            return content;
+          },
+          insertContent: function (value, _details) {
+            var fragment = isTreeNode$1(value) ? value : tinymceEditor.parser.parse(value, { insert: true });
+            rtcEditor.insertContent(fragment);
+          }
+        },
+        selection: {
+          getContent: function (format, args) {
+            if (format === 'html' || format === 'tree') {
+              var fragment = rtcEditor.getSelectedContent();
+              var serializer = Serializer({});
+              runSerializerFiltersOnFragment(tinymceEditor, fragment);
+              return format === 'tree' ? fragment : serializer.serialize(fragment);
+            } else {
+              return makePlainAdaptor(tinymceEditor).selection.getContent(format, args);
+            }
+          }
+        },
+        raw: {
+          getModel: function () {
+            return Option.some(rtcEditor.getRawModel());
+          }
+        }
+      };
+    };
+    var isRtc = function (editor) {
+      return has(editor.plugins, 'rtc');
+    };
+    var setup$4 = function (editor) {
+      var editorCast = editor;
+      return get(editor.plugins, 'rtc').fold(function () {
+        editorCast.rtcInstance = makePlainAdaptor(editor);
+        return Option.none();
+      }, function (rtc) {
+        return Option.some(rtc.setup().then(function (rtcEditor) {
+          editorCast.rtcInstance = makeRtcAdaptor(editor, rtcEditor);
+          return rtcEditor.isRemote;
+        }));
+      });
+    };
+    var getRtcInstanceWithFallback = function (editor) {
+      return editor.rtcInstance ? editor.rtcInstance : makePlainAdaptor(editor);
+    };
+    var getRtcInstanceWithError = function (editor) {
+      var rtcInstance = editor.rtcInstance;
+      if (!rtcInstance) {
+        throw new Error('Failed to get RTC instance not yet initialized.');
+      } else {
+        return rtcInstance;
+      }
+    };
+    var beforeChange$1 = function (editor, locks, beforeBookmark) {
+      getRtcInstanceWithError(editor).undoManager.beforeChange(locks, beforeBookmark);
+    };
+    var addUndoLevel$1 = function (editor, undoManager, index, locks, beforeBookmark, level, event) {
+      return getRtcInstanceWithError(editor).undoManager.addUndoLevel(undoManager, index, locks, beforeBookmark, level, event);
+    };
+    var undo$1 = function (editor, undoManager, locks, index) {
+      return getRtcInstanceWithError(editor).undoManager.undo(undoManager, locks, index);
+    };
+    var redo$1 = function (editor, index, data) {
+      return getRtcInstanceWithError(editor).undoManager.redo(index, data);
+    };
+    var clear$1 = function (editor, undoManager, index) {
+      getRtcInstanceWithError(editor).undoManager.clear(undoManager, index);
+    };
+    var reset$1 = function (editor, undoManager) {
+      getRtcInstanceWithError(editor).undoManager.reset(undoManager);
+    };
+    var hasUndo$1 = function (editor, undoManager, index) {
+      return getRtcInstanceWithError(editor).undoManager.hasUndo(undoManager, index);
+    };
+    var hasRedo$1 = function (editor, undoManager, index) {
+      return getRtcInstanceWithError(editor).undoManager.hasRedo(undoManager, index);
+    };
+    var transact$1 = function (editor, undoManager, locks, callback) {
+      return getRtcInstanceWithError(editor).undoManager.transact(undoManager, locks, callback);
+    };
+    var ignore$1 = function (editor, locks, callback) {
+      getRtcInstanceWithError(editor).undoManager.ignore(locks, callback);
+    };
+    var extra$1 = function (editor, undoManager, index, callback1, callback2) {
+      getRtcInstanceWithError(editor).undoManager.extra(undoManager, index, callback1, callback2);
+    };
+    var applyFormat$1 = function (editor, name, vars, node) {
+      getRtcInstanceWithError(editor).formatter.apply(name, vars, node);
+    };
+    var removeFormat$1 = function (editor, name, vars, node, similar) {
+      getRtcInstanceWithError(editor).formatter.remove(name, vars, node, similar);
+    };
+    var toggleFormat = function (editor, name, vars, node) {
+      getRtcInstanceWithError(editor).formatter.toggle(name, vars, node);
+    };
+    var getContent = function (editor, args, format) {
+      return getRtcInstanceWithFallback(editor).editor.getContent(args, format);
+    };
+    var setContent = function (editor, content, args) {
+      return getRtcInstanceWithFallback(editor).editor.setContent(content, args);
+    };
+    var insertContent = function (editor, value, details) {
+      return getRtcInstanceWithFallback(editor).editor.insertContent(value, details);
+    };
+    var getSelectedContent = function (editor, format, args) {
+      return getRtcInstanceWithError(editor).selection.getContent(format, args);
+    };
+
+    var defaultFormat$1 = 'html';
+    var getContent$1 = function (editor, args) {
+      if (args === void 0) {
+        args = {};
+      }
+      var format = args.format ? args.format : defaultFormat$1;
+      return getContent(editor, args, format);
+    };
+
+    var setContent$1 = function (editor, content, args) {
+      if (args === void 0) {
+        args = {};
+      }
+      return setContent(editor, content, args);
+    };
+
+    var firePreProcess = function (editor, args) {
+      return editor.fire('PreProcess', args);
+    };
+    var firePostProcess = function (editor, args) {
+      return editor.fire('PostProcess', args);
+    };
+    var fireRemove = function (editor) {
+      return editor.fire('remove');
+    };
+    var fireDetach = function (editor) {
+      return editor.fire('detach');
+    };
+    var fireSwitchMode = function (editor, mode) {
+      return editor.fire('SwitchMode', { mode: mode });
+    };
+    var fireObjectResizeStart = function (editor, target, width, height) {
+      editor.fire('ObjectResizeStart', {
+        target: target,
+        width: width,
+        height: height
+      });
+    };
+    var fireObjectResized = function (editor, target, width, height) {
+      editor.fire('ObjectResized', {
+        target: target,
+        width: width,
+        height: height
+      });
+    };
+    var firePreInit = function (editor) {
+      return editor.fire('PreInit');
+    };
+    var firePostRender = function (editor) {
+      return editor.fire('PostRender');
+    };
+    var fireInit = function (editor) {
+      return editor.fire('Init');
+    };
+    var firePlaceholderToggle = function (editor, state) {
+      return editor.fire('PlaceholderToggle', { state: state });
+    };
+    var fireError = function (editor, errorType, error) {
+      return editor.fire(errorType, error);
+    };
+
+    var DOM$3 = DOMUtils$1.DOM;
+    var restoreOriginalStyles = function (editor) {
+      DOM$3.setStyle(editor.id, 'display', editor.orgDisplay);
+    };
+    var safeDestroy = function (x) {
+      return Option.from(x).each(function (x) {
+        return x.destroy();
+      });
+    };
+    var clearDomReferences = function (editor) {
+      editor.contentAreaContainer = editor.formElement = editor.container = editor.editorContainer = null;
+      editor.bodyElement = editor.contentDocument = editor.contentWindow = null;
+      editor.iframeElement = editor.targetElm = null;
+      if (editor.selection) {
+        editor.selection = editor.selection.win = editor.selection.dom = editor.selection.dom.doc = null;
+      }
+    };
+    var restoreForm = function (editor) {
+      var form = editor.formElement;
+      if (form) {
+        if (form._mceOldSubmit) {
+          form.submit = form._mceOldSubmit;
+          form._mceOldSubmit = null;
+        }
+        DOM$3.unbind(form, 'submit reset', editor.formEventDelegate);
+      }
+    };
+    var remove$7 = function (editor) {
+      if (!editor.removed) {
+        var _selectionOverrides = editor._selectionOverrides, editorUpload = editor.editorUpload;
+        var body = editor.getBody();
+        var element = editor.getElement();
+        if (body) {
+          editor.save({ is_removing: true });
+        }
+        editor.removed = true;
+        editor.unbindAllNativeEvents();
+        if (editor.hasHiddenInput && element) {
+          DOM$3.remove(element.nextSibling);
+        }
+        fireRemove(editor);
+        editor.editorManager.remove(editor);
+        if (!editor.inline && body) {
+          restoreOriginalStyles(editor);
+        }
+        fireDetach(editor);
+        DOM$3.remove(editor.getContainer());
+        safeDestroy(_selectionOverrides);
+        safeDestroy(editorUpload);
+        editor.destroy();
+      }
+    };
+    var destroy = function (editor, automatic) {
+      var selection = editor.selection, dom = editor.dom;
+      if (editor.destroyed) {
+        return;
+      }
+      if (!automatic && !editor.removed) {
+        editor.remove();
+        return;
+      }
+      if (!automatic) {
+        editor.editorManager.off('beforeunload', editor._beforeUnload);
+        if (editor.theme && editor.theme.destroy) {
+          editor.theme.destroy();
+        }
+        safeDestroy(selection);
+        safeDestroy(dom);
+      }
+      restoreForm(editor);
+      clearDomReferences(editor);
+      editor.destroyed = true;
+    };
+
+    var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
+    var deep$1 = function (old, nu) {
+      var bothObjects = isObject(old) && isObject(nu);
+      return bothObjects ? deepMerge(old, nu) : nu;
+    };
+    var baseMerge = function (merger) {
+      return function () {
+        var objects = new Array(arguments.length);
+        for (var i = 0; i < objects.length; i++) {
+          objects[i] = arguments[i];
+        }
+        if (objects.length === 0) {
+          throw new Error('Can\'t merge zero objects');
+        }
+        var ret = {};
+        for (var j = 0; j < objects.length; j++) {
+          var curObject = objects[j];
+          for (var key in curObject) {
+            if (hasOwnProperty$2.call(curObject, key)) {
+              ret[key] = merger(ret[key], curObject[key]);
+            }
+          }
+        }
+        return ret;
+      };
+    };
+    var deepMerge = baseMerge(deep$1);
+
+    var sectionResult = function (sections, settings) {
+      return {
+        sections: constant(sections),
+        settings: constant(settings)
+      };
+    };
+    var deviceDetection = detect$3().deviceType;
+    var isTouch = deviceDetection.isTouch();
+    var isPhone = deviceDetection.isPhone();
+    var isTablet = deviceDetection.isTablet();
+    var legacyMobilePlugins = [
+      'lists',
+      'autolink',
+      'autosave'
+    ];
+    var defaultTouchSettings = {
+      table_grid: false,
+      object_resizing: false,
+      resize: false
+    };
+    var normalizePlugins = function (plugins) {
+      var pluginNames = isArray(plugins) ? plugins.join(' ') : plugins;
+      var trimmedPlugins = map(isString(pluginNames) ? pluginNames.split(' ') : [], trim);
+      return filter(trimmedPlugins, function (item) {
+        return item.length > 0;
+      });
+    };
+    var filterLegacyMobilePlugins = function (plugins) {
+      return filter(plugins, curry(contains, legacyMobilePlugins));
+    };
+    var extractSections = function (keys, settings) {
+      var result = bifilter(settings, function (value, key) {
+        return contains(keys, key);
+      });
+      return sectionResult(result.t, result.f);
+    };
+    var getSection = function (sectionResult, name, defaults) {
+      if (defaults === void 0) {
+        defaults = {};
+      }
+      var sections = sectionResult.sections();
+      var sectionSettings = sections.hasOwnProperty(name) ? sections[name] : {};
+      return Tools.extend({}, defaults, sectionSettings);
+    };
+    var hasSection = function (sectionResult, name) {
+      return sectionResult.sections().hasOwnProperty(name);
+    };
+    var isSectionTheme = function (sectionResult, name, theme) {
+      var section = sectionResult.sections();
+      return hasSection(sectionResult, name) && section[name].theme === theme;
+    };
+    var getSectionConfig = function (sectionResult, name) {
+      return hasSection(sectionResult, name) ? sectionResult.sections()[name] : {};
+    };
+    var getToolbarMode = function (settings, defaultVal) {
+      return get(settings, 'toolbar_mode').orThunk(function () {
+        return get(settings, 'toolbar_drawer').map(function (val) {
+          return val === false ? 'wrap' : val;
+        });
+      }).getOr(defaultVal);
+    };
+    var getDefaultSettings = function (settings, id, documentBaseUrl, isTouch, editor) {
+      var baseDefaults = {
+        id: id,
+        theme: 'silver',
+        toolbar_mode: getToolbarMode(settings, 'floating'),
+        plugins: '',
+        document_base_url: documentBaseUrl,
+        add_form_submit_trigger: true,
+        submit_patch: true,
+        add_unload_trigger: true,
+        convert_urls: true,
+        relative_urls: true,
+        remove_script_host: true,
+        object_resizing: true,
+        doctype: '<!DOCTYPE html>',
+        visual: true,
+        font_size_legacy_values: 'xx-small,small,medium,large,x-large,xx-large,300%',
+        forced_root_block: 'p',
+        hidden_input: true,
+        inline_styles: true,
+        convert_fonts_to_spans: true,
+        indent: true,
+        indent_before: 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,' + 'tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist',
+        indent_after: 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,' + 'tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist',
+        entity_encoding: 'named',
+        url_converter: editor.convertURL,
+        url_converter_scope: editor
+      };
+      return __assign(__assign({}, baseDefaults), isTouch ? defaultTouchSettings : {});
+    };
+    var getDefaultMobileSettings = function (mobileSettings, isPhone) {
+      var defaultMobileSettings = {
+        resize: false,
+        toolbar_mode: getToolbarMode(mobileSettings, 'scrolling'),
+        toolbar_sticky: false
+      };
+      var defaultPhoneSettings = { menubar: false };
+      return __assign(__assign(__assign({}, defaultTouchSettings), defaultMobileSettings), isPhone ? defaultPhoneSettings : {});
+    };
+    var getExternalPlugins = function (overrideSettings, settings) {
+      var userDefinedExternalPlugins = settings.external_plugins ? settings.external_plugins : {};
+      if (overrideSettings && overrideSettings.external_plugins) {
+        return Tools.extend({}, overrideSettings.external_plugins, userDefinedExternalPlugins);
+      } else {
+        return userDefinedExternalPlugins;
+      }
+    };
+    var combinePlugins = function (forcedPlugins, plugins) {
+      return [].concat(normalizePlugins(forcedPlugins)).concat(normalizePlugins(plugins));
+    };
+    var processPlugins = function (isMobileDevice, sectionResult, defaultOverrideSettings, settings) {
+      var forcedPlugins = normalizePlugins(defaultOverrideSettings.forced_plugins);
+      var desktopPlugins = normalizePlugins(settings.plugins);
+      var mobileConfig = getSectionConfig(sectionResult, 'mobile');
+      var mobilePlugins = mobileConfig.plugins ? normalizePlugins(mobileConfig.plugins) : desktopPlugins;
+      var platformPlugins = isMobileDevice && isSectionTheme(sectionResult, 'mobile', 'mobile') ? filterLegacyMobilePlugins(mobilePlugins) : isMobileDevice && hasSection(sectionResult, 'mobile') ? mobilePlugins : desktopPlugins;
+      var combinedPlugins = combinePlugins(forcedPlugins, platformPlugins);
+      return Tools.extend(settings, { plugins: combinedPlugins.join(' ') });
+    };
+    var isOnMobile = function (isMobileDevice, sectionResult) {
+      return isMobileDevice && hasSection(sectionResult, 'mobile');
+    };
+    var combineSettings = function (isMobileDevice, isPhone, defaultSettings, defaultOverrideSettings, settings) {
+      var defaultDeviceSettings = isMobileDevice ? { mobile: getDefaultMobileSettings(settings.mobile || {}, isPhone) } : {};
+      var sectionResult = extractSections(['mobile'], deepMerge(defaultDeviceSettings, settings));
+      var extendedSettings = Tools.extend(defaultSettings, defaultOverrideSettings, sectionResult.settings(), isOnMobile(isMobileDevice, sectionResult) ? getSection(sectionResult, 'mobile') : {}, {
+        validate: true,
+        external_plugins: getExternalPlugins(defaultOverrideSettings, sectionResult.settings())
+      });
+      return processPlugins(isMobileDevice, sectionResult, defaultOverrideSettings, extendedSettings);
+    };
+    var getEditorSettings = function (editor, id, documentBaseUrl, defaultOverrideSettings, settings) {
+      var defaultSettings = getDefaultSettings(settings, id, documentBaseUrl, isTouch, editor);
+      return combineSettings(isPhone || isTablet, isPhone, defaultSettings, defaultOverrideSettings, settings);
+    };
+    var getFiltered = function (predicate, editor, name) {
+      return Option.from(editor.settings[name]).filter(predicate);
+    };
+    var getParamObject = function (value) {
+      var output = {};
+      if (typeof value === 'string') {
+        each(value.indexOf('=') > 0 ? value.split(/[;,](?![^=;,]*(?:[;,]|$))/) : value.split(','), function (val) {
+          var arr = val.split('=');
+          if (arr.length > 1) {
+            output[Tools.trim(arr[0])] = Tools.trim(arr[1]);
+          } else {
+            output[Tools.trim(arr[0])] = Tools.trim(arr[0]);
+          }
+        });
+      } else {
+        output = value;
+      }
+      return output;
+    };
+    var isArrayOf = function (p) {
+      return function (a) {
+        return isArray(a) && forall(a, p);
+      };
+    };
+    var getParam = function (editor, name, defaultVal, type) {
+      var value = name in editor.settings ? editor.settings[name] : defaultVal;
+      if (type === 'hash') {
+        return getParamObject(value);
+      } else if (type === 'string') {
+        return getFiltered(isString, editor, name).getOr(defaultVal);
+      } else if (type === 'number') {
+        return getFiltered(isNumber, editor, name).getOr(defaultVal);
+      } else if (type === 'boolean') {
+        return getFiltered(isBoolean, editor, name).getOr(defaultVal);
+      } else if (type === 'object') {
+        return getFiltered(isObject, editor, name).getOr(defaultVal);
+      } else if (type === 'array') {
+        return getFiltered(isArray, editor, name).getOr(defaultVal);
+      } else if (type === 'string[]') {
+        return getFiltered(isArrayOf(isString), editor, name).getOr(defaultVal);
+      } else if (type === 'function') {
+        return getFiltered(isFunction, editor, name).getOr(defaultVal);
+      } else {
+        return value;
+      }
+    };
+
+    var CreateIconManager = function () {
+      var lookup = {};
+      var add = function (id, iconPack) {
+        lookup[id] = iconPack;
+      };
+      var get = function (id) {
+        if (lookup[id]) {
+          return lookup[id];
+        }
+        return { icons: {} };
+      };
+      var has$1 = function (id) {
+        return has(lookup, id);
+      };
+      return {
+        add: add,
+        get: get,
+        has: has$1
+      };
+    };
+    var IconManager = CreateIconManager();
+
+    var getProp = function (propName, elm) {
+      var rawElm = elm.dom();
+      return rawElm[propName];
+    };
+    var getComputedSizeProp = function (propName, elm) {
+      return parseInt(get$4(elm, propName), 10);
+    };
+    var getClientWidth = curry(getProp, 'clientWidth');
+    var getClientHeight = curry(getProp, 'clientHeight');
+    var getMarginTop = curry(getComputedSizeProp, 'margin-top');
+    var getMarginLeft = curry(getComputedSizeProp, 'margin-left');
+    var getBoundingClientRect$1 = function (elm) {
+      return elm.dom().getBoundingClientRect();
+    };
+    var isInsideElementContentArea = function (bodyElm, clientX, clientY) {
+      var clientWidth = getClientWidth(bodyElm);
+      var clientHeight = getClientHeight(bodyElm);
+      return clientX >= 0 && clientY >= 0 && clientX <= clientWidth && clientY <= clientHeight;
+    };
+    var transpose = function (inline, elm, clientX, clientY) {
+      var clientRect = getBoundingClientRect$1(elm);
+      var deltaX = inline ? clientRect.left + elm.dom().clientLeft + getMarginLeft(elm) : 0;
+      var deltaY = inline ? clientRect.top + elm.dom().clientTop + getMarginTop(elm) : 0;
+      var x = clientX - deltaX;
+      var y = clientY - deltaY;
+      return {
+        x: x,
+        y: y
+      };
+    };
+    var isXYInContentArea = function (editor, clientX, clientY) {
+      var bodyElm = Element.fromDom(editor.getBody());
+      var targetElm = editor.inline ? bodyElm : documentElement(bodyElm);
+      var transposedPoint = transpose(editor.inline, targetElm, clientX, clientY);
+      return isInsideElementContentArea(targetElm, transposedPoint.x, transposedPoint.y);
+    };
+    var fromDomSafe = function (node) {
+      return Option.from(node).map(Element.fromDom);
+    };
+    var isEditorAttachedToDom = function (editor) {
+      var rawContainer = editor.inline ? editor.getBody() : editor.getContentAreaContainer();
+      return fromDomSafe(rawContainer).map(function (container) {
+        return contains$2(owner(container), container);
+      }).getOr(false);
+    };
+
+    function NotificationManagerImpl() {
+      var unimplemented = function () {
+        throw new Error('Theme did not provide a NotificationManager implementation.');
+      };
+      return {
+        open: unimplemented,
+        close: unimplemented,
+        reposition: unimplemented,
+        getArgs: unimplemented
+      };
+    }
+
+    function NotificationManager(editor) {
+      var notifications = [];
+      var getImplementation = function () {
+        var theme = editor.theme;
+        return theme && theme.getNotificationManagerImpl ? theme.getNotificationManagerImpl() : NotificationManagerImpl();
+      };
+      var getTopNotification = function () {
+        return Option.from(notifications[0]);
+      };
+      var isEqual = function (a, b) {
+        return a.type === b.type && a.text === b.text && !a.progressBar && !a.timeout && !b.progressBar && !b.timeout;
+      };
+      var reposition = function () {
+        if (notifications.length > 0) {
+          getImplementation().reposition(notifications);
+        }
+      };
+      var addNotification = function (notification) {
+        notifications.push(notification);
+      };
+      var closeNotification = function (notification) {
+        findIndex(notifications, function (otherNotification) {
+          return otherNotification === notification;
+        }).each(function (index) {
+          notifications.splice(index, 1);
+        });
+      };
+      var open = function (spec) {
+        if (editor.removed || !isEditorAttachedToDom(editor)) {
+          return;
+        }
+        return find(notifications, function (notification) {
+          return isEqual(getImplementation().getArgs(notification), spec);
+        }).getOrThunk(function () {
+          editor.editorManager.setActive(editor);
+          var notification = getImplementation().open(spec, function () {
+            closeNotification(notification);
+            reposition();
+          });
+          addNotification(notification);
+          reposition();
+          return notification;
+        });
+      };
+      var close = function () {
+        getTopNotification().each(function (notification) {
+          getImplementation().close(notification);
+          closeNotification(notification);
+          reposition();
+        });
+      };
+      var getNotifications = function () {
+        return notifications;
+      };
+      var registerEvents = function (editor) {
+        editor.on('SkinLoaded', function () {
+          var serviceMessage = editor.settings.service_message;
+          if (serviceMessage) {
+            open({
+              text: serviceMessage,
+              type: 'warning',
+              timeout: 0
+            });
+          }
+        });
+        editor.on('ResizeEditor ResizeWindow NodeChange', function () {
+          Delay.requestAnimationFrame(reposition);
+        });
+        editor.on('remove', function () {
+          each(notifications.slice(), function (notification) {
+            getImplementation().close(notification);
+          });
+        });
+      };
+      registerEvents(editor);
+      return {
+        open: open,
+        close: close,
+        getNotifications: getNotifications
+      };
+    }
+
+    var PluginManager = AddOnManager$1.PluginManager;
+
+    var ThemeManager = AddOnManager$1.ThemeManager;
+
+    function WindowManagerImpl () {
+      var unimplemented = function () {
+        throw new Error('Theme did not provide a WindowManager implementation.');
+      };
+      return {
+        open: unimplemented,
+        openUrl: unimplemented,
+        alert: unimplemented,
+        confirm: unimplemented,
+        close: unimplemented,
+        getParams: unimplemented,
+        setParams: unimplemented
+      };
+    }
+
+    var WindowManager = function (editor) {
+      var dialogs = [];
+      var getImplementation = function () {
+        var theme = editor.theme;
+        return theme && theme.getWindowManagerImpl ? theme.getWindowManagerImpl() : WindowManagerImpl();
+      };
+      var funcBind = function (scope, f) {
+        return function () {
+          return f ? f.apply(scope, arguments) : undefined;
+        };
+      };
+      var fireOpenEvent = function (dialog) {
+        editor.fire('OpenWindow', { dialog: dialog });
+      };
+      var fireCloseEvent = function (dialog) {
+        editor.fire('CloseWindow', { dialog: dialog });
+      };
+      var addDialog = function (dialog) {
+        dialogs.push(dialog);
+        fireOpenEvent(dialog);
+      };
+      var closeDialog = function (dialog) {
+        fireCloseEvent(dialog);
+        dialogs = filter(dialogs, function (otherDialog) {
+          return otherDialog !== dialog;
+        });
+        if (dialogs.length === 0) {
+          editor.focus();
+        }
+      };
+      var getTopDialog = function () {
+        return Option.from(dialogs[dialogs.length - 1]);
+      };
+      var storeSelectionAndOpenDialog = function (openDialog) {
+        editor.editorManager.setActive(editor);
+        store(editor);
+        var dialog = openDialog();
+        addDialog(dialog);
+        return dialog;
+      };
+      var open = function (args, params) {
+        return storeSelectionAndOpenDialog(function () {
+          return getImplementation().open(args, params, closeDialog);
+        });
+      };
+      var openUrl = function (args) {
+        return storeSelectionAndOpenDialog(function () {
+          return getImplementation().openUrl(args, closeDialog);
+        });
+      };
+      var alert = function (message, callback, scope) {
+        getImplementation().alert(message, funcBind(scope ? scope : this, callback));
+      };
+      var confirm = function (message, callback, scope) {
+        getImplementation().confirm(message, funcBind(scope ? scope : this, callback));
+      };
+      var close = function () {
+        getTopDialog().each(function (dialog) {
+          getImplementation().close(dialog);
+          closeDialog(dialog);
+        });
+      };
+      editor.on('remove', function () {
+        each(dialogs, function (dialog) {
+          getImplementation().close(dialog);
+        });
+      });
+      return {
+        open: open,
+        openUrl: openUrl,
+        alert: alert,
+        confirm: confirm,
+        close: close
+      };
+    };
+
+    var displayNotification = function (editor, message) {
+      editor.notificationManager.open({
+        type: 'error',
+        text: message
+      });
+    };
+    var displayError = function (editor, message) {
+      if (editor._skinLoaded) {
+        displayNotification(editor, message);
+      } else {
+        editor.on('SkinLoaded', function () {
+          displayNotification(editor, message);
+        });
+      }
+    };
+    var uploadError = function (editor, message) {
+      displayError(editor, I18n.translate([
+        'Failed to upload image: {0}',
+        message
+      ]));
+    };
+    var logError = function (editor, errorType, msg) {
+      fireError(editor, errorType, { message: msg });
+      domGlobals.console.error(msg);
+    };
+    var createLoadError = function (type, url, name) {
+      return name ? 'Failed to load ' + type + ': ' + name + ' from url ' + url : 'Failed to load ' + type + ' url: ' + url;
+    };
+    var pluginLoadError = function (editor, url, name) {
+      logError(editor, 'PluginLoadError', createLoadError('plugin', url, name));
+    };
+    var iconsLoadError = function (editor, url, name) {
+      logError(editor, 'IconsLoadError', createLoadError('icons', url, name));
+    };
+    var languageLoadError = function (editor, url, name) {
+      logError(editor, 'LanguageLoadError', createLoadError('language', url, name));
+    };
+    var pluginInitError = function (editor, name, err) {
+      var message = I18n.translate([
+        'Failed to initialize plugin: {0}',
+        name
+      ]);
+      initError(message, err);
+      displayError(editor, message);
+    };
+    var initError = function (message) {
+      var x = [];
+      for (var _i = 1; _i < arguments.length; _i++) {
+        x[_i - 1] = arguments[_i];
+      }
+      var console = domGlobals.window.console;
+      if (console) {
+        if (console.error) {
+          console.error.apply(console, __spreadArrays([message], x));
+        } else {
+          console.log.apply(console, __spreadArrays([message], x));
+        }
+      }
+    };
+
+    var isContentCssSkinName = function (url) {
+      return /^[a-z0-9\-]+$/i.test(url);
+    };
+    var getContentCssUrls = function (editor) {
+      var contentCss = getContentCss(editor);
+      var skinUrl = editor.editorManager.baseURL + '/skins/content';
+      var suffix = editor.editorManager.suffix;
+      var contentCssFile = 'content' + suffix + '.css';
+      var inline = editor.inline === true;
+      return map(contentCss, function (url) {
+        if (isContentCssSkinName(url) && !inline) {
+          return skinUrl + '/' + url + '/' + contentCssFile;
+        } else {
+          return editor.documentBaseURI.toAbsolute(url);
+        }
+      });
+    };
+    var appendContentCssFromSettings = function (editor) {
+      editor.contentCSS = editor.contentCSS.concat(getContentCssUrls(editor));
+    };
+
+    function Dimension (name, getOffset) {
+      var set = function (element, h) {
+        if (!isNumber(h) && !h.match(/^[0-9]+$/)) {
+          throw new Error(name + '.set accepts only positive integer values. Value was ' + h);
+        }
+        var dom = element.dom();
+        if (isSupported(dom)) {
+          dom.style[name] = h + 'px';
+        }
+      };
+      var get = function (element) {
+        var r = getOffset(element);
+        if (r <= 0 || r === null) {
+          var css = get$4(element, name);
+          return parseFloat(css) || 0;
+        }
+        return r;
+      };
+      var getOuter = get;
+      var aggregate = function (element, properties) {
+        return foldl(properties, function (acc, property) {
+          var val = get$4(element, property);
+          var value = val === undefined ? 0 : parseInt(val, 10);
+          return isNaN(value) ? acc : acc + value;
+        }, 0);
+      };
+      var max = function (element, value, properties) {
+        var cumulativeInclusions = aggregate(element, properties);
+        var absoluteMax = value > cumulativeInclusions ? value - cumulativeInclusions : 0;
+        return absoluteMax;
+      };
+      return {
+        set: set,
+        get: get,
+        getOuter: getOuter,
+        aggregate: aggregate,
+        max: max
+      };
+    }
+
+    var api$1 = Dimension('height', function (element) {
+      var dom = element.dom();
+      return inBody(element) ? dom.getBoundingClientRect().height : dom.offsetHeight;
+    });
+    var get$8 = function (element) {
+      return api$1.get(element);
+    };
+
+    var walkUp = function (navigation, doc) {
+      var frame = navigation.view(doc);
+      return frame.fold(constant([]), function (f) {
+        var parent = navigation.owner(f);
+        var rest = walkUp(navigation, parent);
+        return [f].concat(rest);
+      });
+    };
+    var pathTo = function (element, navigation) {
+      var d = navigation.owner(element);
+      return walkUp(navigation, d);
+    };
+
+    var view = function (doc) {
+      var element = doc.dom() === domGlobals.document ? Option.none() : Option.from(doc.dom().defaultView.frameElement);
+      return element.map(Element.fromDom);
+    };
+    var owner$1 = function (element) {
+      return owner(element);
+    };
+
+    var Navigation = /*#__PURE__*/Object.freeze({
+        __proto__: null,
+        view: view,
+        owner: owner$1
+    });
+
+    var find$3 = function (element) {
+      var doc = Element.fromDom(domGlobals.document);
+      var scroll = get$1(doc);
+      var frames = pathTo(element, Navigation);
+      var offset = viewport(element);
+      var r = foldr(frames, function (b, a) {
+        var loc = viewport(a);
+        return {
+          left: b.left + loc.left(),
+          top: b.top + loc.top()
+        };
+      }, {
+        left: 0,
+        top: 0
+      });
+      return Position(r.left + offset.left() + scroll.left(), r.top + offset.top() + scroll.top());
+    };
+
+    var excludeFromDescend = function (element) {
+      return name(element) === 'textarea';
+    };
+    var fireScrollIntoViewEvent = function (editor, data) {
+      var scrollEvent = editor.fire('ScrollIntoView', data);
+      return scrollEvent.isDefaultPrevented();
+    };
+    var fireAfterScrollIntoViewEvent = function (editor, data) {
+      editor.fire('AfterScrollIntoView', data);
+    };
+    var descend = function (element, offset) {
+      var children$1 = children(element);
+      if (children$1.length === 0 || excludeFromDescend(element)) {
+        return {
+          element: element,
+          offset: offset
+        };
+      } else if (offset < children$1.length && !excludeFromDescend(children$1[offset])) {
+        return {
+          element: children$1[offset],
+          offset: 0
+        };
+      } else {
+        var last = children$1[children$1.length - 1];
+        if (excludeFromDescend(last)) {
+          return {
+            element: element,
+            offset: offset
+          };
+        } else {
+          if (name(last) === 'img') {
+            return {
+              element: last,
+              offset: 1
+            };
+          } else if (isText(last)) {
+            return {
+              element: last,
+              offset: get$7(last).length
+            };
+          } else {
+            return {
+              element: last,
+              offset: children(last).length
+            };
+          }
+        }
+      }
+    };
+    var markerInfo = function (element, cleanupFun) {
+      var pos = absolute(element);
+      var height = get$8(element);
+      return {
+        element: element,
+        bottom: pos.top() + height,
+        height: height,
+        pos: pos,
+        cleanup: cleanupFun
+      };
+    };
+    var createMarker = function (element, offset) {
+      var startPoint = descend(element, offset);
+      var span = Element.fromHtml('<span data-mce-bogus="all">' + ZWSP + '</span>');
+      before(startPoint.element, span);
+      return markerInfo(span, function () {
+        return remove(span);
+      });
+    };
+    var elementMarker = function (element) {
+      return markerInfo(Element.fromDom(element), noop);
+    };
+    var withMarker = function (editor, f, rng, alignToTop) {
+      preserveWith(editor, function (_s, _e) {
+        return applyWithMarker(editor, f, rng, alignToTop);
+      }, rng);
+    };
+    var withScrollEvents = function (editor, doc, f, marker, alignToTop) {
+      var data = {
+        elm: marker.element.dom(),
+        alignToTop: alignToTop
+      };
+      if (fireScrollIntoViewEvent(editor, data)) {
+        return;
+      }
+      var scrollTop = get$1(doc).top();
+      f(doc, scrollTop, marker, alignToTop);
+      fireAfterScrollIntoViewEvent(editor, data);
+    };
+    var applyWithMarker = function (editor, f, rng, alignToTop) {
+      var body = Element.fromDom(editor.getBody());
+      var doc = Element.fromDom(editor.getDoc());
+      reflow(body);
+      var marker = createMarker(Element.fromDom(rng.startContainer), rng.startOffset);
+      withScrollEvents(editor, doc, f, marker, alignToTop);
+      marker.cleanup();
+    };
+    var withElement = function (editor, element, f, alignToTop) {
+      var doc = Element.fromDom(editor.getDoc());
+      withScrollEvents(editor, doc, f, elementMarker(element), alignToTop);
+    };
+    var preserveWith = function (editor, f, rng) {
+      var startElement = rng.startContainer;
+      var startOffset = rng.startOffset;
+      var endElement = rng.endContainer;
+      var endOffset = rng.endOffset;
+      f(Element.fromDom(startElement), Element.fromDom(endElement));
+      var newRng = editor.dom.createRng();
+      newRng.setStart(startElement, startOffset);
+      newRng.setEnd(endElement, endOffset);
+      editor.selection.setRng(rng);
+    };
+    var scrollToMarker = function (marker, viewHeight, alignToTop, doc) {
+      var pos = marker.pos;
+      if (alignToTop) {
+        to(pos.left(), pos.top(), doc);
+      } else {
+        var y = pos.top() - viewHeight + marker.height;
+        to(pos.left(), y, doc);
+      }
+    };
+    var intoWindowIfNeeded = function (doc, scrollTop, viewHeight, marker, alignToTop) {
+      var viewportBottom = viewHeight + scrollTop;
+      var markerTop = marker.pos.top();
+      var markerBottom = marker.bottom;
+      var largerThanViewport = markerBottom - markerTop >= viewHeight;
+      if (markerTop < scrollTop) {
+        scrollToMarker(marker, viewHeight, alignToTop !== false, doc);
+      } else if (markerTop > viewportBottom) {
+        var align = largerThanViewport ? alignToTop !== false : alignToTop === true;
+        scrollToMarker(marker, viewHeight, align, doc);
+      } else if (markerBottom > viewportBottom && !largerThanViewport) {
+        scrollToMarker(marker, viewHeight, alignToTop === true, doc);
+      }
+    };
+    var intoWindow = function (doc, scrollTop, marker, alignToTop) {
+      var viewHeight = doc.dom().defaultView.innerHeight;
+      intoWindowIfNeeded(doc, scrollTop, viewHeight, marker, alignToTop);
+    };
+    var intoFrame = function (doc, scrollTop, marker, alignToTop) {
+      var frameViewHeight = doc.dom().defaultView.innerHeight;
+      intoWindowIfNeeded(doc, scrollTop, frameViewHeight, marker, alignToTop);
+      var op = find$3(marker.element);
+      var viewportBounds = getBounds(domGlobals.window);
+      if (op.top() < viewportBounds.y) {
+        intoView(marker.element, alignToTop !== false);
+      } else if (op.top() > viewportBounds.bottom) {
+        intoView(marker.element, alignToTop === true);
+      }
+    };
+    var rangeIntoWindow = function (editor, rng, alignToTop) {
+      return withMarker(editor, intoWindow, rng, alignToTop);
+    };
+    var elementIntoWindow = function (editor, element, alignToTop) {
+      return withElement(editor, element, intoWindow, alignToTop);
+    };
+    var rangeIntoFrame = function (editor, rng, alignToTop) {
+      return withMarker(editor, intoFrame, rng, alignToTop);
+    };
+    var elementIntoFrame = function (editor, element, alignToTop) {
+      return withElement(editor, element, intoFrame, alignToTop);
+    };
+    var scrollElementIntoView = function (editor, element, alignToTop) {
+      var scroller = editor.inline ? elementIntoWindow : elementIntoFrame;
+      scroller(editor, element, alignToTop);
+    };
+    var scrollRangeIntoView = function (editor, rng, alignToTop) {
+      var scroller = editor.inline ? rangeIntoWindow : rangeIntoFrame;
+      scroller(editor, rng, alignToTop);
+    };
+
+    var hasCeProperty = function (node) {
+      return isContentEditableTrue(node) || isContentEditableFalse(node);
+    };
+    var findParent = function (node, rootNode, predicate) {
+      while (node && node !== rootNode) {
+        if (predicate(node)) {
+          return node;
+        }
+        node = node.parentNode;
+      }
+      return null;
+    };
+    var findClosestIeRange = function (clientX, clientY, doc) {
+      var element, rng, rects;
+      element = doc.elementFromPoint(clientX, clientY);
+      rng = doc.body.createTextRange();
+      if (!element || element.tagName === 'HTML') {
+        element = doc.body;
+      }
+      rng.moveToElementText(element);
+      rects = Tools.toArray(rng.getClientRects());
+      rects = rects.sort(function (a, b) {
+        a = Math.abs(Math.max(a.top - clientY, a.bottom - clientY));
+        b = Math.abs(Math.max(b.top - clientY, b.bottom - clientY));
+        return a - b;
+      });
+      if (rects.length > 0) {
+        clientY = (rects[0].bottom + rects[0].top) / 2;
+        try {
+          rng.moveToPoint(clientX, clientY);
+          rng.collapse(true);
+          return rng;
+        } catch (ex) {
+        }
+      }
+      return null;
+    };
+    var moveOutOfContentEditableFalse = function (rng, rootNode) {
+      var parentElement = rng && rng.parentElement ? rng.parentElement() : null;
+      return isContentEditableFalse(findParent(parentElement, rootNode, hasCeProperty)) ? null : rng;
+    };
+    var fromPoint$1 = function (clientX, clientY, doc) {
+      var rng, point;
+      var pointDoc = doc;
+      if (pointDoc.caretPositionFromPoint) {
+        point = pointDoc.caretPositionFromPoint(clientX, clientY);
+        if (point) {
+          rng = doc.createRange();
+          rng.setStart(point.offsetNode, point.offset);
+          rng.collapse(true);
+        }
+      } else if (doc.caretRangeFromPoint) {
+        rng = doc.caretRangeFromPoint(clientX, clientY);
+      } else if (pointDoc.body.createTextRange) {
+        rng = pointDoc.body.createTextRange();
+        try {
+          rng.moveToPoint(clientX, clientY);
+          rng.collapse(true);
+        } catch (ex) {
+          rng = findClosestIeRange(clientX, clientY, doc);
+        }
+        return moveOutOfContentEditableFalse(rng, doc.body);
+      }
+      return rng;
+    };
+
+    var getEndpointElement = function (root, rng, start, real, resolve) {
+      var container = start ? rng.startContainer : rng.endContainer;
+      var offset = start ? rng.startOffset : rng.endOffset;
+      return Option.from(container).map(Element.fromDom).map(function (elm) {
+        return !real || !rng.collapsed ? child(elm, resolve(elm, offset)).getOr(elm) : elm;
+      }).bind(function (elm) {
+        return isElement(elm) ? Option.some(elm) : parent(elm).filter(isElement);
+      }).map(function (elm) {
+        return elm.dom();
+      }).getOr(root);
+    };
+    var getStart$2 = function (root, rng, real) {
+      return getEndpointElement(root, rng, true, real, function (elm, offset) {
+        return Math.min(childNodesCount(elm), offset);
+      });
+    };
+    var getEnd = function (root, rng, real) {
+      return getEndpointElement(root, rng, false, real, function (elm, offset) {
+        return offset > 0 ? offset - 1 : offset;
+      });
+    };
+    var skipEmptyTextNodes = function (node, forwards) {
+      var orig = node;
+      while (node && isText$1(node) && node.length === 0) {
+        node = forwards ? node.nextSibling : node.previousSibling;
+      }
+      return node || orig;
+    };
+    var getNode$1 = function (root, rng) {
+      var elm, startContainer, endContainer, startOffset, endOffset;
+      if (!rng) {
+        return root;
+      }
+      startContainer = rng.startContainer;
+      endContainer = rng.endContainer;
+      startOffset = rng.startOffset;
+      endOffset = rng.endOffset;
+      elm = rng.commonAncestorContainer;
+      if (!rng.collapsed) {
+        if (startContainer === endContainer) {
+          if (endOffset - startOffset < 2) {
+            if (startContainer.hasChildNodes()) {
+              elm = startContainer.childNodes[startOffset];
+            }
+          }
+        }
+        if (startContainer.nodeType === 3 && endContainer.nodeType === 3) {
+          if (startContainer.length === startOffset) {
+            startContainer = skipEmptyTextNodes(startContainer.nextSibling, true);
+          } else {
+            startContainer = startContainer.parentNode;
+          }
+          if (endOffset === 0) {
+            endContainer = skipEmptyTextNodes(endContainer.previousSibling, false);
+          } else {
+            endContainer = endContainer.parentNode;
+          }
+          if (startContainer && startContainer === endContainer) {
+            return startContainer;
+          }
+        }
+      }
+      if (elm && elm.nodeType === 3) {
+        return elm.parentNode;
+      }
+      return elm;
+    };
+    var getSelectedBlocks = function (dom, rng, startElm, endElm) {
+      var node, root;
+      var selectedBlocks = [];
+      root = dom.getRoot();
+      startElm = dom.getParent(startElm || getStart$2(root, rng, rng.collapsed), dom.isBlock);
+      endElm = dom.getParent(endElm || getEnd(root, rng, rng.collapsed), dom.isBlock);
+      if (startElm && startElm !== root) {
+        selectedBlocks.push(startElm);
+      }
+      if (startElm && endElm && startElm !== endElm) {
+        node = startElm;
+        var walker = new TreeWalker(startElm, root);
+        while ((node = walker.next()) && node !== endElm) {
+          if (dom.isBlock(node)) {
+            selectedBlocks.push(node);
+          }
+        }
+      }
+      if (endElm && startElm !== endElm && endElm !== root) {
+        selectedBlocks.push(endElm);
+      }
+      return selectedBlocks;
+    };
+    var select$1 = function (dom, node, content) {
+      return Option.from(node).map(function (node) {
+        var idx = dom.nodeIndex(node);
+        var rng = dom.createRng();
+        rng.setStart(node.parentNode, idx);
+        rng.setEnd(node.parentNode, idx + 1);
+        if (content) {
+          moveEndPoint$1(dom, rng, node, true);
+          moveEndPoint$1(dom, rng, node, false);
+        }
+        return rng;
+      });
+    };
+
+    var getContent$2 = function (editor, args) {
+      if (args === void 0) {
+        args = {};
+      }
+      var format = args.format ? args.format : 'html';
+      return getSelectedContent(editor, format, args);
+    };
+
+    var isEq$4 = function (rng1, rng2) {
+      return rng1 && rng2 && (rng1.startContainer === rng2.startContainer && rng1.startOffset === rng2.startOffset) && (rng1.endContainer === rng2.endContainer && rng1.endOffset === rng2.endOffset);
+    };
+
+    var findParent$1 = function (node, rootNode, predicate) {
+      while (node && node !== rootNode) {
+        if (predicate(node)) {
+          return node;
+        }
+        node = node.parentNode;
+      }
+      return null;
+    };
+    var hasParent = function (node, rootNode, predicate) {
+      return findParent$1(node, rootNode, predicate) !== null;
+    };
+    var hasParentWithName = function (node, rootNode, name) {
+      return hasParent(node, rootNode, function (node) {
+        return node.nodeName === name;
+      });
+    };
+    var isTable$3 = function (node) {
+      return node && node.nodeName === 'TABLE';
+    };
+    var isTableCell$4 = function (node) {
+      return node && /^(TD|TH|CAPTION)$/.test(node.nodeName);
+    };
+    var isCeFalseCaretContainer = function (node, rootNode) {
+      return isCaretContainer(node) && hasParent(node, rootNode, isCaretNode) === false;
+    };
+    var hasBrBeforeAfter = function (dom, node, left) {
+      var walker = new TreeWalker(node, dom.getParent(node.parentNode, dom.isBlock) || dom.getRoot());
+      while (node = walker[left ? 'prev' : 'next']()) {
+        if (isBr(node)) {
+          return true;
+        }
+      }
+    };
+    var isPrevNode = function (node, name) {
+      return node.previousSibling && node.previousSibling.nodeName === name;
+    };
+    var hasContentEditableFalseParent = function (body, node) {
+      while (node && node !== body) {
+        if (isContentEditableFalse(node)) {
+          return true;
+        }
+        node = node.parentNode;
+      }
+      return false;
+    };
+    var findTextNodeRelative = function (dom, isAfterNode, collapsed, left, startNode) {
+      var lastInlineElement;
+      var body = dom.getRoot();
+      var node;
+      var nonEmptyElementsMap = dom.schema.getNonEmptyElements();
+      var parentBlockContainer = dom.getParent(startNode.parentNode, dom.isBlock) || body;
+      if (left && isBr(startNode) && isAfterNode && dom.isEmpty(parentBlockContainer)) {
+        return Option.some(CaretPosition(startNode.parentNode, dom.nodeIndex(startNode)));
+      }
+      var walker = new TreeWalker(startNode, parentBlockContainer);
+      while (node = walker[left ? 'prev' : 'next']()) {
+        if (dom.getContentEditableParent(node) === 'false' || isCeFalseCaretContainer(node, body)) {
+          return Option.none();
+        }
+        if (isText$1(node) && node.nodeValue.length > 0) {
+          if (hasParentWithName(node, body, 'A') === false) {
+            return Option.some(CaretPosition(node, left ? node.nodeValue.length : 0));
+          }
+          return Option.none();
+        }
+        if (dom.isBlock(node) || nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
+          return Option.none();
+        }
+        lastInlineElement = node;
+      }
+      if (collapsed && lastInlineElement) {
+        return Option.some(CaretPosition(lastInlineElement, 0));
+      }
+      return Option.none();
+    };
+    var normalizeEndPoint = function (dom, collapsed, start, rng) {
+      var container, offset;
+      var body = dom.getRoot();
+      var node, nonEmptyElementsMap;
+      var directionLeft, isAfterNode, normalized = false;
+      container = rng[(start ? 'start' : 'end') + 'Container'];
+      offset = rng[(start ? 'start' : 'end') + 'Offset'];
+      isAfterNode = isElement$1(container) && offset === container.childNodes.length;
+      nonEmptyElementsMap = dom.schema.getNonEmptyElements();
+      directionLeft = start;
+      if (isCaretContainer(container)) {
+        return Option.none();
+      }
+      if (isElement$1(container) && offset > container.childNodes.length - 1) {
+        directionLeft = false;
+      }
+      if (isDocument(container)) {
+        container = body;
+        offset = 0;
+      }
+      if (container === body) {
+        if (directionLeft) {
+          node = container.childNodes[offset > 0 ? offset - 1 : 0];
+          if (node) {
+            if (isCaretContainer(node)) {
+              return Option.none();
+            }
+            if (nonEmptyElementsMap[node.nodeName] || isTable$3(node)) {
+              return Option.none();
+            }
+          }
+        }
+        if (container.hasChildNodes()) {
+          offset = Math.min(!directionLeft && offset > 0 ? offset - 1 : offset, container.childNodes.length - 1);
+          container = container.childNodes[offset];
+          offset = isText$1(container) && isAfterNode ? container.data.length : 0;
+          if (!collapsed && container === body.lastChild && isTable$3(container)) {
+            return Option.none();
+          }
+          if (hasContentEditableFalseParent(body, container) || isCaretContainer(container)) {
+            return Option.none();
+          }
+          if (container.hasChildNodes() && isTable$3(container) === false) {
+            node = container;
+            var walker = new TreeWalker(container, body);
+            do {
+              if (isContentEditableFalse(node) || isCaretContainer(node)) {
+                normalized = false;
+                break;
+              }
+              if (isText$1(node) && node.nodeValue.length > 0) {
+                offset = directionLeft ? 0 : node.nodeValue.length;
+                container = node;
+                normalized = true;
+                break;
+              }
+              if (nonEmptyElementsMap[node.nodeName.toLowerCase()] && !isTableCell$4(node)) {
+                offset = dom.nodeIndex(node);
+                container = node.parentNode;
+                if (!directionLeft) {
+                  offset++;
+                }
+                normalized = true;
+                break;
+              }
+            } while (node = directionLeft ? walker.next() : walker.prev());
+          }
+        }
+      }
+      if (collapsed) {
+        if (isText$1(container) && offset === 0) {
+          findTextNodeRelative(dom, isAfterNode, collapsed, true, container).each(function (pos) {
+            container = pos.container();
+            offset = pos.offset();
+            normalized = true;
+          });
+        }
+        if (isElement$1(container)) {
+          node = container.childNodes[offset];
+          if (!node) {
+            node = container.childNodes[offset - 1];
+          }
+          if (node && isBr(node) && !isPrevNode(node, 'A') && !hasBrBeforeAfter(dom, node, false) && !hasBrBeforeAfter(dom, node, true)) {
+            findTextNodeRelative(dom, isAfterNode, collapsed, true, node).each(function (pos) {
+              container = pos.container();
+              offset = pos.offset();
+              normalized = true;
+            });
+          }
+        }
+      }
+      if (directionLeft && !collapsed && isText$1(container) && offset === container.nodeValue.length) {
+        findTextNodeRelative(dom, isAfterNode, collapsed, false, container).each(function (pos) {
+          container = pos.container();
+          offset = pos.offset();
+          normalized = true;
+        });
+      }
+      return normalized ? Option.some(CaretPosition(container, offset)) : Option.none();
+    };
+    var normalize$2 = function (dom, rng) {
+      var collapsed = rng.collapsed, normRng = rng.cloneRange();
+      var startPos = CaretPosition.fromRangeStart(rng);
+      normalizeEndPoint(dom, collapsed, true, normRng).each(function (pos) {
+        if (!collapsed || !CaretPosition.isAbove(startPos, pos)) {
+          normRng.setStart(pos.container(), pos.offset());
+        }
+      });
+      if (!collapsed) {
+        normalizeEndPoint(dom, collapsed, false, normRng).each(function (pos) {
+          normRng.setEnd(pos.container(), pos.offset());
+        });
+      }
+      if (collapsed) {
+        normRng.collapse(true);
+      }
+      return isEq$4(rng, normRng) ? Option.none() : Option.some(normRng);
+    };
+
+    var prependData = function (target, data) {
+      target.insertData(0, data);
+    };
+    var removeEmpty = function (text) {
+      if (text.dom().length === 0) {
+        remove(text);
+        return Option.none();
+      }
+      return Option.some(text);
+    };
+    var rngSetContent = function (rng, fragment) {
+      var firstChild = Option.from(fragment.firstChild).map(Element.fromDom);
+      var lastChild = Option.from(fragment.lastChild).map(Element.fromDom);
+      rng.deleteContents();
+      rng.insertNode(fragment);
+      var prevText = firstChild.bind(prevSibling).filter(isText).bind(removeEmpty);
+      var nextText = lastChild.bind(nextSibling).filter(isText).bind(removeEmpty);
+      lift2(prevText, firstChild.filter(isText), function (prev, start) {
+        prependData(start.dom(), prev.dom().data);
+        remove(prev);
+      });
+      lift2(nextText, lastChild.filter(isText), function (next, end) {
+        var oldLength = end.dom().length;
+        end.dom().appendData(next.dom().data);
+        rng.setEnd(end.dom(), oldLength);
+        remove(next);
+      });
+      rng.collapse(false);
+    };
+    var setupArgs = function (args, content) {
+      return __assign(__assign({ format: 'html' }, args), {
+        set: true,
+        selection: true,
+        content: content
+      });
+    };
+    var cleanContent = function (editor, args) {
+      if (args.format !== 'raw') {
+        var node = editor.parser.parse(args.content, __assign({
+          isRootContent: true,
+          forced_root_block: false
+        }, args));
+        return Serializer({ validate: editor.validate }, editor.schema).serialize(node);
+      } else {
+        return args.content;
+      }
+    };
+    var setContent$2 = function (editor, content, args) {
+      if (args === void 0) {
+        args = {};
+      }
+      var contentArgs = setupArgs(args, content);
+      if (!contentArgs.no_events) {
+        contentArgs = editor.fire('BeforeSetContent', contentArgs);
+        if (contentArgs.isDefaultPrevented()) {
+          editor.fire('SetContent', contentArgs);
+          return;
+        }
+      }
+      args.content = cleanContent(editor, contentArgs);
+      var rng = editor.selection.getRng();
+      rngSetContent(rng, rng.createContextualFragment(args.content));
+      editor.selection.setRng(rng);
+      scrollRangeIntoView(editor, rng);
+      if (!contentArgs.no_events) {
+        editor.fire('SetContent', contentArgs);
+      }
+    };
+
+    function BookmarkManager(selection) {
+      return {
+        getBookmark: curry(getBookmark$1, selection),
+        moveToBookmark: curry(moveToBookmark, selection)
+      };
+    }
+    (function (BookmarkManager) {
+      BookmarkManager.isBookmarkNode = isBookmarkNode$1;
+    }(BookmarkManager || (BookmarkManager = {})));
+    var BookmarkManager$1 = BookmarkManager;
+
+    var isXYWithinRange = function (clientX, clientY, range) {
+      if (range.collapsed) {
+        return false;
+      }
+      if (Env.browser.isIE() && range.startOffset === range.endOffset - 1 && range.startContainer === range.endContainer) {
+        var elm = range.startContainer.childNodes[range.startOffset];
+        if (isElement$1(elm)) {
+          return exists(elm.getClientRects(), function (rect) {
+            return containsXY(rect, clientX, clientY);
+          });
+        }
+      }
+      return exists(range.getClientRects(), function (rect) {
+        return containsXY(rect, clientX, clientY);
+      });
+    };
+
+    var VK = {
+      BACKSPACE: 8,
+      DELETE: 46,
+      DOWN: 40,
+      ENTER: 13,
+      LEFT: 37,
+      RIGHT: 39,
+      SPACEBAR: 32,
+      TAB: 9,
+      UP: 38,
+      END: 35,
+      HOME: 36,
+      modifierPressed: function (e) {
+        return e.shiftKey || e.ctrlKey || e.altKey || this.metaKeyPressed(e);
+      },
+      metaKeyPressed: function (e) {
+        return Env.mac ? e.metaKey : e.ctrlKey && !e.altKey;
+      }
+    };
+
+    var isContentEditableFalse$6 = isContentEditableFalse;
+    var isContentEditableTrue$2 = isContentEditableTrue;
+    var getContentEditableRoot = function (root, node) {
+      while (node && node !== root) {
+        if (isContentEditableTrue$2(node) || isContentEditableFalse$6(node)) {
+          return node;
+        }
+        node = node.parentNode;
+      }
+      return null;
+    };
+    var ControlSelection = function (selection, editor) {
+      var dom = editor.dom, each = Tools.each;
+      var selectedElm, selectedElmGhost, resizeHelper, resizeHandles, selectedHandle;
+      var startX, startY, selectedElmX, selectedElmY, startW, startH, ratio, resizeStarted;
+      var width, height;
+      var editableDoc = editor.getDoc(), rootDocument = domGlobals.document;
+      var abs = Math.abs, round = Math.round, rootElement = editor.getBody();
+      var startScrollWidth, startScrollHeight;
+      resizeHandles = {
+        nw: [
+          0,
+          0,
+          -1,
+          -1
+        ],
+        ne: [
+          1,
+          0,
+          1,
+          -1
+        ],
+        se: [
+          1,
+          1,
+          1,
+          1
+        ],
+        sw: [
+          0,
+          1,
+          -1,
+          1
+        ]
+      };
+      var isImage = function (elm) {
+        return elm && (elm.nodeName === 'IMG' || editor.dom.is(elm, 'figure.image'));
+      };
+      var isEventOnImageOutsideRange = function (evt, range) {
+        if (evt.type === 'longpress' || evt.type.indexOf('touch') === 0) {
+          var touch = evt.touches[0];
+          return isImage(evt.target) && !isXYWithinRange(touch.clientX, touch.clientY, range);
+        } else {
+          return isImage(evt.target) && !isXYWithinRange(evt.clientX, evt.clientY, range);
+        }
+      };
+      var contextMenuSelectImage = function (evt) {
+        var target = evt.target;
+        if (isEventOnImageOutsideRange(evt, editor.selection.getRng()) && !evt.isDefaultPrevented()) {
+          editor.selection.select(target);
+        }
+      };
+      var getResizeTarget = function (elm) {
+        return editor.dom.is(elm, 'figure.image') ? elm.querySelector('img') : elm;
+      };
+      var isResizable = function (elm) {
+        var selector = getObjectResizing(editor);
+        if (selector === false || Env.iOS) {
+          return false;
+        }
+        if (typeof selector !== 'string') {
+          selector = 'table,img,figure.image,div';
+        }
+        if (elm.getAttribute('data-mce-resize') === 'false') {
+          return false;
+        }
+        if (elm === editor.getBody()) {
+          return false;
+        }
+        return is(Element.fromDom(elm), selector);
+      };
+      var setGhostElmSize = function (ghostElm, width, height) {
+        dom.setStyles(getResizeTarget(ghostElm), {
+          width: width,
+          height: height
+        });
+      };
+      var resizeGhostElement = function (e) {
+        var deltaX, deltaY, proportional;
+        var resizeHelperX, resizeHelperY;
+        deltaX = e.screenX - startX;
+        deltaY = e.screenY - startY;
+        width = deltaX * selectedHandle[2] + startW;
+        height = deltaY * selectedHandle[3] + startH;
+        width = width < 5 ? 5 : width;
+        height = height < 5 ? 5 : height;
+        if (isImage(selectedElm) && getResizeImgProportional(editor) !== false) {
+          proportional = !VK.modifierPressed(e);
+        } else {
+          proportional = VK.modifierPressed(e);
+        }
+        if (proportional) {
+          if (abs(deltaX) > abs(deltaY)) {
+            height = round(width * ratio);
+            width = round(height / ratio);
+          } else {
+            width = round(height / ratio);
+            height = round(width * ratio);
+          }
+        }
+        setGhostElmSize(selectedElmGhost, width, height);
+        resizeHelperX = selectedHandle.startPos.x + deltaX;
+        resizeHelperY = selectedHandle.startPos.y + deltaY;
+        resizeHelperX = resizeHelperX > 0 ? resizeHelperX : 0;
+        resizeHelperY = resizeHelperY > 0 ? resizeHelperY : 0;
+        dom.setStyles(resizeHelper, {
+          left: resizeHelperX,
+          top: resizeHelperY,
+          display: 'block'
+        });
+        resizeHelper.innerHTML = width + ' &times; ' + height;
+        if (selectedHandle[2] < 0 && selectedElmGhost.clientWidth <= width) {
+          dom.setStyle(selectedElmGhost, 'left', selectedElmX + (startW - width));
+        }
+        if (selectedHandle[3] < 0 && selectedElmGhost.clientHeight <= height) {
+          dom.setStyle(selectedElmGhost, 'top', selectedElmY + (startH - height));
+        }
+        deltaX = rootElement.scrollWidth - startScrollWidth;
+        deltaY = rootElement.scrollHeight - startScrollHeight;
+        if (deltaX + deltaY !== 0) {
+          dom.setStyles(resizeHelper, {
+            left: resizeHelperX - deltaX,
+            top: resizeHelperY - deltaY
+          });
+        }
+        if (!resizeStarted) {
+          fireObjectResizeStart(editor, selectedElm, startW, startH);
+          resizeStarted = true;
+        }
+      };
+      var endGhostResize = function () {
+        var wasResizeStarted = resizeStarted;
+        resizeStarted = false;
+        var setSizeProp = function (name, value) {
+          if (value) {
+            if (selectedElm.style[name] || !editor.schema.isValid(selectedElm.nodeName.toLowerCase(), name)) {
+              dom.setStyle(getResizeTarget(selectedElm), name, value);
+            } else {
+              dom.setAttrib(getResizeTarget(selectedElm), name, '' + value);
+            }
+          }
+        };
+        if (wasResizeStarted) {
+          setSizeProp('width', width);
+          setSizeProp('height', height);
+        }
+        dom.unbind(editableDoc, 'mousemove', resizeGhostElement);
+        dom.unbind(editableDoc, 'mouseup', endGhostResize);
+        if (rootDocument !== editableDoc) {
+          dom.unbind(rootDocument, 'mousemove', resizeGhostElement);
+          dom.unbind(rootDocument, 'mouseup', endGhostResize);
+        }
+        dom.remove(selectedElmGhost);
+        dom.remove(resizeHelper);
+        showResizeRect(selectedElm);
+        if (wasResizeStarted) {
+          fireObjectResized(editor, selectedElm, width, height);
+          dom.setAttrib(selectedElm, 'style', dom.getAttrib(selectedElm, 'style'));
+        }
+        editor.nodeChanged();
+      };
+      var showResizeRect = function (targetElm) {
+        var position, targetWidth, targetHeight, e, rect;
+        hideResizeRect();
+        unbindResizeHandleEvents();
+        position = dom.getPos(targetElm, rootElement);
+        selectedElmX = position.x;
+        selectedElmY = position.y;
+        rect = targetElm.getBoundingClientRect();
+        targetWidth = rect.width || rect.right - rect.left;
+        targetHeight = rect.height || rect.bottom - rect.top;
+        if (selectedElm !== targetElm) {
+          selectedElm = targetElm;
+          width = height = 0;
+        }
+        e = editor.fire('ObjectSelected', { target: targetElm });
+        if (isResizable(targetElm) && !e.isDefaultPrevented()) {
+          each(resizeHandles, function (handle, name) {
+            var handleElm;
+            var startDrag = function (e) {
+              startX = e.screenX;
+              startY = e.screenY;
+              startW = getResizeTarget(selectedElm).clientWidth;
+              startH = getResizeTarget(selectedElm).clientHeight;
+              ratio = startH / startW;
+              selectedHandle = handle;
+              handle.startPos = {
+                x: targetWidth * handle[0] + selectedElmX,
+                y: targetHeight * handle[1] + selectedElmY
+              };
+              startScrollWidth = rootElement.scrollWidth;
+              startScrollHeight = rootElement.scrollHeight;
+              selectedElmGhost = selectedElm.cloneNode(true);
+              dom.addClass(selectedElmGhost, 'mce-clonedresizable');
+              dom.setAttrib(selectedElmGhost, 'data-mce-bogus', 'all');
+              selectedElmGhost.contentEditable = false;
+              selectedElmGhost.unSelectabe = true;
+              dom.setStyles(selectedElmGhost, {
+                left: selectedElmX,
+                top: selectedElmY,
+                margin: 0
+              });
+              setGhostElmSize(selectedElmGhost, targetWidth, targetHeight);
+              selectedElmGhost.removeAttribute('data-mce-selected');
+              rootElement.appendChild(selectedElmGhost);
+              dom.bind(editableDoc, 'mousemove', resizeGhostElement);
+              dom.bind(editableDoc, 'mouseup', endGhostResize);
+              if (rootDocument !== editableDoc) {
+                dom.bind(rootDocument, 'mousemove', resizeGhostElement);
+                dom.bind(rootDocument, 'mouseup', endGhostResize);
+              }
+              resizeHelper = dom.add(rootElement, 'div', {
+                'class': 'mce-resize-helper',
+                'data-mce-bogus': 'all'
+              }, startW + ' &times; ' + startH);
+            };
+            handleElm = dom.get('mceResizeHandle' + name);
+            if (handleElm) {
+              dom.remove(handleElm);
+            }
+            handleElm = dom.add(rootElement, 'div', {
+              'id': 'mceResizeHandle' + name,
+              'data-mce-bogus': 'all',
+              'class': 'mce-resizehandle',
+              'unselectable': true,
+              'style': 'cursor:' + name + '-resize; margin:0; padding:0'
+            });
+            if (Env.ie === 11) {
+              handleElm.contentEditable = false;
+            }
+            dom.bind(handleElm, 'mousedown', function (e) {
+              e.stopImmediatePropagation();
+              e.preventDefault();
+              startDrag(e);
+            });
+            handle.elm = handleElm;
+            dom.setStyles(handleElm, {
+              left: targetWidth * handle[0] + selectedElmX - handleElm.offsetWidth / 2,
+              top: targetHeight * handle[1] + selectedElmY - handleElm.offsetHeight / 2
+            });
+          });
+        } else {
+          hideResizeRect();
+        }
+        selectedElm.setAttribute('data-mce-selected', '1');
+      };
+      var hideResizeRect = function () {
+        unbindResizeHandleEvents();
+        if (selectedElm) {
+          selectedElm.removeAttribute('data-mce-selected');
+        }
+        each$1(resizeHandles, function (value, name) {
+          var handleElm = dom.get('mceResizeHandle' + name);
+          if (handleElm) {
+            dom.unbind(handleElm);
+            dom.remove(handleElm);
+          }
+        });
+      };
+      var updateResizeRect = function (e) {
+        var startElm, controlElm;
+        var isChildOrEqual = function (node, parent) {
+          if (node) {
+            do {
+              if (node === parent) {
+                return true;
+              }
+            } while (node = node.parentNode);
+          }
+        };
+        if (resizeStarted || editor.removed) {
+          return;
+        }
+        each(dom.select('img[data-mce-selected],hr[data-mce-selected]'), function (img) {
+          img.removeAttribute('data-mce-selected');
+        });
+        controlElm = e.type === 'mousedown' ? e.target : selection.getNode();
+        controlElm = dom.$(controlElm).closest('table,img,figure.image,hr')[0];
+        if (isChildOrEqual(controlElm, rootElement)) {
+          disableGeckoResize();
+          startElm = selection.getStart(true);
+          if (isChildOrEqual(startElm, controlElm) && isChildOrEqual(selection.getEnd(true), controlElm)) {
+            showResizeRect(controlElm);
+            return;
+          }
+        }
+        hideResizeRect();
+      };
+      var isWithinContentEditableFalse = function (elm) {
+        return isContentEditableFalse$6(getContentEditableRoot(editor.getBody(), elm));
+      };
+      var unbindResizeHandleEvents = function () {
+        each$1(resizeHandles, function (handle) {
+          if (handle.elm) {
+            dom.unbind(handle.elm);
+            delete handle.elm;
+          }
+        });
+      };
+      var disableGeckoResize = function () {
+        try {
+          editor.getDoc().execCommand('enableObjectResizing', false, false);
+        } catch (ex) {
+        }
+      };
+      editor.on('init', function () {
+        disableGeckoResize();
+        if (Env.browser.isIE() || Env.browser.isEdge()) {
+          editor.on('mousedown click', function (e) {
+            var target = e.target, nodeName = target.nodeName;
+            if (!resizeStarted && /^(TABLE|IMG|HR)$/.test(nodeName) && !isWithinContentEditableFalse(target)) {
+              if (e.button !== 2) {
+                editor.selection.select(target, nodeName === 'TABLE');
+              }
+              if (e.type === 'mousedown') {
+                editor.nodeChanged();
+              }
+            }
+          });
+          var handleMSControlSelect_1 = function (e) {
+            var delayedSelect = function (node) {
+              Delay.setEditorTimeout(editor, function () {
+                return editor.selection.select(node);
+              });
+            };
+            if (isWithinContentEditableFalse(e.target)) {
+              e.preventDefault();
+              delayedSelect(e.target);
+              return;
+            }
+            if (/^(TABLE|IMG|HR)$/.test(e.target.nodeName)) {
+              e.preventDefault();
+              if (e.target.tagName === 'IMG') {
+                delayedSelect(e.target);
+              }
+            }
+          };
+          dom.bind(rootElement, 'mscontrolselect', handleMSControlSelect_1);
+          editor.on('remove', function () {
+            return dom.unbind(rootElement, 'mscontrolselect', handleMSControlSelect_1);
+          });
+        }
+        var throttledUpdateResizeRect = Delay.throttle(function (e) {
+          if (!editor.composing) {
+            updateResizeRect(e);
+          }
+        });
+        editor.on('nodechange ResizeEditor ResizeWindow ResizeContent drop FullscreenStateChanged', throttledUpdateResizeRect);
+        editor.on('keyup compositionend', function (e) {
+          if (selectedElm && selectedElm.nodeName === 'TABLE') {
+            throttledUpdateResizeRect(e);
+          }
+        });
+        editor.on('hide blur', hideResizeRect);
+        editor.on('contextmenu longpress', contextMenuSelectImage, true);
+      });
+      editor.on('remove', unbindResizeHandleEvents);
+      var destroy = function () {
+        selectedElm = selectedElmGhost = null;
+      };
+      return {
+        isResizable: isResizable,
+        showResizeRect: showResizeRect,
+        hideResizeRect: hideResizeRect,
+        updateResizeRect: updateResizeRect,
+        destroy: destroy
+      };
+    };
+
+    var deleteFromCallbackMap = function (callbackMap, selector, callback) {
+      if (callbackMap && callbackMap.hasOwnProperty(selector)) {
+        var newCallbacks = filter(callbackMap[selector], function (cb) {
+          return cb !== callback;
+        });
+        if (newCallbacks.length === 0) {
+          delete callbackMap[selector];
+        } else {
+          callbackMap[selector] = newCallbacks;
+        }
+      }
+    };
+    function SelectorChanged (dom, editor) {
+      var selectorChangedData;
+      var currentSelectors;
+      return {
+        selectorChangedWithUnbind: function (selector, callback) {
+          if (!selectorChangedData) {
+            selectorChangedData = {};
+            currentSelectors = {};
+            editor.on('NodeChange', function (e) {
+              var node = e.element, parents = dom.getParents(node, null, dom.getRoot()), matchedSelectors = {};
+              Tools.each(selectorChangedData, function (callbacks, selector) {
+                Tools.each(parents, function (node) {
+                  if (dom.is(node, selector)) {
+                    if (!currentSelectors[selector]) {
+                      Tools.each(callbacks, function (callback) {
+                        callback(true, {
+                          node: node,
+                          selector: selector,
+                          parents: parents
+                        });
+                      });
+                      currentSelectors[selector] = callbacks;
+                    }
+                    matchedSelectors[selector] = callbacks;
+                    return false;
+                  }
+                });
+              });
+              Tools.each(currentSelectors, function (callbacks, selector) {
+                if (!matchedSelectors[selector]) {
+                  delete currentSelectors[selector];
+                  Tools.each(callbacks, function (callback) {
+                    callback(false, {
+                      node: node,
+                      selector: selector,
+                      parents: parents
+                    });
+                  });
+                }
+              });
+            });
+          }
+          if (!selectorChangedData[selector]) {
+            selectorChangedData[selector] = [];
+          }
+          selectorChangedData[selector].push(callback);
+          return {
+            unbind: function () {
+              deleteFromCallbackMap(selectorChangedData, selector, callback);
+              deleteFromCallbackMap(currentSelectors, selector, callback);
+            }
+          };
+        }
+      };
+    }
+
+    var isNativeIeSelection = function (rng) {
+      return !!rng.select;
+    };
+    var isAttachedToDom = function (node) {
+      return !!(node && node.ownerDocument) && contains$2(Element.fromDom(node.ownerDocument), Element.fromDom(node));
+    };
+    var isValidRange = function (rng) {
+      if (!rng) {
+        return false;
+      } else if (isNativeIeSelection(rng)) {
+        return true;
+      } else {
+        return isAttachedToDom(rng.startContainer) && isAttachedToDom(rng.endContainer);
+      }
+    };
+    var Selection$1 = function (dom, win, serializer, editor) {
+      var bookmarkManager;
+      var controlSelection;
+      var selectedRange;
+      var explicitRange;
+      var selectorChangedWithUnbind = SelectorChanged(dom, editor).selectorChangedWithUnbind;
+      var setCursorLocation = function (node, offset) {
+        var rng = dom.createRng();
+        if (!node) {
+          moveEndPoint$1(dom, rng, editor.getBody(), true);
+          setRng(rng);
+        } else {
+          rng.setStart(node, offset);
+          rng.setEnd(node, offset);
+          setRng(rng);
+          collapse(false);
+        }
+      };
+      var getContent = function (args) {
+        return getContent$2(editor, args);
+      };
+      var setContent = function (content, args) {
+        return setContent$2(editor, content, args);
+      };
+      var getStart = function (real) {
+        return getStart$2(editor.getBody(), getRng$1(), real);
+      };
+      var getEnd$1 = function (real) {
+        return getEnd(editor.getBody(), getRng$1(), real);
+      };
+      var getBookmark = function (type, normalized) {
+        return bookmarkManager.getBookmark(type, normalized);
+      };
+      var moveToBookmark = function (bookmark) {
+        return bookmarkManager.moveToBookmark(bookmark);
+      };
+      var select = function (node, content) {
+        select$1(dom, node, content).each(setRng);
+        return node;
+      };
+      var isCollapsed = function () {
+        var rng = getRng$1(), sel = getSel();
+        if (!rng || rng.item) {
+          return false;
+        }
+        if (rng.compareEndPoints) {
+          return rng.compareEndPoints('StartToEnd', rng) === 0;
+        }
+        return !sel || rng.collapsed;
+      };
+      var collapse = function (toStart) {
+        var rng = getRng$1();
+        rng.collapse(!!toStart);
+        setRng(rng);
+      };
+      var getSel = function () {
+        return win.getSelection ? win.getSelection() : win.document.selection;
+      };
+      var getRng$1 = function () {
+        var selection, rng, elm, doc;
+        var tryCompareBoundaryPoints = function (how, sourceRange, destinationRange) {
+          try {
+            return sourceRange.compareBoundaryPoints(how, destinationRange);
+          } catch (ex) {
+            return -1;
+          }
+        };
+        if (!win) {
+          return null;
+        }
+        doc = win.document;
+        if (typeof doc === 'undefined' || doc === null) {
+          return null;
+        }
+        if (editor.bookmark !== undefined && hasFocus$1(editor) === false) {
+          var bookmark = getRng(editor);
+          if (bookmark.isSome()) {
+            return bookmark.map(function (r) {
+              return processRanges(editor, [r])[0];
+            }).getOr(doc.createRange());
+          }
+        }
+        try {
+          if ((selection = getSel()) && !isRestrictedNode(selection.anchorNode)) {
+            if (selection.rangeCount > 0) {
+              rng = selection.getRangeAt(0);
+            } else {
+              rng = selection.createRange ? selection.createRange() : doc.createRange();
+            }
+          }
+        } catch (ex) {
+        }
+        rng = processRanges(editor, [rng])[0];
+        if (!rng) {
+          rng = doc.createRange ? doc.createRange() : doc.body.createTextRange();
+        }
+        if (rng.setStart && rng.startContainer.nodeType === 9 && rng.collapsed) {
+          elm = dom.getRoot();
+          rng.setStart(elm, 0);
+          rng.setEnd(elm, 0);
+        }
+        if (selectedRange && explicitRange) {
+          if (tryCompareBoundaryPoints(rng.START_TO_START, rng, selectedRange) === 0 && tryCompareBoundaryPoints(rng.END_TO_END, rng, selectedRange) === 0) {
+            rng = explicitRange;
+          } else {
+            selectedRange = null;
+            explicitRange = null;
+          }
+        }
+        return rng;
+      };
+      var setRng = function (rng, forward) {
+        var sel, node, evt;
+        if (!isValidRange(rng)) {
+          return;
+        }
+        var ieRange = isNativeIeSelection(rng) ? rng : null;
+        if (ieRange) {
+          explicitRange = null;
+          try {
+            ieRange.select();
+          } catch (ex) {
+          }
+          return;
+        }
+        sel = getSel();
+        evt = editor.fire('SetSelectionRange', {
+          range: rng,
+          forward: forward
+        });
+        rng = evt.range;
+        if (sel) {
+          explicitRange = rng;
+          try {
+            sel.removeAllRanges();
+            sel.addRange(rng);
+          } catch (ex) {
+          }
+          if (forward === false && sel.extend) {
+            sel.collapse(rng.endContainer, rng.endOffset);
+            sel.extend(rng.startContainer, rng.startOffset);
+          }
+          selectedRange = sel.rangeCount > 0 ? sel.getRangeAt(0) : null;
+        }
+        if (!rng.collapsed && rng.startContainer === rng.endContainer && sel.setBaseAndExtent && !Env.ie) {
+          if (rng.endOffset - rng.startOffset < 2) {
+            if (rng.startContainer.hasChildNodes()) {
+              node = rng.startContainer.childNodes[rng.startOffset];
+              if (node && node.tagName === 'IMG') {
+                sel.setBaseAndExtent(rng.startContainer, rng.startOffset, rng.endContainer, rng.endOffset);
+                if (sel.anchorNode !== rng.startContainer || sel.focusNode !== rng.endContainer) {
+                  sel.setBaseAndExtent(node, 0, node, 1);
+                }
+              }
+            }
+          }
+        }
+        editor.fire('AfterSetSelectionRange', {
+          range: rng,
+          forward: forward
+        });
+      };
+      var setNode = function (elm) {
+        setContent(dom.getOuterHTML(elm));
+        return elm;
+      };
+      var getNode = function () {
+        return getNode$1(editor.getBody(), getRng$1());
+      };
+      var getSelectedBlocks$1 = function (startElm, endElm) {
+        return getSelectedBlocks(dom, getRng$1(), startElm, endElm);
+      };
+      var isForward = function () {
+        var sel = getSel();
+        var anchorRange, focusRange;
+        if (!sel || !sel.anchorNode || !sel.focusNode) {
+          return true;
+        }
+        anchorRange = dom.createRng();
+        anchorRange.setStart(sel.anchorNode, sel.anchorOffset);
+        anchorRange.collapse(true);
+        focusRange = dom.createRng();
+        focusRange.setStart(sel.focusNode, sel.focusOffset);
+        focusRange.collapse(true);
+        return anchorRange.compareBoundaryPoints(anchorRange.START_TO_START, focusRange) <= 0;
+      };
+      var normalize = function () {
+        var rng = getRng$1();
+        var sel = getSel();
+        if (!hasMultipleRanges(sel) && hasAnyRanges(editor)) {
+          var normRng = normalize$2(dom, rng);
+          normRng.each(function (normRng) {
+            setRng(normRng, isForward());
+          });
+          return normRng.getOr(rng);
+        }
+        return rng;
+      };
+      var selectorChanged = function (selector, callback) {
+        selectorChangedWithUnbind(selector, callback);
+        return exports;
+      };
+      var getScrollContainer = function () {
+        var scrollContainer;
+        var node = dom.getRoot();
+        while (node && node.nodeName !== 'BODY') {
+          if (node.scrollHeight > node.clientHeight) {
+            scrollContainer = node;
+            break;
+          }
+          node = node.parentNode;
+        }
+        return scrollContainer;
+      };
+      var scrollIntoView = function (elm, alignToTop) {
+        return scrollElementIntoView(editor, elm, alignToTop);
+      };
+      var placeCaretAt = function (clientX, clientY) {
+        return setRng(fromPoint$1(clientX, clientY, editor.getDoc()));
+      };
+      var getBoundingClientRect = function () {
+        var rng = getRng$1();
+        return rng.collapsed ? CaretPosition$1.fromRangeStart(rng).getClientRects()[0] : rng.getBoundingClientRect();
+      };
+      var destroy = function () {
+        win = selectedRange = explicitRange = null;
+        controlSelection.destroy();
+      };
+      var exports = {
+        bookmarkManager: null,
+        controlSelection: null,
+        dom: dom,
+        win: win,
+        serializer: serializer,
+        editor: editor,
+        collapse: collapse,
+        setCursorLocation: setCursorLocation,
+        getContent: getContent,
+        setContent: setContent,
+        getBookmark: getBookmark,
+        moveToBookmark: moveToBookmark,
+        select: select,
+        isCollapsed: isCollapsed,
+        isForward: isForward,
+        setNode: setNode,
+        getNode: getNode,
+        getSel: getSel,
+        setRng: setRng,
+        getRng: getRng$1,
+        getStart: getStart,
+        getEnd: getEnd$1,
+        getSelectedBlocks: getSelectedBlocks$1,
+        normalize: normalize,
+        selectorChanged: selectorChanged,
+        selectorChangedWithUnbind: selectorChangedWithUnbind,
+        getScrollContainer: getScrollContainer,
+        scrollIntoView: scrollIntoView,
+        placeCaretAt: placeCaretAt,
+        getBoundingClientRect: getBoundingClientRect,
+        destroy: destroy
+      };
+      bookmarkManager = BookmarkManager$1(exports);
+      controlSelection = ControlSelection(exports, editor);
+      exports.bookmarkManager = bookmarkManager;
+      exports.controlSelection = controlSelection;
+      return exports;
+    };
+
+    var removeAttrs = function (node, names) {
+      each(names, function (name) {
+        node.attr(name, null);
+      });
+    };
+    var addFontToSpansFilter = function (domParser, styles, fontSizes) {
+      domParser.addNodeFilter('font', function (nodes) {
+        each(nodes, function (node) {
+          var props = styles.parse(node.attr('style'));
+          var color = node.attr('color');
+          var face = node.attr('face');
+          var size = node.attr('size');
+          if (color) {
+            props.color = color;
+          }
+          if (face) {
+            props['font-family'] = face;
+          }
+          if (size) {
+            props['font-size'] = fontSizes[parseInt(node.attr('size'), 10) - 1];
+          }
+          node.name = 'span';
+          node.attr('style', styles.serialize(props));
+          removeAttrs(node, [
+            'color',
+            'face',
+            'size'
+          ]);
+        });
+      });
+    };
+    var addStrikeToSpanFilter = function (domParser, styles) {
+      domParser.addNodeFilter('strike', function (nodes) {
+        each(nodes, function (node) {
+          var props = styles.parse(node.attr('style'));
+          props['text-decoration'] = 'line-through';
+          node.name = 'span';
+          node.attr('style', styles.serialize(props));
+        });
+      });
+    };
+    var addFilters = function (domParser, settings) {
+      var styles = Styles();
+      if (settings.convert_fonts_to_spans) {
+        addFontToSpansFilter(domParser, styles, Tools.explode(settings.font_size_legacy_values));
+      }
+      addStrikeToSpanFilter(domParser, styles);
+    };
+    var register$1 = function (domParser, settings) {
+      if (settings.inline_styles) {
+        addFilters(domParser, settings);
+      }
+    };
+
+    var blobUriToBlob = function (url) {
+      return new promiseObj(function (resolve, reject) {
+        var rejectWithError = function () {
+          reject('Cannot convert ' + url + ' to Blob. Resource might not exist or is inaccessible.');
+        };
+        try {
+          var xhr = new domGlobals.XMLHttpRequest();
+          xhr.open('GET', url, true);
+          xhr.responseType = 'blob';
+          xhr.onload = function () {
+            if (this.status === 200) {
+              resolve(this.response);
+            } else {
+              rejectWithError();
+            }
+          };
+          xhr.onerror = rejectWithError;
+          xhr.send();
+        } catch (ex) {
+          rejectWithError();
+        }
+      });
+    };
+    var parseDataUri$1 = function (uri) {
+      var type, matches;
+      var uriParts = decodeURIComponent(uri).split(',');
+      matches = /data:([^;]+)/.exec(uriParts[0]);
+      if (matches) {
+        type = matches[1];
+      }
+      return {
+        type: type,
+        data: uriParts[1]
+      };
+    };
+    var buildBlob = function (type, data) {
+      var str;
+      try {
+        str = domGlobals.atob(data);
+      } catch (e) {
+        return Option.none();
+      }
+      var arr = new Uint8Array(str.length);
+      for (var i = 0; i < arr.length; i++) {
+        arr[i] = str.charCodeAt(i);
+      }
+      return Option.some(new domGlobals.Blob([arr], { type: type }));
+    };
+    var dataUriToBlob = function (uri) {
+      return new promiseObj(function (resolve) {
+        var _a = parseDataUri$1(uri), type = _a.type, data = _a.data;
+        buildBlob(type, data).fold(function () {
+          return resolve(new domGlobals.Blob([]));
+        }, resolve);
+      });
+    };
+    var uriToBlob = function (url) {
+      if (url.indexOf('blob:') === 0) {
+        return blobUriToBlob(url);
+      }
+      if (url.indexOf('data:') === 0) {
+        return dataUriToBlob(url);
+      }
+      return null;
+    };
+    var blobToDataUri = function (blob) {
+      return new promiseObj(function (resolve) {
+        var reader = new domGlobals.FileReader();
+        reader.onloadend = function () {
+          resolve(reader.result);
+        };
+        reader.readAsDataURL(blob);
+      });
+    };
+
+    var count = 0;
+    var uniqueId = function (prefix) {
+      return (prefix || 'blobid') + count++;
+    };
+    var imageToBlobInfo = function (blobCache, img, resolve, reject) {
+      var base64, blobInfo;
+      if (img.src.indexOf('blob:') === 0) {
+        blobInfo = blobCache.getByUri(img.src);
+        if (blobInfo) {
+          resolve({
+            image: img,
+            blobInfo: blobInfo
+          });
+        } else {
+          uriToBlob(img.src).then(function (blob) {
+            blobToDataUri(blob).then(function (dataUri) {
+              base64 = parseDataUri$1(dataUri).data;
+              blobInfo = blobCache.create(uniqueId(), blob, base64);
+              blobCache.add(blobInfo);
+              resolve({
+                image: img,
+                blobInfo: blobInfo
+              });
+            });
+          }, function (err) {
+            reject(err);
+          });
+        }
+        return;
+      }
+      var _a = parseDataUri$1(img.src), data = _a.data, type = _a.type;
+      base64 = data;
+      blobInfo = blobCache.getByData(base64, type);
+      if (blobInfo) {
+        resolve({
+          image: img,
+          blobInfo: blobInfo
+        });
+      } else {
+        uriToBlob(img.src).then(function (blob) {
+          blobInfo = blobCache.create(uniqueId(), blob, base64);
+          blobCache.add(blobInfo);
+          resolve({
+            image: img,
+            blobInfo: blobInfo
+          });
+        }, function (err) {
+          reject(err);
+        });
+      }
+    };
+    var getAllImages = function (elm) {
+      return elm ? from$1(elm.getElementsByTagName('img')) : [];
+    };
+    function ImageScanner(uploadStatus, blobCache) {
+      var cachedPromises = {};
+      var findAll = function (elm, predicate) {
+        var images;
+        if (!predicate) {
+          predicate = constant(true);
+        }
+        images = filter(getAllImages(elm), function (img) {
+          var src = img.src;
+          if (!Env.fileApi) {
+            return false;
+          }
+          if (img.hasAttribute('data-mce-bogus')) {
+            return false;
+          }
+          if (img.hasAttribute('data-mce-placeholder')) {
+            return false;
+          }
+          if (!src || src === Env.transparentSrc) {
+            return false;
+          }
+          if (src.indexOf('blob:') === 0) {
+            return !uploadStatus.isUploaded(src) && predicate(img);
+          }
+          if (src.indexOf('data:') === 0) {
+            return predicate(img);
+          }
+          return false;
+        });
+        var promises = map(images, function (img) {
+          if (cachedPromises[img.src] !== undefined) {
+            return new promiseObj(function (resolve) {
+              cachedPromises[img.src].then(function (imageInfo) {
+                if (typeof imageInfo === 'string') {
+                  return imageInfo;
+                }
+                resolve({
+                  image: img,
+                  blobInfo: imageInfo.blobInfo
+                });
+              });
+            });
+          }
+          var newPromise = new promiseObj(function (resolve, reject) {
+            imageToBlobInfo(blobCache, img, resolve, reject);
+          }).then(function (result) {
+            delete cachedPromises[result.image.src];
+            return result;
+          }).catch(function (error) {
+            delete cachedPromises[img.src];
+            return error;
+          });
+          cachedPromises[img.src] = newPromise;
+          return newPromise;
+        });
+        return promiseObj.all(promises);
+      };
+      return { findAll: findAll };
+    }
+
+    var paddEmptyNode = function (settings, args, blockElements, node) {
+      var brPreferred = settings.padd_empty_with_br || args.insert;
+      if (brPreferred && blockElements[node.name]) {
+        node.empty().append(new Node('br', 1)).shortEnded = true;
+      } else {
+        node.empty().append(new Node('#text', 3)).value = nbsp;
+      }
+    };
+    var isPaddedWithNbsp = function (node) {
+      return hasOnlyChild(node, '#text') && node.firstChild.value === nbsp;
+    };
+    var hasOnlyChild = function (node, name) {
+      return node && node.firstChild && node.firstChild === node.lastChild && node.firstChild.name === name;
+    };
+    var isPadded = function (schema, node) {
+      var rule = schema.getElementRule(node.name);
+      return rule && rule.paddEmpty;
+    };
+    var isEmpty$2 = function (schema, nonEmptyElements, whitespaceElements, node) {
+      return node.isEmpty(nonEmptyElements, whitespaceElements, function (node) {
+        return isPadded(schema, node);
+      });
+    };
+    var isLineBreakNode = function (node, blockElements) {
+      return node && (blockElements[node.name] || node.name === 'br');
+    };
+
+    var isBogusImage = function (img) {
+      return img.attr('data-mce-bogus');
+    };
+    var isInternalImageSource = function (img) {
+      return img.attr('src') === Env.transparentSrc || img.attr('data-mce-placeholder');
+    };
+    var isValidDataImg = function (img, settings) {
+      if (settings.images_dataimg_filter) {
+        var imgElem_1 = new domGlobals.Image();
+        imgElem_1.src = img.attr('src');
+        each$1(img.attributes.map, function (value, key) {
+          imgElem_1.setAttribute(key, value);
+        });
+        return settings.images_dataimg_filter(imgElem_1);
+      } else {
+        return true;
+      }
+    };
+    var registerBase64ImageFilter = function (parser, settings) {
+      var blobCache = settings.blob_cache;
+      var processImage = function (img) {
+        var inputSrc = img.attr('src');
+        if (isInternalImageSource(img) || isBogusImage(img)) {
+          return;
+        }
+        parseDataUri(inputSrc).filter(function () {
+          return isValidDataImg(img, settings);
+        }).bind(function (_a) {
+          var type = _a.type, data = _a.data;
+          return Option.from(blobCache.getByData(data, type)).orThunk(function () {
+            return buildBlob(type, data).map(function (blob) {
+              var blobInfo = blobCache.create(uniqueId(), blob, data);
+              blobCache.add(blobInfo);
+              return blobInfo;
+            });
+          });
+        }).each(function (blobInfo) {
+          img.attr('src', blobInfo.blobUri());
+        });
+      };
+      if (blobCache) {
+        parser.addAttributeFilter('src', function (nodes) {
+          return each(nodes, processImage);
+        });
+      }
+    };
+    var register$2 = function (parser, settings) {
+      var schema = parser.schema;
+      if (settings.remove_trailing_brs) {
+        parser.addNodeFilter('br', function (nodes, _, args) {
+          var i;
+          var l = nodes.length;
+          var node;
+          var blockElements = Tools.extend({}, schema.getBlockElements());
+          var nonEmptyElements = schema.getNonEmptyElements();
+          var parent, lastParent, prev, prevName;
+          var whiteSpaceElements = schema.getNonEmptyElements();
+          var elementRule, textNode;
+          blockElements.body = 1;
+          for (i = 0; i < l; i++) {
+            node = nodes[i];
+            parent = node.parent;
+            if (blockElements[node.parent.name] && node === parent.lastChild) {
+              prev = node.prev;
+              while (prev) {
+                prevName = prev.name;
+                if (prevName !== 'span' || prev.attr('data-mce-type') !== 'bookmark') {
+                  if (prevName !== 'br') {
+                    break;
+                  }
+                  if (prevName === 'br') {
+                    node = null;
+                    break;
+                  }
+                }
+                prev = prev.prev;
+              }
+              if (node) {
+                node.remove();
+                if (isEmpty$2(schema, nonEmptyElements, whiteSpaceElements, parent)) {
+                  elementRule = schema.getElementRule(parent.name);
+                  if (elementRule) {
+                    if (elementRule.removeEmpty) {
+                      parent.remove();
+                    } else if (elementRule.paddEmpty) {
+                      paddEmptyNode(settings, args, blockElements, parent);
+                    }
+                  }
+                }
+              }
+            } else {
+              lastParent = node;
+              while (parent && parent.firstChild === lastParent && parent.lastChild === lastParent) {
+                lastParent = parent;
+                if (blockElements[parent.name]) {
+                  break;
+                }
+                parent = parent.parent;
+              }
+              if (lastParent === parent && settings.padd_empty_with_br !== true) {
+                textNode = new Node('#text', 3);
+                textNode.value = nbsp;
+                node.replace(textNode);
+              }
+            }
+          }
+        });
+      }
+      parser.addAttributeFilter('href', function (nodes) {
+        var i = nodes.length;
+        var appendRel = function (rel) {
+          var parts = rel.split(' ').filter(function (p) {
+            return p.length > 0;
+          });
+          return parts.concat(['noopener']).sort().join(' ');
+        };
+        var addNoOpener = function (rel) {
+          var newRel = rel ? Tools.trim(rel) : '';
+          if (!/\b(noopener)\b/g.test(newRel)) {
+            return appendRel(newRel);
+          } else {
+            return newRel;
+          }
+        };
+        if (!settings.allow_unsafe_link_target) {
+          while (i--) {
+            var node = nodes[i];
+            if (node.name === 'a' && node.attr('target') === '_blank') {
+              node.attr('rel', addNoOpener(node.attr('rel')));
+            }
+          }
+        }
+      });
+      if (!settings.allow_html_in_named_anchor) {
+        parser.addAttributeFilter('id,name', function (nodes) {
+          var i = nodes.length, sibling, prevSibling, parent, node;
+          while (i--) {
+            node = nodes[i];
+            if (node.name === 'a' && node.firstChild && !node.attr('href')) {
+              parent = node.parent;
+              sibling = node.lastChild;
+              do {
+                prevSibling = sibling.prev;
+                parent.insert(sibling, node);
+                sibling = prevSibling;
+              } while (sibling);
+            }
+          }
+        });
+      }
+      if (settings.fix_list_elements) {
+        parser.addNodeFilter('ul,ol', function (nodes) {
+          var i = nodes.length, node, parentNode;
+          while (i--) {
+            node = nodes[i];
+            parentNode = node.parent;
+            if (parentNode.name === 'ul' || parentNode.name === 'ol') {
+              if (node.prev && node.prev.name === 'li') {
+                node.prev.append(node);
+              } else {
+                var li = new Node('li', 1);
+                li.attr('style', 'list-style-type: none');
+                node.wrap(li);
+              }
+            }
+          }
+        });
+      }
+      if (settings.validate && schema.getValidClasses()) {
+        parser.addAttributeFilter('class', function (nodes) {
+          var i = nodes.length, node, classList, ci, className, classValue;
+          var validClasses = schema.getValidClasses();
+          var validClassesMap, valid;
+          while (i--) {
+            node = nodes[i];
+            classList = node.attr('class').split(' ');
+            classValue = '';
+            for (ci = 0; ci < classList.length; ci++) {
+              className = classList[ci];
+              valid = false;
+              validClassesMap = validClasses['*'];
+              if (validClassesMap && validClassesMap[className]) {
+                valid = true;
+              }
+              validClassesMap = validClasses[node.name];
+              if (!valid && validClassesMap && validClassesMap[className]) {
+                valid = true;
+              }
+              if (valid) {
+                if (classValue) {
+                  classValue += ' ';
+                }
+                classValue += className;
+              }
+            }
+            if (!classValue.length) {
+              classValue = null;
+            }
+            node.attr('class', classValue);
+          }
+        });
+      }
+      registerBase64ImageFilter(parser, settings);
+    };
+
+    var makeMap$4 = Tools.makeMap, each$c = Tools.each, explode$2 = Tools.explode, extend$2 = Tools.extend;
+    var DomParser = function (settings, schema) {
+      if (schema === void 0) {
+        schema = Schema();
+      }
+      var nodeFilters = {};
+      var attributeFilters = [];
+      var matchedNodes = {};
+      var matchedAttributes = {};
+      settings = settings || {};
+      settings.validate = 'validate' in settings ? settings.validate : true;
+      settings.root_name = settings.root_name || 'body';
+      var fixInvalidChildren = function (nodes) {
+        var ni, node, parent, parents, newParent, currentNode, tempNode, childNode, i;
+        var nonEmptyElements, whitespaceElements, nonSplitableElements, textBlockElements, specialElements, sibling, nextNode;
+        nonSplitableElements = makeMap$4('tr,td,th,tbody,thead,tfoot,table');
+        nonEmptyElements = schema.getNonEmptyElements();
+        whitespaceElements = schema.getWhiteSpaceElements();
+        textBlockElements = schema.getTextBlockElements();
+        specialElements = schema.getSpecialElements();
+        for (ni = 0; ni < nodes.length; ni++) {
+          node = nodes[ni];
+          if (!node.parent || node.fixed) {
+            continue;
+          }
+          if (textBlockElements[node.name] && node.parent.name === 'li') {
+            sibling = node.next;
+            while (sibling) {
+              if (textBlockElements[sibling.name]) {
+                sibling.name = 'li';
+                sibling.fixed = true;
+                node.parent.insert(sibling, node.parent);
+              } else {
+                break;
+              }
+              sibling = sibling.next;
+            }
+            node.unwrap(node);
+            continue;
+          }
+          parents = [node];
+          for (parent = node.parent; parent && !schema.isValidChild(parent.name, node.name) && !nonSplitableElements[parent.name]; parent = parent.parent) {
+            parents.push(parent);
+          }
+          if (parent && parents.length > 1) {
+            parents.reverse();
+            newParent = currentNode = filterNode(parents[0].clone());
+            for (i = 0; i < parents.length - 1; i++) {
+              if (schema.isValidChild(currentNode.name, parents[i].name)) {
+                tempNode = filterNode(parents[i].clone());
+                currentNode.append(tempNode);
+              } else {
+                tempNode = currentNode;
+              }
+              for (childNode = parents[i].firstChild; childNode && childNode !== parents[i + 1];) {
+                nextNode = childNode.next;
+                tempNode.append(childNode);
+                childNode = nextNode;
+              }
+              currentNode = tempNode;
+            }
+            if (!isEmpty$2(schema, nonEmptyElements, whitespaceElements, newParent)) {
+              parent.insert(newParent, parents[0], true);
+              parent.insert(node, newParent);
+            } else {
+              parent.insert(node, parents[0], true);
+            }
+            parent = parents[0];
+            if (isEmpty$2(schema, nonEmptyElements, whitespaceElements, parent) || hasOnlyChild(parent, 'br')) {
+              parent.empty().remove();
+            }
+          } else if (node.parent) {
+            if (node.name === 'li') {
+              sibling = node.prev;
+              if (sibling && (sibling.name === 'ul' || sibling.name === 'ul')) {
+                sibling.append(node);
+                continue;
+              }
+              sibling = node.next;
+              if (sibling && (sibling.name === 'ul' || sibling.name === 'ul')) {
+                sibling.insert(node, sibling.firstChild, true);
+                continue;
+              }
+              node.wrap(filterNode(new Node('ul', 1)));
+              continue;
+            }
+            if (schema.isValidChild(node.parent.name, 'div') && schema.isValidChild('div', node.name)) {
+              node.wrap(filterNode(new Node('div', 1)));
+            } else {
+              if (specialElements[node.name]) {
+                node.empty().remove();
+              } else {
+                node.unwrap();
+              }
+            }
+          }
+        }
+      };
+      var filterNode = function (node) {
+        var i, name, list;
+        name = node.name;
+        if (name in nodeFilters) {
+          list = matchedNodes[name];
+          if (list) {
+            list.push(node);
+          } else {
+            matchedNodes[name] = [node];
+          }
+        }
+        i = attributeFilters.length;
+        while (i--) {
+          name = attributeFilters[i].name;
+          if (name in node.attributes.map) {
+            list = matchedAttributes[name];
+            if (list) {
+              list.push(node);
+            } else {
+              matchedAttributes[name] = [node];
+            }
+          }
+        }
+        return node;
+      };
+      var addNodeFilter = function (name, callback) {
+        each$c(explode$2(name), function (name) {
+          var list = nodeFilters[name];
+          if (!list) {
+            nodeFilters[name] = list = [];
+          }
+          list.push(callback);
+        });
+      };
+      var getNodeFilters = function () {
+        var out = [];
+        for (var name_1 in nodeFilters) {
+          if (nodeFilters.hasOwnProperty(name_1)) {
+            out.push({
+              name: name_1,
+              callbacks: nodeFilters[name_1]
+            });
+          }
+        }
+        return out;
+      };
+      var addAttributeFilter = function (name, callback) {
+        each$c(explode$2(name), function (name) {
+          var i;
+          for (i = 0; i < attributeFilters.length; i++) {
+            if (attributeFilters[i].name === name) {
+              attributeFilters[i].callbacks.push(callback);
+              return;
+            }
+          }
+          attributeFilters.push({
+            name: name,
+            callbacks: [callback]
+          });
+        });
+      };
+      var getAttributeFilters = function () {
+        return [].concat(attributeFilters);
+      };
+      var parse = function (html, args) {
+        var parser, nodes, i, l, fi, fl, list, name;
+        var blockElements;
+        var invalidChildren = [];
+        var isInWhiteSpacePreservedElement;
+        var node;
+        var getRootBlockName = function (name) {
+          if (name === false) {
+            return '';
+          } else if (name === true) {
+            return 'p';
+          } else {
+            return name;
+          }
+        };
+        args = args || {};
+        matchedNodes = {};
+        matchedAttributes = {};
+        blockElements = extend$2(makeMap$4('script,style,head,html,body,title,meta,param'), schema.getBlockElements());
+        var nonEmptyElements = schema.getNonEmptyElements();
+        var children = schema.children;
+        var validate = settings.validate;
+        var forcedRootBlockName = 'forced_root_block' in args ? args.forced_root_block : settings.forced_root_block;
+        var rootBlockName = getRootBlockName(forcedRootBlockName);
+        var whiteSpaceElements = schema.getWhiteSpaceElements();
+        var startWhiteSpaceRegExp = /^[ \t\r\n]+/;
+        var endWhiteSpaceRegExp = /[ \t\r\n]+$/;
+        var allWhiteSpaceRegExp = /[ \t\r\n]+/g;
+        var isAllWhiteSpaceRegExp = /^[ \t\r\n]+$/;
+        isInWhiteSpacePreservedElement = whiteSpaceElements.hasOwnProperty(args.context) || whiteSpaceElements.hasOwnProperty(settings.root_name);
+        var addRootBlocks = function () {
+          var node = rootNode.firstChild, next, rootBlockNode;
+          var trim = function (rootBlockNode) {
+            if (rootBlockNode) {
+              node = rootBlockNode.firstChild;
+              if (node && node.type === 3) {
+                node.value = node.value.replace(startWhiteSpaceRegExp, '');
+              }
+              node = rootBlockNode.lastChild;
+              if (node && node.type === 3) {
+                node.value = node.value.replace(endWhiteSpaceRegExp, '');
+              }
+            }
+          };
+          if (!schema.isValidChild(rootNode.name, rootBlockName.toLowerCase())) {
+            return;
+          }
+          while (node) {
+            next = node.next;
+            if (node.type === 3 || node.type === 1 && node.name !== 'p' && !blockElements[node.name] && !node.attr('data-mce-type')) {
+              if (!rootBlockNode) {
+                rootBlockNode = createNode(rootBlockName, 1);
+                rootBlockNode.attr(settings.forced_root_block_attrs);
+                rootNode.insert(rootBlockNode, node);
+                rootBlockNode.append(node);
+              } else {
+                rootBlockNode.append(node);
+              }
+            } else {
+              trim(rootBlockNode);
+              rootBlockNode = null;
+            }
+            node = next;
+          }
+          trim(rootBlockNode);
+        };
+        var createNode = function (name, type) {
+          var node = new Node(name, type);
+          var list;
+          if (name in nodeFilters) {
+            list = matchedNodes[name];
+            if (list) {
+              list.push(node);
+            } else {
+              matchedNodes[name] = [node];
+            }
+          }
+          return node;
+        };
+        var removeWhitespaceBefore = function (node) {
+          var textNode, textNodeNext, textVal, sibling;
+          var blockElements = schema.getBlockElements();
+          for (textNode = node.prev; textNode && textNode.type === 3;) {
+            textVal = textNode.value.replace(endWhiteSpaceRegExp, '');
+            if (textVal.length > 0) {
+              textNode.value = textVal;
+              return;
+            }
+            textNodeNext = textNode.next;
+            if (textNodeNext) {
+              if (textNodeNext.type === 3 && textNodeNext.value.length) {
+                textNode = textNode.prev;
+                continue;
+              }
+              if (!blockElements[textNodeNext.name] && textNodeNext.name !== 'script' && textNodeNext.name !== 'style') {
+                textNode = textNode.prev;
+                continue;
+              }
+            }
+            sibling = textNode.prev;
+            textNode.remove();
+            textNode = sibling;
+          }
+        };
+        var cloneAndExcludeBlocks = function (input) {
+          var name;
+          var output = {};
+          for (name in input) {
+            if (name !== 'li' && name !== 'p') {
+              output[name] = input[name];
+            }
+          }
+          return output;
+        };
+        parser = SaxParser$1({
+          validate: validate,
+          allow_script_urls: settings.allow_script_urls,
+          allow_conditional_comments: settings.allow_conditional_comments,
+          preserve_cdata: settings.preserve_cdata,
+          self_closing_elements: cloneAndExcludeBlocks(schema.getSelfClosingElements()),
+          cdata: function (text) {
+            node.append(createNode('#cdata', 4)).value = text;
+          },
+          text: function (text, raw) {
+            var textNode;
+            if (!isInWhiteSpacePreservedElement) {
+              text = text.replace(allWhiteSpaceRegExp, ' ');
+              if (isLineBreakNode(node.lastChild, blockElements)) {
+                text = text.replace(startWhiteSpaceRegExp, '');
+              }
+            }
+            if (text.length !== 0) {
+              textNode = createNode('#text', 3);
+              textNode.raw = !!raw;
+              node.append(textNode).value = text;
+            }
+          },
+          comment: function (text) {
+            node.append(createNode('#comment', 8)).value = text;
+          },
+          pi: function (name, text) {
+            node.append(createNode(name, 7)).value = text;
+            removeWhitespaceBefore(node);
+          },
+          doctype: function (text) {
+            var newNode;
+            newNode = node.append(createNode('#doctype', 10));
+            newNode.value = text;
+            removeWhitespaceBefore(node);
+          },
+          start: function (name, attrs, empty) {
+            var newNode, attrFiltersLen, elementRule, attrName, parent;
+            elementRule = validate ? schema.getElementRule(name) : {};
+            if (elementRule) {
+              newNode = createNode(elementRule.outputName || name, 1);
+              newNode.attributes = attrs;
+              newNode.shortEnded = empty;
+              node.append(newNode);
+              parent = children[node.name];
+              if (parent && children[newNode.name] && !parent[newNode.name]) {
+                invalidChildren.push(newNode);
+              }
+              attrFiltersLen = attributeFilters.length;
+              while (attrFiltersLen--) {
+                attrName = attributeFilters[attrFiltersLen].name;
+                if (attrName in attrs.map) {
+                  list = matchedAttributes[attrName];
+                  if (list) {
+                    list.push(newNode);
+                  } else {
+                    matchedAttributes[attrName] = [newNode];
+                  }
+                }
+              }
+              if (blockElements[name]) {
+                removeWhitespaceBefore(newNode);
+              }
+              if (!empty) {
+                node = newNode;
+              }
+              if (!isInWhiteSpacePreservedElement && whiteSpaceElements[name]) {
+                isInWhiteSpacePreservedElement = true;
+              }
+            }
+          },
+          end: function (name) {
+            var textNode, elementRule, text, sibling, tempNode;
+            elementRule = validate ? schema.getElementRule(name) : {};
+            if (elementRule) {
+              if (blockElements[name]) {
+                if (!isInWhiteSpacePreservedElement) {
+                  textNode = node.firstChild;
+                  if (textNode && textNode.type === 3) {
+                    text = textNode.value.replace(startWhiteSpaceRegExp, '');
+                    if (text.length > 0) {
+                      textNode.value = text;
+                      textNode = textNode.next;
+                    } else {
+                      sibling = textNode.next;
+                      textNode.remove();
+                      textNode = sibling;
+                      while (textNode && textNode.type === 3) {
+                        text = textNode.value;
+                        sibling = textNode.next;
+                        if (text.length === 0 || isAllWhiteSpaceRegExp.test(text)) {
+                          textNode.remove();
+                          textNode = sibling;
+                        }
+                        textNode = sibling;
+                      }
+                    }
+                  }
+                  textNode = node.lastChild;
+                  if (textNode && textNode.type === 3) {
+                    text = textNode.value.replace(endWhiteSpaceRegExp, '');
+                    if (text.length > 0) {
+                      textNode.value = text;
+                      textNode = textNode.prev;
+                    } else {
+                      sibling = textNode.prev;
+                      textNode.remove();
+                      textNode = sibling;
+                      while (textNode && textNode.type === 3) {
+                        text = textNode.value;
+                        sibling = textNode.prev;
+                        if (text.length === 0 || isAllWhiteSpaceRegExp.test(text)) {
+                          textNode.remove();
+                          textNode = sibling;
+                        }
+                        textNode = sibling;
+                      }
+                    }
+                  }
+                }
+              }
+              if (isInWhiteSpacePreservedElement && whiteSpaceElements[name]) {
+                isInWhiteSpacePreservedElement = false;
+              }
+              if (elementRule.removeEmpty && isEmpty$2(schema, nonEmptyElements, whiteSpaceElements, node)) {
+                tempNode = node.parent;
+                if (blockElements[node.name]) {
+                  node.empty().remove();
+                } else {
+                  node.unwrap();
+                }
+                node = tempNode;
+                return;
+              }
+              if (elementRule.paddEmpty && (isPaddedWithNbsp(node) || isEmpty$2(schema, nonEmptyElements, whiteSpaceElements, node))) {
+                paddEmptyNode(settings, args, blockElements, node);
+              }
+              node = node.parent;
+            }
+          }
+        }, schema);
+        var rootNode = node = new Node(args.context || settings.root_name, 11);
+        parser.parse(html, args.format);
+        if (validate && invalidChildren.length) {
+          if (!args.context) {
+            fixInvalidChildren(invalidChildren);
+          } else {
+            args.invalid = true;
+          }
+        }
+        if (rootBlockName && (rootNode.name === 'body' || args.isRootContent)) {
+          addRootBlocks();
+        }
+        if (!args.invalid) {
+          for (name in matchedNodes) {
+            if (!matchedNodes.hasOwnProperty(name)) {
+              continue;
+            }
+            list = nodeFilters[name];
+            nodes = matchedNodes[name];
+            fi = nodes.length;
+            while (fi--) {
+              if (!nodes[fi].parent) {
+                nodes.splice(fi, 1);
+              }
+            }
+            for (i = 0, l = list.length; i < l; i++) {
+              list[i](nodes, name, args);
+            }
+          }
+          for (i = 0, l = attributeFilters.length; i < l; i++) {
+            list = attributeFilters[i];
+            if (list.name in matchedAttributes) {
+              nodes = matchedAttributes[list.name];
+              fi = nodes.length;
+              while (fi--) {
+                if (!nodes[fi].parent) {
+                  nodes.splice(fi, 1);
+                }
+              }
+              for (fi = 0, fl = list.callbacks.length; fi < fl; fi++) {
+                list.callbacks[fi](nodes, list.name, args);
+              }
+            }
+          }
+        }
+        return rootNode;
+      };
+      var exports = {
+        schema: schema,
+        addAttributeFilter: addAttributeFilter,
+        getAttributeFilters: getAttributeFilters,
+        addNodeFilter: addNodeFilter,
+        getNodeFilters: getNodeFilters,
+        filterNode: filterNode,
+        parse: parse
+      };
+      register$2(exports, settings);
+      register$1(exports, settings);
+      return exports;
+    };
+
+    var register$3 = function (htmlParser, settings, dom) {
+      htmlParser.addAttributeFilter('data-mce-tabindex', function (nodes, name) {
+        var i = nodes.length, node;
+        while (i--) {
+          node = nodes[i];
+          node.attr('tabindex', node.attr('data-mce-tabindex'));
+          node.attr(name, null);
+        }
+      });
+      htmlParser.addAttributeFilter('src,href,style', function (nodes, name) {
+        var i = nodes.length, node, value;
+        var internalName = 'data-mce-' + name;
+        var urlConverter = settings.url_converter;
+        var urlConverterScope = settings.url_converter_scope;
+        while (i--) {
+          node = nodes[i];
+          value = node.attr(internalName);
+          if (value !== undefined) {
+            node.attr(name, value.length > 0 ? value : null);
+            node.attr(internalName, null);
+          } else {
+            value = node.attr(name);
+            if (name === 'style') {
+              value = dom.serializeStyle(dom.parseStyle(value), node.name);
+            } else if (urlConverter) {
+              value = urlConverter.call(urlConverterScope, value, name, node.name);
+            }
+            node.attr(name, value.length > 0 ? value : null);
+          }
+        }
+      });
+      htmlParser.addAttributeFilter('class', function (nodes) {
+        var i = nodes.length, node, value;
+        while (i--) {
+          node = nodes[i];
+          value = node.attr('class');
+          if (value) {
+            value = node.attr('class').replace(/(?:^|\s)mce-item-\w+(?!\S)/g, '');
+            node.attr('class', value.length > 0 ? value : null);
+          }
+        }
+      });
+      htmlParser.addAttributeFilter('data-mce-type', function (nodes, name, args) {
+        var i = nodes.length, node;
+        while (i--) {
+          node = nodes[i];
+          if (node.attr('data-mce-type') === 'bookmark' && !args.cleanup) {
+            var hasChildren = Option.from(node.firstChild).exists(function (firstChild) {
+              return !isZwsp$1(firstChild.value);
+            });
+            if (hasChildren) {
+              node.unwrap();
+            } else {
+              node.remove();
+            }
+          }
+        }
+      });
+      htmlParser.addNodeFilter('noscript', function (nodes) {
+        var i = nodes.length, node;
+        while (i--) {
+          node = nodes[i].firstChild;
+          if (node) {
+            node.value = Entities.decode(node.value);
+          }
+        }
+      });
+      htmlParser.addNodeFilter('script,style', function (nodes, name) {
+        var i = nodes.length, node, value, type;
+        var trim = function (value) {
+          return value.replace(/(<!--\[CDATA\[|\]\]-->)/g, '\n').replace(/^[\r\n]*|[\r\n]*$/g, '').replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi, '').replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g, '');
+        };
+        while (i--) {
+          node = nodes[i];
+          value = node.firstChild ? node.firstChild.value : '';
+          if (name === 'script') {
+            type = node.attr('type');
+            if (type) {
+              node.attr('type', type === 'mce-no/type' ? null : type.replace(/^mce\-/, ''));
+            }
+            if (settings.element_format === 'xhtml' && value.length > 0) {
+              node.firstChild.value = '// <![CDATA[\n' + trim(value) + '\n// ]]>';
+            }
+          } else {
+            if (settings.element_format === 'xhtml' && value.length > 0) {
+              node.firstChild.value = '<!--\n' + trim(value) + '\n-->';
+            }
+          }
+        }
+      });
+      htmlParser.addNodeFilter('#comment', function (nodes) {
+        var i = nodes.length, node;
+        while (i--) {
+          node = nodes[i];
+          if (settings.preserve_cdata && node.value.indexOf('[CDATA[') === 0) {
+            node.name = '#cdata';
+            node.type = 4;
+            node.value = dom.decode(node.value.replace(/^\[CDATA\[|\]\]$/g, ''));
+          } else if (node.value.indexOf('mce:protected ') === 0) {
+            node.name = '#text';
+            node.type = 3;
+            node.raw = true;
+            node.value = unescape(node.value).substr(14);
+          }
+        }
+      });
+      htmlParser.addNodeFilter('xml:namespace,input', function (nodes, name) {
+        var i = nodes.length, node;
+        while (i--) {
+          node = nodes[i];
+          if (node.type === 7) {
+            node.remove();
+          } else if (node.type === 1) {
+            if (name === 'input' && !node.attr('type')) {
+              node.attr('type', 'text');
+            }
+          }
+        }
+      });
+      htmlParser.addAttributeFilter('data-mce-type', function (nodes) {
+        each(nodes, function (node) {
+          if (node.attr('data-mce-type') === 'format-caret') {
+            if (node.isEmpty(htmlParser.schema.getNonEmptyElements())) {
+              node.remove();
+            } else {
+              node.unwrap();
+            }
+          }
+        });
+      });
+      htmlParser.addAttributeFilter('data-mce-src,data-mce-href,data-mce-style,' + 'data-mce-selected,data-mce-expando,' + 'data-mce-type,data-mce-resize,data-mce-placeholder', function (nodes, name) {
+        var i = nodes.length;
+        while (i--) {
+          nodes[i].attr(name, null);
+        }
+      });
+    };
+    var trimTrailingBr = function (rootNode) {
+      var brNode1, brNode2;
+      var isBr = function (node) {
+        return node && node.name === 'br';
+      };
+      brNode1 = rootNode.lastChild;
+      if (isBr(brNode1)) {
+        brNode2 = brNode1.prev;
+        if (isBr(brNode2)) {
+          brNode1.remove();
+          brNode2.remove();
+        }
+      }
+    };
+
+    var preProcess = function (editor, node, args) {
+      var impl, doc, oldDoc;
+      var dom = editor.dom;
+      node = node.cloneNode(true);
+      impl = domGlobals.document.implementation;
+      if (impl.createHTMLDocument) {
+        doc = impl.createHTMLDocument('');
+        Tools.each(node.nodeName === 'BODY' ? node.childNodes : [node], function (node) {
+          doc.body.appendChild(doc.importNode(node, true));
+        });
+        if (node.nodeName !== 'BODY') {
+          node = doc.body.firstChild;
+        } else {
+          node = doc.body;
+        }
+        oldDoc = dom.doc;
+        dom.doc = doc;
+      }
+      firePreProcess(editor, __assign(__assign({}, args), { node: node }));
+      if (oldDoc) {
+        dom.doc = oldDoc;
+      }
+      return node;
+    };
+    var shouldFireEvent = function (editor, args) {
+      return editor && editor.hasEventListeners('PreProcess') && !args.no_events;
+    };
+    var process = function (editor, node, args) {
+      return shouldFireEvent(editor, args) ? preProcess(editor, node, args) : node;
+    };
+
+    var addTempAttr = function (htmlParser, tempAttrs, name) {
+      if (Tools.inArray(tempAttrs, name) === -1) {
+        htmlParser.addAttributeFilter(name, function (nodes, name) {
+          var i = nodes.length;
+          while (i--) {
+            nodes[i].attr(name, null);
+          }
+        });
+        tempAttrs.push(name);
+      }
+    };
+    var postProcess$1 = function (editor, args, content) {
+      if (!args.no_events && editor) {
+        var outArgs = firePostProcess(editor, __assign(__assign({}, args), { content: content }));
+        return outArgs.content;
+      } else {
+        return content;
+      }
+    };
+    var getHtmlFromNode = function (dom, node, args) {
+      var html = trim$3(args.getInner ? node.innerHTML : dom.getOuterHTML(node));
+      return args.selection || isWsPreserveElement(Element.fromDom(node)) ? html : Tools.trim(html);
+    };
+    var parseHtml = function (htmlParser, html, args) {
+      var parserArgs = args.selection ? __assign({ forced_root_block: false }, args) : args;
+      var rootNode = htmlParser.parse(html, parserArgs);
+      trimTrailingBr(rootNode);
+      return rootNode;
+    };
+    var serializeNode = function (settings, schema, node) {
+      var htmlSerializer = Serializer(settings, schema);
+      return htmlSerializer.serialize(node);
+    };
+    var toHtml = function (editor, settings, schema, rootNode, args) {
+      var content = serializeNode(settings, schema, rootNode);
+      return postProcess$1(editor, args, content);
+    };
+    var DomSerializer = function (settings, editor) {
+      var tempAttrs = ['data-mce-selected'];
+      var dom = editor && editor.dom ? editor.dom : DOMUtils$1.DOM;
+      var schema = editor && editor.schema ? editor.schema : Schema(settings);
+      settings.entity_encoding = settings.entity_encoding || 'named';
+      settings.remove_trailing_brs = 'remove_trailing_brs' in settings ? settings.remove_trailing_brs : true;
+      var htmlParser = DomParser(settings, schema);
+      register$3(htmlParser, settings, dom);
+      var serialize = function (node, parserArgs) {
+        if (parserArgs === void 0) {
+          parserArgs = {};
+        }
+        var args = __assign({ format: 'html' }, parserArgs);
+        var targetNode = process(editor, node, args);
+        var html = getHtmlFromNode(dom, targetNode, args);
+        var rootNode = parseHtml(htmlParser, html, args);
+        return args.format === 'tree' ? rootNode : toHtml(editor, settings, schema, rootNode, args);
+      };
+      return {
+        schema: schema,
+        addNodeFilter: htmlParser.addNodeFilter,
+        addAttributeFilter: htmlParser.addAttributeFilter,
+        serialize: serialize,
+        addRules: function (rules) {
+          schema.addValidElements(rules);
+        },
+        setRules: function (rules) {
+          schema.setValidElements(rules);
+        },
+        addTempAttr: curry(addTempAttr, htmlParser, tempAttrs),
+        getTempAttrs: function () {
+          return tempAttrs;
+        },
+        getNodeFilters: htmlParser.getNodeFilters,
+        getAttributeFilters: htmlParser.getAttributeFilters
+      };
+    };
+
+    var Serializer$1 = function (settings, editor) {
+      var domSerializer = DomSerializer(settings, editor);
+      return {
+        schema: domSerializer.schema,
+        addNodeFilter: domSerializer.addNodeFilter,
+        addAttributeFilter: domSerializer.addAttributeFilter,
+        serialize: domSerializer.serialize,
+        addRules: domSerializer.addRules,
+        setRules: domSerializer.setRules,
+        addTempAttr: domSerializer.addTempAttr,
+        getTempAttrs: domSerializer.getTempAttrs,
+        getNodeFilters: domSerializer.getNodeFilters,
+        getAttributeFilters: domSerializer.getAttributeFilters
+      };
+    };
+
+    function Uploader(uploadStatus, settings) {
+      var pendingPromises = {};
+      var pathJoin = function (path1, path2) {
+        if (path1) {
+          return path1.replace(/\/$/, '') + '/' + path2.replace(/^\//, '');
+        }
+        return path2;
+      };
+      var defaultHandler = function (blobInfo, success, failure, progress) {
+        var xhr, formData;
+        xhr = new domGlobals.XMLHttpRequest();
+        xhr.open('POST', settings.url);
+        xhr.withCredentials = settings.credentials;
+        xhr.upload.onprogress = function (e) {
+          progress(e.loaded / e.total * 100);
+        };
+        xhr.onerror = function () {
+          failure('Image upload failed due to a XHR Transport error. Code: ' + xhr.status);
+        };
+        xhr.onload = function () {
+          var json;
+          if (xhr.status < 200 || xhr.status >= 300) {
+            failure('HTTP Error: ' + xhr.status);
+            return;
+          }
+          json = JSON.parse(xhr.responseText);
+          if (!json || typeof json.location !== 'string') {
+            failure('Invalid JSON: ' + xhr.responseText);
+            return;
+          }
+          success(pathJoin(settings.basePath, json.location));
+        };
+        formData = new domGlobals.FormData();
+        formData.append('file', blobInfo.blob(), blobInfo.filename());
+        xhr.send(formData);
+      };
+      var noUpload = function () {
+        return new promiseObj(function (resolve) {
+          resolve([]);
+        });
+      };
+      var handlerSuccess = function (blobInfo, url) {
+        return {
+          url: url,
+          blobInfo: blobInfo,
+          status: true
+        };
+      };
+      var handlerFailure = function (blobInfo, error) {
+        return {
+          url: '',
+          blobInfo: blobInfo,
+          status: false,
+          error: error
+        };
+      };
+      var resolvePending = function (blobUri, result) {
+        Tools.each(pendingPromises[blobUri], function (resolve) {
+          resolve(result);
+        });
+        delete pendingPromises[blobUri];
+      };
+      var uploadBlobInfo = function (blobInfo, handler, openNotification) {
+        uploadStatus.markPending(blobInfo.blobUri());
+        return new promiseObj(function (resolve) {
+          var notification, progress;
+          var noop = function () {
+          };
+          try {
+            var closeNotification_1 = function () {
+              if (notification) {
+                notification.close();
+                progress = noop;
+              }
+            };
+            var success = function (url) {
+              closeNotification_1();
+              uploadStatus.markUploaded(blobInfo.blobUri(), url);
+              resolvePending(blobInfo.blobUri(), handlerSuccess(blobInfo, url));
+              resolve(handlerSuccess(blobInfo, url));
+            };
+            var failure = function (error) {
+              closeNotification_1();
+              uploadStatus.removeFailed(blobInfo.blobUri());
+              resolvePending(blobInfo.blobUri(), handlerFailure(blobInfo, error));
+              resolve(handlerFailure(blobInfo, error));
+            };
+            progress = function (percent) {
+              if (percent < 0 || percent > 100) {
+                return;
+              }
+              if (!notification) {
+                notification = openNotification();
+              }
+              notification.progressBar.value(percent);
+            };
+            handler(blobInfo, success, failure, progress);
+          } catch (ex) {
+            resolve(handlerFailure(blobInfo, ex.message));
+          }
+        });
+      };
+      var isDefaultHandler = function (handler) {
+        return handler === defaultHandler;
+      };
+      var pendingUploadBlobInfo = function (blobInfo) {
+        var blobUri = blobInfo.blobUri();
+        return new promiseObj(function (resolve) {
+          pendingPromises[blobUri] = pendingPromises[blobUri] || [];
+          pendingPromises[blobUri].push(resolve);
+        });
+      };
+      var uploadBlobs = function (blobInfos, openNotification) {
+        blobInfos = Tools.grep(blobInfos, function (blobInfo) {
+          return !uploadStatus.isUploaded(blobInfo.blobUri());
+        });
+        return promiseObj.all(Tools.map(blobInfos, function (blobInfo) {
+          return uploadStatus.isPending(blobInfo.blobUri()) ? pendingUploadBlobInfo(blobInfo) : uploadBlobInfo(blobInfo, settings.handler, openNotification);
+        }));
+      };
+      var upload = function (blobInfos, openNotification) {
+        return !settings.url && isDefaultHandler(settings.handler) ? noUpload() : uploadBlobs(blobInfos, openNotification);
+      };
+      if (isFunction(settings.handler) === false) {
+        settings.handler = defaultHandler;
+      }
+      return { upload: upload };
+    }
+
+    function UploadStatus () {
+      var PENDING = 1, UPLOADED = 2;
+      var blobUriStatuses = {};
+      var createStatus = function (status, resultUri) {
+        return {
+          status: status,
+          resultUri: resultUri
+        };
+      };
+      var hasBlobUri = function (blobUri) {
+        return blobUri in blobUriStatuses;
+      };
+      var getResultUri = function (blobUri) {
+        var result = blobUriStatuses[blobUri];
+        return result ? result.resultUri : null;
+      };
+      var isPending = function (blobUri) {
+        return hasBlobUri(blobUri) ? blobUriStatuses[blobUri].status === PENDING : false;
+      };
+      var isUploaded = function (blobUri) {
+        return hasBlobUri(blobUri) ? blobUriStatuses[blobUri].status === UPLOADED : false;
+      };
+      var markPending = function (blobUri) {
+        blobUriStatuses[blobUri] = createStatus(PENDING, null);
+      };
+      var markUploaded = function (blobUri, resultUri) {
+        blobUriStatuses[blobUri] = createStatus(UPLOADED, resultUri);
+      };
+      var removeFailed = function (blobUri) {
+        delete blobUriStatuses[blobUri];
+      };
+      var destroy = function () {
+        blobUriStatuses = {};
+      };
+      return {
+        hasBlobUri: hasBlobUri,
+        getResultUri: getResultUri,
+        isPending: isPending,
+        isUploaded: isUploaded,
+        markPending: markPending,
+        markUploaded: markUploaded,
+        removeFailed: removeFailed,
+        destroy: destroy
+      };
+    }
+
+    var count$1 = 0;
+    var seed = function () {
+      var rnd = function () {
+        return Math.round(Math.random() * 4294967295).toString(36);
+      };
+      var now = new Date().getTime();
+      return 's' + now.toString(36) + rnd() + rnd() + rnd();
+    };
+    var uuid = function (prefix) {
+      return prefix + count$1++ + seed();
+    };
+
+    var BlobCache = function () {
+      var cache = [];
+      var mimeToExt = function (mime) {
+        var mimes = {
+          'image/jpeg': 'jpg',
+          'image/jpg': 'jpg',
+          'image/gif': 'gif',
+          'image/png': 'png'
+        };
+        return mimes[mime.toLowerCase()] || 'dat';
+      };
+      var create = function (o, blob, base64, filename) {
+        if (isString(o)) {
+          var id = o;
+          return toBlobInfo({
+            id: id,
+            name: filename,
+            blob: blob,
+            base64: base64
+          });
+        } else if (isObject(o)) {
+          return toBlobInfo(o);
+        } else {
+          throw new Error('Unknown input type');
+        }
+      };
+      var toBlobInfo = function (o) {
+        var id, name;
+        if (!o.blob || !o.base64) {
+          throw new Error('blob and base64 representations of the image are required for BlobInfo to be created');
+        }
+        id = o.id || uuid('blobid');
+        name = o.name || id;
+        return {
+          id: constant(id),
+          name: constant(name),
+          filename: constant(name + '.' + mimeToExt(o.blob.type)),
+          blob: constant(o.blob),
+          base64: constant(o.base64),
+          blobUri: constant(o.blobUri || domGlobals.URL.createObjectURL(o.blob)),
+          uri: constant(o.uri)
+        };
+      };
+      var add = function (blobInfo) {
+        if (!get(blobInfo.id())) {
+          cache.push(blobInfo);
+        }
+      };
+      var findFirst = function (predicate) {
+        return find(cache, predicate).getOrUndefined();
+      };
+      var get = function (id) {
+        return findFirst(function (cachedBlobInfo) {
+          return cachedBlobInfo.id() === id;
+        });
+      };
+      var getByUri = function (blobUri) {
+        return findFirst(function (blobInfo) {
+          return blobInfo.blobUri() === blobUri;
+        });
+      };
+      var getByData = function (base64, type) {
+        return findFirst(function (blobInfo) {
+          return blobInfo.base64() === base64 && blobInfo.blob().type === type;
+        });
+      };
+      var removeByUri = function (blobUri) {
+        cache = filter(cache, function (blobInfo) {
+          if (blobInfo.blobUri() === blobUri) {
+            domGlobals.URL.revokeObjectURL(blobInfo.blobUri());
+            return false;
+          }
+          return true;
+        });
+      };
+      var destroy = function () {
+        each(cache, function (cachedBlobInfo) {
+          domGlobals.URL.revokeObjectURL(cachedBlobInfo.blobUri());
+        });
+        cache = [];
+      };
+      return {
+        create: create,
+        add: add,
+        get: get,
+        getByUri: getByUri,
+        getByData: getByData,
+        findFirst: findFirst,
+        removeByUri: removeByUri,
+        destroy: destroy
+      };
+    };
+
+    var EditorUpload = function (editor) {
+      var blobCache = BlobCache();
+      var uploader, imageScanner;
+      var uploadStatus = UploadStatus();
+      var urlFilters = [];
+      var aliveGuard = function (callback) {
+        return function (result) {
+          if (editor.selection) {
+            return callback(result);
+          }
+          return [];
+        };
+      };
+      var cacheInvalidator = function (url) {
+        return url + (url.indexOf('?') === -1 ? '?' : '&') + new Date().getTime();
+      };
+      var replaceString = function (content, search, replace) {
+        var index = 0;
+        do {
+          index = content.indexOf(search, index);
+          if (index !== -1) {
+            content = content.substring(0, index) + replace + content.substr(index + search.length);
+            index += replace.length - search.length + 1;
+          }
+        } while (index !== -1);
+        return content;
+      };
+      var replaceImageUrl = function (content, targetUrl, replacementUrl) {
+        content = replaceString(content, 'src="' + targetUrl + '"', 'src="' + replacementUrl + '"');
+        content = replaceString(content, 'data-mce-src="' + targetUrl + '"', 'data-mce-src="' + replacementUrl + '"');
+        return content;
+      };
+      var replaceUrlInUndoStack = function (targetUrl, replacementUrl) {
+        each(editor.undoManager.data, function (level) {
+          if (level.type === 'fragmented') {
+            level.fragments = map(level.fragments, function (fragment) {
+              return replaceImageUrl(fragment, targetUrl, replacementUrl);
+            });
+          } else {
+            level.content = replaceImageUrl(level.content, targetUrl, replacementUrl);
+          }
+        });
+      };
+      var openNotification = function () {
+        return editor.notificationManager.open({
+          text: editor.translate('Image uploading...'),
+          type: 'info',
+          timeout: -1,
+          progressBar: true
+        });
+      };
+      var replaceImageUriInView = function (image, resultUri) {
+        var src = editor.convertURL(resultUri, 'src');
+        replaceUrlInUndoStack(image.src, resultUri);
+        editor.$(image).attr({
+          'src': shouldReuseFileName(editor) ? cacheInvalidator(resultUri) : resultUri,
+          'data-mce-src': src
+        });
+      };
+      var uploadImages = function (callback) {
+        if (!uploader) {
+          uploader = Uploader(uploadStatus, {
+            url: getImageUploadUrl(editor),
+            basePath: getImageUploadBasePath(editor),
+            credentials: getImagesUploadCredentials(editor),
+            handler: getImagesUploadHandler(editor)
+          });
+        }
+        return scanForImages().then(aliveGuard(function (imageInfos) {
+          var blobInfos = map(imageInfos, function (imageInfo) {
+            return imageInfo.blobInfo;
+          });
+          return uploader.upload(blobInfos, openNotification).then(aliveGuard(function (result) {
+            var filteredResult = map(result, function (uploadInfo, index) {
+              var blobInfo = imageInfos[index].blobInfo;
+              var image = imageInfos[index].image;
+              if (uploadInfo.status && shouldReplaceBlobUris(editor)) {
+                blobCache.removeByUri(image.src);
+                replaceImageUriInView(image, uploadInfo.url);
+              } else if (uploadInfo.error) {
+                uploadError(editor, uploadInfo.error);
+              }
+              return {
+                element: image,
+                status: uploadInfo.status,
+                uploadUri: uploadInfo.url,
+                blobInfo: blobInfo
+              };
+            });
+            if (callback) {
+              callback(filteredResult);
+            }
+            return filteredResult;
+          }));
+        }));
+      };
+      var uploadImagesAuto = function (callback) {
+        if (isAutomaticUploadsEnabled(editor)) {
+          return uploadImages(callback);
+        }
+      };
+      var isValidDataUriImage = function (imgElm) {
+        if (forall(urlFilters, function (filter) {
+            return filter(imgElm);
+          }) === false) {
+          return false;
+        }
+        if (imgElm.getAttribute('src').indexOf('data:') === 0) {
+          var dataImgFilter = getImagesDataImgFilter(editor);
+          return dataImgFilter(imgElm);
+        }
+        return true;
+      };
+      var addFilter = function (filter) {
+        urlFilters.push(filter);
+      };
+      var scanForImages = function () {
+        if (!imageScanner) {
+          imageScanner = ImageScanner(uploadStatus, blobCache);
+        }
+        return imageScanner.findAll(editor.getBody(), isValidDataUriImage).then(aliveGuard(function (result) {
+          result = filter(result, function (resultItem) {
+            if (typeof resultItem === 'string') {
+              displayError(editor, resultItem);
+              return false;
+            }
+            return true;
+          });
+          each(result, function (resultItem) {
+            replaceUrlInUndoStack(resultItem.image.src, resultItem.blobInfo.blobUri());
+            resultItem.image.src = resultItem.blobInfo.blobUri();
+            resultItem.image.removeAttribute('data-mce-src');
+          });
+          return result;
+        }));
+      };
+      var destroy = function () {
+        blobCache.destroy();
+        uploadStatus.destroy();
+        imageScanner = uploader = null;
+      };
+      var replaceBlobUris = function (content) {
+        return content.replace(/src="(blob:[^"]+)"/g, function (match, blobUri) {
+          var resultUri = uploadStatus.getResultUri(blobUri);
+          if (resultUri) {
+            return 'src="' + resultUri + '"';
+          }
+          var blobInfo = blobCache.getByUri(blobUri);
+          if (!blobInfo) {
+            blobInfo = foldl(editor.editorManager.get(), function (result, editor) {
+              return result || editor.editorUpload && editor.editorUpload.blobCache.getByUri(blobUri);
+            }, null);
+          }
+          if (blobInfo) {
+            var blob = blobInfo.blob();
+            return 'src="data:' + blob.type + ';base64,' + blobInfo.base64() + '"';
+          }
+          return match;
+        });
+      };
+      editor.on('SetContent', function () {
+        if (isAutomaticUploadsEnabled(editor)) {
+          uploadImagesAuto();
+        } else {
+          scanForImages();
+        }
+      });
+      editor.on('RawSaveContent', function (e) {
+        e.content = replaceBlobUris(e.content);
+      });
+      editor.on('GetContent', function (e) {
+        if (e.source_view || e.format === 'raw') {
+          return;
+        }
+        e.content = replaceBlobUris(e.content);
+      });
+      editor.on('PostRender', function () {
+        editor.parser.addNodeFilter('img', function (images) {
+          each(images, function (img) {
+            var src = img.attr('src');
+            if (blobCache.getByUri(src)) {
+              return;
+            }
+            var resultUri = uploadStatus.getResultUri(src);
+            if (resultUri) {
+              img.attr('src', resultUri);
+            }
+          });
+        });
+      });
+      return {
+        blobCache: blobCache,
+        addFilter: addFilter,
+        uploadImages: uploadImages,
+        uploadImagesAuto: uploadImagesAuto,
+        scanForImages: scanForImages,
+        destroy: destroy
+      };
+    };
+
+    var setup$5 = function (registeredFormatListeners, editor) {
+      var currentFormats = Cell({});
+      registeredFormatListeners.set({});
+      editor.on('NodeChange', function (e) {
+        updateAndFireChangeCallbacks(editor, e.element, currentFormats, registeredFormatListeners.get());
+      });
+    };
+    var updateAndFireChangeCallbacks = function (editor, elm, currentFormats, formatChangeData) {
+      var formatsList = keys(currentFormats.get());
+      var newFormats = {};
+      var matchedFormats = {};
+      var parents = filter(getParents$1(editor.dom, elm), function (node) {
+        return node.nodeType === 1 && !node.getAttribute('data-mce-bogus');
+      });
+      each$1(formatChangeData, function (data, format) {
+        Tools.each(parents, function (node) {
+          if (editor.formatter.matchNode(node, format, {}, data.similar)) {
+            if (formatsList.indexOf(format) === -1) {
+              each(data.callbacks, function (callback) {
+                callback(true, {
+                  node: node,
+                  format: format,
+                  parents: parents
+                });
+              });
+              newFormats[format] = data.callbacks;
+            }
+            matchedFormats[format] = data.callbacks;
+            return false;
+          }
+          if (matchesUnInheritedFormatSelector(editor, node, format)) {
+            return false;
+          }
+        });
+      });
+      var remainingFormats = filterRemainingFormats(currentFormats.get(), matchedFormats, elm, parents);
+      currentFormats.set(__assign(__assign({}, newFormats), remainingFormats));
+    };
+    var filterRemainingFormats = function (currentFormats, matchedFormats, elm, parents) {
+      return bifilter(currentFormats, function (callbacks, format) {
+        if (!has(matchedFormats, format)) {
+          each(callbacks, function (callback) {
+            callback(false, {
+              node: elm,
+              format: format,
+              parents: parents
+            });
+          });
+          return false;
+        } else {
+          return true;
+        }
+      }).t;
+    };
+    var addListeners = function (registeredFormatListeners, formats, callback, similar) {
+      var formatChangeItems = registeredFormatListeners.get();
+      each(formats.split(','), function (format) {
+        if (!formatChangeItems[format]) {
+          formatChangeItems[format] = {
+            similar: similar,
+            callbacks: []
+          };
+        }
+        formatChangeItems[format].callbacks.push(callback);
+      });
+      registeredFormatListeners.set(formatChangeItems);
+    };
+    var removeListeners = function (registeredFormatListeners, formats, callback) {
+      var formatChangeItems = registeredFormatListeners.get();
+      each(formats.split(','), function (format) {
+        formatChangeItems[format].callbacks = filter(formatChangeItems[format].callbacks, function (c) {
+          return c !== callback;
+        });
+        if (formatChangeItems[format].callbacks.length === 0) {
+          delete formatChangeItems[format];
+        }
+      });
+      registeredFormatListeners.set(formatChangeItems);
+    };
+    var formatChanged = function (editor, registeredFormatListeners, formats, callback, similar) {
+      if (registeredFormatListeners.get() === null) {
+        setup$5(registeredFormatListeners, editor);
+      }
+      addListeners(registeredFormatListeners, formats, callback, similar);
+      return {
+        unbind: function () {
+          return removeListeners(registeredFormatListeners, formats, callback);
+        }
+      };
+    };
+
+    var get$9 = function (dom) {
+      var formats = {
+        valigntop: [{
+            selector: 'td,th',
+            styles: { verticalAlign: 'top' }
+          }],
+        valignmiddle: [{
+            selector: 'td,th',
+            styles: { verticalAlign: 'middle' }
+          }],
+        valignbottom: [{
+            selector: 'td,th',
+            styles: { verticalAlign: 'bottom' }
+          }],
+        alignleft: [
+          {
+            selector: 'figure.image',
+            collapsed: false,
+            classes: 'align-left',
+            ceFalseOverride: true,
+            preview: 'font-family font-size'
+          },
+          {
+            selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',
+            styles: { textAlign: 'left' },
+            inherit: false,
+            preview: false,
+            defaultBlock: 'div'
+          },
+          {
+            selector: 'img,table',
+            collapsed: false,
+            styles: { float: 'left' },
+            preview: 'font-family font-size'
+          }
+        ],
+        aligncenter: [
+          {
+            selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',
+            styles: { textAlign: 'center' },
+            inherit: false,
+            preview: 'font-family font-size',
+            defaultBlock: 'div'
+          },
+          {
+            selector: 'figure.image',
+            collapsed: false,
+            classes: 'align-center',
+            ceFalseOverride: true,
+            preview: 'font-family font-size'
+          },
+          {
+            selector: 'img',
+            collapsed: false,
+            styles: {
+              display: 'block',
+              marginLeft: 'auto',
+              marginRight: 'auto'
+            },
+            preview: false
+          },
+          {
+            selector: 'table',
+            collapsed: false,
+            styles: {
+              marginLeft: 'auto',
+              marginRight: 'auto'
+            },
+            preview: 'font-family font-size'
+          }
+        ],
+        alignright: [
+          {
+            selector: 'figure.image',
+            collapsed: false,
+            classes: 'align-right',
+            ceFalseOverride: true,
+            preview: 'font-family font-size'
+          },
+          {
+            selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',
+            styles: { textAlign: 'right' },
+            inherit: false,
+            preview: 'font-family font-size',
+            defaultBlock: 'div'
+          },
+          {
+            selector: 'img,table',
+            collapsed: false,
+            styles: { float: 'right' },
+            preview: 'font-family font-size'
+          }
+        ],
+        alignjustify: [{
+            selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',
+            styles: { textAlign: 'justify' },
+            inherit: false,
+            defaultBlock: 'div',
+            preview: 'font-family font-size'
+          }],
+        bold: [
+          {
+            inline: 'strong',
+            remove: 'all',
+            preserve_attributes: [
+              'class',
+              'style'
+            ]
+          },
+          {
+            inline: 'span',
+            styles: { fontWeight: 'bold' }
+          },
+          {
+            inline: 'b',
+            remove: 'all',
+            preserve_attributes: [
+              'class',
+              'style'
+            ]
+          }
+        ],
+        italic: [
+          {
+            inline: 'em',
+            remove: 'all',
+            preserve_attributes: [
+              'class',
+              'style'
+            ]
+          },
+          {
+            inline: 'span',
+            styles: { fontStyle: 'italic' }
+          },
+          {
+            inline: 'i',
+            remove: 'all',
+            preserve_attributes: [
+              'class',
+              'style'
+            ]
+          }
+        ],
+        underline: [
+          {
+            inline: 'span',
+            styles: { textDecoration: 'underline' },
+            exact: true
+          },
+          {
+            inline: 'u',
+            remove: 'all',
+            preserve_attributes: [
+              'class',
+              'style'
+            ]
+          }
+        ],
+        strikethrough: [
+          {
+            inline: 'span',
+            styles: { textDecoration: 'line-through' },
+            exact: true
+          },
+          {
+            inline: 'strike',
+            remove: 'all',
+            preserve_attributes: [
+              'class',
+              'style'
+            ]
+          }
+        ],
+        forecolor: {
+          inline: 'span',
+          styles: { color: '%value' },
+          links: true,
+          remove_similar: true,
+          clear_child_styles: true
+        },
+        hilitecolor: {
+          inline: 'span',
+          styles: { backgroundColor: '%value' },
+          links: true,
+          remove_similar: true,
+          clear_child_styles: true
+        },
+        fontname: {
+          inline: 'span',
+          toggle: false,
+          styles: { fontFamily: '%value' },
+          clear_child_styles: true
+        },
+        fontsize: {
+          inline: 'span',
+          toggle: false,
+          styles: { fontSize: '%value' },
+          clear_child_styles: true
+        },
+        fontsize_class: {
+          inline: 'span',
+          attributes: { class: '%value' }
+        },
+        blockquote: {
+          block: 'blockquote',
+          wrapper: true,
+          remove: 'all'
+        },
+        subscript: { inline: 'sub' },
+        superscript: { inline: 'sup' },
+        code: { inline: 'code' },
+        link: {
+          inline: 'a',
+          selector: 'a',
+          remove: 'all',
+          split: true,
+          deep: true,
+          onmatch: function () {
+            return true;
+          },
+          onformat: function (elm, fmt, vars) {
+            Tools.each(vars, function (value, key) {
+              dom.setAttrib(elm, key, value);
+            });
+          }
+        },
+        removeformat: [
+          {
+            selector: 'b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins',
+            remove: 'all',
+            split: true,
+            expand: false,
+            block_expand: true,
+            deep: true
+          },
+          {
+            selector: 'span',
+            attributes: [
+              'style',
+              'class'
+            ],
+            remove: 'empty',
+            split: true,
+            expand: false,
+            deep: true
+          },
+          {
+            selector: '*',
+            attributes: [
+              'style',
+              'class'
+            ],
+            split: false,
+            expand: false,
+            deep: true
+          }
+        ]
+      };
+      Tools.each('p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp'.split(/\s/), function (name) {
+        formats[name] = {
+          block: name,
+          remove: 'all'
+        };
+      });
+      return formats;
+    };
+
+    function FormatRegistry(editor) {
+      var formats = {};
+      var get = function (name) {
+        return name ? formats[name] : formats;
+      };
+      var has$1 = function (name) {
+        return has(formats, name);
+      };
+      var register = function (name, format) {
+        if (name) {
+          if (typeof name !== 'string') {
+            Tools.each(name, function (format, name) {
+              register(name, format);
+            });
+          } else {
+            if (!isArray(format)) {
+              format = [format];
+            }
+            Tools.each(format, function (format) {
+              if (typeof format.deep === 'undefined') {
+                format.deep = !format.selector;
+              }
+              if (typeof format.split === 'undefined') {
+                format.split = !format.selector || format.inline;
+              }
+              if (typeof format.remove === 'undefined' && format.selector && !format.inline) {
+                format.remove = 'none';
+              }
+              if (format.selector && format.inline) {
+                format.mixed = true;
+                format.block_expand = true;
+              }
+              if (typeof format.classes === 'string') {
+                format.classes = format.classes.split(/\s+/);
+              }
+            });
+            formats[name] = format;
+          }
+        }
+      };
+      var unregister = function (name) {
+        if (name && formats[name]) {
+          delete formats[name];
+        }
+        return formats;
+      };
+      register(get$9(editor.dom));
+      register(editor.settings.formats);
+      return {
+        get: get,
+        has: has$1,
+        register: register,
+        unregister: unregister
+      };
+    }
+
+    var each$d = Tools.each;
+    var dom = DOMUtils$1.DOM;
+    var parsedSelectorToHtml = function (ancestry, editor) {
+      var elm, item, fragment;
+      var schema = editor && editor.schema || Schema({});
+      var decorate = function (elm, item) {
+        if (item.classes.length) {
+          dom.addClass(elm, item.classes.join(' '));
+        }
+        dom.setAttribs(elm, item.attrs);
+      };
+      var createElement = function (sItem) {
+        var elm;
+        item = typeof sItem === 'string' ? {
+          name: sItem,
+          classes: [],
+          attrs: {}
+        } : sItem;
+        elm = dom.create(item.name);
+        decorate(elm, item);
+        return elm;
+      };
+      var getRequiredParent = function (elm, candidate) {
+        var name = typeof elm !== 'string' ? elm.nodeName.toLowerCase() : elm;
+        var elmRule = schema.getElementRule(name);
+        var parentsRequired = elmRule && elmRule.parentsRequired;
+        if (parentsRequired && parentsRequired.length) {
+          return candidate && Tools.inArray(parentsRequired, candidate) !== -1 ? candidate : parentsRequired[0];
+        } else {
+          return false;
+        }
+      };
+      var wrapInHtml = function (elm, ancestry, siblings) {
+        var parent, parentCandidate, parentRequired;
+        var ancestor = ancestry.length > 0 && ancestry[0];
+        var ancestorName = ancestor && ancestor.name;
+        parentRequired = getRequiredParent(elm, ancestorName);
+        if (parentRequired) {
+          if (ancestorName === parentRequired) {
+            parentCandidate = ancestry[0];
+            ancestry = ancestry.slice(1);
+          } else {
+            parentCandidate = parentRequired;
+          }
+        } else if (ancestor) {
+          parentCandidate = ancestry[0];
+          ancestry = ancestry.slice(1);
+        } else if (!siblings) {
+          return elm;
+        }
+        if (parentCandidate) {
+          parent = createElement(parentCandidate);
+          parent.appendChild(elm);
+        }
+        if (siblings) {
+          if (!parent) {
+            parent = dom.create('div');
+            parent.appendChild(elm);
+          }
+          Tools.each(siblings, function (sibling) {
+            var siblingElm = createElement(sibling);
+            parent.insertBefore(siblingElm, elm);
+          });
+        }
+        return wrapInHtml(parent, ancestry, parentCandidate && parentCandidate.siblings);
+      };
+      if (ancestry && ancestry.length) {
+        item = ancestry[0];
+        elm = createElement(item);
+        fragment = dom.create('div');
+        fragment.appendChild(wrapInHtml(elm, ancestry.slice(1), item.siblings));
+        return fragment;
+      } else {
+        return '';
+      }
+    };
+    var parseSelectorItem = function (item) {
+      var tagName;
+      var obj = {
+        classes: [],
+        attrs: {}
+      };
+      item = obj.selector = Tools.trim(item);
+      if (item !== '*') {
+        tagName = item.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g, function ($0, $1, $2, $3, $4) {
+          switch ($1) {
+          case '#':
+            obj.attrs.id = $2;
+            break;
+          case '.':
+            obj.classes.push($2);
+            break;
+          case ':':
+            if (Tools.inArray('checked disabled enabled read-only required'.split(' '), $2) !== -1) {
+              obj.attrs[$2] = $2;
+            }
+            break;
+          }
+          if ($3 === '[') {
+            var m = $4.match(/([\w\-]+)(?:\=\"([^\"]+))?/);
+            if (m) {
+              obj.attrs[m[1]] = m[2];
+            }
+          }
+          return '';
+        });
+      }
+      obj.name = tagName || 'div';
+      return obj;
+    };
+    var parseSelector = function (selector) {
+      if (!selector || typeof selector !== 'string') {
+        return [];
+      }
+      selector = selector.split(/\s*,\s*/)[0];
+      selector = selector.replace(/\s*(~\+|~|\+|>)\s*/g, '$1');
+      return Tools.map(selector.split(/(?:>|\s+(?![^\[\]]+\]))/), function (item) {
+        var siblings = Tools.map(item.split(/(?:~\+|~|\+)/), parseSelectorItem);
+        var obj = siblings.pop();
+        if (siblings.length) {
+          obj.siblings = siblings;
+        }
+        return obj;
+      }).reverse();
+    };
+    var getCssText = function (editor, format) {
+      var name, previewFrag, previewElm, items;
+      var previewCss = '', parentFontSize, previewStyles;
+      previewStyles = editor.settings.preview_styles;
+      if (previewStyles === false) {
+        return '';
+      }
+      if (typeof previewStyles !== 'string') {
+        previewStyles = 'font-family font-size font-weight font-style text-decoration ' + 'text-transform color background-color border border-radius outline text-shadow';
+      }
+      var removeVars = function (val) {
+        return val.replace(/%(\w+)/g, '');
+      };
+      if (typeof format === 'string') {
+        format = editor.formatter.get(format);
+        if (!format) {
+          return;
+        }
+        format = format[0];
+      }
+      if ('preview' in format) {
+        previewStyles = format.preview;
+        if (previewStyles === false) {
+          return '';
+        }
+      }
+      name = format.block || format.inline || 'span';
+      items = parseSelector(format.selector);
+      if (items.length) {
+        if (!items[0].name) {
+          items[0].name = name;
+        }
+        name = format.selector;
+        previewFrag = parsedSelectorToHtml(items, editor);
+      } else {
+        previewFrag = parsedSelectorToHtml([name], editor);
+      }
+      previewElm = dom.select(name, previewFrag)[0] || previewFrag.firstChild;
+      each$d(format.styles, function (value, name) {
+        value = removeVars(value);
+        if (value) {
+          dom.setStyle(previewElm, name, value);
+        }
+      });
+      each$d(format.attributes, function (value, name) {
+        value = removeVars(value);
+        if (value) {
+          dom.setAttrib(previewElm, name, value);
+        }
+      });
+      each$d(format.classes, function (value) {
+        value = removeVars(value);
+        if (!dom.hasClass(previewElm, value)) {
+          dom.addClass(previewElm, value);
+        }
+      });
+      editor.fire('PreviewFormats');
+      dom.setStyles(previewFrag, {
+        position: 'absolute',
+        left: -65535
+      });
+      editor.getBody().appendChild(previewFrag);
+      parentFontSize = dom.getStyle(editor.getBody(), 'fontSize', true);
+      parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0;
+      each$d(previewStyles.split(' '), function (name) {
+        var value = dom.getStyle(previewElm, name, true);
+        if (name === 'background-color' && /transparent|rgba\s*\([^)]+,\s*0\)/.test(value)) {
+          value = dom.getStyle(editor.getBody(), name, true);
+          if (dom.toHex(value).toLowerCase() === '#ffffff') {
+            return;
+          }
+        }
+        if (name === 'color') {
+          if (dom.toHex(value).toLowerCase() === '#000000') {
+            return;
+          }
+        }
+        if (name === 'font-size') {
+          if (/em|%$/.test(value)) {
+            if (parentFontSize === 0) {
+              return;
+            }
+            var numValue = parseFloat(value) / (/%$/.test(value) ? 100 : 1);
+            value = numValue * parentFontSize + 'px';
+          }
+        }
+        if (name === 'border' && value) {
+          previewCss += 'padding:0 2px;';
+        }
+        previewCss += name + ':' + value + ';';
+      });
+      editor.fire('AfterPreviewFormats');
+      dom.remove(previewFrag);
+      return previewCss;
+    };
+
+    var setup$6 = function (editor) {
+      editor.addShortcut('meta+b', '', 'Bold');
+      editor.addShortcut('meta+i', '', 'Italic');
+      editor.addShortcut('meta+u', '', 'Underline');
+      for (var i = 1; i <= 6; i++) {
+        editor.addShortcut('access+' + i, '', [
+          'FormatBlock',
+          false,
+          'h' + i
+        ]);
+      }
+      editor.addShortcut('access+7', '', [
+        'FormatBlock',
+        false,
+        'p'
+      ]);
+      editor.addShortcut('access+8', '', [
+        'FormatBlock',
+        false,
+        'div'
+      ]);
+      editor.addShortcut('access+9', '', [
+        'FormatBlock',
+        false,
+        'address'
+      ]);
+    };
+
+    var Formatter = function (editor) {
+      var formats = FormatRegistry(editor);
+      var formatChangeState = Cell(null);
+      setup$6(editor);
+      setup$3(editor);
+      return {
+        get: formats.get,
+        has: formats.has,
+        register: formats.register,
+        unregister: formats.unregister,
+        apply: function (name, vars, node) {
+          applyFormat$1(editor, name, vars, node);
+        },
+        remove: function (name, vars, node, similar) {
+          removeFormat$1(editor, name, vars, node, similar);
+        },
+        toggle: function (name, vars, node) {
+          toggleFormat(editor, name, vars, node);
+        },
+        match: curry(match, editor),
+        matchAll: curry(matchAll, editor),
+        matchNode: curry(matchNode, editor),
+        canApply: curry(canApply, editor),
+        formatChanged: curry(formatChanged, editor, formatChangeState),
+        getCssText: curry(getCssText, editor)
+      };
+    };
+
+    var registerEvents$1 = function (editor, undoManager, locks) {
+      var isFirstTypedCharacter = Cell(false);
+      var addNonTypingUndoLevel = function (e) {
+        setTyping(undoManager, false, locks);
+        undoManager.add({}, e);
+      };
+      editor.on('init', function () {
+        undoManager.add();
+      });
+      editor.on('BeforeExecCommand', function (e) {
+        var cmd = e.command;
+        if (cmd !== 'Undo' && cmd !== 'Redo' && cmd !== 'mceRepaint') {
+          endTyping(undoManager, locks);
+          undoManager.beforeChange();
+        }
+      });
+      editor.on('ExecCommand', function (e) {
+        var cmd = e.command;
+        if (cmd !== 'Undo' && cmd !== 'Redo' && cmd !== 'mceRepaint') {
+          addNonTypingUndoLevel(e);
+        }
+      });
+      editor.on('ObjectResizeStart cut', function () {
+        undoManager.beforeChange();
+      });
+      editor.on('SaveContent ObjectResized blur', addNonTypingUndoLevel);
+      editor.on('dragend', addNonTypingUndoLevel);
+      editor.on('keyup', function (e) {
+        var keyCode = e.keyCode;
+        if (e.isDefaultPrevented()) {
+          return;
+        }
+        if (keyCode >= 33 && keyCode <= 36 || keyCode >= 37 && keyCode <= 40 || keyCode === 45 || e.ctrlKey) {
+          addNonTypingUndoLevel();
+          editor.nodeChanged();
+        }
+        if (keyCode === 46 || keyCode === 8) {
+          editor.nodeChanged();
+        }
+        if (isFirstTypedCharacter.get() && undoManager.typing && isEq$3(createFromEditor(editor), undoManager.data[0]) === false) {
+          if (editor.isDirty() === false) {
+            editor.setDirty(true);
+            editor.fire('change', {
+              level: undoManager.data[0],
+              lastLevel: null
+            });
+          }
+          editor.fire('TypingUndo');
+          isFirstTypedCharacter.set(false);
+          editor.nodeChanged();
+        }
+      });
+      editor.on('keydown', function (e) {
+        var keyCode = e.keyCode;
+        if (e.isDefaultPrevented()) {
+          return;
+        }
+        if (keyCode >= 33 && keyCode <= 36 || keyCode >= 37 && keyCode <= 40 || keyCode === 45) {
+          if (undoManager.typing) {
+            addNonTypingUndoLevel(e);
+          }
+          return;
+        }
+        var modKey = e.ctrlKey && !e.altKey || e.metaKey;
+        if ((keyCode < 16 || keyCode > 20) && keyCode !== 224 && keyCode !== 91 && !undoManager.typing && !modKey) {
+          undoManager.beforeChange();
+          setTyping(undoManager, true, locks);
+          undoManager.add({}, e);
+          isFirstTypedCharacter.set(true);
+        }
+      });
+      editor.on('mousedown', function (e) {
+        if (undoManager.typing) {
+          addNonTypingUndoLevel(e);
+        }
+      });
+      var isInsertReplacementText = function (event) {
+        return event.inputType === 'insertReplacementText';
+      };
+      var isInsertTextDataNull = function (event) {
+        return event.inputType === 'insertText' && event.data === null;
+      };
+      editor.on('input', function (e) {
+        if (e.inputType && (isInsertReplacementText(e) || isInsertTextDataNull(e))) {
+          addNonTypingUndoLevel(e);
+        }
+      });
+      editor.on('AddUndo Undo Redo ClearUndos', function (e) {
+        if (!e.isDefaultPrevented()) {
+          editor.nodeChanged();
+        }
+      });
+    };
+    var addKeyboardShortcuts = function (editor) {
+      editor.addShortcut('meta+z', '', 'Undo');
+      editor.addShortcut('meta+y,meta+shift+z', '', 'Redo');
+    };
+
+    var UndoManager = function (editor) {
+      var beforeBookmark = Cell(Option.none());
+      var locks = Cell(0);
+      var index = Cell(0);
+      var undoManager = {
+        data: [],
+        typing: false,
+        beforeChange: function () {
+          beforeChange$1(editor, locks, beforeBookmark);
+        },
+        add: function (level, event) {
+          return addUndoLevel$1(editor, undoManager, index, locks, beforeBookmark, level, event);
+        },
+        undo: function () {
+          return undo$1(editor, undoManager, locks, index);
+        },
+        redo: function () {
+          return redo$1(editor, index, undoManager.data);
+        },
+        clear: function () {
+          clear$1(editor, undoManager, index);
+        },
+        reset: function () {
+          reset$1(editor, undoManager);
+        },
+        hasUndo: function () {
+          return hasUndo$1(editor, undoManager, index);
+        },
+        hasRedo: function () {
+          return hasRedo$1(editor, undoManager, index);
+        },
+        transact: function (callback) {
+          return transact$1(editor, undoManager, locks, callback);
+        },
+        ignore: function (callback) {
+          ignore$1(editor, locks, callback);
+        },
+        extra: function (callback1, callback2) {
+          extra$1(editor, undoManager, index, callback1, callback2);
+        }
+      };
+      if (!isRtc(editor)) {
+        registerEvents$1(editor, undoManager, locks);
+      }
+      addKeyboardShortcuts(editor);
+      return undoManager;
+    };
+
+    var nonTypingKeycodes = [
+      9,
+      27,
+      VK.HOME,
+      VK.END,
+      19,
+      20,
+      44,
+      144,
+      145,
+      33,
+      34,
+      45,
+      16,
+      17,
+      18,
+      91,
+      92,
+      93,
+      VK.DOWN,
+      VK.UP,
+      VK.LEFT,
+      VK.RIGHT
+    ].concat(Env.browser.isFirefox() ? [224] : []);
+    var placeholderAttr = 'data-mce-placeholder';
+    var isKeyboardEvent = function (e) {
+      return e.type === 'keydown' || e.type === 'keyup';
+    };
+    var isDeleteEvent = function (e) {
+      var keyCode = e.keyCode;
+      return keyCode === VK.BACKSPACE || keyCode === VK.DELETE;
+    };
+    var isNonTypingKeyboardEvent = function (e) {
+      if (isKeyboardEvent(e)) {
+        var keyCode = e.keyCode;
+        return !isDeleteEvent(e) && (VK.metaKeyPressed(e) || e.altKey || keyCode >= 112 && keyCode <= 123 || contains(nonTypingKeycodes, keyCode));
+      } else {
+        return false;
+      }
+    };
+    var isTypingKeyboardEvent = function (e) {
+      return isKeyboardEvent(e) && !(isDeleteEvent(e) || e.type === 'keyup' && e.keyCode === 229);
+    };
+    var isVisuallyEmpty = function (dom, rootElm, forcedRootBlock) {
+      if (isEmpty$1(Element.fromDom(rootElm), false)) {
+        var isForcedRootBlockFalse = forcedRootBlock === '';
+        var firstElement = rootElm.firstElementChild;
+        if (!firstElement) {
+          return true;
+        } else if (dom.getStyle(rootElm.firstElementChild, 'padding-left') || dom.getStyle(rootElm.firstElementChild, 'padding-right')) {
+          return false;
+        } else {
+          return isForcedRootBlockFalse ? !dom.isBlock(firstElement) : forcedRootBlock === firstElement.nodeName.toLowerCase();
+        }
+      } else {
+        return false;
+      }
+    };
+    var setup$7 = function (editor) {
+      var dom = editor.dom;
+      var rootBlock = getForcedRootBlock(editor);
+      var placeholder = getPlaceholder(editor);
+      var updatePlaceholder = function (e, initial) {
+        if (isNonTypingKeyboardEvent(e)) {
+          return;
+        }
+        var body = editor.getBody();
+        var showPlaceholder = isTypingKeyboardEvent(e) ? false : isVisuallyEmpty(dom, body, rootBlock);
+        var isPlaceholderShown = dom.getAttrib(body, placeholderAttr) !== '';
+        if (isPlaceholderShown !== showPlaceholder || initial) {
+          dom.setAttrib(body, placeholderAttr, showPlaceholder ? placeholder : null);
+          dom.setAttrib(body, 'aria-placeholder', showPlaceholder ? placeholder : null);
+          firePlaceholderToggle(editor, showPlaceholder);
+          editor.on(showPlaceholder ? 'keydown' : 'keyup', updatePlaceholder);
+          editor.off(showPlaceholder ? 'keyup' : 'keydown', updatePlaceholder);
+        }
+      };
+      if (placeholder) {
+        editor.on('init', function (e) {
+          updatePlaceholder(e, true);
+          editor.on('change SetContent ExecCommand', updatePlaceholder);
+          editor.on('paste', function (e) {
+            return Delay.setEditorTimeout(editor, function () {
+              return updatePlaceholder(e);
+            });
+          });
+          editor.on('remove', function () {
+            var body = editor.getBody();
+            dom.setAttrib(body, placeholderAttr, null);
+            dom.setAttrib(body, 'aria-placeholder', null);
+          });
+        });
+      }
+    };
+
+    var SIGNIFICANT_MOVE = 5;
+    var LONGPRESS_DELAY = 400;
+    var getTouch = function (event) {
+      if (event.touches === undefined || event.touches.length !== 1) {
+        return Option.none();
+      }
+      return Option.some(event.touches[0]);
+    };
+    var isFarEnough = function (touch, data) {
+      var distX = Math.abs(touch.clientX - data.x());
+      var distY = Math.abs(touch.clientY - data.y());
+      return distX > SIGNIFICANT_MOVE || distY > SIGNIFICANT_MOVE;
+    };
+    var setup$8 = function (editor) {
+      var startData = Cell(Option.none());
+      var longpressFired = Cell(false);
+      var debounceLongpress = last$2(function (e) {
+        editor.fire('longpress', __assign(__assign({}, e), { type: 'longpress' }));
+        longpressFired.set(true);
+      }, LONGPRESS_DELAY);
+      editor.on('touchstart', function (e) {
+        getTouch(e).each(function (touch) {
+          debounceLongpress.cancel();
+          var data = {
+            x: constant(touch.clientX),
+            y: constant(touch.clientY),
+            target: constant(e.target)
+          };
+          debounceLongpress.throttle(e);
+          longpressFired.set(false);
+          startData.set(Option.some(data));
+        });
+      }, true);
+      editor.on('touchmove', function (e) {
+        debounceLongpress.cancel();
+        getTouch(e).each(function (touch) {
+          startData.get().each(function (data) {
+            if (isFarEnough(touch, data)) {
+              startData.set(Option.none());
+              longpressFired.set(false);
+              editor.fire('longpresscancel');
+            }
+          });
+        });
+      }, true);
+      editor.on('touchend touchcancel', function (e) {
+        debounceLongpress.cancel();
+        if (e.type === 'touchcancel') {
+          return;
+        }
+        startData.get().filter(function (data) {
+          return data.target().isEqualNode(e.target);
+        }).each(function () {
+          if (longpressFired.get()) {
+            e.preventDefault();
+          } else {
+            editor.fire('tap', __assign(__assign({}, e), { type: 'tap' }));
+          }
+        });
+      }, true);
+    };
+
+    var isBlockElement = function (blockElements, node) {
+      return blockElements.hasOwnProperty(node.nodeName);
+    };
+    var isValidTarget = function (blockElements, node) {
+      if (isText$1(node)) {
+        return true;
+      } else if (isElement$1(node)) {
+        return !isBlockElement(blockElements, node) && !isBookmarkNode$1(node);
+      } else {
+        return false;
+      }
+    };
+    var hasBlockParent = function (blockElements, root, node) {
+      return exists(parents$1(Element.fromDom(node), Element.fromDom(root)), function (elm) {
+        return isBlockElement(blockElements, elm.dom());
+      });
+    };
+    var shouldRemoveTextNode = function (blockElements, node) {
+      if (isText$1(node)) {
+        if (node.nodeValue.length === 0) {
+          return true;
+        } else if (/^\s+$/.test(node.nodeValue) && (!node.nextSibling || isBlockElement(blockElements, node.nextSibling))) {
+          return true;
+        }
+      }
+      return false;
+    };
+    var addRootBlocks = function (editor) {
+      var dom = editor.dom, selection = editor.selection;
+      var schema = editor.schema, blockElements = schema.getBlockElements();
+      var node = selection.getStart();
+      var rootNode = editor.getBody();
+      var rng;
+      var startContainer, startOffset, endContainer, endOffset, rootBlockNode;
+      var tempNode, wrapped, restoreSelection;
+      var rootNodeName;
+      var forcedRootBlock = getForcedRootBlock(editor);
+      if (!node || !isElement$1(node) || !forcedRootBlock) {
+        return;
+      }
+      rootNodeName = rootNode.nodeName.toLowerCase();
+      if (!schema.isValidChild(rootNodeName, forcedRootBlock.toLowerCase()) || hasBlockParent(blockElements, rootNode, node)) {
+        return;
+      }
+      rng = selection.getRng();
+      startContainer = rng.startContainer;
+      startOffset = rng.startOffset;
+      endContainer = rng.endContainer;
+      endOffset = rng.endOffset;
+      restoreSelection = hasFocus$1(editor);
+      node = rootNode.firstChild;
+      while (node) {
+        if (isValidTarget(blockElements, node)) {
+          if (shouldRemoveTextNode(blockElements, node)) {
+            tempNode = node;
+            node = node.nextSibling;
+            dom.remove(tempNode);
+            continue;
+          }
+          if (!rootBlockNode) {
+            rootBlockNode = dom.create(forcedRootBlock, getForcedRootBlockAttrs(editor));
+            node.parentNode.insertBefore(rootBlockNode, node);
+            wrapped = true;
+          }
+          tempNode = node;
+          node = node.nextSibling;
+          rootBlockNode.appendChild(tempNode);
+        } else {
+          rootBlockNode = null;
+          node = node.nextSibling;
+        }
+      }
+      if (wrapped && restoreSelection) {
+        rng.setStart(startContainer, startOffset);
+        rng.setEnd(endContainer, endOffset);
+        selection.setRng(rng);
+        editor.nodeChanged();
+      }
+    };
+    var setup$9 = function (editor) {
+      if (getForcedRootBlock(editor)) {
+        editor.on('NodeChange', curry(addRootBlocks, editor));
+      }
+    };
+
+    var hasSelectionModifyApi = function (editor) {
+      return isFunction(editor.selection.getSel().modify);
+    };
+    var moveRel = function (forward, selection, pos) {
+      var delta = forward ? 1 : -1;
+      selection.setRng(CaretPosition$1(pos.container(), pos.offset() + delta).toRange());
+      selection.getSel().modify('move', forward ? 'forward' : 'backward', 'word');
+      return true;
+    };
+    var moveByWord = function (forward, editor) {
+      var rng = editor.selection.getRng();
+      var pos = forward ? CaretPosition$1.fromRangeEnd(rng) : CaretPosition$1.fromRangeStart(rng);
+      if (!hasSelectionModifyApi(editor)) {
+        return false;
+      } else if (forward && isBeforeInline(pos)) {
+        return moveRel(true, editor.selection, pos);
+      } else if (!forward && isAfterInline(pos)) {
+        return moveRel(false, editor.selection, pos);
+      } else {
+        return false;
+      }
+    };
+
+    var isText$8 = isText$1;
+    var startsWithCaretContainer$1 = function (node) {
+      return isText$8(node) && node.data[0] === ZWSP;
+    };
+    var endsWithCaretContainer$1 = function (node) {
+      return isText$8(node) && node.data[node.data.length - 1] === ZWSP;
+    };
+    var createZwsp = function (node) {
+      return node.ownerDocument.createTextNode(ZWSP);
+    };
+    var insertBefore$1 = function (node) {
+      if (isText$8(node.previousSibling)) {
+        if (endsWithCaretContainer$1(node.previousSibling)) {
+          return node.previousSibling;
+        } else {
+          node.previousSibling.appendData(ZWSP);
+          return node.previousSibling;
+        }
+      } else if (isText$8(node)) {
+        if (startsWithCaretContainer$1(node)) {
+          return node;
+        } else {
+          node.insertData(0, ZWSP);
+          return node;
+        }
+      } else {
+        var newNode = createZwsp(node);
+        node.parentNode.insertBefore(newNode, node);
+        return newNode;
+      }
+    };
+    var insertAfter$1 = function (node) {
+      if (isText$8(node.nextSibling)) {
+        if (startsWithCaretContainer$1(node.nextSibling)) {
+          return node.nextSibling;
+        } else {
+          node.nextSibling.insertData(0, ZWSP);
+          return node.nextSibling;
+        }
+      } else if (isText$8(node)) {
+        if (endsWithCaretContainer$1(node)) {
+          return node;
+        } else {
+          node.appendData(ZWSP);
+          return node;
+        }
+      } else {
+        var newNode = createZwsp(node);
+        if (node.nextSibling) {
+          node.parentNode.insertBefore(newNode, node.nextSibling);
+        } else {
+          node.parentNode.appendChild(newNode);
+        }
+        return newNode;
+      }
+    };
+    var insertInline$1 = function (before, node) {
+      return before ? insertBefore$1(node) : insertAfter$1(node);
+    };
+    var insertInlineBefore = curry(insertInline$1, true);
+    var insertInlineAfter = curry(insertInline$1, false);
+
+    var insertInlinePos = function (pos, before) {
+      if (isText$1(pos.container())) {
+        return insertInline$1(before, pos.container());
+      } else {
+        return insertInline$1(before, pos.getNode());
+      }
+    };
+    var isPosCaretContainer = function (pos, caret) {
+      var caretNode = caret.get();
+      return caretNode && pos.container() === caretNode && isCaretContainerInline(caretNode);
+    };
+    var renderCaret = function (caret, location) {
+      return location.fold(function (element) {
+        remove$5(caret.get());
+        var text = insertInlineBefore(element);
+        caret.set(text);
+        return Option.some(CaretPosition$1(text, text.length - 1));
+      }, function (element) {
+        return firstPositionIn(element).map(function (pos) {
+          if (!isPosCaretContainer(pos, caret)) {
+            remove$5(caret.get());
+            var text = insertInlinePos(pos, true);
+            caret.set(text);
+            return CaretPosition$1(text, 1);
+          } else {
+            return CaretPosition$1(caret.get(), 1);
+          }
+        });
+      }, function (element) {
+        return lastPositionIn(element).map(function (pos) {
+          if (!isPosCaretContainer(pos, caret)) {
+            remove$5(caret.get());
+            var text = insertInlinePos(pos, false);
+            caret.set(text);
+            return CaretPosition$1(text, text.length - 1);
+          } else {
+            return CaretPosition$1(caret.get(), caret.get().length - 1);
+          }
+        });
+      }, function (element) {
+        remove$5(caret.get());
+        var text = insertInlineAfter(element);
+        caret.set(text);
+        return Option.some(CaretPosition$1(text, 1));
+      });
+    };
+
+    var strongRtl = /[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/;
+    var hasStrongRtl = function (text) {
+      return strongRtl.test(text);
+    };
+
+    var isInlineTarget = function (editor, elm) {
+      return is(Element.fromDom(elm), getInlineBoundarySelector(editor));
+    };
+    var isRtl$1 = function (element) {
+      return DOMUtils$1.DOM.getStyle(element, 'direction', true) === 'rtl' || hasStrongRtl(element.textContent);
+    };
+    var findInlineParents = function (isInlineTarget, rootNode, pos) {
+      return filter(DOMUtils$1.DOM.getParents(pos.container(), '*', rootNode), isInlineTarget);
+    };
+    var findRootInline = function (isInlineTarget, rootNode, pos) {
+      var parents = findInlineParents(isInlineTarget, rootNode, pos);
+      return Option.from(parents[parents.length - 1]);
+    };
+    var hasSameParentBlock = function (rootNode, node1, node2) {
+      var block1 = getParentBlock(node1, rootNode);
+      var block2 = getParentBlock(node2, rootNode);
+      return block1 && block1 === block2;
+    };
+    var isAtZwsp = function (pos) {
+      return isBeforeInline(pos) || isAfterInline(pos);
+    };
+    var normalizePosition = function (forward, pos) {
+      if (!pos) {
+        return pos;
+      }
+      var container = pos.container(), offset = pos.offset();
+      if (forward) {
+        if (isCaretContainerInline(container)) {
+          if (isText$1(container.nextSibling)) {
+            return CaretPosition$1(container.nextSibling, 0);
+          } else {
+            return CaretPosition$1.after(container);
+          }
+        } else {
+          return isBeforeInline(pos) ? CaretPosition$1(container, offset + 1) : pos;
+        }
+      } else {
+        if (isCaretContainerInline(container)) {
+          if (isText$1(container.previousSibling)) {
+            return CaretPosition$1(container.previousSibling, container.previousSibling.data.length);
+          } else {
+            return CaretPosition$1.before(container);
+          }
+        } else {
+          return isAfterInline(pos) ? CaretPosition$1(container, offset - 1) : pos;
+        }
+      }
+    };
+    var normalizeForwards = curry(normalizePosition, true);
+    var normalizeBackwards = curry(normalizePosition, false);
+
+    var evaluateUntil = function (fns, args) {
+      for (var i = 0; i < fns.length; i++) {
+        var result = fns[i].apply(null, args);
+        if (result.isSome()) {
+          return result;
+        }
+      }
+      return Option.none();
+    };
+
+    var Location = Adt.generate([
+      { before: ['element'] },
+      { start: ['element'] },
+      { end: ['element'] },
+      { after: ['element'] }
+    ]);
+    var rescope = function (rootNode, node) {
+      var parentBlock = getParentBlock(node, rootNode);
+      return parentBlock ? parentBlock : rootNode;
+    };
+    var before$4 = function (isInlineTarget, rootNode, pos) {
+      var nPos = normalizeForwards(pos);
+      var scope = rescope(rootNode, nPos.container());
+      return findRootInline(isInlineTarget, scope, nPos).fold(function () {
+        return nextPosition(scope, nPos).bind(curry(findRootInline, isInlineTarget, scope)).map(function (inline) {
+          return Location.before(inline);
+        });
+      }, Option.none);
+    };
+    var isNotInsideFormatCaretContainer = function (rootNode, elm) {
+      return getParentCaretContainer(rootNode, elm) === null;
+    };
+    var findInsideRootInline = function (isInlineTarget, rootNode, pos) {
+      return findRootInline(isInlineTarget, rootNode, pos).filter(curry(isNotInsideFormatCaretContainer, rootNode));
+    };
+    var start = function (isInlineTarget, rootNode, pos) {
+      var nPos = normalizeBackwards(pos);
+      return findInsideRootInline(isInlineTarget, rootNode, nPos).bind(function (inline) {
+        var prevPos = prevPosition(inline, nPos);
+        return prevPos.isNone() ? Option.some(Location.start(inline)) : Option.none();
+      });
+    };
+    var end = function (isInlineTarget, rootNode, pos) {
+      var nPos = normalizeForwards(pos);
+      return findInsideRootInline(isInlineTarget, rootNode, nPos).bind(function (inline) {
+        var nextPos = nextPosition(inline, nPos);
+        return nextPos.isNone() ? Option.some(Location.end(inline)) : Option.none();
+      });
+    };
+    var after$3 = function (isInlineTarget, rootNode, pos) {
+      var nPos = normalizeBackwards(pos);
+      var scope = rescope(rootNode, nPos.container());
+      return findRootInline(isInlineTarget, scope, nPos).fold(function () {
+        return prevPosition(scope, nPos).bind(curry(findRootInline, isInlineTarget, scope)).map(function (inline) {
+          return Location.after(inline);
+        });
+      }, Option.none);
+    };
+    var isValidLocation = function (location) {
+      return isRtl$1(getElement(location)) === false;
+    };
+    var readLocation = function (isInlineTarget, rootNode, pos) {
+      var location = evaluateUntil([
+        before$4,
+        start,
+        end,
+        after$3
+      ], [
+        isInlineTarget,
+        rootNode,
+        pos
+      ]);
+      return location.filter(isValidLocation);
+    };
+    var getElement = function (location) {
+      return location.fold(identity, identity, identity, identity);
+    };
+    var getName = function (location) {
+      return location.fold(constant('before'), constant('start'), constant('end'), constant('after'));
+    };
+    var outside = function (location) {
+      return location.fold(Location.before, Location.before, Location.after, Location.after);
+    };
+    var inside = function (location) {
+      return location.fold(Location.start, Location.start, Location.end, Location.end);
+    };
+    var isEq$5 = function (location1, location2) {
+      return getName(location1) === getName(location2) && getElement(location1) === getElement(location2);
+    };
+    var betweenInlines = function (forward, isInlineTarget, rootNode, from, to, location) {
+      return lift2(findRootInline(isInlineTarget, rootNode, from), findRootInline(isInlineTarget, rootNode, to), function (fromInline, toInline) {
+        if (fromInline !== toInline && hasSameParentBlock(rootNode, fromInline, toInline)) {
+          return Location.after(forward ? fromInline : toInline);
+        } else {
+          return location;
+        }
+      }).getOr(location);
+    };
+    var skipNoMovement = function (fromLocation, toLocation) {
+      return fromLocation.fold(constant(true), function (fromLocation) {
+        return !isEq$5(fromLocation, toLocation);
+      });
+    };
+    var findLocationTraverse = function (forward, isInlineTarget, rootNode, fromLocation, pos) {
+      var from = normalizePosition(forward, pos);
+      var to = fromPosition(forward, rootNode, from).map(curry(normalizePosition, forward));
+      var location = to.fold(function () {
+        return fromLocation.map(outside);
+      }, function (to) {
+        return readLocation(isInlineTarget, rootNode, to).map(curry(betweenInlines, forward, isInlineTarget, rootNode, from, to)).filter(curry(skipNoMovement, fromLocation));
+      });
+      return location.filter(isValidLocation);
+    };
+    var findLocationSimple = function (forward, location) {
+      if (forward) {
+        return location.fold(compose(Option.some, Location.start), Option.none, compose(Option.some, Location.after), Option.none);
+      } else {
+        return location.fold(Option.none, compose(Option.some, Location.before), Option.none, compose(Option.some, Location.end));
+      }
+    };
+    var findLocation = function (forward, isInlineTarget, rootNode, pos) {
+      var from = normalizePosition(forward, pos);
+      var fromLocation = readLocation(isInlineTarget, rootNode, from);
+      return readLocation(isInlineTarget, rootNode, from).bind(curry(findLocationSimple, forward)).orThunk(function () {
+        return findLocationTraverse(forward, isInlineTarget, rootNode, fromLocation, pos);
+      });
+    };
+    var prevLocation = curry(findLocation, false);
+    var nextLocation = curry(findLocation, true);
+
+    var setCaretPosition = function (editor, pos) {
+      var rng = editor.dom.createRng();
+      rng.setStart(pos.container(), pos.offset());
+      rng.setEnd(pos.container(), pos.offset());
+      editor.selection.setRng(rng);
+    };
+    var isFeatureEnabled = function (editor) {
+      return editor.settings.inline_boundaries !== false;
+    };
+    var setSelected = function (state, elm) {
+      if (state) {
+        elm.setAttribute('data-mce-selected', 'inline-boundary');
+      } else {
+        elm.removeAttribute('data-mce-selected');
+      }
+    };
+    var renderCaretLocation = function (editor, caret, location) {
+      return renderCaret(caret, location).map(function (pos) {
+        setCaretPosition(editor, pos);
+        return location;
+      });
+    };
+    var findLocation$1 = function (editor, caret, forward) {
+      var rootNode = editor.getBody();
+      var from = CaretPosition$1.fromRangeStart(editor.selection.getRng());
+      var isInlineTarget$1 = curry(isInlineTarget, editor);
+      var location = findLocation(forward, isInlineTarget$1, rootNode, from);
+      return location.bind(function (location) {
+        return renderCaretLocation(editor, caret, location);
+      });
+    };
+    var toggleInlines = function (isInlineTarget, dom, elms) {
+      var inlineBoundaries = map(descendants$1(Element.fromDom(dom.getRoot()), '*[data-mce-selected="inline-boundary"]'), function (e) {
+        return e.dom();
+      });
+      var selectedInlines = filter(inlineBoundaries, isInlineTarget);
+      var targetInlines = filter(elms, isInlineTarget);
+      each(difference(selectedInlines, targetInlines), curry(setSelected, false));
+      each(difference(targetInlines, selectedInlines), curry(setSelected, true));
+    };
+    var safeRemoveCaretContainer = function (editor, caret) {
+      if (editor.selection.isCollapsed() && editor.composing !== true && caret.get()) {
+        var pos = CaretPosition$1.fromRangeStart(editor.selection.getRng());
+        if (CaretPosition$1.isTextPosition(pos) && isAtZwsp(pos) === false) {
+          setCaretPosition(editor, removeAndReposition(caret.get(), pos));
+          caret.set(null);
+        }
+      }
+    };
+    var renderInsideInlineCaret = function (isInlineTarget, editor, caret, elms) {
+      if (editor.selection.isCollapsed()) {
+        var inlines = filter(elms, isInlineTarget);
+        each(inlines, function (_inline) {
+          var pos = CaretPosition$1.fromRangeStart(editor.selection.getRng());
+          readLocation(isInlineTarget, editor.getBody(), pos).bind(function (location) {
+            return renderCaretLocation(editor, caret, location);
+          });
+        });
+      }
+    };
+    var move = function (editor, caret, forward) {
+      return function () {
+        return isFeatureEnabled(editor) ? findLocation$1(editor, caret, forward).isSome() : false;
+      };
+    };
+    var moveWord = function (forward, editor, _caret) {
+      return function () {
+        return isFeatureEnabled(editor) ? moveByWord(forward, editor) : false;
+      };
+    };
+    var setupSelectedState = function (editor) {
+      var caret = Cell(null);
+      var isInlineTarget$1 = curry(isInlineTarget, editor);
+      editor.on('NodeChange', function (e) {
+        if (isFeatureEnabled(editor) && !(Env.browser.isIE() && e.initial)) {
+          toggleInlines(isInlineTarget$1, editor.dom, e.parents);
+          safeRemoveCaretContainer(editor, caret);
+          renderInsideInlineCaret(isInlineTarget$1, editor, caret, e.parents);
+        }
+      });
+      return caret;
+    };
+    var moveNextWord = curry(moveWord, true);
+    var movePrevWord = curry(moveWord, false);
+
+    var getNodeClientRects = function (node) {
+      var toArrayWithNode = function (clientRects) {
+        return map(clientRects, function (clientRect) {
+          clientRect = clone$1(clientRect);
+          clientRect.node = node;
+          return clientRect;
+        });
+      };
+      if (isElement$1(node)) {
+        return toArrayWithNode(node.getClientRects());
+      }
+      if (isText$1(node)) {
+        var rng = node.ownerDocument.createRange();
+        rng.setStart(node, 0);
+        rng.setEnd(node, node.data.length);
+        return toArrayWithNode(rng.getClientRects());
+      }
+    };
+    var getClientRects = function (node) {
+      return foldl(node, function (result, node) {
+        return result.concat(getNodeClientRects(node));
+      }, []);
+    };
+
+    var VDirection;
+    (function (VDirection) {
+      VDirection[VDirection['Up'] = -1] = 'Up';
+      VDirection[VDirection['Down'] = 1] = 'Down';
+    }(VDirection || (VDirection = {})));
+    var findUntil$1 = function (direction, root, predicateFn, node) {
+      while (node = findNode(node, direction, isEditableCaretCandidate, root)) {
+        if (predicateFn(node)) {
+          return;
+        }
+      }
+    };
+    var walkUntil = function (direction, isAboveFn, isBeflowFn, root, predicateFn, caretPosition) {
+      var line = 0, node;
+      var result = [];
+      var targetClientRect;
+      var add = function (node) {
+        var i, clientRect, clientRects;
+        clientRects = getClientRects([node]);
+        if (direction === -1) {
+          clientRects = clientRects.reverse();
+        }
+        for (i = 0; i < clientRects.length; i++) {
+          clientRect = clientRects[i];
+          if (isBeflowFn(clientRect, targetClientRect)) {
+            continue;
+          }
+          if (result.length > 0 && isAboveFn(clientRect, last$1(result))) {
+            line++;
+          }
+          clientRect.line = line;
+          if (predicateFn(clientRect)) {
+            return true;
+          }
+          result.push(clientRect);
+        }
+      };
+      targetClientRect = last$1(caretPosition.getClientRects());
+      if (!targetClientRect) {
+        return result;
+      }
+      node = caretPosition.getNode();
+      add(node);
+      findUntil$1(direction, root, add, node);
+      return result;
+    };
+    var aboveLineNumber = function (lineNumber, clientRect) {
+      return clientRect.line > lineNumber;
+    };
+    var isLineNumber = function (lineNumber, clientRect) {
+      return clientRect.line === lineNumber;
+    };
+    var upUntil = curry(walkUntil, VDirection.Up, isAbove, isBelow);
+    var downUntil = curry(walkUntil, VDirection.Down, isBelow, isAbove);
+    var positionsUntil = function (direction, root, predicateFn, node) {
+      var caretWalker = CaretWalker(root);
+      var walkFn, isBelowFn, isAboveFn, caretPosition;
+      var result = [];
+      var line = 0, clientRect, targetClientRect;
+      var getClientRect = function (caretPosition) {
+        if (direction === 1) {
+          return last$1(caretPosition.getClientRects());
+        }
+        return last$1(caretPosition.getClientRects());
+      };
+      if (direction === 1) {
+        walkFn = caretWalker.next;
+        isBelowFn = isBelow;
+        isAboveFn = isAbove;
+        caretPosition = CaretPosition$1.after(node);
+      } else {
+        walkFn = caretWalker.prev;
+        isBelowFn = isAbove;
+        isAboveFn = isBelow;
+        caretPosition = CaretPosition$1.before(node);
+      }
+      targetClientRect = getClientRect(caretPosition);
+      do {
+        if (!caretPosition.isVisible()) {
+          continue;
+        }
+        clientRect = getClientRect(caretPosition);
+        if (isAboveFn(clientRect, targetClientRect)) {
+          continue;
+        }
+        if (result.length > 0 && isBelowFn(clientRect, last$1(result))) {
+          line++;
+        }
+        clientRect = clone$1(clientRect);
+        clientRect.position = caretPosition;
+        clientRect.line = line;
+        if (predicateFn(clientRect)) {
+          return result;
+        }
+        result.push(clientRect);
+      } while (caretPosition = walkFn(caretPosition));
+      return result;
+    };
+    var isAboveLine = function (lineNumber) {
+      return function (clientRect) {
+        return aboveLineNumber(lineNumber, clientRect);
+      };
+    };
+    var isLine = function (lineNumber) {
+      return function (clientRect) {
+        return isLineNumber(lineNumber, clientRect);
+      };
+    };
+
+    var isContentEditableFalse$7 = isContentEditableFalse;
+    var findNode$1 = findNode;
+    var distanceToRectLeft = function (clientRect, clientX) {
+      return Math.abs(clientRect.left - clientX);
+    };
+    var distanceToRectRight = function (clientRect, clientX) {
+      return Math.abs(clientRect.right - clientX);
+    };
+    var isInside = function (clientX, clientRect) {
+      return clientX >= clientRect.left && clientX <= clientRect.right;
+    };
+    var findClosestClientRect = function (clientRects, clientX) {
+      return reduce(clientRects, function (oldClientRect, clientRect) {
+        var oldDistance, newDistance;
+        oldDistance = Math.min(distanceToRectLeft(oldClientRect, clientX), distanceToRectRight(oldClientRect, clientX));
+        newDistance = Math.min(distanceToRectLeft(clientRect, clientX), distanceToRectRight(clientRect, clientX));
+        if (isInside(clientX, clientRect)) {
+          return clientRect;
+        }
+        if (isInside(clientX, oldClientRect)) {
+          return oldClientRect;
+        }
+        if (newDistance === oldDistance && isContentEditableFalse$7(clientRect.node)) {
+          return clientRect;
+        }
+        if (newDistance < oldDistance) {
+          return clientRect;
+        }
+        return oldClientRect;
+      });
+    };
+    var walkUntil$1 = function (direction, root, predicateFn, node) {
+      while (node = findNode$1(node, direction, isEditableCaretCandidate, root)) {
+        if (predicateFn(node)) {
+          return;
+        }
+      }
+    };
+    var findLineNodeRects = function (root, targetNodeRect) {
+      var clientRects = [];
+      var collect = function (checkPosFn, node) {
+        var lineRects;
+        lineRects = filter(getClientRects([node]), function (clientRect) {
+          return !checkPosFn(clientRect, targetNodeRect);
+        });
+        clientRects = clientRects.concat(lineRects);
+        return lineRects.length === 0;
+      };
+      clientRects.push(targetNodeRect);
+      walkUntil$1(VDirection.Up, root, curry(collect, isAbove), targetNodeRect.node);
+      walkUntil$1(VDirection.Down, root, curry(collect, isBelow), targetNodeRect.node);
+      return clientRects;
+    };
+    var getFakeCaretTargets = function (root) {
+      return filter(from$1(root.getElementsByTagName('*')), isFakeCaretTarget);
+    };
+    var caretInfo = function (clientRect, clientX) {
+      return {
+        node: clientRect.node,
+        before: distanceToRectLeft(clientRect, clientX) < distanceToRectRight(clientRect, clientX)
+      };
+    };
+    var closestCaret = function (root, clientX, clientY) {
+      var closestNodeRect;
+      var contentEditableFalseNodeRects = getClientRects(getFakeCaretTargets(root));
+      var targetNodeRects = filter(contentEditableFalseNodeRects, function (rect) {
+        return clientY >= rect.top && clientY <= rect.bottom;
+      });
+      closestNodeRect = findClosestClientRect(targetNodeRects, clientX);
+      if (closestNodeRect) {
+        closestNodeRect = findClosestClientRect(findLineNodeRects(root, closestNodeRect), clientX);
+        if (closestNodeRect && isFakeCaretTarget(closestNodeRect.node)) {
+          return caretInfo(closestNodeRect, clientX);
+        }
+      }
+      return null;
+    };
+
+    var isContentEditableTrue$3 = isContentEditableTrue;
+    var isContentEditableFalse$8 = isContentEditableFalse;
+    var showCaret = function (direction, editor, node, before, scrollIntoView) {
+      return editor._selectionOverrides.showCaret(direction, node, before, scrollIntoView);
+    };
+    var getNodeRange = function (node) {
+      var rng = node.ownerDocument.createRange();
+      rng.selectNode(node);
+      return rng;
+    };
+    var selectNode = function (editor, node) {
+      var e = editor.fire('BeforeObjectSelected', { target: node });
+      if (e.isDefaultPrevented()) {
+        return null;
+      }
+      return getNodeRange(node);
+    };
+    var renderCaretAtRange = function (editor, range, scrollIntoView) {
+      var normalizedRange = normalizeRange(1, editor.getBody(), range);
+      var caretPosition = CaretPosition$1.fromRangeStart(normalizedRange);
+      var caretPositionNode = caretPosition.getNode();
+      if (isContentEditableFalse$8(caretPositionNode)) {
+        return showCaret(1, editor, caretPositionNode, !caretPosition.isAtEnd(), false);
+      }
+      var caretPositionBeforeNode = caretPosition.getNode(true);
+      if (isContentEditableFalse$8(caretPositionBeforeNode)) {
+        return showCaret(1, editor, caretPositionBeforeNode, false, false);
+      }
+      var ceRoot = editor.dom.getParent(caretPosition.getNode(), function (node) {
+        return isContentEditableFalse$8(node) || isContentEditableTrue$3(node);
+      });
+      if (isContentEditableFalse$8(ceRoot)) {
+        return showCaret(1, editor, ceRoot, false, scrollIntoView);
+      }
+      return null;
+    };
+    var renderRangeCaret = function (editor, range, scrollIntoView) {
+      if (!range || !range.collapsed) {
+        return range;
+      }
+      var caretRange = renderCaretAtRange(editor, range, scrollIntoView);
+      if (caretRange) {
+        return caretRange;
+      }
+      return range;
+    };
+
+    var BreakType;
+    (function (BreakType) {
+      BreakType[BreakType['Br'] = 0] = 'Br';
+      BreakType[BreakType['Block'] = 1] = 'Block';
+      BreakType[BreakType['Wrap'] = 2] = 'Wrap';
+      BreakType[BreakType['Eol'] = 3] = 'Eol';
+    }(BreakType || (BreakType = {})));
+    var flip = function (direction, positions) {
+      return direction === HDirection.Backwards ? reverse(positions) : positions;
+    };
+    var walk$3 = function (direction, caretWalker, pos) {
+      return direction === HDirection.Forwards ? caretWalker.next(pos) : caretWalker.prev(pos);
+    };
+    var getBreakType = function (scope, direction, currentPos, nextPos) {
+      if (isBr(nextPos.getNode(direction === HDirection.Forwards))) {
+        return BreakType.Br;
+      } else if (isInSameBlock(currentPos, nextPos) === false) {
+        return BreakType.Block;
+      } else {
+        return BreakType.Wrap;
+      }
+    };
+    var getPositionsUntil = function (predicate, direction, scope, start) {
+      var caretWalker = CaretWalker(scope);
+      var currentPos = start, nextPos;
+      var positions = [];
+      while (currentPos) {
+        nextPos = walk$3(direction, caretWalker, currentPos);
+        if (!nextPos) {
+          break;
+        }
+        if (isBr(nextPos.getNode(false))) {
+          if (direction === HDirection.Forwards) {
+            return {
+              positions: flip(direction, positions).concat([nextPos]),
+              breakType: BreakType.Br,
+              breakAt: Option.some(nextPos)
+            };
+          } else {
+            return {
+              positions: flip(direction, positions),
+              breakType: BreakType.Br,
+              breakAt: Option.some(nextPos)
+            };
+          }
+        }
+        if (!nextPos.isVisible()) {
+          currentPos = nextPos;
+          continue;
+        }
+        if (predicate(currentPos, nextPos)) {
+          var breakType = getBreakType(scope, direction, currentPos, nextPos);
+          return {
+            positions: flip(direction, positions),
+            breakType: breakType,
+            breakAt: Option.some(nextPos)
+          };
+        }
+        positions.push(nextPos);
+        currentPos = nextPos;
+      }
+      return {
+        positions: flip(direction, positions),
+        breakType: BreakType.Eol,
+        breakAt: Option.none()
+      };
+    };
+    var getAdjacentLinePositions = function (direction, getPositionsUntilBreak, scope, start) {
+      return getPositionsUntilBreak(scope, start).breakAt.map(function (pos) {
+        var positions = getPositionsUntilBreak(scope, pos).positions;
+        return direction === HDirection.Backwards ? positions.concat(pos) : [pos].concat(positions);
+      }).getOr([]);
+    };
+    var findClosestHorizontalPositionFromPoint = function (positions, x) {
+      return foldl(positions, function (acc, newPos) {
+        return acc.fold(function () {
+          return Option.some(newPos);
+        }, function (lastPos) {
+          return lift2(head(lastPos.getClientRects()), head(newPos.getClientRects()), function (lastRect, newRect) {
+            var lastDist = Math.abs(x - lastRect.left);
+            var newDist = Math.abs(x - newRect.left);
+            return newDist <= lastDist ? newPos : lastPos;
+          }).or(acc);
+        });
+      }, Option.none());
+    };
+    var findClosestHorizontalPosition = function (positions, pos) {
+      return head(pos.getClientRects()).bind(function (targetRect) {
+        return findClosestHorizontalPositionFromPoint(positions, targetRect.left);
+      });
+    };
+    var getPositionsUntilPreviousLine = curry(getPositionsUntil, CaretPosition.isAbove, -1);
+    var getPositionsUntilNextLine = curry(getPositionsUntil, CaretPosition.isBelow, 1);
+    var isAtFirstLine = function (scope, pos) {
+      return getPositionsUntilPreviousLine(scope, pos).breakAt.isNone();
+    };
+    var isAtLastLine = function (scope, pos) {
+      return getPositionsUntilNextLine(scope, pos).breakAt.isNone();
+    };
+    var getPositionsAbove = curry(getAdjacentLinePositions, -1, getPositionsUntilPreviousLine);
+    var getPositionsBelow = curry(getAdjacentLinePositions, 1, getPositionsUntilNextLine);
+    var getFirstLinePositions = function (scope) {
+      return firstPositionIn(scope).map(function (pos) {
+        return [pos].concat(getPositionsUntilNextLine(scope, pos).positions);
+      }).getOr([]);
+    };
+    var getLastLinePositions = function (scope) {
+      return lastPositionIn(scope).map(function (pos) {
+        return getPositionsUntilPreviousLine(scope, pos).positions.concat(pos);
+      }).getOr([]);
+    };
+
+    var isContentEditableFalse$9 = isContentEditableFalse;
+    var getSelectedNode$1 = getSelectedNode;
+    var moveToCeFalseHorizontally = function (direction, editor, getNextPosFn, range) {
+      var forwards = direction === HDirection.Forwards;
+      var isBeforeContentEditableFalseFn = forwards ? isBeforeContentEditableFalse : isAfterContentEditableFalse;
+      if (!range.collapsed) {
+        var node = getSelectedNode$1(range);
+        if (isContentEditableFalse$9(node)) {
+          return showCaret(direction, editor, node, direction === HDirection.Backwards, true);
+        }
+      }
+      var rangeIsInContainerBlock = isRangeInCaretContainerBlock(range);
+      var caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range);
+      if (isBeforeContentEditableFalseFn(caretPosition)) {
+        return selectNode(editor, caretPosition.getNode(!forwards));
+      }
+      var nextCaretPosition = normalizePosition(forwards, getNextPosFn(caretPosition));
+      if (!nextCaretPosition) {
+        if (rangeIsInContainerBlock) {
+          return range;
+        }
+        return null;
+      }
+      if (isBeforeContentEditableFalseFn(nextCaretPosition)) {
+        return showCaret(direction, editor, nextCaretPosition.getNode(!forwards), forwards, true);
+      }
+      var peekCaretPosition = getNextPosFn(nextCaretPosition);
+      if (peekCaretPosition && isBeforeContentEditableFalseFn(peekCaretPosition)) {
+        if (isMoveInsideSameBlock(nextCaretPosition, peekCaretPosition)) {
+          return showCaret(direction, editor, peekCaretPosition.getNode(!forwards), forwards, true);
+        }
+      }
+      if (rangeIsInContainerBlock) {
+        return renderRangeCaret(editor, nextCaretPosition.toRange(), true);
+      }
+      return null;
+    };
+    var moveToCeFalseVertically = function (direction, editor, walkerFn, range) {
+      var caretPosition, linePositions, nextLinePositions;
+      var closestNextLineRect, caretClientRect, clientX;
+      var dist1, dist2, contentEditableFalseNode;
+      contentEditableFalseNode = getSelectedNode$1(range);
+      caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range);
+      linePositions = walkerFn(editor.getBody(), isAboveLine(1), caretPosition);
+      nextLinePositions = filter(linePositions, isLine(1));
+      caretClientRect = last$1(caretPosition.getClientRects());
+      if (isBeforeContentEditableFalse(caretPosition) || isBeforeTable(caretPosition)) {
+        contentEditableFalseNode = caretPosition.getNode();
+      }
+      if (isAfterContentEditableFalse(caretPosition) || isAfterTable(caretPosition)) {
+        contentEditableFalseNode = caretPosition.getNode(true);
+      }
+      if (!caretClientRect) {
+        return null;
+      }
+      clientX = caretClientRect.left;
+      closestNextLineRect = findClosestClientRect(nextLinePositions, clientX);
+      if (closestNextLineRect) {
+        if (isContentEditableFalse$9(closestNextLineRect.node)) {
+          dist1 = Math.abs(clientX - closestNextLineRect.left);
+          dist2 = Math.abs(clientX - closestNextLineRect.right);
+          return showCaret(direction, editor, closestNextLineRect.node, dist1 < dist2, true);
+        }
+      }
+      if (contentEditableFalseNode) {
+        var caretPositions = positionsUntil(direction, editor.getBody(), isAboveLine(1), contentEditableFalseNode);
+        closestNextLineRect = findClosestClientRect(filter(caretPositions, isLine(1)), clientX);
+        if (closestNextLineRect) {
+          return renderRangeCaret(editor, closestNextLineRect.position.toRange(), true);
+        }
+        closestNextLineRect = last$1(filter(caretPositions, isLine(0)));
+        if (closestNextLineRect) {
+          return renderRangeCaret(editor, closestNextLineRect.position.toRange(), true);
+        }
+      }
+    };
+    var createTextBlock = function (editor) {
+      var textBlock = editor.dom.create(getForcedRootBlock(editor));
+      if (!Env.ie || Env.ie >= 11) {
+        textBlock.innerHTML = '<br data-mce-bogus="1">';
+      }
+      return textBlock;
+    };
+    var exitPreBlock = function (editor, direction, range) {
+      var pre, caretPos, newBlock;
+      var caretWalker = CaretWalker(editor.getBody());
+      var getNextVisualCaretPosition = curry(getVisualCaretPosition, caretWalker.next);
+      var getPrevVisualCaretPosition = curry(getVisualCaretPosition, caretWalker.prev);
+      if (range.collapsed && editor.settings.forced_root_block) {
+        pre = editor.dom.getParent(range.startContainer, 'PRE');
+        if (!pre) {
+          return;
+        }
+        if (direction === 1) {
+          caretPos = getNextVisualCaretPosition(CaretPosition$1.fromRangeStart(range));
+        } else {
+          caretPos = getPrevVisualCaretPosition(CaretPosition$1.fromRangeStart(range));
+        }
+        if (!caretPos) {
+          newBlock = createTextBlock(editor);
+          if (direction === 1) {
+            editor.$(pre).after(newBlock);
+          } else {
+            editor.$(pre).before(newBlock);
+          }
+          editor.selection.select(newBlock, true);
+          editor.selection.collapse();
+        }
+      }
+    };
+    var getHorizontalRange = function (editor, forward) {
+      var caretWalker = CaretWalker(editor.getBody());
+      var getNextVisualCaretPosition = curry(getVisualCaretPosition, caretWalker.next);
+      var getPrevVisualCaretPosition = curry(getVisualCaretPosition, caretWalker.prev);
+      var newRange;
+      var direction = forward ? HDirection.Forwards : HDirection.Backwards;
+      var getNextPosFn = forward ? getNextVisualCaretPosition : getPrevVisualCaretPosition;
+      var range = editor.selection.getRng();
+      newRange = moveToCeFalseHorizontally(direction, editor, getNextPosFn, range);
+      if (newRange) {
+        return newRange;
+      }
+      newRange = exitPreBlock(editor, direction, range);
+      if (newRange) {
+        return newRange;
+      }
+      return null;
+    };
+    var getVerticalRange = function (editor, down) {
+      var newRange;
+      var direction = down ? 1 : -1;
+      var walkerFn = down ? downUntil : upUntil;
+      var range = editor.selection.getRng();
+      newRange = moveToCeFalseVertically(direction, editor, walkerFn, range);
+      if (newRange) {
+        return newRange;
+      }
+      newRange = exitPreBlock(editor, direction, range);
+      if (newRange) {
+        return newRange;
+      }
+      return null;
+    };
+    var moveH = function (editor, forward) {
+      return function () {
+        var newRng = getHorizontalRange(editor, forward);
+        if (newRng) {
+          editor.selection.setRng(newRng);
+          return true;
+        } else {
+          return false;
+        }
+      };
+    };
+    var moveV = function (editor, down) {
+      return function () {
+        var newRng = getVerticalRange(editor, down);
+        if (newRng) {
+          editor.selection.setRng(newRng);
+          return true;
+        } else {
+          return false;
+        }
+      };
+    };
+    var isCefPosition = function (forward) {
+      return function (pos) {
+        return forward ? isAfterContentEditableFalse(pos) : isBeforeContentEditableFalse(pos);
+      };
+    };
+    var moveToLineEndPoint = function (editor, forward) {
+      return function () {
+        var from = forward ? CaretPosition$1.fromRangeEnd(editor.selection.getRng()) : CaretPosition$1.fromRangeStart(editor.selection.getRng());
+        var result = forward ? getPositionsUntilNextLine(editor.getBody(), from) : getPositionsUntilPreviousLine(editor.getBody(), from);
+        var to = forward ? last(result.positions) : head(result.positions);
+        return to.filter(isCefPosition(forward)).fold(constant(false), function (pos) {
+          editor.selection.setRng(pos.toRange());
+          return true;
+        });
+      };
+    };
+
+    var deflate = function (rect, delta) {
+      return {
+        left: rect.left - delta,
+        top: rect.top - delta,
+        right: rect.right + delta * 2,
+        bottom: rect.bottom + delta * 2,
+        width: rect.width + delta,
+        height: rect.height + delta
+      };
+    };
+    var getCorners = function (getYAxisValue, tds) {
+      return bind(tds, function (td) {
+        var rect = deflate(clone$1(td.getBoundingClientRect()), -1);
+        return [
+          {
+            x: rect.left,
+            y: getYAxisValue(rect),
+            cell: td
+          },
+          {
+            x: rect.right,
+            y: getYAxisValue(rect),
+            cell: td
+          }
+        ];
+      });
+    };
+    var findClosestCorner = function (corners, x, y) {
+      return foldl(corners, function (acc, newCorner) {
+        return acc.fold(function () {
+          return Option.some(newCorner);
+        }, function (oldCorner) {
+          var oldDist = Math.sqrt(Math.abs(oldCorner.x - x) + Math.abs(oldCorner.y - y));
+          var newDist = Math.sqrt(Math.abs(newCorner.x - x) + Math.abs(newCorner.y - y));
+          return Option.some(newDist < oldDist ? newCorner : oldCorner);
+        });
+      }, Option.none());
+    };
+    var getClosestCell$1 = function (getYAxisValue, isTargetCorner, table, x, y) {
+      var cells = descendants$1(Element.fromDom(table), 'td,th,caption').map(function (e) {
+        return e.dom();
+      });
+      var corners = filter(getCorners(getYAxisValue, cells), function (corner) {
+        return isTargetCorner(corner, y);
+      });
+      return findClosestCorner(corners, x, y).map(function (corner) {
+        return corner.cell;
+      });
+    };
+    var getBottomValue = function (rect) {
+      return rect.bottom;
+    };
+    var getTopValue = function (rect) {
+      return rect.top;
+    };
+    var isAbove$1 = function (corner, y) {
+      return corner.y < y;
+    };
+    var isBelow$1 = function (corner, y) {
+      return corner.y > y;
+    };
+    var getClosestCellAbove = curry(getClosestCell$1, getBottomValue, isAbove$1);
+    var getClosestCellBelow = curry(getClosestCell$1, getTopValue, isBelow$1);
+    var findClosestPositionInAboveCell = function (table, pos) {
+      return head(pos.getClientRects()).bind(function (rect) {
+        return getClosestCellAbove(table, rect.left, rect.top);
+      }).bind(function (cell) {
+        return findClosestHorizontalPosition(getLastLinePositions(cell), pos);
+      });
+    };
+    var findClosestPositionInBelowCell = function (table, pos) {
+      return last(pos.getClientRects()).bind(function (rect) {
+        return getClosestCellBelow(table, rect.left, rect.top);
+      }).bind(function (cell) {
+        return findClosestHorizontalPosition(getFirstLinePositions(cell), pos);
+      });
+    };
+
+    var moveToRange = function (editor, rng) {
+      editor.selection.setRng(rng);
+      scrollRangeIntoView(editor, rng);
+    };
+    var hasNextBreak = function (getPositionsUntil, scope, lineInfo) {
+      return lineInfo.breakAt.map(function (breakPos) {
+        return getPositionsUntil(scope, breakPos).breakAt.isSome();
+      }).getOr(false);
+    };
+    var startsWithWrapBreak = function (lineInfo) {
+      return lineInfo.breakType === BreakType.Wrap && lineInfo.positions.length === 0;
+    };
+    var startsWithBrBreak = function (lineInfo) {
+      return lineInfo.breakType === BreakType.Br && lineInfo.positions.length === 1;
+    };
+    var isAtTableCellLine = function (getPositionsUntil, scope, pos) {
+      var lineInfo = getPositionsUntil(scope, pos);
+      if (startsWithWrapBreak(lineInfo) || !isBr(pos.getNode()) && startsWithBrBreak(lineInfo)) {
+        return !hasNextBreak(getPositionsUntil, scope, lineInfo);
+      } else {
+        return lineInfo.breakAt.isNone();
+      }
+    };
+    var isAtFirstTableCellLine = curry(isAtTableCellLine, getPositionsUntilPreviousLine);
+    var isAtLastTableCellLine = curry(isAtTableCellLine, getPositionsUntilNextLine);
+    var isCaretAtStartOrEndOfTable = function (forward, rng, table) {
+      var caretPos = CaretPosition$1.fromRangeStart(rng);
+      return positionIn(!forward, table).map(function (pos) {
+        return pos.isEqual(caretPos);
+      }).getOr(false);
+    };
+    var navigateHorizontally = function (editor, forward, table, _td) {
+      var rng = editor.selection.getRng();
+      var direction = forward ? 1 : -1;
+      if (isFakeCaretTableBrowser() && isCaretAtStartOrEndOfTable(forward, rng, table)) {
+        var newRng = showCaret(direction, editor, table, !forward, true);
+        moveToRange(editor, newRng);
+        return true;
+      }
+      return false;
+    };
+    var getClosestAbovePosition = function (root, table, start) {
+      return findClosestPositionInAboveCell(table, start).orThunk(function () {
+        return head(start.getClientRects()).bind(function (rect) {
+          return findClosestHorizontalPositionFromPoint(getPositionsAbove(root, CaretPosition$1.before(table)), rect.left);
+        });
+      }).getOr(CaretPosition$1.before(table));
+    };
+    var getClosestBelowPosition = function (root, table, start) {
+      return findClosestPositionInBelowCell(table, start).orThunk(function () {
+        return head(start.getClientRects()).bind(function (rect) {
+          return findClosestHorizontalPositionFromPoint(getPositionsBelow(root, CaretPosition$1.after(table)), rect.left);
+        });
+      }).getOr(CaretPosition$1.after(table));
+    };
+    var getTable = function (previous, pos) {
+      var node = pos.getNode(previous);
+      return isElement$1(node) && node.nodeName === 'TABLE' ? Option.some(node) : Option.none();
+    };
+    var renderBlock = function (down, editor, table, pos) {
+      var forcedRootBlock = getForcedRootBlock(editor);
+      if (forcedRootBlock) {
+        editor.undoManager.transact(function () {
+          var element = Element.fromTag(forcedRootBlock);
+          setAll(element, getForcedRootBlockAttrs(editor));
+          append(element, Element.fromTag('br'));
+          if (down) {
+            after(Element.fromDom(table), element);
+          } else {
+            before(Element.fromDom(table), element);
+          }
+          var rng = editor.dom.createRng();
+          rng.setStart(element.dom(), 0);
+          rng.setEnd(element.dom(), 0);
+          moveToRange(editor, rng);
+        });
+      } else {
+        moveToRange(editor, pos.toRange());
+      }
+    };
+    var moveCaret = function (editor, down, pos) {
+      var table = down ? getTable(true, pos) : getTable(false, pos);
+      var last = down === false;
+      table.fold(function () {
+        return moveToRange(editor, pos.toRange());
+      }, function (table) {
+        return positionIn(last, editor.getBody()).filter(function (lastPos) {
+          return lastPos.isEqual(pos);
+        }).fold(function () {
+          return moveToRange(editor, pos.toRange());
+        }, function (_) {
+          return renderBlock(down, editor, table, pos);
+        });
+      });
+    };
+    var navigateVertically = function (editor, down, table, td) {
+      var rng = editor.selection.getRng();
+      var pos = CaretPosition$1.fromRangeStart(rng);
+      var root = editor.getBody();
+      if (!down && isAtFirstTableCellLine(td, pos)) {
+        var newPos = getClosestAbovePosition(root, table, pos);
+        moveCaret(editor, down, newPos);
+        return true;
+      } else if (down && isAtLastTableCellLine(td, pos)) {
+        var newPos = getClosestBelowPosition(root, table, pos);
+        moveCaret(editor, down, newPos);
+        return true;
+      } else {
+        return false;
+      }
+    };
+    var moveH$1 = function (editor, forward) {
+      return function () {
+        return Option.from(editor.dom.getParent(editor.selection.getNode(), 'td,th')).bind(function (td) {
+          return Option.from(editor.dom.getParent(td, 'table')).map(function (table) {
+            return navigateHorizontally(editor, forward, table);
+          });
+        }).getOr(false);
+      };
+    };
+    var moveV$1 = function (editor, forward) {
+      return function () {
+        return Option.from(editor.dom.getParent(editor.selection.getNode(), 'td,th')).bind(function (td) {
+          return Option.from(editor.dom.getParent(td, 'table')).map(function (table) {
+            return navigateVertically(editor, forward, table, td);
+          });
+        }).getOr(false);
+      };
+    };
+
+    var isTarget = function (node) {
+      return contains(['figcaption'], name(node));
+    };
+    var rangeBefore = function (target) {
+      var rng = domGlobals.document.createRange();
+      rng.setStartBefore(target.dom());
+      rng.setEndBefore(target.dom());
+      return rng;
+    };
+    var insertElement = function (root, elm, forward) {
+      if (forward) {
+        append(root, elm);
+      } else {
+        prepend(root, elm);
+      }
+    };
+    var insertBr = function (root, forward) {
+      var br = Element.fromTag('br');
+      insertElement(root, br, forward);
+      return rangeBefore(br);
+    };
+    var insertBlock$1 = function (root, forward, blockName, attrs) {
+      var block = Element.fromTag(blockName);
+      var br = Element.fromTag('br');
+      setAll(block, attrs);
+      append(block, br);
+      insertElement(root, block, forward);
+      return rangeBefore(br);
+    };
+    var insertEmptyLine = function (root, rootBlockName, attrs, forward) {
+      if (rootBlockName === '') {
+        return insertBr(root, forward);
+      } else {
+        return insertBlock$1(root, forward, rootBlockName, attrs);
+      }
+    };
+    var getClosestTargetBlock = function (pos, root) {
+      var isRoot = curry(eq$2, root);
+      return closest(Element.fromDom(pos.container()), isBlock, isRoot).filter(isTarget);
+    };
+    var isAtFirstOrLastLine = function (root, forward, pos) {
+      return forward ? isAtLastLine(root.dom(), pos) : isAtFirstLine(root.dom(), pos);
+    };
+    var moveCaretToNewEmptyLine = function (editor, forward) {
+      var root = Element.fromDom(editor.getBody());
+      var pos = CaretPosition$1.fromRangeStart(editor.selection.getRng());
+      var rootBlock = getForcedRootBlock(editor);
+      var rootBlockAttrs = getForcedRootBlockAttrs(editor);
+      return getClosestTargetBlock(pos, root).exists(function () {
+        if (isAtFirstOrLastLine(root, forward, pos)) {
+          var rng = insertEmptyLine(root, rootBlock, rootBlockAttrs, forward);
+          editor.selection.setRng(rng);
+          return true;
+        } else {
+          return false;
+        }
+      });
+    };
+    var moveV$2 = function (editor, forward) {
+      return function () {
+        if (editor.selection.isCollapsed()) {
+          return moveCaretToNewEmptyLine(editor, forward);
+        } else {
+          return false;
+        }
+      };
+    };
+
+    var defaultPatterns = function (patterns) {
+      return map(patterns, function (pattern) {
+        return __assign({
+          shiftKey: false,
+          altKey: false,
+          ctrlKey: false,
+          metaKey: false,
+          keyCode: 0,
+          action: noop
+        }, pattern);
+      });
+    };
+    var matchesEvent = function (pattern, evt) {
+      return evt.keyCode === pattern.keyCode && evt.shiftKey === pattern.shiftKey && evt.altKey === pattern.altKey && evt.ctrlKey === pattern.ctrlKey && evt.metaKey === pattern.metaKey;
+    };
+    var match$1 = function (patterns, evt) {
+      return bind(defaultPatterns(patterns), function (pattern) {
+        return matchesEvent(pattern, evt) ? [pattern] : [];
+      });
+    };
+    var action = function (f) {
+      var x = [];
+      for (var _i = 1; _i < arguments.length; _i++) {
+        x[_i - 1] = arguments[_i];
+      }
+      return function () {
+        return f.apply(null, x);
+      };
+    };
+    var execute = function (patterns, evt) {
+      return find(match$1(patterns, evt), function (pattern) {
+        return pattern.action();
+      });
+    };
+
+    var executeKeydownOverride = function (editor, caret, evt) {
+      var os = detect$3().os;
+      execute([
+        {
+          keyCode: VK.RIGHT,
+          action: moveH(editor, true)
+        },
+        {
+          keyCode: VK.LEFT,
+          action: moveH(editor, false)
+        },
+        {
+          keyCode: VK.UP,
+          action: moveV(editor, false)
+        },
+        {
+          keyCode: VK.DOWN,
+          action: moveV(editor, true)
+        },
+        {
+          keyCode: VK.RIGHT,
+          action: moveH$1(editor, true)
+        },
+        {
+          keyCode: VK.LEFT,
+          action: moveH$1(editor, false)
+        },
+        {
+          keyCode: VK.UP,
+          action: moveV$1(editor, false)
+        },
+        {
+          keyCode: VK.DOWN,
+          action: moveV$1(editor, true)
+        },
+        {
+          keyCode: VK.RIGHT,
+          action: move(editor, caret, true)
+        },
+        {
+          keyCode: VK.LEFT,
+          action: move(editor, caret, false)
+        },
+        {
+          keyCode: VK.RIGHT,
+          ctrlKey: !os.isOSX(),
+          altKey: os.isOSX(),
+          action: moveNextWord(editor, caret)
+        },
+        {
+          keyCode: VK.LEFT,
+          ctrlKey: !os.isOSX(),
+          altKey: os.isOSX(),
+          action: movePrevWord(editor, caret)
+        },
+        {
+          keyCode: VK.UP,
+          action: moveV$2(editor, false)
+        },
+        {
+          keyCode: VK.DOWN,
+          action: moveV$2(editor, true)
+        }
+      ], evt).each(function (_) {
+        evt.preventDefault();
+      });
+    };
+    var setup$a = function (editor, caret) {
+      editor.on('keydown', function (evt) {
+        if (evt.isDefaultPrevented() === false) {
+          executeKeydownOverride(editor, caret, evt);
+        }
+      });
+    };
+
+    var isBeforeRoot = function (rootNode) {
+      return function (elm) {
+        return eq$2(rootNode, Element.fromDom(elm.dom().parentNode));
+      };
+    };
+    var getParentBlock$1 = function (rootNode, elm) {
+      return contains$2(rootNode, elm) ? closest(elm, function (element) {
+        return isTextBlock(element) || isListItem(element);
+      }, isBeforeRoot(rootNode)) : Option.none();
+    };
+    var placeCaretInEmptyBody = function (editor) {
+      var body = editor.getBody();
+      var node = body.firstChild && editor.dom.isBlock(body.firstChild) ? body.firstChild : body;
+      editor.selection.setCursorLocation(node, 0);
+    };
+    var paddEmptyBody = function (editor) {
+      if (editor.dom.isEmpty(editor.getBody())) {
+        editor.setContent('');
+        placeCaretInEmptyBody(editor);
+      }
+    };
+    var willDeleteLastPositionInElement = function (forward, fromPos, elm) {
+      return lift2(firstPositionIn(elm), lastPositionIn(elm), function (firstPos, lastPos) {
+        var normalizedFirstPos = normalizePosition(true, firstPos);
+        var normalizedLastPos = normalizePosition(false, lastPos);
+        var normalizedFromPos = normalizePosition(false, fromPos);
+        if (forward) {
+          return nextPosition(elm, normalizedFromPos).map(function (nextPos) {
+            return nextPos.isEqual(normalizedLastPos) && fromPos.isEqual(normalizedFirstPos);
+          }).getOr(false);
+        } else {
+          return prevPosition(elm, normalizedFromPos).map(function (prevPos) {
+            return prevPos.isEqual(normalizedFirstPos) && fromPos.isEqual(normalizedLastPos);
+          }).getOr(false);
+        }
+      }).getOr(true);
+    };
+
+    var blockPosition = function (block, position) {
+      return {
+        block: block,
+        position: position
+      };
+    };
+    var blockBoundary = function (from, to) {
+      return {
+        from: from,
+        to: to
+      };
+    };
+    var getBlockPosition = function (rootNode, pos) {
+      var rootElm = Element.fromDom(rootNode);
+      var containerElm = Element.fromDom(pos.container());
+      return getParentBlock$1(rootElm, containerElm).map(function (block) {
+        return blockPosition(block, pos);
+      });
+    };
+    var isDifferentBlocks = function (blockBoundary) {
+      return eq$2(blockBoundary.from.block, blockBoundary.to.block) === false;
+    };
+    var hasSameParent = function (blockBoundary) {
+      return parent(blockBoundary.from.block).bind(function (parent1) {
+        return parent(blockBoundary.to.block).filter(function (parent2) {
+          return eq$2(parent1, parent2);
+        });
+      }).isSome();
+    };
+    var isEditable = function (blockBoundary) {
+      return isContentEditableFalse(blockBoundary.from.block.dom()) === false && isContentEditableFalse(blockBoundary.to.block.dom()) === false;
+    };
+    var skipLastBr = function (rootNode, forward, blockPosition) {
+      if (isBr(blockPosition.position.getNode()) && isEmpty$1(blockPosition.block) === false) {
+        return positionIn(false, blockPosition.block.dom()).bind(function (lastPositionInBlock) {
+          if (lastPositionInBlock.isEqual(blockPosition.position)) {
+            return fromPosition(forward, rootNode, lastPositionInBlock).bind(function (to) {
+              return getBlockPosition(rootNode, to);
+            });
+          } else {
+            return Option.some(blockPosition);
+          }
+        }).getOr(blockPosition);
+      } else {
+        return blockPosition;
+      }
+    };
+    var readFromRange = function (rootNode, forward, rng) {
+      var fromBlockPos = getBlockPosition(rootNode, CaretPosition$1.fromRangeStart(rng));
+      var toBlockPos = fromBlockPos.bind(function (blockPos) {
+        return fromPosition(forward, rootNode, blockPos.position).bind(function (to) {
+          return getBlockPosition(rootNode, to).map(function (blockPos) {
+            return skipLastBr(rootNode, forward, blockPos);
+          });
+        });
+      });
+      return lift2(fromBlockPos, toBlockPos, blockBoundary).filter(function (blockBoundary) {
+        return isDifferentBlocks(blockBoundary) && hasSameParent(blockBoundary) && isEditable(blockBoundary);
+      });
+    };
+    var read$3 = function (rootNode, forward, rng) {
+      return rng.collapsed ? readFromRange(rootNode, forward, rng) : Option.none();
+    };
+
+    var getChildrenUntilBlockBoundary = function (block) {
+      var children$1 = children(block);
+      return findIndex(children$1, isBlock).fold(function () {
+        return children$1;
+      }, function (index) {
+        return children$1.slice(0, index);
+      });
+    };
+    var extractChildren = function (block) {
+      var children = getChildrenUntilBlockBoundary(block);
+      each(children, remove);
+      return children;
+    };
+    var removeEmptyRoot = function (rootNode, block) {
+      var parents = parentsAndSelf(block, rootNode);
+      return find(parents.reverse(), function (element) {
+        return isEmpty$1(element);
+      }).each(remove);
+    };
+    var isEmptyBefore = function (el) {
+      return filter(prevSiblings(el), function (el) {
+        return !isEmpty$1(el);
+      }).length === 0;
+    };
+    var nestedBlockMerge = function (rootNode, fromBlock, toBlock, insertionPoint) {
+      if (isEmpty$1(toBlock)) {
+        fillWithPaddingBr(toBlock);
+        return firstPositionIn(toBlock.dom());
+      }
+      if (isEmptyBefore(insertionPoint) && isEmpty$1(fromBlock)) {
+        before(insertionPoint, Element.fromTag('br'));
+      }
+      var position = prevPosition(toBlock.dom(), CaretPosition$1.before(insertionPoint.dom()));
+      each(extractChildren(fromBlock), function (child) {
+        before(insertionPoint, child);
+      });
+      removeEmptyRoot(rootNode, fromBlock);
+      return position;
+    };
+    var sidelongBlockMerge = function (rootNode, fromBlock, toBlock) {
+      if (isEmpty$1(toBlock)) {
+        remove(toBlock);
+        if (isEmpty$1(fromBlock)) {
+          fillWithPaddingBr(fromBlock);
+        }
+        return firstPositionIn(fromBlock.dom());
+      }
+      var position = lastPositionIn(toBlock.dom());
+      each(extractChildren(fromBlock), function (child) {
+        append(toBlock, child);
+      });
+      removeEmptyRoot(rootNode, fromBlock);
+      return position;
+    };
+    var findInsertionPoint = function (toBlock, block) {
+      var parentsAndSelf$1 = parentsAndSelf(block, toBlock);
+      return Option.from(parentsAndSelf$1[parentsAndSelf$1.length - 1]);
+    };
+    var getInsertionPoint = function (fromBlock, toBlock) {
+      return contains$2(toBlock, fromBlock) ? findInsertionPoint(toBlock, fromBlock) : Option.none();
+    };
+    var trimBr = function (first, block) {
+      positionIn(first, block.dom()).map(function (position) {
+        return position.getNode();
+      }).map(Element.fromDom).filter(isBr$1).each(remove);
+    };
+    var mergeBlockInto = function (rootNode, fromBlock, toBlock) {
+      trimBr(true, fromBlock);
+      trimBr(false, toBlock);
+      return getInsertionPoint(fromBlock, toBlock).fold(curry(sidelongBlockMerge, rootNode, fromBlock, toBlock), curry(nestedBlockMerge, rootNode, fromBlock, toBlock));
+    };
+    var mergeBlocks = function (rootNode, forward, block1, block2) {
+      return forward ? mergeBlockInto(rootNode, block2, block1) : mergeBlockInto(rootNode, block1, block2);
+    };
+
+    var backspaceDelete$1 = function (editor, forward) {
+      var rootNode = Element.fromDom(editor.getBody());
+      var position = read$3(rootNode.dom(), forward, editor.selection.getRng()).bind(function (blockBoundary) {
+        return mergeBlocks(rootNode, forward, blockBoundary.from.block, blockBoundary.to.block);
+      });
+      position.each(function (pos) {
+        editor.selection.setRng(pos.toRange());
+      });
+      return position.isSome();
+    };
+
+    var deleteRangeMergeBlocks = function (rootNode, selection) {
+      var rng = selection.getRng();
+      return lift2(getParentBlock$1(rootNode, Element.fromDom(rng.startContainer)), getParentBlock$1(rootNode, Element.fromDom(rng.endContainer)), function (block1, block2) {
+        if (eq$2(block1, block2) === false) {
+          rng.deleteContents();
+          mergeBlocks(rootNode, true, block1, block2).each(function (pos) {
+            selection.setRng(pos.toRange());
+          });
+          return true;
+        } else {
+          return false;
+        }
+      }).getOr(false);
+    };
+    var isRawNodeInTable = function (root, rawNode) {
+      var node = Element.fromDom(rawNode);
+      var isRoot = curry(eq$2, root);
+      return ancestor(node, isTableCell, isRoot).isSome();
+    };
+    var isSelectionInTable = function (root, rng) {
+      return isRawNodeInTable(root, rng.startContainer) || isRawNodeInTable(root, rng.endContainer);
+    };
+    var isEverythingSelected = function (root, rng) {
+      var noPrevious = prevPosition(root.dom(), CaretPosition$1.fromRangeStart(rng)).isNone();
+      var noNext = nextPosition(root.dom(), CaretPosition$1.fromRangeEnd(rng)).isNone();
+      return !isSelectionInTable(root, rng) && noPrevious && noNext;
+    };
+    var emptyEditor = function (editor) {
+      editor.setContent('');
+      editor.selection.setCursorLocation();
+      return true;
+    };
+    var deleteRange$1 = function (editor) {
+      var rootNode = Element.fromDom(editor.getBody());
+      var rng = editor.selection.getRng();
+      return isEverythingSelected(rootNode, rng) ? emptyEditor(editor) : deleteRangeMergeBlocks(rootNode, editor.selection);
+    };
+    var backspaceDelete$2 = function (editor, _forward) {
+      return editor.selection.isCollapsed() ? false : deleteRange$1(editor);
+    };
+
+    var isBr$5 = function (pos) {
+      return getElementFromPosition(pos).exists(isBr$1);
+    };
+    var findBr = function (forward, root, pos) {
+      var parentBlocks = filter(parentsAndSelf(Element.fromDom(pos.container()), root), isBlock);
+      var scope = head(parentBlocks).getOr(root);
+      return fromPosition(forward, scope.dom(), pos).filter(isBr$5);
+    };
+    var isBeforeBr = function (root, pos) {
+      return getElementFromPosition(pos).exists(isBr$1) || findBr(true, root, pos).isSome();
+    };
+    var isAfterBr = function (root, pos) {
+      return getElementFromPrevPosition(pos).exists(isBr$1) || findBr(false, root, pos).isSome();
+    };
+    var findPreviousBr = curry(findBr, false);
+    var findNextBr = curry(findBr, true);
+
+    var isCompoundElement = function (node) {
+      return isTableCell(Element.fromDom(node)) || isListItem(Element.fromDom(node));
+    };
+    var DeleteAction = Adt.generate([
+      { remove: ['element'] },
+      { moveToElement: ['element'] },
+      { moveToPosition: ['position'] }
+    ]);
+    var isAtContentEditableBlockCaret = function (forward, from) {
+      var elm = from.getNode(forward === false);
+      var caretLocation = forward ? 'after' : 'before';
+      return isElement$1(elm) && elm.getAttribute('data-mce-caret') === caretLocation;
+    };
+    var isDeleteFromCefDifferentBlocks = function (root, forward, from, to) {
+      var inSameBlock = function (elm) {
+        return isInline(Element.fromDom(elm)) && !isInSameBlock(from, to, root);
+      };
+      return getRelativeCefElm(!forward, from).fold(function () {
+        return getRelativeCefElm(forward, to).fold(constant(false), inSameBlock);
+      }, inSameBlock);
+    };
+    var deleteEmptyBlockOrMoveToCef = function (root, forward, from, to) {
+      var toCefElm = to.getNode(forward === false);
+      return getParentBlock$1(Element.fromDom(root), Element.fromDom(from.getNode())).map(function (blockElm) {
+        return isEmpty$1(blockElm) ? DeleteAction.remove(blockElm.dom()) : DeleteAction.moveToElement(toCefElm);
+      }).orThunk(function () {
+        return Option.some(DeleteAction.moveToElement(toCefElm));
+      });
+    };
+    var findCefPosition = function (root, forward, from) {
+      return fromPosition(forward, root, from).bind(function (to) {
+        if (isCompoundElement(to.getNode())) {
+          return Option.none();
+        } else if (isDeleteFromCefDifferentBlocks(root, forward, from, to)) {
+          return Option.none();
+        } else if (forward && isContentEditableFalse(to.getNode())) {
+          return deleteEmptyBlockOrMoveToCef(root, forward, from, to);
+        } else if (forward === false && isContentEditableFalse(to.getNode(true))) {
+          return deleteEmptyBlockOrMoveToCef(root, forward, from, to);
+        } else if (forward && isAfterContentEditableFalse(from)) {
+          return Option.some(DeleteAction.moveToPosition(to));
+        } else if (forward === false && isBeforeContentEditableFalse(from)) {
+          return Option.some(DeleteAction.moveToPosition(to));
+        } else {
+          return Option.none();
+        }
+      });
+    };
+    var getContentEditableBlockAction = function (forward, elm) {
+      if (forward && isContentEditableFalse(elm.nextSibling)) {
+        return Option.some(DeleteAction.moveToElement(elm.nextSibling));
+      } else if (forward === false && isContentEditableFalse(elm.previousSibling)) {
+        return Option.some(DeleteAction.moveToElement(elm.previousSibling));
+      } else {
+        return Option.none();
+      }
+    };
+    var skipMoveToActionFromInlineCefToContent = function (root, from, deleteAction) {
+      return deleteAction.fold(function (elm) {
+        return Option.some(DeleteAction.remove(elm));
+      }, function (elm) {
+        return Option.some(DeleteAction.moveToElement(elm));
+      }, function (to) {
+        if (isInSameBlock(from, to, root)) {
+          return Option.none();
+        } else {
+          return Option.some(DeleteAction.moveToPosition(to));
+        }
+      });
+    };
+    var getContentEditableAction = function (root, forward, from) {
+      if (isAtContentEditableBlockCaret(forward, from)) {
+        return getContentEditableBlockAction(forward, from.getNode(forward === false)).fold(function () {
+          return findCefPosition(root, forward, from);
+        }, Option.some);
+      } else {
+        return findCefPosition(root, forward, from).bind(function (deleteAction) {
+          return skipMoveToActionFromInlineCefToContent(root, from, deleteAction);
+        });
+      }
+    };
+    var read$4 = function (root, forward, rng) {
+      var normalizedRange = normalizeRange(forward ? 1 : -1, root, rng);
+      var from = CaretPosition$1.fromRangeStart(normalizedRange);
+      var rootElement = Element.fromDom(root);
+      if (forward === false && isAfterContentEditableFalse(from)) {
+        return Option.some(DeleteAction.remove(from.getNode(true)));
+      } else if (forward && isBeforeContentEditableFalse(from)) {
+        return Option.some(DeleteAction.remove(from.getNode()));
+      } else if (forward === false && isBeforeContentEditableFalse(from) && isAfterBr(rootElement, from)) {
+        return findPreviousBr(rootElement, from).map(function (br) {
+          return DeleteAction.remove(br.getNode());
+        });
+      } else if (forward && isAfterContentEditableFalse(from) && isBeforeBr(rootElement, from)) {
+        return findNextBr(rootElement, from).map(function (br) {
+          return DeleteAction.remove(br.getNode());
+        });
+      } else {
+        return getContentEditableAction(root, forward, from);
+      }
+    };
+
+    var deleteElement$1 = function (editor, forward) {
+      return function (element) {
+        editor._selectionOverrides.hideFakeCaret();
+        deleteElement(editor, forward, Element.fromDom(element));
+        return true;
+      };
+    };
+    var moveToElement = function (editor, forward) {
+      return function (element) {
+        var pos = forward ? CaretPosition$1.before(element) : CaretPosition$1.after(element);
+        editor.selection.setRng(pos.toRange());
+        return true;
+      };
+    };
+    var moveToPosition = function (editor) {
+      return function (pos) {
+        editor.selection.setRng(pos.toRange());
+        return true;
+      };
+    };
+    var getAncestorCe = function (editor, node) {
+      return Option.from(getContentEditableRoot$1(editor.getBody(), node));
+    };
+    var backspaceDeleteCaret = function (editor, forward) {
+      var selectedNode = editor.selection.getNode();
+      return getAncestorCe(editor, selectedNode).filter(isContentEditableFalse).fold(function () {
+        var result = read$4(editor.getBody(), forward, editor.selection.getRng()).map(function (deleteAction) {
+          return deleteAction.fold(deleteElement$1(editor, forward), moveToElement(editor, forward), moveToPosition(editor));
+        });
+        return result.getOr(false);
+      }, function () {
+        return true;
+      });
+    };
+    var deleteOffscreenSelection = function (rootElement) {
+      each(descendants$1(rootElement, '.mce-offscreen-selection'), remove);
+    };
+    var backspaceDeleteRange = function (editor, forward) {
+      var selectedNode = editor.selection.getNode();
+      if (isContentEditableFalse(selectedNode)) {
+        var hasCefAncestor = getAncestorCe(editor, selectedNode.parentNode).filter(isContentEditableFalse);
+        return hasCefAncestor.fold(function () {
+          deleteOffscreenSelection(Element.fromDom(editor.getBody()));
+          deleteElement(editor, forward, Element.fromDom(editor.selection.getNode()));
+          paddEmptyBody(editor);
+          return true;
+        }, function () {
+          return true;
+        });
+      }
+      return false;
+    };
+    var getContentEditableRoot$1 = function (root, node) {
+      while (node && node !== root) {
+        if (isContentEditableTrue(node) || isContentEditableFalse(node)) {
+          return node;
+        }
+        node = node.parentNode;
+      }
+      return null;
+    };
+    var paddEmptyElement = function (editor) {
+      var br;
+      var ceRoot = getContentEditableRoot$1(editor.getBody(), editor.selection.getNode());
+      if (isContentEditableTrue(ceRoot) && editor.dom.isBlock(ceRoot) && editor.dom.isEmpty(ceRoot)) {
+        br = editor.dom.create('br', { 'data-mce-bogus': '1' });
+        editor.dom.setHTML(ceRoot, '');
+        ceRoot.appendChild(br);
+        editor.selection.setRng(CaretPosition$1.before(br).toRange());
+      }
+      return true;
+    };
+    var backspaceDelete$3 = function (editor, forward) {
+      if (editor.selection.isCollapsed()) {
+        return backspaceDeleteCaret(editor, forward);
+      } else {
+        return backspaceDeleteRange(editor, forward);
+      }
+    };
+
+    var trimEmptyTextNode$1 = function (dom, node) {
+      if (isText$1(node) && node.data.length === 0) {
+        dom.remove(node);
+      }
+    };
+    var deleteContentAndShowCaret = function (editor, range, node, direction, forward, peekCaretPosition) {
+      var caretRange = showCaret(direction, editor, peekCaretPosition.getNode(!forward), forward, true);
+      if (range.collapsed) {
+        var deleteRange = range.cloneRange();
+        if (forward) {
+          deleteRange.setEnd(caretRange.startContainer, caretRange.startOffset);
+        } else {
+          deleteRange.setStart(caretRange.endContainer, caretRange.endOffset);
+        }
+        deleteRange.deleteContents();
+      } else {
+        range.deleteContents();
+      }
+      editor.selection.setRng(caretRange);
+      trimEmptyTextNode$1(editor.dom, node);
+      return true;
+    };
+    var deleteCefBoundaryText = function (editor, forward) {
+      var range = editor.selection.getRng();
+      if (!isText$1(range.commonAncestorContainer)) {
+        return false;
+      }
+      var direction = forward ? HDirection.Forwards : HDirection.Backwards;
+      var caretWalker = CaretWalker(editor.getBody());
+      var getNextVisualCaretPosition = curry(getVisualCaretPosition, caretWalker.next);
+      var getPrevVisualCaretPosition = curry(getVisualCaretPosition, caretWalker.prev);
+      var getNextPosFn = forward ? getNextVisualCaretPosition : getPrevVisualCaretPosition;
+      var isBeforeContentEditableFalseFn = forward ? isBeforeContentEditableFalse : isAfterContentEditableFalse;
+      var caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range);
+      var nextCaretPosition = normalizePosition(forward, getNextPosFn(caretPosition));
+      if (!nextCaretPosition || !isMoveInsideSameBlock(caretPosition, nextCaretPosition)) {
+        return false;
+      } else if (isBeforeContentEditableFalseFn(nextCaretPosition)) {
+        return deleteContentAndShowCaret(editor, range, caretPosition.getNode(), direction, forward, nextCaretPosition);
+      }
+      var peekCaretPosition = getNextPosFn(nextCaretPosition);
+      if (peekCaretPosition && isBeforeContentEditableFalseFn(peekCaretPosition)) {
+        if (isMoveInsideSameBlock(nextCaretPosition, peekCaretPosition)) {
+          return deleteContentAndShowCaret(editor, range, caretPosition.getNode(), direction, forward, peekCaretPosition);
+        }
+      }
+      return false;
+    };
+    var backspaceDelete$4 = function (editor, forward) {
+      return deleteCefBoundaryText(editor, forward);
+    };
+
+    var isFeatureEnabled$1 = function (editor) {
+      return editor.settings.inline_boundaries !== false;
+    };
+    var rangeFromPositions = function (from, to) {
+      var range = domGlobals.document.createRange();
+      range.setStart(from.container(), from.offset());
+      range.setEnd(to.container(), to.offset());
+      return range;
+    };
+    var hasOnlyTwoOrLessPositionsLeft = function (elm) {
+      return lift2(firstPositionIn(elm), lastPositionIn(elm), function (firstPos, lastPos) {
+        var normalizedFirstPos = normalizePosition(true, firstPos);
+        var normalizedLastPos = normalizePosition(false, lastPos);
+        return nextPosition(elm, normalizedFirstPos).map(function (pos) {
+          return pos.isEqual(normalizedLastPos);
+        }).getOr(true);
+      }).getOr(true);
+    };
+    var setCaretLocation = function (editor, caret) {
+      return function (location) {
+        return renderCaret(caret, location).map(function (pos) {
+          setCaretPosition(editor, pos);
+          return true;
+        }).getOr(false);
+      };
+    };
+    var deleteFromTo = function (editor, caret, from, to) {
+      var rootNode = editor.getBody();
+      var isInlineTarget$1 = curry(isInlineTarget, editor);
+      editor.undoManager.ignore(function () {
+        editor.selection.setRng(rangeFromPositions(from, to));
+        editor.execCommand('Delete');
+        readLocation(isInlineTarget$1, rootNode, CaretPosition$1.fromRangeStart(editor.selection.getRng())).map(inside).map(setCaretLocation(editor, caret));
+      });
+      editor.nodeChanged();
+    };
+    var rescope$1 = function (rootNode, node) {
+      var parentBlock = getParentBlock(node, rootNode);
+      return parentBlock ? parentBlock : rootNode;
+    };
+    var backspaceDeleteCollapsed = function (editor, caret, forward, from) {
+      var rootNode = rescope$1(editor.getBody(), from.container());
+      var isInlineTarget$1 = curry(isInlineTarget, editor);
+      var fromLocation = readLocation(isInlineTarget$1, rootNode, from);
+      return fromLocation.bind(function (location) {
+        if (forward) {
+          return location.fold(constant(Option.some(inside(location))), Option.none, constant(Option.some(outside(location))), Option.none);
+        } else {
+          return location.fold(Option.none, constant(Option.some(outside(location))), Option.none, constant(Option.some(inside(location))));
+        }
+      }).map(setCaretLocation(editor, caret)).getOrThunk(function () {
+        var toPosition = navigate(forward, rootNode, from);
+        var toLocation = toPosition.bind(function (pos) {
+          return readLocation(isInlineTarget$1, rootNode, pos);
+        });
+        if (fromLocation.isSome() && toLocation.isSome()) {
+          return findRootInline(isInlineTarget$1, rootNode, from).map(function (elm) {
+            if (hasOnlyTwoOrLessPositionsLeft(elm)) {
+              deleteElement(editor, forward, Element.fromDom(elm));
+              return true;
+            } else {
+              return false;
+            }
+          }).getOr(false);
+        } else {
+          return toLocation.bind(function (_) {
+            return toPosition.map(function (to) {
+              if (forward) {
+                deleteFromTo(editor, caret, from, to);
+              } else {
+                deleteFromTo(editor, caret, to, from);
+              }
+              return true;
+            });
+          }).getOr(false);
+        }
+      });
+    };
+    var backspaceDelete$5 = function (editor, caret, forward) {
+      if (editor.selection.isCollapsed() && isFeatureEnabled$1(editor)) {
+        var from = CaretPosition$1.fromRangeStart(editor.selection.getRng());
+        return backspaceDeleteCollapsed(editor, caret, forward, from);
+      }
+      return false;
+    };
+
+    var getParentInlines = function (rootElm, startElm) {
+      var parents = parentsAndSelf(startElm, rootElm);
+      return findIndex(parents, isBlock).fold(constant(parents), function (index) {
+        return parents.slice(0, index);
+      });
+    };
+    var hasOnlyOneChild$1 = function (elm) {
+      return children(elm).length === 1;
+    };
+    var deleteLastPosition = function (forward, editor, target, parentInlines) {
+      var isFormatElement$1 = curry(isFormatElement, editor);
+      var formatNodes = map(filter(parentInlines, isFormatElement$1), function (elm) {
+        return elm.dom();
+      });
+      if (formatNodes.length === 0) {
+        deleteElement(editor, forward, target);
+      } else {
+        var pos = replaceWithCaretFormat(target.dom(), formatNodes);
+        editor.selection.setRng(pos.toRange());
+      }
+    };
+    var deleteCaret$1 = function (editor, forward) {
+      var rootElm = Element.fromDom(editor.getBody());
+      var startElm = Element.fromDom(editor.selection.getStart());
+      var parentInlines = filter(getParentInlines(rootElm, startElm), hasOnlyOneChild$1);
+      return last(parentInlines).map(function (target) {
+        var fromPos = CaretPosition$1.fromRangeStart(editor.selection.getRng());
+        if (willDeleteLastPositionInElement(forward, fromPos, target.dom()) && !isEmptyCaretFormatElement(target)) {
+          deleteLastPosition(forward, editor, target, parentInlines);
+          return true;
+        } else {
+          return false;
+        }
+      }).getOr(false);
+    };
+    var backspaceDelete$6 = function (editor, forward) {
+      return editor.selection.isCollapsed() ? deleteCaret$1(editor, forward) : false;
+    };
+
+    var deleteCaret$2 = function (editor, forward) {
+      var fromPos = CaretPosition$1.fromRangeStart(editor.selection.getRng());
+      return fromPosition(forward, editor.getBody(), fromPos).filter(function (pos) {
+        return forward ? isBeforeImageBlock(pos) : isAfterImageBlock(pos);
+      }).bind(function (pos) {
+        return Option.from(getChildNodeAtRelativeOffset(forward ? 0 : -1, pos));
+      }).map(function (elm) {
+        editor.selection.select(elm);
+        return true;
+      }).getOr(false);
+    };
+    var backspaceDelete$7 = function (editor, forward) {
+      return editor.selection.isCollapsed() ? deleteCaret$2(editor, forward) : false;
+    };
+
+    var isEditable$1 = function (target) {
+      return closest(target, function (elm) {
+        return isContentEditableTrue(elm.dom()) || isContentEditableFalse(elm.dom());
+      }).exists(function (elm) {
+        return isContentEditableTrue(elm.dom());
+      });
+    };
+    var parseIndentValue = function (value) {
+      var number = parseInt(value, 10);
+      return isNaN(number) ? 0 : number;
+    };
+    var getIndentStyleName = function (useMargin, element) {
+      var indentStyleName = useMargin || isTable$1(element) ? 'margin' : 'padding';
+      var suffix = get$4(element, 'direction') === 'rtl' ? '-right' : '-left';
+      return indentStyleName + suffix;
+    };
+    var indentElement = function (dom, command, useMargin, value, unit, element) {
+      var indentStyleName = getIndentStyleName(useMargin, Element.fromDom(element));
+      if (command === 'outdent') {
+        var styleValue = Math.max(0, parseIndentValue(element.style[indentStyleName]) - value);
+        dom.setStyle(element, indentStyleName, styleValue ? styleValue + unit : '');
+      } else {
+        var styleValue = parseIndentValue(element.style[indentStyleName]) + value + unit;
+        dom.setStyle(element, indentStyleName, styleValue);
+      }
+    };
+    var validateBlocks = function (editor, blocks) {
+      return forall(blocks, function (block) {
+        var indentStyleName = getIndentStyleName(shouldIndentUseMargin(editor), block);
+        var intentValue = getRaw(block, indentStyleName).map(parseIndentValue).getOr(0);
+        var contentEditable = editor.dom.getContentEditable(block.dom());
+        return contentEditable !== 'false' && intentValue > 0;
+      });
+    };
+    var canOutdent = function (editor) {
+      var blocks = getBlocksToIndent(editor);
+      return !editor.mode.isReadOnly() && (blocks.length > 1 || validateBlocks(editor, blocks));
+    };
+    var isListComponent = function (el) {
+      return isList(el) || isListItem(el);
+    };
+    var parentIsListComponent = function (el) {
+      return parent(el).map(isListComponent).getOr(false);
+    };
+    var getBlocksToIndent = function (editor) {
+      return filter(map(editor.selection.getSelectedBlocks(), Element.fromDom), function (el) {
+        return !isListComponent(el) && !parentIsListComponent(el) && isEditable$1(el);
+      });
+    };
+    var handle = function (editor, command) {
+      var dom = editor.dom, selection = editor.selection, formatter = editor.formatter;
+      var indentation = getIndentation(editor);
+      var indentUnit = /[a-z%]+$/i.exec(indentation)[0];
+      var indentValue = parseInt(indentation, 10);
+      var useMargin = shouldIndentUseMargin(editor);
+      var forcedRootBlock = getForcedRootBlock(editor);
+      if (!editor.queryCommandState('InsertUnorderedList') && !editor.queryCommandState('InsertOrderedList')) {
+        if (forcedRootBlock === '' && !dom.getParent(selection.getNode(), dom.isBlock)) {
+          formatter.apply('div');
+        }
+      }
+      each(getBlocksToIndent(editor), function (block) {
+        indentElement(dom, command, useMargin, indentValue, indentUnit, block.dom());
+      });
+    };
+
+    var navigateIgnoreEmptyTextNodes = function (forward, root, from) {
+      return navigateIgnore(forward, root, from, isEmptyText);
+    };
+    var getClosestBlock = function (root, pos) {
+      return find(parentsAndSelf(Element.fromDom(pos.container()), root), isBlock);
+    };
+    var isAtBeforeAfterBlockBoundary = function (forward, root, pos) {
+      return navigateIgnoreEmptyTextNodes(forward, root.dom(), pos).forall(function (newPos) {
+        return getClosestBlock(root, pos).fold(function () {
+          return isInSameBlock(newPos, pos, root.dom()) === false;
+        }, function (fromBlock) {
+          return isInSameBlock(newPos, pos, root.dom()) === false && contains$2(fromBlock, Element.fromDom(newPos.container()));
+        });
+      });
+    };
+    var isAtBlockBoundary = function (forward, root, pos) {
+      return getClosestBlock(root, pos).fold(function () {
+        return navigateIgnoreEmptyTextNodes(forward, root.dom(), pos).forall(function (newPos) {
+          return isInSameBlock(newPos, pos, root.dom()) === false;
+        });
+      }, function (parent) {
+        return navigateIgnoreEmptyTextNodes(forward, parent.dom(), pos).isNone();
+      });
+    };
+    var isAtStartOfBlock = curry(isAtBlockBoundary, false);
+    var isAtEndOfBlock = curry(isAtBlockBoundary, true);
+    var isBeforeBlock = curry(isAtBeforeAfterBlockBoundary, false);
+    var isAfterBlock = curry(isAtBeforeAfterBlockBoundary, true);
+
+    var backspaceDelete$8 = function (editor, _caret, _forward) {
+      if (editor.selection.isCollapsed() && canOutdent(editor)) {
+        var dom = editor.dom;
+        var rng = editor.selection.getRng();
+        var pos = CaretPosition$1.fromRangeStart(rng);
+        var block = dom.getParent(rng.startContainer, dom.isBlock);
+        if (block !== null && isAtStartOfBlock(Element.fromDom(block), pos)) {
+          handle(editor, 'outdent');
+          return true;
+        }
+      }
+      return false;
+    };
+
+    var executeKeydownOverride$1 = function (editor, caret, evt) {
+      execute([
+        {
+          keyCode: VK.BACKSPACE,
+          action: action(backspaceDelete$8, editor, false)
+        },
+        {
+          keyCode: VK.BACKSPACE,
+          action: action(backspaceDelete$3, editor, false)
+        },
+        {
+          keyCode: VK.DELETE,
+          action: action(backspaceDelete$3, editor, true)
+        },
+        {
+          keyCode: VK.BACKSPACE,
+          action: action(backspaceDelete$4, editor, false)
+        },
+        {
+          keyCode: VK.DELETE,
+          action: action(backspaceDelete$4, editor, true)
+        },
+        {
+          keyCode: VK.BACKSPACE,
+          action: action(backspaceDelete$5, editor, caret, false)
+        },
+        {
+          keyCode: VK.DELETE,
+          action: action(backspaceDelete$5, editor, caret, true)
+        },
+        {
+          keyCode: VK.BACKSPACE,
+          action: action(backspaceDelete, editor, false)
+        },
+        {
+          keyCode: VK.DELETE,
+          action: action(backspaceDelete, editor, true)
+        },
+        {
+          keyCode: VK.BACKSPACE,
+          action: action(backspaceDelete$7, editor, false)
+        },
+        {
+          keyCode: VK.DELETE,
+          action: action(backspaceDelete$7, editor, true)
+        },
+        {
+          keyCode: VK.BACKSPACE,
+          action: action(backspaceDelete$2, editor, false)
+        },
+        {
+          keyCode: VK.DELETE,
+          action: action(backspaceDelete$2, editor, true)
+        },
+        {
+          keyCode: VK.BACKSPACE,
+          action: action(backspaceDelete$1, editor, false)
+        },
+        {
+          keyCode: VK.DELETE,
+          action: action(backspaceDelete$1, editor, true)
+        },
+        {
+          keyCode: VK.BACKSPACE,
+          action: action(backspaceDelete$6, editor, false)
+        },
+        {
+          keyCode: VK.DELETE,
+          action: action(backspaceDelete$6, editor, true)
+        }
+      ], evt).each(function (_) {
+        evt.preventDefault();
+      });
+    };
+    var executeKeyupOverride = function (editor, evt) {
+      execute([
+        {
+          keyCode: VK.BACKSPACE,
+          action: action(paddEmptyElement, editor)
+        },
+        {
+          keyCode: VK.DELETE,
+          action: action(paddEmptyElement, editor)
+        }
+      ], evt);
+    };
+    var setup$b = function (editor, caret) {
+      editor.on('keydown', function (evt) {
+        if (evt.isDefaultPrevented() === false) {
+          executeKeydownOverride$1(editor, caret, evt);
+        }
+      });
+      editor.on('keyup', function (evt) {
+        if (evt.isDefaultPrevented() === false) {
+          executeKeyupOverride(editor, evt);
+        }
+      });
+    };
+
+    var firstNonWhiteSpaceNodeSibling = function (node) {
+      while (node) {
+        if (node.nodeType === 1 || node.nodeType === 3 && node.data && /[\r\n\s]/.test(node.data)) {
+          return node;
+        }
+        node = node.nextSibling;
+      }
+    };
+    var moveToCaretPosition = function (editor, root) {
+      var node, rng, lastNode = root;
+      var dom = editor.dom;
+      var moveCaretBeforeOnEnterElementsMap = editor.schema.getMoveCaretBeforeOnEnterElements();
+      if (!root) {
+        return;
+      }
+      if (/^(LI|DT|DD)$/.test(root.nodeName)) {
+        var firstChild = firstNonWhiteSpaceNodeSibling(root.firstChild);
+        if (firstChild && /^(UL|OL|DL)$/.test(firstChild.nodeName)) {
+          root.insertBefore(dom.doc.createTextNode(nbsp), root.firstChild);
+        }
+      }
+      rng = dom.createRng();
+      root.normalize();
+      if (root.hasChildNodes()) {
+        var walker = new TreeWalker(root, root);
+        while (node = walker.current()) {
+          if (isText$1(node)) {
+            rng.setStart(node, 0);
+            rng.setEnd(node, 0);
+            break;
+          }
+          if (moveCaretBeforeOnEnterElementsMap[node.nodeName.toLowerCase()]) {
+            rng.setStartBefore(node);
+            rng.setEndBefore(node);
+            break;
+          }
+          lastNode = node;
+          node = walker.next();
+        }
+        if (!node) {
+          rng.setStart(lastNode, 0);
+          rng.setEnd(lastNode, 0);
+        }
+      } else {
+        if (isBr(root)) {
+          if (root.nextSibling && dom.isBlock(root.nextSibling)) {
+            rng.setStartBefore(root);
+            rng.setEndBefore(root);
+          } else {
+            rng.setStartAfter(root);
+            rng.setEndAfter(root);
+          }
+        } else {
+          rng.setStart(root, 0);
+          rng.setEnd(root, 0);
+        }
+      }
+      editor.selection.setRng(rng);
+      scrollRangeIntoView(editor, rng);
+    };
+    var getEditableRoot = function (dom, node) {
+      var root = dom.getRoot();
+      var parent, editableRoot;
+      parent = node;
+      while (parent !== root && dom.getContentEditable(parent) !== 'false') {
+        if (dom.getContentEditable(parent) === 'true') {
+          editableRoot = parent;
+        }
+        parent = parent.parentNode;
+      }
+      return parent !== root ? editableRoot : root;
+    };
+    var getParentBlock$2 = function (editor) {
+      return Option.from(editor.dom.getParent(editor.selection.getStart(true), editor.dom.isBlock));
+    };
+    var getParentBlockName = function (editor) {
+      return getParentBlock$2(editor).fold(constant(''), function (parentBlock) {
+        return parentBlock.nodeName.toUpperCase();
+      });
+    };
+    var isListItemParentBlock = function (editor) {
+      return getParentBlock$2(editor).filter(function (elm) {
+        return isListItem(Element.fromDom(elm));
+      }).isSome();
+    };
+
+    var hasFirstChild = function (elm, name) {
+      return elm.firstChild && elm.firstChild.nodeName === name;
+    };
+    var hasParent$1 = function (elm, parentName) {
+      return elm && elm.parentNode && elm.parentNode.nodeName === parentName;
+    };
+    var isListBlock = function (elm) {
+      return elm && /^(OL|UL|LI)$/.test(elm.nodeName);
+    };
+    var isNestedList = function (elm) {
+      return isListBlock(elm) && isListBlock(elm.parentNode);
+    };
+    var getContainerBlock = function (containerBlock) {
+      var containerBlockParent = containerBlock.parentNode;
+      if (/^(LI|DT|DD)$/.test(containerBlockParent.nodeName)) {
+        return containerBlockParent;
+      }
+      return containerBlock;
+    };
+    var isFirstOrLastLi = function (containerBlock, parentBlock, first) {
+      var node = containerBlock[first ? 'firstChild' : 'lastChild'];
+      while (node) {
+        if (isElement$1(node)) {
+          break;
+        }
+        node = node[first ? 'nextSibling' : 'previousSibling'];
+      }
+      return node === parentBlock;
+    };
+    var insert = function (editor, createNewBlock, containerBlock, parentBlock, newBlockName) {
+      var dom = editor.dom;
+      var rng = editor.selection.getRng();
+      if (containerBlock === editor.getBody()) {
+        return;
+      }
+      if (isNestedList(containerBlock)) {
+        newBlockName = 'LI';
+      }
+      var newBlock = newBlockName ? createNewBlock(newBlockName) : dom.create('BR');
+      if (isFirstOrLastLi(containerBlock, parentBlock, true) && isFirstOrLastLi(containerBlock, parentBlock, false)) {
+        if (hasParent$1(containerBlock, 'LI')) {
+          dom.insertAfter(newBlock, getContainerBlock(containerBlock));
+        } else {
+          dom.replace(newBlock, containerBlock);
+        }
+      } else if (isFirstOrLastLi(containerBlock, parentBlock, true)) {
+        if (hasParent$1(containerBlock, 'LI')) {
+          dom.insertAfter(newBlock, getContainerBlock(containerBlock));
+          newBlock.appendChild(dom.doc.createTextNode(' '));
+          newBlock.appendChild(containerBlock);
+        } else {
+          containerBlock.parentNode.insertBefore(newBlock, containerBlock);
+        }
+      } else if (isFirstOrLastLi(containerBlock, parentBlock, false)) {
+        dom.insertAfter(newBlock, getContainerBlock(containerBlock));
+      } else {
+        containerBlock = getContainerBlock(containerBlock);
+        var tmpRng = rng.cloneRange();
+        tmpRng.setStartAfter(parentBlock);
+        tmpRng.setEndAfter(containerBlock);
+        var fragment = tmpRng.extractContents();
+        if (newBlockName === 'LI' && hasFirstChild(fragment, 'LI')) {
+          newBlock = fragment.firstChild;
+          dom.insertAfter(fragment, containerBlock);
+        } else {
+          dom.insertAfter(fragment, containerBlock);
+          dom.insertAfter(newBlock, containerBlock);
+        }
+      }
+      dom.remove(parentBlock);
+      moveToCaretPosition(editor, newBlock);
+    };
+
+    var trimZwsp = function (fragment) {
+      each(descendants(Element.fromDom(fragment), isText), function (text) {
+        var rawNode = text.dom();
+        rawNode.nodeValue = trim$3(rawNode.nodeValue);
+      });
+    };
+    var isEmptyAnchor = function (dom, elm) {
+      return elm && elm.nodeName === 'A' && dom.isEmpty(elm);
+    };
+    var isTableCell$5 = function (node) {
+      return node && /^(TD|TH|CAPTION)$/.test(node.nodeName);
+    };
+    var emptyBlock = function (elm) {
+      elm.innerHTML = '<br data-mce-bogus="1">';
+    };
+    var containerAndSiblingName = function (container, nodeName) {
+      return container.nodeName === nodeName || container.previousSibling && container.previousSibling.nodeName === nodeName;
+    };
+    var canSplitBlock = function (dom, node) {
+      return node && dom.isBlock(node) && !/^(TD|TH|CAPTION|FORM)$/.test(node.nodeName) && !/^(fixed|absolute)/i.test(node.style.position) && dom.getContentEditable(node) !== 'true';
+    };
+    var trimInlineElementsOnLeftSideOfBlock = function (dom, nonEmptyElementsMap, block) {
+      var node = block;
+      var firstChilds = [];
+      var i;
+      if (!node) {
+        return;
+      }
+      while (node = node.firstChild) {
+        if (dom.isBlock(node)) {
+          return;
+        }
+        if (isElement$1(node) && !nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
+          firstChilds.push(node);
+        }
+      }
+      i = firstChilds.length;
+      while (i--) {
+        node = firstChilds[i];
+        if (!node.hasChildNodes() || node.firstChild === node.lastChild && node.firstChild.nodeValue === '') {
+          dom.remove(node);
+        } else {
+          if (isEmptyAnchor(dom, node)) {
+            dom.remove(node);
+          }
+        }
+      }
+    };
+    var normalizeZwspOffset = function (start, container, offset) {
+      if (isText$1(container) === false) {
+        return offset;
+      } else if (start) {
+        return offset === 1 && container.data.charAt(offset - 1) === ZWSP ? 0 : offset;
+      } else {
+        return offset === container.data.length - 1 && container.data.charAt(offset) === ZWSP ? container.data.length : offset;
+      }
+    };
+    var includeZwspInRange = function (rng) {
+      var newRng = rng.cloneRange();
+      newRng.setStart(rng.startContainer, normalizeZwspOffset(true, rng.startContainer, rng.startOffset));
+      newRng.setEnd(rng.endContainer, normalizeZwspOffset(false, rng.endContainer, rng.endOffset));
+      return newRng;
+    };
+    var trimLeadingLineBreaks = function (node) {
+      do {
+        if (isText$1(node)) {
+          node.nodeValue = node.nodeValue.replace(/^[\r\n]+/, '');
+        }
+        node = node.firstChild;
+      } while (node);
+    };
+    var getEditableRoot$1 = function (dom, node) {
+      var root = dom.getRoot();
+      var parent, editableRoot;
+      parent = node;
+      while (parent !== root && dom.getContentEditable(parent) !== 'false') {
+        if (dom.getContentEditable(parent) === 'true') {
+          editableRoot = parent;
+        }
+        parent = parent.parentNode;
+      }
+      return parent !== root ? editableRoot : root;
+    };
+    var applyAttributes = function (editor, node, forcedRootBlockAttrs) {
+      Option.from(forcedRootBlockAttrs.style).map(editor.dom.parseStyle).each(function (attrStyles) {
+        var currentStyles = getAllRaw(Element.fromDom(node));
+        var newStyles = __assign(__assign({}, currentStyles), attrStyles);
+        editor.dom.setStyles(node, newStyles);
+      });
+      var attrClassesOpt = Option.from(forcedRootBlockAttrs.class).map(function (attrClasses) {
+        return attrClasses.split(/\s+/);
+      });
+      var currentClassesOpt = Option.from(node.className).map(function (currentClasses) {
+        return filter(currentClasses.split(/\s+/), function (clazz) {
+          return clazz !== '';
+        });
+      });
+      lift2(attrClassesOpt, currentClassesOpt, function (attrClasses, currentClasses) {
+        var filteredClasses = filter(currentClasses, function (clazz) {
+          return !contains(attrClasses, clazz);
+        });
+        var newClasses = __spreadArrays(attrClasses, filteredClasses);
+        editor.dom.setAttrib(node, 'class', newClasses.join(' '));
+      });
+      var appliedAttrs = [
+        'style',
+        'class'
+      ];
+      var remainingAttrs = filter$1(forcedRootBlockAttrs, function (_, attrs) {
+        return !contains(appliedAttrs, attrs);
+      });
+      editor.dom.setAttribs(node, remainingAttrs);
+    };
+    var setForcedBlockAttrs = function (editor, node) {
+      var forcedRootBlockName = getForcedRootBlock(editor);
+      if (forcedRootBlockName && forcedRootBlockName.toLowerCase() === node.tagName.toLowerCase()) {
+        var forcedRootBlockAttrs = getForcedRootBlockAttrs(editor);
+        applyAttributes(editor, node, forcedRootBlockAttrs);
+      }
+    };
+    var wrapSelfAndSiblingsInDefaultBlock = function (editor, newBlockName, rng, container, offset) {
+      var newBlock, parentBlock, startNode, node, next, rootBlockName;
+      var blockName = newBlockName || 'P';
+      var dom = editor.dom, editableRoot = getEditableRoot$1(dom, container);
+      parentBlock = dom.getParent(container, dom.isBlock);
+      if (!parentBlock || !canSplitBlock(dom, parentBlock)) {
+        parentBlock = parentBlock || editableRoot;
+        if (parentBlock === editor.getBody() || isTableCell$5(parentBlock)) {
+          rootBlockName = parentBlock.nodeName.toLowerCase();
+        } else {
+          rootBlockName = parentBlock.parentNode.nodeName.toLowerCase();
+        }
+        if (!parentBlock.hasChildNodes()) {
+          newBlock = dom.create(blockName);
+          setForcedBlockAttrs(editor, newBlock);
+          parentBlock.appendChild(newBlock);
+          rng.setStart(newBlock, 0);
+          rng.setEnd(newBlock, 0);
+          return newBlock;
+        }
+        node = container;
+        while (node.parentNode !== parentBlock) {
+          node = node.parentNode;
+        }
+        while (node && !dom.isBlock(node)) {
+          startNode = node;
+          node = node.previousSibling;
+        }
+        if (startNode && editor.schema.isValidChild(rootBlockName, blockName.toLowerCase())) {
+          newBlock = dom.create(blockName);
+          setForcedBlockAttrs(editor, newBlock);
+          startNode.parentNode.insertBefore(newBlock, startNode);
+          node = startNode;
+          while (node && !dom.isBlock(node)) {
+            next = node.nextSibling;
+            newBlock.appendChild(node);
+            node = next;
+          }
+          rng.setStart(container, offset);
+          rng.setEnd(container, offset);
+        }
+      }
+      return container;
+    };
+    var addBrToBlockIfNeeded = function (dom, block) {
+      var lastChild;
+      block.normalize();
+      lastChild = block.lastChild;
+      if (!lastChild || /^(left|right)$/gi.test(dom.getStyle(lastChild, 'float', true))) {
+        dom.add(block, 'br');
+      }
+    };
+    var insert$1 = function (editor, evt) {
+      var tmpRng, editableRoot, container, offset, parentBlock, shiftKey;
+      var newBlock, fragment, containerBlock, parentBlockName, containerBlockName, newBlockName, isAfterLastNodeInContainer;
+      var dom = editor.dom;
+      var schema = editor.schema, nonEmptyElementsMap = schema.getNonEmptyElements();
+      var rng = editor.selection.getRng();
+      var createNewBlock = function (name) {
+        var node = container, block, clonedNode, caretNode;
+        var textInlineElements = schema.getTextInlineElements();
+        if (name || parentBlockName === 'TABLE' || parentBlockName === 'HR') {
+          block = dom.create(name || newBlockName);
+        } else {
+          block = parentBlock.cloneNode(false);
+        }
+        caretNode = block;
+        if (shouldKeepStyles(editor) === false) {
+          dom.setAttrib(block, 'style', null);
+          dom.setAttrib(block, 'class', null);
+        } else {
+          do {
+            if (textInlineElements[node.nodeName]) {
+              if (isCaretNode(node) || isBookmarkNode$1(node)) {
+                continue;
+              }
+              clonedNode = node.cloneNode(false);
+              dom.setAttrib(clonedNode, 'id', '');
+              if (block.hasChildNodes()) {
+                clonedNode.appendChild(block.firstChild);
+                block.appendChild(clonedNode);
+              } else {
+                caretNode = clonedNode;
+                block.appendChild(clonedNode);
+              }
+            }
+          } while ((node = node.parentNode) && node !== editableRoot);
+        }
+        setForcedBlockAttrs(editor, block);
+        emptyBlock(caretNode);
+        return block;
+      };
+      var isCaretAtStartOrEndOfBlock = function (start) {
+        var node, name;
+        var normalizedOffset = normalizeZwspOffset(start, container, offset);
+        if (isText$1(container) && (start ? normalizedOffset > 0 : normalizedOffset < container.nodeValue.length)) {
+          return false;
+        }
+        if (container.parentNode === parentBlock && isAfterLastNodeInContainer && !start) {
+          return true;
+        }
+        if (start && isElement$1(container) && container === parentBlock.firstChild) {
+          return true;
+        }
+        if (containerAndSiblingName(container, 'TABLE') || containerAndSiblingName(container, 'HR')) {
+          return isAfterLastNodeInContainer && !start || !isAfterLastNodeInContainer && start;
+        }
+        var walker = new TreeWalker(container, parentBlock);
+        if (isText$1(container)) {
+          if (start && normalizedOffset === 0) {
+            walker.prev();
+          } else if (!start && normalizedOffset === container.nodeValue.length) {
+            walker.next();
+          }
+        }
+        while (node = walker.current()) {
+          if (isElement$1(node)) {
+            if (!node.getAttribute('data-mce-bogus')) {
+              name = node.nodeName.toLowerCase();
+              if (nonEmptyElementsMap[name] && name !== 'br') {
+                return false;
+              }
+            }
+          } else if (isText$1(node) && !/^[ \t\r\n]*$/.test(node.nodeValue)) {
+            return false;
+          }
+          if (start) {
+            walker.prev();
+          } else {
+            walker.next();
+          }
+        }
+        return true;
+      };
+      var insertNewBlockAfter = function () {
+        if (/^(H[1-6]|PRE|FIGURE)$/.test(parentBlockName) && containerBlockName !== 'HGROUP') {
+          newBlock = createNewBlock(newBlockName);
+        } else {
+          newBlock = createNewBlock();
+        }
+        if (shouldEndContainerOnEmptyBlock(editor) && canSplitBlock(dom, containerBlock) && dom.isEmpty(parentBlock)) {
+          newBlock = dom.split(containerBlock, parentBlock);
+        } else {
+          dom.insertAfter(newBlock, parentBlock);
+        }
+        moveToCaretPosition(editor, newBlock);
+      };
+      normalize$2(dom, rng).each(function (normRng) {
+        rng.setStart(normRng.startContainer, normRng.startOffset);
+        rng.setEnd(normRng.endContainer, normRng.endOffset);
+      });
+      container = rng.startContainer;
+      offset = rng.startOffset;
+      newBlockName = getForcedRootBlock(editor);
+      shiftKey = !!(evt && evt.shiftKey);
+      var ctrlKey = !!(evt && evt.ctrlKey);
+      if (isElement$1(container) && container.hasChildNodes()) {
+        isAfterLastNodeInContainer = offset > container.childNodes.length - 1;
+        container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
+        if (isAfterLastNodeInContainer && isText$1(container)) {
+          offset = container.nodeValue.length;
+        } else {
+          offset = 0;
+        }
+      }
+      editableRoot = getEditableRoot$1(dom, container);
+      if (!editableRoot) {
+        return;
+      }
+      if (newBlockName && !shiftKey || !newBlockName && shiftKey) {
+        container = wrapSelfAndSiblingsInDefaultBlock(editor, newBlockName, rng, container, offset);
+      }
+      parentBlock = dom.getParent(container, dom.isBlock);
+      containerBlock = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null;
+      parentBlockName = parentBlock ? parentBlock.nodeName.toUpperCase() : '';
+      containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : '';
+      if (containerBlockName === 'LI' && !ctrlKey) {
+        parentBlock = containerBlock;
+        containerBlock = containerBlock.parentNode;
+        parentBlockName = containerBlockName;
+      }
+      if (/^(LI|DT|DD)$/.test(parentBlockName)) {
+        if (dom.isEmpty(parentBlock)) {
+          insert(editor, createNewBlock, containerBlock, parentBlock, newBlockName);
+          return;
+        }
+      }
+      if (newBlockName && parentBlock === editor.getBody()) {
+        return;
+      }
+      newBlockName = newBlockName || 'P';
+      if (isCaretContainerBlock(parentBlock)) {
+        newBlock = showCaretContainerBlock(parentBlock);
+        if (dom.isEmpty(parentBlock)) {
+          emptyBlock(parentBlock);
+        }
+        setForcedBlockAttrs(editor, newBlock);
+        moveToCaretPosition(editor, newBlock);
+      } else if (isCaretAtStartOrEndOfBlock()) {
+        insertNewBlockAfter();
+      } else if (isCaretAtStartOrEndOfBlock(true)) {
+        newBlock = parentBlock.parentNode.insertBefore(createNewBlock(), parentBlock);
+        moveToCaretPosition(editor, containerAndSiblingName(parentBlock, 'HR') ? newBlock : parentBlock);
+      } else {
+        tmpRng = includeZwspInRange(rng).cloneRange();
+        tmpRng.setEndAfter(parentBlock);
+        fragment = tmpRng.extractContents();
+        trimZwsp(fragment);
+        trimLeadingLineBreaks(fragment);
+        newBlock = fragment.firstChild;
+        dom.insertAfter(fragment, parentBlock);
+        trimInlineElementsOnLeftSideOfBlock(dom, nonEmptyElementsMap, newBlock);
+        addBrToBlockIfNeeded(dom, parentBlock);
+        if (dom.isEmpty(parentBlock)) {
+          emptyBlock(parentBlock);
+        }
+        newBlock.normalize();
+        if (dom.isEmpty(newBlock)) {
+          dom.remove(newBlock);
+          insertNewBlockAfter();
+        } else {
+          setForcedBlockAttrs(editor, newBlock);
+          moveToCaretPosition(editor, newBlock);
+        }
+      }
+      dom.setAttrib(newBlock, 'id', '');
+      editor.fire('NewBlock', { newBlock: newBlock });
+    };
+
+    var hasRightSideContent = function (schema, container, parentBlock) {
+      var walker = new TreeWalker(container, parentBlock);
+      var node;
+      var nonEmptyElementsMap = schema.getNonEmptyElements();
+      while (node = walker.next()) {
+        if (nonEmptyElementsMap[node.nodeName.toLowerCase()] || node.length > 0) {
+          return true;
+        }
+      }
+    };
+    var scrollToBr = function (dom, selection, brElm) {
+      var marker = dom.create('span', {}, '&nbsp;');
+      brElm.parentNode.insertBefore(marker, brElm);
+      selection.scrollIntoView(marker);
+      dom.remove(marker);
+    };
+    var moveSelectionToBr = function (dom, selection, brElm, extraBr) {
+      var rng = dom.createRng();
+      if (!extraBr) {
+        rng.setStartAfter(brElm);
+        rng.setEndAfter(brElm);
+      } else {
+        rng.setStartBefore(brElm);
+        rng.setEndBefore(brElm);
+      }
+      selection.setRng(rng);
+    };
+    var insertBrAtCaret = function (editor, evt) {
+      var selection = editor.selection;
+      var dom = editor.dom;
+      var rng = selection.getRng();
+      var brElm;
+      var extraBr;
+      normalize$2(dom, rng).each(function (normRng) {
+        rng.setStart(normRng.startContainer, normRng.startOffset);
+        rng.setEnd(normRng.endContainer, normRng.endOffset);
+      });
+      var offset = rng.startOffset;
+      var container = rng.startContainer;
+      if (container.nodeType === 1 && container.hasChildNodes()) {
+        var isAfterLastNodeInContainer = offset > container.childNodes.length - 1;
+        container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
+        if (isAfterLastNodeInContainer && container.nodeType === 3) {
+          offset = container.nodeValue.length;
+        } else {
+          offset = 0;
+        }
+      }
+      var parentBlock = dom.getParent(container, dom.isBlock);
+      var containerBlock = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null;
+      var containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : '';
+      var isControlKey = !!(evt && evt.ctrlKey);
+      if (containerBlockName === 'LI' && !isControlKey) {
+        parentBlock = containerBlock;
+      }
+      if (container && container.nodeType === 3 && offset >= container.nodeValue.length) {
+        if (!hasRightSideContent(editor.schema, container, parentBlock)) {
+          brElm = dom.create('br');
+          rng.insertNode(brElm);
+          rng.setStartAfter(brElm);
+          rng.setEndAfter(brElm);
+          extraBr = true;
+        }
+      }
+      brElm = dom.create('br');
+      rangeInsertNode(dom, rng, brElm);
+      scrollToBr(dom, selection, brElm);
+      moveSelectionToBr(dom, selection, brElm, extraBr);
+      editor.undoManager.add();
+    };
+    var insertBrBefore = function (editor, inline) {
+      var br = Element.fromTag('br');
+      before(Element.fromDom(inline), br);
+      editor.undoManager.add();
+    };
+    var insertBrAfter = function (editor, inline) {
+      if (!hasBrAfter(editor.getBody(), inline)) {
+        after(Element.fromDom(inline), Element.fromTag('br'));
+      }
+      var br = Element.fromTag('br');
+      after(Element.fromDom(inline), br);
+      scrollToBr(editor.dom, editor.selection, br.dom());
+      moveSelectionToBr(editor.dom, editor.selection, br.dom(), false);
+      editor.undoManager.add();
+    };
+    var isBeforeBr$1 = function (pos) {
+      return isBr(pos.getNode());
+    };
+    var hasBrAfter = function (rootNode, startNode) {
+      if (isBeforeBr$1(CaretPosition$1.after(startNode))) {
+        return true;
+      } else {
+        return nextPosition(rootNode, CaretPosition$1.after(startNode)).map(function (pos) {
+          return isBr(pos.getNode());
+        }).getOr(false);
+      }
+    };
+    var isAnchorLink = function (elm) {
+      return elm && elm.nodeName === 'A' && 'href' in elm;
+    };
+    var isInsideAnchor = function (location) {
+      return location.fold(constant(false), isAnchorLink, isAnchorLink, constant(false));
+    };
+    var readInlineAnchorLocation = function (editor) {
+      var isInlineTarget$1 = curry(isInlineTarget, editor);
+      var position = CaretPosition$1.fromRangeStart(editor.selection.getRng());
+      return readLocation(isInlineTarget$1, editor.getBody(), position).filter(isInsideAnchor);
+    };
+    var insertBrOutsideAnchor = function (editor, location) {
+      location.fold(noop, curry(insertBrBefore, editor), curry(insertBrAfter, editor), noop);
+    };
+    var insert$2 = function (editor, evt) {
+      var anchorLocation = readInlineAnchorLocation(editor);
+      if (anchorLocation.isSome()) {
+        anchorLocation.each(curry(insertBrOutsideAnchor, editor));
+      } else {
+        insertBrAtCaret(editor, evt);
+      }
+    };
+
+    var matchesSelector = function (editor, selector) {
+      return getParentBlock$2(editor).filter(function (parentBlock) {
+        return selector.length > 0 && is(Element.fromDom(parentBlock), selector);
+      }).isSome();
+    };
+    var shouldInsertBr = function (editor) {
+      return matchesSelector(editor, getBrNewLineSelector(editor));
+    };
+    var shouldBlockNewLine = function (editor) {
+      return matchesSelector(editor, getNoNewLineSelector(editor));
+    };
+
+    var newLineAction = Adt.generate([
+      { br: [] },
+      { block: [] },
+      { none: [] }
+    ]);
+    var shouldBlockNewLine$1 = function (editor, _shiftKey) {
+      return shouldBlockNewLine(editor);
+    };
+    var isBrMode = function (requiredState) {
+      return function (editor, _shiftKey) {
+        var brMode = getForcedRootBlock(editor) === '';
+        return brMode === requiredState;
+      };
+    };
+    var inListBlock = function (requiredState) {
+      return function (editor, _shiftKey) {
+        return isListItemParentBlock(editor) === requiredState;
+      };
+    };
+    var inBlock = function (blockName, requiredState) {
+      return function (editor, _shiftKey) {
+        var state = getParentBlockName(editor) === blockName.toUpperCase();
+        return state === requiredState;
+      };
+    };
+    var inPreBlock = function (requiredState) {
+      return inBlock('pre', requiredState);
+    };
+    var inSummaryBlock = function () {
+      return inBlock('summary', true);
+    };
+    var shouldPutBrInPre$1 = function (requiredState) {
+      return function (editor, _shiftKey) {
+        return shouldPutBrInPre(editor) === requiredState;
+      };
+    };
+    var inBrContext = function (editor, _shiftKey) {
+      return shouldInsertBr(editor);
+    };
+    var hasShiftKey = function (_editor, shiftKey) {
+      return shiftKey;
+    };
+    var canInsertIntoEditableRoot = function (editor) {
+      var forcedRootBlock = getForcedRootBlock(editor);
+      var rootEditable = getEditableRoot(editor.dom, editor.selection.getStart());
+      return rootEditable && editor.schema.isValidChild(rootEditable.nodeName, forcedRootBlock ? forcedRootBlock : 'P');
+    };
+    var match$2 = function (predicates, action) {
+      return function (editor, shiftKey) {
+        var isMatch = foldl(predicates, function (res, p) {
+          return res && p(editor, shiftKey);
+        }, true);
+        return isMatch ? Option.some(action) : Option.none();
+      };
+    };
+    var getAction$1 = function (editor, evt) {
+      return evaluateUntil([
+        match$2([shouldBlockNewLine$1], newLineAction.none()),
+        match$2([inSummaryBlock()], newLineAction.br()),
+        match$2([
+          inPreBlock(true),
+          shouldPutBrInPre$1(false),
+          hasShiftKey
+        ], newLineAction.br()),
+        match$2([
+          inPreBlock(true),
+          shouldPutBrInPre$1(false)
+        ], newLineAction.block()),
+        match$2([
+          inPreBlock(true),
+          shouldPutBrInPre$1(true),
+          hasShiftKey
+        ], newLineAction.block()),
+        match$2([
+          inPreBlock(true),
+          shouldPutBrInPre$1(true)
+        ], newLineAction.br()),
+        match$2([
+          inListBlock(true),
+          hasShiftKey
+        ], newLineAction.br()),
+        match$2([inListBlock(true)], newLineAction.block()),
+        match$2([
+          isBrMode(true),
+          hasShiftKey,
+          canInsertIntoEditableRoot
+        ], newLineAction.block()),
+        match$2([isBrMode(true)], newLineAction.br()),
+        match$2([inBrContext], newLineAction.br()),
+        match$2([
+          isBrMode(false),
+          hasShiftKey
+        ], newLineAction.br()),
+        match$2([canInsertIntoEditableRoot], newLineAction.block())
+      ], [
+        editor,
+        !!(evt && evt.shiftKey)
+      ]).getOr(newLineAction.none());
+    };
+
+    var insert$3 = function (editor, evt) {
+      getAction$1(editor, evt).fold(function () {
+        insert$2(editor, evt);
+      }, function () {
+        insert$1(editor, evt);
+      }, noop);
+    };
+
+    var handleEnterKeyEvent = function (editor, event) {
+      if (event.isDefaultPrevented()) {
+        return;
+      }
+      event.preventDefault();
+      endTypingLevelIgnoreLocks(editor.undoManager);
+      editor.undoManager.transact(function () {
+        if (editor.selection.isCollapsed() === false) {
+          editor.execCommand('Delete');
+        }
+        insert$3(editor, event);
+      });
+    };
+    var setup$c = function (editor) {
+      editor.on('keydown', function (event) {
+        if (event.keyCode === VK.ENTER) {
+          handleEnterKeyEvent(editor, event);
+        }
+      });
+    };
+
+    var insertTextAtPosition = function (text, pos) {
+      var container = pos.container();
+      var offset = pos.offset();
+      if (isText$1(container)) {
+        container.insertData(offset, text);
+        return Option.some(CaretPosition(container, offset + text.length));
+      } else {
+        return getElementFromPosition(pos).map(function (elm) {
+          var textNode = Element.fromText(text);
+          if (pos.isAtEnd()) {
+            after(elm, textNode);
+          } else {
+            before(elm, textNode);
+          }
+          return CaretPosition(textNode.dom(), text.length);
+        });
+      }
+    };
+    var insertNbspAtPosition = curry(insertTextAtPosition, nbsp);
+    var insertSpaceAtPosition = curry(insertTextAtPosition, ' ');
+
+    var isInMiddleOfText = function (pos) {
+      return CaretPosition.isTextPosition(pos) && !pos.isAtStart() && !pos.isAtEnd();
+    };
+    var getClosestBlock$1 = function (root, pos) {
+      var parentBlocks = filter(parentsAndSelf(Element.fromDom(pos.container()), root), isBlock);
+      return head(parentBlocks).getOr(root);
+    };
+    var hasSpaceBefore = function (root, pos) {
+      if (isInMiddleOfText(pos)) {
+        return isAfterSpace(pos);
+      } else {
+        return isAfterSpace(pos) || prevPosition(getClosestBlock$1(root, pos).dom(), pos).exists(isAfterSpace);
+      }
+    };
+    var hasSpaceAfter = function (root, pos) {
+      if (isInMiddleOfText(pos)) {
+        return isBeforeSpace(pos);
+      } else {
+        return isBeforeSpace(pos) || nextPosition(getClosestBlock$1(root, pos).dom(), pos).exists(isBeforeSpace);
+      }
+    };
+    var isPreValue = function (value) {
+      return contains([
+        'pre',
+        'pre-wrap'
+      ], value);
+    };
+    var isInPre = function (pos) {
+      return getElementFromPosition(pos).bind(function (elm) {
+        return closest(elm, isElement);
+      }).exists(function (elm) {
+        return isPreValue(get$4(elm, 'white-space'));
+      });
+    };
+    var isAtBeginningOfBody = function (root, pos) {
+      return prevPosition(root.dom(), pos).isNone();
+    };
+    var isAtEndOfBody = function (root, pos) {
+      return nextPosition(root.dom(), pos).isNone();
+    };
+    var isAtLineBoundary = function (root, pos) {
+      return isAtBeginningOfBody(root, pos) || isAtEndOfBody(root, pos) || isAtStartOfBlock(root, pos) || isAtEndOfBlock(root, pos) || isAfterBr(root, pos) || isBeforeBr(root, pos);
+    };
+    var needsToHaveNbsp = function (root, pos) {
+      if (isInPre(pos)) {
+        return false;
+      } else {
+        return isAtLineBoundary(root, pos) || hasSpaceBefore(root, pos) || hasSpaceAfter(root, pos);
+      }
+    };
+    var needsToBeNbspLeft = function (root, pos) {
+      if (isInPre(pos)) {
+        return false;
+      } else {
+        return isAtStartOfBlock(root, pos) || isBeforeBlock(root, pos) || isAfterBr(root, pos) || hasSpaceBefore(root, pos);
+      }
+    };
+    var leanRight = function (pos) {
+      var container = pos.container();
+      var offset = pos.offset();
+      if (isText$1(container) && offset < container.data.length) {
+        return CaretPosition(container, offset + 1);
+      } else {
+        return pos;
+      }
+    };
+    var needsToBeNbspRight = function (root, pos) {
+      var afterPos = leanRight(pos);
+      if (isInPre(afterPos)) {
+        return false;
+      } else {
+        return isAtEndOfBlock(root, afterPos) || isAfterBlock(root, afterPos) || isBeforeBr(root, afterPos) || hasSpaceAfter(root, afterPos);
+      }
+    };
+    var needsToBeNbsp = function (root, pos) {
+      return needsToBeNbspLeft(root, pos) || needsToBeNbspRight(root, pos);
+    };
+    var isNbspAt = function (text, offset) {
+      return isNbsp(text.charAt(offset));
+    };
+    var hasNbsp = function (pos) {
+      var container = pos.container();
+      return isText$1(container) && contains$1(container.data, nbsp);
+    };
+    var normalizeNbspMiddle = function (text) {
+      var chars = text.split('');
+      return map(chars, function (chr, i) {
+        if (isNbsp(chr) && i > 0 && i < chars.length - 1 && isContent(chars[i - 1]) && isContent(chars[i + 1])) {
+          return ' ';
+        } else {
+          return chr;
+        }
+      }).join('');
+    };
+    var normalizeNbspAtStart = function (root, node) {
+      var text = node.data;
+      var firstPos = CaretPosition(node, 0);
+      if (isNbspAt(text, 0) && !needsToBeNbsp(root, firstPos)) {
+        node.data = ' ' + text.slice(1);
+        return true;
+      } else {
+        return false;
+      }
+    };
+    var normalizeNbspInMiddleOfTextNode = function (node) {
+      var text = node.data;
+      var newText = normalizeNbspMiddle(text);
+      if (newText !== text) {
+        node.data = newText;
+        return true;
+      } else {
+        return false;
+      }
+    };
+    var normalizeNbspAtEnd = function (root, node) {
+      var text = node.data;
+      var lastPos = CaretPosition(node, text.length - 1);
+      if (isNbspAt(text, text.length - 1) && !needsToBeNbsp(root, lastPos)) {
+        node.data = text.slice(0, -1) + ' ';
+        return true;
+      } else {
+        return false;
+      }
+    };
+    var normalizeNbsps = function (root, pos) {
+      return Option.some(pos).filter(hasNbsp).bind(function (pos) {
+        var container = pos.container();
+        var normalized = normalizeNbspAtStart(root, container) || normalizeNbspInMiddleOfTextNode(container) || normalizeNbspAtEnd(root, container);
+        return normalized ? Option.some(pos) : Option.none();
+      });
+    };
+    var normalizeNbspsInEditor = function (editor) {
+      var root = Element.fromDom(editor.getBody());
+      if (editor.selection.isCollapsed()) {
+        normalizeNbsps(root, CaretPosition.fromRangeStart(editor.selection.getRng())).each(function (pos) {
+          editor.selection.setRng(pos.toRange());
+        });
+      }
+    };
+
+    var locationToCaretPosition = function (root) {
+      return function (location) {
+        return location.fold(function (element) {
+          return prevPosition(root.dom(), CaretPosition$1.before(element));
+        }, function (element) {
+          return firstPositionIn(element);
+        }, function (element) {
+          return lastPositionIn(element);
+        }, function (element) {
+          return nextPosition(root.dom(), CaretPosition$1.after(element));
+        });
+      };
+    };
+    var insertInlineBoundarySpaceOrNbsp = function (root, pos) {
+      return function (checkPos) {
+        return needsToHaveNbsp(root, checkPos) ? insertNbspAtPosition(pos) : insertSpaceAtPosition(pos);
+      };
+    };
+    var setSelection$1 = function (editor) {
+      return function (pos) {
+        editor.selection.setRng(pos.toRange());
+        editor.nodeChanged();
+        return true;
+      };
+    };
+    var insertSpaceOrNbspAtSelection = function (editor) {
+      var pos = CaretPosition$1.fromRangeStart(editor.selection.getRng());
+      var root = Element.fromDom(editor.getBody());
+      if (editor.selection.isCollapsed()) {
+        var isInlineTarget$1 = curry(isInlineTarget, editor);
+        var caretPosition = CaretPosition$1.fromRangeStart(editor.selection.getRng());
+        return readLocation(isInlineTarget$1, editor.getBody(), caretPosition).bind(locationToCaretPosition(root)).bind(insertInlineBoundarySpaceOrNbsp(root, pos)).exists(setSelection$1(editor));
+      } else {
+        return false;
+      }
+    };
+
+    var executeKeydownOverride$2 = function (editor, evt) {
+      execute([{
+          keyCode: VK.SPACEBAR,
+          action: action(insertSpaceOrNbspAtSelection, editor)
+        }], evt).each(function (_) {
+        evt.preventDefault();
+      });
+    };
+    var setup$d = function (editor) {
+      editor.on('keydown', function (evt) {
+        if (evt.isDefaultPrevented() === false) {
+          executeKeydownOverride$2(editor, evt);
+        }
+      });
+    };
+
+    var findBlockCaretContainer = function (editor) {
+      return descendant(Element.fromDom(editor.getBody()), '*[data-mce-caret]').fold(constant(null), function (elm) {
+        return elm.dom();
+      });
+    };
+    var removeIeControlRect = function (editor) {
+      editor.selection.setRng(editor.selection.getRng());
+    };
+    var showBlockCaretContainer = function (editor, blockCaretContainer) {
+      if (blockCaretContainer.hasAttribute('data-mce-caret')) {
+        showCaretContainerBlock(blockCaretContainer);
+        removeIeControlRect(editor);
+        editor.selection.scrollIntoView(blockCaretContainer);
+      }
+    };
+    var handleBlockContainer = function (editor, e) {
+      var blockCaretContainer = findBlockCaretContainer(editor);
+      if (!blockCaretContainer) {
+        return;
+      }
+      if (e.type === 'compositionstart') {
+        e.preventDefault();
+        e.stopPropagation();
+        showBlockCaretContainer(editor, blockCaretContainer);
+        return;
+      }
+      if (hasContent(blockCaretContainer)) {
+        showBlockCaretContainer(editor, blockCaretContainer);
+        editor.undoManager.add();
+      }
+    };
+    var setup$e = function (editor) {
+      editor.on('keyup compositionstart', curry(handleBlockContainer, editor));
+    };
+
+    var browser$4 = detect$3().browser;
+    var setupIeInput = function (editor) {
+      var keypressThrotter = first(function () {
+        if (!editor.composing) {
+          normalizeNbspsInEditor(editor);
+        }
+      }, 0);
+      if (browser$4.isIE()) {
+        editor.on('keypress', function (_e) {
+          keypressThrotter.throttle();
+        });
+        editor.on('remove', function (_e) {
+          keypressThrotter.cancel();
+        });
+      }
+    };
+    var setup$f = function (editor) {
+      setupIeInput(editor);
+      editor.on('input', function (e) {
+        if (e.isComposing === false) {
+          normalizeNbspsInEditor(editor);
+        }
+      });
+    };
+
+    var executeKeydownOverride$3 = function (editor, evt) {
+      execute([
+        {
+          keyCode: VK.END,
+          action: moveToLineEndPoint(editor, true)
+        },
+        {
+          keyCode: VK.HOME,
+          action: moveToLineEndPoint(editor, false)
+        }
+      ], evt).each(function (_) {
+        evt.preventDefault();
+      });
+    };
+    var setup$g = function (editor) {
+      editor.on('keydown', function (evt) {
+        if (evt.isDefaultPrevented() === false) {
+          executeKeydownOverride$3(editor, evt);
+        }
+      });
+    };
+
+    var registerKeyboardOverrides = function (editor) {
+      var caret = setupSelectedState(editor);
+      setup$e(editor);
+      setup$a(editor, caret);
+      setup$b(editor, caret);
+      setup$c(editor);
+      setup$d(editor);
+      setup$f(editor);
+      setup$g(editor);
+    };
+    var setup$h = function (editor) {
+      if (!isRtc(editor)) {
+        registerKeyboardOverrides(editor);
+      }
+    };
+
+    var NodeChange = function () {
+      function NodeChange(editor) {
+        this.lastPath = [];
+        this.editor = editor;
+        var lastRng;
+        var self = this;
+        if (!('onselectionchange' in editor.getDoc())) {
+          editor.on('NodeChange click mouseup keyup focus', function (e) {
+            var nativeRng, fakeRng;
+            nativeRng = editor.selection.getRng();
+            fakeRng = {
+              startContainer: nativeRng.startContainer,
+              startOffset: nativeRng.startOffset,
+              endContainer: nativeRng.endContainer,
+              endOffset: nativeRng.endOffset
+            };
+            if (e.type === 'nodechange' || !isEq$4(fakeRng, lastRng)) {
+              editor.fire('SelectionChange');
+            }
+            lastRng = fakeRng;
+          });
+        }
+        editor.on('contextmenu', function () {
+          editor.fire('SelectionChange');
+        });
+        editor.on('SelectionChange', function () {
+          var startElm = editor.selection.getStart(true);
+          if (!startElm || !Env.range && editor.selection.isCollapsed()) {
+            return;
+          }
+          if (hasAnyRanges(editor) && !self.isSameElementPath(startElm) && editor.dom.isChildOf(startElm, editor.getBody())) {
+            editor.nodeChanged({ selectionChange: true });
+          }
+        });
+        editor.on('mouseup', function (e) {
+          if (!e.isDefaultPrevented() && hasAnyRanges(editor)) {
+            if (editor.selection.getNode().nodeName === 'IMG') {
+              Delay.setEditorTimeout(editor, function () {
+                editor.nodeChanged();
+              });
+            } else {
+              editor.nodeChanged();
+            }
+          }
+        });
+      }
+      NodeChange.prototype.nodeChanged = function (args) {
+        var selection = this.editor.selection;
+        var node, parents, root;
+        if (this.editor.initialized && selection && !this.editor.settings.disable_nodechange && !this.editor.mode.isReadOnly()) {
+          root = this.editor.getBody();
+          node = selection.getStart(true) || root;
+          if (node.ownerDocument !== this.editor.getDoc() || !this.editor.dom.isChildOf(node, root)) {
+            node = root;
+          }
+          parents = [];
+          this.editor.dom.getParent(node, function (node) {
+            if (node === root) {
+              return true;
+            }
+            parents.push(node);
+          });
+          args = args || {};
+          args.element = node;
+          args.parents = parents;
+          this.editor.fire('NodeChange', args);
+        }
+      };
+      NodeChange.prototype.isSameElementPath = function (startElm) {
+        var i, currentPath;
+        currentPath = this.editor.$(startElm).parentsUntil(this.editor.getBody()).add(startElm);
+        if (currentPath.length === this.lastPath.length) {
+          for (i = currentPath.length; i >= 0; i--) {
+            if (currentPath[i] !== this.lastPath[i]) {
+              break;
+            }
+          }
+          if (i === -1) {
+            this.lastPath = currentPath;
+            return true;
+          }
+        }
+        this.lastPath = currentPath;
+        return false;
+      };
+      return NodeChange;
+    }();
+
+    var preventSummaryToggle = function (editor) {
+      editor.on('click', function (e) {
+        if (editor.dom.getParent(e.target, 'details')) {
+          e.preventDefault();
+        }
+      });
+    };
+    var filterDetails = function (editor) {
+      editor.parser.addNodeFilter('details', function (elms) {
+        each(elms, function (details) {
+          details.attr('data-mce-open', details.attr('open'));
+          details.attr('open', 'open');
+        });
+      });
+      editor.serializer.addNodeFilter('details', function (elms) {
+        each(elms, function (details) {
+          var open = details.attr('data-mce-open');
+          details.attr('open', isString(open) ? open : null);
+          details.attr('data-mce-open', null);
+        });
+      });
+    };
+    var setup$i = function (editor) {
+      preventSummaryToggle(editor);
+      filterDetails(editor);
+    };
+
+    var isTextBlockNode = function (node) {
+      return isElement$1(node) && isTextBlock(Element.fromDom(node));
+    };
+    var normalizeSelection$1 = function (editor) {
+      var rng = editor.selection.getRng();
+      var startPos = CaretPosition.fromRangeStart(rng);
+      var endPos = CaretPosition.fromRangeEnd(rng);
+      if (CaretPosition.isElementPosition(startPos)) {
+        var container = startPos.container();
+        if (isTextBlockNode(container)) {
+          firstPositionIn(container).each(function (pos) {
+            return rng.setStart(pos.container(), pos.offset());
+          });
+        }
+      }
+      if (CaretPosition.isElementPosition(endPos)) {
+        var container = startPos.container();
+        if (isTextBlockNode(container)) {
+          lastPositionIn(container).each(function (pos) {
+            return rng.setEnd(pos.container(), pos.offset());
+          });
+        }
+      }
+      editor.selection.setRng(normalize$1(rng));
+    };
+    var setup$j = function (editor) {
+      editor.on('click', function (e) {
+        if (e.detail >= 3) {
+          normalizeSelection$1(editor);
+        }
+      });
+    };
+
+    var getAbsolutePosition = function (elm) {
+      var doc, docElem, win, clientRect;
+      clientRect = elm.getBoundingClientRect();
+      doc = elm.ownerDocument;
+      docElem = doc.documentElement;
+      win = doc.defaultView;
+      return {
+        top: clientRect.top + win.pageYOffset - docElem.clientTop,
+        left: clientRect.left + win.pageXOffset - docElem.clientLeft
+      };
+    };
+    var getBodyPosition = function (editor) {
+      return editor.inline ? getAbsolutePosition(editor.getBody()) : {
+        left: 0,
+        top: 0
+      };
+    };
+    var getScrollPosition = function (editor) {
+      var body = editor.getBody();
+      return editor.inline ? {
+        left: body.scrollLeft,
+        top: body.scrollTop
+      } : {
+        left: 0,
+        top: 0
+      };
+    };
+    var getBodyScroll = function (editor) {
+      var body = editor.getBody(), docElm = editor.getDoc().documentElement;
+      var inlineScroll = {
+        left: body.scrollLeft,
+        top: body.scrollTop
+      };
+      var iframeScroll = {
+        left: body.scrollLeft || docElm.scrollLeft,
+        top: body.scrollTop || docElm.scrollTop
+      };
+      return editor.inline ? inlineScroll : iframeScroll;
+    };
+    var getMousePosition = function (editor, event) {
+      if (event.target.ownerDocument !== editor.getDoc()) {
+        var iframePosition = getAbsolutePosition(editor.getContentAreaContainer());
+        var scrollPosition = getBodyScroll(editor);
+        return {
+          left: event.pageX - iframePosition.left + scrollPosition.left,
+          top: event.pageY - iframePosition.top + scrollPosition.top
+        };
+      }
+      return {
+        left: event.pageX,
+        top: event.pageY
+      };
+    };
+    var calculatePosition = function (bodyPosition, scrollPosition, mousePosition) {
+      return {
+        pageX: mousePosition.left - bodyPosition.left + scrollPosition.left,
+        pageY: mousePosition.top - bodyPosition.top + scrollPosition.top
+      };
+    };
+    var calc = function (editor, event) {
+      return calculatePosition(getBodyPosition(editor), getScrollPosition(editor), getMousePosition(editor, event));
+    };
+
+    var isContentEditableFalse$a = isContentEditableFalse, isContentEditableTrue$4 = isContentEditableTrue;
+    var isDraggable = function (rootElm, elm) {
+      return isContentEditableFalse$a(elm) && elm !== rootElm;
+    };
+    var isValidDropTarget = function (editor, targetElement, dragElement) {
+      if (targetElement === dragElement || editor.dom.isChildOf(targetElement, dragElement)) {
+        return false;
+      }
+      return !isContentEditableFalse$a(targetElement);
+    };
+    var cloneElement = function (elm) {
+      var cloneElm = elm.cloneNode(true);
+      cloneElm.removeAttribute('data-mce-selected');
+      return cloneElm;
+    };
+    var createGhost = function (editor, elm, width, height) {
+      var clonedElm = elm.cloneNode(true);
+      editor.dom.setStyles(clonedElm, {
+        width: width,
+        height: height
+      });
+      editor.dom.setAttrib(clonedElm, 'data-mce-selected', null);
+      var ghostElm = editor.dom.create('div', {
+        'class': 'mce-drag-container',
+        'data-mce-bogus': 'all',
+        'unselectable': 'on',
+        'contenteditable': 'false'
+      });
+      editor.dom.setStyles(ghostElm, {
+        position: 'absolute',
+        opacity: 0.5,
+        overflow: 'hidden',
+        border: 0,
+        padding: 0,
+        margin: 0,
+        width: width,
+        height: height
+      });
+      editor.dom.setStyles(clonedElm, {
+        margin: 0,
+        boxSizing: 'border-box'
+      });
+      ghostElm.appendChild(clonedElm);
+      return ghostElm;
+    };
+    var appendGhostToBody = function (ghostElm, bodyElm) {
+      if (ghostElm.parentNode !== bodyElm) {
+        bodyElm.appendChild(ghostElm);
+      }
+    };
+    var moveGhost = function (ghostElm, position, width, height, maxX, maxY) {
+      var overflowX = 0, overflowY = 0;
+      ghostElm.style.left = position.pageX + 'px';
+      ghostElm.style.top = position.pageY + 'px';
+      if (position.pageX + width > maxX) {
+        overflowX = position.pageX + width - maxX;
+      }
+      if (position.pageY + height > maxY) {
+        overflowY = position.pageY + height - maxY;
+      }
+      ghostElm.style.width = width - overflowX + 'px';
+      ghostElm.style.height = height - overflowY + 'px';
+    };
+    var removeElement = function (elm) {
+      if (elm && elm.parentNode) {
+        elm.parentNode.removeChild(elm);
+      }
+    };
+    var isLeftMouseButtonPressed = function (e) {
+      return e.button === 0;
+    };
+    var hasDraggableElement = function (state) {
+      return state.element;
+    };
+    var applyRelPos = function (state, position) {
+      return {
+        pageX: position.pageX - state.relX,
+        pageY: position.pageY + 5
+      };
+    };
+    var start$1 = function (state, editor) {
+      return function (e) {
+        if (isLeftMouseButtonPressed(e)) {
+          var ceElm = find(editor.dom.getParents(e.target), or(isContentEditableFalse$a, isContentEditableTrue$4)).getOr(null);
+          if (isDraggable(editor.getBody(), ceElm)) {
+            var elmPos = editor.dom.getPos(ceElm);
+            var bodyElm = editor.getBody();
+            var docElm = editor.getDoc().documentElement;
+            state.element = ceElm;
+            state.screenX = e.screenX;
+            state.screenY = e.screenY;
+            state.maxX = (editor.inline ? bodyElm.scrollWidth : docElm.offsetWidth) - 2;
+            state.maxY = (editor.inline ? bodyElm.scrollHeight : docElm.offsetHeight) - 2;
+            state.relX = e.pageX - elmPos.x;
+            state.relY = e.pageY - elmPos.y;
+            state.width = ceElm.offsetWidth;
+            state.height = ceElm.offsetHeight;
+            state.ghost = createGhost(editor, ceElm, state.width, state.height);
+          }
+        }
+      };
+    };
+    var move$1 = function (state, editor) {
+      var throttledPlaceCaretAt = Delay.throttle(function (clientX, clientY) {
+        editor._selectionOverrides.hideFakeCaret();
+        editor.selection.placeCaretAt(clientX, clientY);
+      }, 0);
+      return function (e) {
+        var movement = Math.max(Math.abs(e.screenX - state.screenX), Math.abs(e.screenY - state.screenY));
+        if (hasDraggableElement(state) && !state.dragging && movement > 10) {
+          var args = editor.fire('dragstart', { target: state.element });
+          if (args.isDefaultPrevented()) {
+            return;
+          }
+          state.dragging = true;
+          editor.focus();
+        }
+        if (state.dragging) {
+          var targetPos = applyRelPos(state, calc(editor, e));
+          appendGhostToBody(state.ghost, editor.getBody());
+          moveGhost(state.ghost, targetPos, state.width, state.height, state.maxX, state.maxY);
+          throttledPlaceCaretAt(e.clientX, e.clientY);
+        }
+      };
+    };
+    var getRawTarget = function (selection) {
+      var rng = selection.getSel().getRangeAt(0);
+      var startContainer = rng.startContainer;
+      return startContainer.nodeType === 3 ? startContainer.parentNode : startContainer;
+    };
+    var drop = function (state, editor) {
+      return function (e) {
+        if (state.dragging) {
+          if (isValidDropTarget(editor, getRawTarget(editor.selection), state.element)) {
+            var targetClone_1 = cloneElement(state.element);
+            var args = editor.fire('drop', {
+              targetClone: targetClone_1,
+              clientX: e.clientX,
+              clientY: e.clientY
+            });
+            if (!args.isDefaultPrevented()) {
+              targetClone_1 = args.targetClone;
+              editor.undoManager.transact(function () {
+                removeElement(state.element);
+                editor.insertContent(editor.dom.getOuterHTML(targetClone_1));
+                editor._selectionOverrides.hideFakeCaret();
+              });
+            }
+          }
+        }
+        removeDragState(state);
+      };
+    };
+    var stop = function (state, editor) {
+      return function () {
+        if (state.dragging) {
+          editor.fire('dragend');
+        }
+        removeDragState(state);
+      };
+    };
+    var removeDragState = function (state) {
+      state.dragging = false;
+      state.element = null;
+      removeElement(state.ghost);
+    };
+    var bindFakeDragEvents = function (editor) {
+      var state = {};
+      var pageDom, dragStartHandler, dragHandler, dropHandler, dragEndHandler, rootDocument;
+      pageDom = DOMUtils$1.DOM;
+      rootDocument = domGlobals.document;
+      dragStartHandler = start$1(state, editor);
+      dragHandler = move$1(state, editor);
+      dropHandler = drop(state, editor);
+      dragEndHandler = stop(state, editor);
+      editor.on('mousedown', dragStartHandler);
+      editor.on('mousemove', dragHandler);
+      editor.on('mouseup', dropHandler);
+      pageDom.bind(rootDocument, 'mousemove', dragHandler);
+      pageDom.bind(rootDocument, 'mouseup', dragEndHandler);
+      editor.on('remove', function () {
+        pageDom.unbind(rootDocument, 'mousemove', dragHandler);
+        pageDom.unbind(rootDocument, 'mouseup', dragEndHandler);
+      });
+    };
+    var blockIeDrop = function (editor) {
+      editor.on('drop', function (e) {
+        var realTarget = typeof e.clientX !== 'undefined' ? editor.getDoc().elementFromPoint(e.clientX, e.clientY) : null;
+        if (isContentEditableFalse$a(realTarget) || isContentEditableFalse$a(editor.dom.getContentEditableParent(realTarget))) {
+          e.preventDefault();
+        }
+      });
+    };
+    var init = function (editor) {
+      bindFakeDragEvents(editor);
+      blockIeDrop(editor);
+    };
+
+    var setup$k = function (editor) {
+      var renderFocusCaret = first(function () {
+        if (!editor.removed && editor.getBody().contains(domGlobals.document.activeElement)) {
+          var rng = editor.selection.getRng();
+          if (rng.collapsed) {
+            var caretRange = renderRangeCaret(editor, editor.selection.getRng(), false);
+            editor.selection.setRng(caretRange);
+          }
+        }
+      }, 0);
+      editor.on('focus', function () {
+        renderFocusCaret.throttle();
+      });
+      editor.on('blur', function () {
+        renderFocusCaret.cancel();
+      });
+    };
+
+    var isContentEditableTrue$5 = isContentEditableTrue;
+    var isContentEditableFalse$b = isContentEditableFalse;
+    var getContentEditableRoot$2 = function (editor, node) {
+      var root = editor.getBody();
+      while (node && node !== root) {
+        if (isContentEditableTrue$5(node) || isContentEditableFalse$b(node)) {
+          return node;
+        }
+        node = node.parentNode;
+      }
+      return null;
+    };
+    var SelectionOverrides = function (editor) {
+      var isBlock = function (node) {
+        return editor.dom.isBlock(node);
+      };
+      var rootNode = editor.getBody();
+      var fakeCaret = FakeCaret(editor, rootNode, isBlock, function () {
+        return hasFocus$1(editor);
+      });
+      var realSelectionId = 'sel-' + editor.dom.uniqueId();
+      var selectedContentEditableNode;
+      var isFakeSelectionElement = function (elm) {
+        return editor.dom.hasClass(elm, 'mce-offscreen-selection');
+      };
+      var getRealSelectionElement = function () {
+        var container = editor.dom.get(realSelectionId);
+        return container ? container.getElementsByTagName('*')[0] : container;
+      };
+      var setRange = function (range) {
+        if (range) {
+          editor.selection.setRng(range);
+        }
+      };
+      var getRange = function () {
+        return editor.selection.getRng();
+      };
+      var showCaret = function (direction, node, before, scrollIntoView) {
+        if (scrollIntoView === void 0) {
+          scrollIntoView = true;
+        }
+        var e;
+        e = editor.fire('ShowCaret', {
+          target: node,
+          direction: direction,
+          before: before
+        });
+        if (e.isDefaultPrevented()) {
+          return null;
+        }
+        if (scrollIntoView) {
+          editor.selection.scrollIntoView(node, direction === -1);
+        }
+        return fakeCaret.show(before, node);
+      };
+      var showBlockCaretContainer = function (blockCaretContainer) {
+        if (blockCaretContainer.hasAttribute('data-mce-caret')) {
+          showCaretContainerBlock(blockCaretContainer);
+          setRange(getRange());
+          editor.selection.scrollIntoView(blockCaretContainer);
+        }
+      };
+      var registerEvents = function () {
+        editor.on('mouseup', function (e) {
+          var range = getRange();
+          if (range.collapsed && isXYInContentArea(editor, e.clientX, e.clientY)) {
+            setRange(renderCaretAtRange(editor, range, false));
+          }
+        });
+        editor.on('click', function (e) {
+          var contentEditableRoot;
+          contentEditableRoot = getContentEditableRoot$2(editor, e.target);
+          if (contentEditableRoot) {
+            if (isContentEditableFalse$b(contentEditableRoot)) {
+              e.preventDefault();
+              editor.focus();
+            }
+            if (isContentEditableTrue$5(contentEditableRoot)) {
+              if (editor.dom.isChildOf(contentEditableRoot, editor.selection.getNode())) {
+                removeContentEditableSelection();
+              }
+            }
+          }
+        });
+        editor.on('blur NewBlock', function () {
+          removeContentEditableSelection();
+        });
+        editor.on('ResizeWindow FullscreenStateChanged', function () {
+          return fakeCaret.reposition();
+        });
+        var handleTouchSelect = function (editor) {
+          editor.on('tap', function (e) {
+            var contentEditableRoot = getContentEditableRoot$2(editor, e.target);
+            if (isContentEditableFalse$b(contentEditableRoot)) {
+              e.preventDefault();
+              setContentEditableSelection(selectNode(editor, contentEditableRoot));
+            }
+          }, true);
+        };
+        var hasNormalCaretPosition = function (elm) {
+          var caretWalker = CaretWalker(elm);
+          if (!elm.firstChild) {
+            return false;
+          }
+          var startPos = CaretPosition$1.before(elm.firstChild);
+          var newPos = caretWalker.next(startPos);
+          return newPos && !isBeforeContentEditableFalse(newPos) && !isAfterContentEditableFalse(newPos);
+        };
+        var isInSameBlock = function (node1, node2) {
+          var block1 = editor.dom.getParent(node1, editor.dom.isBlock);
+          var block2 = editor.dom.getParent(node2, editor.dom.isBlock);
+          return block1 === block2;
+        };
+        var hasBetterMouseTarget = function (targetNode, caretNode) {
+          var targetBlock = editor.dom.getParent(targetNode, editor.dom.isBlock);
+          var caretBlock = editor.dom.getParent(caretNode, editor.dom.isBlock);
+          if (targetBlock && editor.dom.isChildOf(targetBlock, caretBlock) && isContentEditableFalse$b(getContentEditableRoot$2(editor, targetBlock)) === false) {
+            return true;
+          }
+          return targetBlock && !isInSameBlock(targetBlock, caretBlock) && hasNormalCaretPosition(targetBlock);
+        };
+        handleTouchSelect(editor);
+        editor.on('mousedown', function (e) {
+          var contentEditableRoot;
+          var targetElm = e.target;
+          if (targetElm !== rootNode && targetElm.nodeName !== 'HTML' && !editor.dom.isChildOf(targetElm, rootNode)) {
+            return;
+          }
+          if (isXYInContentArea(editor, e.clientX, e.clientY) === false) {
+            return;
+          }
+          contentEditableRoot = getContentEditableRoot$2(editor, targetElm);
+          if (contentEditableRoot) {
+            if (isContentEditableFalse$b(contentEditableRoot)) {
+              e.preventDefault();
+              setContentEditableSelection(selectNode(editor, contentEditableRoot));
+            } else {
+              removeContentEditableSelection();
+              if (!(isContentEditableTrue$5(contentEditableRoot) && e.shiftKey) && !isXYWithinRange(e.clientX, e.clientY, editor.selection.getRng())) {
+                hideFakeCaret();
+                editor.selection.placeCaretAt(e.clientX, e.clientY);
+              }
+            }
+          } else if (isFakeCaretTarget(targetElm) === false) {
+            removeContentEditableSelection();
+            hideFakeCaret();
+            var caretInfo = closestCaret(rootNode, e.clientX, e.clientY);
+            if (caretInfo) {
+              if (!hasBetterMouseTarget(e.target, caretInfo.node)) {
+                e.preventDefault();
+                var range = showCaret(1, caretInfo.node, caretInfo.before, false);
+                editor.getBody().focus();
+                setRange(range);
+              }
+            }
+          }
+        });
+        editor.on('keypress', function (e) {
+          if (VK.modifierPressed(e)) {
+            return;
+          }
+          switch (e.keyCode) {
+          default:
+            if (isContentEditableFalse$b(editor.selection.getNode())) {
+              e.preventDefault();
+            }
+            break;
+          }
+        });
+        editor.on('GetSelectionRange', function (e) {
+          var rng = e.range;
+          if (selectedContentEditableNode) {
+            if (!selectedContentEditableNode.parentNode) {
+              selectedContentEditableNode = null;
+              return;
+            }
+            rng = rng.cloneRange();
+            rng.selectNode(selectedContentEditableNode);
+            e.range = rng;
+          }
+        });
+        editor.on('SetSelectionRange', function (e) {
+          e.range = normalizeShortEndedElementSelection(e.range);
+          var rng = setContentEditableSelection(e.range, e.forward);
+          if (rng) {
+            e.range = rng;
+          }
+        });
+        var isPasteBin = function (node) {
+          return node.id === 'mcepastebin';
+        };
+        editor.on('AfterSetSelectionRange', function (e) {
+          var rng = e.range;
+          if (!isRangeInCaretContainer(rng) && !isPasteBin(rng.startContainer.parentNode)) {
+            hideFakeCaret();
+          }
+          if (!isFakeSelectionElement(rng.startContainer.parentNode)) {
+            removeContentEditableSelection();
+          }
+        });
+        editor.on('copy', function (e) {
+          var clipboardData = e.clipboardData;
+          if (!e.isDefaultPrevented() && e.clipboardData && !Env.ie) {
+            var realSelectionElement = getRealSelectionElement();
+            if (realSelectionElement) {
+              e.preventDefault();
+              clipboardData.clearData();
+              clipboardData.setData('text/html', realSelectionElement.outerHTML);
+              clipboardData.setData('text/plain', realSelectionElement.outerText);
+            }
+          }
+        });
+        init(editor);
+        setup$k(editor);
+      };
+      var isWithinCaretContainer = function (node) {
+        return isCaretContainer(node) || startsWithCaretContainer(node) || endsWithCaretContainer(node);
+      };
+      var isRangeInCaretContainer = function (rng) {
+        return isWithinCaretContainer(rng.startContainer) || isWithinCaretContainer(rng.endContainer);
+      };
+      var normalizeShortEndedElementSelection = function (rng) {
+        var shortEndedElements = editor.schema.getShortEndedElements();
+        var newRng = editor.dom.createRng();
+        var startContainer = rng.startContainer;
+        var startOffset = rng.startOffset;
+        var endContainer = rng.endContainer;
+        var endOffset = rng.endOffset;
+        if (has(shortEndedElements, startContainer.nodeName.toLowerCase())) {
+          if (startOffset === 0) {
+            newRng.setStartBefore(startContainer);
+          } else {
+            newRng.setStartAfter(startContainer);
+          }
+        } else {
+          newRng.setStart(startContainer, startOffset);
+        }
+        if (has(shortEndedElements, endContainer.nodeName.toLowerCase())) {
+          if (endOffset === 0) {
+            newRng.setEndBefore(endContainer);
+          } else {
+            newRng.setEndAfter(endContainer);
+          }
+        } else {
+          newRng.setEnd(endContainer, endOffset);
+        }
+        return newRng;
+      };
+      var setContentEditableSelection = function (range, forward) {
+        var node;
+        var $ = editor.$;
+        var dom = editor.dom;
+        var $realSelectionContainer, sel, startContainer, startOffset, endOffset, e, caretPosition, targetClone, origTargetClone;
+        if (!range) {
+          return null;
+        }
+        if (range.collapsed) {
+          if (!isRangeInCaretContainer(range)) {
+            if (forward === false) {
+              caretPosition = getNormalizedRangeEndPoint(-1, rootNode, range);
+              if (isFakeCaretTarget(caretPosition.getNode(true))) {
+                return showCaret(-1, caretPosition.getNode(true), false, false);
+              }
+              if (isFakeCaretTarget(caretPosition.getNode())) {
+                return showCaret(-1, caretPosition.getNode(), !caretPosition.isAtEnd(), false);
+              }
+            } else {
+              caretPosition = getNormalizedRangeEndPoint(1, rootNode, range);
+              if (isFakeCaretTarget(caretPosition.getNode())) {
+                return showCaret(1, caretPosition.getNode(), !caretPosition.isAtEnd(), false);
+              }
+              if (isFakeCaretTarget(caretPosition.getNode(true))) {
+                return showCaret(1, caretPosition.getNode(true), false, false);
+              }
+            }
+          }
+          return null;
+        }
+        startContainer = range.startContainer;
+        startOffset = range.startOffset;
+        endOffset = range.endOffset;
+        if (startContainer.nodeType === 3 && startOffset === 0 && isContentEditableFalse$b(startContainer.parentNode)) {
+          startContainer = startContainer.parentNode;
+          startOffset = dom.nodeIndex(startContainer);
+          startContainer = startContainer.parentNode;
+        }
+        if (startContainer.nodeType !== 1) {
+          return null;
+        }
+        if (endOffset === startOffset + 1 && startContainer === range.endContainer) {
+          node = startContainer.childNodes[startOffset];
+        }
+        if (!isContentEditableFalse$b(node)) {
+          return null;
+        }
+        targetClone = origTargetClone = node.cloneNode(true);
+        e = editor.fire('ObjectSelected', {
+          target: node,
+          targetClone: targetClone
+        });
+        if (e.isDefaultPrevented()) {
+          return null;
+        }
+        $realSelectionContainer = descendant(Element.fromDom(editor.getBody()), '#' + realSelectionId).fold(function () {
+          return $([]);
+        }, function (elm) {
+          return $([elm.dom()]);
+        });
+        targetClone = e.targetClone;
+        if ($realSelectionContainer.length === 0) {
+          $realSelectionContainer = $('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr('id', realSelectionId);
+          $realSelectionContainer.appendTo(editor.getBody());
+        }
+        range = editor.dom.createRng();
+        if (targetClone === origTargetClone && Env.ie) {
+          $realSelectionContainer.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xA0</p>').append(targetClone);
+          range.setStartAfter($realSelectionContainer[0].firstChild.firstChild);
+          range.setEndAfter(targetClone);
+        } else {
+          $realSelectionContainer.empty().append(nbsp).append(targetClone).append(nbsp);
+          range.setStart($realSelectionContainer[0].firstChild, 1);
+          range.setEnd($realSelectionContainer[0].lastChild, 0);
+        }
+        $realSelectionContainer.css({ top: dom.getPos(node, editor.getBody()).y });
+        $realSelectionContainer[0].focus();
+        sel = editor.selection.getSel();
+        sel.removeAllRanges();
+        sel.addRange(range);
+        var nodeElm = Element.fromDom(node);
+        each(descendants$1(Element.fromDom(editor.getBody()), '*[data-mce-selected]'), function (elm) {
+          if (!eq$2(nodeElm, elm)) {
+            remove$1(elm, 'data-mce-selected');
+          }
+        });
+        if (!editor.dom.getAttrib(node, 'data-mce-selected')) {
+          node.setAttribute('data-mce-selected', '1');
+        }
+        selectedContentEditableNode = node;
+        hideFakeCaret();
+        return range;
+      };
+      var removeContentEditableSelection = function () {
+        if (selectedContentEditableNode) {
+          selectedContentEditableNode.removeAttribute('data-mce-selected');
+          descendant(Element.fromDom(editor.getBody()), '#' + realSelectionId).each(remove);
+          selectedContentEditableNode = null;
+        }
+        descendant(Element.fromDom(editor.getBody()), '#' + realSelectionId).each(remove);
+        selectedContentEditableNode = null;
+      };
+      var destroy = function () {
+        fakeCaret.destroy();
+        selectedContentEditableNode = null;
+      };
+      var hideFakeCaret = function () {
+        fakeCaret.hide();
+      };
+      if (Env.ceFalse) {
+        registerEvents();
+      }
+      return {
+        showCaret: showCaret,
+        showBlockCaretContainer: showBlockCaretContainer,
+        hideFakeCaret: hideFakeCaret,
+        destroy: destroy
+      };
+    };
+
+    var Quirks = function (editor) {
+      var each = Tools.each;
+      var BACKSPACE = VK.BACKSPACE, DELETE = VK.DELETE, dom = editor.dom, selection = editor.selection, settings = editor.settings, parser = editor.parser;
+      var isGecko = Env.gecko, isIE = Env.ie, isWebKit = Env.webkit;
+      var mceInternalUrlPrefix = 'data:text/mce-internal,';
+      var mceInternalDataType = isIE ? 'Text' : 'URL';
+      var setEditorCommandState = function (cmd, state) {
+        try {
+          editor.getDoc().execCommand(cmd, false, state);
+        } catch (ex) {
+        }
+      };
+      var isDefaultPrevented = function (e) {
+        return e.isDefaultPrevented();
+      };
+      var setMceInternalContent = function (e) {
+        var selectionHtml, internalContent;
+        if (e.dataTransfer) {
+          if (editor.selection.isCollapsed() && e.target.tagName === 'IMG') {
+            selection.select(e.target);
+          }
+          selectionHtml = editor.selection.getContent();
+          if (selectionHtml.length > 0) {
+            internalContent = mceInternalUrlPrefix + escape(editor.id) + ',' + escape(selectionHtml);
+            e.dataTransfer.setData(mceInternalDataType, internalContent);
+          }
+        }
+      };
+      var getMceInternalContent = function (e) {
+        var internalContent;
+        if (e.dataTransfer) {
+          internalContent = e.dataTransfer.getData(mceInternalDataType);
+          if (internalContent && internalContent.indexOf(mceInternalUrlPrefix) >= 0) {
+            internalContent = internalContent.substr(mceInternalUrlPrefix.length).split(',');
+            return {
+              id: unescape(internalContent[0]),
+              html: unescape(internalContent[1])
+            };
+          }
+        }
+        return null;
+      };
+      var insertClipboardContents = function (content, internal) {
+        if (editor.queryCommandSupported('mceInsertClipboardContent')) {
+          editor.execCommand('mceInsertClipboardContent', false, {
+            content: content,
+            internal: internal
+          });
+        } else {
+          editor.execCommand('mceInsertContent', false, content);
+        }
+      };
+      var emptyEditorWhenDeleting = function () {
+        var serializeRng = function (rng) {
+          var body = dom.create('body');
+          var contents = rng.cloneContents();
+          body.appendChild(contents);
+          return selection.serializer.serialize(body, { format: 'html' });
+        };
+        var allContentsSelected = function (rng) {
+          var selection = serializeRng(rng);
+          var allRng = dom.createRng();
+          allRng.selectNode(editor.getBody());
+          var allSelection = serializeRng(allRng);
+          return selection === allSelection;
+        };
+        editor.on('keydown', function (e) {
+          var keyCode = e.keyCode;
+          var isCollapsed, body;
+          if (!isDefaultPrevented(e) && (keyCode === DELETE || keyCode === BACKSPACE)) {
+            isCollapsed = editor.selection.isCollapsed();
+            body = editor.getBody();
+            if (isCollapsed && !dom.isEmpty(body)) {
+              return;
+            }
+            if (!isCollapsed && !allContentsSelected(editor.selection.getRng())) {
+              return;
+            }
+            e.preventDefault();
+            editor.setContent('');
+            if (body.firstChild && dom.isBlock(body.firstChild)) {
+              editor.selection.setCursorLocation(body.firstChild, 0);
+            } else {
+              editor.selection.setCursorLocation(body, 0);
+            }
+            editor.nodeChanged();
+          }
+        });
+      };
+      var selectAll = function () {
+        editor.shortcuts.add('meta+a', null, 'SelectAll');
+      };
+      var inputMethodFocus = function () {
+        if (!editor.inline) {
+          dom.bind(editor.getDoc(), 'mousedown mouseup', function (e) {
+            var rng;
+            if (e.target === editor.getDoc().documentElement) {
+              rng = selection.getRng();
+              editor.getBody().focus();
+              if (e.type === 'mousedown') {
+                if (isCaretContainer(rng.startContainer)) {
+                  return;
+                }
+                selection.placeCaretAt(e.clientX, e.clientY);
+              } else {
+                selection.setRng(rng);
+              }
+            }
+          });
+        }
+      };
+      var removeHrOnBackspace = function () {
+        editor.on('keydown', function (e) {
+          if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) {
+            if (!editor.getBody().getElementsByTagName('hr').length) {
+              return;
+            }
+            if (selection.isCollapsed() && selection.getRng().startOffset === 0) {
+              var node = selection.getNode();
+              var previousSibling = node.previousSibling;
+              if (node.nodeName === 'HR') {
+                dom.remove(node);
+                e.preventDefault();
+                return;
+              }
+              if (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === 'hr') {
+                dom.remove(previousSibling);
+                e.preventDefault();
+              }
+            }
+          }
+        });
+      };
+      var focusBody = function () {
+        if (!domGlobals.Range.prototype.getClientRects) {
+          editor.on('mousedown', function (e) {
+            if (!isDefaultPrevented(e) && e.target.nodeName === 'HTML') {
+              var body_1 = editor.getBody();
+              body_1.blur();
+              Delay.setEditorTimeout(editor, function () {
+                body_1.focus();
+              });
+            }
+          });
+        }
+      };
+      var selectControlElements = function () {
+        editor.on('click', function (e) {
+          var target = e.target;
+          if (/^(IMG|HR)$/.test(target.nodeName) && dom.getContentEditableParent(target) !== 'false') {
+            e.preventDefault();
+            editor.selection.select(target);
+            editor.nodeChanged();
+          }
+          if (target.nodeName === 'A' && dom.hasClass(target, 'mce-item-anchor')) {
+            e.preventDefault();
+            selection.select(target);
+          }
+        });
+      };
+      var removeStylesWhenDeletingAcrossBlockElements = function () {
+        var getAttributeApplyFunction = function () {
+          var template = dom.getAttribs(selection.getStart().cloneNode(false));
+          return function () {
+            var target = selection.getStart();
+            if (target !== editor.getBody()) {
+              dom.setAttrib(target, 'style', null);
+              each(template, function (attr) {
+                target.setAttributeNode(attr.cloneNode(true));
+              });
+            }
+          };
+        };
+        var isSelectionAcrossElements = function () {
+          return !selection.isCollapsed() && dom.getParent(selection.getStart(), dom.isBlock) !== dom.getParent(selection.getEnd(), dom.isBlock);
+        };
+        editor.on('keypress', function (e) {
+          var applyAttributes;
+          if (!isDefaultPrevented(e) && (e.keyCode === 8 || e.keyCode === 46) && isSelectionAcrossElements()) {
+            applyAttributes = getAttributeApplyFunction();
+            editor.getDoc().execCommand('delete', false, null);
+            applyAttributes();
+            e.preventDefault();
+            return false;
+          }
+        });
+        dom.bind(editor.getDoc(), 'cut', function (e) {
+          var applyAttributes;
+          if (!isDefaultPrevented(e) && isSelectionAcrossElements()) {
+            applyAttributes = getAttributeApplyFunction();
+            Delay.setEditorTimeout(editor, function () {
+              applyAttributes();
+            });
+          }
+        });
+      };
+      var disableBackspaceIntoATable = function () {
+        editor.on('keydown', function (e) {
+          if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) {
+            if (selection.isCollapsed() && selection.getRng().startOffset === 0) {
+              var previousSibling = selection.getNode().previousSibling;
+              if (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === 'table') {
+                e.preventDefault();
+                return false;
+              }
+            }
+          }
+        });
+      };
+      var removeBlockQuoteOnBackSpace = function () {
+        editor.on('keydown', function (e) {
+          var rng, container, offset, root, parent;
+          if (isDefaultPrevented(e) || e.keyCode !== VK.BACKSPACE) {
+            return;
+          }
+          rng = selection.getRng();
+          container = rng.startContainer;
+          offset = rng.startOffset;
+          root = dom.getRoot();
+          parent = container;
+          if (!rng.collapsed || offset !== 0) {
+            return;
+          }
+          while (parent && parent.parentNode && parent.parentNode.firstChild === parent && parent.parentNode !== root) {
+            parent = parent.parentNode;
+          }
+          if (parent.tagName === 'BLOCKQUOTE') {
+            editor.formatter.toggle('blockquote', null, parent);
+            rng = dom.createRng();
+            rng.setStart(container, 0);
+            rng.setEnd(container, 0);
+            selection.setRng(rng);
+          }
+        });
+      };
+      var setGeckoEditingOptions = function () {
+        var setOpts = function () {
+          setEditorCommandState('StyleWithCSS', false);
+          setEditorCommandState('enableInlineTableEditing', false);
+          if (!settings.object_resizing) {
+            setEditorCommandState('enableObjectResizing', false);
+          }
+        };
+        if (!settings.readonly) {
+          editor.on('BeforeExecCommand mousedown', setOpts);
+        }
+      };
+      var addBrAfterLastLinks = function () {
+        var fixLinks = function () {
+          each(dom.select('a'), function (node) {
+            var parentNode = node.parentNode;
+            var root = dom.getRoot();
+            if (parentNode.lastChild === node) {
+              while (parentNode && !dom.isBlock(parentNode)) {
+                if (parentNode.parentNode.lastChild !== parentNode || parentNode === root) {
+                  return;
+                }
+                parentNode = parentNode.parentNode;
+              }
+              dom.add(parentNode, 'br', { 'data-mce-bogus': 1 });
+            }
+          });
+        };
+        editor.on('SetContent ExecCommand', function (e) {
+          if (e.type === 'setcontent' || e.command === 'mceInsertLink') {
+            fixLinks();
+          }
+        });
+      };
+      var setDefaultBlockType = function () {
+        if (settings.forced_root_block) {
+          editor.on('init', function () {
+            setEditorCommandState('DefaultParagraphSeparator', getForcedRootBlock(editor));
+          });
+        }
+      };
+      var normalizeSelection = function () {
+        editor.on('keyup focusin mouseup', function (e) {
+          if (!VK.modifierPressed(e)) {
+            selection.normalize();
+          }
+        }, true);
+      };
+      var showBrokenImageIcon = function () {
+        editor.contentStyles.push('img:-moz-broken {' + '-moz-force-broken-image-icon:1;' + 'min-width:24px;' + 'min-height:24px' + '}');
+      };
+      var restoreFocusOnKeyDown = function () {
+        if (!editor.inline) {
+          editor.on('keydown', function () {
+            if (domGlobals.document.activeElement === domGlobals.document.body) {
+              editor.getWin().focus();
+            }
+          });
+        }
+      };
+      var bodyHeight = function () {
+        if (!editor.inline) {
+          editor.contentStyles.push('body {min-height: 150px}');
+          editor.on('click', function (e) {
+            var rng;
+            if (e.target.nodeName === 'HTML') {
+              if (Env.ie > 11) {
+                editor.getBody().focus();
+                return;
+              }
+              rng = editor.selection.getRng();
+              editor.getBody().focus();
+              editor.selection.setRng(rng);
+              editor.selection.normalize();
+              editor.nodeChanged();
+            }
+          });
+        }
+      };
+      var blockCmdArrowNavigation = function () {
+        if (Env.mac) {
+          editor.on('keydown', function (e) {
+            if (VK.metaKeyPressed(e) && !e.shiftKey && (e.keyCode === 37 || e.keyCode === 39)) {
+              e.preventDefault();
+              var selection_1 = editor.selection.getSel();
+              selection_1.modify('move', e.keyCode === 37 ? 'backward' : 'forward', 'lineboundary');
+            }
+          });
+        }
+      };
+      var disableAutoUrlDetect = function () {
+        setEditorCommandState('AutoUrlDetect', false);
+      };
+      var tapLinksAndImages = function () {
+        editor.on('click', function (e) {
+          var elm = e.target;
+          do {
+            if (elm.tagName === 'A') {
+              e.preventDefault();
+              return;
+            }
+          } while (elm = elm.parentNode);
+        });
+        editor.contentStyles.push('.mce-content-body {-webkit-touch-callout: none}');
+      };
+      var blockFormSubmitInsideEditor = function () {
+        editor.on('init', function () {
+          editor.dom.bind(editor.getBody(), 'submit', function (e) {
+            e.preventDefault();
+          });
+        });
+      };
+      var removeAppleInterchangeBrs = function () {
+        parser.addNodeFilter('br', function (nodes) {
+          var i = nodes.length;
+          while (i--) {
+            if (nodes[i].attr('class') === 'Apple-interchange-newline') {
+              nodes[i].remove();
+            }
+          }
+        });
+      };
+      var ieInternalDragAndDrop = function () {
+        editor.on('dragstart', function (e) {
+          setMceInternalContent(e);
+        });
+        editor.on('drop', function (e) {
+          if (!isDefaultPrevented(e)) {
+            var internalContent = getMceInternalContent(e);
+            if (internalContent && internalContent.id !== editor.id) {
+              e.preventDefault();
+              var rng = fromPoint$1(e.x, e.y, editor.getDoc());
+              selection.setRng(rng);
+              insertClipboardContents(internalContent.html, true);
+            }
+          }
+        });
+      };
+      var refreshContentEditable = function () {
+      };
+      var isHidden = function () {
+        var sel;
+        if (!isGecko || editor.removed) {
+          return false;
+        }
+        sel = editor.selection.getSel();
+        return !sel || !sel.rangeCount || sel.rangeCount === 0;
+      };
+      removeBlockQuoteOnBackSpace();
+      emptyEditorWhenDeleting();
+      if (!Env.windowsPhone) {
+        normalizeSelection();
+      }
+      if (isWebKit) {
+        inputMethodFocus();
+        selectControlElements();
+        setDefaultBlockType();
+        blockFormSubmitInsideEditor();
+        disableBackspaceIntoATable();
+        removeAppleInterchangeBrs();
+        if (Env.iOS) {
+          restoreFocusOnKeyDown();
+          bodyHeight();
+          tapLinksAndImages();
+        } else {
+          selectAll();
+        }
+      }
+      if (Env.ie >= 11) {
+        bodyHeight();
+        disableBackspaceIntoATable();
+      }
+      if (Env.ie) {
+        selectAll();
+        disableAutoUrlDetect();
+        ieInternalDragAndDrop();
+      }
+      if (isGecko) {
+        removeHrOnBackspace();
+        focusBody();
+        removeStylesWhenDeletingAcrossBlockElements();
+        setGeckoEditingOptions();
+        addBrAfterLastLinks();
+        showBrokenImageIcon();
+        blockCmdArrowNavigation();
+        disableBackspaceIntoATable();
+      }
+      return {
+        refreshContentEditable: refreshContentEditable,
+        isHidden: isHidden
+      };
+    };
+
+    var DOM$4 = DOMUtils$1.DOM;
+    var appendStyle = function (editor, text) {
+      var head = Element.fromDom(editor.getDoc().head);
+      var tag = Element.fromTag('style');
+      set(tag, 'type', 'text/css');
+      append(tag, Element.fromText(text));
+      append(head, tag);
+    };
+    var getRootName = function (editor) {
+      return editor.inline ? editor.getElement().nodeName.toLowerCase() : undefined;
+    };
+    var removeUndefined = function (obj) {
+      return filter$1(obj, function (v) {
+        return isUndefined(v) === false;
+      });
+    };
+    var mkParserSettings = function (editor) {
+      var settings = editor.settings;
+      var blobCache = editor.editorUpload.blobCache;
+      return removeUndefined({
+        allow_conditional_comments: settings.allow_conditional_comments,
+        allow_html_in_named_anchor: settings.allow_html_in_named_anchor,
+        allow_script_urls: settings.allow_script_urls,
+        allow_unsafe_link_target: settings.allow_unsafe_link_target,
+        convert_fonts_to_spans: settings.convert_fonts_to_spans,
+        fix_list_elements: settings.fix_list_elements,
+        font_size_legacy_values: settings.font_size_legacy_values,
+        forced_root_block: settings.forced_root_block,
+        forced_root_block_attrs: settings.forced_root_block_attrs,
+        padd_empty_with_br: settings.padd_empty_with_br,
+        preserve_cdata: settings.preserve_cdata,
+        remove_trailing_brs: settings.remove_trailing_brs,
+        inline_styles: settings.inline_styles,
+        root_name: getRootName(editor),
+        validate: true,
+        blob_cache: blobCache,
+        images_dataimg_filter: settings.images_dataimg_filter
+      });
+    };
+    var mkSerializerSettings = function (editor) {
+      var settings = editor.settings;
+      return __assign(__assign({}, mkParserSettings(editor)), removeUndefined({
+        url_converter: settings.url_converter,
+        url_converter_scope: settings.url_converter_scope,
+        element_format: settings.element_format,
+        entities: settings.entities,
+        entity_encoding: settings.entity_encoding,
+        indent: settings.indent,
+        indent_after: settings.indent_after,
+        indent_before: settings.indent_before,
+        block_elements: settings.block_elements,
+        boolean_attributes: settings.boolean_attributes,
+        custom_elements: settings.custom_elements,
+        extended_valid_elements: settings.extended_valid_elements,
+        invalid_elements: settings.invalid_elements,
+        invalid_styles: settings.invalid_styles,
+        move_caret_before_on_enter_elements: settings.move_caret_before_on_enter_elements,
+        non_empty_elements: settings.non_empty_elements,
+        schema: settings.schema,
+        self_closing_elements: settings.self_closing_elements,
+        short_ended_elements: settings.short_ended_elements,
+        special: settings.special,
+        text_block_elements: settings.text_block_elements,
+        text_inline_elements: settings.text_inline_elements,
+        valid_children: settings.valid_children,
+        valid_classes: settings.valid_classes,
+        valid_elements: settings.valid_elements,
+        valid_styles: settings.valid_styles,
+        verify_html: settings.verify_html,
+        whitespace_elements: settings.whitespace_elements
+      }));
+    };
+    var createParser = function (editor) {
+      var parser = DomParser(mkParserSettings(editor), editor.schema);
+      parser.addAttributeFilter('src,href,style,tabindex', function (nodes, name) {
+        var i = nodes.length, node, value;
+        var dom = editor.dom;
+        var internalName = 'data-mce-' + name;
+        while (i--) {
+          node = nodes[i];
+          value = node.attr(name);
+          if (value && !node.attr(internalName)) {
+            if (value.indexOf('data:') === 0 || value.indexOf('blob:') === 0) {
+              continue;
+            }
+            if (name === 'style') {
+              value = dom.serializeStyle(dom.parseStyle(value), node.name);
+              if (!value.length) {
+                value = null;
+              }
+              node.attr(internalName, value);
+              node.attr(name, value);
+            } else if (name === 'tabindex') {
+              node.attr(internalName, value);
+              node.attr(name, null);
+            } else {
+              node.attr(internalName, editor.convertURL(value, name, node.name));
+            }
+          }
+        }
+      });
+      parser.addNodeFilter('script', function (nodes) {
+        var i = nodes.length, node, type;
+        while (i--) {
+          node = nodes[i];
+          type = node.attr('type') || 'no/type';
+          if (type.indexOf('mce-') !== 0) {
+            node.attr('type', 'mce-' + type);
+          }
+        }
+      });
+      if (editor.settings.preserve_cdata) {
+        parser.addNodeFilter('#cdata', function (nodes) {
+          var i = nodes.length, node;
+          while (i--) {
+            node = nodes[i];
+            node.type = 8;
+            node.name = '#comment';
+            node.value = '[CDATA[' + editor.dom.encode(node.value) + ']]';
+          }
+        });
+      }
+      parser.addNodeFilter('p,h1,h2,h3,h4,h5,h6,div', function (nodes) {
+        var i = nodes.length, node;
+        var nonEmptyElements = editor.schema.getNonEmptyElements();
+        while (i--) {
+          node = nodes[i];
+          if (node.isEmpty(nonEmptyElements) && node.getAll('br').length === 0) {
+            node.append(new Node('br', 1)).shortEnded = true;
+          }
+        }
+      });
+      return parser;
+    };
+    var autoFocus = function (editor) {
+      if (editor.settings.auto_focus) {
+        Delay.setEditorTimeout(editor, function () {
+          var focusEditor;
+          if (editor.settings.auto_focus === true) {
+            focusEditor = editor;
+          } else {
+            focusEditor = editor.editorManager.get(editor.settings.auto_focus);
+          }
+          if (!focusEditor.destroyed) {
+            focusEditor.focus();
+          }
+        }, 100);
+      }
+    };
+    var moveSelectionToFirstCaretPosition = function (editor) {
+      var root = editor.dom.getRoot();
+      if (!editor.inline && (!hasAnyRanges(editor) || editor.selection.getStart(true) === root)) {
+        firstPositionIn(root).each(function (pos) {
+          var node = pos.getNode();
+          var caretPos = isTable(node) ? firstPositionIn(node).getOr(pos) : pos;
+          if (Env.browser.isIE()) {
+            storeNative(editor, caretPos.toRange());
+          } else {
+            editor.selection.setRng(caretPos.toRange());
+          }
+        });
+      }
+    };
+    var initEditor = function (editor) {
+      editor.bindPendingEventDelegates();
+      editor.initialized = true;
+      fireInit(editor);
+      editor.focus(true);
+      moveSelectionToFirstCaretPosition(editor);
+      editor.nodeChanged({ initial: true });
+      editor.execCallback('init_instance_callback', editor);
+      autoFocus(editor);
+    };
+    var getStyleSheetLoader = function (editor) {
+      return editor.inline ? DOM$4.styleSheetLoader : editor.dom.styleSheetLoader;
+    };
+    var preInit = function (editor, rtcMode) {
+      var settings = editor.settings, doc = editor.getDoc(), body = editor.getBody();
+      if (!settings.browser_spellcheck && !settings.gecko_spellcheck) {
+        doc.body.spellcheck = false;
+        DOM$4.setAttrib(body, 'spellcheck', 'false');
+      }
+      editor.quirks = Quirks(editor);
+      firePostRender(editor);
+      var directionality = getDirectionality(editor);
+      if (directionality !== undefined) {
+        body.dir = directionality;
+      }
+      if (settings.protect) {
+        editor.on('BeforeSetContent', function (e) {
+          Tools.each(settings.protect, function (pattern) {
+            e.content = e.content.replace(pattern, function (str) {
+              return '<!--mce:protected ' + escape(str) + '-->';
+            });
+          });
+        });
+      }
+      editor.on('SetContent', function () {
+        editor.addVisual(editor.getBody());
+      });
+      if (rtcMode === false) {
+        editor.load({
+          initial: true,
+          format: 'html'
+        });
+      }
+      editor.startContent = editor.getContent({ format: 'raw' });
+      editor.on('compositionstart compositionend', function (e) {
+        editor.composing = e.type === 'compositionstart';
+      });
+      if (editor.contentStyles.length > 0) {
+        var contentCssText_1 = '';
+        Tools.each(editor.contentStyles, function (style) {
+          contentCssText_1 += style + '\r\n';
+        });
+        editor.dom.addStyle(contentCssText_1);
+      }
+      getStyleSheetLoader(editor).loadAll(editor.contentCSS, function (_) {
+        initEditor(editor);
+      }, function (_urls) {
+        initEditor(editor);
+      });
+      if (settings.content_style) {
+        appendStyle(editor, settings.content_style);
+      }
+    };
+    var initContentBody = function (editor, skipWrite) {
+      var settings = editor.settings;
+      var targetElm = editor.getElement();
+      var doc = editor.getDoc(), body;
+      if (!settings.inline) {
+        editor.getElement().style.visibility = editor.orgVisibility;
+      }
+      if (!skipWrite && !editor.inline) {
+        doc.open();
+        doc.write(editor.iframeHTML);
+        doc.close();
+      }
+      if (editor.inline) {
+        editor.on('remove', function () {
+          var bodyEl = this.getBody();
+          DOM$4.removeClass(bodyEl, 'mce-content-body');
+          DOM$4.removeClass(bodyEl, 'mce-edit-focus');
+          DOM$4.setAttrib(bodyEl, 'contentEditable', null);
+        });
+        DOM$4.addClass(targetElm, 'mce-content-body');
+        editor.contentDocument = doc = domGlobals.document;
+        editor.contentWindow = domGlobals.window;
+        editor.bodyElement = targetElm;
+        editor.contentAreaContainer = targetElm;
+      }
+      body = editor.getBody();
+      body.disabled = true;
+      editor.readonly = !!settings.readonly;
+      if (!editor.readonly) {
+        if (editor.inline && DOM$4.getStyle(body, 'position', true) === 'static') {
+          body.style.position = 'relative';
+        }
+        body.contentEditable = editor.getParam('content_editable_state', true);
+      }
+      body.disabled = false;
+      editor.editorUpload = EditorUpload(editor);
+      editor.schema = Schema(settings);
+      editor.dom = DOMUtils$1(doc, {
+        keep_values: true,
+        url_converter: editor.convertURL,
+        url_converter_scope: editor,
+        hex_colors: settings.force_hex_style_colors,
+        update_styles: true,
+        root_element: editor.inline ? editor.getBody() : null,
+        collect: function () {
+          return editor.inline;
+        },
+        schema: editor.schema,
+        contentCssCors: shouldUseContentCssCors(editor),
+        referrerPolicy: getReferrerPolicy(editor),
+        onSetAttrib: function (e) {
+          editor.fire('SetAttrib', e);
+        }
+      });
+      editor.parser = createParser(editor);
+      editor.serializer = Serializer$1(mkSerializerSettings(editor), editor);
+      editor.selection = Selection$1(editor.dom, editor.getWin(), editor.serializer, editor);
+      editor.annotator = Annotator(editor);
+      editor.formatter = Formatter(editor);
+      editor.undoManager = UndoManager(editor);
+      editor._nodeChangeDispatcher = new NodeChange(editor);
+      editor._selectionOverrides = SelectionOverrides(editor);
+      setup$8(editor);
+      setup$i(editor);
+      if (!isRtc(editor)) {
+        setup$j(editor);
+      }
+      setup$h(editor);
+      setup$9(editor);
+      setup$7(editor);
+      firePreInit(editor);
+      setup$4(editor).fold(function () {
+        preInit(editor, false);
+      }, function (loadingRtc) {
+        editor.setProgressState(true);
+        loadingRtc.then(function (rtcMode) {
+          editor.setProgressState(false);
+          preInit(editor, rtcMode);
+        });
+      });
+    };
+
+    var DOM$5 = DOMUtils$1.DOM;
+    var relaxDomain = function (editor, ifr) {
+      if (domGlobals.document.domain !== domGlobals.window.location.hostname && Env.browser.isIE()) {
+        var bodyUuid = uuid('mce');
+        editor[bodyUuid] = function () {
+          initContentBody(editor);
+        };
+        var domainRelaxUrl = 'javascript:(function(){' + 'document.open();document.domain="' + domGlobals.document.domain + '";' + 'var ed = window.parent.tinymce.get("' + editor.id + '");document.write(ed.iframeHTML);' + 'document.close();ed.' + bodyUuid + '(true);})()';
+        DOM$5.setAttrib(ifr, 'src', domainRelaxUrl);
+        return true;
+      }
+      return false;
+    };
+    var createIframeElement = function (id, title, height, customAttrs) {
+      var iframe = Element.fromTag('iframe');
+      setAll(iframe, customAttrs);
+      setAll(iframe, {
+        id: id + '_ifr',
+        frameBorder: '0',
+        allowTransparency: 'true',
+        title: title
+      });
+      add$3(iframe, 'tox-edit-area__iframe');
+      return iframe;
+    };
+    var getIframeHtml = function (editor) {
+      var bodyId, bodyClass, iframeHTML;
+      iframeHTML = getDocType(editor) + '<html><head>';
+      if (getDocumentBaseUrl(editor) !== editor.documentBaseUrl) {
+        iframeHTML += '<base href="' + editor.documentBaseURI.getURI() + '" />';
+      }
+      iframeHTML += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
+      bodyId = getBodyId(editor);
+      bodyClass = getBodyClass(editor);
+      if (getContentSecurityPolicy(editor)) {
+        iframeHTML += '<meta http-equiv="Content-Security-Policy" content="' + getContentSecurityPolicy(editor) + '" />';
+      }
+      iframeHTML += '</head><body id="' + bodyId + '" class="mce-content-body ' + bodyClass + '" data-id="' + editor.id + '"><br></body></html>';
+      return iframeHTML;
+    };
+    var createIframe = function (editor, o) {
+      var title = editor.editorManager.translate('Rich Text Area. Press ALT-0 for help.');
+      var ifr = createIframeElement(editor.id, title, o.height, getIframeAttrs(editor)).dom();
+      ifr.onload = function () {
+        ifr.onload = null;
+        editor.fire('load');
+      };
+      var isDomainRelaxed = relaxDomain(editor, ifr);
+      editor.contentAreaContainer = o.iframeContainer;
+      editor.iframeElement = ifr;
+      editor.iframeHTML = getIframeHtml(editor);
+      DOM$5.add(o.iframeContainer, ifr);
+      return isDomainRelaxed;
+    };
+    var init$1 = function (editor, boxInfo) {
+      var isDomainRelaxed = createIframe(editor, boxInfo);
+      if (boxInfo.editorContainer) {
+        DOM$5.get(boxInfo.editorContainer).style.display = editor.orgDisplay;
+        editor.hidden = DOM$5.isHidden(boxInfo.editorContainer);
+      }
+      editor.getElement().style.display = 'none';
+      DOM$5.setAttrib(editor.id, 'aria-hidden', 'true');
+      if (!isDomainRelaxed) {
+        initContentBody(editor);
+      }
+    };
+
+    var DOM$6 = DOMUtils$1.DOM;
+    var initPlugin = function (editor, initializedPlugins, plugin) {
+      var Plugin = PluginManager.get(plugin);
+      var pluginUrl = PluginManager.urls[plugin] || editor.documentBaseUrl.replace(/\/$/, '');
+      plugin = Tools.trim(plugin);
+      if (Plugin && Tools.inArray(initializedPlugins, plugin) === -1) {
+        Tools.each(PluginManager.dependencies(plugin), function (dep) {
+          initPlugin(editor, initializedPlugins, dep);
+        });
+        if (editor.plugins[plugin]) {
+          return;
+        }
+        try {
+          var pluginInstance = new Plugin(editor, pluginUrl, editor.$);
+          editor.plugins[plugin] = pluginInstance;
+          if (pluginInstance.init) {
+            pluginInstance.init(editor, pluginUrl);
+            initializedPlugins.push(plugin);
+          }
+        } catch (e) {
+          pluginInitError(editor, plugin, e);
+        }
+      }
+    };
+    var trimLegacyPrefix = function (name) {
+      return name.replace(/^\-/, '');
+    };
+    var initPlugins = function (editor) {
+      var initializedPlugins = [];
+      Tools.each(editor.settings.plugins.split(/[ ,]/), function (name) {
+        initPlugin(editor, initializedPlugins, trimLegacyPrefix(name));
+      });
+    };
+    var initIcons = function (editor) {
+      var iconPackName = Tools.trim(getIconPackName(editor));
+      var currentIcons = editor.ui.registry.getAll().icons;
+      var loadIcons = __assign(__assign({}, IconManager.get('default').icons), IconManager.get(iconPackName).icons);
+      each$1(loadIcons, function (svgData, icon) {
+        if (!has(currentIcons, icon)) {
+          editor.ui.registry.addIcon(icon, svgData);
+        }
+      });
+    };
+    var initTheme = function (editor) {
+      var theme = editor.settings.theme;
+      if (isString(theme)) {
+        editor.settings.theme = trimLegacyPrefix(theme);
+        var Theme = ThemeManager.get(theme);
+        editor.theme = new Theme(editor, ThemeManager.urls[theme]);
+        if (editor.theme.init) {
+          editor.theme.init(editor, ThemeManager.urls[theme] || editor.documentBaseUrl.replace(/\/$/, ''), editor.$);
+        }
+      } else {
+        editor.theme = {};
+      }
+    };
+    var renderFromLoadedTheme = function (editor) {
+      return editor.theme.renderUI();
+    };
+    var renderFromThemeFunc = function (editor) {
+      var elm = editor.getElement();
+      var theme = editor.settings.theme;
+      var info = theme(editor, elm);
+      if (info.editorContainer.nodeType) {
+        info.editorContainer.id = info.editorContainer.id || editor.id + '_parent';
+      }
+      if (info.iframeContainer && info.iframeContainer.nodeType) {
+        info.iframeContainer.id = info.iframeContainer.id || editor.id + '_iframecontainer';
+      }
+      info.height = info.iframeHeight ? info.iframeHeight : elm.offsetHeight;
+      return info;
+    };
+    var createThemeFalseResult = function (element) {
+      return {
+        editorContainer: element,
+        iframeContainer: element
+      };
+    };
+    var renderThemeFalseIframe = function (targetElement) {
+      var iframeContainer = DOM$6.create('div');
+      DOM$6.insertAfter(iframeContainer, targetElement);
+      return createThemeFalseResult(iframeContainer);
+    };
+    var renderThemeFalse = function (editor) {
+      var targetElement = editor.getElement();
+      return editor.inline ? createThemeFalseResult(null) : renderThemeFalseIframe(targetElement);
+    };
+    var renderThemeUi = function (editor) {
+      var elm = editor.getElement();
+      editor.orgDisplay = elm.style.display;
+      if (isString(editor.settings.theme)) {
+        return renderFromLoadedTheme(editor);
+      } else if (isFunction(editor.settings.theme)) {
+        return renderFromThemeFunc(editor);
+      } else {
+        return renderThemeFalse(editor);
+      }
+    };
+    var init$2 = function (editor) {
+      editor.fire('ScriptsLoaded');
+      initIcons(editor);
+      initTheme(editor);
+      initPlugins(editor);
+      var boxInfo = renderThemeUi(editor);
+      editor.editorContainer = boxInfo.editorContainer ? boxInfo.editorContainer : null;
+      appendContentCssFromSettings(editor);
+      if (editor.inline) {
+        return initContentBody(editor);
+      } else {
+        return init$1(editor, boxInfo);
+      }
+    };
+
+    var DOM$7 = DOMUtils$1.DOM;
+    var hasSkipLoadPrefix = function (name) {
+      return name.charAt(0) === '-';
+    };
+    var loadLanguage = function (scriptLoader, editor) {
+      var languageCode = getLanguageCode(editor);
+      var languageUrl = getLanguageUrl(editor);
+      if (I18n.hasCode(languageCode) === false && languageCode !== 'en') {
+        var url_1 = languageUrl !== '' ? languageUrl : editor.editorManager.baseURL + '/langs/' + languageCode + '.js';
+        scriptLoader.add(url_1, noop, undefined, function () {
+          languageLoadError(editor, url_1, languageCode);
+        });
+      }
+    };
+    var loadTheme = function (scriptLoader, editor, suffix, callback) {
+      var settings = editor.settings, theme = settings.theme;
+      if (isString(theme)) {
+        if (!hasSkipLoadPrefix(theme) && !ThemeManager.urls.hasOwnProperty(theme)) {
+          var themeUrl = settings.theme_url;
+          if (themeUrl) {
+            ThemeManager.load(theme, editor.documentBaseURI.toAbsolute(themeUrl));
+          } else {
+            ThemeManager.load(theme, 'themes/' + theme + '/theme' + suffix + '.js');
+          }
+        }
+        scriptLoader.loadQueue(function () {
+          ThemeManager.waitFor(theme, callback);
+        });
+      } else {
+        callback();
+      }
+    };
+    var getIconsUrlMetaFromUrl = function (editor) {
+      return Option.from(getIconsUrl(editor)).filter(function (url) {
+        return url.length > 0;
+      }).map(function (url) {
+        return {
+          url: url,
+          name: Option.none()
+        };
+      });
+    };
+    var getIconsUrlMetaFromName = function (editor, name, suffix) {
+      return Option.from(name).filter(function (name) {
+        return name.length > 0 && !IconManager.has(name);
+      }).map(function (name) {
+        return {
+          url: editor.editorManager.baseURL + '/icons/' + name + '/icons' + suffix + '.js',
+          name: Option.some(name)
+        };
+      });
+    };
+    var loadIcons = function (scriptLoader, editor, suffix) {
+      var defaultIconsUrl = getIconsUrlMetaFromName(editor, 'default', suffix);
+      var customIconsUrl = getIconsUrlMetaFromUrl(editor).orThunk(function () {
+        return getIconsUrlMetaFromName(editor, getIconPackName(editor), '');
+      });
+      each(cat([
+        defaultIconsUrl,
+        customIconsUrl
+      ]), function (urlMeta) {
+        scriptLoader.add(urlMeta.url, noop, undefined, function () {
+          iconsLoadError(editor, urlMeta.url, urlMeta.name.getOrUndefined());
+        });
+      });
+    };
+    var loadPlugins = function (editor, settings, suffix) {
+      if (isArray(settings.plugins)) {
+        settings.plugins = settings.plugins.join(' ');
+      }
+      Tools.each(settings.external_plugins, function (url, name) {
+        PluginManager.load(name, url, noop, undefined, function () {
+          pluginLoadError(editor, url, name);
+        });
+        settings.plugins += ' ' + name;
+      });
+      Tools.each(settings.plugins.split(/[ ,]/), function (plugin) {
+        plugin = Tools.trim(plugin);
+        if (plugin && !PluginManager.urls[plugin]) {
+          if (hasSkipLoadPrefix(plugin)) {
+            plugin = plugin.substr(1, plugin.length);
+            var dependencies = PluginManager.dependencies(plugin);
+            Tools.each(dependencies, function (depPlugin) {
+              var defaultSettings = {
+                prefix: 'plugins/',
+                resource: depPlugin,
+                suffix: '/plugin' + suffix + '.js'
+              };
+              var dep = PluginManager.createUrl(defaultSettings, depPlugin);
+              PluginManager.load(dep.resource, dep, noop, undefined, function () {
+                pluginLoadError(editor, dep.prefix + dep.resource + dep.suffix, dep.resource);
+              });
+            });
+          } else {
+            var url_2 = {
+              prefix: 'plugins/',
+              resource: plugin,
+              suffix: '/plugin' + suffix + '.js'
+            };
+            PluginManager.load(plugin, url_2, noop, undefined, function () {
+              pluginLoadError(editor, url_2.prefix + url_2.resource + url_2.suffix, plugin);
+            });
+          }
+        }
+      });
+    };
+    var loadScripts = function (editor, suffix) {
+      var scriptLoader = ScriptLoader.ScriptLoader;
+      loadTheme(scriptLoader, editor, suffix, function () {
+        loadLanguage(scriptLoader, editor);
+        loadIcons(scriptLoader, editor, suffix);
+        loadPlugins(editor, editor.settings, suffix);
+        scriptLoader.loadQueue(function () {
+          if (!editor.removed) {
+            init$2(editor);
+          }
+        }, editor, function () {
+          if (!editor.removed) {
+            init$2(editor);
+          }
+        });
+      });
+    };
+    var render = function (editor) {
+      var settings = editor.settings, id = editor.id;
+      I18n.setCode(getLanguageCode(editor));
+      var readyHandler = function () {
+        DOM$7.unbind(domGlobals.window, 'ready', readyHandler);
+        editor.render();
+      };
+      if (!EventUtils.Event.domLoaded) {
+        DOM$7.bind(domGlobals.window, 'ready', readyHandler);
+        return;
+      }
+      if (!editor.getElement()) {
+        return;
+      }
+      if (!Env.contentEditable) {
+        return;
+      }
+      if (!settings.inline) {
+        editor.orgVisibility = editor.getElement().style.visibility;
+        editor.getElement().style.visibility = 'hidden';
+      } else {
+        editor.inline = true;
+      }
+      var form = editor.getElement().form || DOM$7.getParent(id, 'form');
+      if (form) {
+        editor.formElement = form;
+        if (settings.hidden_input && !isTextareaOrInput(editor.getElement())) {
+          DOM$7.insertAfter(DOM$7.create('input', {
+            type: 'hidden',
+            name: id
+          }), id);
+          editor.hasHiddenInput = true;
+        }
+        editor.formEventDelegate = function (e) {
+          editor.fire(e.type, e);
+        };
+        DOM$7.bind(form, 'submit reset', editor.formEventDelegate);
+        editor.on('reset', function () {
+          editor.resetContent();
+        });
+        if (settings.submit_patch && !form.submit.nodeType && !form.submit.length && !form._mceOldSubmit) {
+          form._mceOldSubmit = form.submit;
+          form.submit = function () {
+            editor.editorManager.triggerSave();
+            editor.setDirty(false);
+            return form._mceOldSubmit(form);
+          };
+        }
+      }
+      editor.windowManager = WindowManager(editor);
+      editor.notificationManager = NotificationManager(editor);
+      if (settings.encoding === 'xml') {
+        editor.on('GetContent', function (e) {
+          if (e.save) {
+            e.content = DOM$7.encode(e.content);
+          }
+        });
+      }
+      if (settings.add_form_submit_trigger) {
+        editor.on('submit', function () {
+          if (editor.initialized) {
+            editor.save();
+          }
+        });
+      }
+      if (settings.add_unload_trigger) {
+        editor._beforeUnload = function () {
+          if (editor.initialized && !editor.destroyed && !editor.isHidden()) {
+            editor.save({
+              format: 'raw',
+              no_events: true,
+              set_dirty: false
+            });
+          }
+        };
+        editor.editorManager.on('BeforeUnload', editor._beforeUnload);
+      }
+      editor.editorManager.add(editor);
+      loadScripts(editor, editor.suffix);
+    };
+
+    var processValue = function (value) {
+      var details;
+      if (typeof value !== 'string') {
+        details = Tools.extend({
+          paste: value.paste,
+          data: { paste: value.paste }
+        }, value);
+        return {
+          content: value.content,
+          details: details
+        };
+      }
+      return {
+        content: value,
+        details: {}
+      };
+    };
+    var insertAtCaret$1 = function (editor, value) {
+      var result = processValue(value);
+      insertContent(editor, result.content, result.details);
+    };
+
+    var nativeCommand = function (editor, command) {
+      editor.getDoc().execCommand(command, false, null);
+    };
+    var deleteCommand = function (editor) {
+      if (backspaceDelete$8(editor)) {
+        return;
+      } else if (backspaceDelete$3(editor, false)) {
+        return;
+      } else if (backspaceDelete$4(editor, false)) {
+        return;
+      } else if (backspaceDelete$5(editor, false)) {
+        return;
+      } else if (backspaceDelete$1(editor, false)) {
+        return;
+      } else if (backspaceDelete(editor)) {
+        return;
+      } else if (backspaceDelete$2(editor)) {
+        return;
+      } else if (backspaceDelete$6(editor, false)) {
+        return;
+      } else {
+        nativeCommand(editor, 'Delete');
+        paddEmptyBody(editor);
+      }
+    };
+    var forwardDeleteCommand = function (editor) {
+      if (backspaceDelete$3(editor, true)) {
+        return;
+      } else if (backspaceDelete$4(editor, true)) {
+        return;
+      } else if (backspaceDelete$5(editor, true)) {
+        return;
+      } else if (backspaceDelete$1(editor, true)) {
+        return;
+      } else if (backspaceDelete(editor)) {
+        return;
+      } else if (backspaceDelete$2(editor)) {
+        return;
+      } else if (backspaceDelete$6(editor, true)) {
+        return;
+      } else {
+        nativeCommand(editor, 'ForwardDelete');
+      }
+    };
+
+    var ensureIsRoot = function (isRoot) {
+      return isFunction(isRoot) ? isRoot : constant(false);
+    };
+    var ancestor$3 = function (scope, transform, isRoot) {
+      var element = scope.dom();
+      var stop = ensureIsRoot(isRoot);
+      while (element.parentNode) {
+        element = element.parentNode;
+        var el = Element.fromDom(element);
+        var transformed = transform(el);
+        if (transformed.isSome()) {
+          return transformed;
+        } else if (stop(el)) {
+          break;
+        }
+      }
+      return Option.none();
+    };
+    var closest$2 = function (scope, transform, isRoot) {
+      var current = transform(scope);
+      var stop = ensureIsRoot(isRoot);
+      return current.orThunk(function () {
+        return stop(scope) ? Option.none() : ancestor$3(scope, transform, stop);
+      });
+    };
+
+    var legacyPropNames = {
+      'font-size': 'size',
+      'font-family': 'face'
+    };
+    var getSpecifiedFontProp = function (propName, rootElm, elm) {
+      var getProperty = function (elm) {
+        return getRaw(elm, propName).orThunk(function () {
+          if (name(elm) === 'font') {
+            return get(legacyPropNames, propName).bind(function (legacyPropName) {
+              return getOpt(elm, legacyPropName);
+            });
+          } else {
+            return Option.none();
+          }
+        });
+      };
+      var isRoot = function (elm) {
+        return eq$2(Element.fromDom(rootElm), elm);
+      };
+      return closest$2(Element.fromDom(elm), function (elm) {
+        return getProperty(elm);
+      }, isRoot);
+    };
+    var normalizeFontFamily = function (fontFamily) {
+      return fontFamily.replace(/[\'\"\\]/g, '').replace(/,\s+/g, ',');
+    };
+    var getComputedFontProp = function (propName, elm) {
+      return Option.from(DOMUtils$1.DOM.getStyle(elm, propName, true));
+    };
+    var getFontProp = function (propName) {
+      return function (rootElm, elm) {
+        return Option.from(elm).map(Element.fromDom).filter(isElement).bind(function (element) {
+          return getSpecifiedFontProp(propName, rootElm, element.dom()).or(getComputedFontProp(propName, element.dom()));
+        }).getOr('');
+      };
+    };
+    var getFontSize = getFontProp('font-size');
+    var getFontFamily = compose(normalizeFontFamily, getFontProp('font-family'));
+
+    var findFirstCaretElement = function (editor) {
+      return firstPositionIn(editor.getBody()).map(function (caret) {
+        var container = caret.container();
+        return isText$1(container) ? container.parentNode : container;
+      });
+    };
+    var isRangeAtStartOfNode = function (rng, root) {
+      return rng.startContainer === root && rng.startOffset === 0;
+    };
+    var getCaretElement = function (editor) {
+      return Option.from(editor.selection.getRng()).bind(function (rng) {
+        var root = editor.getBody();
+        return isRangeAtStartOfNode(rng, root) ? Option.none() : Option.from(editor.selection.getStart(true));
+      });
+    };
+    var fromFontSizeNumber = function (editor, value) {
+      if (/^[0-9\.]+$/.test(value)) {
+        var fontSizeNumber = parseInt(value, 10);
+        if (fontSizeNumber >= 1 && fontSizeNumber <= 7) {
+          var fontSizes = getFontStyleValues(editor);
+          var fontClasses = getFontSizeClasses(editor);
+          if (fontClasses) {
+            return fontClasses[fontSizeNumber - 1] || value;
+          } else {
+            return fontSizes[fontSizeNumber - 1] || value;
+          }
+        } else {
+          return value;
+        }
+      } else {
+        return value;
+      }
+    };
+    var normalizeFontNames = function (font) {
+      var fonts = font.split(/\s*,\s*/);
+      return map(fonts, function (font) {
+        if (font.indexOf(' ') !== -1 && !(startsWith(font, '"') || startsWith(font, '\''))) {
+          return '\'' + font + '\'';
+        } else {
+          return font;
+        }
+      }).join(',');
+    };
+    var fontNameAction = function (editor, value) {
+      var font = fromFontSizeNumber(editor, value);
+      editor.formatter.toggle('fontname', { value: normalizeFontNames(font) });
+      editor.nodeChanged();
+    };
+    var fontNameQuery = function (editor) {
+      return getCaretElement(editor).fold(function () {
+        return findFirstCaretElement(editor).map(function (caretElement) {
+          return getFontFamily(editor.getBody(), caretElement);
+        }).getOr('');
+      }, function (caretElement) {
+        return getFontFamily(editor.getBody(), caretElement);
+      });
+    };
+    var fontSizeAction = function (editor, value) {
+      editor.formatter.toggle('fontsize', { value: fromFontSizeNumber(editor, value) });
+      editor.nodeChanged();
+    };
+    var fontSizeQuery = function (editor) {
+      return getCaretElement(editor).fold(function () {
+        return findFirstCaretElement(editor).map(function (caretElement) {
+          return getFontSize(editor.getBody(), caretElement);
+        }).getOr('');
+      }, function (caretElement) {
+        return getFontSize(editor.getBody(), caretElement);
+      });
+    };
+
+    var each$e = Tools.each;
+    var map$3 = Tools.map, inArray$2 = Tools.inArray;
+    var EditorCommands = function () {
+      function EditorCommands(editor) {
+        this.commands = {
+          state: {},
+          exec: {},
+          value: {}
+        };
+        this.editor = editor;
+        this.setupCommands(editor);
+      }
+      EditorCommands.prototype.execCommand = function (command, ui, value, args) {
+        var func, customCommand, state = false;
+        var self = this;
+        if (self.editor.removed) {
+          return;
+        }
+        if (!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(command) && (!args || !args.skip_focus)) {
+          self.editor.focus();
+        } else {
+          restore(self.editor);
+        }
+        args = self.editor.fire('BeforeExecCommand', {
+          command: command,
+          ui: ui,
+          value: value
+        });
+        if (args.isDefaultPrevented()) {
+          return false;
+        }
+        customCommand = command.toLowerCase();
+        if (func = self.commands.exec[customCommand]) {
+          func(customCommand, ui, value);
+          self.editor.fire('ExecCommand', {
+            command: command,
+            ui: ui,
+            value: value
+          });
+          return true;
+        }
+        each$e(this.editor.plugins, function (p) {
+          if (p.execCommand && p.execCommand(command, ui, value)) {
+            self.editor.fire('ExecCommand', {
+              command: command,
+              ui: ui,
+              value: value
+            });
+            state = true;
+            return false;
+          }
+        });
+        if (state) {
+          return state;
+        }
+        if (self.editor.theme && self.editor.theme.execCommand && self.editor.theme.execCommand(command, ui, value)) {
+          self.editor.fire('ExecCommand', {
+            command: command,
+            ui: ui,
+            value: value
+          });
+          return true;
+        }
+        try {
+          state = self.editor.getDoc().execCommand(command, ui, value);
+        } catch (ex) {
+        }
+        if (state) {
+          self.editor.fire('ExecCommand', {
+            command: command,
+            ui: ui,
+            value: value
+          });
+          return true;
+        }
+        return false;
+      };
+      EditorCommands.prototype.queryCommandState = function (command) {
+        var func;
+        if (this.editor.quirks.isHidden() || this.editor.removed) {
+          return;
+        }
+        command = command.toLowerCase();
+        if (func = this.commands.state[command]) {
+          return func(command);
+        }
+        try {
+          return this.editor.getDoc().queryCommandState(command);
+        } catch (ex) {
+        }
+        return false;
+      };
+      EditorCommands.prototype.queryCommandValue = function (command) {
+        var func;
+        if (this.editor.quirks.isHidden() || this.editor.removed) {
+          return;
+        }
+        command = command.toLowerCase();
+        if (func = this.commands.value[command]) {
+          return func(command);
+        }
+        try {
+          return this.editor.getDoc().queryCommandValue(command);
+        } catch (ex) {
+        }
+      };
+      EditorCommands.prototype.addCommands = function (commandList, type) {
+        var self = this;
+        type = type || 'exec';
+        each$e(commandList, function (callback, command) {
+          each$e(command.toLowerCase().split(','), function (command) {
+            self.commands[type][command] = callback;
+          });
+        });
+      };
+      EditorCommands.prototype.addCommand = function (command, callback, scope) {
+        var _this = this;
+        command = command.toLowerCase();
+        this.commands.exec[command] = function (command, ui, value, args) {
+          return callback.call(scope || _this.editor, ui, value, args);
+        };
+      };
+      EditorCommands.prototype.queryCommandSupported = function (command) {
+        command = command.toLowerCase();
+        if (this.commands.exec[command]) {
+          return true;
+        }
+        try {
+          return this.editor.getDoc().queryCommandSupported(command);
+        } catch (ex) {
+        }
+        return false;
+      };
+      EditorCommands.prototype.addQueryStateHandler = function (command, callback, scope) {
+        var _this = this;
+        command = command.toLowerCase();
+        this.commands.state[command] = function () {
+          return callback.call(scope || _this.editor);
+        };
+      };
+      EditorCommands.prototype.addQueryValueHandler = function (command, callback, scope) {
+        var _this = this;
+        command = command.toLowerCase();
+        this.commands.value[command] = function () {
+          return callback.call(scope || _this.editor);
+        };
+      };
+      EditorCommands.prototype.hasCustomCommand = function (command) {
+        command = command.toLowerCase();
+        return !!this.commands.exec[command];
+      };
+      EditorCommands.prototype.execNativeCommand = function (command, ui, value) {
+        if (ui === undefined) {
+          ui = false;
+        }
+        if (value === undefined) {
+          value = null;
+        }
+        return this.editor.getDoc().execCommand(command, ui, value);
+      };
+      EditorCommands.prototype.isFormatMatch = function (name) {
+        return this.editor.formatter.match(name);
+      };
+      EditorCommands.prototype.toggleFormat = function (name, value) {
+        this.editor.formatter.toggle(name, value ? { value: value } : undefined);
+        this.editor.nodeChanged();
+      };
+      EditorCommands.prototype.storeSelection = function (type) {
+        this.selectionBookmark = this.editor.selection.getBookmark(type);
+      };
+      EditorCommands.prototype.restoreSelection = function () {
+        this.editor.selection.moveToBookmark(this.selectionBookmark);
+      };
+      EditorCommands.prototype.setupCommands = function (editor) {
+        var self = this;
+        this.addCommands({
+          'mceResetDesignMode,mceBeginUndoLevel': function () {
+          },
+          'mceEndUndoLevel,mceAddUndoLevel': function () {
+            editor.undoManager.add();
+          },
+          'Cut,Copy,Paste': function (command) {
+            var doc = editor.getDoc();
+            var failed;
+            try {
+              self.execNativeCommand(command);
+            } catch (ex) {
+              failed = true;
+            }
+            if (command === 'paste' && !doc.queryCommandEnabled(command)) {
+              failed = true;
+            }
+            if (failed || !doc.queryCommandSupported(command)) {
+              var msg = editor.translate('Your browser doesn\'t support direct access to the clipboard. ' + 'Please use the Ctrl+X/C/V keyboard shortcuts instead.');
+              if (Env.mac) {
+                msg = msg.replace(/Ctrl\+/g, '\u2318+');
+              }
+              editor.notificationManager.open({
+                text: msg,
+                type: 'error'
+              });
+            }
+          },
+          'unlink': function () {
+            if (editor.selection.isCollapsed()) {
+              var elm = editor.dom.getParent(editor.selection.getStart(), 'a');
+              if (elm) {
+                editor.dom.remove(elm, true);
+              }
+              return;
+            }
+            editor.formatter.remove('link');
+          },
+          'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone': function (command) {
+            var align = command.substring(7);
+            if (align === 'full') {
+              align = 'justify';
+            }
+            each$e('left,center,right,justify'.split(','), function (name) {
+              if (align !== name) {
+                editor.formatter.remove('align' + name);
+              }
+            });
+            if (align !== 'none') {
+              self.toggleFormat('align' + align);
+            }
+          },
+          'InsertUnorderedList,InsertOrderedList': function (command) {
+            var listElm, listParent;
+            self.execNativeCommand(command);
+            listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');
+            if (listElm) {
+              listParent = listElm.parentNode;
+              if (/^(H[1-6]|P|ADDRESS|PRE)$/.test(listParent.nodeName)) {
+                self.storeSelection();
+                editor.dom.split(listParent, listElm);
+                self.restoreSelection();
+              }
+            }
+          },
+          'Bold,Italic,Underline,Strikethrough,Superscript,Subscript': function (command) {
+            self.toggleFormat(command);
+          },
+          'ForeColor,HiliteColor': function (command, ui, value) {
+            self.toggleFormat(command, value);
+          },
+          'FontName': function (command, ui, value) {
+            fontNameAction(editor, value);
+          },
+          'FontSize': function (command, ui, value) {
+            fontSizeAction(editor, value);
+          },
+          'RemoveFormat': function (command) {
+            editor.formatter.remove(command);
+          },
+          'mceBlockQuote': function () {
+            self.toggleFormat('blockquote');
+          },
+          'FormatBlock': function (command, ui, value) {
+            return self.toggleFormat(value || 'p');
+          },
+          'mceCleanup': function () {
+            var bookmark = editor.selection.getBookmark();
+            editor.setContent(editor.getContent());
+            editor.selection.moveToBookmark(bookmark);
+          },
+          'mceRemoveNode': function (command, ui, value) {
+            var node = value || editor.selection.getNode();
+            if (node !== editor.getBody()) {
+              self.storeSelection();
+              editor.dom.remove(node, true);
+              self.restoreSelection();
+            }
+          },
+          'mceSelectNodeDepth': function (command, ui, value) {
+            var counter = 0;
+            editor.dom.getParent(editor.selection.getNode(), function (node) {
+              if (node.nodeType === 1 && counter++ === value) {
+                editor.selection.select(node);
+                return false;
+              }
+            }, editor.getBody());
+          },
+          'mceSelectNode': function (command, ui, value) {
+            editor.selection.select(value);
+          },
+          'mceInsertContent': function (command, ui, value) {
+            insertAtCaret$1(editor, value);
+          },
+          'mceInsertRawHTML': function (command, ui, value) {
+            editor.selection.setContent('tiny_mce_marker');
+            var content = editor.getContent();
+            editor.setContent(content.replace(/tiny_mce_marker/g, function () {
+              return value;
+            }));
+          },
+          'mceInsertNewLine': function (command, ui, value) {
+            insert$3(editor, value);
+          },
+          'mceToggleFormat': function (command, ui, value) {
+            self.toggleFormat(value);
+          },
+          'mceSetContent': function (command, ui, value) {
+            editor.setContent(value);
+          },
+          'Indent,Outdent': function (command) {
+            handle(editor, command);
+          },
+          'mceRepaint': function () {
+          },
+          'InsertHorizontalRule': function () {
+            editor.execCommand('mceInsertContent', false, '<hr />');
+          },
+          'mceToggleVisualAid': function () {
+            editor.hasVisual = !editor.hasVisual;
+            editor.addVisual();
+          },
+          'mceReplaceContent': function (command, ui, value) {
+            editor.execCommand('mceInsertContent', false, value.replace(/\{\$selection\}/g, editor.selection.getContent({ format: 'text' })));
+          },
+          'mceInsertLink': function (command, ui, value) {
+            var anchor;
+            if (typeof value === 'string') {
+              value = { href: value };
+            }
+            anchor = editor.dom.getParent(editor.selection.getNode(), 'a');
+            value.href = value.href.replace(/ /g, '%20');
+            if (!anchor || !value.href) {
+              editor.formatter.remove('link');
+            }
+            if (value.href) {
+              editor.formatter.apply('link', value, anchor);
+            }
+          },
+          'selectAll': function () {
+            var editingHost = editor.dom.getParent(editor.selection.getStart(), isContentEditableTrue);
+            if (editingHost) {
+              var rng = editor.dom.createRng();
+              rng.selectNodeContents(editingHost);
+              editor.selection.setRng(rng);
+            }
+          },
+          'delete': function () {
+            deleteCommand(editor);
+          },
+          'forwardDelete': function () {
+            forwardDeleteCommand(editor);
+          },
+          'mceNewDocument': function () {
+            editor.setContent('');
+          },
+          'InsertLineBreak': function (command, ui, value) {
+            insert$2(editor, value);
+            return true;
+          }
+        });
+        var alignStates = function (name) {
+          return function () {
+            var nodes = editor.selection.isCollapsed() ? [editor.dom.getParent(editor.selection.getNode(), editor.dom.isBlock)] : editor.selection.getSelectedBlocks();
+            var matches = map$3(nodes, function (node) {
+              return !!editor.formatter.matchNode(node, name);
+            });
+            return inArray$2(matches, true) !== -1;
+          };
+        };
+        self.addCommands({
+          'JustifyLeft': alignStates('alignleft'),
+          'JustifyCenter': alignStates('aligncenter'),
+          'JustifyRight': alignStates('alignright'),
+          'JustifyFull': alignStates('alignjustify'),
+          'Bold,Italic,Underline,Strikethrough,Superscript,Subscript': function (command) {
+            return self.isFormatMatch(command);
+          },
+          'mceBlockQuote': function () {
+            return self.isFormatMatch('blockquote');
+          },
+          'Outdent': function () {
+            return canOutdent(editor);
+          },
+          'InsertUnorderedList,InsertOrderedList': function (command) {
+            var list = editor.dom.getParent(editor.selection.getNode(), 'ul,ol');
+            return list && (command === 'insertunorderedlist' && list.tagName === 'UL' || command === 'insertorderedlist' && list.tagName === 'OL');
+          }
+        }, 'state');
+        self.addCommands({
+          Undo: function () {
+            editor.undoManager.undo();
+          },
+          Redo: function () {
+            editor.undoManager.redo();
+          }
+        });
+        self.addQueryValueHandler('FontName', function () {
+          return fontNameQuery(editor);
+        }, this);
+        self.addQueryValueHandler('FontSize', function () {
+          return fontSizeQuery(editor);
+        }, this);
+      };
+      return EditorCommands;
+    }();
+
+    var nativeEvents = Tools.makeMap('focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange ' + 'mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover ' + 'draggesture dragdrop drop drag submit ' + 'compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel', ' ');
+    var EventDispatcher = function () {
+      function EventDispatcher(settings) {
+        this.bindings = {};
+        this.settings = settings || {};
+        this.scope = this.settings.scope || this;
+        this.toggleEvent = this.settings.toggleEvent || never;
+      }
+      EventDispatcher.isNative = function (name) {
+        return !!nativeEvents[name.toLowerCase()];
+      };
+      EventDispatcher.prototype.fire = function (name, args) {
+        var handlers, i, l, callback;
+        name = name.toLowerCase();
+        args = args || {};
+        args.type = name;
+        if (!args.target) {
+          args.target = this.scope;
+        }
+        if (!args.preventDefault) {
+          args.preventDefault = function () {
+            args.isDefaultPrevented = always;
+          };
+          args.stopPropagation = function () {
+            args.isPropagationStopped = always;
+          };
+          args.stopImmediatePropagation = function () {
+            args.isImmediatePropagationStopped = always;
+          };
+          args.isDefaultPrevented = never;
+          args.isPropagationStopped = never;
+          args.isImmediatePropagationStopped = never;
+        }
+        if (this.settings.beforeFire) {
+          this.settings.beforeFire(args);
+        }
+        handlers = this.bindings[name];
+        if (handlers) {
+          for (i = 0, l = handlers.length; i < l; i++) {
+            callback = handlers[i];
+            if (callback.once) {
+              this.off(name, callback.func);
+            }
+            if (args.isImmediatePropagationStopped()) {
+              args.stopPropagation();
+              return args;
+            }
+            if (callback.func.call(this.scope, args) === false) {
+              args.preventDefault();
+              return args;
+            }
+          }
+        }
+        return args;
+      };
+      EventDispatcher.prototype.on = function (name, callback, prepend, extra) {
+        var handlers, names, i;
+        if (callback === false) {
+          callback = never;
+        }
+        if (callback) {
+          var wrappedCallback = { func: callback };
+          if (extra) {
+            Tools.extend(wrappedCallback, extra);
+          }
+          names = name.toLowerCase().split(' ');
+          i = names.length;
+          while (i--) {
+            name = names[i];
+            handlers = this.bindings[name];
+            if (!handlers) {
+              handlers = this.bindings[name] = [];
+              this.toggleEvent(name, true);
+            }
+            if (prepend) {
+              handlers.unshift(wrappedCallback);
+            } else {
+              handlers.push(wrappedCallback);
+            }
+          }
+        }
+        return this;
+      };
+      EventDispatcher.prototype.off = function (name, callback) {
+        var _this = this;
+        var i, handlers, names, hi;
+        if (name) {
+          names = name.toLowerCase().split(' ');
+          i = names.length;
+          while (i--) {
+            name = names[i];
+            handlers = this.bindings[name];
+            if (!name) {
+              each$1(this.bindings, function (_value, bindingName) {
+                _this.toggleEvent(bindingName, false);
+                delete _this.bindings[bindingName];
+              });
+              return this;
+            }
+            if (handlers) {
+              if (!callback) {
+                handlers.length = 0;
+              } else {
+                hi = handlers.length;
+                while (hi--) {
+                  if (handlers[hi].func === callback) {
+                    handlers = handlers.slice(0, hi).concat(handlers.slice(hi + 1));
+                    this.bindings[name] = handlers;
+                  }
+                }
+              }
+              if (!handlers.length) {
+                this.toggleEvent(name, false);
+                delete this.bindings[name];
+              }
+            }
+          }
+        } else {
+          each$1(this.bindings, function (_value, name) {
+            _this.toggleEvent(name, false);
+          });
+          this.bindings = {};
+        }
+        return this;
+      };
+      EventDispatcher.prototype.once = function (name, callback, prepend) {
+        return this.on(name, callback, prepend, { once: true });
+      };
+      EventDispatcher.prototype.has = function (name) {
+        name = name.toLowerCase();
+        return !(!this.bindings[name] || this.bindings[name].length === 0);
+      };
+      return EventDispatcher;
+    }();
+
+    var getEventDispatcher = function (obj) {
+      if (!obj._eventDispatcher) {
+        obj._eventDispatcher = new EventDispatcher({
+          scope: obj,
+          toggleEvent: function (name, state) {
+            if (EventDispatcher.isNative(name) && obj.toggleNativeEvent) {
+              obj.toggleNativeEvent(name, state);
+            }
+          }
+        });
+      }
+      return obj._eventDispatcher;
+    };
+    var Observable = {
+      fire: function (name, args, bubble) {
+        var self = this;
+        if (self.removed && name !== 'remove' && name !== 'detach') {
+          return args;
+        }
+        var dispatcherArgs = getEventDispatcher(self).fire(name, args);
+        if (bubble !== false && self.parent) {
+          var parent_1 = self.parent();
+          while (parent_1 && !dispatcherArgs.isPropagationStopped()) {
+            parent_1.fire(name, dispatcherArgs, false);
+            parent_1 = parent_1.parent();
+          }
+        }
+        return dispatcherArgs;
+      },
+      on: function (name, callback, prepend) {
+        return getEventDispatcher(this).on(name, callback, prepend);
+      },
+      off: function (name, callback) {
+        return getEventDispatcher(this).off(name, callback);
+      },
+      once: function (name, callback) {
+        return getEventDispatcher(this).once(name, callback);
+      },
+      hasEventListeners: function (name) {
+        return getEventDispatcher(this).has(name);
+      }
+    };
+
+    var internalContentEditableAttr = 'data-mce-contenteditable';
+    var toggleClass = function (elm, cls, state) {
+      if (has$2(elm, cls) && state === false) {
+        remove$4(elm, cls);
+      } else if (state) {
+        add$3(elm, cls);
+      }
+    };
+    var setEditorCommandState = function (editor, cmd, state) {
+      try {
+        editor.getDoc().execCommand(cmd, false, state);
+      } catch (ex) {
+      }
+    };
+    var setContentEditable = function (elm, state) {
+      elm.dom().contentEditable = state ? 'true' : 'false';
+    };
+    var switchOffContentEditableTrue = function (elm) {
+      each(descendants$1(elm, '*[contenteditable="true"]'), function (elm) {
+        set(elm, internalContentEditableAttr, 'true');
+        setContentEditable(elm, false);
+      });
+    };
+    var switchOnContentEditableTrue = function (elm) {
+      each(descendants$1(elm, '*[' + internalContentEditableAttr + '="true"]'), function (elm) {
+        remove$1(elm, internalContentEditableAttr);
+        setContentEditable(elm, true);
+      });
+    };
+    var removeFakeSelection = function (editor) {
+      Option.from(editor.selection.getNode()).each(function (elm) {
+        elm.removeAttribute('data-mce-selected');
+      });
+    };
+    var restoreFakeSelection = function (editor) {
+      editor.selection.setRng(editor.selection.getRng());
+    };
+    var toggleReadOnly = function (editor, state) {
+      var body = Element.fromDom(editor.getBody());
+      toggleClass(body, 'mce-content-readonly', state);
+      if (state) {
+        editor.selection.controlSelection.hideResizeRect();
+        editor._selectionOverrides.hideFakeCaret();
+        removeFakeSelection(editor);
+        editor.readonly = true;
+        setContentEditable(body, false);
+        switchOffContentEditableTrue(body);
+      } else {
+        editor.readonly = false;
+        setContentEditable(body, true);
+        switchOnContentEditableTrue(body);
+        setEditorCommandState(editor, 'StyleWithCSS', false);
+        setEditorCommandState(editor, 'enableInlineTableEditing', false);
+        setEditorCommandState(editor, 'enableObjectResizing', false);
+        if (hasEditorOrUiFocus(editor)) {
+          editor.focus();
+        }
+        restoreFakeSelection(editor);
+        editor.nodeChanged();
+      }
+    };
+    var isReadOnly = function (editor) {
+      return editor.readonly;
+    };
+    var registerFilters = function (editor) {
+      editor.parser.addAttributeFilter('contenteditable', function (nodes) {
+        if (isReadOnly(editor)) {
+          each(nodes, function (node) {
+            node.attr(internalContentEditableAttr, node.attr('contenteditable'));
+            node.attr('contenteditable', 'false');
+          });
+        }
+      });
+      editor.serializer.addAttributeFilter(internalContentEditableAttr, function (nodes) {
+        if (isReadOnly(editor)) {
+          each(nodes, function (node) {
+            node.attr('contenteditable', node.attr(internalContentEditableAttr));
+          });
+        }
+      });
+      editor.serializer.addTempAttr(internalContentEditableAttr);
+    };
+    var registerReadOnlyContentFilters = function (editor) {
+      if (editor.serializer) {
+        registerFilters(editor);
+      } else {
+        editor.on('PreInit', function () {
+          registerFilters(editor);
+        });
+      }
+    };
+    var isClickEvent = function (e) {
+      return e.type === 'click';
+    };
+    var isInAnchor = function (editor, target) {
+      return editor.dom.getParent(target, 'a') !== null;
+    };
+    var preventReadOnlyEvents = function (editor, e) {
+      var target = e.target;
+      if (isClickEvent(e) && !VK.metaKeyPressed(e) && isInAnchor(editor, target)) {
+        e.preventDefault();
+      }
+    };
+    var registerReadOnlySelectionBlockers = function (editor) {
+      editor.on('ShowCaret', function (e) {
+        if (isReadOnly(editor)) {
+          e.preventDefault();
+        }
+      });
+      editor.on('ObjectSelected', function (e) {
+        if (isReadOnly(editor)) {
+          e.preventDefault();
+        }
+      });
+    };
+
+    var DOM$8 = DOMUtils$1.DOM;
+    var customEventRootDelegates;
+    var getEventTarget = function (editor, eventName) {
+      if (eventName === 'selectionchange') {
+        return editor.getDoc();
+      }
+      if (!editor.inline && /^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(eventName)) {
+        return editor.getDoc().documentElement;
+      }
+      if (editor.settings.event_root) {
+        if (!editor.eventRoot) {
+          editor.eventRoot = DOM$8.select(editor.settings.event_root)[0];
+        }
+        return editor.eventRoot;
+      }
+      return editor.getBody();
+    };
+    var isListening = function (editor) {
+      return !editor.hidden && !isReadOnly(editor);
+    };
+    var fireEvent = function (editor, eventName, e) {
+      if (isListening(editor)) {
+        editor.fire(eventName, e);
+      } else if (isReadOnly(editor)) {
+        preventReadOnlyEvents(editor, e);
+      }
+    };
+    var bindEventDelegate = function (editor, eventName) {
+      var eventRootElm, delegate;
+      if (!editor.delegates) {
+        editor.delegates = {};
+      }
+      if (editor.delegates[eventName] || editor.removed) {
+        return;
+      }
+      eventRootElm = getEventTarget(editor, eventName);
+      if (editor.settings.event_root) {
+        if (!customEventRootDelegates) {
+          customEventRootDelegates = {};
+          editor.editorManager.on('removeEditor', function () {
+            if (!editor.editorManager.activeEditor) {
+              if (customEventRootDelegates) {
+                each$1(customEventRootDelegates, function (_value, name) {
+                  editor.dom.unbind(getEventTarget(editor, name));
+                });
+                customEventRootDelegates = null;
+              }
+            }
+          });
+        }
+        if (customEventRootDelegates[eventName]) {
+          return;
+        }
+        delegate = function (e) {
+          var target = e.target;
+          var editors = editor.editorManager.get();
+          var i = editors.length;
+          while (i--) {
+            var body = editors[i].getBody();
+            if (body === target || DOM$8.isChildOf(target, body)) {
+              fireEvent(editors[i], eventName, e);
+            }
+          }
+        };
+        customEventRootDelegates[eventName] = delegate;
+        DOM$8.bind(eventRootElm, eventName, delegate);
+      } else {
+        delegate = function (e) {
+          fireEvent(editor, eventName, e);
+        };
+        DOM$8.bind(eventRootElm, eventName, delegate);
+        editor.delegates[eventName] = delegate;
+      }
+    };
+    var EditorObservable = __assign(__assign({}, Observable), {
+      bindPendingEventDelegates: function () {
+        var self = this;
+        Tools.each(self._pendingNativeEvents, function (name) {
+          bindEventDelegate(self, name);
+        });
+      },
+      toggleNativeEvent: function (name, state) {
+        var self = this;
+        if (name === 'focus' || name === 'blur') {
+          return;
+        }
+        if (state) {
+          if (self.initialized) {
+            bindEventDelegate(self, name);
+          } else {
+            if (!self._pendingNativeEvents) {
+              self._pendingNativeEvents = [name];
+            } else {
+              self._pendingNativeEvents.push(name);
+            }
+          }
+        } else if (self.initialized) {
+          self.dom.unbind(getEventTarget(self, name), name, self.delegates[name]);
+          delete self.delegates[name];
+        }
+      },
+      unbindAllNativeEvents: function () {
+        var self = this;
+        var body = self.getBody();
+        var dom = self.dom;
+        if (self.delegates) {
+          each$1(self.delegates, function (value, name) {
+            self.dom.unbind(getEventTarget(self, name), name, value);
+          });
+          delete self.delegates;
+        }
+        if (!self.inline && body && dom) {
+          body.onload = null;
+          dom.unbind(self.getWin());
+          dom.unbind(self.getDoc());
+        }
+        if (dom) {
+          dom.unbind(body);
+          dom.unbind(self.getContainer());
+        }
+      }
+    });
+
+    var defaultModes = [
+      'design',
+      'readonly'
+    ];
+    var switchToMode = function (editor, activeMode, availableModes, mode) {
+      var oldMode = availableModes[activeMode.get()];
+      var newMode = availableModes[mode];
+      try {
+        newMode.activate();
+      } catch (e) {
+        domGlobals.console.error('problem while activating editor mode ' + mode + ':', e);
+        return;
+      }
+      oldMode.deactivate();
+      if (oldMode.editorReadOnly !== newMode.editorReadOnly) {
+        toggleReadOnly(editor, newMode.editorReadOnly);
+      }
+      activeMode.set(mode);
+      fireSwitchMode(editor, mode);
+    };
+    var setMode = function (editor, availableModes, activeMode, mode) {
+      if (mode === activeMode.get()) {
+        return;
+      } else if (!has(availableModes, mode)) {
+        throw new Error('Editor mode \'' + mode + '\' is invalid');
+      }
+      if (editor.initialized) {
+        switchToMode(editor, activeMode, availableModes, mode);
+      } else {
+        editor.on('init', function () {
+          return switchToMode(editor, activeMode, availableModes, mode);
+        });
+      }
+    };
+    var registerMode = function (availableModes, mode, api) {
+      var _a;
+      if (contains(defaultModes, mode)) {
+        throw new Error('Cannot override default mode ' + mode);
+      }
+      return __assign(__assign({}, availableModes), (_a = {}, _a[mode] = __assign(__assign({}, api), {
+        deactivate: function () {
+          try {
+            api.deactivate();
+          } catch (e) {
+            domGlobals.console.error('problem while deactivating editor mode ' + mode + ':', e);
+          }
+        }
+      }), _a));
+    };
+
+    var create$4 = function (editor) {
+      var activeMode = Cell('design');
+      var availableModes = Cell({
+        design: {
+          activate: noop,
+          deactivate: noop,
+          editorReadOnly: false
+        },
+        readonly: {
+          activate: noop,
+          deactivate: noop,
+          editorReadOnly: true
+        }
+      });
+      registerReadOnlyContentFilters(editor);
+      registerReadOnlySelectionBlockers(editor);
+      return {
+        isReadOnly: function () {
+          return isReadOnly(editor);
+        },
+        set: function (mode) {
+          return setMode(editor, availableModes.get(), activeMode, mode);
+        },
+        get: function () {
+          return activeMode.get();
+        },
+        register: function (mode, api) {
+          availableModes.set(registerMode(availableModes.get(), mode, api));
+        }
+      };
+    };
+
+    var each$f = Tools.each, explode$3 = Tools.explode;
+    var keyCodeLookup = {
+      f1: 112,
+      f2: 113,
+      f3: 114,
+      f4: 115,
+      f5: 116,
+      f6: 117,
+      f7: 118,
+      f8: 119,
+      f9: 120,
+      f10: 121,
+      f11: 122,
+      f12: 123
+    };
+    var modifierNames = Tools.makeMap('alt,ctrl,shift,meta,access');
+    var Shortcuts = function () {
+      function Shortcuts(editor) {
+        this.shortcuts = {};
+        this.pendingPatterns = [];
+        this.editor = editor;
+        var self = this;
+        editor.on('keyup keypress keydown', function (e) {
+          if ((self.hasModifier(e) || self.isFunctionKey(e)) && !e.isDefaultPrevented()) {
+            each$f(self.shortcuts, function (shortcut) {
+              if (self.matchShortcut(e, shortcut)) {
+                self.pendingPatterns = shortcut.subpatterns.slice(0);
+                if (e.type === 'keydown') {
+                  self.executeShortcutAction(shortcut);
+                }
+                return true;
+              }
+            });
+            if (self.matchShortcut(e, self.pendingPatterns[0])) {
+              if (self.pendingPatterns.length === 1) {
+                if (e.type === 'keydown') {
+                  self.executeShortcutAction(self.pendingPatterns[0]);
+                }
+              }
+              self.pendingPatterns.shift();
+            }
+          }
+        });
+      }
+      Shortcuts.prototype.add = function (pattern, desc, cmdFunc, scope) {
+        var self = this;
+        var cmd;
+        cmd = cmdFunc;
+        if (typeof cmdFunc === 'string') {
+          cmdFunc = function () {
+            self.editor.execCommand(cmd, false, null);
+          };
+        } else if (Tools.isArray(cmd)) {
+          cmdFunc = function () {
+            self.editor.execCommand(cmd[0], cmd[1], cmd[2]);
+          };
+        }
+        each$f(explode$3(Tools.trim(pattern)), function (pattern) {
+          var shortcut = self.createShortcut(pattern, desc, cmdFunc, scope);
+          self.shortcuts[shortcut.id] = shortcut;
+        });
+        return true;
+      };
+      Shortcuts.prototype.remove = function (pattern) {
+        var shortcut = this.createShortcut(pattern);
+        if (this.shortcuts[shortcut.id]) {
+          delete this.shortcuts[shortcut.id];
+          return true;
+        }
+        return false;
+      };
+      Shortcuts.prototype.parseShortcut = function (pattern) {
+        var id, key;
+        var shortcut = {};
+        each$f(explode$3(pattern.toLowerCase(), '+'), function (value) {
+          if (value in modifierNames) {
+            shortcut[value] = true;
+          } else {
+            if (/^[0-9]{2,}$/.test(value)) {
+              shortcut.keyCode = parseInt(value, 10);
+            } else {
+              shortcut.charCode = value.charCodeAt(0);
+              shortcut.keyCode = keyCodeLookup[value] || value.toUpperCase().charCodeAt(0);
+            }
+          }
+        });
+        id = [shortcut.keyCode];
+        for (key in modifierNames) {
+          if (shortcut[key]) {
+            id.push(key);
+          } else {
+            shortcut[key] = false;
+          }
+        }
+        shortcut.id = id.join(',');
+        if (shortcut.access) {
+          shortcut.alt = true;
+          if (Env.mac) {
+            shortcut.ctrl = true;
+          } else {
+            shortcut.shift = true;
+          }
+        }
+        if (shortcut.meta) {
+          if (Env.mac) {
+            shortcut.meta = true;
+          } else {
+            shortcut.ctrl = true;
+            shortcut.meta = false;
+          }
+        }
+        return shortcut;
+      };
+      Shortcuts.prototype.createShortcut = function (pattern, desc, cmdFunc, scope) {
+        var shortcuts;
+        shortcuts = Tools.map(explode$3(pattern, '>'), this.parseShortcut);
+        shortcuts[shortcuts.length - 1] = Tools.extend(shortcuts[shortcuts.length - 1], {
+          func: cmdFunc,
+          scope: scope || this.editor
+        });
+        return Tools.extend(shortcuts[0], {
+          desc: this.editor.translate(desc),
+          subpatterns: shortcuts.slice(1)
+        });
+      };
+      Shortcuts.prototype.hasModifier = function (e) {
+        return e.altKey || e.ctrlKey || e.metaKey;
+      };
+      Shortcuts.prototype.isFunctionKey = function (e) {
+        return e.type === 'keydown' && e.keyCode >= 112 && e.keyCode <= 123;
+      };
+      Shortcuts.prototype.matchShortcut = function (e, shortcut) {
+        if (!shortcut) {
+          return false;
+        }
+        if (shortcut.ctrl !== e.ctrlKey || shortcut.meta !== e.metaKey) {
+          return false;
+        }
+        if (shortcut.alt !== e.altKey || shortcut.shift !== e.shiftKey) {
+          return false;
+        }
+        if (e.keyCode === shortcut.keyCode || e.charCode && e.charCode === shortcut.charCode) {
+          e.preventDefault();
+          return true;
+        }
+        return false;
+      };
+      Shortcuts.prototype.executeShortcutAction = function (shortcut) {
+        return shortcut.func ? shortcut.func.call(shortcut.scope) : null;
+      };
+      return Shortcuts;
+    }();
+
+    var create$5 = function () {
+      var buttons = {};
+      var menuItems = {};
+      var popups = {};
+      var icons = {};
+      var contextMenus = {};
+      var contextToolbars = {};
+      var sidebars = {};
+      var add = function (collection, type) {
+        return function (name, spec) {
+          return collection[name.toLowerCase()] = __assign(__assign({}, spec), { type: type });
+        };
+      };
+      var addIcon = function (name, svgData) {
+        return icons[name.toLowerCase()] = svgData;
+      };
+      return {
+        addButton: add(buttons, 'button'),
+        addGroupToolbarButton: add(buttons, 'grouptoolbarbutton'),
+        addToggleButton: add(buttons, 'togglebutton'),
+        addMenuButton: add(buttons, 'menubutton'),
+        addSplitButton: add(buttons, 'splitbutton'),
+        addMenuItem: add(menuItems, 'menuitem'),
+        addNestedMenuItem: add(menuItems, 'nestedmenuitem'),
+        addToggleMenuItem: add(menuItems, 'togglemenuitem'),
+        addAutocompleter: add(popups, 'autocompleter'),
+        addContextMenu: add(contextMenus, 'contextmenu'),
+        addContextToolbar: add(contextToolbars, 'contexttoolbar'),
+        addContextForm: add(contextToolbars, 'contextform'),
+        addSidebar: add(sidebars, 'sidebar'),
+        addIcon: addIcon,
+        getAll: function () {
+          return {
+            buttons: buttons,
+            menuItems: menuItems,
+            icons: icons,
+            popups: popups,
+            contextMenus: contextMenus,
+            contextToolbars: contextToolbars,
+            sidebars: sidebars
+          };
+        }
+      };
+    };
+
+    var registry = function () {
+      var bridge = create$5();
+      return {
+        addAutocompleter: bridge.addAutocompleter,
+        addButton: bridge.addButton,
+        addContextForm: bridge.addContextForm,
+        addContextMenu: bridge.addContextMenu,
+        addContextToolbar: bridge.addContextToolbar,
+        addIcon: bridge.addIcon,
+        addMenuButton: bridge.addMenuButton,
+        addMenuItem: bridge.addMenuItem,
+        addNestedMenuItem: bridge.addNestedMenuItem,
+        addSidebar: bridge.addSidebar,
+        addSplitButton: bridge.addSplitButton,
+        addToggleButton: bridge.addToggleButton,
+        addGroupToolbarButton: bridge.addGroupToolbarButton,
+        addToggleMenuItem: bridge.addToggleMenuItem,
+        getAll: bridge.getAll
+      };
+    };
+
+    var each$g = Tools.each, trim$4 = Tools.trim;
+    var queryParts = 'source protocol authority userInfo user password host port relative path directory file query anchor'.split(' ');
+    var DEFAULT_PORTS = {
+      ftp: 21,
+      http: 80,
+      https: 443,
+      mailto: 25
+    };
+    var URI = function () {
+      function URI(url, settings) {
+        url = trim$4(url);
+        this.settings = settings || {};
+        var baseUri = this.settings.base_uri;
+        var self = this;
+        if (/^([\w\-]+):([^\/]{2})/i.test(url) || /^\s*#/.test(url)) {
+          self.source = url;
+          return;
+        }
+        var isProtocolRelative = url.indexOf('//') === 0;
+        if (url.indexOf('/') === 0 && !isProtocolRelative) {
+          url = (baseUri ? baseUri.protocol || 'http' : 'http') + '://mce_host' + url;
+        }
+        if (!/^[\w\-]*:?\/\//.test(url)) {
+          var baseUrl = this.settings.base_uri ? this.settings.base_uri.path : new URI(domGlobals.document.location.href).directory;
+          if (this.settings.base_uri && this.settings.base_uri.protocol == '') {
+            url = '//mce_host' + self.toAbsPath(baseUrl, url);
+          } else {
+            var match = /([^#?]*)([#?]?.*)/.exec(url);
+            url = (baseUri && baseUri.protocol || 'http') + '://mce_host' + self.toAbsPath(baseUrl, match[1]) + match[2];
+          }
+        }
+        url = url.replace(/@@/g, '(mce_at)');
+        var urlMatch = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(url);
+        each$g(queryParts, function (v, i) {
+          var part = urlMatch[i];
+          if (part) {
+            part = part.replace(/\(mce_at\)/g, '@@');
+          }
+          self[v] = part;
+        });
+        if (baseUri) {
+          if (!self.protocol) {
+            self.protocol = baseUri.protocol;
+          }
+          if (!self.userInfo) {
+            self.userInfo = baseUri.userInfo;
+          }
+          if (!self.port && self.host === 'mce_host') {
+            self.port = baseUri.port;
+          }
+          if (!self.host || self.host === 'mce_host') {
+            self.host = baseUri.host;
+          }
+          self.source = '';
+        }
+        if (isProtocolRelative) {
+          self.protocol = '';
+        }
+      }
+      URI.parseDataUri = function (uri) {
+        var type;
+        var uriComponents = decodeURIComponent(uri).split(',');
+        var matches = /data:([^;]+)/.exec(uriComponents[0]);
+        if (matches) {
+          type = matches[1];
+        }
+        return {
+          type: type,
+          data: uriComponents[1]
+        };
+      };
+      URI.getDocumentBaseUrl = function (loc) {
+        var baseUrl;
+        if (loc.protocol.indexOf('http') !== 0 && loc.protocol !== 'file:') {
+          baseUrl = loc.href;
+        } else {
+          baseUrl = loc.protocol + '//' + loc.host + loc.pathname;
+        }
+        if (/^[^:]+:\/\/\/?[^\/]+\//.test(baseUrl)) {
+          baseUrl = baseUrl.replace(/[\?#].*$/, '').replace(/[\/\\][^\/]+$/, '');
+          if (!/[\/\\]$/.test(baseUrl)) {
+            baseUrl += '/';
+          }
+        }
+        return baseUrl;
+      };
+      URI.prototype.setPath = function (path) {
+        var pathMatch = /^(.*?)\/?(\w+)?$/.exec(path);
+        this.path = pathMatch[0];
+        this.directory = pathMatch[1];
+        this.file = pathMatch[2];
+        this.source = '';
+        this.getURI();
+      };
+      URI.prototype.toRelative = function (uri) {
+        var output;
+        if (uri === './') {
+          return uri;
+        }
+        var relativeUri = new URI(uri, { base_uri: this });
+        if (relativeUri.host !== 'mce_host' && this.host !== relativeUri.host && relativeUri.host || this.port !== relativeUri.port || this.protocol !== relativeUri.protocol && relativeUri.protocol !== '') {
+          return relativeUri.getURI();
+        }
+        var tu = this.getURI(), uu = relativeUri.getURI();
+        if (tu === uu || tu.charAt(tu.length - 1) === '/' && tu.substr(0, tu.length - 1) === uu) {
+          return tu;
+        }
+        output = this.toRelPath(this.path, relativeUri.path);
+        if (relativeUri.query) {
+          output += '?' + relativeUri.query;
+        }
+        if (relativeUri.anchor) {
+          output += '#' + relativeUri.anchor;
+        }
+        return output;
+      };
+      URI.prototype.toAbsolute = function (uri, noHost) {
+        var absoluteUri = new URI(uri, { base_uri: this });
+        return absoluteUri.getURI(noHost && this.isSameOrigin(absoluteUri));
+      };
+      URI.prototype.isSameOrigin = function (uri) {
+        if (this.host == uri.host && this.protocol == uri.protocol) {
+          if (this.port == uri.port) {
+            return true;
+          }
+          var defaultPort = DEFAULT_PORTS[this.protocol];
+          if (defaultPort && (this.port || defaultPort) == (uri.port || defaultPort)) {
+            return true;
+          }
+        }
+        return false;
+      };
+      URI.prototype.toRelPath = function (base, path) {
+        var items, breakPoint = 0, out = '', i, l;
+        var normalizedBase = base.substring(0, base.lastIndexOf('/')).split('/');
+        items = path.split('/');
+        if (normalizedBase.length >= items.length) {
+          for (i = 0, l = normalizedBase.length; i < l; i++) {
+            if (i >= items.length || normalizedBase[i] !== items[i]) {
+              breakPoint = i + 1;
+              break;
+            }
+          }
+        }
+        if (normalizedBase.length < items.length) {
+          for (i = 0, l = items.length; i < l; i++) {
+            if (i >= normalizedBase.length || normalizedBase[i] !== items[i]) {
+              breakPoint = i + 1;
+              break;
+            }
+          }
+        }
+        if (breakPoint === 1) {
+          return path;
+        }
+        for (i = 0, l = normalizedBase.length - (breakPoint - 1); i < l; i++) {
+          out += '../';
+        }
+        for (i = breakPoint - 1, l = items.length; i < l; i++) {
+          if (i !== breakPoint - 1) {
+            out += '/' + items[i];
+          } else {
+            out += items[i];
+          }
+        }
+        return out;
+      };
+      URI.prototype.toAbsPath = function (base, path) {
+        var i, nb = 0, o = [], tr, outPath;
+        tr = /\/$/.test(path) ? '/' : '';
+        var normalizedBase = base.split('/');
+        var normalizedPath = path.split('/');
+        each$g(normalizedBase, function (k) {
+          if (k) {
+            o.push(k);
+          }
+        });
+        normalizedBase = o;
+        for (i = normalizedPath.length - 1, o = []; i >= 0; i--) {
+          if (normalizedPath[i].length === 0 || normalizedPath[i] === '.') {
+            continue;
+          }
+          if (normalizedPath[i] === '..') {
+            nb++;
+            continue;
+          }
+          if (nb > 0) {
+            nb--;
+            continue;
+          }
+          o.push(normalizedPath[i]);
+        }
+        i = normalizedBase.length - nb;
+        if (i <= 0) {
+          outPath = reverse(o).join('/');
+        } else {
+          outPath = normalizedBase.slice(0, i).join('/') + '/' + reverse(o).join('/');
+        }
+        if (outPath.indexOf('/') !== 0) {
+          outPath = '/' + outPath;
+        }
+        if (tr && outPath.lastIndexOf('/') !== outPath.length - 1) {
+          outPath += tr;
+        }
+        return outPath;
+      };
+      URI.prototype.getURI = function (noProtoHost) {
+        if (noProtoHost === void 0) {
+          noProtoHost = false;
+        }
+        var s;
+        if (!this.source || noProtoHost) {
+          s = '';
+          if (!noProtoHost) {
+            if (this.protocol) {
+              s += this.protocol + '://';
+            } else {
+              s += '//';
+            }
+            if (this.userInfo) {
+              s += this.userInfo + '@';
+            }
+            if (this.host) {
+              s += this.host;
+            }
+            if (this.port) {
+              s += ':' + this.port;
+            }
+          }
+          if (this.path) {
+            s += this.path;
+          }
+          if (this.query) {
+            s += '?' + this.query;
+          }
+          if (this.anchor) {
+            s += '#' + this.anchor;
+          }
+          this.source = s;
+        }
+        return this.source;
+      };
+      return URI;
+    }();
+
+    var DOM$9 = DOMUtils$1.DOM;
+    var extend$3 = Tools.extend, each$h = Tools.each;
+    var resolve$3 = Tools.resolve;
+    var ie$1 = Env.ie;
+    var Editor = function () {
+      function Editor(id, settings, editorManager) {
+        var _this = this;
+        this.plugins = {};
+        this.contentCSS = [];
+        this.contentStyles = [];
+        this.loadedCSS = {};
+        this.isNotDirty = false;
+        this.editorManager = editorManager;
+        this.documentBaseUrl = editorManager.documentBaseURL;
+        extend$3(this, EditorObservable);
+        this.settings = getEditorSettings(this, id, this.documentBaseUrl, editorManager.defaultSettings, settings);
+        if (this.settings.suffix) {
+          editorManager.suffix = this.settings.suffix;
+        }
+        this.suffix = editorManager.suffix;
+        if (this.settings.base_url) {
+          editorManager._setBaseUrl(this.settings.base_url);
+        }
+        this.baseUri = editorManager.baseURI;
+        if (this.settings.referrer_policy) {
+          ScriptLoader.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy);
+          DOMUtils$1.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy);
+        }
+        AddOnManager$1.languageLoad = this.settings.language_load;
+        AddOnManager$1.baseURL = editorManager.baseURL;
+        this.id = id;
+        this.setDirty(false);
+        this.documentBaseURI = new URI(this.settings.document_base_url, { base_uri: this.baseUri });
+        this.baseURI = this.baseUri;
+        this.inline = !!this.settings.inline;
+        this.shortcuts = new Shortcuts(this);
+        this.editorCommands = new EditorCommands(this);
+        if (this.settings.cache_suffix) {
+          Env.cacheSuffix = this.settings.cache_suffix.replace(/^[\?\&]+/, '');
+        }
+        this.ui = { registry: registry() };
+        var self = this;
+        var modeInstance = create$4(self);
+        this.mode = modeInstance;
+        this.setMode = modeInstance.set;
+        editorManager.fire('SetupEditor', { editor: this });
+        this.execCallback('setup', this);
+        this.$ = DomQuery.overrideDefaults(function () {
+          return {
+            context: _this.inline ? _this.getBody() : _this.getDoc(),
+            element: _this.getBody()
+          };
+        });
+      }
+      Editor.prototype.render = function () {
+        render(this);
+      };
+      Editor.prototype.focus = function (skipFocus) {
+        focus(this, skipFocus);
+      };
+      Editor.prototype.hasFocus = function () {
+        return hasFocus$1(this);
+      };
+      Editor.prototype.execCallback = function (name) {
+        var x = [];
+        for (var _i = 1; _i < arguments.length; _i++) {
+          x[_i - 1] = arguments[_i];
+        }
+        var self = this;
+        var callback = self.settings[name], scope;
+        if (!callback) {
+          return;
+        }
+        if (self.callbackLookup && (scope = self.callbackLookup[name])) {
+          callback = scope.func;
+          scope = scope.scope;
+        }
+        if (typeof callback === 'string') {
+          scope = callback.replace(/\.\w+$/, '');
+          scope = scope ? resolve$3(scope) : 0;
+          callback = resolve$3(callback);
+          self.callbackLookup = self.callbackLookup || {};
+          self.callbackLookup[name] = {
+            func: callback,
+            scope: scope
+          };
+        }
+        return callback.apply(scope || self, x);
+      };
+      Editor.prototype.translate = function (text) {
+        return I18n.translate(text);
+      };
+      Editor.prototype.getParam = function (name, defaultVal, type) {
+        return getParam(this, name, defaultVal, type);
+      };
+      Editor.prototype.nodeChanged = function (args) {
+        this._nodeChangeDispatcher.nodeChanged(args);
+      };
+      Editor.prototype.addCommand = function (name, callback, scope) {
+        this.editorCommands.addCommand(name, callback, scope);
+      };
+      Editor.prototype.addQueryStateHandler = function (name, callback, scope) {
+        this.editorCommands.addQueryStateHandler(name, callback, scope);
+      };
+      Editor.prototype.addQueryValueHandler = function (name, callback, scope) {
+        this.editorCommands.addQueryValueHandler(name, callback, scope);
+      };
+      Editor.prototype.addShortcut = function (pattern, desc, cmdFunc, scope) {
+        this.shortcuts.add(pattern, desc, cmdFunc, scope);
+      };
+      Editor.prototype.execCommand = function (cmd, ui, value, args) {
+        return this.editorCommands.execCommand(cmd, ui, value, args);
+      };
+      Editor.prototype.queryCommandState = function (cmd) {
+        return this.editorCommands.queryCommandState(cmd);
+      };
+      Editor.prototype.queryCommandValue = function (cmd) {
+        return this.editorCommands.queryCommandValue(cmd);
+      };
+      Editor.prototype.queryCommandSupported = function (cmd) {
+        return this.editorCommands.queryCommandSupported(cmd);
+      };
+      Editor.prototype.show = function () {
+        var self = this;
+        if (self.hidden) {
+          self.hidden = false;
+          if (self.inline) {
+            self.getBody().contentEditable = 'true';
+          } else {
+            DOM$9.show(self.getContainer());
+            DOM$9.hide(self.id);
+          }
+          self.load();
+          self.fire('show');
+        }
+      };
+      Editor.prototype.hide = function () {
+        var self = this, doc = self.getDoc();
+        if (!self.hidden) {
+          if (ie$1 && doc && !self.inline) {
+            doc.execCommand('SelectAll');
+          }
+          self.save();
+          if (self.inline) {
+            self.getBody().contentEditable = 'false';
+            if (self === self.editorManager.focusedEditor) {
+              self.editorManager.focusedEditor = null;
+            }
+          } else {
+            DOM$9.hide(self.getContainer());
+            DOM$9.setStyle(self.id, 'display', self.orgDisplay);
+          }
+          self.hidden = true;
+          self.fire('hide');
+        }
+      };
+      Editor.prototype.isHidden = function () {
+        return !!this.hidden;
+      };
+      Editor.prototype.setProgressState = function (state, time) {
+        this.fire('ProgressState', {
+          state: state,
+          time: time
+        });
+      };
+      Editor.prototype.load = function (args) {
+        var self = this;
+        var elm = self.getElement(), html;
+        if (self.removed) {
+          return '';
+        }
+        if (elm) {
+          args = args || {};
+          args.load = true;
+          var value = isTextareaOrInput(elm) ? elm.value : elm.innerHTML;
+          html = self.setContent(value, args);
+          args.element = elm;
+          if (!args.no_events) {
+            self.fire('LoadContent', args);
+          }
+          args.element = elm = null;
+          return html;
+        }
+      };
+      Editor.prototype.save = function (args) {
+        var self = this;
+        var elm = self.getElement(), html, form;
+        if (!elm || !self.initialized || self.removed) {
+          return;
+        }
+        args = args || {};
+        args.save = true;
+        args.element = elm;
+        html = args.content = self.getContent(args);
+        if (!args.no_events) {
+          self.fire('SaveContent', args);
+        }
+        if (args.format === 'raw') {
+          self.fire('RawSaveContent', args);
+        }
+        html = args.content;
+        if (!isTextareaOrInput(elm)) {
+          if (args.is_removing || !self.inline) {
+            elm.innerHTML = html;
+          }
+          if (form = DOM$9.getParent(self.id, 'form')) {
+            each$h(form.elements, function (elm) {
+              if (elm.name === self.id) {
+                elm.value = html;
+                return false;
+              }
+            });
+          }
+        } else {
+          elm.value = html;
+        }
+        args.element = elm = null;
+        if (args.set_dirty !== false) {
+          self.setDirty(false);
+        }
+        return html;
+      };
+      Editor.prototype.setContent = function (content, args) {
+        return setContent$1(this, content, args);
+      };
+      Editor.prototype.getContent = function (args) {
+        return getContent$1(this, args);
+      };
+      Editor.prototype.insertContent = function (content, args) {
+        if (args) {
+          content = extend$3({ content: content }, args);
+        }
+        this.execCommand('mceInsertContent', false, content);
+      };
+      Editor.prototype.resetContent = function (initialContent) {
+        if (initialContent === undefined) {
+          setContent$1(this, this.startContent, { format: 'raw' });
+        } else {
+          setContent$1(this, initialContent);
+        }
+        this.undoManager.reset();
+        this.setDirty(false);
+        this.nodeChanged();
+      };
+      Editor.prototype.isDirty = function () {
+        return !this.isNotDirty;
+      };
+      Editor.prototype.setDirty = function (state) {
+        var oldState = !this.isNotDirty;
+        this.isNotDirty = !state;
+        if (state && state !== oldState) {
+          this.fire('dirty');
+        }
+      };
+      Editor.prototype.getContainer = function () {
+        var self = this;
+        if (!self.container) {
+          self.container = DOM$9.get(self.editorContainer || self.id + '_parent');
+        }
+        return self.container;
+      };
+      Editor.prototype.getContentAreaContainer = function () {
+        return this.contentAreaContainer;
+      };
+      Editor.prototype.getElement = function () {
+        if (!this.targetElm) {
+          this.targetElm = DOM$9.get(this.id);
+        }
+        return this.targetElm;
+      };
+      Editor.prototype.getWin = function () {
+        var self = this;
+        var elm;
+        if (!self.contentWindow) {
+          elm = self.iframeElement;
+          if (elm) {
+            self.contentWindow = elm.contentWindow;
+          }
+        }
+        return self.contentWindow;
+      };
+      Editor.prototype.getDoc = function () {
+        var self = this;
+        var win;
+        if (!self.contentDocument) {
+          win = self.getWin();
+          if (win) {
+            self.contentDocument = win.document;
+          }
+        }
+        return self.contentDocument;
+      };
+      Editor.prototype.getBody = function () {
+        var doc = this.getDoc();
+        return this.bodyElement || (doc ? doc.body : null);
+      };
+      Editor.prototype.convertURL = function (url, name, elm) {
+        var self = this, settings = self.settings;
+        if (settings.urlconverter_callback) {
+          return self.execCallback('urlconverter_callback', url, elm, true, name);
+        }
+        if (!settings.convert_urls || elm && elm.nodeName === 'LINK' || url.indexOf('file:') === 0 || url.length === 0) {
+          return url;
+        }
+        if (settings.relative_urls) {
+          return self.documentBaseURI.toRelative(url);
+        }
+        url = self.documentBaseURI.toAbsolute(url, settings.remove_script_host);
+        return url;
+      };
+      Editor.prototype.addVisual = function (elm) {
+        var self = this;
+        var settings = self.settings;
+        var dom = self.dom;
+        var cls;
+        elm = elm || self.getBody();
+        if (self.hasVisual === undefined) {
+          self.hasVisual = settings.visual;
+        }
+        each$h(dom.select('table,a', elm), function (elm) {
+          var value;
+          switch (elm.nodeName) {
+          case 'TABLE':
+            cls = settings.visual_table_class || 'mce-item-table';
+            value = dom.getAttrib(elm, 'border');
+            if ((!value || value === '0') && self.hasVisual) {
+              dom.addClass(elm, cls);
+            } else {
+              dom.removeClass(elm, cls);
+            }
+            return;
+          case 'A':
+            if (!dom.getAttrib(elm, 'href')) {
+              value = dom.getAttrib(elm, 'name') || elm.id;
+              cls = settings.visual_anchor_class || 'mce-item-anchor';
+              if (value && self.hasVisual) {
+                dom.addClass(elm, cls);
+              } else {
+                dom.removeClass(elm, cls);
+              }
+            }
+            return;
+          }
+        });
+        self.fire('VisualAid', {
+          element: elm,
+          hasVisual: self.hasVisual
+        });
+      };
+      Editor.prototype.remove = function () {
+        remove$7(this);
+      };
+      Editor.prototype.destroy = function (automatic) {
+        destroy(this, automatic);
+      };
+      Editor.prototype.uploadImages = function (callback) {
+        return this.editorUpload.uploadImages(callback);
+      };
+      Editor.prototype._scanForImages = function () {
+        return this.editorUpload.scanForImages();
+      };
+      Editor.prototype.addButton = function () {
+        throw new Error('editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead');
+      };
+      Editor.prototype.addSidebar = function () {
+        throw new Error('editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead');
+      };
+      Editor.prototype.addMenuItem = function () {
+        throw new Error('editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead');
+      };
+      Editor.prototype.addContextToolbar = function () {
+        throw new Error('editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead');
+      };
+      return Editor;
+    }();
+
+    var DOM$a = DOMUtils$1.DOM;
+    var explode$4 = Tools.explode, each$i = Tools.each, extend$4 = Tools.extend;
+    var instanceCounter = 0, boundGlobalEvents = false;
+    var beforeUnloadDelegate;
+    var legacyEditors = [];
+    var editors = [];
+    var isValidLegacyKey = function (id) {
+      return id !== 'length';
+    };
+    var globalEventDelegate = function (e) {
+      var type = e.type;
+      each$i(EditorManager.get(), function (editor) {
+        switch (type) {
+        case 'scroll':
+          editor.fire('ScrollWindow', e);
+          break;
+        case 'resize':
+          editor.fire('ResizeWindow', e);
+          break;
+        }
+      });
+    };
+    var toggleGlobalEvents = function (state) {
+      if (state !== boundGlobalEvents) {
+        if (state) {
+          DomQuery(window).on('resize scroll', globalEventDelegate);
+        } else {
+          DomQuery(window).off('resize scroll', globalEventDelegate);
+        }
+        boundGlobalEvents = state;
+      }
+    };
+    var removeEditorFromList = function (targetEditor) {
+      var oldEditors = editors;
+      delete legacyEditors[targetEditor.id];
+      for (var i = 0; i < legacyEditors.length; i++) {
+        if (legacyEditors[i] === targetEditor) {
+          legacyEditors.splice(i, 1);
+          break;
+        }
+      }
+      editors = filter(editors, function (editor) {
+        return targetEditor !== editor;
+      });
+      if (EditorManager.activeEditor === targetEditor) {
+        EditorManager.activeEditor = editors.length > 0 ? editors[0] : null;
+      }
+      if (EditorManager.focusedEditor === targetEditor) {
+        EditorManager.focusedEditor = null;
+      }
+      return oldEditors.length !== editors.length;
+    };
+    var purgeDestroyedEditor = function (editor) {
+      if (editor && editor.initialized && !(editor.getContainer() || editor.getBody()).parentNode) {
+        removeEditorFromList(editor);
+        editor.unbindAllNativeEvents();
+        editor.destroy(true);
+        editor.removed = true;
+        editor = null;
+      }
+      return editor;
+    };
+    var isQuirksMode = domGlobals.document.compatMode !== 'CSS1Compat';
+    var EditorManager = __assign(__assign({}, Observable), {
+      baseURI: null,
+      baseURL: null,
+      defaultSettings: {},
+      documentBaseURL: null,
+      suffix: null,
+      $: DomQuery,
+      majorVersion: '5',
+      minorVersion: '3.2',
+      releaseDate: '2020-06-10',
+      editors: legacyEditors,
+      i18n: I18n,
+      activeEditor: null,
+      focusedEditor: null,
+      settings: {},
+      setup: function () {
+        var self = this;
+        var baseURL, documentBaseURL, suffix = '';
+        documentBaseURL = URI.getDocumentBaseUrl(domGlobals.document.location);
+        if (/^[^:]+:\/\/\/?[^\/]+\//.test(documentBaseURL)) {
+          documentBaseURL = documentBaseURL.replace(/[\?#].*$/, '').replace(/[\/\\][^\/]+$/, '');
+          if (!/[\/\\]$/.test(documentBaseURL)) {
+            documentBaseURL += '/';
+          }
+        }
+        var preInit = window.tinymce || window.tinyMCEPreInit;
+        if (preInit) {
+          baseURL = preInit.base || preInit.baseURL;
+          suffix = preInit.suffix;
+        } else {
+          var scripts = domGlobals.document.getElementsByTagName('script');
+          for (var i = 0; i < scripts.length; i++) {
+            var src = scripts[i].src || '';
+            if (src === '') {
+              continue;
+            }
+            var srcScript = src.substring(src.lastIndexOf('/'));
+            if (/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(src)) {
+              if (srcScript.indexOf('.min') !== -1) {
+                suffix = '.min';
+              }
+              baseURL = src.substring(0, src.lastIndexOf('/'));
+              break;
+            }
+          }
+          if (!baseURL && domGlobals.document.currentScript) {
+            var src = domGlobals.document.currentScript.src;
+            if (src.indexOf('.min') !== -1) {
+              suffix = '.min';
+            }
+            baseURL = src.substring(0, src.lastIndexOf('/'));
+          }
+        }
+        self.baseURL = new URI(documentBaseURL).toAbsolute(baseURL);
+        self.documentBaseURL = documentBaseURL;
+        self.baseURI = new URI(self.baseURL);
+        self.suffix = suffix;
+        setup$2(self);
+      },
+      overrideDefaults: function (defaultSettings) {
+        var baseUrl, suffix;
+        baseUrl = defaultSettings.base_url;
+        if (baseUrl) {
+          this._setBaseUrl(baseUrl);
+        }
+        suffix = defaultSettings.suffix;
+        if (defaultSettings.suffix) {
+          this.suffix = suffix;
+        }
+        this.defaultSettings = defaultSettings;
+        var pluginBaseUrls = defaultSettings.plugin_base_urls;
+        if (pluginBaseUrls !== undefined) {
+          each$1(pluginBaseUrls, function (pluginBaseUrl, pluginName) {
+            AddOnManager$1.PluginManager.urls[pluginName] = pluginBaseUrl;
+          });
+        }
+      },
+      init: function (settings) {
+        var self = this;
+        var result, invalidInlineTargets;
+        invalidInlineTargets = Tools.makeMap('area base basefont br col frame hr img input isindex link meta param embed source wbr track ' + 'colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu', ' ');
+        var isInvalidInlineTarget = function (settings, elm) {
+          return settings.inline && elm.tagName.toLowerCase() in invalidInlineTargets;
+        };
+        var createId = function (elm) {
+          var id = elm.id;
+          if (!id) {
+            id = elm.name;
+            if (id && !DOM$a.get(id)) {
+              id = elm.name;
+            } else {
+              id = DOM$a.uniqueId();
+            }
+            elm.setAttribute('id', id);
+          }
+          return id;
+        };
+        var execCallback = function (name) {
+          var callback = settings[name];
+          if (!callback) {
+            return;
+          }
+          return callback.apply(self, Array.prototype.slice.call(arguments, 2));
+        };
+        var hasClass = function (elm, className) {
+          return className.constructor === RegExp ? className.test(elm.className) : DOM$a.hasClass(elm, className);
+        };
+        var findTargets = function (settings) {
+          var l, targets = [];
+          if (Env.browser.isIE() && Env.browser.version.major < 11) {
+            initError('TinyMCE does not support the browser you are using. For a list of supported' + ' browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/');
+            return [];
+          } else if (isQuirksMode) {
+            initError('Failed to initialize the editor as the document is not in standards mode. ' + 'TinyMCE requires standards mode.');
+            return [];
+          }
+          if (settings.types) {
+            each$i(settings.types, function (type) {
+              targets = targets.concat(DOM$a.select(type.selector));
+            });
+            return targets;
+          } else if (settings.selector) {
+            return DOM$a.select(settings.selector);
+          } else if (settings.target) {
+            return [settings.target];
+          }
+          switch (settings.mode) {
+          case 'exact':
+            l = settings.elements || '';
+            if (l.length > 0) {
+              each$i(explode$4(l), function (id) {
+                var elm;
+                if (elm = DOM$a.get(id)) {
+                  targets.push(elm);
+                } else {
+                  each$i(domGlobals.document.forms, function (f) {
+                    each$i(f.elements, function (e) {
+                      if (e.name === id) {
+                        id = 'mce_editor_' + instanceCounter++;
+                        DOM$a.setAttrib(e, 'id', id);
+                        targets.push(e);
+                      }
+                    });
+                  });
+                }
+              });
+            }
+            break;
+          case 'textareas':
+          case 'specific_textareas':
+            each$i(DOM$a.select('textarea'), function (elm) {
+              if (settings.editor_deselector && hasClass(elm, settings.editor_deselector)) {
+                return;
+              }
+              if (!settings.editor_selector || hasClass(elm, settings.editor_selector)) {
+                targets.push(elm);
+              }
+            });
+            break;
+          }
+          return targets;
+        };
+        var provideResults = function (editors) {
+          result = editors;
+        };
+        var initEditors = function () {
+          var initCount = 0;
+          var editors = [];
+          var targets;
+          var createEditor = function (id, settings, targetElm) {
+            var editor = new Editor(id, settings, self);
+            editors.push(editor);
+            editor.on('init', function () {
+              if (++initCount === targets.length) {
+                provideResults(editors);
+              }
+            });
+            editor.targetElm = editor.targetElm || targetElm;
+            editor.render();
+          };
+          DOM$a.unbind(window, 'ready', initEditors);
+          execCallback('onpageload');
+          targets = DomQuery.unique(findTargets(settings));
+          if (settings.types) {
+            each$i(settings.types, function (type) {
+              Tools.each(targets, function (elm) {
+                if (DOM$a.is(elm, type.selector)) {
+                  createEditor(createId(elm), extend$4({}, settings, type), elm);
+                  return false;
+                }
+                return true;
+              });
+            });
+            return;
+          }
+          Tools.each(targets, function (elm) {
+            purgeDestroyedEditor(self.get(elm.id));
+          });
+          targets = Tools.grep(targets, function (elm) {
+            return !self.get(elm.id);
+          });
+          if (targets.length === 0) {
+            provideResults([]);
+          } else {
+            each$i(targets, function (elm) {
+              if (isInvalidInlineTarget(settings, elm)) {
+                initError('Could not initialize inline editor on invalid inline target element', elm);
+              } else {
+                createEditor(createId(elm), settings, elm);
+              }
+            });
+          }
+        };
+        self.settings = settings;
+        DOM$a.bind(window, 'ready', initEditors);
+        return new promiseObj(function (resolve) {
+          if (result) {
+            resolve(result);
+          } else {
+            provideResults = function (editors) {
+              resolve(editors);
+            };
+          }
+        });
+      },
+      get: function (id) {
+        if (arguments.length === 0) {
+          return editors.slice(0);
+        } else if (isString(id)) {
+          return find(editors, function (editor) {
+            return editor.id === id;
+          }).getOr(null);
+        } else if (isNumber(id)) {
+          return editors[id] ? editors[id] : null;
+        } else {
+          return null;
+        }
+      },
+      add: function (editor) {
+        var self = this;
+        var existingEditor;
+        existingEditor = legacyEditors[editor.id];
+        if (existingEditor === editor) {
+          return editor;
+        }
+        if (self.get(editor.id) === null) {
+          if (isValidLegacyKey(editor.id)) {
+            legacyEditors[editor.id] = editor;
+          }
+          legacyEditors.push(editor);
+          editors.push(editor);
+        }
+        toggleGlobalEvents(true);
+        self.activeEditor = editor;
+        self.fire('AddEditor', { editor: editor });
+        if (!beforeUnloadDelegate) {
+          beforeUnloadDelegate = function (e) {
+            var event = self.fire('BeforeUnload');
+            if (event.returnValue) {
+              e.preventDefault();
+              e.returnValue = event.returnValue;
+              return event.returnValue;
+            }
+          };
+          window.addEventListener('beforeunload', beforeUnloadDelegate);
+        }
+        return editor;
+      },
+      createEditor: function (id, settings) {
+        return this.add(new Editor(id, settings, this));
+      },
+      remove: function (selector) {
+        var self = this;
+        var i, editor;
+        if (!selector) {
+          for (i = editors.length - 1; i >= 0; i--) {
+            self.remove(editors[i]);
+          }
+          return;
+        }
+        if (isString(selector)) {
+          each$i(DOM$a.select(selector), function (elm) {
+            editor = self.get(elm.id);
+            if (editor) {
+              self.remove(editor);
+            }
+          });
+          return;
+        }
+        editor = selector;
+        if (isNull(self.get(editor.id))) {
+          return null;
+        }
+        if (removeEditorFromList(editor)) {
+          self.fire('RemoveEditor', { editor: editor });
+        }
+        if (editors.length === 0) {
+          window.removeEventListener('beforeunload', beforeUnloadDelegate);
+        }
+        editor.remove();
+        toggleGlobalEvents(editors.length > 0);
+        return editor;
+      },
+      execCommand: function (cmd, ui, value) {
+        var self = this, editor = self.get(value);
+        switch (cmd) {
+        case 'mceAddEditor':
+          if (!self.get(value)) {
+            new Editor(value, self.settings, self).render();
+          }
+          return true;
+        case 'mceRemoveEditor':
+          if (editor) {
+            editor.remove();
+          }
+          return true;
+        case 'mceToggleEditor':
+          if (!editor) {
+            self.execCommand('mceAddEditor', 0, value);
+            return true;
+          }
+          if (editor.isHidden()) {
+            editor.show();
+          } else {
+            editor.hide();
+          }
+          return true;
+        }
+        if (self.activeEditor) {
+          return self.activeEditor.execCommand(cmd, ui, value);
+        }
+        return false;
+      },
+      triggerSave: function () {
+        each$i(editors, function (editor) {
+          editor.save();
+        });
+      },
+      addI18n: function (code, items) {
+        I18n.add(code, items);
+      },
+      translate: function (text) {
+        return I18n.translate(text);
+      },
+      setActive: function (editor) {
+        var activeEditor = this.activeEditor;
+        if (this.activeEditor !== editor) {
+          if (activeEditor) {
+            activeEditor.fire('deactivate', { relatedTarget: editor });
+          }
+          editor.fire('activate', { relatedTarget: activeEditor });
+        }
+        this.activeEditor = editor;
+      },
+      _setBaseUrl: function (baseUrl) {
+        this.baseURL = new URI(this.documentBaseURL).toAbsolute(baseUrl.replace(/\/+$/, ''));
+        this.baseURI = new URI(this.baseURL);
+      }
+    });
+    EditorManager.setup();
+
+    function RangeUtils(dom) {
+      var walk = function (rng, callback) {
+        return walk$1(dom, rng, callback);
+      };
+      var split = split$1;
+      var normalize = function (rng) {
+        return normalize$2(dom, rng).fold(constant(false), function (normalizedRng) {
+          rng.setStart(normalizedRng.startContainer, normalizedRng.startOffset);
+          rng.setEnd(normalizedRng.endContainer, normalizedRng.endOffset);
+          return true;
+        });
+      };
+      return {
+        walk: walk,
+        split: split,
+        normalize: normalize
+      };
+    }
+    (function (RangeUtils) {
+      RangeUtils.compareRanges = isEq$4;
+      RangeUtils.getCaretRangeFromPoint = fromPoint$1;
+      RangeUtils.getSelectedNode = getSelectedNode;
+      RangeUtils.getNode = getNode;
+    }(RangeUtils || (RangeUtils = {})));
+    var RangeUtils$1 = RangeUtils;
+
+    var awaiter = function (resolveCb, rejectCb, timeout) {
+      if (timeout === void 0) {
+        timeout = 1000;
+      }
+      var done = false;
+      var timer = null;
+      var complete = function (completer) {
+        return function () {
+          var args = [];
+          for (var _i = 0; _i < arguments.length; _i++) {
+            args[_i] = arguments[_i];
+          }
+          if (!done) {
+            done = true;
+            if (timer !== null) {
+              domGlobals.clearTimeout(timer);
+              timer = null;
+            }
+            completer.apply(null, args);
+          }
+        };
+      };
+      var resolve = complete(resolveCb);
+      var reject = complete(rejectCb);
+      var start = function () {
+        var args = [];
+        for (var _i = 0; _i < arguments.length; _i++) {
+          args[_i] = arguments[_i];
+        }
+        if (!done && timer === null) {
+          timer = domGlobals.setTimeout(function () {
+            return reject.apply(null, args);
+          }, timeout);
+        }
+      };
+      return {
+        start: start,
+        resolve: resolve,
+        reject: reject
+      };
+    };
+    var create$6 = function () {
+      var tasks = {};
+      var resultFns = {};
+      var load = function (id, url) {
+        var loadErrMsg = 'Script at URL "' + url + '" failed to load';
+        var runErrMsg = 'Script at URL "' + url + '" did not call `tinymce.Resource.add(\'' + id + '\', data)` within 1 second';
+        if (tasks[id] !== undefined) {
+          return tasks[id];
+        } else {
+          var task = new promiseObj(function (resolve, reject) {
+            var waiter = awaiter(resolve, reject);
+            resultFns[id] = waiter.resolve;
+            ScriptLoader.ScriptLoader.loadScript(url, function () {
+              return waiter.start(runErrMsg);
+            }, function () {
+              return waiter.reject(loadErrMsg);
+            });
+          });
+          tasks[id] = task;
+          return task;
+        }
+      };
+      var add = function (id, data) {
+        if (resultFns[id] !== undefined) {
+          resultFns[id](data);
+          delete resultFns[id];
+        }
+        tasks[id] = promiseObj.resolve(data);
+      };
+      return {
+        load: load,
+        add: add
+      };
+    };
+    var Resource = create$6();
+
+    var min = Math.min, max = Math.max, round$1 = Math.round;
+    var relativePosition = function (rect, targetRect, rel) {
+      var x, y, w, h, targetW, targetH;
+      x = targetRect.x;
+      y = targetRect.y;
+      w = rect.w;
+      h = rect.h;
+      targetW = targetRect.w;
+      targetH = targetRect.h;
+      rel = (rel || '').split('');
+      if (rel[0] === 'b') {
+        y += targetH;
+      }
+      if (rel[1] === 'r') {
+        x += targetW;
+      }
+      if (rel[0] === 'c') {
+        y += round$1(targetH / 2);
+      }
+      if (rel[1] === 'c') {
+        x += round$1(targetW / 2);
+      }
+      if (rel[3] === 'b') {
+        y -= h;
+      }
+      if (rel[4] === 'r') {
+        x -= w;
+      }
+      if (rel[3] === 'c') {
+        y -= round$1(h / 2);
+      }
+      if (rel[4] === 'c') {
+        x -= round$1(w / 2);
+      }
+      return create$7(x, y, w, h);
+    };
+    var findBestRelativePosition = function (rect, targetRect, constrainRect, rels) {
+      var pos, i;
+      for (i = 0; i < rels.length; i++) {
+        pos = relativePosition(rect, targetRect, rels[i]);
+        if (pos.x >= constrainRect.x && pos.x + pos.w <= constrainRect.w + constrainRect.x && pos.y >= constrainRect.y && pos.y + pos.h <= constrainRect.h + constrainRect.y) {
+          return rels[i];
+        }
+      }
+      return null;
+    };
+    var inflate = function (rect, w, h) {
+      return create$7(rect.x - w, rect.y - h, rect.w + w * 2, rect.h + h * 2);
+    };
+    var intersect = function (rect, cropRect) {
+      var x1, y1, x2, y2;
+      x1 = max(rect.x, cropRect.x);
+      y1 = max(rect.y, cropRect.y);
+      x2 = min(rect.x + rect.w, cropRect.x + cropRect.w);
+      y2 = min(rect.y + rect.h, cropRect.y + cropRect.h);
+      if (x2 - x1 < 0 || y2 - y1 < 0) {
+        return null;
+      }
+      return create$7(x1, y1, x2 - x1, y2 - y1);
+    };
+    var clamp$1 = function (rect, clampRect, fixedSize) {
+      var underflowX1, underflowY1, overflowX2, overflowY2, x1, y1, x2, y2, cx2, cy2;
+      x1 = rect.x;
+      y1 = rect.y;
+      x2 = rect.x + rect.w;
+      y2 = rect.y + rect.h;
+      cx2 = clampRect.x + clampRect.w;
+      cy2 = clampRect.y + clampRect.h;
+      underflowX1 = max(0, clampRect.x - x1);
+      underflowY1 = max(0, clampRect.y - y1);
+      overflowX2 = max(0, x2 - cx2);
+      overflowY2 = max(0, y2 - cy2);
+      x1 += underflowX1;
+      y1 += underflowY1;
+      if (fixedSize) {
+        x2 += underflowX1;
+        y2 += underflowY1;
+        x1 -= overflowX2;
+        y1 -= overflowY2;
+      }
+      x2 -= overflowX2;
+      y2 -= overflowY2;
+      return create$7(x1, y1, x2 - x1, y2 - y1);
+    };
+    var create$7 = function (x, y, w, h) {
+      return {
+        x: x,
+        y: y,
+        w: w,
+        h: h
+      };
+    };
+    var fromClientRect = function (clientRect) {
+      return create$7(clientRect.left, clientRect.top, clientRect.width, clientRect.height);
+    };
+    var Rect = {
+      inflate: inflate,
+      relativePosition: relativePosition,
+      findBestRelativePosition: findBestRelativePosition,
+      intersect: intersect,
+      clamp: clamp$1,
+      create: create$7,
+      fromClientRect: fromClientRect
+    };
+
+    var each$j = Tools.each, extend$5 = Tools.extend;
+    var extendClass, initializing;
+    var Class = function () {
+    };
+    Class.extend = extendClass = function (prop) {
+      var self = this;
+      var _super = self.prototype;
+      var prototype;
+      var Class = function () {
+        var i, mixins, mixin;
+        var self = this;
+        if (!initializing) {
+          if (self.init) {
+            self.init.apply(self, arguments);
+          }
+          mixins = self.Mixins;
+          if (mixins) {
+            i = mixins.length;
+            while (i--) {
+              mixin = mixins[i];
+              if (mixin.init) {
+                mixin.init.apply(self, arguments);
+              }
+            }
+          }
+        }
+      };
+      var dummy = function () {
+        return this;
+      };
+      var createMethod = function (name, fn) {
+        return function () {
+          var self = this;
+          var tmp = self._super;
+          var ret;
+          self._super = _super[name];
+          ret = fn.apply(self, arguments);
+          self._super = tmp;
+          return ret;
+        };
+      };
+      initializing = true;
+      prototype = new self();
+      initializing = false;
+      if (prop.Mixins) {
+        each$j(prop.Mixins, function (mixin) {
+          for (var name_1 in mixin) {
+            if (name_1 !== 'init') {
+              prop[name_1] = mixin[name_1];
+            }
+          }
+        });
+        if (_super.Mixins) {
+          prop.Mixins = _super.Mixins.concat(prop.Mixins);
+        }
+      }
+      if (prop.Methods) {
+        each$j(prop.Methods.split(','), function (name) {
+          prop[name] = dummy;
+        });
+      }
+      if (prop.Properties) {
+        each$j(prop.Properties.split(','), function (name) {
+          var fieldName = '_' + name;
+          prop[name] = function (value) {
+            var self = this;
+            if (value !== undefined) {
+              self[fieldName] = value;
+              return self;
+            }
+            return self[fieldName];
+          };
+        });
+      }
+      if (prop.Statics) {
+        each$j(prop.Statics, function (func, name) {
+          Class[name] = func;
+        });
+      }
+      if (prop.Defaults && _super.Defaults) {
+        prop.Defaults = extend$5({}, _super.Defaults, prop.Defaults);
+      }
+      each$1(prop, function (member, name) {
+        if (typeof member === 'function' && _super[name]) {
+          prototype[name] = createMethod(name, member);
+        } else {
+          prototype[name] = member;
+        }
+      });
+      Class.prototype = prototype;
+      Class.constructor = Class;
+      Class.extend = extendClass;
+      return Class;
+    };
+
+    var min$1 = Math.min, max$1 = Math.max, round$2 = Math.round;
+    var Color = function (value) {
+      var self = {};
+      var r = 0, g = 0, b = 0;
+      var rgb2hsv = function (r, g, b) {
+        var h, s, v, d, minRGB, maxRGB;
+        h = 0;
+        s = 0;
+        v = 0;
+        r = r / 255;
+        g = g / 255;
+        b = b / 255;
+        minRGB = min$1(r, min$1(g, b));
+        maxRGB = max$1(r, max$1(g, b));
+        if (minRGB === maxRGB) {
+          v = minRGB;
+          return {
+            h: 0,
+            s: 0,
+            v: v * 100
+          };
+        }
+        d = r === minRGB ? g - b : b === minRGB ? r - g : b - r;
+        h = r === minRGB ? 3 : b === minRGB ? 1 : 5;
+        h = 60 * (h - d / (maxRGB - minRGB));
+        s = (maxRGB - minRGB) / maxRGB;
+        v = maxRGB;
+        return {
+          h: round$2(h),
+          s: round$2(s * 100),
+          v: round$2(v * 100)
+        };
+      };
+      var hsvToRgb = function (hue, saturation, brightness) {
+        var side, chroma, x, match;
+        hue = (parseInt(hue, 10) || 0) % 360;
+        saturation = parseInt(saturation, 10) / 100;
+        brightness = parseInt(brightness, 10) / 100;
+        saturation = max$1(0, min$1(saturation, 1));
+        brightness = max$1(0, min$1(brightness, 1));
+        if (saturation === 0) {
+          r = g = b = round$2(255 * brightness);
+          return;
+        }
+        side = hue / 60;
+        chroma = brightness * saturation;
+        x = chroma * (1 - Math.abs(side % 2 - 1));
+        match = brightness - chroma;
+        switch (Math.floor(side)) {
+        case 0:
+          r = chroma;
+          g = x;
+          b = 0;
+          break;
+        case 1:
+          r = x;
+          g = chroma;
+          b = 0;
+          break;
+        case 2:
+          r = 0;
+          g = chroma;
+          b = x;
+          break;
+        case 3:
+          r = 0;
+          g = x;
+          b = chroma;
+          break;
+        case 4:
+          r = x;
+          g = 0;
+          b = chroma;
+          break;
+        case 5:
+          r = chroma;
+          g = 0;
+          b = x;
+          break;
+        default:
+          r = g = b = 0;
+        }
+        r = round$2(255 * (r + match));
+        g = round$2(255 * (g + match));
+        b = round$2(255 * (b + match));
+      };
+      var toHex = function () {
+        var hex = function (val) {
+          val = parseInt(val, 10).toString(16);
+          return val.length > 1 ? val : '0' + val;
+        };
+        return '#' + hex(r) + hex(g) + hex(b);
+      };
+      var toRgb = function () {
+        return {
+          r: r,
+          g: g,
+          b: b
+        };
+      };
+      var toHsv = function () {
+        return rgb2hsv(r, g, b);
+      };
+      var parse = function (value) {
+        var matches;
+        if (typeof value === 'object') {
+          if ('r' in value) {
+            r = value.r;
+            g = value.g;
+            b = value.b;
+          } else if ('v' in value) {
+            hsvToRgb(value.h, value.s, value.v);
+          }
+        } else {
+          if (matches = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(value)) {
+            r = parseInt(matches[1], 10);
+            g = parseInt(matches[2], 10);
+            b = parseInt(matches[3], 10);
+          } else if (matches = /#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(value)) {
+            r = parseInt(matches[1], 16);
+            g = parseInt(matches[2], 16);
+            b = parseInt(matches[3], 16);
+          } else if (matches = /#([0-F])([0-F])([0-F])/gi.exec(value)) {
+            r = parseInt(matches[1] + matches[1], 16);
+            g = parseInt(matches[2] + matches[2], 16);
+            b = parseInt(matches[3] + matches[3], 16);
+          }
+        }
+        r = r < 0 ? 0 : r > 255 ? 255 : r;
+        g = g < 0 ? 0 : g > 255 ? 255 : g;
+        b = b < 0 ? 0 : b > 255 ? 255 : b;
+        return self;
+      };
+      if (value) {
+        parse(value);
+      }
+      self.toRgb = toRgb;
+      self.toHsv = toHsv;
+      self.toHex = toHex;
+      self.parse = parse;
+      return self;
+    };
+
+    var serialize = function (obj) {
+      var data = JSON.stringify(obj);
+      if (!isString(data)) {
+        return data;
+      }
+      return data.replace(/[\u0080-\uFFFF]/g, function (match) {
+        var hexCode = match.charCodeAt(0).toString(16);
+        return '\\u' + '0000'.substring(hexCode.length) + hexCode;
+      });
+    };
+    var JSONUtils = {
+      serialize: serialize,
+      parse: function (text) {
+        try {
+          return JSON.parse(text);
+        } catch (ex) {
+        }
+      }
+    };
+
+    var JSONP = {
+      callbacks: {},
+      count: 0,
+      send: function (settings) {
+        var self = this, dom = DOMUtils$1.DOM, count = settings.count !== undefined ? settings.count : self.count;
+        var id = 'tinymce_jsonp_' + count;
+        self.callbacks[count] = function (json) {
+          dom.remove(id);
+          delete self.callbacks[count];
+          settings.callback(json);
+        };
+        dom.add(dom.doc.body, 'script', {
+          id: id,
+          src: settings.url,
+          type: 'text/javascript'
+        });
+        self.count++;
+      }
+    };
+
+    var XHR = __assign(__assign({}, Observable), {
+      send: function (settings) {
+        var xhr, count = 0;
+        var ready = function () {
+          if (!settings.async || xhr.readyState === 4 || count++ > 10000) {
+            if (settings.success && count < 10000 && xhr.status === 200) {
+              settings.success.call(settings.success_scope, '' + xhr.responseText, xhr, settings);
+            } else if (settings.error) {
+              settings.error.call(settings.error_scope, count > 10000 ? 'TIMED_OUT' : 'GENERAL', xhr, settings);
+            }
+            xhr = null;
+          } else {
+            Delay.setTimeout(ready, 10);
+          }
+        };
+        settings.scope = settings.scope || this;
+        settings.success_scope = settings.success_scope || settings.scope;
+        settings.error_scope = settings.error_scope || settings.scope;
+        settings.async = settings.async !== false;
+        settings.data = settings.data || '';
+        XHR.fire('beforeInitialize', { settings: settings });
+        xhr = new domGlobals.XMLHttpRequest();
+        if (xhr) {
+          if (xhr.overrideMimeType) {
+            xhr.overrideMimeType(settings.content_type);
+          }
+          xhr.open(settings.type || (settings.data ? 'POST' : 'GET'), settings.url, settings.async);
+          if (settings.crossDomain) {
+            xhr.withCredentials = true;
+          }
+          if (settings.content_type) {
+            xhr.setRequestHeader('Content-Type', settings.content_type);
+          }
+          if (settings.requestheaders) {
+            Tools.each(settings.requestheaders, function (header) {
+              xhr.setRequestHeader(header.key, header.value);
+            });
+          }
+          xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
+          xhr = XHR.fire('beforeSend', {
+            xhr: xhr,
+            settings: settings
+          }).xhr;
+          xhr.send(settings.data);
+          if (!settings.async) {
+            return ready();
+          }
+          Delay.setTimeout(ready, 10);
+        }
+      }
+    });
+
+    var extend$6 = Tools.extend;
+    var JSONRequest = function () {
+      function JSONRequest(settings) {
+        this.settings = extend$6({}, settings);
+        this.count = 0;
+      }
+      JSONRequest.sendRPC = function (o) {
+        return new JSONRequest().send(o);
+      };
+      JSONRequest.prototype.send = function (args) {
+        var ecb = args.error, scb = args.success;
+        var xhrArgs = extend$6(this.settings, args);
+        xhrArgs.success = function (c, x) {
+          c = JSONUtils.parse(c);
+          if (typeof c === 'undefined') {
+            c = { error: 'JSON Parse error.' };
+          }
+          if (c.error) {
+            ecb.call(xhrArgs.error_scope || xhrArgs.scope, c.error, x);
+          } else {
+            scb.call(xhrArgs.success_scope || xhrArgs.scope, c.result);
+          }
+        };
+        xhrArgs.error = function (ty, x) {
+          if (ecb) {
+            ecb.call(xhrArgs.error_scope || xhrArgs.scope, ty, x);
+          }
+        };
+        xhrArgs.data = JSONUtils.serialize({
+          id: args.id || 'c' + this.count++,
+          method: args.method,
+          params: args.params
+        });
+        xhrArgs.content_type = 'application/json';
+        XHR.send(xhrArgs);
+      };
+      return JSONRequest;
+    }();
+
+    var create$8 = function () {
+      return function () {
+        var data = {};
+        var keys = [];
+        var storage = {
+          getItem: function (key) {
+            var item = data[key];
+            return item ? item : null;
+          },
+          setItem: function (key, value) {
+            keys.push(key);
+            data[key] = String(value);
+          },
+          key: function (index) {
+            return keys[index];
+          },
+          removeItem: function (key) {
+            keys = keys.filter(function (k) {
+              return k === key;
+            });
+            delete data[key];
+          },
+          clear: function () {
+            keys = [];
+            data = {};
+          },
+          length: 0
+        };
+        Object.defineProperty(storage, 'length', {
+          get: function () {
+            return keys.length;
+          },
+          configurable: false,
+          enumerable: false
+        });
+        return storage;
+      }();
+    };
+
+    var localStorage;
+    try {
+      var test = '__storage_test__';
+      localStorage = domGlobals.window.localStorage;
+      localStorage.setItem(test, test);
+      localStorage.removeItem(test);
+    } catch (e) {
+      localStorage = create$8();
+    }
+    var LocalStorage = localStorage;
+
+    var publicApi = {
+      geom: { Rect: Rect },
+      util: {
+        Promise: promiseObj,
+        Delay: Delay,
+        Tools: Tools,
+        VK: VK,
+        URI: URI,
+        Class: Class,
+        EventDispatcher: EventDispatcher,
+        Observable: Observable,
+        I18n: I18n,
+        XHR: XHR,
+        JSON: JSONUtils,
+        JSONRequest: JSONRequest,
+        JSONP: JSONP,
+        LocalStorage: LocalStorage,
+        Color: Color
+      },
+      dom: {
+        EventUtils: EventUtils,
+        Sizzle: Sizzle,
+        DomQuery: DomQuery,
+        TreeWalker: TreeWalker,
+        TextSeeker: TextSeeker,
+        DOMUtils: DOMUtils$1,
+        ScriptLoader: ScriptLoader,
+        RangeUtils: RangeUtils$1,
+        Serializer: Serializer$1,
+        ControlSelection: ControlSelection,
+        BookmarkManager: BookmarkManager$1,
+        Selection: Selection$1,
+        Event: EventUtils.Event
+      },
+      html: {
+        Styles: Styles,
+        Entities: Entities,
+        Node: Node,
+        Schema: Schema,
+        SaxParser: SaxParser$1,
+        DomParser: DomParser,
+        Writer: Writer,
+        Serializer: Serializer
+      },
+      Env: Env,
+      AddOnManager: AddOnManager$1,
+      Annotator: Annotator,
+      Formatter: Formatter,
+      UndoManager: UndoManager,
+      EditorCommands: EditorCommands,
+      WindowManager: WindowManager,
+      NotificationManager: NotificationManager,
+      EditorObservable: EditorObservable,
+      Shortcuts: Shortcuts,
+      Editor: Editor,
+      FocusManager: FocusManager,
+      EditorManager: EditorManager,
+      DOM: DOMUtils$1.DOM,
+      ScriptLoader: ScriptLoader.ScriptLoader,
+      PluginManager: AddOnManager$1.PluginManager,
+      ThemeManager: AddOnManager$1.ThemeManager,
+      IconManager: IconManager,
+      Resource: Resource,
+      trim: Tools.trim,
+      isArray: Tools.isArray,
+      is: Tools.is,
+      toArray: Tools.toArray,
+      makeMap: Tools.makeMap,
+      each: Tools.each,
+      map: Tools.map,
+      grep: Tools.grep,
+      inArray: Tools.inArray,
+      extend: Tools.extend,
+      create: Tools.create,
+      walk: Tools.walk,
+      createNS: Tools.createNS,
+      resolve: Tools.resolve,
+      explode: Tools.explode,
+      _addCacheSuffix: Tools._addCacheSuffix,
+      isOpera: Env.opera,
+      isWebKit: Env.webkit,
+      isIE: Env.ie,
+      isGecko: Env.gecko,
+      isMac: Env.mac
+    };
+    var tinymce = Tools.extend(EditorManager, publicApi);
+
+    var exportToModuleLoaders = function (tinymce) {
+      if (typeof module === 'object') {
+        try {
+          module.exports = tinymce;
+        } catch (_) {
+        }
+      }
+    };
+    var exportToWindowGlobal = function (tinymce) {
+      window.tinymce = tinymce;
+      window.tinyMCE = tinymce;
+    };
+    exportToWindowGlobal(tinymce);
+    exportToModuleLoaders(tinymce);
+
+}(window));
+

--- /dev/null
+++ b/tinymce/5/js/tinymce/tinymce.min.js
@@ -1,1 +1,9 @@
-
+/**
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
+ * Licensed under the LGPL or a commercial license.
+ * For LGPL see License.txt in the project root for license information.
+ * For commercial licenses see https://www.tiny.cloud/
+ *
+ * Version: 5.3.2 (2020-06-10)
+ */
+!function(V){"use strict";var r=function(e){if(null===e)return"null";if(e===undefined)return"undefined";var t=typeof e;return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},t=function(e){return{eq:e}},s=t(function(e,t){return e===t}),i=function(o){return t(function(e,t){if(e.length!==t.length)return!1;for(var n=e.length,r=0;r<n;r++)if(!o.eq(e[r],t[r]))return!1;return!0})},c=function(e,r){return n=i(e),o=function(e){return t=e,n=r,Array.prototype.slice.call(t).sort(n);var t,n},t(function(e,t){return n.eq(o(e),o(t))});var n,o},u=function(u){return t(function(e,t){var n=Object.keys(e),r=Object.keys(t);if(!c(s).eq(n,r))return!1;for(var o=n.length,i=0;i<o;i++){var a=n[i];if(!u.eq(e[a],t[a]))return!1}return!0})},l=t(function(e,t){if(e===t)return!0;var n=r(e);return n===r(t)&&(-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(n)?e===t:"array"===n?i(l).eq(e,t):"object"===n&&u(l).eq(e,t))}),f=function(){},a=function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,e))}},x=function(e){return function(){return e}},d=function(e){return e};function N(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.concat(e);return r.apply(null,n)}}var e,n,o,m=function(t){return function(e){return!t(e)}},p=function(e){return function(){throw new Error(e)}},g=x(!1),h=x(!0),v=function(){return y},y=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:g,isSome:g,isNone:h,getOr:o=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:x(null),getOrUndefined:x(undefined),or:o,orThunk:n,map:v,each:f,bind:v,exists:g,forall:h,filter:v,equals:e,equals_:e,toArray:function(){return[]},toString:x("none()")}),b=function(n){var e=x(n),t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:h,isNone:g,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return b(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?o:y},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(g,function(e){return t(n,e)})}};return o},R={some:b,none:v,from:function(e){return null===e||e===undefined?y:b(e)}},C=function(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}},w=function(t){return function(e){return typeof e===t}},S=function(t){return function(e){return t===e}},q=C("string"),E=C("object"),k=C("array"),_=S(null),T=w("boolean"),A=S(undefined),D=w("function"),O=w("number"),B=Array.prototype.slice,P=Array.prototype.indexOf,L=Array.prototype.push,I=function(e,t){return P.call(e,t)},M=function(e,t){return-1<I(e,t)},F=function(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return!0}return!1},U=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},z=function(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n)}},j=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}},H=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n},$=function(e,t,n){return function(e,t){for(var n=e.length-1;0<=n;n--){t(e[n],n)}}(e,function(e){n=t(n,e)}),n},W=function(e,t,n){return z(e,function(e){n=t(n,e)}),n},K=function(e,t){return function(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(t(i,r))return R.some(i);if(n(i,r))break}return R.none()}(e,t,g)},X=function(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return R.some(n)}return R.none()},Y=function(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!k(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);L.apply(t,e[n])}return t}(U(e,t))},G=function(e,t){for(var n=0,r=e.length;n<r;++n){if(!0!==t(e[n],n))return!1}return!0},J=function(e){var t=B.call(e,0);return t.reverse(),t},Q=function(e,t){return H(e,function(e){return!M(t,e)})},Z=function(e){return 0===e.length?R.none():R.some(e[0])},ee=function(e){return 0===e.length?R.none():R.some(e[e.length-1])},te=D(Array.from)?Array.from:function(e){return B.call(e)},ne=Object.keys,re=Object.hasOwnProperty,oe=function(e,t){for(var n=ne(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}},ie=function(e,n){return ae(e,function(e,t){return{k:t,v:n(e,t)}})},ae=function(e,r){var o={};return oe(e,function(e,t){var n=r(e,t);o[n.k]=n.v}),o},ue=function(n){return function(e,t){n[t]=e}},se=function(e,n,r,o){return oe(e,function(e,t){(n(e,t)?r:o)(e,t)}),{}},ce=function(e,t){var n={},r={};return se(e,t,ue(n),ue(r)),{t:n,f:r}},le=function(e,t){var n={};return se(e,t,ue(n),f),n},fe=function(e){return n=function(e){return e},r=[],oe(e,function(e,t){r.push(n(e,t))}),r;var n,r},de=function(e,t){return me(e,t)?R.from(e[t]):R.none()},me=function(e,t){return re.call(e,t)},pe=function(){return(pe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function ge(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}var he,ve,ye,be,Ce,we,xe,Se=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:x(e)}},Ne={fromHtml:function(e,t){var n=(t||V.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw V.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Se(n.childNodes[0])},fromTag:function(e,t){var n=(t||V.document).createElement(e);return Se(n)},fromText:function(e,t){var n=(t||V.document).createTextNode(e);return Se(n)},fromDom:Se,fromPoint:function(e,t,n){var r=e.dom();return R.from(r.elementFromPoint(t,n)).map(Se)}},Ee=function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}return undefined}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return _e(r(1),r(2))},ke=function(){return _e(0,0)},_e=function(e,t){return{major:e,minor:t}},Re={nu:_e,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?ke():Ee(e,n)},unknown:ke},Te="Firefox",Ae=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isEdge:r("Edge"),isChrome:r("Chrome"),isIE:r("IE"),isOpera:r("Opera"),isFirefox:r(Te),isSafari:r("Safari")}},De={unknown:function(){return Ae({current:undefined,version:Re.unknown()})},nu:Ae,edge:x("Edge"),chrome:x("Chrome"),ie:x("IE"),opera:x("Opera"),firefox:x(Te),safari:x("Safari")},Oe="Windows",Be="Android",Pe="Solaris",Le="FreeBSD",Ie="ChromeOS",Me=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isWindows:r(Oe),isiOS:r("iOS"),isAndroid:r(Be),isOSX:r("OSX"),isLinux:r("Linux"),isSolaris:r(Pe),isFreeBSD:r(Le),isChromeOS:r(Ie)}},Fe={unknown:function(){return Me({current:undefined,version:Re.unknown()})},nu:Me,windows:x(Oe),ios:x("iOS"),android:x(Be),linux:x("Linux"),osx:x("OSX"),solaris:x(Pe),freebsd:x(Le),chromeos:x(Ie)},Ue=function(e,t){var n=String(t).toLowerCase();return K(e,function(e){return e.search(n)})},ze=function(e,n){return Ue(e,n).map(function(e){var t=Re.detect(e.versionRegexes,n);return{current:e.name,version:t}})},je=function(e,n){return Ue(e,n).map(function(e){var t=Re.detect(e.versionRegexes,n);return{current:e.name,version:t}})},He=function(e,t){return-1!==e.indexOf(t)},Ve=function(e,t){return n=e,o=0,""===(r=t)||n.length>=r.length&&n.substr(o,o+r.length)===r;var n,r,o},qe=function(t){return function(e){return e.replace(t,"")}},$e=qe(/^\s+|\s+$/g),We=qe(/^\s+/g),Ke=qe(/\s+$/g),Xe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ye=function(t){return function(e){return He(e,t)}},Ge=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return He(e,"edge/")&&He(e,"chrome")&&He(e,"safari")&&He(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Xe],search:function(e){return He(e,"chrome")&&!He(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return He(e,"msie")||He(e,"trident")}},{name:"Opera",versionRegexes:[Xe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ye("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ye("firefox")},{name:"Safari",versionRegexes:[Xe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(He(e,"safari")||He(e,"mobile/"))&&He(e,"applewebkit")}}],Je=[{name:"Windows",search:Ye("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return He(e,"iphone")||He(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ye("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ye("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ye("linux"),versionRegexes:[]},{name:"Solaris",search:Ye("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ye("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Ye("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Qe={browsers:x(Ge),oses:x(Je)},Ze=function(e,t){var n,r,o,i,a,u,s,c,l,f,d,m,p=Qe.browsers(),g=Qe.oses(),h=ze(p,e).fold(De.unknown,De.nu),v=je(g,e).fold(Fe.unknown,Fe.nu);return{browser:h,os:v,deviceType:(r=h,o=e,i=t,a=(n=v).isiOS()&&!0===/ipad/i.test(o),u=n.isiOS()&&!a,s=n.isiOS()||n.isAndroid(),c=s||i("(pointer:coarse)"),l=a||!u&&s&&i("(min-device-width:768px)"),f=u||s&&!l,d=r.isSafari()&&n.isiOS()&&!1===/safari/i.test(o),m=!f&&!l&&!d,{isiPad:x(a),isiPhone:x(u),isTablet:x(l),isPhone:x(f),isTouch:x(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:x(d),isDesktop:x(m)})}},et=function(e){return V.window.matchMedia(e).matches},tt=(ye=!(he=function(){return Ze(V.navigator.userAgent,et)}),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ye||(ye=!0,ve=he.apply(null,e)),ve}),nt=function(){return tt()},rt=function(e,t){for(var n=[],r=function(e){return n.push(e),t(e)},o=t(e);(o=o.bind(r)).isSome(););return n},ot=function(e,t){var n=e.dom();if(1!==n.nodeType)return!1;var r=n;if(r.matches!==undefined)return r.matches(t);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},it=function(e){return 1!==e.nodeType&&9!==e.nodeType||0===e.childElementCount},at=function(e,t){return e.dom()===t.dom()},ut=function(e,t){return n=e.dom(),r=t.dom(),o=n,i=r,a=V.Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(o.compareDocumentPosition(i)&a);var n,r,o,i,a},st=function(e,t){return nt().browser.isIE()?ut(e,t):(n=t,r=e.dom(),o=n.dom(),r!==o&&r.contains(o));var n,r,o},ct=function(e){return Ne.fromDom(e.dom().ownerDocument)},lt=function(e){return Ne.fromDom(e.dom().ownerDocument.defaultView)},ft=function(e){return R.from(e.dom().parentNode).map(Ne.fromDom)},dt=function(e){return R.from(e.dom().previousSibling).map(Ne.fromDom)},mt=function(e){return R.from(e.dom().nextSibling).map(Ne.fromDom)},pt=function(e){return J(rt(e,dt))},gt=function(e){return rt(e,mt)},ht=function(e){return U(e.dom().childNodes,Ne.fromDom)},vt=function(e,t){var n=e.dom().childNodes;return R.from(n[t]).map(Ne.fromDom)},yt=function(e){return vt(e,0)},bt=function(e){return vt(e,e.dom().childNodes.length-1)},Ct=function(t,n){ft(t).each(function(e){e.dom().insertBefore(n.dom(),t.dom())})},wt=function(e,t){mt(e).fold(function(){ft(e).each(function(e){St(e,t)})},function(e){Ct(e,t)})},xt=function(t,n){yt(t).fold(function(){St(t,n)},function(e){t.dom().insertBefore(n.dom(),e.dom())})},St=function(e,t){e.dom().appendChild(t.dom())},Nt=function(t,e){z(e,function(e){St(t,e)})},Et=function(e){e.dom().textContent="",z(ht(e),function(e){kt(e)})},kt=function(e){var t=e.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},_t=function(e){var t,n=ht(e);0<n.length&&(t=e,z(n,function(e){Ct(t,e)})),kt(e)},Rt=("undefined"!=typeof V.window?V.window:Function("return this;")(),function(e){return e.dom().nodeName.toLowerCase()}),Tt=function(e){return e.dom().nodeType},At=function(t){return function(e){return Tt(e)===t}},Dt=At(1),Ot=At(3),Bt=function(e){var t=Ot(e)?e.dom().parentNode:e.dom();return t!==undefined&&null!==t&&t.ownerDocument.body.contains(t)},Pt=function(n,r){return{left:x(n),top:x(r),translate:function(e,t){return Pt(n+e,r+t)}}},Lt=Pt,It=function(e,t){return e!==undefined?e:t!==undefined?t:0},Mt=function(e){var t,n=e.dom(),r=n.ownerDocument.body;return r===n?Lt(r.offsetLeft,r.offsetTop):Bt(e)?(t=n.getBoundingClientRect(),Lt(t.left,t.top)):Lt(0,0)},Ft=function(e){var t=e!==undefined?e.dom():V.document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return Lt(n,r)},Ut=function(e,t,n){(n!==undefined?n.dom():V.document).defaultView.scrollTo(e,t)},zt=function(e,t){nt().browser.isSafari()&&D(e.dom().scrollIntoViewIfNeeded)?e.dom().scrollIntoViewIfNeeded(!1):e.dom().scrollIntoView(t)},jt=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Ht=function(e){var t,n,r=e===undefined?V.window:e,o=r.document,i=Ft(Ne.fromDom(o));return n=(t=r)===undefined?V.window:t,R.from(n.visualViewport).fold(function(){var e=r.document.documentElement,t=e.clientWidth,n=e.clientHeight;return jt(i.left(),i.top(),t,n)},function(e){return jt(Math.max(e.pageLeft,i.left()),Math.max(e.pageTop,i.top()),e.width,e.height)})},Vt=function(t){return function(e){return!!e&&e.nodeType===t}},qt=function(e){return!!e&&!Object.getPrototypeOf(e)},$t=Vt(1),Wt=function(e){var n=e.map(function(e){return e.toLowerCase()});return function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();return M(n,t)}return!1}},Kt=function(r,e){var o=e.toLowerCase().split(" ");return function(e){var t;if($t(e))for(t=0;t<o.length;t++){var n=e.ownerDocument.defaultView.getComputedStyle(e,null);if((n?n.getPropertyValue(r):null)===o[t])return!0}return!1}},Xt=function(t){return function(e){return $t(e)&&e.hasAttribute(t)}},Yt=function(e){return $t(e)&&e.hasAttribute("data-mce-bogus")},Gt=function(e){return $t(e)&&"TABLE"===e.tagName},Jt=function(t){return function(e){if($t(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},Qt=Wt(["textarea","input"]),Zt=Vt(3),en=Vt(8),tn=Vt(9),nn=Vt(11),rn=Wt(["br"]),on=Jt("true"),an=Jt("false"),un=function(e){return e.style!==undefined&&D(e.style.getPropertyValue)},sn=function(e,t,n){if(!(q(n)||T(n)||O(n)))throw V.console.error("Invalid call to Attr.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},cn=function(e,t,n){sn(e.dom(),t,n)},ln=function(e,t){var n=e.dom();oe(t,function(e,t){sn(n,t,e)})},fn=function(e,t){var n=e.dom().getAttribute(t);return null===n?undefined:n},dn=function(e,t){e.dom().removeAttribute(t)},mn=function(e,t){var n=e.dom(),r=V.window.getComputedStyle(n).getPropertyValue(t);return""!==r||Bt(e)?r:pn(n,t)},pn=function(e,t){return un(e)?e.style.getPropertyValue(t):""},gn=function(e,t){var n=e.dom(),r=pn(n,t);return R.from(r).filter(function(e){return 0<e.length})},hn=nt().browser,vn=function(e){return K(e,Dt)},yn=function(e,t){return e.children&&M(e.children,t)},bn=function(e,t,n){var r,o,i,a=0,u=0,s=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===mn(Ne.fromDom(e),"position"))return{x:a=(o=t.getBoundingClientRect()).left+(s.documentElement.scrollLeft||e.scrollLeft)-s.documentElement.clientLeft,y:u=o.top+(s.documentElement.scrollTop||e.scrollTop)-s.documentElement.clientTop};for(r=t;r&&r!==n&&r.nodeType&&!yn(r,n);)a+=r.offsetLeft||0,u+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!==n&&r.nodeType&&!yn(r,n);)a-=r.scrollLeft||0,u-=r.scrollTop||0,r=r.parentNode;u+=(i=Ne.fromDom(t),hn.isFirefox()&&"table"===Rt(i)?vn(ht(i)).filter(function(e){return"caption"===Rt(e)}).bind(function(o){return vn(gt(o)).map(function(e){var t=e.dom().offsetTop,n=o.dom().offsetTop,r=o.dom().offsetHeight;return t<=n?-r:0})}).getOr(0):0)}return{x:a,y:u}},Cn={},wn={exports:Cn};be=undefined,Ce=Cn,we=wn,xe=undefined,function(e){if("object"==typeof Ce&&void 0!==we)we.exports=e();else if("function"==typeof be&&be.amd)be([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}}(function(){return function l(i,a,u){function s(t,e){if(!a[t]){if(!i[t]){var n="function"==typeof xe&&xe;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=a[t]={exports:{}};i[t][0].call(o.exports,function(e){return s(i[t][1][e]||e)},o,o.exports,l,i,a,u)}return a[t].exports}for(var c="function"==typeof xe&&xe,e=0;e<u.length;e++)s(u[e]);return s}({1:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(e){o=u}}();var c,l=[],f=!1,d=-1;function m(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&p())}function p(){if(!f){var e=s(m);f=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,f=!1,function n(e){if(o===clearTimeout)return clearTimeout(e);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{return o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function h(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new g(e,t)),1!==l.length||f||s(p)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(e,f,t){(function(t){function r(){}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(e,this)}function o(r,o){for(;3===r._state;)r=r._value;0!==r._state?(r._handled=!0,i._immediateFn(function(){var e=1===r._state?o.onFulfilled:o.onRejected;if(null!==e){var t;try{t=e(r._value)}catch(n){return void u(o.promise,n)}a(o.promise,t)}else(1===r._state?a:u)(o.promise,r._value)})):r._deferreds.push(o)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof i)return e._state=3,e._value=t,void s(e);if("function"==typeof n)return void l(function r(e,t){return function(){e.apply(t,arguments)}}(n,t),e)}e._state=1,e._value=t,s(e)}catch(o){u(e,o)}}function u(e,t){e._state=2,e._value=t,s(e)}function s(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function c(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function l(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,u(t,e))})}catch(r){if(n)return;n=!0,u(t,r)}}var e,n;e=this,n=setTimeout,i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(r);return o(this,new c(e,t,n)),n},i.all=function(e){var s=Array.prototype.slice.call(e);return new i(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},i._immediateFn="function"==typeof t?function(e){t(e)}:function(e){n(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},void 0!==f&&f.exports?f.exports=i:e.Promise||(e.Promise=i)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(s,e,c){(function(e,t){var r=s("process/browser.js").nextTick,n=Function.prototype.apply,o=Array.prototype.slice,i={},a=0;function u(e,t){this._id=e,this._clearFn=t}c.setTimeout=function(){return new u(n.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new u(n.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},c.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},c._unrefActive=c.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},c.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&o.call(arguments,1);return i[t]=!0,r(function(){i[t]&&(n?e.apply(null,n):e.call(null),c.clearImmediate(t))}),t},c.clearImmediate="function"==typeof t?t:function(e){delete i[e]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){var r=e("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});var xn,Sn,Nn,En,kn=wn.exports.boltExport,_n=function(e){var n=R.none(),t=[],r=function(e){o()?a(e):t.push(e)},o=function(){return n.isSome()},i=function(e){z(e,a)},a=function(t){n.each(function(e){V.setTimeout(function(){t(e)},0)})};return e(function(e){n=R.some(e),i(t),t=[]}),{get:r,map:function(n){return _n(function(t){r(function(e){t(n(e))})})},isReady:o}},Rn={nu:_n,pure:function(t){return _n(function(e){e(t)})}},Tn=function(e){V.setTimeout(function(){throw e},0)},An=function(n){var e=function(e){n().then(e,Tn)};return{map:function(e){return An(function(){return n().then(e)})},bind:function(t){return An(function(){return n().then(function(e){return t(e).toPromise()})})},anonBind:function(e){return An(function(){return n().then(function(){return e.toPromise()})})},toLazy:function(){return Rn.nu(e)},toCached:function(){var e=null;return An(function(){return null===e&&(e=n()),e})},toPromise:n,get:e}},Dn={nu:function(e){return An(function(){return new kn(e)})},pure:function(e){return An(function(){return kn.resolve(e)})}},On=function(a,e){return e(function(r){var o=[],i=0;0===a.length?r([]):z(a,function(e,t){var n;e.get((n=t,function(e){o[n]=e,++i>=a.length&&r(o)}))})})},Bn=function(e){return On(e,Dn.nu)},Pn=function(n){return{is:function(e){return n===e},isValue:h,isError:g,getOr:x(n),getOrThunk:x(n),getOrDie:x(n),or:function(e){return Pn(n)},orThunk:function(e){return Pn(n)},fold:function(e,t){return t(n)},map:function(e){return Pn(e(n))},mapError:function(e){return Pn(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return R.some(n)}}},Ln=function(n){return{is:g,isValue:g,isError:h,getOr:d,getOrThunk:function(e){return e()},getOrDie:function(){return p(String(n))()},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return Ln(n)},mapError:function(e){return Ln(e(n))},each:f,bind:function(e){return Ln(n)},exists:g,forall:h,toOption:R.none}},In={value:Pn,error:Ln,fromOption:function(e,t){return e.fold(function(){return Ln(t)},Pn)}},Mn=window.Promise?window.Promise:(xn=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Nn=(Sn=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],qn(e,Fn(zn,this),Fn(jn,this))}).immediateFn||"function"==typeof V.setImmediate&&V.setImmediate||function(e){V.setTimeout(e,1)},Sn.prototype["catch"]=function(e){return this.then(null,e)},Sn.prototype.then=function(n,r){var o=this;return new Sn(function(e,t){Un.call(o,new Vn(n,r,e,t))})},Sn.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&xn(arguments[0])?arguments[0]:arguments);return new Sn(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},Sn.resolve=function(t){return t&&"object"==typeof t&&t.constructor===Sn?t:new Sn(function(e){e(t)})},Sn.reject=function(n){return new Sn(function(e,t){t(n)})},Sn.race=function(o){return new Sn(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},Sn);function Fn(e,t){return function(){e.apply(t,arguments)}}function Un(r){var o=this;null!==this._state?Nn(function(){var e=o._state?r.onFulfilled:r.onRejected;if(null!==e){var t;try{t=e(o._value)}catch(n){return void r.reject(n)}r.resolve(t)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function zn(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void qn(Fn(t,e),Fn(zn,this),Fn(jn,this))}this._state=!0,this._value=e,Hn.call(this)}catch(n){jn.call(this,n)}}function jn(e){this._state=!1,this._value=e,Hn.call(this)}function Hn(){for(var e=0,t=this._deferreds.length;e<t;e++)Un.call(this,this._deferreds[e]);this._deferreds=null}function Vn(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function qn(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(o){if(r)return;r=!0,n(o)}}var $n=function(e,t){return"number"!=typeof t&&(t=0),V.setTimeout(e,t)},Wn=function(e,t){return"number"!=typeof t&&(t=1),V.setInterval(e,t)},Kn=function(n,r){var o,e;return(e=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];V.clearTimeout(o),o=$n(function(){n.apply(this,e)},r)}).stop=function(){V.clearTimeout(o)},e},Xn={requestAnimationFrame:function(e,t){En?En.then(e):En=new Mn(function(e){!function(e,t){var n,r=V.window.requestAnimationFrame,o=["ms","moz","webkit"];for(n=0;n<o.length&&!r;n++)r=V.window[o[n]+"RequestAnimationFrame"];(r=r||function(e){V.window.setTimeout(e,0)})(e,t)}(e,t=t||V.document.body)}).then(e)},setTimeout:$n,setInterval:Wn,setEditorTimeout:function(e,t,n){return $n(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var r;return r=Wn(function(){e.removed?V.clearInterval(r):t()},n)},debounce:Kn,throttle:Kn,clearInterval:function(e){return V.clearInterval(e)},clearTimeout:function(e){return V.clearTimeout(e)}},Yn=V.navigator.userAgent,Gn=nt(),Jn=Gn.browser,Qn=Gn.os,Zn=Gn.deviceType,er=/WebKit/.test(Yn)&&!Jn.isEdge(),tr="FormData"in V.window&&"FileReader"in V.window&&"URL"in V.window&&!!V.URL.createObjectURL,nr=-1!==Yn.indexOf("Windows Phone"),rr={opera:Jn.isOpera(),webkit:er,ie:!(!Jn.isIE()&&!Jn.isEdge())&&Jn.version.major,gecko:Jn.isFirefox(),mac:Qn.isOSX()||Qn.isiOS(),iOS:Zn.isiPad()||Zn.isiPhone(),android:Qn.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:V.window.getSelection&&"Range"in V.window,documentMode:Jn.isIE()?V.document.documentMode||7:10,fileApi:tr,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Jn.isIE(),desktop:Zn.isDesktop(),windowsPhone:nr,browser:{current:Jn.current,version:Jn.version,isChrome:Jn.isChrome,isEdge:Jn.isEdge,isFirefox:Jn.isFirefox,isIE:Jn.isIE,isOpera:Jn.isOpera,isSafari:Jn.isSafari},os:{current:Qn.current,version:Qn.version,isAndroid:Qn.isAndroid,isChromeOS:Qn.isChromeOS,isFreeBSD:Qn.isFreeBSD,isiOS:Qn.isiOS,isLinux:Qn.isLinux,isOSX:Qn.isOSX,isSolaris:Qn.isSolaris,isWindows:Qn.isWindows},deviceType:{isDesktop:Zn.isDesktop,isiPad:Zn.isiPad,isiPhone:Zn.isiPhone,isPhone:Zn.isPhone,isTablet:Zn.isTablet,isTouch:Zn.isTouch,isWebView:Zn.isWebView}},or=Array.isArray,ir=function(e,t,n){var r,o;if(!e)return 0;if(n=n||e,e.length!==undefined){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return 0}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return 0;return 1},ar=function(n,r){var o=[];return ir(n,function(e,t){o.push(r(e,t,n))}),o},ur=function(n,r){var o=[];return ir(n,function(e,t){r&&!r(e,t,n)||o.push(e)}),o},sr=function(e,t){var n,r;if(e)for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},cr=function(e,t,n,r){var o=0;for(arguments.length<3&&(n=e[0]);o<e.length;o++)n=t.call(r,n,e[o],o);return n},lr=function(e,t,n){var r,o;for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return r;return-1},fr=function(e){return e[e.length-1]},dr=/^\s*|\s*$/g,mr=function(e){return null===e||e===undefined?"":(""+e).replace(dr,"")},pr=function(e,t){return t?!("array"!==t||!or(e))||typeof e===t:e!==undefined},gr=function(e,n,r,o){o=o||this,e&&(r&&(e=e[r]),ir(e,function(e,t){if(!1===n.call(o,e,t,r))return!1;gr(e,n,r,o)}))},hr={trim:mr,isArray:or,is:pr,toArray:function(e){var t,n,r=e;if(!or(e))for(r=[],t=0,n=e.length;t<n;t++)r[t]=e[t];return r},makeMap:function(e,t,n){var r;for(t=t||",","string"==typeof(e=e||[])&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},each:ir,map:ar,grep:ur,inArray:sr,hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},extend:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var o=t[r];for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];a!==undefined&&(e[i]=a)}}return e},create:function(e,t,n){var r,o,i,a,u,s=this,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),i=e[3].match(/(^|\.)(\w+)$/i)[2],!(o=s.createNS(e[3].replace(/\.\w+$/,""),n))[i]){if("static"===e[2])return o[i]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[i]));t[i]||(t[i]=function(){},c=1),o[i]=t[i],s.extend(o[i].prototype,t),e[5]&&(r=s.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],u=o[i],o[i]=c?function(){return r[a].apply(this,arguments)}:function(){return this.parent=r[a],u.apply(this,arguments)},o[i].prototype[i]=o[i],s.each(r,function(e,t){o[i].prototype[t]=r[t]}),s.each(t,function(e,t){r[t]?o[i].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!==i&&(o[i].prototype[t]=e)})),s.each(t["static"],function(e,t){o[i][t]=e})}},walk:gr,createNS:function(e,t){var n,r;for(t=t||V.window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t},resolve:function(e,t){var n,r;for(t=t||V.window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||pr(e,"array")?e:ar(e.split(t||","),mr)},_addCacheSuffix:function(e){var t=rr.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}};function vr(p,g){void 0===g&&(g={});var h,v=0,y={};h=g.maxLoadTime||5e3;var b=function(e){p.getElementsByTagName("head")[0].appendChild(e)},n=function(e,t,n){var o,r,i,a,u=function(e){a.status=e,a.passed=[],a.failed=[],o&&(o.onload=null,o.onerror=null,o=null)},s=function(){for(var e=a.passed,t=e.length;t--;)e[t]();u(2)},c=function(){for(var e=a.failed,t=e.length;t--;)e[t]();u(3)},l=function(e,t){e()||((new Date).getTime()-i<h?Xn.setTimeout(t):c())},f=function(){l(function(){for(var e,t,n=p.styleSheets,r=n.length;r--;)if((t=(e=n[r]).ownerNode?e.ownerNode:e.owningElement)&&t.id===o.id)return s(),1},f)},d=function(){l(function(){try{var e=r.sheet.cssRules;return s(),e}catch(t){}},d)};if(e=hr._addCacheSuffix(e),y[e]?a=y[e]:(a={passed:[],failed:[]},y[e]=a),t&&a.passed.push(t),n&&a.failed.push(n),1!==a.status)if(2!==a.status)if(3!==a.status){if(a.status=1,(o=p.createElement("link")).rel="stylesheet",o.type="text/css",o.id="u"+v++,o.async=!1,o.defer=!1,i=(new Date).getTime(),g.contentCssCors&&(o.crossOrigin="anonymous"),g.referrerPolicy&&cn(Ne.fromDom(o),"referrerpolicy",g.referrerPolicy),"onload"in o&&!((m=V.navigator.userAgent.match(/WebKit\/(\d*)/))&&parseInt(m[1],10)<536))o.onload=f,o.onerror=c;else{if(0<V.navigator.userAgent.indexOf("Firefox"))return(r=p.createElement("style")).textContent='@import "'+e+'"',d(),void b(r);f()}var m;b(o),o.href=e}else c();else s()},t=function(t){return Dn.nu(function(e){n(t,a(e,x(In.value(t))),a(e,x(In.error(t))))})},o=function(e){return e.fold(d,d)};return{load:n,loadAll:function(e,n,r){Bn(U(e,t)).get(function(e){var t=j(e,function(e){return e.isValue()});0<t.fail.length?r(t.fail.map(o)):n(t.pass.map(o))})},_setReferrerPolicy:function(e){g.referrerPolicy=e}}}var yr,br,Cr,wr=function(t){var n;return function(e){return(n=n||function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}(t,x(!0))).hasOwnProperty(Rt(e))}},xr=wr(["h1","h2","h3","h4","h5","h6"]),Sr=wr(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),Nr=function(e){return Dt(e)&&!Sr(e)},Er=function(e){return Dt(e)&&"br"===Rt(e)},kr=wr(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),_r=wr(["ul","ol","dl"]),Rr=wr(["li","dd","dt"]),Tr=wr(["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"]),Ar=wr(["thead","tbody","tfoot"]),Dr=wr(["td","th"]),Or=wr(["pre","script","textarea","style"]),Br=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},Pr=function(e,t){var n,r=t.childNodes;if(!$t(t)||!Br(t)){for(n=r.length-1;0<=n;n--)Pr(e,r[n]);if(!1===tn(t)){if(Zt(t)&&0<t.nodeValue.length){var o=hr.trim(t.nodeValue).length;if(e.isBlock(t.parentNode)||0<o)return;if(0===o&&(a=(i=t).previousSibling&&"SPAN"===i.previousSibling.nodeName,u=i.nextSibling&&"SPAN"===i.nextSibling.nodeName,a&&u))return}else if($t(t)&&(1===(r=t.childNodes).length&&Br(r[0])&&t.parentNode.insertBefore(r[0],t),r.length||Tr(Ne.fromDom(t))))return;e.remove(t)}var i,a,u;return t}},Lr=hr.makeMap,Ir=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Mr=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Fr=/[<>&\"\']/g,Ur=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,zr={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};br={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},Cr={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};var jr=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),br[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}};yr=jr("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var Hr=function(e,t){return e.replace(t?Ir:Mr,function(e){return br[e]||e})},Vr=function(e,t){return e.replace(t?Ir:Mr,function(e){return 1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":br[e]||"&#"+e.charCodeAt(0)+";"})},qr=function(e,t,n){return n=n||yr,e.replace(t?Ir:Mr,function(e){return br[e]||n[e]||e})},$r={encodeRaw:Hr,encodeAllRaw:function(e){return(""+e).replace(Fr,function(e){return br[e]||e})},encodeNumeric:Vr,encodeNamed:qr,getEncodeFunc:function(e,t){var n=jr(t)||yr,r=Lr(e.replace(/\+/g,","));return r.named&&r.numeric?function(e,t){return e.replace(t?Ir:Mr,function(e){return br[e]!==undefined?br[e]:n[e]!==undefined?n[e]:1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"})}:r.named?t?function(e,t){return qr(e,t,n)}:qr:r.numeric?Vr:Hr},decode:function(e){return e.replace(Ur,function(e,t){return t?65535<(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):zr[t]||String.fromCharCode(t):Cr[e]||yr[e]||(n=e,(r=Ne.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},Wr={},Kr={},Xr=hr.makeMap,Yr=hr.each,Gr=hr.extend,Jr=hr.explode,Qr=hr.inArray,Zr=function(e,t){return(e=hr.trim(e))?e.split(t||" "):[]},eo=function(e){var u,t,n,r,o,i,s={},a=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n<r;n++)o[e[n]]=t||{};return o};for(t=t||"","string"==typeof(n=n||[])&&(n=Zr(n)),r=(e=Zr(e)).length;r--;)i={attributes:a(o=Zr([u,t].join(" "))),attributesOrder:o,children:a(n,Kr)},s[e[r]]=i},c=function(e,t){var n,r,o,i;for(n=(e=Zr(e)).length,t=Zr(t);n--;)for(r=s[e[n]],o=0,i=t.length;o<i;o++)r.attributes[t[o]]={},r.attributesOrder.push(t[o])};return Wr[e]?Wr[e]:(u="id accesskey class dir lang style tabindex title role",t="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",n="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==e&&(u+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",t+=" article aside details dialog figure main header footer hgroup section nav",n+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==e&&(u+=" xml:lang",n=[n,i="acronym applet basefont big font strike tt"].join(" "),Yr(Zr(i),function(e){a(e,"",n)}),t=[t,o="center dir isindex noframes"].join(" "),r=[t,n].join(" "),Yr(Zr(o),function(e){a(e,"",r)})),r=r||[t,n].join(" "),a("html","manifest","head body"),a("head","","base command link meta noscript script style title"),a("title hr noscript br"),a("base","href target"),a("link","href rel media hreflang type sizes hreflang"),a("meta","name http-equiv content charset"),a("style","media type scoped"),a("script","src async defer type charset"),a("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",r),a("address dt dd div caption","",r),a("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",n),a("blockquote","cite",r),a("ol","reversed start type","li"),a("ul","","li"),a("li","value",r),a("dl","","dt dd"),a("a","href target rel media hreflang type",n),a("q","cite",n),a("ins del","cite datetime",r),a("img","src sizes srcset alt usemap ismap width height"),a("iframe","src name width height",r),a("embed","src type width height"),a("object","data type typemustmatch name usemap form width height",[r,"param"].join(" ")),a("param","name value"),a("map","name",[r,"area"].join(" ")),a("area","alt coords shape href target rel media hreflang type"),a("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),a("colgroup","span","col"),a("col","span"),a("tbody thead tfoot","","tr"),a("tr","","td th"),a("td","colspan rowspan headers",r),a("th","colspan rowspan headers scope abbr",r),a("form","accept-charset action autocomplete enctype method name novalidate target",r),a("fieldset","disabled form name",[r,"legend"].join(" ")),a("label","form for",n),a("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),a("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?r:n),a("select","disabled form multiple name required size","option optgroup"),a("optgroup","disabled label","option"),a("option","disabled label selected value"),a("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),a("menu","type label",[r,"li"].join(" ")),a("noscript","",r),"html4"!==e&&(a("wbr"),a("ruby","",[n,"rt rp"].join(" ")),a("figcaption","",r),a("mark rt rp summary bdi","",n),a("canvas","width height",r),a("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[r,"track source"].join(" ")),a("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[r,"track source"].join(" ")),a("picture","","img source"),a("source","src srcset type media sizes"),a("track","kind src srclang label default"),a("datalist","",[n,"option"].join(" ")),a("article section nav aside main header footer","",r),a("hgroup","","h1 h2 h3 h4 h5 h6"),a("figure","",[r,"figcaption"].join(" ")),a("time","datetime",n),a("dialog","open",r),a("command","type label icon disabled checked radiogroup command"),a("output","for form name",n),a("progress","value max",n),a("meter","value min max low high optimum",n),a("details","open",[r,"summary"].join(" ")),a("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==e&&(c("script","language xml:space"),c("style","xml:space"),c("object","declare classid code codebase codetype archive standby align border hspace vspace"),c("embed","align name hspace vspace"),c("param","valuetype type"),c("a","charset name rev shape coords"),c("br","clear"),c("applet","codebase archive code object alt name width height align hspace vspace"),c("img","name longdesc align border hspace vspace"),c("iframe","longdesc frameborder marginwidth marginheight scrolling align"),c("font basefont","size color face"),c("input","usemap align"),c("select"),c("textarea"),c("h1 h2 h3 h4 h5 h6 div p legend caption","align"),c("ul","type compact"),c("li","type"),c("ol dl menu dir","compact"),c("pre","width xml:space"),c("hr","align noshade size width"),c("isindex","prompt"),c("table","summary width frame rules cellspacing cellpadding align bgcolor"),c("col","width align char charoff valign"),c("colgroup","width align char charoff valign"),c("thead","align char charoff valign"),c("tr","align char charoff valign bgcolor"),c("th","axis align char charoff valign nowrap bgcolor width height"),c("form","accept"),c("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),c("tfoot","align char charoff valign"),c("tbody","align char charoff valign"),c("area","nohref"),c("body","background bgcolor text link vlink alink")),"html4"!==e&&(c("input button select textarea","autofocus"),c("input textarea","placeholder"),c("a","download"),c("link script img","crossorigin"),c("img","loading"),c("iframe","sandbox seamless allowfullscreen loading")),Yr(Zr("a form meter progress dfn"),function(e){s[e]&&delete s[e].children[e]}),delete s.caption.children.table,delete s.script,Wr[e]=s)},to=function(e,n){var r;return e&&(r={},"string"==typeof e&&(e={"*":e}),Yr(e,function(e,t){r[t]=r[t.toUpperCase()]=("map"===n?Xr:Jr)(e,/[, ]/)})),r};function no(i){var e,t,n,r,o,a,u,s,c,l,f,d,m,x={},p={},S=[],g={},h={},v=function(e,t,n){var r=i[e];return r?r=Xr(r,/[, ]/,Xr(r.toUpperCase(),/[, ]/)):(r=Wr[e])||(r=Xr(t," ",Xr(t.toUpperCase()," ")),r=Gr(r,n),Wr[e]=r),r};n=eo((i=i||{}).schema),!1===i.verify_html&&(i.valid_elements="*[*]"),e=to(i.valid_styles),t=to(i.invalid_styles,"map"),s=to(i.valid_classes,"map"),r=v("whitespace_elements","pre script noscript style textarea video audio iframe object code"),o=v("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),a=v("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),u=v("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),l=v("non_empty_elements","td th iframe video audio object script pre code",a),f=v("move_caret_before_on_enter_elements","table",l),d=v("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),c=v("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",d),m=v("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),Yr((i.special||"script noscript noframes noembed title style textarea xmp").split(" "),function(e){h[e]=new RegExp("</"+e+"[^>]*>","gi")});var N=function(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")},y=function(e){var t,n,r,o,i,a,u,s,c,l,f,d,m,p,g,h,v,y,b=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,C=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,w=/[*?+]/;if(e)for(e=Zr(e,","),x["@"]&&(h=x["@"].attributes,v=x["@"].attributesOrder),t=0,n=e.length;t<n;t++)if(i=b.exec(e[t])){if(p=i[1],c=i[2],g=i[3],s=i[5],a={attributes:d={},attributesOrder:m=[]},"#"===p&&(a.paddEmpty=!0),"-"===p&&(a.removeEmpty=!0),"!"===i[4]&&(a.removeEmptyAttrs=!0),h&&(oe(h,function(e,t){d[t]=e}),m.push.apply(m,v)),s)for(r=0,o=(s=Zr(s,"|")).length;r<o;r++)if(i=C.exec(s[r])){if(u={},f=i[1],l=i[2].replace(/[\\:]:/g,":"),p=i[3],y=i[4],"!"===f&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(l),u.required=!0),"-"===f){delete d[l],m.splice(Qr(m,l),1);continue}p&&("="===p&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:l,value:y}),u.defaultValue=y),":"===p&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:l,value:y}),u.forcedValue=y),"<"===p&&(u.validValues=Xr(y,"?"))),w.test(l)?(a.attributePatterns=a.attributePatterns||[],u.pattern=N(l),a.attributePatterns.push(u)):(d[l]||m.push(l),d[l]=u)}h||"@"!==c||(h=d,v=m),g&&(a.outputName=c,x[g]=a),w.test(c)?(a.pattern=N(c),S.push(a)):x[c]=a}},b=function(e){x={},S=[],y(e),Yr(n,function(e,t){p[t]=e.children})},C=function(e){var a=/^(~)?(.+)$/;e&&(Wr.text_block_elements=Wr.block_elements=null,Yr(Zr(e,","),function(e){var t=a.exec(e),n="~"===t[1],r=n?"span":"div",o=t[2];if(p[o]=p[r],g[o]=r,n||(c[o.toUpperCase()]={},c[o]={}),!x[o]){var i=x[r];delete(i=Gr({},i)).removeEmptyAttrs,delete i.removeEmpty,x[o]=i}Yr(p,function(e,t){e[r]&&(p[t]=e=Gr({},p[t]),e[o]=e[r])})}))},w=function(e){var o=/^([+\-]?)(\w+)\[([^\]]+)\]$/;Wr[i.schema]=null,e&&Yr(Zr(e,","),function(e){var t,n,r=o.exec(e);r&&(n=r[1],t=n?p[r[2]]:p[r[2]]={"#comment":{}},t=p[r[2]],Yr(Zr(r[3],"|"),function(e){"-"===n?delete t[e]:t[e]={}}))})},E=function(e){var t,n=x[e];if(n)return n;for(t=S.length;t--;)if((n=S[t]).pattern.test(e))return n};i.valid_elements?b(i.valid_elements):(Yr(n,function(e,t){x[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},p[t]=e.children}),"html5"!==i.schema&&Yr(Zr("strong/b em/i"),function(e){e=Zr(e,"/"),x[e[1]].outputName=e[0]}),Yr(Zr("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){x[e]&&(x[e].removeEmpty=!0)}),Yr(Zr("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(e){x[e].paddEmpty=!0}),Yr(Zr("span"),function(e){x[e].removeEmptyAttrs=!0})),C(i.custom_elements),w(i.valid_children),y(i.extended_valid_elements),w("+ol[ul|ol],+ul[ul|ol]"),Yr({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(e,t){x[t]&&(x[t].parentsRequired=Zr(e))}),i.invalid_elements&&Yr(Jr(i.invalid_elements),function(e){x[e]&&delete x[e]}),E("span")||y("span[!data-mce-type|*]");return{children:p,elements:x,getValidStyles:function(){return e},getValidClasses:function(){return s},getBlockElements:function(){return c},getInvalidStyles:function(){return t},getShortEndedElements:function(){return a},getTextBlockElements:function(){return d},getTextInlineElements:function(){return m},getBoolAttrs:function(){return u},getElementRule:E,getSelfClosingElements:function(){return o},getNonEmptyElements:function(){return l},getMoveCaretBeforeOnEnterElements:function(){return f},getWhiteSpaceElements:function(){return r},getSpecialElements:function(){return h},isValidChild:function(e,t){var n=p[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:function(e,t){var n,r,o=E(e);if(o){if(!t)return!0;if(o.attributes[t])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},getCustomElements:function(){return g},addValidElements:y,setValidElements:b,addCustomElements:C,addValidChildren:w}}var ro="\ufeff",oo="\xa0",io=function(e,t,n,r){var o=function(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e};return"#"+o(t)+o(n)+o(r)},ao=function(b,e){var C,t,s,c,w=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,x=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,S=/\s*([^:]+):\s*([^;]+);?/g,N=/\s+$/,E={},k=ro;for(b=b||{},e&&(s=e.getValidStyles(),c=e.getInvalidStyles()),t=("\\\" \\' \\; \\: ; : "+k).split(" "),C=0;C<t.length;C++)E[t[C]]=k+C,E[k+C]=t[C];return{toHex:function(e){return e.replace(w,io)},parse:function(e){var t,n,r,o,i,a,u,s,c={},l=b.url_converter,f=b.url_converter_scope||this,d=function(e,t,n){var r,o,i,a;if((r=c[e+"-top"+t])&&(o=c[e+"-right"+t])&&(i=c[e+"-bottom"+t])&&(a=c[e+"-left"+t])){var u=[r,o,i,a];for(C=u.length-1;C--&&u[C]===u[C+1];);-1<C&&n||(c[e+t]=-1===C?u[0]:u.join(" "),delete c[e+"-top"+t],delete c[e+"-right"+t],delete c[e+"-bottom"+t],delete c[e+"-left"+t])}},m=function(e){var t,n=c[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return c[e]=n[0],!0}},p=function(e){return o=!0,E[e]},g=function(e,t){return o&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return E[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e},h=function(e){return String.fromCharCode(parseInt(e.slice(1),16))},v=function(e){return e.replace(/\\[0-9a-f]+/gi,h)},y=function(e,t,n,r,o,i){if(o=o||i)return"'"+(o=g(o)).replace(/\'/g,"\\'")+"'";if(t=g(t||n||r),!b.allow_script_urls){var a=t.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(a))return"";if(!b.allow_svg_data_urls&&/^data:image\/svg/i.test(a))return""}return l&&(t=l.call(f,t,"style")),"url('"+t.replace(/\'/g,"\\'")+"')"};if(e){for(e=(e=e.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,p).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,p)});t=S.exec(e);)if(S.lastIndex=t.index+t[0].length,n=t[1].replace(N,"").toLowerCase(),r=t[2].replace(N,""),n&&r){if(n=v(n),r=v(r),-1!==n.indexOf(k)||-1!==n.indexOf('"'))continue;if(!b.allow_script_urls&&("behavior"===n||/expression\s*\(|\/\*|\*\//.test(r)))continue;"font-weight"===n&&"700"===r?r="bold":"color"!==n&&"background-color"!==n||(r=r.toLowerCase()),r=(r=r.replace(w,io)).replace(x,y),c[n]=o?g(r,!0):r}d("border","",!0),d("border","-width"),d("border","-color"),d("border","-style"),d("padding",""),d("margin",""),i="border",u="border-style",s="border-color",m(a="border-width")&&m(u)&&m(s)&&(c[i]=c[a]+" "+c[u]+" "+c[s],delete c[a],delete c[u],delete c[s]),"medium none"===c.border&&delete c.border,"none"===c["border-image"]&&delete c["border-image"]}return c},serialize:function(i,a){var u="",e=function(e){var t,n,r,o;if(t=s[e])for(n=0,r=t.length;n<r;n++)e=t[n],(o=i[e])&&(u+=(0<u.length?" ":"")+e+": "+o+";")};return a&&s?(e("*"),e(a)):oe(i,function(e,t){var n,r,o;!e||c&&(n=t,r=a,(o=c["*"])&&o[n]||(o=c[r])&&o[n])||(u+=(0<u.length?" ":"")+t+": "+e+";")}),u}}},uo=/^(?:mouse|contextmenu)|click/,so={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1,mozPressure:1},co=function(){return!1},lo=function(){return!0},fo=function(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)},mo=function(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)},po=function(e,t){var n,r,o=t||{};for(n in e)so[n]||(o[n]=e[n]);if(o.target||(o.target=o.srcElement||V.document),rr.experimentalShadowDom&&(o.target=function(e,t){if(e.composedPath){var n=e.composedPath();if(n&&0<n.length)return n[0]}return t}(e,o.target)),e&&uo.test(e.type)&&e.pageX===undefined&&e.clientX!==undefined){var i=o.target.ownerDocument||V.document,a=i.documentElement,u=i.body;o.pageX=e.clientX+(a&&a.scrollLeft||u&&u.scrollLeft||0)-(a&&a.clientLeft||u&&u.clientLeft||0),o.pageY=e.clientY+(a&&a.scrollTop||u&&u.scrollTop||0)-(a&&a.clientTop||u&&u.clientTop||0)}return o.preventDefault=function(){o.isDefaultPrevented=lo,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},o.stopPropagation=function(){o.isPropagationStopped=lo,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},!(o.stopImmediatePropagation=function(){o.isImmediatePropagationStopped=lo,o.stopPropagation()})==((r=o).isDefaultPrevented===lo||r.isDefaultPrevented===co)&&(o.isDefaultPrevented=co,o.isPropagationStopped=co,o.isImmediatePropagationStopped=co),"undefined"==typeof o.metaKey&&(o.metaKey=!1),o},go=function(e,t,n){var r=e.document,o={type:"ready"};if(n.domLoaded)t(o);else{var i=function(){mo(e,"DOMContentLoaded",i),mo(e,"load",i),n.domLoaded||(n.domLoaded=!0,t(o))};"complete"===r.readyState||"interactive"===r.readyState&&r.body?i():fo(e,"DOMContentLoaded",i),fo(e,"load",i)}},ho=(vo.prototype.bind=function(e,t,n,r){var o,i,a,u,s,c,l,f=this,d=V.window,m=function(e){f.executeHandlers(po(e||d.event),o)};if(e&&3!==e.nodeType&&8!==e.nodeType){e[f.expando]?o=e[f.expando]:(o=f.count++,e[f.expando]=o,f.events[o]={}),r=r||e;var p=t.split(" ");for(a=p.length;a--;)c=m,s=l=!1,"DOMContentLoaded"===(u=p[a])&&(u="ready"),f.domLoaded&&"ready"===u&&"complete"===e.readyState?n.call(r,po({type:u})):(f.hasMouseEnterLeave||(s=f.mouseEnterLeave[u])&&(c=function(e){var t,n;if(t=e.currentTarget,(n=e.relatedTarget)&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||((e=po(e||d.event)).type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,f.executeHandlers(e,o))}),f.hasFocusIn||"focusin"!==u&&"focusout"!==u||(l=!0,s="focusin"===u?"focus":"blur",c=function(e){(e=po(e||d.event)).type="focus"===e.type?"focusin":"focusout",f.executeHandlers(e,o)}),(i=f.events[o][u])?"ready"===u&&f.domLoaded?n(po({type:u})):i.push({func:n,scope:r}):(f.events[o][u]=i=[{func:n,scope:r}],i.fakeName=s,i.capture=l,i.nativeHandler=c,"ready"===u?go(e,c,f):fo(e,s||u,c,l)));return e=i=0,n}},vo.prototype.unbind=function(n,e,t){var r,o,i,a,u,s;if(!n||3===n.nodeType||8===n.nodeType)return this;if(r=n[this.expando]){if(s=this.events[r],e){var c=e.split(" ");for(i=c.length;i--;)if(o=s[u=c[i]]){if(t)for(a=o.length;a--;)if(o[a].func===t){var l=o.nativeHandler,f=o.fakeName,d=o.capture;(o=o.slice(0,a).concat(o.slice(a+1))).nativeHandler=l,o.fakeName=f,o.capture=d,s[u]=o}t&&0!==o.length||(delete s[u],mo(n,o.fakeName||u,o.nativeHandler,o.capture))}}else oe(s,function(e,t){mo(n,e.fakeName||t,e.nativeHandler,e.capture)}),s={};for(u in s)if(me(s,u))return this;delete this.events[r];try{delete n[this.expando]}catch(m){n[this.expando]=null}}return this},vo.prototype.fire=function(e,t,n){var r;if(!e||3===e.nodeType||8===e.nodeType)return this;var o=po(null,n);for(o.type=t,o.target=e;(r=e[this.expando])&&this.executeHandlers(o,r),(e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow)&&!o.isPropagationStopped(););return this},vo.prototype.clean=function(e){var t,n;if(!e||3===e.nodeType||8===e.nodeType)return this;if(e[this.expando]&&this.unbind(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(this.unbind(e),t=(n=e.getElementsByTagName("*")).length;t--;)(e=n[t])[this.expando]&&this.unbind(e);return this},vo.prototype.destroy=function(){this.events={}},vo.prototype.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1},vo.prototype.executeHandlers=function(e,t){var n,r,o,i,a=this.events[t];if(n=a&&a[e.type])for(r=0,o=n.length;r<o;r++)if((i=n[r])&&!1===i.func.call(i.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return},vo.Event=new vo,vo);function vo(){this.domLoaded=!1,this.events={},this.count=1,this.expando="mce-data-"+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in V.document.documentElement,this.hasFocusIn="onfocusin"in V.document.documentElement,this.count=1}var yo,bo,Co,wo,xo,So,No,Eo,ko,_o,Ro,To,Ao,Do,Oo,Bo,Po,Lo="sizzle"+-new Date,Io=V.window.document,Mo=0,Fo=0,Uo=vi(),zo=vi(),jo=vi(),Ho=function(e,t){return e===t&&(_o=!0),0},Vo=typeof undefined,qo={}.hasOwnProperty,$o=[],Wo=$o.pop,Ko=$o.push,Xo=$o.push,Yo=$o.slice,Go=$o.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},Jo="[\\x20\\t\\r\\n\\f]",Qo="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",Zo="\\["+Jo+"*("+Qo+")(?:"+Jo+"*([*^$|!~]?=)"+Jo+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+Qo+"))|)"+Jo+"*\\]",ei=":("+Qo+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+Zo+")*)|.*)\\)|)",ti=new RegExp("^"+Jo+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Jo+"+$","g"),ni=new RegExp("^"+Jo+"*,"+Jo+"*"),ri=new RegExp("^"+Jo+"*([>+~]|"+Jo+")"+Jo+"*"),oi=new RegExp("="+Jo+"*([^\\]'\"]*?)"+Jo+"*\\]","g"),ii=new RegExp(ei),ai=new RegExp("^"+Qo+"$"),ui={ID:new RegExp("^#("+Qo+")"),CLASS:new RegExp("^\\.("+Qo+")"),TAG:new RegExp("^("+Qo+"|[*])"),ATTR:new RegExp("^"+Zo),PSEUDO:new RegExp("^"+ei),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+Jo+"*(even|odd|(([+-]|)(\\d*)n|)"+Jo+"*(?:([+-]|)"+Jo+"*(\\d+)|))"+Jo+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+Jo+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+Jo+"*((?:-\\d)?\\d*)"+Jo+"*\\)|)(?=[^-]|$)","i")},si=/^(?:input|select|textarea|button)$/i,ci=/^h\d$/i,li=/^[^{]+\{\s*\[native \w/,fi=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,di=/[+~]/,mi=/'|\\/g,pi=new RegExp("\\\\([\\da-f]{1,6}"+Jo+"?|("+Jo+")|.)","ig"),gi=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Xo.apply($o=Yo.call(Io.childNodes),Io.childNodes),$o[Io.childNodes.length].nodeType}catch(pE){Xo={apply:$o.length?function(e,t){Ko.apply(e,Yo.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var hi=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,m;if((t?t.ownerDocument||t:Io)!==To&&Ro(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||To).nodeType)&&9!==u)return[];if(Do&&!r){if(o=fi.exec(e))if(a=o[1]){if(9===u){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&Po(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return Xo.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&yo.getElementsByClassName)return Xo.apply(n,t.getElementsByClassName(a)),n}if(yo.qsa&&(!Oo||!Oo.test(e))){if(f=l=Lo,d=t,m=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(c=xo(e),(l=t.getAttribute("id"))?f=l.replace(mi,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=c.length;s--;)c[s]=f+Si(c[s]);d=di.test(e)&&wi(t.parentNode)||t,m=c.join(",")}if(m)try{return Xo.apply(n,d.querySelectorAll(m)),n}catch(p){}finally{l||t.removeAttribute("id")}}}return No(e.replace(ti,"$1"),t,n,r)};function vi(){var n=[];function r(e,t){return n.push(e+" ")>bo.cacheLength&&delete r[n.shift()],r[e+" "]=t}return r}function yi(e){return e[Lo]=!0,e}function bi(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function Ci(a){return yi(function(i){return i=+i,yi(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function wi(e){return e&&typeof e.getElementsByTagName!=Vo&&e}function xi(){}function Si(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Ni(a,e,t){var u=e.dir,s=t&&"parentNode"===u,c=Fo++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||s)return a(e,t,n)}:function(e,t,n){var r,o,i=[Mo,c];if(n){for(;e=e[u];)if((1===e.nodeType||s)&&a(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||s){if((r=(o=e[Lo]||(e[Lo]={}))[u])&&r[0]===Mo&&r[1]===c)return i[2]=r[2];if((o[u]=i)[2]=a(e,t,n))return!0}}}function Ei(o){return 1<o.length?function(e,t,n){for(var r=o.length;r--;)if(!o[r](e,t,n))return!1;return!0}:o[0]}function ki(e,t,n,r,o){for(var i,a=[],u=0,s=e.length,c=null!=t;u<s;u++)(i=e[u])&&(n&&!n(i,r,o)||(a.push(i),c&&t.push(u)));return a}function _i(p,g,h,v,y,e){return v&&!v[Lo]&&(v=_i(v)),y&&!y[Lo]&&(y=_i(y,e)),yi(function(e,t,n,r){var o,i,a,u=[],s=[],c=t.length,l=e||function m(e,t,n){for(var r=0,o=t.length;r<o;r++)hi(e,t[r],n);return n}(g||"*",n.nodeType?[n]:n,[]),f=!p||!e&&g?l:ki(l,u,p,n,r),d=h?y||(e?p:c||v)?[]:t:f;if(h&&h(f,d,n,r),v)for(o=ki(d,s),v(o,[],n,r),i=o.length;i--;)(a=o[i])&&(d[s[i]]=!(f[s[i]]=a));if(e){if(y||p){if(y){for(o=[],i=d.length;i--;)(a=d[i])&&o.push(f[i]=a);y(null,d=[],o,r)}for(i=d.length;i--;)(a=d[i])&&-1<(o=y?Go.call(e,a):u[i])&&(e[o]=!(t[o]=a))}}else d=ki(d===t?d.splice(c,d.length):d),y?y(null,t,d,r):Xo.apply(t,d)})}function Ri(e){for(var r,t,n,o=e.length,i=bo.relative[e[0].type],a=i||bo.relative[" "],u=i?1:0,s=Ni(function(e){return e===r},a,!0),c=Ni(function(e){return-1<Go.call(r,e)},a,!0),l=[function(e,t,n){return!i&&(n||t!==Eo)||((r=t).nodeType?s:c)(e,t,n)}];u<o;u++)if(t=bo.relative[e[u].type])l=[Ni(Ei(l),t)];else{if((t=bo.filter[e[u].type].apply(null,e[u].matches))[Lo]){for(n=++u;n<o&&!bo.relative[e[n].type];n++);return _i(1<u&&Ei(l),1<u&&Si(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(ti,"$1"),t,u<n&&Ri(e.slice(u,n)),n<o&&Ri(e=e.slice(n)),n<o&&Si(e))}l.push(t)}return Ei(l)}yo=hi.support={},wo=hi.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Ro=hi.setDocument=function(e){var t,s=e?e.ownerDocument||e:Io,n=s.defaultView;return s!==To&&9===s.nodeType&&s.documentElement?(Ao=(To=s).documentElement,Do=!wo(s),n&&n!==function r(e){try{return e.top}catch(t){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){Ro()},!1):n.attachEvent&&n.attachEvent("onunload",function(){Ro()})),yo.attributes=!0,yo.getElementsByTagName=!0,yo.getElementsByClassName=li.test(s.getElementsByClassName),yo.getById=!0,bo.find.ID=function(e,t){if(typeof t.getElementById!=Vo&&Do){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},bo.filter.ID=function(e){var t=e.replace(pi,gi);return function(e){return e.getAttribute("id")===t}},bo.find.TAG=yo.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!=Vo)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"!==e)return i;for(;n=i[o++];)1===n.nodeType&&r.push(n);return r},bo.find.CLASS=yo.getElementsByClassName&&function(e,t){if(Do)return t.getElementsByClassName(e)},Bo=[],Oo=[],yo.disconnectedMatch=!0,Oo=Oo.length&&new RegExp(Oo.join("|")),Bo=Bo.length&&new RegExp(Bo.join("|")),t=li.test(Ao.compareDocumentPosition),Po=t||li.test(Ao.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Ho=t?function(e,t){if(e===t)return _o=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!yo.sortDetached&&t.compareDocumentPosition(e)===n?e===s||e.ownerDocument===Io&&Po(Io,e)?-1:t===s||t.ownerDocument===Io&&Po(Io,t)?1:ko?Go.call(ko,e)-Go.call(ko,t):0:4&n?-1:1)}:function(e,t){if(e===t)return _o=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===s?-1:t===s?1:o?-1:i?1:ko?Go.call(ko,e)-Go.call(ko,t):0;if(o===i)return bi(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?bi(a[r],u[r]):a[r]===Io?-1:u[r]===Io?1:0},s):To},hi.matches=function(e,t){return hi(e,null,null,t)},hi.matchesSelector=function(e,t){if((e.ownerDocument||e)!==To&&Ro(e),t=t.replace(oi,"='$1']"),yo.matchesSelector&&Do&&(!Bo||!Bo.test(t))&&(!Oo||!Oo.test(t)))try{var n=(void 0).call(e,t);if(n||yo.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(pE){}return 0<hi(t,To,null,[e]).length},hi.contains=function(e,t){return(e.ownerDocument||e)!==To&&Ro(e),Po(e,t)},hi.attr=function(e,t){(e.ownerDocument||e)!==To&&Ro(e);var n=bo.attrHandle[t.toLowerCase()],r=n&&qo.call(bo.attrHandle,t.toLowerCase())?n(e,t,!Do):undefined;return r!==undefined?r:yo.attributes||!Do?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},hi.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},hi.uniqueSort=function(e){var t,n=[],r=0,o=0;if(_o=!yo.detectDuplicates,ko=!yo.sortStable&&e.slice(0),e.sort(Ho),_o){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return ko=null,e},Co=hi.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=Co(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=Co(t);return n},(bo=hi.selectors={cacheLength:50,createPseudo:yi,match:ui,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(pi,gi),e[3]=(e[3]||e[4]||e[5]||"").replace(pi,gi),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||hi.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&hi.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ui.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ii.test(n)&&(t=xo(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(pi,gi).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Uo[e+" "];return t||(t=new RegExp("(^|"+Jo+")"+e+"("+Jo+"|$)"))&&Uo(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!=Vo&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=hi.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===o:"!="===r?t!==o:"^="===r?o&&0===t.indexOf(o):"*="===r?o&&-1<t.indexOf(o):"$="===r?o&&t.slice(-o.length)===o:"~="===r?-1<(" "+t+" ").indexOf(o):"|="===r&&(t===o||t.slice(0,o.length+1)===o+"-"))}},CHILD:function(m,e,t,p,g){var h="nth"!==m.slice(0,3),v="last"!==m.slice(-4),y="of-type"===e;return 1===p&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,o,i,a,u,s,c=h!=v?"nextSibling":"previousSibling",l=e.parentNode,f=y&&e.nodeName.toLowerCase(),d=!n&&!y;if(l){if(h){for(;c;){for(i=e;i=i[c];)if(y?i.nodeName.toLowerCase()===f:1===i.nodeType)return!1;s=c="only"===m&&!s&&"nextSibling"}return!0}if(s=[v?l.firstChild:l.lastChild],v&&d){for(u=(r=(o=l[Lo]||(l[Lo]={}))[m]||[])[0]===Mo&&r[1],a=r[0]===Mo&&r[2],i=u&&l.childNodes[u];i=++u&&i&&i[c]||(a=u=0)||s.pop();)if(1===i.nodeType&&++a&&i===e){o[m]=[Mo,u,a];break}}else if(d&&(r=(e[Lo]||(e[Lo]={}))[m])&&r[0]===Mo)a=r[1];else for(;(i=++u&&i&&i[c]||(a=u=0)||s.pop())&&((y?i.nodeName.toLowerCase()!==f:1!==i.nodeType)||!++a||(d&&((i[Lo]||(i[Lo]={}))[m]=[Mo,a]),i!==e)););return(a-=g)===p||a%p==0&&0<=a/p}}},PSEUDO:function(e,i){var t,a=bo.pseudos[e]||bo.setFilters[e.toLowerCase()]||hi.error("unsupported pseudo: "+e);return a[Lo]?a(i):1<a.length?(t=[e,e,"",i],bo.setFilters.hasOwnProperty(e.toLowerCase())?yi(function(e,t){for(var n,r=a(e,i),o=r.length;o--;)e[n=Go.call(e,r[o])]=!(t[n]=r[o])}):function(e){return a(e,0,t)}):a}},pseudos:{not:yi(function(e){var r=[],o=[],u=So(e.replace(ti,"$1"));return u[Lo]?yi(function(e,t,n,r){for(var o,i=u(e,null,r,[]),a=e.length;a--;)(o=i[a])&&(e[a]=!(t[a]=o))}):function(e,t,n){return r[0]=e,u(r,null,n,o),!o.pop()}}),has:yi(function(t){return function(e){return 0<hi(t,e).length}}),contains:yi(function(t){return t=t.replace(pi,gi),function(e){return-1<(e.textContent||e.innerText||Co(e)).indexOf(t)}}),lang:yi(function(n){return ai.test(n||"")||hi.error("unsupported lang: "+n),n=n.replace(pi,gi).toLowerCase(),function(e){var t;do{if(t=Do?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=V.window.location&&V.window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===Ao},focus:function(e){return e===To.activeElement&&(!To.hasFocus||To.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!bo.pseudos.empty(e)},header:function(e){return ci.test(e.nodeName)},input:function(e){return si.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:Ci(function(){return[0]}),last:Ci(function(e,t){return[t-1]}),eq:Ci(function(e,t,n){return[n<0?n+t:n]}),even:Ci(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:Ci(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:Ci(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:Ci(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=bo.pseudos.eq,z(["radio","checkbox","file","password","image"],function(e){bo.pseudos[e]=function n(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(e)}),z(["submit","reset"],function(e){bo.pseudos[e]=function t(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}(e)}),xi.prototype=bo.filters=bo.pseudos,bo.setFilters=new xi,xo=hi.tokenize=function(e,t){var n,r,o,i,a,u,s,c=zo[e+" "];if(c)return t?0:c.slice(0);for(a=e,u=[],s=bo.preFilter;a;){for(i in n&&!(r=ni.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=ri.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(ti," ")}),a=a.slice(n.length)),bo.filter)bo.filter.hasOwnProperty(i)&&(!(r=ui[i].exec(a))||s[i]&&!(r=s[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length)));if(!n)break}return t?a.length:a?hi.error(e):zo(e,u).slice(0)},So=hi.compile=function(e,t){var n,r=[],o=[],i=jo[e+" "];if(!i){for(n=(t=t||xo(e)).length;n--;)(i=Ri(t[n]))[Lo]?r.push(i):o.push(i);(i=jo(e,function a(h,v){var y=0<v.length,b=0<h.length,e=function(e,t,n,r,o){var i,a,u,s=0,c="0",l=e&&[],f=[],d=Eo,m=e||b&&bo.find.TAG("*",o),p=Mo+=null==d?1:Math.random()||.1,g=m.length;for(o&&(Eo=t!==To&&t);c!==g&&null!=(i=m[c]);c++){if(b&&i){for(a=0;u=h[a++];)if(u(i,t,n)){r.push(i);break}o&&(Mo=p)}y&&((i=!u&&i)&&s--,e&&l.push(i))}if(s+=c,y&&c!==s){for(a=0;u=v[a++];)u(l,f,t,n);if(e){if(0<s)for(;c--;)l[c]||f[c]||(f[c]=Wo.call(r));f=ki(f)}Xo.apply(r,f),o&&!e&&0<f.length&&1<s+v.length&&hi.uniqueSort(r)}return o&&(Mo=p,Eo=d),l};return y?yi(e):e}(o,r))).selector=e}return i},No=hi.select=function(e,t,n,r){var o,i,a,u,s,c="function"==typeof e&&e,l=!r&&xo(e=c.selector||e);if(n=n||[],1===l.length){if(2<(i=l[0]=l[0].slice(0)).length&&"ID"===(a=i[0]).type&&yo.getById&&9===t.nodeType&&Do&&bo.relative[i[1].type]){if(!(t=(bo.find.ID(a.matches[0].replace(pi,gi),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=ui.needsContext.test(e)?0:i.length;o--&&(a=i[o],!bo.relative[u=a.type]);)if((s=bo.find[u])&&(r=s(a.matches[0].replace(pi,gi),di.test(i[0].type)&&wi(t.parentNode)||t))){if(i.splice(o,1),!(e=r.length&&Si(i)))return Xo.apply(n,r),n;break}}return(c||So(e,l))(r,t,!Do,n,di.test(e)&&wi(t.parentNode)||t),n},yo.sortStable=Lo.split("").sort(Ho).join("")===Lo,yo.detectDuplicates=!!_o,Ro(),yo.sortDetached=!0;var Ti=V.document,Ai=Array.prototype.push,Di=Array.prototype.slice,Oi=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,Bi=ho.Event,Pi=hr.makeMap("children,contents,next,prev"),Li=function(e){return void 0!==e},Ii=function(e){return"string"==typeof e},Mi=function(e,t){var n,r,o;for(o=(t=t||Ti).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n},Fi=function(e,t,n,r){var o;if(Ii(t))t=Mi(t,Qi(e[0]));else if(t.length&&!t.nodeType){if(t=na.makeArray(t),r)for(o=t.length-1;0<=o;o--)Fi(e,t[o],n,r);else for(o=0;o<t.length;o++)Fi(e,t[o],n,r);return e}if(t.nodeType)for(o=e.length;o--;)n.call(e[o],t);return e},Ui=function(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")},zi=function(e,t,n){var r,o;return t=na(t)[0],e.each(function(){n&&r===this.parentNode||(r=this.parentNode,o=t.cloneNode(!1),this.parentNode.insertBefore(o,this)),o.appendChild(this)}),e},ji=hr.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),Hi=hr.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),Vi={"for":"htmlFor","class":"className",readonly:"readOnly"},qi={"float":"cssFloat"},$i={},Wi={},Ki=function(e,t){return new na.fn.init(e,t)},Xi=/^\s*|\s*$/g,Yi=function(e){return null===e||e===undefined?"":(""+e).replace(Xi,"")},Gi=function(e,t){var n,r,o,i;if(e)if((n=e.length)===undefined){for(r in e)if(e.hasOwnProperty(r)&&(i=e[r],!1===t.call(i,r,i)))break}else for(o=0;o<n&&(i=e[o],!1!==t.call(i,o,i));o++);return e},Ji=function(e,n){var r=[];return Gi(e,function(e,t){n(t,e)&&r.push(t)}),r},Qi=function(e){return e?9===e.nodeType?e:e.ownerDocument:Ti};Ki.fn=Ki.prototype={constructor:Ki,selector:"",context:null,length:0,init:function(e,t){var n,r,o=this;if(!e)return o;if(e.nodeType)return o.context=o[0]=e,o.length=1,o;if(t&&t.nodeType)o.context=t;else{if(t)return na(e).attr(t);o.context=t=V.document}if(Ii(e)){if(!(n="<"===(o.selector=e).charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Oi.exec(e)))return na(t).find(e);if(n[1])for(r=Mi(e,Qi(t)).firstChild;r;)Ai.call(o,r),r=r.nextSibling;else{if(!(r=Qi(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return hr.toArray(this)},add:function(e,t){var n,r;if(Ii(e))return this.add(na(e));if(!1!==t)for(n=na.unique(this.toArray().concat(na.makeArray(e))),this.length=n.length,r=0;r<n.length;r++)this[r]=n[r];else Ai.apply(this,na.makeArray(e));return this},attr:function(t,n){var e,r=this;if("object"==typeof t)Gi(t,function(e,t){r.attr(e,t)});else{if(!Li(n)){if(r[0]&&1===r[0].nodeType){if((e=$i[t])&&e.get)return e.get(r[0],t);if(Hi[t])return r.prop(t)?t:undefined;null===(n=r[0].getAttribute(t,2))&&(n=undefined)}return n}this.each(function(){var e;if(1===this.nodeType){if((e=$i[t])&&e.set)return void e.set(this,n);null===n?this.removeAttribute(t,2):this.setAttribute(t,n,2)}})}return r},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=Vi[e]||e))Gi(e,function(e,t){n.prop(e,t)});else{if(!Li(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1===this.nodeType&&(this[e]=t)})}return n},css:function(n,r){var e,o,i=this,t=function(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})},a=function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})};if("object"==typeof n)Gi(n,function(e,t){i.css(e,t)});else if(Li(r))n=t(n),"number"!=typeof r||ji[n]||(r=r.toString()+"px"),i.each(function(){var e=this.style;if((o=Wi[n])&&o.set)o.set(this,r);else{try{this.style[qi[n]||n]=r}catch(t){}null!==r&&""!==r||(e.removeProperty?e.removeProperty(a(n)):e.removeAttribute(n))}});else{if(e=i[0],(o=Wi[n])&&o.get)return o.get(e);if(!e.ownerDocument.defaultView)return e.currentStyle?e.currentStyle[t(n)]:"";try{return e.ownerDocument.defaultView.getComputedStyle(e,null).getPropertyValue(a(n))}catch(u){return undefined}}return i},remove:function(){for(var e,t=this.length;t--;)e=this[t],Bi.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this.length;t--;)for(e=this[t];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(e){var t;if(Li(e)){t=this.length;try{for(;t--;)this[t].innerHTML=e}catch(n){na(this[t]).empty().append(e)}return this}return this[0]?this[0].innerHTML:""},text:function(e){var t;if(Li(e)){for(t=this.length;t--;)"innerText"in this[t]?this[t].innerText=e:this[0].textContent=e;return this}return this[0]?this[0].innerText||this[0].textContent:""},append:function(){return Fi(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return Fi(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){return this[0]&&this[0].parentNode?Fi(this,arguments,function(e){this.parentNode.insertBefore(e,this)}):this},after:function(){return this[0]&&this[0].parentNode?Fi(this,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):this},appendTo:function(e){return na(e).append(this),this},prependTo:function(e){return na(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return zi(this,e)},wrapAll:function(e){return zi(this,e,!0)},wrapInner:function(e){return this.each(function(){na(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){na(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),na(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(o,i){var e=this;return"string"!=typeof o||(-1!==o.indexOf(" ")?Gi(o.split(" "),function(){e.toggleClass(this,i)}):e.each(function(e,t){var n,r;(r=Ui(t,o))!==i&&(n=t.className,r?t.className=Yi((" "+n+" ").replace(" "+o+" "," ")):t.className+=n?" "+o:o)})),e},hasClass:function(e){return Ui(this[0],e)},each:function(e){return Gi(this,e)},on:function(e,t){return this.each(function(){Bi.bind(this,e,t)})},off:function(e,t){return this.each(function(){Bi.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?Bi.fire(this,e.type,e):Bi.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new na(Di.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,r=[];for(t=0,n=this.length;t<n;t++)na.find(e,this[t],r);return na(r)},filter:function(n){return na("function"==typeof n?Ji(this.toArray(),function(e,t){return n(t,e)}):na.filter(n,this.toArray()))},closest:function(n){var r=[];return n instanceof na&&(n=n[0]),this.each(function(e,t){for(;t;){if("string"==typeof n&&na(t).is(n)){r.push(t);break}if(t===n){r.push(t);break}t=t.parentNode}}),na(r)},offset:function(e){var t,n,r,o,i=0,a=0;return e?this.css(e):((t=this[0])&&(r=(n=t.ownerDocument).documentElement,t.getBoundingClientRect&&(i=(o=t.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:Ai,sort:Array.prototype.sort,splice:Array.prototype.splice},hr.extend(Ki,{extend:hr.extend,makeArray:function(e){return(t=e)&&t===t.window||e.nodeType?[e]:hr.toArray(e);var t},inArray:function(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1},isArray:hr.isArray,each:Gi,trim:Yi,grep:Ji,find:hi,expr:hi.selectors,unique:hi.uniqueSort,text:hi.getText,contains:hi.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!==t[r].nodeType&&t.splice(r,1);return t=1===t.length?na.find.matchesSelector(t[0],e)?[t[0]]:[]:na.find.matches(e,t)}});var Zi=function(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof na&&(n=n[0]);o&&9!==o.nodeType;){if(n!==undefined){if(o===n)break;if("string"==typeof n&&na(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r},ea=function(e,t,n,r){var o=[];for(r instanceof na&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(r!==undefined){if(e===r)break;if("string"==typeof r&&na(e).is(r))break}o.push(e)}return o},ta=function(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null};Gi({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Zi(e,"parentNode")},next:function(e){return ta(e,"nextSibling",1)},prev:function(e){return ta(e,"previousSibling",1)},children:function(e){return ea(e.firstChild,"nextSibling",1)},contents:function(e){return hr.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(r,o){Ki.fn[r]=function(t){var n=[];this.each(function(){var e=o.call(n,this,t,n);e&&(na.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(Pi[r]||(n=na.unique(n)),0===r.indexOf("parents")&&(n=n.reverse()));var e=na(n);return t?e.filter(t):e}}),Gi({parentsUntil:function(e,t){return Zi(e,"parentNode",t)},nextUntil:function(e,t){return ea(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return ea(e,"previousSibling",1,t).slice(1)}},function(o,i){Ki.fn[o]=function(t,e){var n=[];this.each(function(){var e=i.call(n,this,t,n);e&&(na.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(n=na.unique(n),0!==o.indexOf("parents")&&"prevUntil"!==o||(n=n.reverse()));var r=na(n);return e?r.filter(e):r}}),Ki.fn.is=function(e){return!!e&&0<this.filter(e).length},Ki.fn.init.prototype=Ki.fn,Ki.overrideDefaults=function(n){var r,o=function(e,t){return r=r||n(),0===arguments.length&&(e=r.element),t=t||r.context,new o.fn.init(e,t)};return na.extend(o,this),o},Ki.attrHooks=$i,Ki.cssHooks=Wi;var na=Ki,ra=(oa.prototype.current=function(){return this.node},oa.prototype.next=function(e){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node},oa.prototype.prev=function(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node},oa.prototype.prev2=function(e){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",e),this.node},oa.prototype.findSibling=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==this.rootNode){if(o=e[n])return o;for(i=e.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(o=i[n])return o}}},oa.prototype.findPreviousNode=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],this.rootNode&&o===this.rootNode)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if((i=e.parentNode)&&i!==this.rootNode)return i}},oa);function oa(e,t){this.node=e,this.rootNode=t,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}var ia,aa=hr.each,ua=hr.grep,sa=rr.ie,ca=/^([a-z0-9],?)+$/i,la=/^[ \t\r\n]*$/,fa=function(n,r,o){var i=r.keep_values,e={set:function(e,t,n){r.url_converter&&(t=r.url_converter.call(r.url_converter_scope||o(),t,n,e[0])),e.attr("data-mce-"+n,t).attr(n,t)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},t={style:{set:function(e,t){null===t||"object"!=typeof t?(i&&e.attr("data-mce-style",t),null!==t&&"string"==typeof t?(e.removeAttr("style"),e.css(n.parse(t))):e.attr("style",t)):e.css(t)},get:function(e){var t=e.attr("data-mce-style")||e.attr("style");return t=n.serialize(n.parse(t),e[0].nodeName)}}};return i&&(t.href=t.src=e),t},da=function(e,t){var n=t.attr("style"),r=e.serialize(e.parse(n),t[0].nodeName);r=r||null,t.attr("data-mce-style",r)},ma=function(e,t){var n,r,o=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)r=e.nodeType,(!t||3!==r||r!==n&&e.nodeValue.length)&&(o++,n=r);return o};function pa(a,u){var s,c=this;void 0===u&&(u={});var r={},l=V.window,o={},t=0,e=vr(a,{contentCssCors:u.contentCssCors,referrerPolicy:u.referrerPolicy}),f=[],d=u.schema?u.schema:no({}),i=ao({url_converter:u.url_converter,url_converter_scope:u.url_converter_scope},u.schema),m=u.ownEvents?new ho:ho.Event,n=d.getBlockElements(),p=na.overrideDefaults(function(){return{context:a,element:H.getRoot()}}),g=function(e){if(e&&a&&"string"==typeof e){var t=a.getElementById(e);return t&&t.id!==e?a.getElementsByName(e)[1]:t}return e},h=function(e){return p("string"==typeof e?g(e):e)},v=function(e,t,n){var r,o,i=h(e);return i.length&&(o=(r=s[t])&&r.get?r.get(i,t):i.attr(t)),void 0===o&&(o=n||""),o},y=function(e){var t=g(e);return t?t.attributes:[]},b=function(e,t,n){var r,o;""===n&&(n=null);var i=h(e);r=i.attr(t),i.length&&((o=s[t])&&o.set?o.set(i,n,t):i.attr(t,n),r!==n&&u.onSetAttrib&&u.onSetAttrib({attrElm:i,attrName:t,attrValue:n}))},C=function(){return u.root_element||a.body},w=function(e,t){return bn(a.body,g(e),t)},x=function(e,t,n){var r=h(e);return n?r.css(t):("float"===(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(t=rr.browser.isIE()?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[t]:undefined)},S=function(e){var t,n;return e=g(e),t=x(e,"width"),n=x(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},N=function(e,t){var n;if(!e)return!1;if(!Array.isArray(e)){if("*"===t)return 1===e.nodeType;if(ca.test(t)){var r=t.toLowerCase().split(/,/),o=e.nodeName.toLowerCase();for(n=r.length-1;0<=n;n--)if(r[n]===o)return!0;return!1}if(e.nodeType&&1!==e.nodeType)return!1}var i=Array.isArray(e)?e:[e];return 0<hi(t,i[0].ownerDocument||i[0],null,i).length},E=function(e,t,n,r){var o,i=[],a=g(e);for(r=r===undefined,n=n||("BODY"!==C().nodeName?C().parentNode:null),hr.is(t,"string")&&(t="*"===(o=t)?function(e){return 1===e.nodeType}:function(e){return N(e,o)});a&&a!==n&&a.nodeType&&9!==a.nodeType;){if(!t||"function"==typeof t&&t(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null},k=function(e,t,n){var r=t;if(e)for("string"==typeof t&&(r=function(e){return N(e,t)}),e=e[n];e;e=e[n])if("function"==typeof r&&r(e))return e;return null},_=function(e,n,r){var o,t="string"==typeof e?g(e):e;if(!t)return!1;if(hr.isArray(t)&&(t.length||0===t.length))return o=[],aa(t,function(e,t){e&&("string"==typeof e&&(e=g(e)),o.push(n.call(r,e,t)))}),o;var i=r||c;return n.call(i,t)},R=function(e,t){h(e).each(function(e,n){aa(t,function(e,t){b(n,t,e)})})},T=function(e,r){var t=h(e);sa?t.each(function(e,t){if(!1!==t.canHaveHTML){for(;t.firstChild;)t.removeChild(t.firstChild);try{t.innerHTML="<br>"+r,t.removeChild(t.firstChild)}catch(n){na("<div></div>").html("<br>"+r).contents().slice(1).appendTo(t)}return r}}):t.html(r)},A=function(e,n,r,o,i){return _(e,function(e){var t="string"==typeof n?a.createElement(n):n;return R(t,r),o&&("string"!=typeof o&&o.nodeType?t.appendChild(o):"string"==typeof o&&T(t,o)),i?t:e.appendChild(t)})},D=function(e,t,n){return A(a.createElement(e),e,t,n,!0)},O=$r.decode,B=$r.encodeAllRaw,P=function(e,t){var n=h(e);return t?n.each(function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():n.remove(),1<n.length?n.toArray():n[0]},L=function(e,t,n){h(e).toggleClass(t,n).each(function(){""===this.className&&na(this).attr("class",null)})},I=function(t,e,n){return _(e,function(e){return hr.is(e,"array")&&(t=t.cloneNode(!0)),n&&aa(ua(e.childNodes),function(e){t.appendChild(e)}),e.parentNode.replaceChild(t,e)})},M=function(e){if($t(e)){var t="a"===e.nodeName.toLowerCase()&&!v(e,"href")&&v(e,"id");if(v(e,"name")||v(e,"data-mce-bookmark")||t)return!0}return!1},F=function(){return a.createRange()},U=function(e,t,n,r){if(hr.isArray(e)){for(var o=e.length,i=[];o--;)i[o]=U(e[o],t,n,r);return i}return!u.collect||e!==a&&e!==l||f.push([e,t,n,r]),m.bind(e,t,n,r||H)},z=function(e,t,n){var r;if(hr.isArray(e)){r=e.length;for(var o=[];r--;)o[r]=z(e[r],t,n);return o}if(0<f.length&&(e===a||e===l))for(r=f.length;r--;){var i=f[r];e!==i[0]||t&&t!==i[1]||n&&n!==i[2]||m.unbind(i[0],i[1],i[2])}return m.unbind(e,t,n)},j=function(e){if(e&&$t(e)){var t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},H={doc:a,settings:u,win:l,files:o,stdMode:!0,boxModel:!0,styleSheetLoader:e,boundEvents:f,styles:i,schema:d,events:m,isBlock:function(e){if("string"==typeof e)return!!n[e];if(e){var t=e.nodeType;if(t)return!(1!==t||!n[e.nodeName])}return!1},$:p,$$:h,root:null,clone:function(t,e){if(!sa||1!==t.nodeType||e)return t.cloneNode(e);var n=a.createElement(t.nodeName);return aa(y(t),function(e){b(n,e.nodeName,v(t,e.nodeName))}),n},getRoot:C,getViewPort:function(e){var t=Ht(e);return{x:t.x,y:t.y,w:t.width,h:t.height}},getRect:function(e){var t,n;return e=g(e),t=w(e),n=S(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:S,getParent:function(e,t,n){var r=E(e,t,n,!1);return r&&0<r.length?r[0]:null},getParents:E,get:g,getNext:function(e,t){return k(e,t,"nextSibling")},getPrev:function(e,t){return k(e,t,"previousSibling")},select:function(e,t){return hi(e,g(t)||u.root_element||a,[])},is:N,add:A,create:D,createHTML:function(e,t,n){var r,o="";for(r in o+="<"+e,t)t.hasOwnProperty(r)&&null!==t[r]&&"undefined"!=typeof t[r]&&(o+=" "+r+'="'+B(t[r])+'"');return void 0!==n?o+">"+n+"</"+e+">":o+" />"},createFragment:function(e){var t,n=a.createElement("div"),r=a.createDocumentFragment();for(r.appendChild(n),e&&(n.innerHTML=e);t=n.firstChild;)r.appendChild(t);return r.removeChild(n),r},remove:P,setStyle:function(e,t,n){var r=q(t)?h(e).css(t,n):h(e).css(t);u.update_styles&&da(i,r)},getStyle:x,setStyles:function(e,t){var n=h(e).css(t);u.update_styles&&da(i,n)},removeAllAttribs:function(e){return _(e,function(e){var t,n=e.attributes;for(t=n.length-1;0<=t;t--)e.removeAttributeNode(n.item(t))})},setAttrib:b,setAttribs:R,getAttrib:v,getPos:w,parseStyle:function(e){return i.parse(e)},serializeStyle:function(e,t){return i.serialize(e,t)},addStyle:function(e){var t,n;if(H!==pa.DOM&&a===V.document){if(r[e])return;r[e]=!0}(n=a.getElementById("mceDefaultStyles"))||((n=a.createElement("style")).id="mceDefaultStyles",n.type="text/css",(t=a.getElementsByTagName("head")[0]).firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(a.createTextNode(e))},loadCSS:function(e){var n;H===pa.DOM||a!==V.document?(e=e||"",n=a.getElementsByTagName("head")[0],aa(e.split(","),function(e){var t;e=hr._addCacheSuffix(e),o[e]||(o[e]=!0,t=D("link",pe(pe({rel:"stylesheet",type:"text/css",href:e},u.contentCssCors?{crossOrigin:"anonymous"}:{}),u.referrerPolicy?{referrerPolicy:u.referrerPolicy}:{})),n.appendChild(t))})):pa.DOM.loadCSS(e)},addClass:function(e,t){h(e).addClass(t)},removeClass:function(e,t){L(e,t,!1)},hasClass:function(e,t){return h(e).hasClass(t)},toggleClass:L,show:function(e){h(e).show()},hide:function(e){h(e).hide()},isHidden:function(e){return"none"===h(e).css("display")},uniqueId:function(e){return(e||"mce_")+t++},setHTML:T,getOuterHTML:function(e){var t="string"==typeof e?g(e):e;return $t(t)?t.outerHTML:na("<div></div>").append(na(t).clone()).html()},setOuterHTML:function(e,t){h(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}P(na(this).html(t),!0)})},decode:O,encode:B,insertAfter:function(e,t){var r=g(t);return _(e,function(e){var t,n;return t=r.parentNode,(n=r.nextSibling)?t.insertBefore(e,n):t.appendChild(e),e})},replace:I,rename:function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=D(e),aa(y(t),function(e){b(n,e.nodeName,v(t,e.nodeName))}),I(n,t,!0)),n||t},findCommonAncestor:function(e,t){for(var n,r=e;r;){for(n=t;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&e.ownerDocument?e.ownerDocument.documentElement:r},toHex:function(e){return i.toHex(hr.trim(e))},run:_,getAttribs:y,isEmpty:function(e,t){var n,r,o=0;if(M(e))return!1;if(e=e.firstChild){var i=new ra(e,e.parentNode),a=d?d.getWhiteSpaceElements():{};t=t||(d?d.getNonEmptyElements():null);do{if(n=e.nodeType,$t(e)){var u=e.getAttribute("data-mce-bogus");if(u){e=i.next("all"===u);continue}if(r=e.nodeName.toLowerCase(),t&&t[r]){if("br"!==r)return!1;o++,e=i.next();continue}if(M(e))return!1}if(8===n)return!1;if(3===n&&!la.test(e.nodeValue))return!1;if(3===n&&e.parentNode&&a[e.parentNode.nodeName]&&la.test(e.nodeValue))return!1;e=i.next()}while(e)}return o<=1},createRng:F,nodeIndex:ma,split:function(e,t,n){var r,o,i,a=F();if(e&&t)return a.setStart(e.parentNode,ma(e)),a.setEnd(t.parentNode,ma(t)),r=a.extractContents(),(a=F()).setStart(t.parentNode,ma(t)+1),a.setEnd(e.parentNode,ma(e)+1),o=a.extractContents(),(i=e.parentNode).insertBefore(Pr(H,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(Pr(H,o),e),P(e),n||t},bind:U,unbind:z,fire:function(e,t,n){return m.fire(e,t,n)},getContentEditable:j,getContentEditableParent:function(e){for(var t=C(),n=null;e&&e!==t&&null===(n=j(e));e=e.parentNode);return n},destroy:function(){if(0<f.length)for(var e=f.length;e--;){var t=f[e];m.unbind(t[0],t[1],t[2])}hi.setDocument&&hi.setDocument()},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset}};return s=fa(i,u,function(){return H}),H}(ia=pa=pa||{}).DOM=ia(V.document),ia.nodeIndex=ma;var ga=pa,ha=ga.DOM,va=hr.each,ya=hr.grep,ba=(Ca.prototype._setReferrerPolicy=function(e){this.settings.referrerPolicy=e},Ca.prototype.loadScript=function(e,t,n){var r,o,i=ha;o=i.uniqueId(),(r=V.document.createElement("script")).id=o,r.type="text/javascript",r.src=hr._addCacheSuffix(e),this.settings.referrerPolicy&&i.setAttrib(r,"referrerpolicy",this.settings.referrerPolicy),r.onload=function(){i.remove(o),r&&(r.onreadystatechange=r.onload=r=null),t()},r.onerror=function(){D(n)?n():"undefined"!=typeof V.console&&V.console.log&&V.console.log("Failed to load script: "+e)},(V.document.getElementsByTagName("head")[0]||V.document.body).appendChild(r)},Ca.prototype.isDone=function(e){return 2===this.states[e]},Ca.prototype.markDone=function(e){this.states[e]=2},Ca.prototype.add=function(e,t,n,r){this.states[e]===undefined&&(this.queue.push(e),this.states[e]=0),t&&(this.scriptLoadedCallbacks[e]||(this.scriptLoadedCallbacks[e]=[]),this.scriptLoadedCallbacks[e].push({success:t,failure:r,scope:n||this}))},Ca.prototype.load=function(e,t,n,r){return this.add(e,t,n,r)},Ca.prototype.remove=function(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]},Ca.prototype.loadQueue=function(e,t,n){this.loadScripts(this.queue,e,t,n)},Ca.prototype.loadScripts=function(n,e,t,r){var o,i=this,a=[],u=function(t,e){va(i.scriptLoadedCallbacks[e],function(e){D(e[t])&&e[t].call(e.scope)}),i.scriptLoadedCallbacks[e]=undefined};i.queueLoadedCallbacks.push({success:e,failure:r,scope:t||this}),(o=function(){var e=ya(n);if(n.length=0,va(e,function(e){2!==i.states[e]?3!==i.states[e]?1!==i.states[e]&&(i.states[e]=1,i.loading++,i.loadScript(e,function(){i.states[e]=2,i.loading--,u("success",e),o()},function(){i.states[e]=3,i.loading--,a.push(e),u("failure",e),o()})):u("failure",e):u("success",e)}),!i.loading){var t=i.queueLoadedCallbacks.slice(0);i.queueLoadedCallbacks.length=0,va(t,function(e){0===a.length?D(e.success)&&e.success.call(e.scope):D(e.failure)&&e.failure.call(e.scope,a)})}})()},Ca.ScriptLoader=new Ca,Ca);function Ca(e){void 0===e&&(e={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=e}var wa,xa=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},Sa={},Na=xa("en"),Ea=function(){return de(Sa,Na.get())},ka={getData:function(){return ie(Sa,function(e){return pe({},e)})},setCode:function(e){e&&Na.set(e)},getCode:function(){return Na.get()},add:function(e,t){var n=Sa[e];n||(Sa[e]=n={}),oe(t,function(e,t){n[t.toLowerCase()]=e})},translate:function(e){var t,n,r=Ea().getOr({}),o=function(e){return D(e)?Object.prototype.toString.call(e):i(e)?"":""+e},i=function(e){return""===e||null===e||e===undefined},a=function(e){var t=o(e);return de(r,t.toLowerCase()).map(o).getOr(t)},u=function(e){return e.replace(/{context:\w+}$/,"")};if(i(e))return"";if(E(t=e)&&me(t,"raw"))return o(e.raw);if(k(n=e)&&1<n.length){var s=e.slice(1);return u(a(e[0]).replace(/\{([0-9]+)\}/g,function(e,t){return me(s,t)?o(s[t]):e}))}return u(a(e))},isRtl:function(){return Ea().bind(function(e){return de(e,"_dir")}).exists(function(e){return"rtl"===e})},hasCode:function(e){return me(Sa,e)}};function _a(){var r=this,o=[],s={},c={},i=[],l=function(t,n){var e=H(i,function(e){return e.name===t&&e.state===n});z(e,function(e){return e.callback()})},f=function(e){var t;return c[e]&&(t=c[e].dependencies),t||[]},d=function(e,t){return"object"==typeof t?t:"string"==typeof e?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}},m=function(o,i,a,u,e){if(!s[o]){var t="string"==typeof i?i:i.prefix+i.resource+i.suffix;0!==t.indexOf("/")&&-1===t.indexOf("://")&&(t=_a.baseURL+"/"+t),s[o]=t.substring(0,t.lastIndexOf("/"));var n=function(){var n,e,t,r;l(o,"loaded"),n=i,e=a,t=u,r=f(o),z(r,function(e){var t=d(n,e);m(t.resource,t,undefined,undefined)}),e&&(t?e.call(t):e.call(ba))};c[o]?n():ba.ScriptLoader.add(t,n,u,e)}},e=function(e,t,n){void 0===n&&(n="added"),me(c,e)&&"added"===n||me(s,e)&&"loaded"===n?t():i.push({name:e,state:n,callback:t})};return{items:o,urls:s,lookup:c,_listeners:i,get:function(e){return c[e]?c[e].instance:undefined},dependencies:f,requireLangPack:function(t,n){!1!==_a.languageLoad&&e(t,function(){var e=ka.getCode();!e||n&&-1===(","+(n||"")+",").indexOf(","+e+",")||ba.ScriptLoader.add(s[t]+"/langs/"+e+".js")},"loaded")},add:function(e,t,n){var r=t;return o.push(r),c[e]={instance:r,dependencies:n},l(e,"added"),r},remove:function(e){delete s[e],delete c[e]},createUrl:d,addComponents:function(e,t){var n=r.urls[e];z(t,function(e){ba.ScriptLoader.add(n+"/"+e)})},load:m,waitFor:e}}(wa=_a=_a||{}).PluginManager=wa(),wa.ThemeManager=wa();var Ra=_a,Ta=function(n,r){var o=null;return{cancel:function(){null!==o&&(V.clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null===o&&(o=V.setTimeout(function(){n.apply(null,e),o=null},r))}}},Aa=function(n,r){var o=null;return{cancel:function(){null!==o&&(V.clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null!==o&&V.clearTimeout(o),o=V.setTimeout(function(){n.apply(null,e),o=null},r)}}},Da=function(e,t){var n=fn(e,t);return n===undefined||""===n?[]:n.split(" ")},Oa=function(e){return e.dom().classList!==undefined},Ba=function(e,t){return o=t,i=Da(n=e,r="class").concat([o]),cn(n,r,i.join(" ")),!0;var n,r,o,i},Pa=function(e,t){return o=t,0<(i=H(Da(n=e,r="class"),function(e){return e!==o})).length?cn(n,r,i.join(" ")):dn(n,r),!1;var n,r,o,i},La=function(e,t){Oa(e)?e.dom().classList.add(t):Ba(e,t)},Ia=function(e){0===(Oa(e)?e.dom().classList:Da(e,"class")).length&&dn(e,"class")},Ma=function(e,t){return Oa(e)&&e.dom().classList.contains(t)},Fa=function(e,t){var n=[];return z(ht(e),function(e){t(e)&&(n=n.concat([e])),n=n.concat(Fa(e,t))}),n},Ua=function(e,t){return n=t,o=(r=e)===undefined?V.document:r.dom(),it(o)?[]:U(o.querySelectorAll(n),Ne.fromDom);var n,r,o};function za(e,t,n,r,o){return e(n,r)?R.some(n):D(o)&&o(n)?R.none():t(n,r,o)}var ja,Ha=function(e,t,n){for(var r=e.dom(),o=D(n)?n:x(!1);r.parentNode;){r=r.parentNode;var i=Ne.fromDom(r);if(t(i))return R.some(i);if(o(i))break}return R.none()},Va=function(e,t,n){return za(function(e,t){return t(e)},Ha,e,t,n)},qa=function(e,t,n){return Ha(e,function(e){return ot(e,t)},n)},$a=function(e,t){return n=t,o=(r=e)===undefined?V.document:r.dom(),it(o)?R.none():R.from(o.querySelector(n)).map(Ne.fromDom);var n,r,o},Wa=function(e,t,n){return za(function(e,t){return ot(e,t)},qa,e,t,n)},Ka=x("mce-annotation"),Xa=x("data-mce-annotation"),Ya=x("data-mce-annotation-uid"),Ga=function(r,e){var t=r.selection.getRng(),n=Ne.fromDom(t.startContainer),o=Ne.fromDom(r.getBody()),i=e.fold(function(){return"."+Ka()},function(e){return"["+Xa()+'="'+e+'"]'}),a=vt(n,t.startOffset).getOr(n),u=Wa(a,i,function(e){return at(e,o)}),s=function(e,t){return n=t,(r=e.dom())&&r.hasAttribute&&r.hasAttribute(n)?R.some(fn(e,t)):R.none();var n,r};return u.bind(function(e){return s(e,""+Ya()).bind(function(n){return s(e,""+Xa()).map(function(e){var t=Ja(r,n);return{uid:n,name:e,elements:t}})})})},Ja=function(e,t){var n=Ne.fromDom(e.getBody());return Ua(n,"["+Ya()+'="'+t+'"]')},Qa=function(i,e){var a=xa({}),c=function(e,t){u(e,function(e){return t(e),e})},u=function(e,t){var n=a.get(),r=t(n.hasOwnProperty(e)?n[e]:{listeners:[],previous:xa(R.none())});n[e]=r,a.set(n)},t=Aa(function(){var e,t,n,r=a.get(),o=(e=ne(r),(n=B.call(e,0)).sort(t),n);z(o,function(e){u(e,function(u){var s=u.previous.get();return Ga(i,R.some(e)).fold(function(){var t;s.isSome()&&(c(t=e,function(e){z(e.listeners,function(e){return e(!1,t)})}),u.previous.set(R.none()))},function(e){var t,n,r,o=e.uid,i=e.name,a=e.elements;s.is(o)||(n=o,r=a,c(t=i,function(e){z(e.listeners,function(e){return e(!0,t,{uid:n,nodes:U(r,function(e){return e.dom()})})})}),u.previous.set(R.some(o)))}),{previous:u.previous,listeners:u.listeners}})})},30);i.on("remove",function(){t.cancel()}),i.on("NodeChange",function(){t.throttle()});return{addListener:function(e,t){u(e,function(e){return{previous:e.previous,listeners:e.listeners.concat([t])}})}}},Za=function(e,n){e.on("init",function(){e.serializer.addNodeFilter("span",function(e){z(e,function(t){var e;e=t,R.from(e.attr(Xa())).bind(n.lookup).each(function(e){!1===e.persistent&&t.unwrap()})})})})},eu=0,tu=function(e){var t=(new Date).getTime();return e+"_"+Math.floor(1e9*Math.random())+ ++eu+String(t)},nu=function(e,t){var n,r,o=ct(e).dom(),i=Ne.fromDom(o.createDocumentFragment()),a=(n=t,(r=(o||V.document).createElement("div")).innerHTML=n,ht(Ne.fromDom(r)));Nt(i,a),Et(e),St(e,i)},ru=function(e,t){return Ne.fromDom(e.dom().cloneNode(t))},ou=function(e){return ru(e,!1)},iu=function(e){return ru(e,!0)},au=function(e,t,n){void 0===n&&(n=g);var r=new ra(e,t),o=function(e){for(var t;(t=r[e]())&&!Zt(t)&&!n(t););return R.from(t).filter(Zt)};return{current:function(){return R.from(r.current()).filter(Zt)},next:function(){return o("next")},prev:function(){return o("prev")},prev2:function(){return o("prev2")}}},uu=function(t,e){var i=e||function(e){return t.isBlock(e)||rn(e)||an(e)},a=function(e,t,n,r){if(Zt(e)){var o=r(e,t,e.data);if(-1!==o)return R.some({container:e,offset:o})}return n().bind(function(e){return a(e.container,e.offset,n,r)})};return{backwards:function(e,t,n,r){var o=au(e,r,i);return a(e,t,function(){return o.prev().map(function(e){return{container:e,offset:e.length}})},n).getOrNull()},forwards:function(e,t,n,r){var o=au(e,r,i);return a(e,t,function(){return o.next().map(function(e){return{container:e,offset:0}})},n).getOrNull()}}},su=ro,cu=function(e){return e===ro},lu=function(e){return e.replace(/\uFEFF/g,"")},fu=$t,du=Zt,mu=function(e){return du(e)&&(e=e.parentNode),fu(e)&&e.hasAttribute("data-mce-caret")},pu=function(e){return du(e)&&cu(e.data)},gu=function(e){return mu(e)||pu(e)},hu=function(e){return e.firstChild!==e.lastChild||!rn(e.firstChild)},vu=function(e){var t=e.container();return!(!e||!Zt(t))&&(t.data.charAt(e.offset())===su||e.isAtStart()&&pu(t.previousSibling))},yu=function(e){var t=e.container();return!(!e||!Zt(t))&&(t.data.charAt(e.offset()-1)===su||e.isAtEnd()&&pu(t.nextSibling))},bu=function(e,t,n){var r,o,i;return(r=t.ownerDocument.createElement(e)).setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(((i=V.document.createElement("br")).setAttribute("data-mce-bogus","1"),i)),o=t.parentNode,n?o.insertBefore(r,t):t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r),r},Cu=function(e){return du(e)&&e.data[0]===su},wu=function(e){return du(e)&&e.data[e.data.length-1]===su},xu=function(e){return e&&e.hasAttribute("data-mce-caret")?(t=e.getElementsByTagName("br"),n=t[t.length-1],Yt(n)&&n.parentNode.removeChild(n),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null;var t,n},Su=on,Nu=an,Eu=rn,ku=Zt,_u=Wt(["script","style","textarea"]),Ru=Wt(["img","input","textarea","hr","iframe","video","audio","object"]),Tu=Wt(["table"]),Au=gu,Du=function(e){return!Au(e)&&(ku(e)?!_u(e.parentNode):Ru(e)||Eu(e)||Tu(e)||Ou(e))},Ou=function(e){return!1===($t(t=e)&&"true"===t.getAttribute("unselectable"))&&Nu(e);var t},Bu=function(e,t){return Du(e)&&function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(Ou(e))return!1;if(Su(e))return!0}return!0}(e,t)},Pu=Math.round,Lu=function(e){return e?{left:Pu(e.left),top:Pu(e.top),bottom:Pu(e.bottom),right:Pu(e.right),width:Pu(e.width),height:Pu(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},Iu=function(e,t){return e=Lu(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e},Mu=function(e,t,n){return 0<=e&&e<=Math.min(t.height,n.height)/2},Fu=function(e,t){return e.bottom-e.height/2<t.top||!(e.top>t.bottom)&&Mu(t.top-e.bottom,e,t)},Uu=function(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&Mu(t.bottom-e.top,e,t)},zu=function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},ju=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},Hu=function(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},Vu=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]"),qu=function(e){return"string"==typeof e&&768<=e.charCodeAt(0)&&Vu.test(e)},$u=function(e,t,n){return e.isSome()&&t.isSome()?R.some(n(e.getOrDie(),t.getOrDie())):R.none()},Wu=$t,Ku=Du,Xu=Kt("display","block table"),Yu=Kt("float","left right"),Gu=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0}}(Wu,Ku,m(Yu)),Ju=m(Kt("white-space","pre pre-line pre-wrap")),Qu=Zt,Zu=rn,es=ga.nodeIndex,ts=Hu,ns=function(e){return"createRange"in e?e.createRange():ga.DOM.createRng()},rs=function(e){return e&&/[\r\n\t ]/.test(e)},os=function(e){return!!e.setStart&&!!e.setEnd},is=function(e){var t,n=e.startContainer,r=e.startOffset;return!!(rs(e.toString())&&Ju(n.parentNode)&&Zt(n)&&(t=n.data,rs(t[r-1])||rs(t[r+1])))},as=function(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom},us=function(e){var t,n,r,o,i,a,u,s;return t=0<(n=e.getClientRects()).length?Lu(n[0]):Lu(e.getBoundingClientRect()),!os(e)&&Zu(e)&&as(t)?(i=(r=e).ownerDocument,a=ns(i),u=i.createTextNode(oo),(s=r.parentNode).insertBefore(u,r),a.setStart(u,0),a.setEnd(u,1),o=Lu(a.getBoundingClientRect()),s.removeChild(u),o):as(t)&&os(e)?function(e){var t=e.startContainer,n=e.endContainer,r=e.startOffset,o=e.endOffset;if(t===n&&Zt(n)&&0===r&&1===o){var i=e.cloneRange();return i.setEndAfter(n),us(i)}return null}(e):t},ss=function(e,t){var n=Iu(e,t);return n.width=1,n.right=n.left+1,n},cs=function(e){var t,n,r=[],o=function(e){var t,n;0!==e.height&&(0<r.length&&(t=e,n=r[r.length-1],t.left===n.left&&t.top===n.top&&t.bottom===n.bottom&&t.right===n.right)||r.push(e))},i=function(e,t){var n=ns(e.ownerDocument);if(t<e.data.length){if(qu(e.data[t]))return r;if(qu(e.data[t-1])&&(n.setStart(e,t),n.setEnd(e,t+1),!is(n)))return o(ss(us(n),!1)),r}0<t&&(n.setStart(e,t-1),n.setEnd(e,t),is(n)||o(ss(us(n),!1))),t<e.data.length&&(n.setStart(e,t),n.setEnd(e,t+1),is(n)||o(ss(us(n),!0)))};if(Qu(e.container()))return i(e.container(),e.offset()),r;if(Wu(e.container()))if(e.isAtEnd())n=ts(e.container(),e.offset()),Qu(n)&&i(n,n.data.length),Gu(n)&&!Zu(n)&&o(ss(us(n),!1));else{if(n=ts(e.container(),e.offset()),Qu(n)&&i(n,0),Gu(n)&&e.isAtEnd())return o(ss(us(n),!1)),r;t=ts(e.container(),e.offset()-1),Gu(t)&&!Zu(t)&&(!Xu(t)&&!Xu(n)&&Gu(n)||o(ss(us(t),!1))),Gu(n)&&o(ss(us(n),!0))}return r};function ls(t,n,e){var r=function(){return e=e||cs(ls(t,n))};return{container:x(t),offset:x(n),toRange:function(){var e;return(e=ns(t.ownerDocument)).setStart(t,n),e.setEnd(t,n),e},getClientRects:r,isVisible:function(){return 0<r().length},isAtStart:function(){return Qu(t),0===n},isAtEnd:function(){return Qu(t)?n>=t.data.length:n>=t.childNodes.length},isEqual:function(e){return e&&t===e.container()&&n===e.offset()},getNode:function(e){return ts(t,e?n-1:n)}}}(ja=ls=ls||{}).fromRangeStart=function(e){return ja(e.startContainer,e.startOffset)},ja.fromRangeEnd=function(e){return ja(e.endContainer,e.endOffset)},ja.after=function(e){return ja(e.parentNode,es(e)+1)},ja.before=function(e){return ja(e.parentNode,es(e))},ja.isAbove=function(e,t){return $u(Z(t.getClientRects()),ee(e.getClientRects()),Fu).getOr(!1)},ja.isBelow=function(e,t){return $u(ee(t.getClientRects()),Z(e.getClientRects()),Uu).getOr(!1)},ja.isAtStart=function(e){return!!e&&e.isAtStart()},ja.isAtEnd=function(e){return!!e&&e.isAtEnd()},ja.isTextPosition=function(e){return!!e&&Zt(e.container())},ja.isElementPosition=function(e){return!1===ja.isTextPosition(e)};var fs,ds,ms=ls,ps=Zt,gs=Yt,hs=ga.nodeIndex,vs=function(e){var t=e.parentNode;return gs(t)?vs(t):t},ys=function(e){return e?cr(e.childNodes,function(e,t){return gs(t)&&"BR"!==t.nodeName?e=e.concat(ys(t)):e.push(t),e},[]):[]},bs=function(t){return function(e){return t===e}},Cs=function(e){var t,r,n,o;return(ps(e)?"text()":e.nodeName.toLowerCase())+"["+(r=ys(vs(t=e)),n=lr(r,bs(t),t),r=r.slice(0,n+1),o=cr(r,function(e,t,n){return ps(t)&&ps(r[n-1])&&e++,e},0),r=ur(r,Wt([t.nodeName])),(n=lr(r,bs(t),t))-o)+"]"},ws=function(e,t){var n,r,o,i,a,u=[];return n=t.container(),r=t.offset(),ps(n)?o=function(e,t){for(;(e=e.previousSibling)&&ps(e);)t+=e.data.length;return t}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),u.push(Cs(n)),a=function(e,t,n){var r=[];for(t=t.parentNode;t!==e&&(!n||!n(t));t=t.parentNode)r.push(t);return r}(e,n),a=ur(a,m(Yt)),(u=u.concat(ar(a,function(e){return Cs(e)}))).reverse().join("/")+","+o},xs=function(e,t){var n,r,o;return t?(t=(n=t.split(","))[0].split("/"),o=1<n.length?n[1]:"before",(r=cr(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),n=e,r=t[1],o=parseInt(t[2],10),i=ys(n),i=ur(i,function(e,t){return!ps(e)||!ps(i[t-1])}),(i=ur(i,Wt([r])))[o]):null;var n,r,o,i},e))?ps(r)?function(e,t){for(var n,r=e,o=0;ps(r);){if(n=r.data.length,o<=t&&t<=o+n){e=r,t-=o;break}if(!ps(r.nextSibling)){e=r,t=n;break}o+=n,r=r.nextSibling}return ps(e)&&t>e.data.length&&(t=e.data.length),ms(e,t)}(r,parseInt(o,10)):(o="after"===o?hs(r)+1:hs(r),ms(r.parentNode,o)):null):null},Ss=function(e,t){Zt(t)&&0===t.data.length&&e.remove(t)},Ns=function(e,t,n){var r,o,i,a,u,s,c;nn(n)?(i=e,a=t,u=n,s=R.from(u.firstChild),c=R.from(u.lastChild),a.insertNode(u),s.each(function(e){return Ss(i,e.previousSibling)}),c.each(function(e){return Ss(i,e.nextSibling)})):(r=e,o=n,t.insertNode(o),Ss(r,o.previousSibling),Ss(r,o.nextSibling))},Es=an,ks=function(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],s=[],c=0,l=e.getRoot();for(Zt(a)?s.push(n?function(e,t,n){var r,o;for(o=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&Zt(r);r=r.previousSibling)o+=e(r.data).length;return o}(t,a,u):u):(u>=(i=a.childNodes).length&&i.length&&(c=1,u=Math.max(0,i.length-1)),s.push(e.nodeIndex(i[u],n)+c));a&&a!==l;a=a.parentNode)s.push(e.nodeIndex(a,n));return s},_s=function(e,t,n){var r=0;return hr.each(e.select(t),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++}),r},Rs=function(e,t){var n,r,o,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],$t(n)&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(t?r:r-1,o.length-1)])&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r))},Ts=function(e){return Rs(e,!0),Rs(e,!1),e},As=function(e,t){var n;if($t(e)&&(e=Hu(e,t),Es(e)))return e;if(gu(e)){if(Zt(e)&&mu(e)&&(e=e.parentNode),n=e.previousSibling,Es(n))return n;if(n=e.nextSibling,Es(n))return n}},Ds=function(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Es(r)||"IMG"===o)return{name:o,index:_s(n.dom,o,r)};var a,u,s,c,l,f,d,m=As((a=i).startContainer,a.startOffset)||As(a.endContainer,a.endOffset);return m?{name:o=m.tagName,index:_s(n.dom,o,m)}:(u=e,c=t,l=i,f=(s=n).dom,(d={}).start=ks(f,u,c,l,!0),s.isCollapsed()||(d.end=ks(f,u,c,l,!1)),d)},Os=function(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,"&#xFEFF;"):e.create("span",r)},Bs=function(e,t){var n=e.dom,r=e.getRng(),o=n.uniqueId(),i=e.isCollapsed(),a=e.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:_s(n,u,a)};var s=Ts(r.cloneRange());if(!i){s.collapse(!1);var c=Os(n,o+"_end",t);Ns(n,s,c)}(r=Ts(r)).collapse(!0);var l=Os(n,o+"_start",t);return Ns(n,r,l),e.moveToBookmark({id:o,keep:!0}),{id:o}},Ps=function(e,t,n){return 2===t?Ds(lu,n,e):3===t?(o=(r=e).getRng(),{start:ws(r.dom.getRoot(),ms.fromRangeStart(o)),end:ws(r.dom.getRoot(),ms.fromRangeEnd(o))}):t?{rng:e.getRng()}:Bs(e,!1);var r,o},Ls=N(Ds,d,!0),Is="_mce_caret",Ms=function(e){return $t(e)&&e.id===Is},Fs=function(e,t){for(;t&&t!==e;){if(t.id===Is)return t;t=t.parentNode}return null},Us=ga.DOM,zs=function(e,t,n){var r=e.getParam(t,n);if(-1===r.indexOf("="))return r;var o=e.getParam(t,"","hash");return o.hasOwnProperty(e.id)?o[e.id]:n},js=function(e){return e.getParam("content_security_policy","")},Hs=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":!0===t?"p":t},Vs=function(e){return e.getParam("forced_root_block_attrs",{})},qs=function(e){return e.getParam("automatic_uploads",!0,"boolean")},$s=function(e){return e.getParam("icons","","string")},Ws=function(e){return e.getParam("language","en","string")},Ks=function(e){return e.getParam("indent_use_margin",!1)},Xs=$t,Ys=Zt,Gs=function(e){var t=e.parentNode;t&&t.removeChild(e)},Js=function(e,t){0===t.length?Gs(e):e.nodeValue=t},Qs=function(e){var t=lu(e);return{count:e.length-t.length,text:t}},Zs=function(e,t){return rc(e),t},ec=function(e,t){var n,r,o=t.container(),i=(n=te(o.childNodes),(-1===(r=I(n,e))?R.none():R.some(r)).map(function(e){return e<t.offset()?ms(o,t.offset()-1):t}).getOr(t));return rc(e),i},tc=function(e,t){return Ys(e)&&t.container()===e?(r=t,o=Qs((n=e).data.substr(0,r.offset())),i=Qs(n.data.substr(r.offset())),0<(a=o.text+i.text).length?(Js(n,a),ms(n,r.offset()-o.count)):r):Zs(e,t);var n,r,o,i,a},nc=function(e,t){return ms.isTextPosition(t)?tc(e,t):(n=e,((r=t).container()===n.parentNode?ec:Zs)(n,r));var n,r},rc=function(e){if(Xs(e)&&gu(e)&&(hu(e)?e.removeAttribute("data-mce-caret"):Gs(e)),Ys(e)){var t=lu(function(e){try{return e.nodeValue}catch(t){return""}}(e));Js(e,t)}},oc=nt().browser,ic=an,ac=function(e,t,n){var r,o,i,a,u,s=Iu(t.getBoundingClientRect(),n);return i="BODY"===e.tagName?(r=e.ownerDocument.documentElement,o=e.scrollLeft||r.scrollLeft,e.scrollTop||r.scrollTop):(u=e.getBoundingClientRect(),o=e.scrollLeft-u.left,e.scrollTop-u.top),s.left+=o,s.right+=o,s.top+=i,s.bottom+=i,s.width=1,0<(a=t.offsetWidth-t.clientWidth)&&(n&&(a*=-1),s.left+=a,s.right+=a),s},uc=function(e,a,u,t){var n,s,c=xa(R.none()),r=Hs(e),l=0<r.length?r:"p",f=function(){!function(e){var t,n,r,o,i;for(t=Ua(Ne.fromDom(e),"*[contentEditable=false]"),o=0;o<t.length;o++)r=(n=t[o].dom()).previousSibling,wu(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(i.length-1,1)),r=n.nextSibling,Cu(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(0,1))}(a),s&&(rc(s),s=null),c.get().each(function(e){na(e.caret).remove(),c.set(R.none())}),n&&(Xn.clearInterval(n),n=null)},d=function(){n=Xn.setInterval(function(){t()?na("div.mce-visual-caret",a).toggleClass("mce-visual-caret-hidden"):na("div.mce-visual-caret",a).addClass("mce-visual-caret-hidden")},500)};return{show:function(t,e){var n,r,o;if(f(),$t(o=e)&&/^(TD|TH)$/i.test(o.tagName))return null;if(!u(e))return s=function(e,t){var n,r,o;if(r=e.ownerDocument.createTextNode(su),o=e.parentNode,t){if(n=e.previousSibling,du(n)){if(gu(n))return n;if(wu(n))return n.splitText(n.data.length-1)}o.insertBefore(r,e)}else{if(n=e.nextSibling,du(n)){if(gu(n))return n;if(Cu(n))return n.splitText(1),n}e.nextSibling?o.insertBefore(r,e.nextSibling):o.appendChild(r)}return r}(e,t),r=e.ownerDocument.createRange(),ic(s.nextSibling)?(r.setStart(s,0),r.setEnd(s,0)):(r.setStart(s,1),r.setEnd(s,1)),r;s=bu(l,e,t),n=ac(a,e,t),na(s).css("top",n.top);var i=na('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(n).appendTo(a)[0];return c.set(R.some({caret:i,element:e,before:t})),c.get().each(function(e){t&&na(e.caret).addClass("mce-visual-caret-before")}),d(),(r=e.ownerDocument.createRange()).setStart(s,0),r.setEnd(s,0),r},hide:f,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){c.get().each(function(e){var t=ac(a,e.element,e.before);na(e.caret).css(pe({},t))})},destroy:function(){return Xn.clearInterval(n)}}},sc=function(){return oc.isIE()||oc.isEdge()||oc.isFirefox()},cc=function(e){return ic(e)||Gt(e)&&sc()},lc=an,fc=Kt("display","block table table-cell table-caption list-item"),dc=gu,mc=mu,pc=$t,gc=Du,hc=function(e,t){for(var n;n=e(t);)if(!mc(n))return n;return null},vc=function(e,t,n,r,o){var i=new ra(e,r);if(t<0){if((lc(e)||mc(e))&&n(e=hc(i.prev,!0)))return e;for(;e=hc(i.prev,o);)if(n(e))return e}if(0<t){if((lc(e)||mc(e))&&n(e=hc(i.next,!0)))return e;for(;e=hc(i.next,o);)if(n(e))return e}return null},yc=function(e,t){for(;e&&e!==t;){if(fc(e))return e;e=e.parentNode}return null},bc=function(e,t,n){return yc(e.container(),n)===yc(t.container(),n)},Cc=function(e,t){var n,r;return t?(n=t.container(),r=t.offset(),pc(n)?n.childNodes[r+e]:null):null},wc=function(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},xc=function(e,t,n){var r,o,i,a;for(o=e?"previousSibling":"nextSibling";n&&n!==t;){if(r=n[o],dc(r)&&(r=r[o]),lc(r)){if(a=n,yc(r,i=t)===yc(a,i))return r;break}if(gc(r))break;n=n.parentNode}return null},Sc=N(wc,!0),Nc=N(wc,!1),Ec=function(e,t,n){var r,o,i,a,u=N(xc,!0,t),s=N(xc,!1,t);if(o=n.startContainer,i=n.startOffset,mu(o)){if(pc(o)||(o=o.parentNode),"before"===(a=o.getAttribute("data-mce-caret"))&&(r=o.nextSibling,cc(r)))return Sc(r);if("after"===a&&(r=o.previousSibling,cc(r)))return Nc(r)}if(!n.collapsed)return n;if(Zt(o)){if(dc(o)){if(1===e){if(r=s(o))return Sc(r);if(r=u(o))return Nc(r)}if(-1===e){if(r=u(o))return Nc(r);if(r=s(o))return Sc(r)}return n}if(wu(o)&&i>=o.data.length-1)return 1===e&&(r=s(o))?Sc(r):n;if(Cu(o)&&i<=1)return-1===e&&(r=u(o))?Nc(r):n;if(i===o.data.length)return(r=s(o))?Sc(r):n;if(0===i)return(r=u(o))?Nc(r):n}return n},kc=function(e,t){return R.from(Cc(e?0:-1,t)).filter(lc)},_c=function(e,t,n){var r=Ec(e,t,n);return-1===e?ls.fromRangeStart(r):ls.fromRangeEnd(r)},Rc=function(e){return R.from(e.getNode()).map(Ne.fromDom)},Tc=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},Ac=function(e,t){var n=bc(e,t);return!(n||!rn(e.getNode()))||n};(ds=fs=fs||{})[ds.Backwards=-1]="Backwards",ds[ds.Forwards=1]="Forwards";var Dc,Oc=an,Bc=Zt,Pc=$t,Lc=rn,Ic=Du,Mc=function(e){return Ru(e)||!!Ou(t=e)&&!0!==W(te(t.getElementsByTagName("*")),function(e,t){return e||Su(t)},!1);var t},Fc=Bu,Uc=function(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null},zc=function(e,t){if(0<e){if(Ic(t.previousSibling)&&!Bc(t.previousSibling))return ms.before(t);if(Bc(t))return ms(t,0)}if(e<0){if(Ic(t.nextSibling)&&!Bc(t.nextSibling))return ms.after(t);if(Bc(t))return ms(t,t.data.length)}return!(e<0)||Lc(t)?ms.before(t):ms.after(t)},jc=function(e,t,n){var r,o,i,a,u;if(!Pc(n)||!t)return null;if(t.isEqual(ms.after(n))&&n.lastChild){if(u=ms.after(n.lastChild),e<0&&Ic(n.lastChild)&&Pc(n.lastChild))return Lc(n.lastChild)?ms.before(n.lastChild):u}else u=t;var s,c,l,f=u.container(),d=u.offset();if(Bc(f)){if(e<0&&0<d)return ms(f,--d);if(0<e&&d<f.length)return ms(f,++d);r=f}else{if(e<0&&0<d&&(o=Uc(f,d-1),Ic(o)))return!Mc(o)&&(i=vc(o,e,Fc,o))?Bc(i)?ms(i,i.data.length):ms.after(i):Bc(o)?ms(o,o.data.length):ms.before(o);if(0<e&&d<f.childNodes.length&&(o=Uc(f,d),Ic(o)))return Lc(o)?(s=n,(l=(c=o).nextSibling)&&Ic(l)?Bc(l)?ms(l,0):ms.before(l):jc(fs.Forwards,ms.after(c),s)):!Mc(o)&&(i=vc(o,e,Fc,o))?Bc(i)?ms(i,0):ms.before(i):Bc(o)?ms(o,0):ms.after(o);r=o||u.getNode()}return(0<e&&u.isAtEnd()||e<0&&u.isAtStart())&&(r=vc(r,e,x(!0),n,!0),Fc(r,n))?zc(e,r):(o=vc(r,e,Fc,n),!(a=fr(H(function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n}(f,n),Oc)))||o&&a.contains(o)?o?zc(e,o):null:u=0<e?ms.after(a):ms.before(a))},Hc=function(t){return{next:function(e){return jc(fs.Forwards,e,t)},prev:function(e){return jc(fs.Backwards,e,t)}}},Vc=function(e){return ms.isTextPosition(e)?0===e.offset():Du(e.getNode())},qc=function(e){if(ms.isTextPosition(e)){var t=e.container();return e.offset()===t.data.length}return Du(e.getNode(!0))},$c=function(e,t){return!ms.isTextPosition(e)&&!ms.isTextPosition(t)&&e.getNode()===t.getNode(!0)},Wc=function(e,t,n){return e?!$c(t,n)&&(r=t,!(!ms.isTextPosition(r)&&rn(r.getNode())))&&qc(t)&&Vc(n):!$c(n,t)&&Vc(t)&&qc(n);var r},Kc=function(e,t,n){var r=Hc(t);return R.from(e?r.next(n):r.prev(n))},Xc=function(t,n,r){return Kc(t,n,r).bind(function(e){return bc(r,e,n)&&Wc(t,r,e)?Kc(t,n,e):R.some(e)})},Yc=function(t,n,e,r){return Xc(t,n,e).bind(function(e){return r(e)?Yc(t,n,e,r):R.some(e)})},Gc=function(e,t){var n,r,o,i,a,u=e?t.firstChild:t.lastChild;return Zt(u)?R.some(ms(u,e?0:u.data.length)):u?Du(u)?R.some(e?ms.before(u):rn(a=u)?ms.before(a):ms.after(a)):(r=t,o=u,i=(n=e)?ms.before(o):ms.after(o),Kc(n,r,i)):R.none()},Jc=N(Kc,!0),Qc=N(Kc,!1),Zc=N(Gc,!0),el=N(Gc,!1),tl=function(e,t){return $t(t)&&e.isBlock(t)&&!t.innerHTML&&!rr.ie&&(t.innerHTML='<br data-mce-bogus="1" />'),t},nl=function(e,t){return el(e).fold(function(){return!1},function(e){return t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0})},rl=function(e,t,n){return!(!1!==t.hasChildNodes()||!Fs(e,t))&&(o=n,i=(r=t).ownerDocument.createTextNode(su),r.appendChild(i),o.setStart(i,0),o.setEnd(i,0),!0);var r,o,i},ol=function(e,t,n,r){var o,i,a,u,s=n[t?"start":"end"],c=e.getRoot();if(s){for(a=s[0],i=c,o=s.length-1;1<=o;o--){if(u=i.childNodes,rl(c,i,r))return!0;if(s[o]>u.length-1)return!!rl(c,i,r)||nl(i,r);i=u[s[o]]}3===i.nodeType&&(a=Math.min(s[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(s[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},il=function(e){return Zt(e)&&0<e.data.length},al=function(e,t,n){var r,o,i,a,u,s,c=e.get(n.id+"_"+t),l=n.keep;if(c){if(r=c.parentNode,s=(u=(o="start"===t?l?c.hasChildNodes()?(r=c.firstChild,1):il(c.nextSibling)?(r=c.nextSibling,0):il(c.previousSibling)?(r=c.previousSibling,c.previousSibling.data.length):(r=c.parentNode,e.nodeIndex(c)+1):e.nodeIndex(c):l?c.hasChildNodes()?(r=c.firstChild,1):il(c.previousSibling)?(r=c.previousSibling,c.previousSibling.data.length):(r=c.parentNode,e.nodeIndex(c)):e.nodeIndex(c),r),o),!l){for(a=c.previousSibling,i=c.nextSibling,hr.each(hr.grep(c.childNodes),function(e){Zt(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});c=e.get(n.id+"_"+t);)e.remove(c,!0);a&&i&&a.nodeType===i.nodeType&&Zt(a)&&!rr.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),e.remove(i),s=(u=a,o))}return R.some(ms(u,s))}return R.none()},ul=function(e,t){var n,r,o,i,a,u,s,c,l,f,d,m,p,g,h=e.dom;if(t){if(g=t,hr.isArray(g.start))return m=t,p=(d=h).createRng(),ol(d,!0,m,p)&&ol(d,!1,m,p)?R.some(p):R.none();if("string"==typeof t.start)return R.some((c=t,l=(s=h).createRng(),f=xs(s.getRoot(),c.start),l.setStart(f.container(),f.offset()),f=xs(s.getRoot(),c.end),l.setEnd(f.container(),f.offset()),l));if(t.hasOwnProperty("id"))return a=al(o=h,"start",i=t),u=al(o,"end",i),$u(a,u.or(a),function(e,t){var n=o.createRng();return n.setStart(tl(o,e.container()),e.offset()),n.setEnd(tl(o,t.container()),t.offset()),n});if(t.hasOwnProperty("name"))return n=h,r=t,R.from(n.select(r.name)[r.index]).map(function(e){var t=n.createRng();return t.selectNode(e),t});if(t.hasOwnProperty("rng"))return R.some(t.rng)}return R.none()},sl=function(e,t,n){return Ps(e,t,n)},cl=function(t,e){ul(t,e).each(function(e){t.setRng(e)})},ll=function(e){return $t(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},fl=(Dc=oo,function(e){return Dc===e}),dl=function(e){return""!==e&&-1!==" \f\n\r\t\x0B".indexOf(e)},ml=function(e){return!dl(e)&&!fl(e)},pl=function(e){return!!e.nodeType},gl=function(e,t,n){var r,o,i,a,u=n.startOffset,s=n.startContainer;if((n.startContainer!==n.endContainer||!(a=n.startContainer.childNodes[n.startOffset])||!/^(IMG)$/.test(a.nodeName))&&1===s.nodeType)for(u<(i=s.childNodes).length?(s=i[u],r=new ra(s,e.getParent(s,e.isBlock))):(s=i[i.length-1],(r=new ra(s,e.getParent(s,e.isBlock))).next(!0)),o=r.current();o;o=r.next())if(3===o.nodeType&&!bl(o))return n.setStart(o,0),void t.setRng(n)},hl=function(e,t,n){if(e){var r=t?"nextSibling":"previousSibling";for(e=n?e:e[r];e;e=e[r])if(1===e.nodeType||!bl(e))return e}},vl=function(e,t){return pl(t)&&(t=t.nodeName),!!e.schema.getTextBlockElements()[t.toLowerCase()]},yl=function(e,t,n){return e.schema.isValidChild(t,n)},bl=function(e){return e&&Zt(e)&&/^([\t \r\n]+|)$/.test(e.nodeValue)},Cl=function(e,n){return"string"!=typeof e?e=e(n):n&&(e=e.replace(/%(\w+)/g,function(e,t){return n[t]||e})),e},wl=function(e,t){return e=""+((e=e||"").nodeName||e),t=""+((t=t||"").nodeName||t),e.toLowerCase()===t.toLowerCase()},xl=function(e,t,n){return"color"!==n&&"backgroundColor"!==n||(t=e.toHex(t)),"fontWeight"===n&&700===t&&(t="bold"),"fontFamily"===n&&(t=t.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+t},Sl=function(e,t,n){return xl(e,e.getStyle(t,n),n)},Nl=function(t,e){var n;return t.getParent(e,function(e){return(n=t.getStyle(e,"text-decoration"))&&"none"!==n}),n},El=function(e,t,n){return e.getParents(t,n,e.getRoot())},kl=function(t,e,n){var r=["inline","block","selector","attributes","styles","classes"],a=function(e){return le(e,function(e,t){return F(r,function(e){return e===t})})};return F(t.formatter.get(e),function(e){var i=a(e);return F(t.formatter.get(n),function(e){var t,n,r,o=a(e);return t=i,n=o,void 0===r&&(r=l),u(r).eq(t,n)})})},_l=ll,Rl=El,Tl=bl,Al=vl,Dl=function(e,t){for(var n=t;n;){if($t(n)&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},Ol=function(e,t,n,r){for(var o=t.data,i=n;e?0<=i:i<o.length;e?i--:i++)if(r(o.charAt(i)))return e?i+1:i;return-1},Bl=function(e,t,n){return Ol(e,t,n,function(e){return fl(e)||dl(e)})},Pl=function(e,t,n){return Ol(e,t,n,ml)},Ll=function(i,e,t,n,a,r){var u,s=i.getParent(t,i.isBlock)||e,o=function(e,t,n){var r=uu(i),o=a?r.backwards:r.forwards;return R.from(o(e,t,function(e,t){return _l(e.parentNode)?-1:n(a,u=e,t)},s))};return o(t,n,Bl).bind(function(e){return r?o(e.container,e.offset+(a?-1:0),Pl):R.some(e)}).orThunk(function(){return u?R.some({container:u,offset:a?0:u.length}):R.none()})},Il=function(e,t,n,r,o){Zt(r)&&0===r.nodeValue.length&&r[o]&&(r=r[o]);for(var i=Rl(e,r),a=0;a<i.length;a++)for(var u=0;u<t.length;u++){var s=t[u];if(!("collapsed"in s&&s.collapsed!==n.collapsed)&&e.is(i[a],s.selector))return i[a]}return r},Ml=function(t,e,n,r){var o,i=t.dom,a=i.getRoot();if(e[0].wrapper||(o=i.getParent(n,e[0].block,a)),!o){var u=i.getParent(n,"LI,TD,TH");o=i.getParent(Zt(n)?n.parentNode:n,function(e){return e!==a&&Al(t,e)},u)}if(o&&e[0].wrapper&&(o=Rl(i,o,"ul,ol").reverse()[0]||o),!o)for(o=n;o[r]&&!i.isBlock(o[r])&&(o=o[r],!wl(o,"br")););return o||n},Fl=function(e,t,n,r,o,i,a){var u,s,c,l,f,d;if(u=s=a?n:o,l=a?"previousSibling":"nextSibling",f=e.getRoot(),Zt(u)&&!Tl(u)&&(a?0<r:i<u.nodeValue.length))return u;for(;;){if(!t[0].block_expand&&e.isBlock(s))return s;for(c=s[l];c;c=c[l])if(!_l(c)&&!Tl(c)&&("BR"!==(d=c).nodeName||!d.getAttribute("data-mce-bogus")||d.nextSibling))return s;if(s===f||s.parentNode===f){u=s;break}s=s.parentNode}return u},Ul=function(e,t,n,r){void 0===r&&(r=!1);var o=t.startContainer,i=t.startOffset,a=t.endContainer,u=t.endOffset,s=e.dom;$t(o)&&o.hasChildNodes()&&(o=Hu(o,i),Zt(o)&&(i=0)),$t(a)&&a.hasChildNodes()&&(a=Hu(a,t.collapsed?u:u-1),Zt(a)&&(u=a.nodeValue.length)),o=Dl(s,o),a=Dl(s,a),(_l(o.parentNode)||_l(o))&&(o=_l(o)?o:o.parentNode,o=t.collapsed?o.previousSibling||o:o.nextSibling||o,Zt(o)&&(i=t.collapsed?o.length:0)),(_l(a.parentNode)||_l(a))&&(a=_l(a)?a:a.parentNode,a=t.collapsed?a.nextSibling||a:a.previousSibling||a,Zt(a)&&(u=t.collapsed?0:a.length)),t.collapsed&&(Ll(s,e.getBody(),o,i,!0,r).each(function(e){var t=e.container,n=e.offset;o=t,i=n}),Ll(s,e.getBody(),a,u,!1,r).each(function(e){var t=e.container,n=e.offset;a=t,u=n}));return(n[0].inline||n[0].block_expand)&&(n[0].inline&&Zt(o)&&0!==i||(o=Fl(s,n,o,i,a,u,!0)),n[0].inline&&Zt(a)&&u!==a.nodeValue.length||(a=Fl(s,n,o,i,a,u,!1))),n[0].selector&&!1!==n[0].expand&&!n[0].inline&&(o=Il(s,n,t,o,"previousSibling"),a=Il(s,n,t,a,"nextSibling")),(n[0].block||n[0].selector)&&(o=Ml(e,n,o,"previousSibling"),a=Ml(e,n,a,"nextSibling"),n[0].block&&(s.isBlock(o)||(o=Fl(s,n,o,i,a,u,!0)),s.isBlock(a)||(a=Fl(s,n,o,i,a,u,!1)))),$t(o)&&(i=s.nodeIndex(o),o=o.parentNode),$t(a)&&(u=s.nodeIndex(a)+1,a=a.parentNode),{startContainer:o,startOffset:i,endContainer:a,endOffset:u}},zl=function(e,t){var n=e.childNodes;return t>=n.length?t=n.length-1:t<0&&(t=0),n[t]||e},jl=function(e,t,u){var n=t.startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,s=function(e){var t;return 3===(t=e[0]).nodeType&&t===n&&r>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===i&&0<e.length&&t===o&&3===t.nodeType&&e.splice(e.length-1,1),e},c=function(e,t,n){for(var r=[];e&&e!==n;e=e[t])r.push(e);return r},a=function(e,t){do{if(e.parentNode===t)return e;e=e.parentNode}while(e)},l=function(e,t,n){for(var r=n?"nextSibling":"previousSibling",o=e,i=o.parentNode;o&&o!==t;o=i){i=o.parentNode;var a=c(o===e?o:o[r],r);a.length&&(n||a.reverse(),u(s(a)))}};if(1===n.nodeType&&n.hasChildNodes()&&(n=zl(n,r)),1===o.nodeType&&o.hasChildNodes()&&(o=zl(o,i-1)),n===o)return u(s([n]));for(var f=e.findCommonAncestor(n,o),d=n;d;d=d.parentNode){if(d===o)return l(n,f,!0);if(d===f)break}for(d=o;d;d=d.parentNode){if(d===n)return l(o,f);if(d===f)break}var m=a(n,f)||n,p=a(o,f)||o;l(n,m,!0);var g=c(m===n?m:m.nextSibling,"nextSibling",p===o?p.nextSibling:p);g.length&&u(s(g)),l(o,p)},Hl=function(e){var t=[];if(e)for(var n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t},Vl=function(e){return H(Y(e,function(e){var t=ju(e);return t?[Ne.fromDom(t)]:[]}),Dr)},ql=function(e,t){var n=Ua(t,"td[data-mce-selected],th[data-mce-selected]");return 0<n.length?n:Vl(e)},$l=function(e){return ql(Hl(e.selection.getSel()),Ne.fromDom(e.getBody()))},Wl=function(t){return yt(t).fold(x([t]),function(e){return[t].concat(Wl(e))})},Kl=function(t){return bt(t).fold(x([t]),function(e){return"br"===Rt(e)?dt(e).map(function(e){return[t].concat(Kl(e))}).getOr([]):[t].concat(Kl(e))})},Xl=function(o,e){return $u((a=(i=e).startContainer,u=i.startOffset,Zt(a)?0===u?R.some(Ne.fromDom(a)):R.none():R.from(a.childNodes[u]).map(Ne.fromDom)),(n=(t=e).endContainer,r=t.endOffset,Zt(n)?r===n.data.length?R.some(Ne.fromDom(n)):R.none():R.from(n.childNodes[r-1]).map(Ne.fromDom)),function(e,t){var n=K(Wl(o),N(at,e)),r=K(Kl(o),N(at,t));return n.isSome()&&r.isSome()}).getOr(!1);var t,n,r,i,a,u},Yl=function(e,t,n,r){var o=n,i=new ra(n,o),a=e.schema.getNonEmptyElements();do{if(3===n.nodeType&&0!==hr.trim(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(r?t.setStartBefore(n):"BR"===n.nodeName?t.setEndBefore(n):t.setEndAfter(n))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?t.setStart(o,0):t.setEnd(o,o.childNodes.length))},Gl=function(e){var t=e.selection.getSel();return t&&0<t.rangeCount},Jl=function(r,o){var e=$l(r);0<e.length?z(e,function(e){var t=e.dom(),n=r.dom.createRng();n.setStartBefore(t),n.setEndAfter(t),o(n,!0)}):o(r.selection.getRng(),!1)},Ql=function(e,t,n){var r=Bs(e,t);n(r),e.moveToBookmark(r)};var Zl=function gE(n,r){var t=function(e){return n(e)?R.from(e.dom().nodeValue):R.none()};return{get:function(e){if(!n(e))throw new Error("Can only get "+r+" value of a "+r+" node");return t(e).getOr("")},getOption:t,set:function(e,t){if(!n(e))throw new Error("Can only set raw "+r+" value of a "+r+" node");e.dom().nodeValue=t}}}(Ot,"text"),ef=function(e){return Zl.get(e)},tf=function(r,o,i,a){return ft(o).fold(function(){return"skipping"},function(e){return"br"===a||Ot(n=o)&&ef(n)===ro?"valid":Dt(t=o)&&Ma(t,Ka())?"existing":Ms(o)?"caret":yl(r,i,a)&&yl(r,Rt(e),i)?"valid":"invalid-child";var t,n})},nf=function(e,t,n,r){var o=t.uid,i=void 0===o?tu("mce-annotation"):o,a=function p(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["uid"]),u=Ne.fromTag("span",e);La(u,Ka()),cn(u,""+Ya(),i),cn(u,""+Xa(),n);var s,c=r(i,a),l=c.attributes,f=void 0===l?{}:l,d=c.classes,m=void 0===d?[]:d;return ln(u,f),s=u,z(m,function(e){La(s,e)}),u},rf=function(i,e,t,n,r){var a=[],u=nf(i.getDoc(),r,t,n),s=xa(R.none()),c=function(){s.set(R.none())},l=function(e){z(e,o)},o=function(e){var t,n;switch(tf(i,e,"span",Rt(e))){case"invalid-child":c();var r=ht(e);l(r),c();break;case"valid":var o=s.get().getOrThunk(function(){var e=ou(u);return a.push(e),s.set(R.some(e)),e});Ct(t=e,n=o),St(n,t)}};return jl(i.dom,e,function(e){var t;c(),t=U(e,Ne.fromDom),l(t)}),a},of=function(u,s,c,l){u.undoManager.transact(function(){var e,t,n,r=u.selection,o=r.getRng(),i=0<$l(u).length;if(o.collapsed&&!i&&(n=Ul(e=u,t=o,[{inline:!0}]),t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),e.selection.setRng(t)),r.getRng().collapsed&&!i){var a=nf(u.getDoc(),l,s,c.decorate);nu(a,oo),r.getRng().insertNode(a.dom()),r.select(a.dom())}else Ql(r,!1,function(){Jl(u,function(e){rf(u,e,s,c.decorate,l)})})})},af=function(u){var n,r=(n={},{register:function(e,t){n[e]={name:e,settings:t}},lookup:function(e){return n.hasOwnProperty(e)?R.from(n[e]).map(function(e){return e.settings}):R.none()}});Za(u,r);var o=Qa(u);return{register:function(e,t){r.register(e,t)},annotate:function(t,n){r.lookup(t).each(function(e){of(u,t,e,n)})},annotationChanged:function(e,t){o.addListener(e,t)},remove:function(e){Ga(u,R.some(e)).each(function(e){var t=e.elements;z(t,_t)})},getAll:function(e){var t,n,r,o,i,a=(t=u,n=e,r=Ne.fromDom(t.getBody()),o=Ua(r,"["+Xa()+'="'+n+'"]'),i={},z(o,function(e){var t=fn(e,Ya()),n=i.hasOwnProperty(t)?i[t]:[];i[t]=n.concat([e])}),i);return ie(a,function(e){return U(e,function(e){return e.dom()})})}}},uf=/^[ \t\r\n]*$/,sf={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},cf=function(e,t,n){var r=n?"lastChild":"firstChild",o=n?"prev":"next";if(e[r])return e[r];if(e!==t){var i=e[o];if(i)return i;for(var a=e.parent;a&&a!==t;a=a.parent)if(i=a[o])return i}},lf=function(e){if(!uf.test(e.value))return!1;var t=e.parent;return!t||"span"===t.name&&!t.attr("style")||!/^[ ]+$/.test(e.value)},ff=function(e){var t="a"===e.name&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t},df=(mf.create=function(e,t){var n=new mf(e,sf[e]||1);return t&&oe(t,function(e,t){n.attr(t,e)}),n},mf.prototype.replace=function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},mf.prototype.attr=function(e,t){var n,r=this;if("string"!=typeof e)return e!==undefined&&null!==e&&oe(e,function(e,t){r.attr(t,e)}),r;if(n=r.attributes){if(t===undefined)return n.map[e];if(null===t){if(e in n.map){delete n.map[e];for(var o=n.length;o--;)if(n[o].name===e)return n.splice(o,1),r}return r}if(e in n.map){for(o=n.length;o--;)if(n[o].name===e){n[o].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,r}},mf.prototype.clone=function(){var e,t=new mf(this.name,this.type);if(e=this.attributes){var n=[];n.map={};for(var r=0,o=e.length;r<o;r++){var i=e[r];"id"!==i.name&&(n[n.length]={name:i.name,value:i.value},n.map[i.name]=i.value)}t.attributes=n}return t.value=this.value,t.shortEnded=this.shortEnded,t},mf.prototype.wrap=function(e){return this.parent.insert(e,this),e.append(this),this},mf.prototype.unwrap=function(){for(var e=this.firstChild;e;){var t=e.next;this.insert(e,this,!0),e=t}this.remove()},mf.prototype.remove=function(){var e=this.parent,t=this.next,n=this.prev;return e&&(e.firstChild===this?(e.firstChild=t)&&(t.prev=null):n.next=t,e.lastChild===this?(e.lastChild=n)&&(n.next=null):t.prev=n,this.parent=this.next=this.prev=null),this},mf.prototype.append=function(e){e.parent&&e.remove();var t=this.lastChild;return t?((t.next=e).prev=t,this.lastChild=e):this.lastChild=this.firstChild=e,e.parent=this,e},mf.prototype.insert=function(e,t,n){e.parent&&e.remove();var r=t.parent||this;return n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,(e.next=t).prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,(e.prev=t).next=e),e.parent=r,e},mf.prototype.getAll=function(e){for(var t=[],n=this.firstChild;n;n=cf(n,this))n.name===e&&t.push(n);return t},mf.prototype.empty=function(){if(this.firstChild){for(var e=[],t=this.firstChild;t;t=cf(t,this))e.push(t);for(var n=e.length;n--;)(t=e[n]).parent=t.firstChild=t.lastChild=t.next=t.prev=null}return this.firstChild=this.lastChild=null,this},mf.prototype.isEmpty=function(e,t,n){void 0===t&&(t={});var r=this.firstChild;if(ff(this))return!1;if(r)do{if(1===r.type){if(r.attr("data-mce-bogus"))continue;if(e[r.name])return!1;if(ff(r))return!1}if(8===r.type)return!1;if(3===r.type&&!lf(r))return!1;if(3===r.type&&r.parent&&t[r.parent.name]&&uf.test(r.value))return!1;if(n&&n(r))return!1}while(r=cf(r,this));return!0},mf.prototype.walk=function(e){return cf(this,null,e)},mf);function mf(e,t){this.name=e,1===(this.type=t)&&(this.attributes=[],this.attributes.map={})}var pf=hr.makeMap,gf=function(e){var u,s,c,l,f,d=[];return u=(e=e||{}).indent,s=pf(e.indent_before||""),c=pf(e.indent_after||""),l=$r.getEncodeFunc(e.entity_encoding||"raw",e.entities),f="html"===e.element_format,{start:function(e,t,n){var r,o,i,a;if(u&&s[e]&&0<d.length&&0<(a=d[d.length-1]).length&&"\n"!==a&&d.push("\n"),d.push("<",e),t)for(r=0,o=t.length;r<o;r++)i=t[r],d.push(" ",i.name,'="',l(i.value,!0),'"');d[d.length]=!n||f?">":" />",n&&u&&c[e]&&0<d.length&&0<(a=d[d.length-1]).length&&"\n"!==a&&d.push("\n")},end:function(e){var t;d.push("</",e,">"),u&&c[e]&&0<d.length&&0<(t=d[d.length-1]).length&&"\n"!==t&&d.push("\n")},text:function(e,t){0<e.length&&(d[d.length]=t?e:l(e))},cdata:function(e){d.push("<![CDATA[",e,"]]>")},comment:function(e){d.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?d.push("<?",e," ",l(t),"?>"):d.push("<?",e,"?>"),u&&d.push("\n")},doctype:function(e){d.push("<!DOCTYPE",e,">",u?"\n":"")},reset:function(){d.length=0},getContent:function(){return d.join("").replace(/\n$/,"")}}},hf=function(t,p){void 0===p&&(p=no());var g=gf(t);(t=t||{}).validate=!("validate"in t)||t.validate;return{serialize:function(e){var f,d;d=t.validate,f={3:function(e){g.text(e.value,e.raw)},8:function(e){g.comment(e.value)},7:function(e){g.pi(e.name,e.value)},10:function(e){g.doctype(e.value)},4:function(e){g.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;m(e),e=e.next;);}},g.reset();var m=function(e){var t,n,r,o,i,a,u,s,c,l=f[e.type];if(l)l(e);else{if(t=e.name,n=e.shortEnded,r=e.attributes,d&&r&&1<r.length&&((a=[]).map={},c=p.getElementRule(e.name))){for(u=0,s=c.attributesOrder.length;u<s;u++)(o=c.attributesOrder[u])in r.map&&(i=r.map[o],a.map[o]=i,a.push({name:o,value:i}));for(u=0,s=r.length;u<s;u++)(o=r[u].name)in a.map||(i=r.map[o],a.map[o]=i,a.push({name:o,value:i}));r=a}if(g.start(e.name,r,n),!n){if(e=e.firstChild)for(;m(e),e=e.next;);g.end(t)}}};return 1!==e.type||t.inner?f[11](e):m(e),g.getContent()}}},vf=function(e,t){return e.replace(new RegExp(t.prefix+"_[0-9]+","g"),function(e){return de(t.uris,e).getOr(e)})},yf=function(e,t,n){var r,o,i,a,u=1;for(a=e.getShortEndedElements(),(i=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;o=i.exec(t);){if(r=i.lastIndex,"/"===o[1])u--;else if(!o[1]){if(o[2]in a)continue;u++}if(0===u)break}return r},bf=function(e,t){var n=e.exec(t);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null};function Cf(W,K){void 0===K&&(K=no());var e=function(){};!1!==(W=W||{}).fix_self_closing&&(W.fix_self_closing=!0);var X=W.comment?W.comment:e,Y=W.cdata?W.cdata:e,G=W.text?W.text:e,J=W.start?W.start:e,Q=W.end?W.end:e,Z=W.pi?W.pi:e,ee=W.doctype?W.doctype:e,n=function(m,e){void 0===e&&(e="html");var t,n,r,p,o,i,a,g,u,s,h,c,v,l,f,d,y,b,C,w,x,S,N,E,k,_,R,T,A,D=m.html,O=0,B=[],P=0,L=$r.decode,I=hr.makeMap("src,href,data,background,formaction,poster,xlink:href"),M=/((java|vb)script|mhtml):/i,F="html"===e?0:1,U=function(e){var t,n;for(t=B.length;t--&&B[t].name!==e;);if(0<=t){for(n=B.length-1;t<=n;n--)(e=B[n]).valid&&Q(e.name);B.length=t}},z=function(e,t){return G(vf(e,m),t)},j=function(e){""!==e&&(">"===e.charAt(0)&&(e=" "+e),W.allow_conditional_comments||"[if"!==e.substr(0,3).toLowerCase()||(e=" "+e),X(vf(e,m)))},H=function(e,t){var n=e||"",r=!Ve(n,"--"),o=function(e,t,n){void 0===n&&(n=0);var r=e.toLowerCase();if(-1!==r.indexOf("[if ",n)&&(u=n,/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(r.substr(u)))){var o=r.indexOf("[endif]",n);return r.indexOf(">",o)}if(t){var i=r.indexOf(">",n);return-1!==i?i:r.length}var a=/--!?>/;a.lastIndex=n;var u,s=a.exec(e);return s?s.index+s[0].length:r.length}(D,r,t);return e=D.substr(t,o-t),j(r?n+e:e),o+1},V=function(e,t,n,r,o){var i,a,u,s,c,l;if(t=t.toLowerCase(),u=t in h?t:L(n||r||o||""),n=de(m.uris,u).getOr(u),v&&!g&&!1==(0===(s=t).indexOf("data-")||0===s.indexOf("aria-"))){if(!(i=b[t])&&C){for(a=C.length;a--&&!(i=C[a]).pattern.test(t););-1===a&&(i=null)}if(!i)return;if(i.validValues&&!(n in i.validValues))return}if(I[t]&&!W.allow_script_urls){var f=n.replace(/[\s\u0000-\u001F]+/g,"");try{f=decodeURIComponent(f)}catch(d){f=unescape(f)}if(M.test(f))return;if(l=f,!(c=W).allow_html_data_urls&&(/^data:image\//i.test(l)?!1===c.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(l):/^data:/i.test(l)))return}g&&(t in I||0===t.indexOf("on"))||(p.map[t]=n,p.push({name:t,value:n}))};for(k=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),_=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,s=K.getShortEndedElements(),E=W.self_closing_elements||K.getSelfClosingElements(),h=K.getBoolAttrs(),v=W.validate,u=W.remove_internals,A=W.fix_self_closing,R=K.getSpecialElements(),N=D+">";t=k.exec(N);){var q=t[0];if(O<t.index&&z(L(D.substr(O,t.index-O))),n=t[7])":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),U(n);else if(n=t[8]){if(t.index+q.length>D.length){z(L(D.substr(t.index))),O=t.index+q.length;continue}":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),c=n in s,A&&E[n]&&0<B.length&&B[B.length-1].name===n&&U(n);var $=bf(_,t[9]);if(null!==$){if("all"===$){O=yf(K,D,k.lastIndex),k.lastIndex=O;continue}f=!1}if(!v||(l=K.getElementRule(n))){if(f=!0,v&&(b=l.attributes,C=l.attributePatterns),(y=t[9])?((g=-1!==y.indexOf("data-mce-type"))&&u&&(f=!1),(p=[]).map={},y.replace(_,V)):(p=[]).map={},v&&!g){if(w=l.attributesRequired,x=l.attributesDefault,S=l.attributesForced,l.removeEmptyAttrs&&!p.length&&(f=!1),S)for(o=S.length;o--;)a=(d=S[o]).name,"{$uid}"===(T=d.value)&&(T="mce_"+P++),p.map[a]=T,p.push({name:a,value:T});if(x)for(o=x.length;o--;)(a=(d=x[o]).name)in p.map||("{$uid}"===(T=d.value)&&(T="mce_"+P++),p.map[a]=T,p.push({name:a,value:T}));if(w){for(o=w.length;o--&&!(w[o]in p.map););-1===o&&(f=!1)}if(d=p.map["data-mce-bogus"]){if("all"===d){O=yf(K,D,k.lastIndex),k.lastIndex=O;continue}f=!1}}f&&J(n,p,c)}else f=!1;if(r=R[n]){r.lastIndex=O=t.index+q.length,O=(t=r.exec(D))?(f&&(i=D.substr(O,t.index-O)),t.index+t[0].length):(i=D.substr(O),D.length),f&&(0<i.length&&z(i,!0),Q(n)),k.lastIndex=O;continue}c||(y&&y.indexOf("/")===y.length-1?f&&Q(n):B.push({name:n,valid:f}))}else if(n=t[1])j(n);else if(n=t[2]){if(!(1==F||W.preserve_cdata||0<B.length&&K.isValidChild(B[B.length-1].name,"#cdata"))){O=H("",t.index+2),k.lastIndex=O;continue}Y(n)}else if(n=t[3])ee(n);else{if((n=t[4])||"<!"===q){O=H(n,t.index+q.length),k.lastIndex=O;continue}if(n=t[5]){if(1!=F){O=H("?",t.index+2),k.lastIndex=O;continue}Z(n,t[6])}}O=t.index+q.length}for(O<D.length&&z(L(D.substr(O))),o=B.length-1;0<=o;o--)(n=B[o]).valid&&Q(n.name)};return{parse:function(e,t){void 0===t&&(t="html"),n(function(e){for(var t,n=/data:[^;]+;base64,([a-z0-9\+\/=]+)/gi,r=[],o={},i=tu("img"),a=0,u=0;t=n.exec(e);){var s=t[0],c=i+"_"+u++;o[c]=s,a<t.index&&r.push(e.substr(a,t.index-a)),r.push(c),a=t.index+s.length}return 0===a?{prefix:i,uris:o,html:e}:(a<e.length&&r.push(e.substr(a)),{prefix:i,uris:o,html:r.join("")})}(e),t)}}}(Cf=Cf||{}).findEndTag=yf;var wf,xf,Sf,Nf,Ef,kf=Cf,_f=function(e,t){var n,r,o,i,a,u,s,c,l=t,f=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,d=e.schema;for(u=e.getTempAttrs(),s=l,c=new RegExp(["\\s?("+u.join("|")+')="[^"]+"'].join("|"),"gi"),l=s.replace(c,""),a=d.getShortEndedElements();i=f.exec(l);)r=f.lastIndex,o=i[0].length,n=a[i[1]]?r:kf.findEndTag(d,l,r),l=l.substring(0,r-o)+l.substring(n),f.lastIndex=r-o;return lu(l)},Rf=_f,Tf=function(e,t,n,r){var o,i,a,u,s;if(t.format=n,t.get=!0,t.getInner=!0,t.no_events||e.fire("BeforeGetContent",t),"raw"===t.format)o=hr.trim(Rf(e.serializer,r.innerHTML));else if("text"===t.format)o=lu(r.innerText||r.textContent);else{if("tree"===t.format)return e.serializer.serialize(r,t);a=(i=e).serializer.serialize(r,t),u=Hs(i),s=new RegExp("^(<"+u+"[^>]*>(&nbsp;|&#160;|\\s|\xa0|<br \\/>|)<\\/"+u+">[\r\n]*|<br \\/>[\r\n]*)$"),o=a.replace(s,"")}return"text"===t.format||Or(Ne.fromDom(r))?t.content=o:t.content=hr.trim(o),t.no_events||e.fire("GetContent",t),t.content},Af=hr.each,Df=function(o){this.compare=function(e,t){if(e.nodeName!==t.nodeName)return!1;var n=function(n){var r={};return Af(o.getAttribs(n),function(e){var t=e.nodeName.toLowerCase();0!==t.indexOf("_")&&"style"!==t&&0!==t.indexOf("data-")&&(r[t]=o.getAttrib(n,t))}),r},r=function(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(void 0===(n=t[r]))return!1;if(e[r]!==n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0};return!!r(n(e),n(t))&&(!!r(o.parseStyle(o.getAttrib(e,"style")),o.parseStyle(o.getAttrib(t,"style")))&&(!ll(e)&&!ll(t)))}},Of=function(n,r,o){return R.from(o.container()).filter(Zt).exists(function(e){var t=n?0:-1;return r(e.data.charAt(o.offset()+t))})},Bf=N(Of,!0,dl),Pf=N(Of,!1,dl),Lf=function(e){var t=e.container();return Zt(t)&&0===t.data.length},If=function(t,n){return function(e){return R.from(Cc(t?0:-1,e)).filter(n).isSome()}},Mf=function(e){return"IMG"===e.nodeName&&"block"===mn(Ne.fromDom(e),"display")},Ff=function(e){return an(e)&&!($t(t=e)&&"all"===t.getAttribute("data-mce-bogus"));var t},Uf=If(!0,Mf),zf=If(!1,Mf),jf=If(!0,Gt),Hf=If(!1,Gt),Vf=If(!0,Ff),qf=If(!1,Ff),$f=function(e,t){var n,r,o,i=Ne.fromDom(e),a=Ne.fromDom(t);return n=a,r="pre,code",o=N(at,i),qa(n,r,o).isSome()},Wf=function(e,t){return Du(t)&&!1===(r=e,Zt(o=t)&&/^[ \t\r\n]*$/.test(o.data)&&!1===$f(r,o))||$t(n=t)&&"A"===n.nodeName&&n.hasAttribute("name")||Kf(t);var n,r,o},Kf=Xt("data-mce-bookmark"),Xf=Xt("data-mce-bogus"),Yf=(wf="data-mce-bogus",xf="all",function(e){return $t(e)&&e.getAttribute(wf)===xf}),Gf=function(e,t){return void 0===t&&(t=!0),function(e,t){var n,r=0;if(Wf(e,e))return!1;if(!(n=e.firstChild))return!0;var o=new ra(n,e);do{if(t){if(Yf(n)){n=o.next(!0);continue}if(Xf(n)){n=o.next();continue}}if(rn(n))r++,n=o.next();else{if(Wf(e,n))return!1;n=o.next()}}while(n);return r<=1}(e.dom(),t)},Jf=function(e){var t=Ua(e,"br"),n=H(function(e){for(var t=[],n=e.dom();n;)t.push(Ne.fromDom(n)),n=n.lastChild;return t}(e).slice(-1),Er);t.length===n.length&&z(n,kt)},Qf=function(e){Et(e),St(e,Ne.fromHtml('<br data-mce-bogus="1">'))},Zf=function(n){bt(n).each(function(t){dt(t).each(function(e){Sr(n)&&Er(t)&&Sr(e)&&kt(t)})})},ed=function(e,t,n){return st(t,e)?function(e,t){for(var n=D(t)?t:g,r=e.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,a=Ne.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(e,function(e){return n(e)||at(e,t)}).slice(0,-1):[]},td=function(e,t){return ed(e,t,x(!1))},nd=function(e,t){return[e].concat(td(e,t))},rd=function(e,t,n){if(0!==n){var r,o,i,a=e.data.slice(t,t+n),u=t+n>=e.data.length,s=0===t;e.replaceData(t,n,(o=s,i=u,W(r=a,function(e,t){return dl(t)||fl(t)?e.previousCharIsSpace||""===e.str&&o||e.str.length===r.length-1&&i?{previousCharIsSpace:!1,str:e.str+oo}:{previousCharIsSpace:!0,str:e.str+" "}:{previousCharIsSpace:!1,str:e.str+t}},{previousCharIsSpace:!1,str:""}).str))}},od=function(e,t){var n=e.data.slice(t),r=n.length-We(n).length;return rd(e,t,r)},id=function(e,t){return r=e,o=(n=t).container(),i=n.offset(),!1===ms.isTextPosition(n)&&o===r.parentNode&&i>ms.before(r).offset()?ms(t.container(),t.offset()-1):t;var n,r,o,i},ad=function(e){return Du(e.previousSibling)?R.some((t=e.previousSibling,Zt(t)?ms(t,t.data.length):ms.after(t))):e.previousSibling?el(e.previousSibling):R.none();var t},ud=function(e){return Du(e.nextSibling)?R.some((t=e.nextSibling,Zt(t)?ms(t,0):ms.before(t))):e.nextSibling?Zc(e.nextSibling):R.none();var t},sd=function(r,o){return ad(o).orThunk(function(){return ud(o)}).orThunk(function(){return e=r,t=o,n=ms.before(t.previousSibling?t.previousSibling:t.parentNode),Qc(e,n).fold(function(){return Jc(e,ms.after(t))},R.some);var e,t,n})},cd=function(n,r){return ud(r).orThunk(function(){return ad(r)}).orThunk(function(){return t=r,Jc(e=n,ms.after(t)).fold(function(){return Qc(e,ms.before(t))},R.some);var e,t})},ld=function(e,t,n){return(e?cd:sd)(t,n).map(N(id,n))},fd=function(t,n,e){e.fold(function(){t.focus()},function(e){t.selection.setRng(e.toRange(),n)})},dd=function(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(Rt(t))},md=function(e){if(Gf(e)){var t=Ne.fromHtml('<br data-mce-bogus="1">');return Et(e),St(e,t),R.some(ms.before(t.dom()))}return R.none()},pd=function(e,t,l){var n,r,o,i,a=dt(e).filter(Ot),u=mt(e).filter(Ot);return kt(e),r=u,o=t,i=function(e,t,n){var r,o,i,a,u=e.dom(),s=t.dom(),c=u.data.length;return o=s,i=l,a=Ke((r=u).data).length,r.appendData(o.data),kt(Ne.fromDom(o)),i&&od(r,a),n.container()===s?ms(u,c):n},((n=a).isSome()&&r.isSome()&&o.isSome()?R.some(i(n.getOrDie(),r.getOrDie(),o.getOrDie())):R.none()).orThunk(function(){return l&&(a.each(function(e){return t=e.dom(),n=e.dom().length,r=t.data.slice(0,n),o=r.length-Ke(r).length,rd(t,n-o,o);var t,n,r,o}),u.each(function(e){return od(e.dom(),0)})),t})},gd=function(t,n,e,r){void 0===r&&(r=!0);var o,i,a=ld(n,t.getBody(),e.dom()),u=Ha(e,N(dd,t),(o=t.getBody(),function(e){return e.dom()===o})),s=pd(e,a,(i=e,me(t.schema.getTextInlineElements(),Rt(i))));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):u.bind(md).fold(function(){r&&fd(t,n,s)},function(e){r&&fd(t,n,R.some(e))})},hd=function(a){if(!k(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var u=[],n={};return z(a,function(e,r){var t=ne(e);if(1!==t.length)throw new Error("one and only one name per case");var o=t[0],i=e[o];if(n[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!k(i))throw new Error("case arguments must be an array");u.push(o),n[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var n=new Array(e),t=0;t<n.length;t++)n[t]=arguments[t];return{fold:function(){if(arguments.length!==a.length)throw new Error("Wrong number of arguments to fold. Expected "+a.length+", got "+arguments.length);return arguments[r].apply(null,n)},match:function(e){var t=ne(e);if(u.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+u.join(",")+"\nActual: "+t.join(","));if(!G(u,function(e){return M(t,e)}))throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+u.join(", "));return e[o].apply(null,n)},log:function(e){V.console.log(e,{constructors:u,constructor:o,params:n})}}}}),n},vd=function(e,t){return{start:e,end:t}},yd=hd([{removeTable:["element"]},{emptyCells:["cells"]},{deleteCellSelection:["rng","cell"]}]),bd=function(e,t){return Wa(Ne.fromDom(e),"td,th",t)},Cd=function(e,t){return qa(e,"table",t)},wd=function(e){return!at(e.start,e.end)},xd=function(e,t){return Cd(e.start,t).bind(function(r){return Cd(e.end,t).bind(function(e){return t=at(r,e),n=r,t?R.some(n):R.none();var t,n})})},Sd=function(e){return Ua(e,"td,th")},Nd=function(r,e){var t=bd(e.startContainer,r),n=bd(e.endContainer,r);return e.collapsed?R.none():$u(t,n,vd).fold(function(){return t.fold(function(){return n.bind(function(t){return Cd(t,r).bind(function(e){return Z(Sd(e)).map(function(e){return vd(e,t)})})})},function(t){return Cd(t,r).bind(function(e){return ee(Sd(e)).map(function(e){return vd(t,e)})})})},function(e){return Ed(r,e)?R.none():(n=r,Cd((t=e).start,n).bind(function(e){return ee(Sd(e)).map(function(e){return vd(t.start,e)})}));var t,n})},Ed=function(e,t){return xd(t,e).isSome()},kd=function(e,t,n){return e.filter(function(e){return wd(e)&&Ed(n,e)}).orThunk(function(){return Nd(n,t)}).bind(function(e){return xd(t=e,n).map(function(e){return{rng:t,table:e,cells:Sd(e)}});var t})},_d=function(e,t){return X(e,function(e){return at(e,t)})},Rd=function(e,r,o){return e.filter(function(e){return n=o,!wd(t=e)&&xd(t,n).exists(function(e){var t=e.dom().rows;return 1===t.length&&1===t[0].cells.length})&&Xl(e.start,r);var t,n}).map(function(e){return e.start})},Td=function(n){return $u(_d((r=n).cells,r.rng.start),_d(r.cells,r.rng.end),function(e,t){return r.cells.slice(e,t+1)}).map(function(e){var t=n.cells;return e.length===t.length?yd.removeTable(n.table):yd.emptyCells(e)});var r},Ad=function(e,t){var n,r,o,i,a,u=(n=e,function(e){return at(n,e)}),s=(o=u,i=bd((r=t).startContainer,o),a=bd(r.endContainer,o),$u(i,a,vd));return Rd(s,t,u).map(function(e){return yd.deleteCellSelection(t,e)}).orThunk(function(){return kd(s,t,u).bind(Td)})},Dd=function(e){var t;return(8===Tt(t=e)||"#comment"===Rt(t)?dt:bt)(e).bind(Dd).orThunk(function(){return R.some(e)})},Od=function(e,t){return z(t,Qf),e.selection.setCursorLocation(t[0].dom(),0),!0},Bd=function(e,t,n){t.deleteContents();var r,o=Dd(n).getOr(n),i=Ne.fromDom(e.dom.getParent(o.dom(),e.dom.isBlock));if(Gf(i)&&(Qf(i),e.selection.setCursorLocation(i.dom(),0)),!at(n,i)){var a=ft(i).is(n)?[]:ft(r=i).map(ht).map(function(e){return H(e,function(e){return!at(r,e)})}).getOr([]);z(a.concat(ht(n)),function(e){at(e,i)||st(e,i)||kt(e)})}return!0},Pd=function(e,t){return gd(e,!1,t),!0},Ld=function(n,e,r,t){return Md(e,t).fold(function(){return t=n,Ad(e,r).map(function(e){return e.fold(N(Pd,t),N(Od,t),N(Bd,t))});var t},function(e){return Fd(n,e)}).getOr(!1)},Id=function(e,t){return K(nd(t,e),Dr)},Md=function(e,t){return K(nd(t,e),function(e){return"caption"===Rt(e)})},Fd=function(e,t){return Qf(t),e.selection.setCursorLocation(t.dom(),0),R.some(!0)},Ud=function(u,s,c,l,f){return Xc(c,u.getBody(),f).bind(function(e){return o=c,i=f,a=e,Zc((r=l).dom()).bind(function(t){return el(r.dom()).map(function(e){return o?i.isEqual(t)&&a.isEqual(e):i.isEqual(e)&&a.isEqual(t)})}).getOr(!0)?Fd(u,l):(t=l,n=e,Md(s,Ne.fromDom(n.getNode())).map(function(e){return!1===at(e,t)}));var t,n,r,o,i,a}).or(R.some(!0))},zd=function(o,i,a,e){var u=ms.fromRangeStart(o.selection.getRng());return Id(a,e).bind(function(e){return Gf(e)?Fd(o,e):(t=a,n=e,r=u,Xc(i,o.getBody(),r).bind(function(e){return Id(t,Ne.fromDom(e.getNode())).map(function(e){return!1===at(e,n)})}));var t,n,r}).getOr(!1)},jd=function(e,t){return(e?jf:Hf)(t)},Hd=function(a,u,r){var s=Ne.fromDom(a.getBody());return Md(s,r).fold(function(){return zd(a,u,s,r)||(e=a,t=u,n=ms.fromRangeStart(e.selection.getRng()),jd(t,n)||Kc(t,e.getBody(),n).map(function(e){return jd(t,e)}).getOr(!1));var e,t,n},function(e){return t=a,n=u,r=s,o=e,i=ms.fromRangeStart(t.selection.getRng()),(Gf(o)?Fd(t,o):Ud(t,r,n,o,i)).getOr(!1);var t,n,r,o,i})},Vd=function(e,t){var n,r,o,i,a,u=Ne.fromDom(e.selection.getStart(!0)),s=$l(e);return e.selection.isCollapsed()&&0===s.length?Hd(e,t,u):(n=e,r=u,o=Ne.fromDom(n.getBody()),i=n.selection.getRng(),0!==(a=$l(n)).length?Od(n,a):Ld(n,o,i,r))},qd=function(a){var u=ms.fromRangeStart(a),s=ms.fromRangeEnd(a),c=a.commonAncestorContainer;return Kc(!1,c,s).map(function(e){return!bc(u,s,c)&&bc(u,e,c)?(t=u.container(),n=u.offset(),r=e.container(),o=e.offset(),(i=V.document.createRange()).setStart(t,n),i.setEnd(r,o),i):a;var t,n,r,o,i}).getOr(a)},$d=function(e){return e.collapsed?e:qd(e)},Wd=function(e,t){var n,r;return e.getBlockElements()[t.name]&&((r=t).firstChild&&r.firstChild===r.lastChild)&&("br"===(n=t.firstChild).name||n.value===oo)},Kd=function(e,t){var n,r,o,i=t.firstChild,a=t.lastChild;return i&&"meta"===i.name&&(i=i.next),a&&"mce_marker"===a.attr("id")&&(a=a.prev),r=a,o=(n=e).getNonEmptyElements(),r&&(r.isEmpty(o)||Wd(n,r))&&(a=a.prev),!(!i||i!==a)&&("ul"===i.name||"ol"===i.name)},Xd=function(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&((t=e.firstChild).data===oo||rn(t));var t},Yd=function(e){return 0<e.length&&(!(t=e[e.length-1]).firstChild||Xd(t))?e.slice(0,-1):e;var t},Gd=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},Jd=function(e,t){var n=ms.after(e),r=Hc(t).prev(n);return r?r.toRange():null},Qd=function(t,e,n){var r,o,i,a,u=t.parentNode;return hr.each(e,function(e){u.insertBefore(e,t)}),r=t,o=n,i=ms.before(r),(a=Hc(o).next(i))?a.toRange():null},Zd=function(e,o,i,t){var n,r,a,u,s,c,l,f,d,m,p,g,h,v,y,b,C,w,x,S,N=(n=o,r=t,c=e.serialize(r),l=n.createFragment(c),u=(a=l).firstChild,s=a.lastChild,u&&"META"===u.nodeName&&u.parentNode.removeChild(u),s&&"mce_marker"===s.id&&s.parentNode.removeChild(s),a),E=Gd(o,i.startContainer),k=Yd((f=N.firstChild,hr.grep(f.childNodes,function(e){return"LI"===e.nodeName}))),_=o.getRoot(),R=function(e){var t=ms.fromRangeStart(i),n=Hc(o.getRoot()),r=1===e?n.prev(t):n.next(t);return!r||Gd(o,r.getNode())!==E};return R(1)?Qd(E,k,_):R(2)?(d=E,m=k,p=_,o.insertAfter(m.reverse(),d),Jd(m[0],p)):(h=k,v=_,y=g=E,C=(b=i).cloneRange(),w=b.cloneRange(),C.setStartBefore(y),w.setEndAfter(y),x=[C.cloneContents(),w.cloneContents()],(S=g.parentNode).insertBefore(x[0],g),hr.each(h,function(e){S.insertBefore(e,g)}),S.insertBefore(x[1],g),S.removeChild(g),Jd(h[h.length-1],v))},em=Wt(["td","th"]),tm=function(e,t){var n,r,o=e.selection.getRng(),i=o.startContainer,a=o.startOffset;o.collapsed&&(r=a,Zt(n=i)&&n.nodeValue[r-1]===oo)&&Zt(i)&&(i.insertData(a-1," "),i.deleteData(a,1),o.setStart(i,a),o.setEnd(i,a),e.selection.setRng(o)),e.selection.setContent(t)},nm=function(e){var t=e.dom,n=$d(e.selection.getRng());e.selection.setRng(n);var r,o,i,a=t.getParent(n.startContainer,em);r=t,o=n,null!==(i=a)&&i===r.getParent(o.endContainer,em)&&Xl(Ne.fromDom(i),o)?Bd(e,n,Ne.fromDom(a)):e.getDoc().execCommand("Delete",!1,null)},rm=function(e,t,n){var r,o,i,a,u,s,c,l,f,d,m,p=e.selection,g=e.dom;if(/^ | $/.test(t)&&(t=function(e,t){var n,r;n=e.startContainer,r=e.startOffset;var o=function(e){return n[e]&&3===n[e].nodeType};return 3===n.nodeType&&(0<r?t=t.replace(/^&nbsp;/," "):o("previousSibling")||(t=t.replace(/^ /,"&nbsp;")),r<n.length?t=t.replace(/&nbsp;(<br>|)$/," "):o("nextSibling")||(t=t.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),t}(p.getRng(),t)),r=e.parser,m=n.merge,o=hf({validate:e.settings.validate},e.schema),d='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',s={content:t,format:"html",selection:!0,paste:n.paste},(s=e.fire("BeforeSetContent",s)).isDefaultPrevented())e.fire("SetContent",{content:s.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=s.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);var h,v,y,b,C,w,x=(l=p.getRng()).startContainer||(l.parentElement?l.parentElement():null),S=e.getBody();x===S&&p.isCollapsed()&&g.isBlock(S.firstChild)&&(h=e,(v=S.firstChild)&&!h.schema.getShortEndedElements()[v.nodeName])&&g.isEmpty(S.firstChild)&&((l=g.createRng()).setStart(S.firstChild,0),l.setEnd(S.firstChild,0),p.setRng(l)),p.isCollapsed()||(nm(e),y=e.selection.getRng(),b=t,C=y.startContainer,w=y.startOffset,3===C.nodeType&&y.collapsed&&(C.data[w]===oo?(C.deleteData(w,1),/[\u00a0| ]$/.test(b)||(b+=" ")):C.data[w-1]===oo&&(C.deleteData(w-1,1),/[\u00a0| ]$/.test(b)||(b=" "+b))),t=b);var N,E,k,_={context:(i=p.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(u=r.parse(t,_),!0===n.paste&&Kd(e.schema,u)&&Gd(g,i))return l=Zd(o,g,e.selection.getRng(),u),e.selection.setRng(l),void e.fire("SetContent",s);if(!function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(u),"mce_marker"===(f=u.lastChild).attr("id"))for(f=(c=f).prev;f;f=f.walk(!0))if(3===f.type||!g.isBlock(f.name)){e.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(c,f,"br"===f.name);break}if(e._selectionOverrides.showBlockCaretContainer(i),_.invalid){for(tm(e,d),i=p.getNode(),a=e.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)f=(i=f).parentNode;t=i===a?a.innerHTML:g.getOuterHTML(i),t=o.serialize(r.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return o.serialize(u)}))),i===a?g.setHTML(a,t):g.setOuterHTML(i,t)}else!function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):tm(e,t)}}(e,t=o.serialize(u),i);!function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var o=e.getBody(),i=new Df(r);hr.each(r.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==o;t=t.parentNode)n[e.nodeName.toLowerCase()]&&i.compare(t,e)&&r.remove(e,!0)})}}(e,m),function(n,e){var t,r,o,i,a,u=n.dom,s=n.selection;if(e){if(n.selection.scrollIntoView(e),t=function(e){for(var t=n.getBody();e&&e!==t;e=e.parentNode)if("false"===n.dom.getContentEditable(e))return e;return null}(e))return u.remove(e),s.select(t);var c=u.createRng();(i=e.previousSibling)&&3===i.nodeType?(c.setStart(i,i.nodeValue.length),rr.ie||(a=e.nextSibling)&&3===a.nodeType&&(i.appendData(a.data),a.parentNode.removeChild(a))):(c.setStartBefore(e),c.setEndBefore(e));r=u.getParent(e,u.isBlock),u.remove(e),r&&u.isEmpty(r)&&(n.$(r).empty(),c.setStart(r,0),c.setEnd(r,0),em(r)||r.getAttribute("data-mce-fragment")||!(o=function(e){var t=ms.fromRangeStart(e);if(t=Hc(n.getBody()).next(t))return t.toRange()}(c))?u.add(r,u.create("br",{"data-mce-bogus":"1"})):(c=o,u.remove(r))),s.setRng(c)}}(e,g.get("mce_marker")),N=e.getBody(),hr.each(N.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),E=e.dom,k=e.selection.getStart(),R.from(E.getParent(k,"td,th")).map(Ne.fromDom).each(Zf),e.fire("SetContent",s),e.addVisual()}},om=function(e){var t=ct(e).dom();return e.dom()===t.activeElement},im=function(e){var t=e!==undefined?e.dom():V.document;return R.from(t.activeElement).map(Ne.fromDom)},am=function(e,t,n,r){return{start:x(e),soffset:x(t),finish:x(n),foffset:x(r)}},um=hd([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),sm=(um.before,um.on,um.after,function(e){return e.fold(d,d,d)}),cm=hd([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),lm={domRange:cm.domRange,relative:cm.relative,exact:cm.exact,exactFromRange:function(e){return cm.exact(e.start(),e.soffset(),e.finish(),e.foffset())},getWin:function(e){var t=e.match({domRange:function(e){return Ne.fromDom(e.startContainer)},relative:function(e,t){return sm(e)},exact:function(e,t,n,r){return e}});return lt(t)},range:am},fm=nt().browser,dm=function(e,t){var n=Ot(t)?ef(t).length:ht(t).length+1;return n<e?n:e<0?0:e},mm=function(e){return lm.range(e.start(),dm(e.soffset(),e.start()),e.finish(),dm(e.foffset(),e.finish()))},pm=function(e,t){return!qt(t.dom())&&(st(e,t)||at(e,t))},gm=function(t){return function(e){return pm(t,e.start())&&pm(t,e.finish())}},hm=function(e){return!0===e.inline||fm.isIE()},vm=function(e){return lm.range(Ne.fromDom(e.startContainer),e.startOffset,Ne.fromDom(e.endContainer),e.endOffset)},ym=function(e){var t,n,r=lt(e);return t=r.dom(),((n=t.getSelection())&&0!==n.rangeCount?R.from(n.getRangeAt(0)):R.none()).map(vm).filter(gm(e))},bm=function(e){var t=V.document.createRange();try{return t.setStart(e.start().dom(),e.soffset()),t.setEnd(e.finish().dom(),e.foffset()),R.some(t)}catch(n){return R.none()}},Cm=function(e){var t=hm(e)?ym(Ne.fromDom(e.getBody())):R.none();e.bookmark=t.isSome()?t:e.bookmark},wm=function(r){return(r.bookmark?r.bookmark:R.none()).bind(function(e){return t=Ne.fromDom(r.getBody()),n=e,R.from(n).filter(gm(t)).map(mm);var t,n}).bind(bm)},xm={isEditorUIElement:function(e){var t=e.className.toString();return-1!==t.indexOf("tox-")||-1!==t.indexOf("mce-")}},Sm=function(n,e){var t,r;nt().browser.isIE()?(r=n).on("focusout",function(){Cm(r)}):(t=e,n.on("mouseup touchend",function(e){t.throttle()})),n.on("keyup NodeChange",function(e){var t;"nodechange"===(t=e).type&&t.selectionChange||Cm(n)})},Nm=function(r){var o=Ta(function(){Cm(r)},0);r.on("init",function(){var e,t,n;r.inline&&(e=r,t=o,n=function(){t.throttle()},ga.DOM.bind(V.document,"mouseup",n),e.on("remove",function(){ga.DOM.unbind(V.document,"mouseup",n)})),Sm(r,o)}),r.on("remove",function(){o.cancel()})},Em=ga.DOM,km=function(t,e){var n=t?t.settings.custom_ui_selector:"";return null!==Em.getParent(e,function(e){return xm.isEditorUIElement(e)||!!n&&t.dom.is(e,n)})},_m=function(r,e){var t=e.editor;Nm(t),t.on("focusin",function(){var e=r.focusedEditor;e!==this&&(e&&e.fire("blur",{focusedEditor:this}),r.setActive(this),(r.focusedEditor=this).fire("focus",{blurredEditor:e}),this.focus(!0))}),t.on("focusout",function(){var t=this;Xn.setEditorTimeout(t,function(){var e=r.focusedEditor;km(t,function(){try{return V.document.activeElement}catch(e){return V.document.body}}())||e!==t||(t.fire("blur",{focusedEditor:null}),r.focusedEditor=null)})}),Sf||(Sf=function(e){var t,n=r.activeEditor;t=e.target,n&&t.ownerDocument===V.document&&(t===V.document.body||km(n,t)||r.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),r.focusedEditor=null))},Em.bind(V.document,"focusin",Sf))},Rm=function(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(Em.unbind(V.document,"focusin",Sf),Sf=null)},Tm=function(t,e){return((n=e).collapsed?R.from(Hu(n.startContainer,n.startOffset)).map(Ne.fromDom):R.none()).bind(function(e){return Ar(e)?R.some(e):!1===st(t,e)?R.some(t):R.none()});var n},Am=function(t,e){Tm(Ne.fromDom(t.getBody()),e).bind(function(e){return Zc(e.dom())}).fold(function(){t.selection.normalize()},function(e){return t.selection.setRng(e.toRange())})},Dm=function(e){if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},Om=function(e){return om(e)||im(ct(t=e)).filter(function(e){return t.dom().contains(e.dom())}).isSome();var t},Bm=function(r){return im().filter(function(e){return t=e.dom(),!((n=t.classList)!==undefined&&(n.contains("tox-edit-area")||n.contains("tox-edit-area__iframe")||n.contains("mce-content-body")))&&km(r,e.dom());var t,n}).isSome()},Pm=function(e){return e.inline?(n=e.getBody())&&Om(Ne.fromDom(n)):(t=e).iframeElement&&om(Ne.fromDom(t.iframeElement));var t,n},Lm=function(t){var e=t.selection,n=t.getBody(),r=e.getRng();t.quirks.refreshContentEditable(),t.bookmark!==undefined&&!1===Pm(t)&&wm(t).each(function(e){t.selection.setRng(e),r=e});var o,i,a=(o=t,i=e.getNode(),o.dom.getParent(i,function(e){return"true"===o.dom.getContentEditable(e)}));if(t.$.contains(n,a))return Dm(a),Am(t,r),void Im(t);t.inline||(rr.opera||Dm(n),t.getWin().focus()),(rr.gecko||t.inline)&&(Dm(n),Am(t,r)),Im(t)},Im=function(e){return e.editorManager.setActive(e)},Mm=function(e,t){t(e),e.firstChild&&Mm(e.firstChild,t),e.next&&Mm(e.next,t)},Fm=function(e,t,n){var r=function(e,n,t){var r={},o={},i=[];for(var a in t.firstChild&&Mm(t.firstChild,function(t){z(e,function(e){e.name===t.name&&(r[e.name]?r[e.name].nodes.push(t):r[e.name]={filter:e,nodes:[t]})}),z(n,function(e){"string"==typeof t.attr(e.name)&&(o[e.name]?o[e.name].nodes.push(t):o[e.name]={filter:e,nodes:[t]})})}),r)r.hasOwnProperty(a)&&i.push(r[a]);for(var u in o)o.hasOwnProperty(u)&&i.push(o[u]);return i}(e,t,n);z(r,function(t){z(t.filter.callbacks,function(e){e(t.nodes,t.filter.name,{})})})},Um=function(e){return e instanceof df},zm=function(e,t){var r;e.dom.setHTML(e.getBody(),t),Pm(r=e)&&Zc(r.getBody()).each(function(e){var t=e.getNode(),n=Gt(t)?Zc(t).getOr(e):e;r.selection.setRng(n.toRange())})},jm=function(u,s,c){return c.format=c.format?c.format:"html",c.set=!0,c.content=Um(s)?"":s,Um(s)||c.no_events||(u.fire("BeforeSetContent",c),s=c.content),R.from(u.getBody()).fold(x(s),function(e){return Um(s)?function(e,t,n,r){Fm(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=hf({validate:e.validate},e.schema).serialize(n);return r.content=Or(Ne.fromDom(t))?o:hr.trim(o),zm(e,r.content),r.no_events||e.fire("SetContent",r),n}(u,e,s,c):(t=u,n=e,o=c,0===(r=s).length||/^\s+$/.test(r)?(a='<br data-mce-bogus="1">',"TABLE"===n.nodeName?r="<tr><td>"+a+"</td></tr>":/^(UL|OL)$/.test(n.nodeName)&&(r="<li>"+a+"</li>"),r=(i=Hs(t))&&t.schema.isValidChild(n.nodeName.toLowerCase(),i.toLowerCase())?(r=a,t.dom.createHTML(i,t.settings.forced_root_block_attrs,r)):r||'<br data-mce-bogus="1">',zm(t,r),t.fire("SetContent",o)):("raw"!==o.format&&(r=hf({validate:t.validate},t.schema).serialize(t.parser.parse(r,{isRootContent:!0,insert:!0}))),o.content=Or(Ne.fromDom(n))?r:hr.trim(r),zm(t,o.content),o.no_events||t.fire("SetContent",o)),o.content);var t,n,r,o,i,a})},Hm=function(e,t){return e.splitText(t)},Vm=function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&Zt(t)?0<n&&n<t.nodeValue.length&&(t=(r=Hm(t,n)).previousSibling,n<o?(t=r=Hm(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(Zt(t)&&0<n&&n<t.nodeValue.length&&(t=Hm(t,n),n=0),Zt(r)&&0<o&&o<r.nodeValue.length&&(o=(r=Hm(r,o).previousSibling).nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:o}},qm=wl,$m=function(e,t,n){var r=e.formatter.get(n);if(r)for(var o=0;o<r.length;o++)if(!1===r[o].inherit&&e.dom.is(t,r[o].selector))return!0;return!1},Wm=function(t,e,n,r){var o=t.dom.getRoot();return e!==o&&(e=t.dom.getParent(e,function(e){return!!$m(t,e,n)||(e.parentNode===o||!!Ym(t,e,n,r,!0))}),Ym(t,e,n,r))},Km=function(e,t,n){return!!qm(t,n.inline)||(!!qm(t,n.block)||(n.selector?1===t.nodeType&&e.is(t,n.selector):void 0))},Xm=function(e,t,n,r,o,i){var a,u,s,c=n[r];if(n.onmatch)return n.onmatch(t,n,r);if(c)if("undefined"==typeof c.length){for(a in c)if(c.hasOwnProperty(a)){if(u="attributes"===r?e.getAttrib(t,a):Sl(e,t,a),o&&!u&&!n.exact)return;if((!o||n.exact)&&!qm(u,xl(e,Cl(c[a],i),a)))return}}else for(s=0;s<c.length;s++)if("attributes"===r?e.getAttrib(t,c[s]):Sl(e,t,c[s]))return n;return n},Ym=function(e,t,n,r,o){var i,a,u,s,c=e.formatter.get(n),l=e.dom;if(c&&t)for(a=0;a<c.length;a++)if(i=c[a],Km(e.dom,t,i)&&Xm(l,t,i,"attributes",o,r)&&Xm(l,t,i,"styles",o,r)){if(s=i.classes)for(u=0;u<s.length;u++)if(!e.dom.hasClass(t,s[u]))return;return i}},Gm=function(e,t,n,r){var o;return r?Wm(e,r,t,n):(r=e.selection.getNode(),!!Wm(e,r,t,n)||!((o=e.selection.getStart())===r||!Wm(e,o,t,n)))},Jm=function(r,o,i){var a=[],u={},e=r.selection.getStart();return r.dom.getParent(e,function(e){for(var t=0;t<o.length;t++){var n=o[t];!u[n]&&Ym(r,e,n,i)&&(u[n]=!0,a.push(n))}},r.dom.getRoot()),a},Qm=function(e,t){var n,r,o,i,a,u=e.formatter.get(t),s=e.dom;if(u)for(n=e.selection.getStart(),r=El(s,n),i=u.length-1;0<=i;i--){if(!(a=u[i].selector)||u[i].defaultBlock)return!0;for(o=r.length-1;0<=o;o--)if(s.is(r[o],a))return!0}return!1},Zm=function(o,i,e){return W(e,function(e,t){var n,r=(n=t,F(o.formatter.get(n),function(t){var n=function(e){return 1<e.length&&"%"===e.charAt(0)};return F(["styles","attributes"],function(e){return de(t,e).exists(function(e){var t=k(e)?e:fe(e);return F(t,n)})})}));return o.formatter.matchNode(i,t,{},r)?e.concat([t]):e},[])},ep=su,tp="_mce_caret",np=function(e){return 0<function(e){for(var t=[];e;){if(3===e.nodeType&&e.nodeValue!==ep||1<e.childNodes.length)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t}(e).length},rp=function(e){if(e){var t=new ra(e,e);for(e=t.current();e;e=t.next())if(Zt(e))return e}return null},op=function(e){var t=Ne.fromTag("span");return ln(t,{id:tp,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&St(t,Ne.fromText(ep)),t},ip=function(e,t,n){void 0===n&&(n=!0);var r,o=e.dom,i=e.selection;if(np(t))gd(e,!1,Ne.fromDom(t),n);else{var a=i.getRng(),u=o.getParent(t,o.isBlock),s=a.startContainer,c=a.startOffset,l=a.endContainer,f=a.endOffset,d=((r=rp(t))&&r.nodeValue.charAt(0)===ep&&r.deleteData(0,1),r);o.remove(t,!0),s===d&&0<c&&a.setStart(d,c-1),l===d&&0<f&&a.setEnd(d,f-1),u&&o.isEmpty(u)&&Qf(Ne.fromDom(u)),i.setRng(a)}},ap=function(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(t)ip(e,t,n);else if(!(t=Fs(e.getBody(),o.getStart())))for(;t=r.get(tp);)ip(e,t,!1)},up=function(e,t){return e.appendChild(t),t},sp=function(e,t){var n=$(e,function(e,t){return up(e,t.cloneNode(!1))},t);return up(n,n.ownerDocument.createTextNode(ep))},cp=function(e,t,n,r){var o,i,a,u,s,c,l,f,d=e.dom,m=e.selection,p=[],g=m.getRng(),h=g.startContainer,v=g.startOffset;for(3===(i=h).nodeType&&(v!==h.nodeValue.length&&(o=!0),i=i.parentNode);i;){if(Ym(e,i,t,n,r)){a=i;break}i.nextSibling&&(o=!0),p.push(i),i=i.parentNode}if(a)if(o){var y=m.getBookmark();g.collapse(!0);var b=Ul(e,g,e.formatter.get(t),!0);b=Vm(b),e.formatter.remove(t,n,b,r),m.moveToBookmark(y)}else{var C=Fs(e.getBody(),a),w=op(!1).dom();s=w,c=null!==C?C:a,l=(u=e).dom,(f=l.getParent(c,N(vl,u)))&&l.isEmpty(f)?c.parentNode.replaceChild(s,c):(Jf(Ne.fromDom(c)),l.isEmpty(c)?c.parentNode.replaceChild(s,c):l.insertAfter(s,c));var x=function(t,e,n,r,o,i){var a=t.formatter,u=t.dom,s=H(ne(a.get()),function(e){return"removeformat"!==e&&e!==r}),c=Zm(t,n,s);if(0<H(c,function(e){return!kl(t,e,r)}).length){var l=n.cloneNode(!1);return u.add(e,l),a.remove(r,o,l,i),u.remove(l),R.some(l)}return R.none()}(e,w,a,t,n,r),S=sp(p.concat(x.toArray()),w);ip(e,C,!1),m.setCursorLocation(S,1),d.isEmpty(a)&&d.remove(a)}},lp=function(i){i.on("mouseup keydown",function(e){var t,n,r,o;t=i,n=e.keyCode,r=t.selection,o=t.getBody(),ap(t,null,!1),8!==n&&46!==n||!r.isCollapsed()||r.getStart().innerHTML!==ep||ap(t,Fs(o,r.getStart())),37!==n&&39!==n||ap(t,Fs(o,r.getStart()))})},fp=function(e,t){return e.schema.getTextInlineElements().hasOwnProperty(Rt(t))&&!Ms(t.dom())&&!Yt(t.dom())},dp={},mp=ur,pp=ir;Ef=function(e){var t,n,r=e.selection.getRng();t=Wt(["pre"]),r.collapsed||(n=e.selection.getSelectedBlocks(),pp(mp(mp(n,t),function(e){return t(e.previousSibling)&&-1!==sr(n,e.previousSibling)}),function(e){var t,n;t=e.previousSibling,na(n=e).remove(),na(t).append("<br><br>").append(n.childNodes)}))},dp[Nf="pre"]||(dp[Nf]=[]),dp[Nf].push(Ef);var gp,hp,vp=/^(src|href|style)$/,yp=hr.each,bp=wl,Cp=function(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)},wp=function(e,t,n){var r,o;if(r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],$t(r)){var i=r.childNodes.length-1;!n&&o&&o--,r=r.childNodes[i<o?i:o]}return Zt(r)&&n&&o>=r.nodeValue.length&&(r=new ra(r,e.getBody()).next()||r),Zt(r)&&!n&&0===o&&(r=new ra(r,e.getBody()).prev()||r),r},xp=function(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o},Sp=function(e,t,n,r,o){var i=Ne.fromDom(t),a=Ne.fromDom(e.create(r,o)),u=(n?gt:pt)(i);return Nt(a,u),n?(Ct(i,a),xt(a,i)):(wt(i,a),St(a,i)),a.dom()},Np=function(e,t,n,r){return!(t=hl(t,n,r))||"BR"===t.nodeName||e.isBlock(t)},Ep=function(e,r,o,t,i){var n,a,u,s,c,l=e.dom;if(u=l,!(bp(s=t,(c=r).inline)||bp(s,c.block)||c.selector&&($t(s)&&u.is(s,c.selector))||(a=t,r.links&&"A"===a.nodeName)))return!1;var f,d,m,p,g,h,v,y=t;if(r.inline&&"all"===r.remove&&k(r.preserve_attributes)){var b=H(l.getAttribs(y),function(e){return M(r.preserve_attributes,e.name.toLowerCase())});if(l.removeAllAttribs(y),z(b,function(e){return l.setAttrib(y,e.name,e.value)}),0<b.length)return e.dom.rename(t,"span"),!0}if("all"!==r.remove){yp(r.styles,function(e,t){e=xl(l,Cl(e,o),t),"number"==typeof t&&(t=e,i=null),!r.remove_similar&&i&&!bp(Sl(l,i,t),e)||l.setStyle(y,t,""),n=!0}),n&&""===l.getAttrib(y,"style")&&(y.removeAttribute("style"),y.removeAttribute("data-mce-style")),yp(r.attributes,function(e,t){var n;if(e=Cl(e,o),"number"==typeof t&&(t=e,i=null),r.remove_similar||!i||bp(l.getAttrib(i,t),e)){if("class"===t&&(e=l.getAttrib(y,t))&&(n="",z(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(n+=(n?" ":"")+e)}),n))return void l.setAttrib(y,t,n);"class"===t&&y.removeAttribute("className"),vp.test(t)&&y.removeAttribute("data-mce-"+t),y.removeAttribute(t)}}),yp(r.classes,function(e){e=Cl(e,o),i&&!l.hasClass(i,e)||l.removeClass(y,e)});for(var C=l.getAttribs(y),w=0;w<C.length;w++){var x=C[w].nodeName;if(0!==x.indexOf("_")&&0!==x.indexOf("data-"))return!1}}return"none"!==r.remove?(f=e,m=r,g=(d=y).parentNode,h=f.dom,v=Hs(f),m.block&&(v?g===h.getRoot()&&(m.list_block&&bp(d,m.list_block)||z(te(d.childNodes),function(e){yl(f,v,e.nodeName.toLowerCase())?p?p.appendChild(e):(p=xp(h,e,v),h.setAttribs(p,f.settings.forced_root_block_attrs)):p=0})):h.isBlock(d)&&!h.isBlock(g)&&(Np(h,d,!1)||Np(h,d.firstChild,!0,!0)||d.insertBefore(h.create("br"),d.firstChild),Np(h,d,!0)||Np(h,d.lastChild,!1,!0)||d.appendChild(h.create("br")))),m.selector&&m.inline&&!bp(m.inline,d)||h.remove(d,!0),!0):void 0},kp=function(s,c,l,e,f){var d=s.formatter.get(c),m=d[0],i=!0,u=s.dom,t=s.selection,p=function(e){var n,t,r,o,i,a,u=(t=e,r=c,o=l,i=f,z(El((n=s).dom,t.parentNode).reverse(),function(e){if(!a&&"_start"!==e.id&&"_end"!==e.id){var t=Ym(n,e,r,o,i);t&&!1!==t.split&&(a=e)}}),a);return function(e,t,n,r,o,i,a,u){var s,c,l,f=e.dom;if(n){for(var d=n.parentNode,m=r.parentNode;m&&m!==d;m=m.parentNode){s=f.clone(m,!1);for(var p=0;p<t.length;p++)if(Ep(e,t[p],u,s,s)){s=0;break}s&&(c&&s.appendChild(c),l=l||s,c=s)}!i||a.mixed&&f.isBlock(n)||(r=f.split(n,r)),c&&(o.parentNode.insertBefore(c,o),l.appendChild(o))}return r}(s,d,u,e,e,!0,m,l)},g=function(e){var t,n,r;if($t(e)&&u.getContentEditable(e)&&(n=i,i="true"===u.getContentEditable(e),r=!0),t=te(e.childNodes),i&&!r)for(var o=0;o<d.length&&!Ep(s,d[o],l,e,e);o++);if(m.deep&&t.length){for(o=0;o<t.length;o++)g(t[o]);r&&(i=n)}},h=function(e){var t,n=u.get(e?"_start":"_end"),r=n[e?"firstChild":"lastChild"];return ll(t=r)&&$t(t)&&("_start"===t.id||"_end"===t.id)&&(r=r[e?"firstChild":"lastChild"]),Zt(r)&&0===r.data.length&&(r=e?n.previousSibling||n.nextSibling:n.nextSibling||n.previousSibling),u.remove(n,!0),r},n=function(e){var t,n,r=e.commonAncestorContainer,o=Ul(s,e,d,!0);if(m.split){if(o=Vm(o),(t=wp(s,o,!0))!==(n=wp(s,o))){if(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TR"===t.nodeName?t.firstChild.firstChild||t:t.firstChild||t),r&&/^T(HEAD|BODY|FOOT|R)$/.test(r.nodeName)&&/^(TH|TD)$/.test(n.nodeName)&&n.firstChild&&(n=n.firstChild||n),Cp(u,t,n)){var i=R.from(t.firstChild).getOr(t);return p(Sp(u,i,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void h(!0)}if(Cp(u,n,t)){i=R.from(n.lastChild).getOr(n);return p(Sp(u,i,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void h(!1)}t=xp(u,t,"span",{id:"_start","data-mce-type":"bookmark"}),n=xp(u,n,"span",{id:"_end","data-mce-type":"bookmark"});var a=u.createRng();a.setStartAfter(t),a.setEndBefore(n),jl(u,a,function(e){z(e,function(e){ll(e)||ll(e.parentNode)||p(e)})}),p(t),p(n),t=h(!0),n=h()}else t=n=p(t);o.startContainer=t.parentNode?t.parentNode:t,o.startOffset=u.nodeIndex(t),o.endContainer=n.parentNode?n.parentNode:n,o.endOffset=u.nodeIndex(n)+1}jl(u,o,function(e){z(e,function(t){g(t);z(["underline","line-through","overline"],function(e){$t(t)&&s.dom.getStyle(t,"text-decoration")===e&&t.parentNode&&Nl(u,t.parentNode)===e&&Ep(s,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:e}},null,t)})})})};if(e)if(pl(e)){var r=u.createRng();r.setStartBefore(e),r.setEndAfter(e),n(r)}else n(e);else if("false"!==u.getContentEditable(t.getNode()))t.isCollapsed()&&m.inline&&!$l(s).length?cp(s,c,l,f):(Ql(t,!0,function(){Jl(s,n)}),m.inline&&Gm(s,c,l,t.getStart())&&gl(u,t,t.getRng()),s.nodeChanged());else{e=t.getNode();for(var o=0;o<d.length&&(!d[o].ceFalseOverride||!Ep(s,d[o],l,e,e));o++);}},_p=hr.each,Rp=function(e){return $t(e)&&!ll(e)&&!Ms(e)&&!Yt(e)},Tp=function(e,t){var n;for(n=e;n;n=n[t]){if(Zt(n)&&0!==n.nodeValue.length)return e;if($t(n)&&!ll(n))return n}return e},Ap=function(e,t,n){var r,o,i=new Df(e);if(t&&n&&(t=Tp(t,"previousSibling"),n=Tp(n,"nextSibling"),i.compare(t,n))){for(r=t.nextSibling;r&&r!==n;)r=(o=r).nextSibling,t.appendChild(o);return e.remove(n),hr.each(hr.grep(n.childNodes),function(e){t.appendChild(e)}),t}return n},Dp=function(e,t,n){_p(e.childNodes,function(e){Rp(e)&&(t(e)&&n(e),e.hasChildNodes()&&Dp(e,t,n))})},Op=function(t,n){return function(e){return!(!e||!Sl(t,e,n))}},Bp=function(t,n,r){return function(e){t.setStyle(e,n,r),""===e.getAttribute("style")&&e.removeAttribute("style"),Pp(t,e)}},Pp=function(e,t){"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)},Lp=function(n,e,r,o){_p(e,function(t){_p(n.dom.select(t.inline,o),function(e){Rp(e)&&Ep(n,t,r,e,t.exact?e:null)}),function(r,e,t){if(e.clear_child_styles){var n=e.links?"*:not(a)":"*";_p(r.select(n,t),function(n){Rp(n)&&_p(e.styles,function(e,t){r.setStyle(n,t,"")})})}}(n.dom,t,o)})},Ip=hr.each,Mp=function(R,T,A,r){var e,D=R.formatter.get(T),O=D[0],o=!r&&R.selection.isCollapsed(),i=R.dom,t=R.selection,B=function(n,e){if(e=e||O,n){if(e.onformat&&e.onformat(n,e,A,r),Ip(e.styles,function(e,t){i.setStyle(n,t,Cl(e,A))}),e.styles){var t=i.getAttrib(n,"style");t&&i.setAttrib(n,"data-mce-style",t)}Ip(e.attributes,function(e,t){i.setAttrib(n,t,Cl(e,A))}),Ip(e.classes,function(e){e=Cl(e,A),i.hasClass(n,e)||i.addClass(n,e)})}},d=function(e,t){var n=!1;return!!O.selector&&(Ip(e,function(e){if(!("collapsed"in e&&e.collapsed!==o))return i.is(t,e.selector)&&!Ms(t)?(B(t,e),!(n=!0)):void 0}),n)},a=function(k,e,t,s){var c,l,_=[],f=!0;c=O.inline||O.block,l=k.create(c),B(l),jl(k,e,function(e){var a,u=function(e){var t=!1,n=f,r=e.nodeName.toLowerCase(),o=e.parentNode.nodeName.toLowerCase();if($t(e)&&k.getContentEditable(e)&&(n=f,f="true"===k.getContentEditable(e),t=!0),wl(r,"br"))return a=0,void(O.block&&k.remove(e));if(O.wrapper&&Ym(R,e,T,A))a=0;else{if(f&&!t&&O.block&&!O.wrapper&&vl(R,r)&&yl(R,o,c))return e=k.rename(e,c),B(e),_.push(e),void(a=0);if(O.selector){var i=d(D,e);if(!O.inline||i)return void(a=0)}!f||t||!yl(R,c,r)||!yl(R,o,c)||!s&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||Ms(e)||O.inline&&k.isBlock(e)?(a=0,Ip(hr.grep(e.childNodes),u),t&&(f=n),a=0):(a||(a=k.clone(l,!1),e.parentNode.insertBefore(a,e),_.push(a)),a.appendChild(e))}};Ip(e,u)}),!0===O.links&&Ip(_,function(e){var t=function(e){"A"===e.nodeName&&B(e,O),Ip(hr.grep(e.childNodes),t)};t(e)}),Ip(_,function(e){var t,n,r,o,i,a,u,s,c,l,f,d,m,p,g,h,v,y,b,C,w,x,S,N,E=function(e){var n=!1;return Ip(e.childNodes,function(e){if((t=e)&&1===t.nodeType&&!ll(t)&&!Ms(t)&&!Yt(t))return n=e,!1;var t}),n};(n=0,Ip(e.childNodes,function(e){var t;(t=e)&&Zt(t)&&0===t.length||ll(e)||n++}),t=n,!(1<_.length)&&k.isBlock(e)||0!==t)?(O.inline||O.wrapper)&&(O.exact||1!==t||((S=E(x=e))&&!ll(S)&&Km(k,S,O)&&(N=k.clone(S,!1),B(N),k.replace(N,x,!0),k.remove(S,!0)),e=N||x),Lp(R,D,A,e),y=O,b=T,C=A,Ym(v=R,(w=e).parentNode,b,C)&&Ep(v,y,C,w)||y.merge_with_parents&&v.dom.getParent(w.parentNode,function(e){if(Ym(v,e,b,C))return Ep(v,y,C,w),!0}),m=k,g=A,h=e,(p=O).styles&&p.styles.backgroundColor&&Dp(h,Op(m,"fontSize"),Bp(m,"backgroundColor",Cl(p.styles.backgroundColor,g))),c=k,f=e,d=function(e){if(1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType){var t=Nl(c,e.parentNode);c.getStyle(e,"color")&&t?c.setStyle(e,"text-decoration",t):c.getStyle(e,"text-decoration")===t&&c.setStyle(e,"text-decoration",null)}},(l=O).styles&&(l.styles.color||l.styles.textDecoration)&&(hr.walk(f,d,"childNodes"),d(f)),a=k,s=e,"sub"!==(u=O).inline&&"sup"!==u.inline||(Dp(s,Op(a,"fontSize"),Bp(a,"fontSize","")),a.remove(a.select("sup"===u.inline?"sub":"sup",s),!0)),r=k,o=O,(i=e)&&!1!==o.merge_siblings&&(i=Ap(r,hl(i),i),i=Ap(r,i,hl(i,!0)))):k.remove(e,!0)})};if("false"!==i.getContentEditable(t.getNode())){if(O){if(r)pl(r)?d(D,r)||((e=i.createRng()).setStartBefore(r),e.setEndAfter(r),a(i,Ul(R,e,D),0,!0)):a(i,r,0,!0);else if(o&&O.inline&&!$l(R).length)!function(e,t,n){var r,o,i=e.selection,a=i.getRng(),u=a.startOffset,s=a.startContainer.nodeValue;(r=Fs(e.getBody(),i.getStart()))&&(o=rp(r));var c,l,f=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(s&&0<u&&u<s.length&&f.test(s.charAt(u))&&f.test(s.charAt(u-1))){var d=i.getBookmark();a.collapse(!0);var m=Ul(e,a,e.formatter.get(t));m=Vm(m),e.formatter.apply(t,n,m),i.moveToBookmark(d)}else r&&o.nodeValue===ep||(c=e.getDoc(),l=op(!0).dom(),o=(r=c.importNode(l,!0)).firstChild,a.insertNode(r),u=1),e.formatter.apply(t,n,r),i.setCursorLocation(o,u)}(R,T,A);else{var n=t.getNode();R.settings.forced_root_block||!D[0].defaultBlock||i.getParent(n,i.isBlock)||Mp(R,D[0].defaultBlock),t.setRng($d(t.getRng())),Ql(t,!0,function(e){Jl(R,function(e,t){var n=t?e:Ul(R,e,D);a(i,n)})}),gl(i,t,t.getRng()),R.nodeChanged()}u=R,pp(dp[T],function(e){e(u)})}var u}else{r=t.getNode();for(var s=0,c=D.length;s<c;s++)if(D[s].ceFalseOverride&&i.is(r,D[s].selector))return void B(r,D[s])}},Fp=function(n,e){return U(e,function(e){var t=n.fire("GetSelectionRange",{range:e});return t.range!==e?t.range:e})},Up=function(e,t){var n=(t||V.document).createDocumentFragment();return z(e,function(e){n.appendChild(e.dom())}),Ne.fromDom(n)},zp=function(e,t,n){return{element:x(e),width:x(t),rows:x(n)}},jp=function(e,t){return{element:x(e),cells:x(t)}},Hp=function(e,t){var n=parseInt(fn(e,t),10);return isNaN(n)?1:n},Vp=function(e){return W(e,function(e,t){return t.cells().length>e?t.cells().length:e},0)},qp=function(e,t){for(var n,r=e.rows(),o=0;o<r.length;o++)for(var i=r[o].cells(),a=0;a<i.length;a++)if(at(i[a],t))return R.some((n=o,{x:x(a),y:x(n)}));return R.none()},$p=function(e,t,n,r,o){for(var i=[],a=e.rows(),u=n;u<=o;u++){var s=a[u].cells(),c=t<r?s.slice(t,r+1):s.slice(r,t+1);i.push(jp(a[u].element(),c))}return i},Wp=function(e){var o=zp(ou(e),0,[]);return z(Ua(e,"tr"),function(n,r){z(Ua(n,"td,th"),function(e,t){!function(e,t,n,r,o){for(var i=Hp(o,"rowspan"),a=Hp(o,"colspan"),u=e.rows(),s=n;s<n+i;s++){u[s]||(u[s]=jp(iu(r),[]));for(var c=t;c<t+a;c++){u[s].cells()[c]=s===n&&c===t?o:ou(o)}}}(o,function(e,t,n){for(;r=t,o=n,i=void 0,((i=e.rows())[o]?i[o].cells():[])[r];)t++;var r,o,i;return t}(o,t,r),r,n,e)})}),zp(o.element(),Vp(o.rows()),o.rows())},Kp=function(e){return n=U((t=e).rows(),function(e){var t=U(e.cells(),function(e){var t=iu(e);return dn(t,"colspan"),dn(t,"rowspan"),t}),n=ou(e.element());return Nt(n,t),n}),r=ou(t.element()),o=Ne.fromTag("tbody"),Nt(o,n),St(r,o),r;var t,n,r,o},Xp=function(l,e,t){return qp(l,e).bind(function(c){return qp(l,t).map(function(e){return t=l,r=e,o=(n=c).x(),i=n.y(),a=r.x(),u=r.y(),s=i<u?$p(t,o,i,a,u):$p(t,o,u,a,i),zp(t.element(),Vp(s),s);var t,n,r,o,i,a,u,s})})},Yp=function(t,n){return K(t,function(e){return"li"===Rt(e)&&Xl(e,n)}).fold(x([]),function(e){return K(t,function(e){return"ul"===Rt(e)||"ol"===Rt(e)}).map(function(e){return[Ne.fromTag("li"),Ne.fromTag(Rt(e))]}).getOr([])})},Gp=function(e,t){var n,r=Ne.fromDom(t.commonAncestorContainer),o=nd(r,e),i=H(o,function(e){return Nr(e)||xr(e)}),a=Yp(o,t),u=i.concat(a.length?a:Rr(n=r)?ft(n).filter(_r).fold(x([]),function(e){return[n,e]}):_r(n)?[n]:[]);return U(u,ou)},Jp=function(){return Up([])},Qp=function(e,t){return n=Ne.fromDom(t.cloneContents()),r=Gp(e,t),o=W(r,function(e,t){return St(t,e),t},n),0<r.length?Up([o]):o;var n,r,o},Zp=function(e,o){return t=e,n=o[0],qa(n,"table",N(at,t)).bind(function(e){var t=o[0],n=o[o.length-1],r=Wp(e);return Xp(r,t,n).map(function(e){return Up([Kp(e)])})}).getOrThunk(Jp);var t,n},eg=function(e,t){var n,r,o=ql(t,e);return 0<o.length?Zp(e,o):(n=e,0<(r=t).length&&r[0].collapsed?Jp():Qp(n,r[0]))},tg=function(e,t,n){if(void 0===n&&(n={}),n.get=!0,n.format=t,n.selection=!0,(n=e.fire("BeforeGetContent",n)).isDefaultPrevented())return e.fire("GetContent",n),n.content;if("text"===n.format)return l=e,R.from(l.selection.getRng()).map(function(e){var t=l.dom.add(l.getBody(),"div",{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},e.cloneContents()),n=lu(t.innerText);return l.dom.remove(t),n}).getOr("");n.getInner=!0;var r,o,i,a,u,s,c,l,f=(o=n,i=(r=e).selection.getRng(),a=r.dom.create("body"),u=r.selection.getSel(),s=Fp(r,Hl(u)),(c=o.contextual?eg(Ne.fromDom(r.getBody()),s).dom():i.cloneContents())&&a.appendChild(c),r.selection.serializer.serialize(a,o));return"tree"===n.format?f:(n.content=e.selection.isCollapsed()?"":f,e.fire("GetContent",n),n.content)},ng=function(e){return $t(e)?e.outerHTML:Zt(e)?$r.encodeRaw(e.data,!1):en(e)?"\x3c!--"+e.data+"--\x3e":""},rg=function(e,t,n){var r=function(e){var t,n,r;for(r=V.document.createElement("div"),t=V.document.createDocumentFragment(),e&&(r.innerHTML=e);n=r.firstChild;)t.appendChild(n);return t}(t);if(e.hasChildNodes()&&n<e.childNodes.length){var o=e.childNodes[n];o.parentNode.insertBefore(r,o)}else e.appendChild(r)},og=function(e,t){var n,r,p,g,o,h,v,c,y,l,i,a=U(te(t.childNodes),ng);return g=e,o=(p=a).length+g.length+2,h=new Array(o),v=new Array(o),c=function(e,t,n,r,o){var i=l(e,t,n,r);if(null===i||i.start===t&&i.diag===t-r||i.end===e&&i.diag===e-n)for(var a=e,u=n;a<t||u<r;)a<t&&u<r&&p[a]===g[u]?(o.push([0,p[a]]),++a,++u):r-n<t-e?(o.push([2,p[a]]),++a):(o.push([1,g[u]]),++u);else{c(e,i.start,n,i.start-i.diag,o);for(var s=i.start;s<i.end;++s)o.push([0,p[s]]);c(i.end,t,i.end-i.diag,r,o)}},y=function(e,t,n,r){for(var o=e;o-t<r&&o<n&&p[o]===g[o-t];)++o;return{start:e,end:o,diag:t}},l=function(e,t,n,r){var o=t-e,i=r-n;if(0==o||0==i)return null;var a,u,s,c,l,f=o-i,d=i+o,m=(d%2==0?d:1+d)/2;for(h[1+m]=e,v[1+m]=t+1,a=0;a<=m;++a){for(u=-a;u<=a;u+=2){for(s=u+m,u===-a||u!==a&&h[s-1]<h[s+1]?h[s]=h[s+1]:h[s]=h[s-1]+1,l=(c=h[s])-e+n-u;c<t&&l<r&&p[c]===g[l];)h[s]=++c,++l;if(f%2!=0&&f-a<=u&&u<=f+a&&v[s-f]<=h[s])return y(v[s-f],u+e-n,t,r)}for(u=f-a;u<=f+a;u+=2){for(s=u+m-f,u===f-a||u!==f+a&&v[s+1]<=v[s-1]?v[s]=v[s+1]-1:v[s]=v[s-1],l=(c=v[s]-1)-e+n-u;e<=c&&n<=l&&p[c]===g[l];)v[s]=c--,l--;if(f%2==0&&-a<=u&&u<=a&&v[s]<=h[s+f])return y(v[s],u+e-n,t,r)}}},i=[],c(0,p.length,0,g.length,i),n=t,r=0,z(i,function(e){0===e[0]?r++:1===e[0]?(rg(n,e[1],r),r++):2===e[0]&&function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}}(n,r)}),t},ig=xa(R.none()),ag=function(n){var e,t,r,o;return o=n.getBody(),e=H(U(te(o.childNodes),ng),function(e){return 0<e.length}),t=(r=Y(e,function(e){var t=_f(n.serializer,e);return 0<t.length?[t]:[]})).join(""),-1!==t.indexOf("</iframe>")?{type:"fragmented",fragments:r,content:"",bookmark:null,beforeBookmark:null}:{type:"complete",fragments:null,content:t,bookmark:null,beforeBookmark:null}},ug=function(e,t,n){"fragmented"===t.type?og(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},sg=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content},cg=function(e){var t=Ne.fromTag("body",ig.get().getOrThunk(function(){var e=V.document.implementation.createHTMLDocument("undo");return ig.set(R.some(e)),e}));return nu(t,sg(e)),z(Ua(t,"*[data-mce-bogus]"),_t),t.dom().innerHTML},lg=function(e,t){return!(!e||!t)&&(r=t,sg(e)===sg(r)||(n=t,cg(e)===cg(n)));var n,r},fg=function(e){return 0===e.get()},dg=function(e,t,n){fg(n)&&(e.typing=t)},mg=function(e,t){e.typing&&(dg(e,!1,t),e.add())},pg=function(e){return e instanceof df},gg=function(e,t){Fm(e.serializer.getNodeFilters(),e.serializer.getAttributeFilters(),t)},hg=function(){return{type:"complete",fragments:[],content:"",bookmark:null,beforeBookmark:null}},vg=function(s){return{undoManager:{beforeChange:function(e,t){return n=s,r=t,void(fg(e)&&r.set(R.some(Ls(n.selection))));var n,r},addUndoLevel:function(e,t,n,r,o,i){return function(e,t,n,r,o,i,a){var u=e.settings,s=ag(e);if(i=i||{},i=hr.extend(i,s),!1===fg(r)||e.removed)return null;var c=t.data[n.get()];if(e.fire("BeforeAddUndo",{level:i,lastLevel:c,originalEvent:a}).isDefaultPrevented())return null;if(c&&lg(c,i))return null;if(t.data[n.get()]&&o.get().each(function(e){t.data[n.get()].beforeBookmark=e}),u.custom_undo_redo_levels&&t.data.length>u.custom_undo_redo_levels){for(var l=0;l<t.data.length-1;l++)t.data[l]=t.data[l+1];t.data.length--,n.set(t.data.length)}i.bookmark=Ls(e.selection),n.get()<t.data.length-1&&(t.data.length=n.get()+1),t.data.push(i),n.set(t.data.length-1);var f={level:i,lastLevel:c,originalEvent:a};return e.fire("AddUndo",f),0<n.get()&&(e.setDirty(!0),e.fire("change",f)),i}(s,e,t,n,r,o,i)},undo:function(e,t,n){return r=s,i=t,a=n,(o=e).typing&&(o.add(),o.typing=!1,dg(o,!1,i)),0<a.get()&&(a.set(a.get()-1),u=o.data[a.get()],ug(r,u,!0),r.setDirty(!0),r.fire("Undo",{level:u})),u;var r,o,i,a,u},redo:function(e,t){return n=s,o=t,(r=e).get()<o.length-1&&(r.set(r.get()+1),i=o[r.get()],ug(n,i,!1),n.setDirty(!0),n.fire("Redo",{level:i})),i;var n,r,o,i},clear:function(e,t){return n=s,o=t,(r=e).data=[],o.set(0),r.typing=!1,void n.fire("ClearUndos");var n,r,o},reset:function(e){return(t=e).clear(),void t.add();var t},hasUndo:function(e,t){return n=s,r=e,0<t.get()||r.typing&&r.data[0]&&!lg(ag(n),r.data[0]);var n,r},hasRedo:function(e,t){return n=e,t.get()<n.data.length-1&&!n.typing;var n},transact:function(e,t,n){return o=n,mg(r=e,t),r.beforeChange(),r.ignore(o),r.add();var r,o},ignore:function(e,t){return function(e,t){try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}}(e,t)},extra:function(e,t,n,r){return function(e,t,n,r,o){if(t.transact(r)){var i=t.data[n.get()].bookmark,a=t.data[n.get()-1];ug(e,a,!0),t.transact(o)&&(t.data[n.get()-1].beforeBookmark=i)}}(s,e,t,n,r)}},formatter:{apply:function(e,t,n){return Mp(s,e,t,n)},remove:function(e,t,n,r){return kp(s,e,t,n,r)},toggle:function(e,t,n){return o=e,i=t,a=n,u=(r=s).formatter.get(o),void(!Gm(r,o,i,a)||"toggle"in u[0]&&!u[0].toggle?Mp:kp)(r,o,i,a);var r,o,i,a,u}},editor:{getContent:function(e,t){return n=s,r=e,o=t,R.from(n.getBody()).fold(x("tree"===r.format?new df("body",11):""),function(e){return Tf(n,r,o,e)});var n,r,o},setContent:function(e,t){return jm(s,e,t)},insertContent:function(e,t){return rm(s,e,t)}},selection:{getContent:function(e,t){return tg(s,e,t)}},raw:{getModel:function(){return R.none()}}}},yg=function(e){return me(e.plugins,"rtc")},bg=function(n){var r=n;return de(n.plugins,"rtc").fold(function(){return r.rtcInstance=vg(n),R.none()},function(e){return R.some(e.setup().then(function(e){var o,i,a,t;return r.rtcInstance=(o=n,i=e,a=function(e){return E(e)?e:{}},t=p("Unimplemented feature for rtc"),{undoManager:{beforeChange:f,addUndoLevel:t,undo:function(){return i.undo(),hg()},redo:function(){return i.redo(),hg()},clear:t,reset:t,hasUndo:function(){return i.hasUndo()},hasRedo:function(){return i.hasRedo()},transact:function(e,t,n){return i.transact(n),hg()},ignore:t,extra:t},formatter:{apply:function(e,t,n){return i.applyFormat(e,a(t))},remove:function(e,t,n,r){return i.removeFormat(e,a(t))},toggle:function(e,t,n){return i.toggleFormat(e,a(t))}},editor:{getContent:function(e,t){if("html"!==t&&"tree"!==t)return vg(o).editor.getContent(e,t);var n=i.getContent(),r=hf({inner:!0});return gg(o,n),"tree"===t?n:r.serialize(n)},setContent:function(e,t){var n=pg(e)?e:o.parser.parse(e,{isRootContent:!0,insert:!0});return i.setContent(n),e},insertContent:function(e,t){var n=pg(e)?e:o.parser.parse(e,{insert:!0});i.insertContent(n)}},selection:{getContent:function(e,t){if("html"!==e&&"tree"!==e)return vg(o).selection.getContent(e,t);var n=i.getSelectedContent(),r=hf({});return gg(o,n),"tree"===e?n:r.serialize(n)}},raw:{getModel:function(){return R.some(i.getRawModel())}}}),e.isRemote}))})},Cg=function(e){return e.rtcInstance?e.rtcInstance:vg(e)},wg=function(e){var t=e.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.")},xg=function(e,t){void 0===t&&(t={});var n,r,o=t.format?t.format:"html";return n=t,r=o,Cg(e).editor.getContent(n,r)},Sg=function(e,t,n){return void 0===n&&(n={}),r=t,o=n,Cg(e).editor.setContent(r,o);var r,o},Ng=ga.DOM,Eg=function(e){return R.from(e).each(function(e){return e.destroy()})},kg=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&Ng.remove(o.nextSibling),e.fire("remove"),e.editorManager.remove(e),!e.inline&&r&&(i=e,Ng.setStyle(i.id,"display",i.orgDisplay)),e.fire("detach"),Ng.remove(e.getContainer()),Eg(t),Eg(n),e.destroy()}var i},_g=function(e,t){var n,r,o,i=e.selection,a=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),Eg(i),Eg(a)),(r=(n=e).formElement)&&(r._mceOldSubmit&&(r.submit=r._mceOldSubmit,r._mceOldSubmit=null),Ng.unbind(r,"submit reset",n.formEventDelegate)),(o=e).contentAreaContainer=o.formElement=o.container=o.editorContainer=null,o.bodyElement=o.contentDocument=o.contentWindow=null,o.iframeElement=o.targetElm=null,o.selection&&(o.selection=o.selection.win=o.selection.dom=o.selection.dom.doc=null),e.destroyed=!0):e.remove())},Rg=Object.prototype.hasOwnProperty,Tg=(gp=function(e,t){return E(e)&&E(t)?Tg(e,t):t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)Rg.call(o,i)&&(n[i]=gp(n[i],o[i]))}return n}),Ag=nt().deviceType,Dg=Ag.isTouch(),Og=Ag.isPhone(),Bg=Ag.isTablet(),Pg=["lists","autolink","autosave"],Lg={table_grid:!1,object_resizing:!1,resize:!1},Ig=function(e){var t=k(e)?e.join(" "):e,n=U(q(t)?t.split(" "):[],$e);return H(n,function(e){return 0<e.length})},Mg=function(n,e){var t,r,o=ce(e,function(e,t){return M(n,t)});return t=o.t,r=o.f,{sections:x(t),settings:x(r)}},Fg=function(e,t){return e.sections().hasOwnProperty(t)},Ug=function(e,t){return de(e,"toolbar_mode").orThunk(function(){return de(e,"toolbar_drawer").map(function(e){return!1===e?"wrap":e})}).getOr(t)},zg=function(e,t,n,r){var o,i,a,u,s,c,l,f=Ig(n.forced_plugins),d=Ig(r.plugins),m=Fg(o=t,i="mobile")?o.sections()[i]:{},p=m.plugins?Ig(m.plugins):d,g=e&&(s=u="mobile",c=(a=t).sections(),Fg(a,u)&&c[u].theme===s)?H(p,N(M,Pg)):e&&Fg(t,"mobile")?p:d,h=(l=g,[].concat(Ig(f)).concat(Ig(l)));return hr.extend(r,{plugins:h.join(" ")})},jg=function(e,t,n,r,o){var i,a,u,s,c,l,f,d=e?{mobile:(i=o.mobile||{},a=t,u={resize:!1,toolbar_mode:Ug(i,"scrolling"),toolbar_sticky:!1},pe(pe(pe({},Lg),u),a?{menubar:!1}:{}))}:{},m=Mg(["mobile"],Tg(d,o)),p=hr.extend(n,r,m.settings(),(f=m,e&&Fg(f,"mobile")?function(e,t,n){void 0===n&&(n={});var r=e.sections(),o=r.hasOwnProperty(t)?r[t]:{};return hr.extend({},n,o)}(m,"mobile"):{}),{validate:!0,external_plugins:(s=r,c=m.settings(),l=c.external_plugins?c.external_plugins:{},s&&s.external_plugins?hr.extend({},s.external_plugins,l):l)});return zg(e,m,r,p)},Hg=function(e,t,n,r,o){var i,a,u,s,c=(i=n,a=Dg,u=e,s={id:t,theme:"silver",toolbar_mode:Ug(o,"floating"),plugins:"",document_base_url:i,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:u.convertURL,url_converter_scope:u},pe(pe({},s),a?Lg:{}));return jg(Og||Bg,Og,c,r,o)},Vg=function(e,t,n){return R.from(t.settings[n]).filter(e)},qg=function(e,t,n,r){var o,i,a,u=t in e.settings?e.settings[t]:n;return"hash"===r?(a={},"string"==typeof(i=u)?z(0<i.indexOf("=")?i.split(/[;,](?![^=;,]*(?:[;,]|$))/):i.split(","),function(e){var t=e.split("=");1<t.length?a[hr.trim(t[0])]=hr.trim(t[1]):a[hr.trim(t[0])]=hr.trim(t[0])}):a=i,a):"string"===r?Vg(q,e,t).getOr(n):"number"===r?Vg(O,e,t).getOr(n):"boolean"===r?Vg(T,e,t).getOr(n):"object"===r?Vg(E,e,t).getOr(n):"array"===r?Vg(k,e,t).getOr(n):"string[]"===r?Vg((o=q,function(e){return k(e)&&G(e,o)}),e,t).getOr(n):"function"===r?Vg(D,e,t).getOr(n):u},$g=(hp={},{add:function(e,t){hp[e]=t},get:function(e){return hp[e]?hp[e]:{icons:{}}},has:function(e){return me(hp,e)}}),Wg=function(e,t){return t.dom()[e]},Kg=function(e,t){return parseInt(mn(t,e),10)},Xg=N(Wg,"clientWidth"),Yg=N(Wg,"clientHeight"),Gg=N(Kg,"margin-top"),Jg=N(Kg,"margin-left"),Qg=function(e,t,n){var r,o,i,a,u,s,c,l,f,d,m,p=Ne.fromDom(e.getBody()),g=e.inline?p:(r=p,Ne.fromDom(r.dom().ownerDocument.documentElement)),h=(o=e.inline,a=t,u=n,s=(i=g).dom().getBoundingClientRect(),{x:a-(o?s.left+i.dom().clientLeft+Jg(i):0),y:u-(o?s.top+i.dom().clientTop+Gg(i):0)});return l=h.x,f=h.y,d=Xg(c=g),m=Yg(c),0<=l&&0<=f&&l<=d&&f<=m},Zg=function(e){var t,n=e.inline?e.getBody():e.getContentAreaContainer();return t=n,R.from(t).map(Ne.fromDom).map(function(e){return st(ct(e),e)}).getOr(!1)};function eh(n){var t,o=[],i=function(){var e=n.theme;return e&&e.getNotificationManagerImpl?e.getNotificationManagerImpl():function t(){var e=function(){throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:e,close:e,reposition:e,getArgs:e}}()},a=function(){0<o.length&&i().reposition(o)},u=function(t){X(o,function(e){return e===t}).each(function(e){o.splice(e,1)})},r=function(r){if(!n.removed&&Zg(n))return K(o,function(e){return t=i().getArgs(e),n=r,!(t.type!==n.type||t.text!==n.text||t.progressBar||t.timeout||n.progressBar||n.timeout);var t,n}).getOrThunk(function(){n.editorManager.setActive(n);var e,t=i().open(r,function(){u(t),a()});return e=t,o.push(e),a(),t})};return(t=n).on("SkinLoaded",function(){var e=t.settings.service_message;e&&r({text:e,type:"warning",timeout:0})}),t.on("ResizeEditor ResizeWindow NodeChange",function(){Xn.requestAnimationFrame(a)}),t.on("remove",function(){z(o.slice(),function(e){i().close(e)})}),{open:r,close:function(){R.from(o[0]).each(function(e){i().close(e),u(e),a()})},getNotifications:function(){return o}}}var th=Ra.PluginManager,nh=Ra.ThemeManager;var rh=function(n){var r=[],o=function(){var e=n.theme;return e&&e.getWindowManagerImpl?e.getWindowManagerImpl():function t(){var e=function(){throw new Error("Theme did not provide a WindowManager implementation.")};return{open:e,openUrl:e,alert:e,confirm:e,close:e,getParams:e,setParams:e}}()},i=function(e,t){return function(){return t?t.apply(e,arguments):undefined}},a=function(e){var t;r.push(e),t=e,n.fire("OpenWindow",{dialog:t})},u=function(t){var e;e=t,n.fire("CloseWindow",{dialog:e}),0===(r=H(r,function(e){return e!==t})).length&&n.focus()},s=function(e){n.editorManager.setActive(n),Cm(n);var t=e();return a(t),t};return n.on("remove",function(){z(r,function(e){o().close(e)})}),{open:function(e,t){return s(function(){return o().open(e,t,u)})},openUrl:function(e){return s(function(){return o().openUrl(e,u)})},alert:function(e,t,n){o().alert(e,i(n||this,t))},confirm:function(e,t,n){o().confirm(e,i(n||this,t))},close:function(){R.from(r[r.length-1]).each(function(e){o().close(e),u(e)})}}},oh=function(e,t){e.notificationManager.open({type:"error",text:t})},ih=function(e,t){e._skinLoaded?oh(e,t):e.on("SkinLoaded",function(){oh(e,t)})},ah=function(e,t,n){var r,o;r=t,o={message:n},e.fire(r,o),V.console.error(n)},uh=function(e,t,n){return n?"Failed to load "+e+": "+n+" from url "+t:"Failed to load "+e+" url: "+t},sh=function(e,t,n){ah(e,"PluginLoadError",uh("plugin",t,n))},ch=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=V.window.console;r&&(r.error?r.error.apply(r,ge([e],t)):r.log.apply(r,ge([e],t)))},lh=function(t){var e,n,r=(n=(e=t).settings.content_css,q(n)?U(n.split(","),$e):k(n)?n:!1===n||e.inline?[]:["default"]),o=t.editorManager.baseURL+"/skins/content",i="content"+t.editorManager.suffix+".css",a=!0===t.inline;return U(r,function(e){return/^[a-z0-9\-]+$/i.test(e)&&!a?o+"/"+e+"/"+i:t.documentBaseURI.toAbsolute(e)})};var fh=function hE(r,o){var e=function(e){var t=o(e);if(t<=0||null===t){var n=mn(e,r);return parseFloat(n)||0}return t},i=function(o,e){return W(e,function(e,t){var n=mn(o,t),r=n===undefined?0:parseInt(n,10);return isNaN(r)?e:e+r},0)};return{set:function(e,t){if(!O(t)&&!t.match(/^[0-9]+$/))throw new Error(r+".set accepts only positive integer values. Value was "+t);var n=e.dom();un(n)&&(n.style[r]=t+"px")},get:e,getOuter:e,aggregate:i,max:function(e,t,n){var r=i(e,n);return r<t?t-r:0}}}("height",function(e){var t=e.dom();return Bt(e)?t.getBoundingClientRect().height:t.offsetHeight}),dh=function(r,e){return r.view(e).fold(x([]),function(e){var t=r.owner(e),n=dh(r,t);return[e].concat(n)})},mh=/* */Object.freeze({__proto__:null,view:function(e){return(e.dom()===V.document?R.none():R.from(e.dom().defaultView.frameElement)).map(Ne.fromDom)},owner:function(e){return ct(e)}}),ph=function(e){var t,n,r,o=Ne.fromDom(V.document),i=Ft(o),a=(t=e,r=(n=mh).owner(t),dh(n,r)),u=Mt(e),s=$(a,function(e,t){var n=Mt(t);return{left:e.left+n.left(),top:e.top+n.top()}},{left:0,top:0});return Lt(s.left+u.left()+i.left(),s.top+u.top()+i.top())},gh=function(e){return"textarea"===Rt(e)},hh=function(e,t){var n,r=function(e){var t=e.dom().ownerDocument,n=t.body,r=t.defaultView,o=t.documentElement;if(n===e.dom())return Lt(n.offsetLeft,n.offsetTop);var i=It(r.pageYOffset,o.scrollTop),a=It(r.pageXOffset,o.scrollLeft),u=It(o.clientTop,n.clientTop),s=It(o.clientLeft,n.clientLeft);return Mt(e).translate(a-s,i-u)}(e),o=(n=e,fh.get(n));return{element:e,bottom:r.top()+o,height:o,pos:r,cleanup:t}},vh=function(e,t){var n=function(e,t){var n=ht(e);if(0===n.length||gh(e))return{element:e,offset:t};if(t<n.length&&!gh(n[t]))return{element:n[t],offset:0};var r=n[n.length-1];return gh(r)?{element:e,offset:t}:"img"===Rt(r)?{element:r,offset:1}:Ot(r)?{element:r,offset:ef(r).length}:{element:r,offset:ht(r).length}}(e,t),r=Ne.fromHtml('<span data-mce-bogus="all">\ufeff</span>');return Ct(n.element,r),hh(r,function(){return kt(r)})},yh=function(n,r,o,i){xh(n,function(e,t){return Ch(n,r,o,i)},o)},bh=function(e,t,n,r,o){var i,a,u={elm:r.element.dom(),alignToTop:o};i=u,e.fire("ScrollIntoView",i).isDefaultPrevented()||(n(t,Ft(t).top(),r,o),a=u,e.fire("AfterScrollIntoView",a))},Ch=function(e,t,n,r){var o=Ne.fromDom(e.getBody()),i=Ne.fromDom(e.getDoc());o.dom().offsetWidth;var a=vh(Ne.fromDom(n.startContainer),n.startOffset);bh(e,i,t,a,r),a.cleanup()},wh=function(e,t,n,r){var o,i=Ne.fromDom(e.getDoc());bh(e,i,n,(o=t,hh(Ne.fromDom(o),f)),r)},xh=function(e,t,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;t(Ne.fromDom(r),Ne.fromDom(i));var u=e.dom.createRng();u.setStart(r,o),u.setEnd(i,a),e.selection.setRng(n)},Sh=function(e,t,n,r){var o=e.pos;if(n)Ut(o.left(),o.top(),r);else{var i=o.top()-t+e.height;Ut(o.left(),i,r)}},Nh=function(e,t,n,r,o){var i=n+t,a=r.pos.top(),u=r.bottom,s=n<=u-a;if(a<t)Sh(r,n,!1!==o,e);else if(i<a){Sh(r,n,s?!1!==o:!0===o,e)}else i<u&&!s&&Sh(r,n,!0===o,e)},Eh=function(e,t,n,r){var o=e.dom().defaultView.innerHeight;Nh(e,t,o,n,r)},kh=function(e,t,n,r){var o=e.dom().defaultView.innerHeight;Nh(e,t,o,n,r);var i=ph(n.element),a=Ht(V.window);i.top()<a.y?zt(n.element,!1!==r):i.top()>a.bottom&&zt(n.element,!0===r)},_h=function(e,t,n){return yh(e,Eh,t,n)},Rh=function(e,t,n){return wh(e,t,Eh,n)},Th=function(e,t,n){return yh(e,kh,t,n)},Ah=function(e,t,n){return wh(e,t,kh,n)},Dh=function(e,t,n){(e.inline?_h:Th)(e,t,n)},Oh=function(e){return on(e)||an(e)},Bh=function(e,t,n){var r,o,i,a,u,s=n;if(s.caretPositionFromPoint)(o=s.caretPositionFromPoint(e,t))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(s.body.createTextRange){r=s.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(c){r=function(e,n,t){var r,o,i;if(r=t.elementFromPoint(e,n),o=t.body.createTextRange(),r&&"HTML"!==r.tagName||(r=t.body),o.moveToElementText(r),0<(i=(i=hr.toArray(o.getClientRects())).sort(function(e,t){return(e=Math.abs(Math.max(e.top-n,e.bottom-n)))-(t=Math.abs(Math.max(t.top-n,t.bottom-n)))})).length){n=(i[0].bottom+i[0].top)/2;try{return o.moveToPoint(e,n),o.collapse(!0),o}catch(a){}}return null}(e,t,n)}return i=r,a=n.body,u=i&&i.parentElement?i.parentElement():null,an(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(u,a,Oh))?null:i}return r},Ph=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return R.from(i).map(Ne.fromDom).map(function(e){return r&&t.collapsed?e:vt(e,o(e,a)).getOr(e)}).bind(function(e){return Dt(e)?R.some(e):ft(e).filter(Dt)}).map(function(e){return e.dom()}).getOr(e)},Lh=function(e,t,n){return Ph(e,t,!0,n,function(e,t){return Math.min(e.dom().childNodes.length,t)})},Ih=function(e,t,n){return Ph(e,t,!1,n,function(e,t){return 0<t?t-1:t})},Mh=function(e,t){for(var n=e;e&&Zt(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},Fh=function(e,t){void 0===t&&(t={});var n,r,o=t.format?t.format:"html";return n=o,r=t,wg(e).selection.getContent(n,r)},Uh=function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},zh=function(e,t,n){return null!==function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(e,t,n)},jh=function(e,t,n){return zh(e,t,function(e){return e.nodeName===n})},Hh=function(e){return e&&"TABLE"===e.nodeName},Vh=function(e,t,n){for(var r=new ra(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if(rn(t))return!0},qh=function(e,t,n,r,o){var i,a,u=e.getRoot(),s=e.schema.getNonEmptyElements(),c=e.getParent(o.parentNode,e.isBlock)||u;if(r&&rn(o)&&t&&e.isEmpty(c))return R.some(ls(o.parentNode,e.nodeIndex(o)));for(var l,f,d=new ra(o,c);a=d[r?"prev":"next"]();){if("false"===e.getContentEditableParent(a)||(f=u,gu(l=a)&&!1===zh(l,f,Ms)))return R.none();if(Zt(a)&&0<a.nodeValue.length)return!1===jh(a,u,"A")?R.some(ls(a,r?a.nodeValue.length:0)):R.none();if(e.isBlock(a)||s[a.nodeName.toLowerCase()])return R.none();i=a}return n&&i?R.some(ls(i,0)):R.none()},$h=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,m=e.getRoot(),p=!1;if(o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"],c=$t(o)&&i===o.childNodes.length,u=e.schema.getNonEmptyElements(),s=n,gu(o))return R.none();if($t(o)&&i>o.childNodes.length-1&&(s=!1),tn(o)&&(o=m,i=0),o===m){if(s&&(a=o.childNodes[0<i?i-1:0])){if(gu(a))return R.none();if(u[a.nodeName]||Hh(a))return R.none()}if(o.hasChildNodes()){if(i=Math.min(!s&&0<i?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=Zt(o)&&c?o.data.length:0,!t&&o===m.lastChild&&Hh(o))return R.none();if(function(e,t){for(;t&&t!==e;){if(an(t))return!0;t=t.parentNode}return!1}(m,o)||gu(o))return R.none();if(o.hasChildNodes()&&!1===Hh(o)){var g=new ra(a=o,m);do{if(an(a)||gu(a)){p=!1;break}if(Zt(a)&&0<a.nodeValue.length){i=s?0:a.nodeValue.length,o=a,p=!0;break}if(u[a.nodeName.toLowerCase()]&&(!(l=a)||!/^(TD|TH|CAPTION)$/.test(l.nodeName))){i=e.nodeIndex(a),o=a.parentNode,s||i++,p=!0;break}}while(a=s?g.next():g.prev())}}}return t&&(Zt(o)&&0===i&&qh(e,c,t,!0,o).each(function(e){o=e.container(),i=e.offset(),p=!0}),$t(o)&&(!(a=(a=o.childNodes[i])||o.childNodes[i-1])||!rn(a)||(d="A",(f=a).previousSibling&&f.previousSibling.nodeName===d)||Vh(e,a,!1)||Vh(e,a,!0)||qh(e,c,t,!0,a).each(function(e){o=e.container(),i=e.offset(),p=!0}))),s&&!t&&Zt(o)&&i===o.nodeValue.length&&qh(e,c,t,!1,o).each(function(e){o=e.container(),i=e.offset(),p=!0}),p?R.some(ls(o,i)):R.none()},Wh=function(e,t){var n=t.collapsed,r=t.cloneRange(),o=ls.fromRangeStart(t);return $h(e,n,!0,r).each(function(e){n&&ls.isAbove(o,e)||r.setStart(e.container(),e.offset())}),n||$h(e,n,!1,r).each(function(e){r.setEnd(e.container(),e.offset())}),n&&r.collapse(!0),Uh(t,r)?R.none():R.some(r)},Kh=function(e){return 0===e.dom().length?(kt(e),R.none()):R.some(e)},Xh=function(r,e){var t=R.from(e.firstChild).map(Ne.fromDom),n=R.from(e.lastChild).map(Ne.fromDom);r.deleteContents(),r.insertNode(e);var o=t.bind(dt).filter(Ot).bind(Kh),i=n.bind(mt).filter(Ot).bind(Kh);$u(o,t.filter(Ot),function(e,t){var n,r;n=t.dom(),r=e.dom().data,n.insertData(0,r),kt(e)}),$u(i,n.filter(Ot),function(e,t){var n=t.dom().length;t.dom().appendData(e.dom().data),r.setEnd(t.dom(),n),kt(e)}),r.collapse(!1)},Yh=function(e,t,n){void 0===n&&(n={});var r,o=(r=t,pe(pe({format:"html"},n),{set:!0,selection:!0,content:r}));if(o.no_events||!(o=e.fire("BeforeSetContent",o)).isDefaultPrevented()){n.content=function(e,t){if("raw"===t.format)return t.content;var n=e.parser.parse(t.content,pe({isRootContent:!0,forced_root_block:!1},t));return hf({validate:e.validate},e.schema).serialize(n)}(e,o);var i=e.selection.getRng();Xh(i,i.createContextualFragment(n.content)),e.selection.setRng(i),Dh(e,i),o.no_events||e.fire("SetContent",o)}else e.fire("SetContent",o)};function Gh(e){return{getBookmark:N(sl,e),moveToBookmark:N(cl,e)}}(Gh=Gh||{}).isBookmarkNode=ll;var Jh=Gh,Qh=function(t,n,e){if(e.collapsed)return!1;if(rr.browser.isIE()&&e.startOffset===e.endOffset-1&&e.startContainer===e.endContainer){var r=e.startContainer.childNodes[e.startOffset];if($t(r))return F(r.getClientRects(),function(e){return zu(e,t,n)})}return F(e.getClientRects(),function(e){return zu(e,t,n)})},Zh={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,END:35,HOME:36,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(e){return rr.mac?e.metaKey:e.ctrlKey&&!e.altKey}},ev=an,tv=on,nv=function(r,s){var c,l,f,a,d,m,p,g,h,v,y,b,C,w,x,S,N,E=s.dom,u=hr.each,k=s.getDoc(),_=V.document,R=Math.abs,T=Math.round,A=s.getBody();a={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var D=function(e){return e&&("IMG"===e.nodeName||s.dom.is(e,"figure.image"))},n=function(e){var t=e.target;!function(e,t){if("longpress"!==e.type&&0!==e.type.indexOf("touch"))return D(e.target)&&!Qh(e.clientX,e.clientY,t);var n=e.touches[0];return D(e.target)&&!Qh(n.clientX,n.clientY,t)}(e,s.selection.getRng())||e.isDefaultPrevented()||s.selection.select(t)},O=function(e){return s.dom.is(e,"figure.image")?e.querySelector("img"):e},B=function(e){var t=s.getParam("object_resizing");return!1!==t&&!rr.iOS&&("string"!=typeof t&&(t="table,img,figure.image,div"),"false"!==e.getAttribute("data-mce-resize")&&(e!==s.getBody()&&ot(Ne.fromDom(e),t)))},P=function(e,t,n){E.setStyles(O(e),{width:t,height:n})},L=function(e){var t,n,r,o,i,a,u;t=e.screenX-m,n=e.screenY-p,w=t*d[2]+v,x=n*d[3]+y,w=w<5?5:w,x=x<5?5:x,(D(c)&&!1!==s.getParam("resize_img_proportional",!0,"boolean")?!Zh.modifierPressed(e):Zh.modifierPressed(e))&&(R(t)>R(n)?(x=T(w*b),w=T(x/b)):(w=T(x/b),x=T(w*b))),P(l,w,x),r=0<(r=d.startPos.x+t)?r:0,o=0<(o=d.startPos.y+n)?o:0,E.setStyles(f,{left:r,top:o,display:"block"}),f.innerHTML=w+" &times; "+x,d[2]<0&&l.clientWidth<=w&&E.setStyle(l,"left",g+(v-w)),d[3]<0&&l.clientHeight<=x&&E.setStyle(l,"top",h+(y-x)),(t=A.scrollWidth-S)+(n=A.scrollHeight-N)!==0&&E.setStyles(f,{left:r-t,top:o-n}),C||(i=c,a=v,u=y,s.fire("ObjectResizeStart",{target:i,width:a,height:u}),C=!0)},I=function(){var e=C;C=!1;var t,n,r,o=function(e,t){t&&(c.style[e]||!s.schema.isValid(c.nodeName.toLowerCase(),e)?E.setStyle(O(c),e,t):E.setAttrib(O(c),e,""+t))};e&&(o("width",w),o("height",x)),E.unbind(k,"mousemove",L),E.unbind(k,"mouseup",I),_!==k&&(E.unbind(_,"mousemove",L),E.unbind(_,"mouseup",I)),E.remove(l),E.remove(f),i(c),e&&(t=c,n=w,r=x,s.fire("ObjectResized",{target:t,width:n,height:r}),E.setAttrib(c,"style",E.getAttrib(c,"style"))),s.nodeChanged()},i=function(e){var t,r,o,n,i;M(),U(),t=E.getPos(e,A),g=t.x,h=t.y,i=e.getBoundingClientRect(),r=i.width||i.right-i.left,o=i.height||i.bottom-i.top,c!==e&&(c=e,w=x=0),n=s.fire("ObjectSelected",{target:e}),B(e)&&!n.isDefaultPrevented()?u(a,function(n,e){var t;(t=E.get("mceResizeHandle"+e))&&E.remove(t),t=E.add(A,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===rr.ie&&(t.contentEditable=!1),E.bind(t,"mousedown",function(e){var t;e.stopImmediatePropagation(),e.preventDefault(),m=(t=e).screenX,p=t.screenY,v=O(c).clientWidth,y=O(c).clientHeight,b=y/v,(d=n).startPos={x:r*n[0]+g,y:o*n[1]+h},S=A.scrollWidth,N=A.scrollHeight,l=c.cloneNode(!0),E.addClass(l,"mce-clonedresizable"),E.setAttrib(l,"data-mce-bogus","all"),l.contentEditable=!1,l.unSelectabe=!0,E.setStyles(l,{left:g,top:h,margin:0}),P(l,r,o),l.removeAttribute("data-mce-selected"),A.appendChild(l),E.bind(k,"mousemove",L),E.bind(k,"mouseup",I),_!==k&&(E.bind(_,"mousemove",L),E.bind(_,"mouseup",I)),f=E.add(A,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},v+" &times; "+y)}),n.elm=t,E.setStyles(t,{left:r*n[0]+g-t.offsetWidth/2,top:o*n[1]+h-t.offsetHeight/2})}):M(),c.setAttribute("data-mce-selected","1")},M=function(){U(),c&&c.removeAttribute("data-mce-selected"),oe(a,function(e,t){var n=E.get("mceResizeHandle"+t);n&&(E.unbind(n),E.remove(n))})},o=function(e){var t,n=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};C||s.removed||(u(E.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),t="mousedown"===e.type?e.target:r.getNode(),n(t=E.$(t).closest("table,img,figure.image,hr")[0],A)&&(z(),n(r.getStart(!0),t)&&n(r.getEnd(!0),t))?i(t):M())},F=function(e){return ev(function(e,t){for(;t&&t!==e;){if(tv(t)||ev(t))return t;t=t.parentNode}return null}(s.getBody(),e))},U=function(){oe(a,function(e){e.elm&&(E.unbind(e.elm),delete e.elm)})},z=function(){try{s.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};s.on("init",function(){if(z(),rr.browser.isIE()||rr.browser.isEdge()){s.on("mousedown click",function(e){var t=e.target,n=t.nodeName;C||!/^(TABLE|IMG|HR)$/.test(n)||F(t)||(2!==e.button&&s.selection.select(t,"TABLE"===n),"mousedown"===e.type&&s.nodeChanged())});var e=function(e){var t=function(e){Xn.setEditorTimeout(s,function(){return s.selection.select(e)})};if(F(e.target))return e.preventDefault(),void t(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&t(e.target))};E.bind(A,"mscontrolselect",e),s.on("remove",function(){return E.unbind(A,"mscontrolselect",e)})}var t=Xn.throttle(function(e){s.composing||o(e)});s.on("nodechange ResizeEditor ResizeWindow ResizeContent drop FullscreenStateChanged",t),s.on("keyup compositionend",function(e){c&&"TABLE"===c.nodeName&&t(e)}),s.on("hide blur",M),s.on("contextmenu longpress",n,!0)}),s.on("remove",U);return{isResizable:B,showResizeRect:i,hideResizeRect:M,updateResizeRect:o,destroy:function(){c=l=null}}},rv=function(e,t,n){if(e&&e.hasOwnProperty(t)){var r=H(e[t],function(e){return e!==n});0===r.length?delete e[t]:e[t]=r}};var ov=function(e){return!!e.select},iv=function(e){return!(!e||!e.ownerDocument)&&st(Ne.fromDom(e.ownerDocument),Ne.fromDom(e))},av=function(u,s,e,c){var n,t,l,f,r=function h(i,n){var a,u;return{selectorChangedWithUnbind:function(e,t){return a||(a={},u={},n.on("NodeChange",function(e){var n=e.element,r=i.getParents(n,null,i.getRoot()),o={};hr.each(a,function(e,n){hr.each(r,function(t){if(i.is(t,n))return u[n]||(hr.each(e,function(e){e(!0,{node:t,selector:n,parents:r})}),u[n]=e),o[n]=e,!1})}),hr.each(u,function(e,t){o[t]||(delete u[t],hr.each(e,function(e){e(!1,{node:n,selector:t,parents:r})}))})})),a[e]||(a[e]=[]),a[e].push(t),{unbind:function(){rv(a,e,t),rv(u,e,t)}}}}}(u,c).selectorChangedWithUnbind,o=function(e,t){return Yh(c,e,t)},i=function(e){var t=m();t.collapse(!!e),a(t)},d=function(){return s.getSelection?s.getSelection():s.document.selection},m=function(){var e,t,n,r,o=function(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}};if(!s)return null;if(null==(r=s.document))return null;if(c.bookmark!==undefined&&!1===Pm(c)){var i=wm(c);if(i.isSome())return i.map(function(e){return Fp(c,[e])[0]}).getOr(r.createRange())}try{(e=d())&&!qt(e.anchorNode)&&(t=0<e.rangeCount?e.getRangeAt(0):e.createRange?e.createRange():r.createRange())}catch(a){}return(t=(t=Fp(c,[t])[0])||(r.createRange?r.createRange():r.body.createTextRange())).setStart&&9===t.startContainer.nodeType&&t.collapsed&&(n=u.getRoot(),t.setStart(n,0),t.setEnd(n,0)),l&&f&&(0===o(t.START_TO_START,t,l)&&0===o(t.END_TO_END,t,l)?t=f:f=l=null),t},a=function(e,t){var n,r;if((o=e)&&(ov(o)||iv(o.startContainer)&&iv(o.endContainer))){var o,i=ov(e)?e:null;if(i){f=null;try{i.select()}catch(a){}}else{if(n=d(),e=c.fire("SetSelectionRange",{range:e,forward:t}).range,n){f=e;try{n.removeAllRanges(),n.addRange(e)}catch(a){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),l=0<n.rangeCount?n.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!n.setBaseAndExtent||rr.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(r=e.startContainer.childNodes[e.startOffset])&&"IMG"===r.tagName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode===e.startContainer&&n.focusNode===e.endContainer||n.setBaseAndExtent(r,0,r,1)),c.fire("AfterSetSelectionRange",{range:e,forward:t})}}},p=function(){var e,t,n=d();return!(n&&n.anchorNode&&n.focusNode)||((e=u.createRng()).setStart(n.anchorNode,n.anchorOffset),e.collapse(!0),(t=u.createRng()).setStart(n.focusNode,n.focusOffset),t.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,t)<=0)},g={bookmarkManager:null,controlSelection:null,dom:u,win:s,serializer:e,editor:c,collapse:i,setCursorLocation:function(e,t){var n=u.createRng();e?(n.setStart(e,t),n.setEnd(e,t),a(n),i(!1)):(Yl(u,n,c.getBody(),!0),a(n))},getContent:function(e){return Fh(c,e)},setContent:o,getBookmark:function(e,t){return n.getBookmark(e,t)},moveToBookmark:function(e){return n.moveToBookmark(e)},select:function(e,t){var r,n,o;return r=u,n=e,o=t,R.from(n).map(function(e){var t=r.nodeIndex(e),n=r.createRng();return n.setStart(e.parentNode,t),n.setEnd(e.parentNode,t+1),o&&(Yl(r,n,e,!0),Yl(r,n,e,!1)),n}).each(a),e},isCollapsed:function(){var e=m(),t=d();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isForward:p,setNode:function(e){return o(u.getOuterHTML(e)),e},getNode:function(){return e=c.getBody(),(t=m())?(r=t.startContainer,o=t.endContainer,i=t.startOffset,a=t.endOffset,n=t.commonAncestorContainer,!t.collapsed&&(r===o&&a-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),3===r.nodeType&&3===o.nodeType&&(r=r.length===i?Mh(r.nextSibling,!0):r.parentNode,o=0===a?Mh(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n):e;var e,t,n,r,o,i,a},getSel:d,setRng:a,getRng:m,getStart:function(e){return Lh(c.getBody(),m(),e)},getEnd:function(e){return Ih(c.getBody(),m(),e)},getSelectedBlocks:function(e,t){return function(e,t,n,r){var o,i,a=[];if(i=e.getRoot(),n=e.getParent(n||Lh(i,t,t.collapsed),e.isBlock),r=e.getParent(r||Ih(i,t,t.collapsed),e.isBlock),n&&n!==i&&a.push(n),n&&r&&n!==r)for(var u=new ra(o=n,i);(o=u.next())&&o!==r;)e.isBlock(o)&&a.push(o);return r&&n!==r&&r!==i&&a.push(r),a}(u,m(),e,t)},normalize:function(){var e=m(),t=d();if(1<Hl(t).length||!Gl(c))return e;var n=Wh(u,e);return n.each(function(e){a(e,p())}),n.getOr(e)},selectorChanged:function(e,t){return r(e,t),g},selectorChangedWithUnbind:r,getScrollContainer:function(){for(var e,t=u.getRoot();t&&"BODY"!==t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){return r=e,o=t,void((n=c).inline?Rh:Ah)(n,r,o);var n,r,o},placeCaretAt:function(e,t){return a(Bh(e,t,c.getDoc()))},getBoundingClientRect:function(){var e=m();return e.collapsed?ms.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){s=l=f=null,t.destroy()}};return n=Jh(g),t=nv(g,c),g.bookmarkManager=n,g.controlSelection=t,g},uv=function(e,a,u){e.addNodeFilter("font",function(e){z(e,function(e){var t,n=a.parse(e.attr("style")),r=e.attr("color"),o=e.attr("face"),i=e.attr("size");r&&(n.color=r),o&&(n["font-family"]=o),i&&(n["font-size"]=u[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",a.serialize(n)),t=e,z(["color","face","size"],function(e){t.attr(e,null)})})})},sv=function(e,t){var n,r=ao();t.convert_fonts_to_spans&&uv(e,r,hr.explode(t.font_size_legacy_values)),n=r,e.addNodeFilter("strike",function(e){z(e,function(e){var t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))})})},cv=function(e){var t,n,r=decodeURIComponent(e).split(",");return(n=/data:([^;]+)/.exec(r[0]))&&(t=n[1]),{type:t,data:r[1]}},lv=function(e,t){var n;try{n=V.atob(t)}catch(pE){return R.none()}for(var r=new Uint8Array(n.length),o=0;o<r.length;o++)r[o]=n.charCodeAt(o);return R.some(new V.Blob([r],{type:e}))},fv=function(e){return 0===e.indexOf("blob:")?(i=e,new Mn(function(e,t){var n=function(){t("Cannot convert "+i+" to Blob. Resource might not exist or is inaccessible.")};try{var r=new V.XMLHttpRequest;r.open("GET",i,!0),r.responseType="blob",r.onload=function(){200===this.status?e(this.response):n()},r.onerror=n,r.send()}catch(o){n()}})):0===e.indexOf("data:")?(o=e,new Mn(function(e){var t=cv(o),n=t.type,r=t.data;lv(n,r).fold(function(){return e(new V.Blob([]))},e)})):null;var i,o},dv=0,mv=function(e){return(e||"blobid")+dv++},pv=function(r,o,i,t){var a,u;if(0!==o.src.indexOf("blob:")){var e=cv(o.src),n=e.data,s=e.type;a=n,(u=r.getByData(a,s))?i({image:o,blobInfo:u}):fv(o.src).then(function(e){u=r.create(mv(),e,a),r.add(u),i({image:o,blobInfo:u})},function(e){t(e)})}else(u=r.getByUri(o.src))?i({image:o,blobInfo:u}):fv(o.src).then(function(t){var n;n=t,new Mn(function(e){var t=new V.FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(n)}).then(function(e){a=cv(e).data,u=r.create(mv(),t,a),r.add(u),i({image:o,blobInfo:u})})},function(e){t(e)})};function gv(i,a){var u={};return{findAll:function(e,n){var t,r;n=n||x(!0),t=H((r=e)?te(r.getElementsByTagName("img")):[],function(e){var t=e.src;return!!rr.fileApi&&(!e.hasAttribute("data-mce-bogus")&&(!e.hasAttribute("data-mce-placeholder")&&(!(!t||t===rr.transparentSrc)&&(0===t.indexOf("blob:")?!i.isUploaded(t)&&n(e):0===t.indexOf("data:")&&n(e)))))});var o=U(t,function(n){if(u[n.src]!==undefined)return new Mn(function(t){u[n.src].then(function(e){if("string"==typeof e)return e;t({image:n,blobInfo:e.blobInfo})})});var e=new Mn(function(e,t){pv(a,n,e,t)}).then(function(e){return delete u[e.image.src],e})["catch"](function(e){return delete u[n.src],e});return u[n.src]=e});return Mn.all(o)}}}var hv=function(e,t,n,r){(e.padd_empty_with_br||t.insert)&&n[r.name]?r.empty().append(new df("br",1)).shortEnded=!0:r.empty().append(new df("#text",3)).value=oo},vv=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},yv=function(r,e,t,n){return n.isEmpty(e,t,function(e){return t=e,(n=r.getElementRule(t.name))&&n.paddEmpty;var t,n})},bv=function(e,o){var i=o.blob_cache,t=function(t){var e,n,r=t.attr("src");(e=t).attr("src")===rr.transparentSrc||e.attr("data-mce-placeholder")||t.attr("data-mce-bogus")||((n=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(r))?R.some({type:n[1],data:decodeURIComponent(n[2])}):R.none()).filter(function(){return function(e,t){if(t.images_dataimg_filter){var n=new V.Image;return n.src=e.attr("src"),oe(e.attributes.map,function(e,t){n.setAttribute(t,e)}),t.images_dataimg_filter(n)}return!0}(t,o)}).bind(function(e){var t=e.type,n=e.data;return R.from(i.getByData(n,t)).orThunk(function(){return lv(t,n).map(function(e){var t=i.create(mv(),e,n);return i.add(t),t})})}).each(function(e){t.attr("src",e.blobUri())})};i&&e.addAttributeFilter("src",function(e){return z(e,t)})},Cv=function(e,g){var h=e.schema;g.remove_trailing_brs&&e.addNodeFilter("br",function(e,t,n){var r,o,i,a,u,s,c,l,f=e.length,d=hr.extend({},h.getBlockElements()),m=h.getNonEmptyElements(),p=h.getNonEmptyElements();for(d.body=1,r=0;r<f;r++)if(i=(o=e[r]).parent,d[o.parent.name]&&o===i.lastChild){for(u=o.prev;u;){if("span"!==(s=u.name)||"bookmark"!==u.attr("data-mce-type")){if("br"!==s)break;if("br"===s){o=null;break}}u=u.prev}o&&(o.remove(),yv(h,m,p,i)&&(c=h.getElementRule(i.name))&&(c.removeEmpty?i.remove():c.paddEmpty&&hv(g,n,d,i)))}else{for(a=o;i&&i.firstChild===a&&i.lastChild===a&&!d[(a=i).name];)i=i.parent;a===i&&!0!==g.padd_empty_with_br&&((l=new df("#text",3)).value=oo,o.replace(l))}}),e.addAttributeFilter("href",function(e){var t=e.length,n=function(e){var t=e?hr.trim(e):"";return/\b(noopener)\b/g.test(t)?t:t.split(" ").filter(function(e){return 0<e.length}).concat(["noopener"]).sort().join(" ")};if(!g.allow_unsafe_link_target)for(;t--;){var r=e[t];"a"===r.name&&"_blank"===r.attr("target")&&r.attr("rel",n(r.attr("rel")))}}),g.allow_html_in_named_anchor||e.addAttributeFilter("id,name",function(e){for(var t,n,r,o,i=e.length;i--;)if("a"===(o=e[i]).name&&o.firstChild&&!o.attr("href"))for(r=o.parent,t=o.lastChild;n=t.prev,r.insert(t,o),t=n;);}),g.fix_list_elements&&e.addNodeFilter("ul,ol",function(e){for(var t,n,r=e.length;r--;)if("ul"===(n=(t=e[r]).parent).name||"ol"===n.name)if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{var o=new df("li",1);o.attr("style","list-style-type: none"),t.wrap(o)}}),g.validate&&h.getValidClasses()&&e.addAttributeFilter("class",function(e){for(var t,n,r,o,i,a,u,s=e.length,c=h.getValidClasses();s--;){for(n=(t=e[s]).attr("class").split(" "),i="",r=0;r<n.length;r++)o=n[r],u=!1,(a=c["*"])&&a[o]&&(u=!0),a=c[t.name],!u&&a&&a[o]&&(u=!0),u&&(i&&(i+=" "),i+=o);i.length||(i=null),t.attr("class",i)}}),bv(e,g)},wv=hr.makeMap,xv=hr.each,Sv=hr.explode,Nv=hr.extend,Ev=function(R,T){void 0===T&&(T=no());var A={},D=[],O={},B={};(R=R||{}).validate=!("validate"in R)||R.validate,R.root_name=R.root_name||"body";var e,t,P=function(e){var t,n,r;(n=e.name)in A&&((r=O[n])?r.push(e):O[n]=[e]),t=D.length;for(;t--;)(n=D[t].name)in e.attributes.map&&((r=B[n])?r.push(e):B[n]=[e]);return e},n={schema:T,addAttributeFilter:function(e,n){xv(Sv(e),function(e){var t;for(t=0;t<D.length;t++)if(D[t].name===e)return void D[t].callbacks.push(n);D.push({name:e,callbacks:[n]})})},getAttributeFilters:function(){return[].concat(D)},addNodeFilter:function(e,n){xv(Sv(e),function(e){var t=A[e];t||(A[e]=t=[]),t.push(n)})},getNodeFilters:function(){var e=[];for(var t in A)A.hasOwnProperty(t)&&e.push({name:t,callbacks:A[t]});return e},filterNode:P,parse:function(e,u){var t,n,r,o,i,a,s,c,l,f,d,m=[];u=u||{},O={},B={},l=Nv(wv("script,style,head,html,body,title,meta,param"),T.getBlockElements());var p,g=T.getNonEmptyElements(),h=T.children,v=R.validate,y="forced_root_block"in u?u.forced_root_block:R.forced_root_block,b=!1===(p=y)?"":!0===p?"p":p,C=T.getWhiteSpaceElements(),w=/^[ \t\r\n]+/,x=/[ \t\r\n]+$/,S=/[ \t\r\n]+/g,N=/^[ \t\r\n]+$/;f=C.hasOwnProperty(u.context)||C.hasOwnProperty(R.root_name);var E=function(e,t){var n,r=new df(e,t);return e in A&&((n=O[e])?n.push(r):O[e]=[r]),r},k=function(e){var t,n,r,o,i=T.getBlockElements();for(t=e.prev;t&&3===t.type;){if(0<(r=t.value.replace(x,"")).length)return void(t.value=r);if(n=t.next){if(3===n.type&&n.value.length){t=t.prev;continue}if(!i[n.name]&&"script"!==n.name&&"style"!==n.name){t=t.prev;continue}}o=t.prev,t.remove(),t=o}};t=kf({validate:v,allow_script_urls:R.allow_script_urls,allow_conditional_comments:R.allow_conditional_comments,preserve_cdata:R.preserve_cdata,self_closing_elements:function(e){var t,n={};for(t in e)"li"!==t&&"p"!==t&&(n[t]=e[t]);return n}(T.getSelfClosingElements()),cdata:function(e){d.append(E("#cdata",4)).value=e},text:function(e,t){var n,r,o;f||(e=e.replace(S," "),r=d.lastChild,o=l,r&&(o[r.name]||"br"===r.name)&&(e=e.replace(w,""))),0!==e.length&&((n=E("#text",3)).raw=!!t,d.append(n).value=e)},comment:function(e){d.append(E("#comment",8)).value=e},pi:function(e,t){d.append(E(e,7)).value=t,k(d)},doctype:function(e){d.append(E("#doctype",10)).value=e,k(d)},start:function(e,t,n){var r,o,i,a,u;if(i=v?T.getElementRule(e):{}){for((r=E(i.outputName||e,1)).attributes=t,r.shortEnded=n,d.append(r),(u=h[d.name])&&h[r.name]&&!u[r.name]&&m.push(r),o=D.length;o--;)(a=D[o].name)in t.map&&((s=B[a])?s.push(r):B[a]=[r]);l[e]&&k(r),n||(d=r),!f&&C[e]&&(f=!0)}},end:function(e){var t,n,r,o,i,a;if(n=v?T.getElementRule(e):{}){if(l[e]&&!f){if((t=d.firstChild)&&3===t.type)if(0<(r=t.value.replace(w,"")).length)t.value=r,t=t.next;else for(o=t.next,t.remove(),t=o;t&&3===t.type;)r=t.value,o=t.next,0!==r.length&&!N.test(r)||(t.remove(),t=o),t=o;if((t=d.lastChild)&&3===t.type)if(0<(r=t.value.replace(x,"")).length)t.value=r,t=t.prev;else for(o=t.prev,t.remove(),t=o;t&&3===t.type;)r=t.value,o=t.prev,0!==r.length&&!N.test(r)||(t.remove(),t=o),t=o}if(f&&C[e]&&(f=!1),n.removeEmpty&&yv(T,g,C,d))return i=d.parent,l[d.name]?d.empty().remove():d.unwrap(),void(d=i);n.paddEmpty&&(vv(a=d,"#text")&&a.firstChild.value===oo||yv(T,g,C,d))&&hv(R,u,l,d),d=d.parent}}},T);var _=d=new df(u.context||R.root_name,11);if(t.parse(e,u.format),v&&m.length&&(u.context?u.invalid=!0:function(e){var t,n,r,o,i,a,u,s,c,l,f,d,m,p,g,h;for(d=wv("tr,td,th,tbody,thead,tfoot,table"),l=T.getNonEmptyElements(),f=T.getWhiteSpaceElements(),m=T.getTextBlockElements(),p=T.getSpecialElements(),t=0;t<e.length;t++)if((n=e[t]).parent&&!n.fixed)if(m[n.name]&&"li"===n.parent.name){for(g=n.next;g&&m[g.name];)g.name="li",g.fixed=!0,n.parent.insert(g,n.parent),g=g.next;n.unwrap(n)}else{for(o=[n],r=n.parent;r&&!T.isValidChild(r.name,n.name)&&!d[r.name];r=r.parent)o.push(r);if(r&&1<o.length){for(o.reverse(),i=a=P(o[0].clone()),c=0;c<o.length-1;c++){for(T.isValidChild(a.name,o[c].name)?(u=P(o[c].clone()),a.append(u)):u=a,s=o[c].firstChild;s&&s!==o[c+1];)h=s.next,u.append(s),s=h;a=u}yv(T,l,f,i)?r.insert(n,o[0],!0):(r.insert(i,o[0],!0),r.insert(n,i)),r=o[0],(yv(T,l,f,r)||vv(r,"br"))&&r.empty().remove()}else if(n.parent){if("li"===n.name){if((g=n.prev)&&("ul"===g.name||"ul"===g.name)){g.append(n);continue}if((g=n.next)&&("ul"===g.name||"ul"===g.name)){g.insert(n,g.firstChild,!0);continue}n.wrap(P(new df("ul",1)));continue}T.isValidChild(n.parent.name,"div")&&T.isValidChild("div",n.name)?n.wrap(P(new df("div",1))):p[n.name]?n.empty().remove():n.unwrap()}}}(m)),b&&("body"===_.name||u.isRootContent)&&function(){var e,t,n=_.firstChild,r=function(e){e&&((n=e.firstChild)&&3===n.type&&(n.value=n.value.replace(w,"")),(n=e.lastChild)&&3===n.type&&(n.value=n.value.replace(x,"")))};if(T.isValidChild(_.name,b.toLowerCase())){for(;n;)e=n.next,3===n.type||1===n.type&&"p"!==n.name&&!l[n.name]&&!n.attr("data-mce-type")?(t||((t=E(b,1)).attr(R.forced_root_block_attrs),_.insert(t,n)),t.append(n)):(r(t),t=null),n=e;r(t)}}(),!u.invalid){for(c in O)if(O.hasOwnProperty(c)){for(s=A[c],i=(n=O[c]).length;i--;)n[i].parent||n.splice(i,1);for(r=0,o=s.length;r<o;r++)s[r](n,c,u)}for(r=0,o=D.length;r<o;r++)if((s=D[r]).name in B){for(i=(n=B[s.name]).length;i--;)n[i].parent||n.splice(i,1);for(i=0,a=s.callbacks.length;i<a;i++)s.callbacks[i](n,s.name,u)}}return _}};return Cv(n,R),e=n,(t=R).inline_styles&&sv(e,t),n},kv=function(e,t,n){return m=n,(d=e)&&d.hasEventListeners("PreProcess")&&!m.no_events?(o=t,i=n,f=(r=e).dom,o=o.cloneNode(!0),(a=V.document.implementation).createHTMLDocument&&(u=a.createHTMLDocument(""),hr.each("BODY"===o.nodeName?o.childNodes:[o],function(e){u.body.appendChild(u.importNode(e,!0))}),o="BODY"!==o.nodeName?u.body.firstChild:u.body,s=f.doc,f.doc=u),c=r,l=pe(pe({},i),{node:o}),c.fire("PreProcess",l),s&&(f.doc=s),o):t;var r,o,i,a,u,s,c,l,f,d,m},_v=function(e,t,n){-1===hr.inArray(t,n)&&(e.addAttributeFilter(n,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),t.push(n))},Rv=function(e,t,n,r,o){var i,a,u,s,c,l,f=(i=r,hf(t,n).serialize(i));return a=e,s=f,(u=o).no_events||!a?s:(c=a,l=pe(pe({},u),{content:s}),c.fire("PostProcess",l).content)},Tv=function(y,b){var e=["data-mce-selected"],C=b&&b.dom?b.dom:ga.DOM,w=b&&b.schema?b.schema:no(y);y.entity_encoding=y.entity_encoding||"named",y.remove_trailing_brs=!("remove_trailing_brs"in y)||y.remove_trailing_brs;var t,s,c,x=Ev(y,w);s=y,c=C,(t=x).addAttributeFilter("data-mce-tabindex",function(e,t){for(var n,r=e.length;r--;)(n=e[r]).attr("tabindex",n.attr("data-mce-tabindex")),n.attr(t,null)}),t.addAttributeFilter("src,href,style",function(e,t){for(var n,r,o=e.length,i="data-mce-"+t,a=s.url_converter,u=s.url_converter_scope;o--;)(r=(n=e[o]).attr(i))!==undefined?(n.attr(t,0<r.length?r:null),n.attr(i,null)):(r=n.attr(t),"style"===t?r=c.serializeStyle(c.parseStyle(r),n.name):a&&(r=a.call(u,r,t,n.name)),n.attr(t,0<r.length?r:null))}),t.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)(n=(t=e[r]).attr("class"))&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",0<n.length?n:null))}),t.addAttributeFilter("data-mce-type",function(e,t,n){for(var r,o=e.length;o--;){if("bookmark"===(r=e[o]).attr("data-mce-type")&&!n.cleanup)R.from(r.firstChild).exists(function(e){return!cu(e.value)})?r.unwrap():r.remove()}}),t.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=$r.decode(t.value))}),t.addNodeFilter("script,style",function(e,t){for(var n,r,o,i=e.length,a=function(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};i--;)r=(n=e[i]).firstChild?n.firstChild.value:"","script"===t?((o=n.attr("type"))&&n.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===s.element_format&&0<r.length&&(n.firstChild.value="// <![CDATA[\n"+a(r)+"\n// ]]>")):"xhtml"===s.element_format&&0<r.length&&(n.firstChild.value="\x3c!--\n"+a(r)+"\n--\x3e")}),t.addNodeFilter("#comment",function(e){for(var t,n=e.length;n--;)t=e[n],s.preserve_cdata&&0===t.value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=c.decode(t.value.replace(/^\[CDATA\[|\]\]$/g,""))):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),t.addNodeFilter("xml:namespace,input",function(e,t){for(var n,r=e.length;r--;)7===(n=e[r]).type?n.remove():1===n.type&&("input"!==t||n.attr("type")||n.attr("type","text"))}),t.addAttributeFilter("data-mce-type",function(e){z(e,function(e){"format-caret"===e.attr("data-mce-type")&&(e.isEmpty(t.schema.getNonEmptyElements())?e.remove():e.unwrap())})}),t.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize,data-mce-placeholder",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)});return{schema:w,addNodeFilter:x.addNodeFilter,addAttributeFilter:x.addAttributeFilter,serialize:function(e,t){void 0===t&&(t={});var n,r,o,i,a,u,s,c,l,f,d,m,p=pe({format:"html"},t),g=kv(b,e,p),h=(n=C,r=g,i=lu((o=p).getInner?r.innerHTML:n.getOuterHTML(r)),o.selection||Or(Ne.fromDom(r))?i:hr.trim(i)),v=(a=x,u=h,d=(s=p).selection?pe({forced_root_block:!1},s):s,m=a.parse(u,d),(f=function(e){return e&&"br"===e.name})(c=m.lastChild)&&f(l=c.prev)&&(c.remove(),l.remove()),m);return"tree"===p.format?v:Rv(b,y,w,v,p)},addRules:function(e){w.addValidElements(e)},setRules:function(e){w.setValidElements(e)},addTempAttr:N(_v,x,e),getTempAttrs:function(){return e},getNodeFilters:x.getNodeFilters,getAttributeFilters:x.getAttributeFilters}},Av=function(e,t){var n=Tv(e,t);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs,getNodeFilters:n.getNodeFilters,getAttributeFilters:n.getAttributeFilters}};function Dv(u,s){var r={},n=function(e,r,o,t){var i,n;(i=new V.XMLHttpRequest).open("POST",s.url),i.withCredentials=s.credentials,i.upload.onprogress=function(e){t(e.loaded/e.total*100)},i.onerror=function(){o("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){var e,t,n;i.status<200||300<=i.status?o("HTTP Error: "+i.status):(e=JSON.parse(i.responseText))&&"string"==typeof e.location?r((t=s.basePath,n=e.location,t?t.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):o("Invalid JSON: "+i.responseText)},(n=new V.FormData).append("file",e.blob(),e.filename()),i.send(n)},c=function(e,t){return{url:t,blobInfo:e,status:!0}},l=function(e,t){return{url:"",blobInfo:e,status:!1,error:t}},f=function(e,t){hr.each(r[e],function(e){e(t)}),delete r[e]},o=function(e,n){return e=hr.grep(e,function(e){return!u.isUploaded(e.blobUri())}),Mn.all(hr.map(e,function(e){return u.isPending(e.blobUri())?(t=e.blobUri(),new Mn(function(e){r[t]=r[t]||[],r[t].push(e)})):(o=e,i=s.handler,a=n,u.markPending(o.blobUri()),new Mn(function(t){var n;try{var r=function(){n&&n.close()};i(o,function(e){r(),u.markUploaded(o.blobUri(),e),f(o.blobUri(),c(o,e)),t(c(o,e))},function(e){r(),u.removeFailed(o.blobUri()),f(o.blobUri(),l(o,e)),t(l(o,e))},function(e){e<0||100<e||(n=n||a()).progressBar.value(e)})}catch(e){t(l(o,e.message))}}));var o,i,a,t}))};return!1===D(s.handler)&&(s.handler=n),{upload:function(e,t){return s.url||s.handler!==n?o(e,t):new Mn(function(e){e([])})}}}var Ov=0,Bv=function(e){return e+Ov+++(t=function(){return Math.round(4294967295*Math.random()).toString(36)},"s"+(new Date).getTime().toString(36)+t()+t()+t());var t},Pv=function(u){var n,o,e,t,r,i,s=(n=[],o=function(e){var t,n;if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");return t=e.id||Bv("blobid"),n=e.name||t,{id:x(t),name:x(n),filename:x(n+"."+({"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}[e.blob.type.toLowerCase()]||"dat")),blob:x(e.blob),base64:x(e.base64),blobUri:x(e.blobUri||V.URL.createObjectURL(e.blob)),uri:x(e.uri)}},{create:function(e,t,n,r){if(q(e))return o({id:e,name:r,blob:t,base64:n});if(E(e))return o(e);throw new Error("Unknown input type")},add:function(e){t(e.id())||n.push(e)},get:t=function(t){return e(function(e){return e.id()===t})},getByUri:function(t){return e(function(e){return e.blobUri()===t})},getByData:function(t,n){return e(function(e){return e.base64()===t&&e.blob().type===n})},findFirst:e=function(e){return K(n,e).getOrUndefined()},removeByUri:function(t){n=H(n,function(e){return e.blobUri()!==t||(V.URL.revokeObjectURL(e.blobUri()),!1)})},destroy:function(){z(n,function(e){V.URL.revokeObjectURL(e.blobUri())}),n=[]}}),a=function w(){var n={},r=function(e,t){return{status:e,resultUri:t}},t=function(e){return e in n};return{hasBlobUri:t,getResultUri:function(e){var t=n[e];return t?t.resultUri:null},isPending:function(e){return!!t(e)&&1===n[e].status},isUploaded:function(e){return!!t(e)&&2===n[e].status},markPending:function(e){n[e]=r(1,null)},markUploaded:function(e,t){n[e]=r(2,t)},removeFailed:function(e){delete n[e]},destroy:function(){n={}}}}(),c=[],l=function(t){return function(e){return u.selection?t(e):[]}},f=function(e,t,n){for(var r=0;-1!==(r=e.indexOf(t,r))&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1),-1!==r;);return e},d=function(e,t,n){return e=f(e,'src="'+t+'"','src="'+n+'"'),e=f(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')},m=function(t,n){z(u.undoManager.data,function(e){"fragmented"===e.type?e.fragments=U(e.fragments,function(e){return d(e,t,n)}):e.content=d(e.content,t,n)})},p=function(){return u.notificationManager.open({text:u.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})},g=function(e,t){var n,r=u.convertURL(t,"src");m(e.src,t),u.$(e).attr({src:u.getParam("images_reuse_filename",!1,"boolean")?(n=t)+(-1===n.indexOf("?")?"?":"&")+(new Date).getTime():t,"data-mce-src":r})},h=function(n){return r=r||Dv(a,{url:u.getParam("images_upload_url","","string"),basePath:u.getParam("images_upload_base_path","","string"),credentials:u.getParam("images_upload_credentials",!1,"boolean"),handler:u.getParam("images_upload_handler",null,"function")}),b().then(l(function(a){var e=U(a,function(e){return e.blobInfo});return r.upload(e,p).then(l(function(e){var t=U(e,function(e,t){var n,r,o=a[t].blobInfo,i=a[t].image;return e.status&&u.getParam("images_replace_blob_uris",!0,"boolean")?(s.removeByUri(i.src),g(i,e.url)):e.error&&(n=u,r=e.error,ih(n,ka.translate(["Failed to upload image: {0}",r]))),{element:i,status:e.status,uploadUri:e.url,blobInfo:o}});return n&&n(t),t}))}))},v=function(e){if(qs(u))return h(e)},y=function(t){return!1!==G(c,function(e){return e(t)})&&(0!==t.getAttribute("src").indexOf("data:")||u.getParam("images_dataimg_filter",x(!0),"function")(t))},b=function(){return(i=i||gv(a,s)).findAll(u.getBody(),y).then(l(function(e){return e=H(e,function(e){return"string"!=typeof e||(ih(u,e),!1)}),z(e,function(e){m(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),e}))},C=function(e){return e.replace(/src="(blob:[^"]+)"/g,function(e,n){var t=a.getResultUri(n);if(t)return'src="'+t+'"';var r=s.getByUri(n);return(r=r||W(u.editorManager.get(),function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)},null))?'src="data:'+r.blob().type+";base64,"+r.base64()+'"':e})};return u.on("SetContent",function(){(qs(u)?v:b)()}),u.on("RawSaveContent",function(e){e.content=C(e.content)}),u.on("GetContent",function(e){e.source_view||"raw"===e.format||(e.content=C(e.content))}),u.on("PostRender",function(){u.parser.addNodeFilter("img",function(e){z(e,function(e){var t=e.attr("src");if(!s.getByUri(t)){var n=a.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:s,addFilter:function(e){c.push(e)},uploadImages:h,uploadImagesAuto:v,scanForImages:b,destroy:function(){s.destroy(),a.destroy(),i=r=null}}},Lv=function(r,e,t,n){var o=ne(t.get()),i={},a={},u=H(El(r.dom,e),function(e){return 1===e.nodeType&&!e.getAttribute("data-mce-bogus")});oe(n,function(e,n){hr.each(u,function(t){return r.formatter.matchNode(t,n,{},e.similar)?(-1===o.indexOf(n)&&(z(e.callbacks,function(e){e(!0,{node:t,format:n,parents:u})}),i[n]=e.callbacks),a[n]=e.callbacks,!1):!$m(r,t,n)&&void 0})});var s=Iv(t.get(),a,e,u);t.set(pe(pe({},i),s))},Iv=function(e,n,r,o){return ce(e,function(e,t){return!!me(n,t)||(z(e,function(e){e(!1,{node:r,format:t,parents:o})}),!1)}).t},Mv=function(e,o,i,a,t){var n,r,u,s,c,l,f,d;return null===o.get()&&(r=e,u=xa({}),(n=o).set({}),r.on("NodeChange",function(e){Lv(r,e.element,u,n.get())})),c=i,l=a,f=t,d=(s=o).get(),z(c.split(","),function(e){d[e]||(d[e]={similar:f,callbacks:[]}),d[e].callbacks.push(l)}),s.set(d),{unbind:function(){return t=i,n=a,r=(e=o).get(),z(t.split(","),function(e){r[e].callbacks=H(r[e].callbacks,function(e){return e!==n}),0===r[e].callbacks.length&&delete r[e]}),void e.set(r);var e,t,n,r}}};function Fv(e){var r,t,n={},o=function(e,t){e&&("string"!=typeof e?hr.each(e,function(e,t){o(t,e)}):(k(t)||(t=[t]),hr.each(t,function(e){"undefined"==typeof e.deep&&(e.deep=!e.selector),"undefined"==typeof e.split&&(e.split=!e.selector||e.inline),"undefined"==typeof e.remove&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),n[e]=t))};return o((r=e.dom,t={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all",preserve_attributes:["class","style"]}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(n,e,t){hr.each(t,function(e,t){r.setAttrib(n,t,e)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]},hr.each("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){t[e]={block:e,remove:"all"}}),t)),o(e.settings.formats),{get:function(e){return e?n[e]:n},has:function(e){return me(n,e)},register:o,unregister:function(e){return e&&n[e]&&delete n[e],n}}}var Uv,zv,jv=hr.each,Hv=ga.DOM,Vv=function(e,t){var n,o,r,m=t&&t.schema||no({}),p=function(e){var t,n,r;return o="string"==typeof e?{name:e,classes:[],attrs:{}}:e,t=Hv.create(o.name),n=t,(r=o).classes.length&&Hv.addClass(n,r.classes.join(" ")),Hv.setAttribs(n,r.attrs),t},g=function(n,e,t){var r,o,i,a,u,s,c,l,f=0<e.length&&e[0],d=f&&f.name;if(u=d,s="string"!=typeof(a=n)?a.nodeName.toLowerCase():a,c=m.getElementRule(s),i=!(!(l=c&&c.parentsRequired)||!l.length)&&(u&&-1!==hr.inArray(l,u)?u:l[0]))d===i?(o=e[0],e=e.slice(1)):o=i;else if(f)o=e[0],e=e.slice(1);else if(!t)return n;return o&&(r=p(o)).appendChild(n),t&&(r||(r=Hv.create("div")).appendChild(n),hr.each(t,function(e){var t=p(e);r.insertBefore(t,n)})),g(r,e,o&&o.siblings)};return e&&e.length?(o=e[0],n=p(o),(r=Hv.create("div")).appendChild(g(n,e.slice(1),o.siblings)),r):""},qv=function(e){var t,a={classes:[],attrs:{}};return"*"!==(e=a.selector=hr.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,t,n,r,o){switch(t){case"#":a.attrs.id=n;break;case".":a.classes.push(n);break;case":":-1!==hr.inArray("checked disabled enabled read-only required".split(" "),n)&&(a.attrs[n]=n)}if("["===r){var i=o.match(/([\w\-]+)(?:\=\"([^\"]+))?/);i&&(a.attrs[i[1]]=i[2])}return""})),a.name=t||"div",a},$v=function(n,e){var t,r,o,i,a,u,s="";if(!1===(u=n.settings.preview_styles))return"";"string"!=typeof u&&(u="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");var c,l=function(e){return e.replace(/%(\w+)/g,"")};if("string"==typeof e){if(!(e=n.formatter.get(e)))return;e=e[0]}return"preview"in e&&!1===(u=e.preview)?"":(t=e.block||e.inline||"span",r=(i=(c=e.selector)&&"string"==typeof c?(c=(c=c.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),hr.map(c.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=hr.map(e.split(/(?:~\+|~|\+)/),qv),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]).length?(i[0].name||(i[0].name=t),t=e.selector,Vv(i,n)):Vv([t],n),o=Hv.select(t,r)[0]||r.firstChild,jv(e.styles,function(e,t){(e=l(e))&&Hv.setStyle(o,t,e)}),jv(e.attributes,function(e,t){(e=l(e))&&Hv.setAttrib(o,t,e)}),jv(e.classes,function(e){e=l(e),Hv.hasClass(o,e)||Hv.addClass(o,e)}),n.fire("PreviewFormats"),Hv.setStyles(r,{position:"absolute",left:-65535}),n.getBody().appendChild(r),a=Hv.getStyle(n.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,jv(u.split(" "),function(e){var t=Hv.getStyle(o,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=Hv.getStyle(n.getBody(),e,!0),"#ffffff"===Hv.toHex(t).toLowerCase())||"color"===e&&"#000000"===Hv.toHex(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===a)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*a+"px"}"border"===e&&t&&(s+="padding:0 2px;"),s+=e+":"+t+";"}}),n.fire("AfterPreviewFormats"),Hv.remove(r),s)},Wv=function(s){var e=Fv(s),t=xa(null);return function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])}(s),lp(s),{get:e.get,has:e.has,register:e.register,unregister:e.unregister,apply:function(e,t,n){var r,o,i;r=e,o=t,i=n,wg(s).formatter.apply(r,o,i)},remove:function(e,t,n,r){var o,i,a,u;o=e,i=t,a=n,u=r,wg(s).formatter.remove(o,i,a,u)},toggle:function(e,t,n){var r,o,i;r=e,o=t,i=n,wg(s).formatter.toggle(r,o,i)},match:N(Gm,s),matchAll:N(Jm,s),matchNode:N(Ym,s),canApply:N(Qm,s),formatChanged:N(Mv,s,t),getCssText:N($v,s)}},Kv=function(n,r,o){var i=xa(!1),a=function(e){dg(r,!1,o),r.add({},e)};n.on("init",function(){r.add()}),n.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(mg(r,o),r.beforeChange())}),n.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&a(e)}),n.on("ObjectResizeStart cut",function(){r.beforeChange()}),n.on("SaveContent ObjectResized blur",a),n.on("dragend",a),n.on("keyup",function(e){var t=e.keyCode;e.isDefaultPrevented()||((33<=t&&t<=36||37<=t&&t<=40||45===t||e.ctrlKey)&&(a(),n.nodeChanged()),46!==t&&8!==t||n.nodeChanged(),i.get()&&r.typing&&!1===lg(ag(n),r.data[0])&&(!1===n.isDirty()&&(n.setDirty(!0),n.fire("change",{level:r.data[0],lastLevel:null})),n.fire("TypingUndo"),i.set(!1),n.nodeChanged()))}),n.on("keydown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented())if(33<=t&&t<=36||37<=t&&t<=40||45===t)r.typing&&a(e);else{var n=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||20<t)||224===t||91===t||r.typing||n||(r.beforeChange(),dg(r,!0,o),r.add({},e),i.set(!0))}}),n.on("mousedown",function(e){r.typing&&a(e)});n.on("input",function(e){var t;e.inputType&&("insertReplacementText"===e.inputType||"insertText"===(t=e).inputType&&null===t.data)&&a(e)}),n.on("AddUndo Undo Redo ClearUndos",function(e){e.isDefaultPrevented()||n.nodeChanged()})},Xv=function(s){var e,c=xa(R.none()),l=xa(0),f=xa(0),d={data:[],typing:!1,beforeChange:function(){var e,t;e=l,t=c,wg(s).undoManager.beforeChange(e,t)},add:function(e,t){return n=d,r=f,o=l,i=c,a=e,u=t,wg(s).undoManager.addUndoLevel(n,r,o,i,a,u);var n,r,o,i,a,u},undo:function(){return e=d,t=l,n=f,wg(s).undoManager.undo(e,t,n);var e,t,n},redo:function(){return e=s,t=f,n=d.data,wg(e).undoManager.redo(t,n);var e,t,n},clear:function(){var e,t;e=d,t=f,wg(s).undoManager.clear(e,t)},reset:function(){var e;e=d,wg(s).undoManager.reset(e)},hasUndo:function(){return e=d,t=f,wg(s).undoManager.hasUndo(e,t);var e,t},hasRedo:function(){return e=d,t=f,wg(s).undoManager.hasRedo(e,t);var e,t},transact:function(e){return t=d,n=l,r=e,wg(s).undoManager.transact(t,n,r);var t,n,r},ignore:function(e){var t,n;t=l,n=e,wg(s).undoManager.ignore(t,n)},extra:function(e,t){var n,r,o,i;n=d,r=f,o=e,i=t,wg(s).undoManager.extra(n,r,o,i)}};return yg(s)||Kv(s,d,l),(e=s).addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo"),d},Yv=[9,27,Zh.HOME,Zh.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,Zh.DOWN,Zh.UP,Zh.LEFT,Zh.RIGHT].concat(rr.browser.isFirefox()?[224]:[]),Gv="data-mce-placeholder",Jv=function(e){return"keydown"===e.type||"keyup"===e.type},Qv=function(e){var t=e.keyCode;return t===Zh.BACKSPACE||t===Zh.DELETE},Zv=function(a){var e,u=a.dom,s=Hs(a),c=(e=a).getParam("placeholder",Us.getAttrib(e.getElement(),"placeholder"),"string"),l=function(e,t){if(!function(e){if(Jv(e)){var t=e.keyCode;return!Qv(e)&&(Zh.metaKeyPressed(e)||e.altKey||112<=t&&t<=123||M(Yv,t))}return!1}(e)){var n,r,o=a.getBody(),i=!(Jv(n=e)&&!(Qv(n)||"keyup"===n.type&&229===n.keyCode))&&function(e,t,n){if(Gf(Ne.fromDom(t),!1)){var r=""===n,o=t.firstElementChild;return!o||!e.getStyle(t.firstElementChild,"padding-left")&&!e.getStyle(t.firstElementChild,"padding-right")&&(r?!e.isBlock(o):n===o.nodeName.toLowerCase())}return!1}(u,o,s);""!==u.getAttrib(o,Gv)===i&&!t||(u.setAttrib(o,Gv,i?c:null),u.setAttrib(o,"aria-placeholder",i?c:null),r=i,a.fire("PlaceholderToggle",{state:r}),a.on(i?"keydown":"keyup",l),a.off(i?"keyup":"keydown",l))}};c&&a.on("init",function(e){l(e,!0),a.on("change SetContent ExecCommand",l),a.on("paste",function(e){return Xn.setEditorTimeout(a,function(){return l(e)})}),a.on("remove",function(){var e=a.getBody();u.setAttrib(e,Gv,null),u.setAttrib(e,"aria-placeholder",null)})})},ey=function(e){return e.touches===undefined||1!==e.touches.length?R.none():R.some(e.touches[0])},ty=function(a){var u=xa(R.none()),s=xa(!1),r=Aa(function(e){a.fire("longpress",pe(pe({},e),{type:"longpress"})),s.set(!0)},400);a.on("touchstart",function(n){ey(n).each(function(e){r.cancel();var t={x:x(e.clientX),y:x(e.clientY),target:x(n.target)};r.throttle(n),s.set(!1),u.set(R.some(t))})},!0),a.on("touchmove",function(e){r.cancel(),ey(e).each(function(i){u.get().each(function(e){var t,n,r,o;t=i,n=e,r=Math.abs(t.clientX-n.x()),o=Math.abs(t.clientY-n.y()),(5<r||5<o)&&(u.set(R.none()),s.set(!1),a.fire("longpresscancel"))})})},!0),a.on("touchend touchcancel",function(t){r.cancel(),"touchcancel"!==t.type&&u.get().filter(function(e){return e.target().isEqualNode(t.target)}).each(function(){s.get()?t.preventDefault():a.fire("tap",pe(pe({},t),{type:"tap"}))})},!0)},ny=function(e,t){return e.hasOwnProperty(t.nodeName)},ry=function(e,t){if(Zt(t)){if(0===t.nodeValue.length)return!0;if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||ny(e,t.nextSibling)))return!0}return!1},oy=function(e){var t,n,r,o,i,a,u,s,c,l,f=e.dom,d=e.selection,m=e.schema,p=m.getBlockElements(),g=d.getStart(),h=e.getBody(),v=Hs(e);if(g&&$t(g)&&v&&(l=h.nodeName.toLowerCase(),m.isValidChild(l,v.toLowerCase())&&(y=p,b=h,C=g,!F(td(Ne.fromDom(C),Ne.fromDom(b)),function(e){return ny(y,e.dom())})))){var y,b,C,w,x;for(n=(t=d.getRng()).startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,c=Pm(e),g=h.firstChild;g;)if(w=p,Zt(x=g)||$t(x)&&!ny(w,x)&&!ll(x)){if(ry(p,g)){g=(u=g).nextSibling,f.remove(u);continue}a||(a=f.create(v,Vs(e)),g.parentNode.insertBefore(a,g),s=!0),g=(u=g).nextSibling,a.appendChild(u)}else a=null,g=g.nextSibling;s&&c&&(t.setStart(n,r),t.setEnd(o,i),d.setRng(t),e.nodeChanged())}},iy=function(e,t,n){var r=e?1:-1;return t.setRng(ms(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},ay=function(e,t){var n=t.selection.getRng(),r=e?ms.fromRangeEnd(n):ms.fromRangeStart(n);return!!D(t.selection.getSel().modify)&&(e&&vu(r)?iy(!0,t.selection,r):!(e||!yu(r))&&iy(!1,t.selection,r))},uy=Zt,sy=function(e){return uy(e)&&e.data[0]===su},cy=function(e){return uy(e)&&e.data[e.data.length-1]===su},ly=function(e){return e.ownerDocument.createTextNode(su)},fy=function(e,t){return(e?function(e){if(uy(e.previousSibling))return cy(e.previousSibling)||e.previousSibling.appendData(su),e.previousSibling;if(uy(e))return sy(e)||e.insertData(0,su),e;var t=ly(e);return e.parentNode.insertBefore(t,e),t}:function(e){if(uy(e.nextSibling))return sy(e.nextSibling)||e.nextSibling.insertData(0,su),e.nextSibling;if(uy(e))return cy(e)||e.appendData(su),e;var t=ly(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t})(t)},dy=N(fy,!0),my=N(fy,!1),py=function(e,t){return Zt(e.container())?fy(t,e.container()):fy(t,e.getNode())},gy=function(e,t){var n=t.get();return n&&e.container()===n&&pu(n)},hy=function(n,e){return e.fold(function(e){rc(n.get());var t=dy(e);return n.set(t),R.some(ms(t,t.length-1))},function(e){return Zc(e).map(function(e){if(gy(e,n))return ms(n.get(),1);rc(n.get());var t=py(e,!0);return n.set(t),ms(t,1)})},function(e){return el(e).map(function(e){if(gy(e,n))return ms(n.get(),n.get().length-1);rc(n.get());var t=py(e,!1);return n.set(t),ms(t,t.length-1)})},function(e){rc(n.get());var t=my(e);return n.set(t),R.some(ms(t,1))})},vy=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,yy=function(e,t){return ot(Ne.fromDom(t),e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string"))},by=function(e){return"rtl"===ga.DOM.getStyle(e,"direction",!0)||(t=e.textContent,vy.test(t));var t},Cy=function(e,t,n){var r,o,i,a=(r=e,o=t,i=n,H(ga.DOM.getParents(i.container(),"*",o),r));return R.from(a[a.length-1])},wy=function(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?pu(n)?Zt(n.nextSibling)?ms(n.nextSibling,0):ms.after(n):vu(t)?ms(n,r+1):t:pu(n)?Zt(n.previousSibling)?ms(n.previousSibling,n.previousSibling.data.length):ms.before(n):yu(t)?ms(n,r-1):t},xy=N(wy,!0),Sy=N(wy,!1),Ny=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].apply(null,t);if(r.isSome())return r}return R.none()},Ey=hd([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),ky=function(e,t){var n=yc(t,e);return n||e},_y=function(e,t,n){var r=xy(n),o=ky(t,r.container());return Cy(e,o,r).fold(function(){return Jc(o,r).bind(N(Cy,e,o)).map(function(e){return Ey.before(e)})},R.none)},Ry=function(e,t){return null===Fs(e,t)},Ty=function(e,t,n){return Cy(e,t,n).filter(N(Ry,t))},Ay=function(e,t,n){var r=Sy(n);return Ty(e,t,r).bind(function(e){return Qc(e,r).isNone()?R.some(Ey.start(e)):R.none()})},Dy=function(e,t,n){var r=xy(n);return Ty(e,t,r).bind(function(e){return Jc(e,r).isNone()?R.some(Ey.end(e)):R.none()})},Oy=function(e,t,n){var r=Sy(n),o=ky(t,r.container());return Cy(e,o,r).fold(function(){return Qc(o,r).bind(N(Cy,e,o)).map(function(e){return Ey.after(e)})},R.none)},By=function(e){return!1===by(Ly(e))},Py=function(e,t,n){return Ny([_y,Ay,Dy,Oy],[e,t,n]).filter(By)},Ly=function(e){return e.fold(d,d,d,d)},Iy=function(e){return e.fold(x("before"),x("start"),x("end"),x("after"))},My=function(e){return e.fold(Ey.before,Ey.before,Ey.after,Ey.after)},Fy=function(e){return e.fold(Ey.start,Ey.start,Ey.end,Ey.end)},Uy=function(a,e,u,t,n,s){return $u(Cy(e,u,t),Cy(e,u,n),function(e,t){return e!==t&&(r=t,o=yc(e,n=u),i=yc(r,n),o&&o===i)?Ey.after(a?e:t):s;var n,r,o,i}).getOr(s)},zy=function(e,r){return e.fold(x(!0),function(e){return n=r,!(Iy(t=e)===Iy(n)&&Ly(t)===Ly(n));var t,n})},jy=function(e,t){return e?t.fold(a(R.some,Ey.start),R.none,a(R.some,Ey.after),R.none):t.fold(R.none,a(R.some,Ey.before),R.none,a(R.some,Ey.end))},Hy=function(e,a,u,s){var t=wy(e,s),c=Py(a,u,t);return Py(a,u,t).bind(N(jy,e)).orThunk(function(){return n=a,r=u,o=c,i=wy(t=e,s),Kc(t,r,i).map(N(wy,t)).fold(function(){return o.map(My)},function(e){return Py(n,r,e).map(N(Uy,t,n,r,i,e)).filter(N(zy,o))}).filter(By);var t,n,r,o,i})},Vy=(N(Hy,!1),N(Hy,!0),function(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)}),qy=function(e){return!1!==e.settings.inline_boundaries},$y=function(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},Wy=function(t,e,n){return hy(e,n).map(function(e){return Vy(t,e),n})},Ky=function(e,t){if(e.selection.isCollapsed()&&!0!==e.composing&&t.get()){var n=ms.fromRangeStart(e.selection.getRng());ms.isTextPosition(n)&&!1===(vu(r=n)||yu(r))&&(Vy(e,nc(t.get(),n)),t.set(null))}var r},Xy=function(a,u,s){return function(){return!!qy(a)&&(n=u,e=s,r=(t=a).getBody(),o=ms.fromRangeStart(t.selection.getRng()),i=N(yy,t),Hy(e,i,r,o).bind(function(e){return Wy(t,n,e)}).isSome());var t,n,e,r,o,i}},Yy=function(e,t,n){return function(){return!!qy(t)&&ay(e,t)}},Gy=function(u){var s=xa(null),c=N(yy,u);return u.on("NodeChange",function(e){var t,n,r,o,i,a;!qy(u)||rr.browser.isIE()&&e.initial||(t=c,n=u.dom,r=e.parents,o=U(Ua(Ne.fromDom(n.getRoot()),'*[data-mce-selected="inline-boundary"]'),function(e){return e.dom()}),i=H(o,t),a=H(r,t),z(Q(i,a),N($y,!1)),z(Q(a,i),N($y,!0)),Ky(u,s),function(n,r,o,e){if(r.selection.isCollapsed()){var t=H(e,n);z(t,function(e){var t=ms.fromRangeStart(r.selection.getRng());Py(n,r.getBody(),t).bind(function(e){return Wy(r,o,e)})})}}(c,u,s,e.parents))}),s},Jy=N(Yy,!0),Qy=N(Yy,!1),Zy=function(e){return W(e,function(e,t){return e.concat(function(t){var e=function(e){return U(e,function(e){return(e=Lu(e)).node=t,e})};if($t(t))return e(t.getClientRects());if(Zt(t)){var n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}}(t))},[])};(zv=Uv=Uv||{})[zv.Up=-1]="Up",zv[zv.Down=1]="Down";var eb,tb,nb=function(o,i,a,e,u,t){var n,s,c=0,l=[],r=function(e){var t,n,r;for(r=Zy([e]),-1===o&&(r=r.reverse()),t=0;t<r.length;t++)if(n=r[t],!a(n,s)){if(0<l.length&&i(n,fr(l))&&c++,n.line=c,u(n))return!0;l.push(n)}};return(s=fr(t.getClientRects()))&&(r(n=t.getNode()),function(e,t,n,r){for(;r=vc(r,e,Bu,t);)if(n(r))return}(o,e,r,n)),l},rb=N(nb,Uv.Up,Fu,Uu),ob=N(nb,Uv.Down,Uu,Fu),ib=function(n){return function(e){return t=n,e.line>t;var t}},ab=function(n){return function(e){return t=n,e.line===t;var t}},ub=an,sb=vc,cb=function(e,t){return Math.abs(e.left-t)},lb=function(e,t){return Math.abs(e.right-t)},fb=function(e,t){return e>=t.left&&e<=t.right},db=function(e,o){return cr(e,function(e,t){var n,r;return n=Math.min(cb(e,o),lb(e,o)),r=Math.min(cb(t,o),lb(t,o)),fb(o,t)||!fb(o,e)&&(r===n&&ub(t.node)||r<n)?t:e})},mb=function(e,t,n,r){for(;r=sb(r,e,Bu,t);)if(n(r))return},pb=function(e,t,n){var r,o,i,a,u,s,c,l=Zy(H(te(e.getElementsByTagName("*")),cc)),f=H(l,function(e){return n>=e.top&&n<=e.bottom});return(r=(r=db(f,t))&&db((a=e,c=function(t,e){var n;return n=H(Zy([e]),function(e){return!t(e,u)}),s=s.concat(n),0===n.length},(s=[]).push(u=r),mb(Uv.Up,a,N(c,Fu),u.node),mb(Uv.Down,a,N(c,Uu),u.node),s),t))&&cc(r.node)?(i=t,{node:(o=r).node,before:cb(o,i)<lb(o,i)}):null},gb=on,hb=an,vb=function(e,t,n,r,o){return t._selectionOverrides.showCaret(e,n,r,o)},yb=function(e,t){var n,r;return e.fire("BeforeObjectSelected",{target:t}).isDefaultPrevented()?null:((r=(n=t).ownerDocument.createRange()).selectNode(n),r)},bb=function(e,t,n){var r=Ec(1,e.getBody(),t),o=ms.fromRangeStart(r),i=o.getNode();if(hb(i))return vb(1,e,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(hb(a))return vb(1,e,a,!1,!1);var u=e.dom.getParent(o.getNode(),function(e){return hb(e)||gb(e)});return hb(u)?vb(1,e,u,!1,n):null},Cb=function(e,t,n){if(!t||!t.collapsed)return t;var r=bb(e,t,n);return r||t};(tb=eb=eb||{})[tb.Br=0]="Br",tb[tb.Block=1]="Block",tb[tb.Wrap=2]="Wrap",tb[tb.Eol=3]="Eol";var wb=function(e,t){return e===fs.Backwards?J(t):t},xb=function(e,t,n,r){for(var o,i,a,u,s,c,l=Hc(n),f=r,d=[];f&&(s=l,c=f,o=t===fs.Forwards?s.next(c):s.prev(c));){if(rn(o.getNode(!1)))return t===fs.Forwards?{positions:wb(t,d).concat([o]),breakType:eb.Br,breakAt:R.some(o)}:{positions:wb(t,d),breakType:eb.Br,breakAt:R.some(o)};if(o.isVisible()){if(e(f,o)){var m=(i=t,a=f,rn((u=o).getNode(i===fs.Forwards))?eb.Br:!1===bc(a,u)?eb.Block:eb.Wrap);return{positions:wb(t,d),breakType:m,breakAt:R.some(o)}}d.push(o),f=o}else f=o}return{positions:wb(t,d),breakType:eb.Eol,breakAt:R.none()}},Sb=function(n,r,o,e){return r(o,e).breakAt.map(function(e){var t=r(o,e).positions;return n===fs.Backwards?t.concat(e):[e].concat(t)}).getOr([])},Nb=function(e,i){return W(e,function(e,o){return e.fold(function(){return R.some(o)},function(r){return $u(Z(r.getClientRects()),Z(o.getClientRects()),function(e,t){var n=Math.abs(i-e.left);return Math.abs(i-t.left)<=n?o:r}).or(e)})},R.none())},Eb=function(t,e){return Z(e.getClientRects()).bind(function(e){return Nb(t,e.left)})},kb=N(xb,ls.isAbove,-1),_b=N(xb,ls.isBelow,1),Rb=N(Sb,-1,kb),Tb=N(Sb,1,_b),Ab=an,Db=ju,Ob=function(e,t,n,r){var o=e===fs.Forwards,i=o?Vf:qf;if(!r.collapsed){var a=Db(r);if(Ab(a))return vb(e,t,a,e===fs.Backwards,!0)}var u=mu(r.startContainer),s=_c(e,t.getBody(),r);if(i(s))return yb(t,s.getNode(!o));var c=wy(o,n(s));if(!c)return u?r:null;if(i(c))return vb(e,t,c.getNode(!o),o,!0);var l=n(c);return l&&i(l)&&Ac(c,l)?vb(e,t,l.getNode(!o),o,!0):u?Cb(t,c.toRange(),!0):null},Bb=function(e,t,n,r){var o,i,a,u,s,c,l,f,d;if(d=Db(r),o=_c(e,t.getBody(),r),i=n(t.getBody(),ib(1),o),a=H(i,ab(1)),s=fr(o.getClientRects()),(Vf(o)||jf(o))&&(d=o.getNode()),(qf(o)||Hf(o))&&(d=o.getNode(!0)),!s)return null;if(c=s.left,(u=db(a,c))&&Ab(u.node))return l=Math.abs(c-u.left),f=Math.abs(c-u.right),vb(e,t,u.node,l<f,!0);if(d){var m=function(e,t,n,r){var o,i,a,u,s,c,l=Hc(t),f=[],d=0,m=function(e){return fr(e.getClientRects())};c=m(u=1===e?(o=l.next,i=Uu,a=Fu,ms.after(r)):(o=l.prev,i=Fu,a=Uu,ms.before(r)));do{if(u.isVisible()&&!a(s=m(u),c)){if(0<f.length&&i(s,fr(f))&&d++,(s=Lu(s)).position=u,s.line=d,n(s))return f;f.push(s)}}while(u=o(u));return f}(e,t.getBody(),ib(1),d);if(u=db(H(m,ab(1)),c))return Cb(t,u.position.toRange(),!0);if(u=fr(H(m,ab(0))))return Cb(t,u.position.toRange(),!0)}},Pb=function(e,t,n){var r,o,i,a,u=Hc(e.getBody()),s=N(Tc,u.next),c=N(Tc,u.prev);if(n.collapsed&&e.settings.forced_root_block){if(!(r=e.dom.getParent(n.startContainer,"PRE")))return;(1===t?s:c)(ms.fromRangeStart(n))||(a=(i=e).dom.create(Hs(i)),(!rr.ie||11<=rr.ie)&&(a.innerHTML='<br data-mce-bogus="1">'),o=a,1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}},Lb=function(l,f){return function(){var e,t,n,r,o,i,a,u,s,c=(t=f,r=Hc((e=l).getBody()),o=N(Tc,r.next),i=N(Tc,r.prev),a=t?fs.Forwards:fs.Backwards,u=t?o:i,s=e.selection.getRng(),(n=Ob(a,e,u,s))?n:(n=Pb(e,a,s))||null);return!!c&&(l.selection.setRng(c),!0)}},Ib=function(u,s){return function(){var e,t,n,r,o,i,a=(r=(t=s)?1:-1,o=t?ob:rb,i=(e=u).selection.getRng(),(n=Bb(r,e,o,i))?n:(n=Pb(e,r,i))||null);return!!a&&(u.selection.setRng(a),!0)}},Mb=function(r,o){return function(){var t,e=o?ms.fromRangeEnd(r.selection.getRng()):ms.fromRangeStart(r.selection.getRng()),n=(o?_b:kb)(r.getBody(),e);return(o?ee:Z)(n.positions).filter((t=o,function(e){return(t?qf:Vf)(e)})).fold(x(!1),function(e){return r.selection.setRng(e.toRange()),!0})}},Fb=function(o,e){return Y(e,function(e){var t,n,r=(t=Lu(e.getBoundingClientRect()),n=-1,{left:t.left-n,top:t.top-n,right:t.right+2*n,bottom:t.bottom+2*n,width:t.width+n,height:t.height+n});return[{x:r.left,y:o(r),cell:e},{x:r.right,y:o(r),cell:e}]})},Ub=function(e,t,n,r,o){var i,a,u=Ua(Ne.fromDom(n),"td,th,caption").map(function(e){return e.dom()}),s=H(Fb(e,u),function(e){return t(e,o)});return i=r,a=o,W(s,function(e,r){return e.fold(function(){return R.some(r)},function(e){var t=Math.sqrt(Math.abs(e.x-i)+Math.abs(e.y-a)),n=Math.sqrt(Math.abs(r.x-i)+Math.abs(r.y-a));return R.some(n<t?r:e)})},R.none()).map(function(e){return e.cell})},zb=N(Ub,function(e){return e.bottom},function(e,t){return e.y<t}),jb=N(Ub,function(e){return e.top},function(e,t){return e.y>t}),Hb=function(t,n){return Z(n.getClientRects()).bind(function(e){return zb(t,e.left,e.top)}).bind(function(e){return Eb(el(t=e).map(function(e){return kb(t,e).positions.concat(e)}).getOr([]),n);var t})},Vb=function(t,n){return ee(n.getClientRects()).bind(function(e){return jb(t,e.left,e.top)}).bind(function(e){return Eb(Zc(t=e).map(function(e){return[e].concat(_b(t,e).positions)}).getOr([]),n);var t})},qb=function(e,t){e.selection.setRng(t),Dh(e,t)},$b=function(e,t,n){var r,o,i,a,u=e(t,n);return(a=u).breakType===eb.Wrap&&0===a.positions.length||!rn(n.getNode())&&((i=u).breakType===eb.Br&&1===i.positions.length)?(r=e,o=t,!u.breakAt.map(function(e){return r(o,e).breakAt.isSome()}).getOr(!1)):u.breakAt.isNone()},Wb=N($b,kb),Kb=N($b,_b),Xb=function(e,t,n,r){var o,i,a,u,s=e.selection.getRng(),c=t?1:-1;if(sc()&&(o=t,i=s,a=n,u=ms.fromRangeStart(i),Gc(!o,a).map(function(e){return e.isEqual(u)}).getOr(!1))){var l=vb(c,e,n,!t,!0);return qb(e,l),!0}return!1},Yb=function(e,t){var n=t.getNode(e);return $t(n)&&"TABLE"===n.nodeName?R.some(n):R.none()},Gb=function(u,s,c){var e=Yb(!!s,c),t=!1===s;e.fold(function(){return qb(u,c.toRange())},function(a){return Gc(t,u.getBody()).filter(function(e){return e.isEqual(c)}).fold(function(){return qb(u,c.toRange())},function(e){return n=s,o=a,t=c,void((i=Hs(r=u))?r.undoManager.transact(function(){var e=Ne.fromTag(i);ln(e,Vs(r)),St(e,Ne.fromTag("br")),(n?wt:Ct)(Ne.fromDom(o),e);var t=r.dom.createRng();t.setStart(e.dom(),0),t.setEnd(e.dom(),0),qb(r,t)}):qb(r,t.toRange()));var n,r,o,t,i})})},Jb=function(e,t,n,r){var o,i,a,u,s,c,l=e.selection.getRng(),f=ms.fromRangeStart(l),d=e.getBody();if(!t&&Wb(r,f)){var m=(u=d,Hb(s=n,c=f).orThunk(function(){return Z(c.getClientRects()).bind(function(e){return Nb(Rb(u,ms.before(s)),e.left)})}).getOr(ms.before(s)));return Gb(e,t,m),!0}if(t&&Kb(r,f)){m=(o=d,Vb(i=n,a=f).orThunk(function(){return Z(a.getClientRects()).bind(function(e){return Nb(Tb(o,ms.after(i)),e.left)})}).getOr(ms.after(i)));return Gb(e,t,m),!0}return!1},Qb=function(t,n){return function(){return R.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(e){return R.from(t.dom.getParent(e,"table")).map(function(e){return Xb(t,n,e)})}).getOr(!1)}},Zb=function(n,r){return function(){return R.from(n.dom.getParent(n.selection.getNode(),"td,th")).bind(function(t){return R.from(n.dom.getParent(t,"table")).map(function(e){return Jb(n,r,e,t)})}).getOr(!1)}},eC=function(e){return M(["figcaption"],Rt(e))},tC=function(e){var t=V.document.createRange();return t.setStartBefore(e.dom()),t.setEndBefore(e.dom()),t},nC=function(e,t,n){(n?St:xt)(e,t)},rC=function(e,t,n,r){return""===t?(l=e,f=r,d=Ne.fromTag("br"),nC(l,d,f),tC(d)):(o=e,i=r,a=t,u=n,s=Ne.fromTag(a),c=Ne.fromTag("br"),ln(s,u),St(s,c),nC(o,s,i),tC(c));var o,i,a,u,s,c,l,f,d},oC=function(e,t,n){return t?(o=e.dom(),_b(o,n).breakAt.isNone()):(r=e.dom(),kb(r,n).breakAt.isNone());var r,o},iC=function(t,n){var e,r,o=Ne.fromDom(t.getBody()),i=ms.fromRangeStart(t.selection.getRng()),a=Hs(t),u=Vs(t);return e=i,r=N(at,o),Va(Ne.fromDom(e.container()),Sr,r).filter(eC).exists(function(){if(oC(o,n,i)){var e=rC(o,a,u,n);return t.selection.setRng(e),!0}return!1})},aC=function(e,t){return function(){return!!e.selection.isCollapsed()&&iC(e,t)}},uC=function(e,r){return Y(U(e,function(e){return pe({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:f},e)}),function(e){return t=e,(n=r).keyCode===t.keyCode&&n.shiftKey===t.shiftKey&&n.altKey===t.altKey&&n.ctrlKey===t.ctrlKey&&n.metaKey===t.metaKey?[e]:[];var t,n})},sC=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(null,t)}},cC=function(e,t){return K(uC(e,t),function(e){return e.action()})},lC=function(i,a){i.on("keydown",function(e){var t,n,r,o;!1===e.isDefaultPrevented()&&(t=i,n=a,r=e,o=nt().os,cC([{keyCode:Zh.RIGHT,action:Lb(t,!0)},{keyCode:Zh.LEFT,action:Lb(t,!1)},{keyCode:Zh.UP,action:Ib(t,!1)},{keyCode:Zh.DOWN,action:Ib(t,!0)},{keyCode:Zh.RIGHT,action:Qb(t,!0)},{keyCode:Zh.LEFT,action:Qb(t,!1)},{keyCode:Zh.UP,action:Zb(t,!1)},{keyCode:Zh.DOWN,action:Zb(t,!0)},{keyCode:Zh.RIGHT,action:Xy(t,n,!0)},{keyCode:Zh.LEFT,action:Xy(t,n,!1)},{keyCode:Zh.RIGHT,ctrlKey:!o.isOSX(),altKey:o.isOSX(),action:Jy(t,n)},{keyCode:Zh.LEFT,ctrlKey:!o.isOSX(),altKey:o.isOSX(),action:Qy(t,n)},{keyCode:Zh.UP,action:aC(t,!1)},{keyCode:Zh.DOWN,action:aC(t,!0)}],r).each(function(e){r.preventDefault()}))})},fC=function(e,t){return st(e,t)?Va(t,function(e){return kr(e)||Rr(e)},(n=e,function(e){return at(n,Ne.fromDom(e.dom().parentNode))})):R.none();var n},dC=function(e){var t,n,r;e.dom.isEmpty(e.getBody())&&(e.setContent(""),n=(t=e).getBody(),r=n.firstChild&&t.dom.isBlock(n.firstChild)?n.firstChild:n,t.selection.setCursorLocation(r,0))},mC=function(e,t){return{from:e,to:t}},pC=function(e,t){var n=Ne.fromDom(e),r=Ne.fromDom(t.container());return fC(n,r).map(function(e){return{block:e,position:t}})},gC=function(o,i,e){var t=pC(o,ms.fromRangeStart(e)),n=t.bind(function(e){return Kc(i,o,e.position).bind(function(e){return pC(o,e).map(function(e){return t=o,n=i,rn((r=e).position.getNode())&&!1===Gf(r.block)?Gc(!1,r.block.dom()).bind(function(e){return e.isEqual(r.position)?Kc(n,t,e).bind(function(e){return pC(t,e)}):R.some(r)}).getOr(r):r;var t,n,r})})});return $u(t,n,mC).filter(function(e){return!1===at((r=e).from.block,r.to.block)&&ft((n=e).from.block).bind(function(t){return ft(n.to.block).filter(function(e){return at(t,e)})}).isSome()&&(!1===an((t=e).from.block.dom())&&!1===an(t.to.block.dom()));var t,n,r})},hC=function(e){var t,n=(t=ht(e),X(t,Sr).fold(function(){return t},function(e){return t.slice(0,e)}));return z(n,kt),n},vC=function(e,t){var n=nd(t,e);return K(n.reverse(),function(e){return Gf(e)}).each(kt)},yC=function(e,t,n,r){if(Gf(n))return Qf(n),Zc(n.dom());0===H(pt(r),function(e){return!Gf(e)}).length&&Gf(t)&&Ct(r,Ne.fromTag("br"));var o=Qc(n.dom(),ms.before(r.dom()));return z(hC(t),function(e){Ct(r,e)}),vC(e,t),o},bC=function(e,t,n){if(Gf(n))return kt(n),Gf(t)&&Qf(t),Zc(t.dom());var r=el(n.dom());return z(hC(t),function(e){St(n,e)}),vC(e,t),r},CC=function(e,t){return st(t,e)?(n=nd(e,t),R.from(n[n.length-1])):R.none();var n},wC=function(e,t){Gc(e,t.dom()).map(function(e){return e.getNode()}).map(Ne.fromDom).filter(Er).each(kt)},xC=function(e,t,n){return wC(!0,t),wC(!1,n),CC(t,n).fold(N(bC,e,t,n),N(yC,e,t,n))},SC=function(e,t,n,r){return t?xC(e,r,n):xC(e,n,r)},NC=function(t,n){var e,r,o,i=Ne.fromDom(t.getBody()),a=(e=i.dom(),r=n,((o=t.selection.getRng()).collapsed?gC(e,r,o):R.none()).bind(function(e){return SC(i,n,e.from.block,e.to.block)}));return a.each(function(e){t.selection.setRng(e.toRange())}),a.isSome()},EC=function(e,t){var n=Ne.fromDom(t),r=N(at,e);return Ha(n,Dr,r).isSome()},kC=function(e,t){var n,r,o=Qc(e.dom(),ms.fromRangeStart(t)).isNone(),i=Jc(e.dom(),ms.fromRangeEnd(t)).isNone();return!(EC(n=e,(r=t).startContainer)||EC(n,r.endContainer))&&o&&i},_C=function(e){var n,r,o,t,i=Ne.fromDom(e.getBody()),a=e.selection.getRng();return kC(i,a)?((t=e).setContent(""),t.selection.setCursorLocation(),!0):(n=i,r=e.selection,o=r.getRng(),$u(fC(n,Ne.fromDom(o.startContainer)),fC(n,Ne.fromDom(o.endContainer)),function(e,t){return!1===at(e,t)&&(o.deleteContents(),SC(n,!0,e,t).each(function(e){r.setRng(e.toRange())}),!0)}).getOr(!1))},RC=function(e,t){return!e.selection.isCollapsed()&&_C(e)},TC=function(e){return Rc(e).exists(Er)},AC=function(e,t,n){var r=H(nd(Ne.fromDom(n.container()),t),Sr),o=Z(r).getOr(t);return Kc(e,o.dom(),n).filter(TC)},DC=function(e,t){return Rc(t).exists(Er)||AC(!0,e,t).isSome()},OC=function(e,t){return n=t,R.from(n.getNode(!0)).map(Ne.fromDom).exists(Er)||AC(!1,e,t).isSome();var n},BC=N(AC,!1),PC=N(AC,!0),LC=hd([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),IC=function(e,t,n,r){var o=r.getNode(!1===t);return fC(Ne.fromDom(e),Ne.fromDom(n.getNode())).map(function(e){return Gf(e)?LC.remove(e.dom()):LC.moveToElement(o)}).orThunk(function(){return R.some(LC.moveToElement(o))})},MC=function(u,s,c){return Kc(s,u,c).bind(function(e){return a=e.getNode(),Dr(Ne.fromDom(a))||Rr(Ne.fromDom(a))?R.none():(t=u,o=e,i=function(e){return Nr(Ne.fromDom(e))&&!bc(r,o,t)},kc(!(n=s),r=c).fold(function(){return kc(n,o).fold(x(!1),i)},i)?R.none():s&&an(e.getNode())||!1===s&&an(e.getNode(!0))?IC(u,s,c,e):s&&qf(c)||!1===s&&Vf(c)?R.some(LC.moveToPosition(e)):R.none());var t,n,r,o,i,a})},FC=function(r,e,o){return i=e,a=o.getNode(!1===i),u=i?"after":"before",$t(a)&&a.getAttribute("data-mce-caret")===u?(t=e,n=o.getNode(!1===e),(t&&an(n.nextSibling)?R.some(LC.moveToElement(n.nextSibling)):!1===t&&an(n.previousSibling)?R.some(LC.moveToElement(n.previousSibling)):R.none()).fold(function(){return MC(r,e,o)},R.some)):MC(r,e,o).bind(function(e){return t=r,n=o,e.fold(function(e){return R.some(LC.remove(e))},function(e){return R.some(LC.moveToElement(e))},function(e){return bc(n,e,t)?R.none():R.some(LC.moveToPosition(e))});var t,n});var t,n,i,a,u},UC=function(e,t){return R.from(HC(e.getBody(),t))},zC=function(a,u){var e=a.selection.getNode();return UC(a,e).filter(an).fold(function(){var e,t,n,r,o,i;return(e=a.getBody(),t=u,n=a.selection.getRng(),r=Ec(t?1:-1,e,n),o=ms.fromRangeStart(r),i=Ne.fromDom(e),(!1===t&&qf(o)?R.some(LC.remove(o.getNode(!0))):t&&Vf(o)?R.some(LC.remove(o.getNode())):!1===t&&Vf(o)&&OC(i,o)?BC(i,o).map(function(e){return LC.remove(e.getNode())}):t&&qf(o)&&DC(i,o)?PC(i,o).map(function(e){return LC.remove(e.getNode())}):FC(e,t,o)).map(function(e){return e.fold(function(e){return o._selectionOverrides.hideFakeCaret(),gd(o,i,Ne.fromDom(e)),!0},(r=i=u,function(e){var t=r?ms.before(e):ms.after(e);return n.selection.setRng(t.toRange()),!0}),(t=n=o=a,function(e){return t.selection.setRng(e.toRange()),!0}));var t,n,r,o,i})).getOr(!1)},function(){return!0})},jC=function(t,n){var e=t.selection.getNode();return!!an(e)&&UC(t,e.parentNode).filter(an).fold(function(){var e;return e=Ne.fromDom(t.getBody()),z(Ua(e,".mce-offscreen-selection"),kt),gd(t,n,Ne.fromDom(t.selection.getNode())),dC(t),!0},function(){return!0})},HC=function(e,t){for(;t&&t!==e;){if(on(t)||an(t))return t;t=t.parentNode}return null},VC=function(e){var t,n=HC(e.getBody(),e.selection.getNode());return on(n)&&e.dom.isBlock(n)&&e.dom.isEmpty(n)&&(t=e.dom.create("br",{"data-mce-bogus":"1"}),e.dom.setHTML(n,""),n.appendChild(t),e.selection.setRng(ms.before(t).toRange())),!0},qC=function(e,t){return(e.selection.isCollapsed()?zC:jC)(e,t)},$C=function(e,t,n,r,o,i){var a,u,s=vb(r,e,i.getNode(!o),o,!0);if(t.collapsed){var c=t.cloneRange();o?c.setEnd(s.startContainer,s.startOffset):c.setStart(s.endContainer,s.endOffset),c.deleteContents()}else t.deleteContents();return e.selection.setRng(s),a=e.dom,Zt(u=n)&&0===u.data.length&&a.remove(u),!0},WC=function(e,t){return function(e,t){var n=e.selection.getRng();if(!Zt(n.commonAncestorContainer))return!1;var r=t?fs.Forwards:fs.Backwards,o=Hc(e.getBody()),i=N(Tc,o.next),a=N(Tc,o.prev),u=t?i:a,s=t?Vf:qf,c=_c(r,e.getBody(),n),l=wy(t,u(c));if(!l||!Ac(c,l))return!1;if(s(l))return $C(e,n,c.getNode(),r,t,l);var f=u(l);return!!(f&&s(f)&&Ac(l,f))&&$C(e,n,c.getNode(),r,t,f)}(e,t)},KC=function(t,n){return function(e){return hy(n,e).map(function(e){return Vy(t,e),!0}).getOr(!1)}},XC=function(r,o,i,a){var u=r.getBody(),s=N(yy,r);r.undoManager.ignore(function(){var e,t,n;r.selection.setRng((e=i,t=a,(n=V.document.createRange()).setStart(e.container(),e.offset()),n.setEnd(t.container(),t.offset()),n)),r.execCommand("Delete"),Py(s,u,ms.fromRangeStart(r.selection.getRng())).map(Fy).map(KC(r,o))}),r.nodeChanged()},YC=function(n,r,i,o){var e,t,a=(e=n.getBody(),t=o.container(),yc(t,e)||e),u=N(yy,n),s=Py(u,a,o);return s.bind(function(e){return i?e.fold(x(R.some(Fy(e))),R.none,x(R.some(My(e))),R.none):e.fold(R.none,x(R.some(My(e))),R.none,x(R.some(Fy(e))))}).map(KC(n,r)).getOrThunk(function(){var t=Xc(i,a,o),e=t.bind(function(e){return Py(u,a,e)});return s.isSome()&&e.isSome()?Cy(u,a,o).map(function(e){return!!$u(Zc(o=e),el(o),function(e,t){var n=wy(!0,e),r=wy(!1,t);return Jc(o,n).map(function(e){return e.isEqual(r)}).getOr(!0)}).getOr(!0)&&(gd(n,i,Ne.fromDom(e)),!0);var o}).getOr(!1):e.bind(function(e){return t.map(function(e){return i?XC(n,r,o,e):XC(n,r,e,o),!0})}).getOr(!1)})},GC=function(e,t,n){if(e.selection.isCollapsed()&&!1!==e.settings.inline_boundaries){var r=ms.fromRangeStart(e.selection.getRng());return YC(e,t,n,r)}return!1},JC=function(e){return 1===ht(e).length},QC=function(e,t,n,r){var o,i,a,u,s=N(fp,t),c=U(H(r,s),function(e){return e.dom()});if(0===c.length)gd(t,e,n);else{var l=(o=n.dom(),i=c,a=op(!1),u=sp(i,a.dom()),Ct(Ne.fromDom(o),a),kt(Ne.fromDom(o)),ms(u,0));t.selection.setRng(l.toRange())}},ZC=function(r,o){var t,e=Ne.fromDom(r.getBody()),n=Ne.fromDom(r.selection.getStart()),s=H((t=nd(n,e),X(t,Sr).fold(x(t),function(e){return t.slice(0,e)})),JC);return ee(s).map(function(e){var t,i,a,u,n=ms.fromRangeStart(r.selection.getRng());return i=o,a=n,u=e.dom(),!(!$u(Zc(u),el(u),function(e,t){var n=wy(!0,e),r=wy(!1,t),o=wy(!1,a);return i?Jc(u,o).map(function(e){return e.isEqual(r)&&a.isEqual(n)}).getOr(!1):Qc(u,o).map(function(e){return e.isEqual(n)&&a.isEqual(r)}).getOr(!1)}).getOr(!0)||Ms((t=e).dom())&&np(t.dom()))&&(QC(o,r,e,s),!0)}).getOr(!1)},ew=function(e,t){return!!e.selection.isCollapsed()&&ZC(e,t)},tw=function(e,t){return!!e.selection.isCollapsed()&&(n=e,r=t,o=ms.fromRangeStart(n.selection.getRng()),Kc(r,n.getBody(),o).filter(function(e){return(r?Uf:zf)(e)}).bind(function(e){return R.from(Cc(r?0:-1,e))}).map(function(e){return n.selection.select(e),!0}).getOr(!1));var n,r,o},nw=function(e){var t=parseInt(e,10);return isNaN(t)?0:t},rw=function(e,t){return(e||"table"===Rt(t)?"margin":"padding")+("rtl"===mn(t,"direction")?"-right":"-left")},ow=function(e){var r,t=aw(e);return!e.mode.isReadOnly()&&(1<t.length||(r=e,G(t,function(e){var t=rw(Ks(r),e),n=gn(e,t).map(nw).getOr(0);return"false"!==r.dom.getContentEditable(e.dom())&&0<n})))},iw=function(e){return _r(e)||Rr(e)},aw=function(e){return H(U(e.selection.getSelectedBlocks(),Ne.fromDom),function(e){return!iw(e)&&!ft(e).map(iw).getOr(!1)&&Va(e,function(e){return on(e.dom())||an(e.dom())}).exists(function(e){return on(e.dom())})})},uw=function(e,t){var n=e.dom,r=e.selection,o=e.formatter,i=e.getParam("indentation","40px","string"),a=/[a-z%]+$/i.exec(i)[0],u=parseInt(i,10),s=Ks(e),c=Hs(e);e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertOrderedList")||""!==c||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),z(aw(e),function(e){!function(e,t,n,r,o,i){var a=rw(n,Ne.fromDom(i));if("outdent"===t){var u=Math.max(0,nw(i.style[a])-r);e.setStyle(i,a,u?u+o:"")}else{u=nw(i.style[a])+r+o;e.setStyle(i,a,u)}}(n,t,s,u,a,e.dom())})},sw=function(e,t,n){return Yc(e,t,n,Lf)},cw=function(e,t){return K(nd(Ne.fromDom(t.container()),e),Sr)},lw=function(e,n,r){return sw(e,n.dom(),r).forall(function(t){return cw(n,r).fold(function(){return!1===bc(t,r,n.dom())},function(e){return!1===bc(t,r,n.dom())&&st(e,Ne.fromDom(t.container()))})})},fw=function(t,n,r){return cw(n,r).fold(function(){return sw(t,n.dom(),r).forall(function(e){return!1===bc(e,r,n.dom())})},function(e){return sw(t,e.dom(),r).isNone()})},dw=N(fw,!1),mw=N(fw,!0),pw=N(lw,!1),gw=N(lw,!0),hw=function(e,t,n){if(e.selection.isCollapsed()&&ow(e)){var r=e.dom,o=e.selection.getRng(),i=ms.fromRangeStart(o),a=r.getParent(o.startContainer,r.isBlock);if(null!==a&&dw(Ne.fromDom(a),i))return uw(e,"outdent"),!0}return!1},vw=function(o,i){o.on("keydown",function(e){var t,n,r;!1===e.isDefaultPrevented()&&(t=o,n=i,r=e,cC([{keyCode:Zh.BACKSPACE,action:sC(hw,t,!1)},{keyCode:Zh.BACKSPACE,action:sC(qC,t,!1)},{keyCode:Zh.DELETE,action:sC(qC,t,!0)},{keyCode:Zh.BACKSPACE,action:sC(WC,t,!1)},{keyCode:Zh.DELETE,action:sC(WC,t,!0)},{keyCode:Zh.BACKSPACE,action:sC(GC,t,n,!1)},{keyCode:Zh.DELETE,action:sC(GC,t,n,!0)},{keyCode:Zh.BACKSPACE,action:sC(Vd,t,!1)},{keyCode:Zh.DELETE,action:sC(Vd,t,!0)},{keyCode:Zh.BACKSPACE,action:sC(tw,t,!1)},{keyCode:Zh.DELETE,action:sC(tw,t,!0)},{keyCode:Zh.BACKSPACE,action:sC(RC,t,!1)},{keyCode:Zh.DELETE,action:sC(RC,t,!0)},{keyCode:Zh.BACKSPACE,action:sC(NC,t,!1)},{keyCode:Zh.DELETE,action:sC(NC,t,!0)},{keyCode:Zh.BACKSPACE,action:sC(ew,t,!1)},{keyCode:Zh.DELETE,action:sC(ew,t,!0)}],r).each(function(e){r.preventDefault()}))}),o.on("keyup",function(e){var t,n;!1===e.isDefaultPrevented()&&(t=o,n=e,cC([{keyCode:Zh.BACKSPACE,action:sC(VC,t)},{keyCode:Zh.DELETE,action:sC(VC,t)}],n))})},yw=function(e,t){var n,r,o=t,i=e.dom,a=e.schema.getMoveCaretBeforeOnEnterElements();if(t){if(/^(LI|DT|DD)$/.test(t.nodeName)){var u=function(e){for(;e;){if(1===e.nodeType||3===e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(t.firstChild);u&&/^(UL|OL|DL)$/.test(u.nodeName)&&t.insertBefore(i.doc.createTextNode(oo),t.firstChild)}if(r=i.createRng(),t.normalize(),t.hasChildNodes()){for(var s=new ra(t,t);n=s.current();){if(Zt(n)){r.setStart(n,0),r.setEnd(n,0);break}if(a[n.nodeName.toLowerCase()]){r.setStartBefore(n),r.setEndBefore(n);break}o=n,n=s.next()}n||(r.setStart(o,0),r.setEnd(o,0))}else rn(t)?t.nextSibling&&i.isBlock(t.nextSibling)?(r.setStartBefore(t),r.setEndBefore(t)):(r.setStartAfter(t),r.setEndAfter(t)):(r.setStart(t,0),r.setEnd(t,0));e.selection.setRng(r),Dh(e,r)}},bw=function(e){return R.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))},Cw=function(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t},ww=function(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)},xw=function(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e},Sw=function(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!$t(r);)r=r[n?"nextSibling":"previousSibling"];return r===t},Nw=function(e,t,n,r,o){var i=e.dom,a=e.selection.getRng();if(n!==e.getBody()){var u;ww(u=n)&&ww(u.parentNode)&&(o="LI");var s,c,l=o?t(o):i.create("BR");if(Sw(n,r,!0)&&Sw(n,r,!1))Cw(n,"LI")?i.insertAfter(l,xw(n)):i.replace(l,n);else if(Sw(n,r,!0))Cw(n,"LI")?(i.insertAfter(l,xw(n)),l.appendChild(i.doc.createTextNode(" ")),l.appendChild(n)):n.parentNode.insertBefore(l,n);else if(Sw(n,r,!1))i.insertAfter(l,xw(n));else{n=xw(n);var f=a.cloneRange();f.setStartAfter(r),f.setEndAfter(n);var d=f.extractContents();"LI"===o&&(c="LI",(s=d).firstChild&&s.firstChild.nodeName===c)?(l=d.firstChild,i.insertAfter(d,n)):(i.insertAfter(d,n),i.insertAfter(l,n))}i.remove(r),yw(e,l)}},Ew=function(e){e.innerHTML='<br data-mce-bogus="1">'},kw=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},_w=function(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)},Rw=function(e,t,n){return!1===Zt(t)?n:e?1===n&&t.data.charAt(n-1)===su?0:n:n===t.data.length-1&&t.data.charAt(n)===su?t.data.length:n},Tw=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},Aw=function(o,i,e){R.from(e.style).map(o.dom.parseStyle).each(function(e){var t=function(e){var t={},n=e.dom();if(un(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);t[o]=n.style[o]}return t}(Ne.fromDom(i)),n=pe(pe({},t),e);o.dom.setStyles(i,n)});var t=R.from(e["class"]).map(function(e){return e.split(/\s+/)}),n=R.from(i.className).map(function(e){return H(e.split(/\s+/),function(e){return""!==e})});$u(t,n,function(t,e){var n=H(e,function(e){return!M(t,e)}),r=ge(t,n);o.dom.setAttrib(i,"class",r.join(" "))});var r=["style","class"],a=le(e,function(e,t){return!M(r,t)});o.dom.setAttribs(i,a)},Dw=function(e,t){var n=Hs(e);if(n&&n.toLowerCase()===t.tagName.toLowerCase()){var r=Vs(e);Aw(e,t,r)}},Ow=function(a,e){var t,u,s,i,c,n,r,o,l,f,d,m,p,g=a.dom,h=a.schema,v=h.getNonEmptyElements(),y=a.selection.getRng(),b=function(e){var t,n,r,o=s,i=h.getTextInlineElements();if(r=t=e||"TABLE"===f||"HR"===f?g.create(e||m):c.cloneNode(!1),!1===a.getParam("keep_styles",!0))g.setAttrib(t,"style",null),g.setAttrib(t,"class",null);else do{if(i[o.nodeName]){if(Ms(o)||ll(o))continue;n=o.cloneNode(!1),g.setAttrib(n,"id",""),t.hasChildNodes()?n.appendChild(t.firstChild):r=n,t.appendChild(n)}}while((o=o.parentNode)&&o!==u);return Dw(a,t),Ew(r),t},C=function(e){var t,n,r=Rw(e,s,i);if(Zt(s)&&(e?0<r:r<s.nodeValue.length))return!1;if(s.parentNode===c&&p&&!e)return!0;if(e&&$t(s)&&s===c.firstChild)return!0;if(kw(s,"TABLE")||kw(s,"HR"))return p&&!e||!p&&e;var o=new ra(s,c);for(Zt(s)&&(e&&0===r?o.prev():e||r!==s.nodeValue.length||o.next());t=o.current();){if($t(t)){if(!t.getAttribute("data-mce-bogus")&&(n=t.nodeName.toLowerCase(),v[n]&&"br"!==n))return!1}else if(Zt(t)&&!/^[ \t\r\n]*$/.test(t.nodeValue))return!1;e?o.prev():o.next()}return!0},w=function(){r=/^(H[1-6]|PRE|FIGURE)$/.test(f)&&"HGROUP"!==d?b(m):b(),a.getParam("end_container_on_empty_block",!1)&&_w(g,l)&&g.isEmpty(c)?r=g.split(l,c):g.insertAfter(r,c),yw(a,r)};Wh(g,y).each(function(e){y.setStart(e.startContainer,e.startOffset),y.setEnd(e.endContainer,e.endOffset)}),s=y.startContainer,i=y.startOffset,m=Hs(a),n=!(!e||!e.shiftKey);var x,S,N,E,k,_,R=!(!e||!e.ctrlKey);$t(s)&&s.hasChildNodes()&&(p=i>s.childNodes.length-1,s=s.childNodes[Math.min(i,s.childNodes.length-1)]||s,i=p&&Zt(s)?s.nodeValue.length:0),(u=Tw(g,s))&&((m&&!n||!m&&n)&&(s=function(e,t,n,r,o){var i,a,u,s,c,l,f,d=t||"P",m=e.dom,p=Tw(m,r);if(!(a=m.getParent(r,m.isBlock))||!_w(m,a)){if(l=(a=a||p)===e.getBody()||(f=a)&&/^(TD|TH|CAPTION)$/.test(f.nodeName)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=m.create(d),Dw(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(s=r;s.parentNode!==a;)s=s.parentNode;for(;s&&!m.isBlock(s);)s=(u=s).previousSibling;if(u&&e.schema.isValidChild(l,d.toLowerCase())){for(i=m.create(d),Dw(e,i),u.parentNode.insertBefore(i,u),s=u;s&&!m.isBlock(s);)c=s.nextSibling,i.appendChild(s),s=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(a,m,y,s,i)),c=g.getParent(s,g.isBlock),l=c?g.getParent(c.parentNode,g.isBlock):null,f=c?c.nodeName.toUpperCase():"","LI"!==(d=l?l.nodeName.toUpperCase():"")||R||(l=(c=l).parentNode,f=d),/^(LI|DT|DD)$/.test(f)&&g.isEmpty(c)?Nw(a,b,l,c,m):m&&c===a.getBody()||(m=m||"P",mu(c)?(r=xu(c),g.isEmpty(c)&&Ew(c),Dw(a,r),yw(a,r)):C()?w():C(!0)?(r=c.parentNode.insertBefore(b(),c),yw(a,kw(c,"HR")?r:c)):((_=(k=y).cloneRange()).setStart(k.startContainer,Rw(!0,k.startContainer,k.startOffset)),_.setEnd(k.endContainer,Rw(!1,k.endContainer,k.endOffset)),(t=_.cloneRange()).setEndAfter(c),o=t.extractContents(),E=o,z(Fa(Ne.fromDom(E),Ot),function(e){var t=e.dom();t.nodeValue=lu(t.nodeValue)}),function(e){for(;Zt(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(o),r=o.firstChild,g.insertAfter(o,c),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;$t(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):(a=e,(u=o)&&"A"===u.nodeName&&a.isEmpty(u)&&e.remove(o));var a,u}}(g,v,r),x=g,(S=c).normalize(),(N=S.lastChild)&&!/^(left|right)$/gi.test(x.getStyle(N,"float",!0))||x.add(S,"br"),g.isEmpty(c)&&Ew(c),r.normalize(),g.isEmpty(r)?(g.remove(r),w()):(Dw(a,r),yw(a,r))),g.setAttrib(r,"id",""),a.fire("NewBlock",{newBlock:r})))},Bw=function(e,t,n){var r=e.create("span",{},"&nbsp;");n.parentNode.insertBefore(r,n),t.scrollIntoView(r),e.remove(r)},Pw=function(e,t,n,r){var o=e.createRng();r?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),t.setRng(o)},Lw=function(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();Wh(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var u=a.startOffset,s=a.startContainer;if(1===s.nodeType&&s.hasChildNodes()){var c=u>s.childNodes.length-1;s=s.childNodes[Math.min(u,s.childNodes.length-1)]||s,u=c&&3===s.nodeType?s.nodeValue.length:0}var l=i.getParent(s,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=!(!t||!t.ctrlKey);"LI"!==d||m||(l=f),s&&3===s.nodeType&&u>=s.nodeValue.length&&!function(e,t,n){for(var r,o=new ra(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0<r.length)return!0}(e.schema,s,l)&&(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0),n=i.create("br"),Ns(i,a,n),Bw(i,o,n),Pw(i,o,n,r),e.undoManager.add()},Iw=function(e,t){var n=Ne.fromTag("br");Ct(Ne.fromDom(t),n),e.undoManager.add()},Mw=function(e,t){Fw(e.getBody(),t)||wt(Ne.fromDom(t),Ne.fromTag("br"));var n=Ne.fromTag("br");wt(Ne.fromDom(t),n),Bw(e.dom,e.selection,n.dom()),Pw(e.dom,e.selection,n.dom(),!1),e.undoManager.add()},Fw=function(e,t){return n=ms.after(t),!!rn(n.getNode())||Jc(e,ms.after(t)).map(function(e){return rn(e.getNode())}).getOr(!1);var n},Uw=function(e){return e&&"A"===e.nodeName&&"href"in e},zw=function(e){return e.fold(x(!1),Uw,Uw,x(!1))},jw=function(e,t){t.fold(f,N(Iw,e),N(Mw,e),f)},Hw=function(e,t){var n,r,o,i=(r=N(yy,n=e),o=ms.fromRangeStart(n.selection.getRng()),Py(r,n.getBody(),o).filter(zw));i.isSome()?i.each(N(jw,e)):Lw(e,t)},Vw=function(e,t){return bw(e).filter(function(e){return 0<t.length&&ot(Ne.fromDom(e),t)}).isSome()},qw=hd([{br:[]},{block:[]},{none:[]}]),$w=function(e,t){return Vw(n=e,n.getParam("no_newline_selector",""));var n},Ww=function(n){return function(e,t){return""===Hs(e)===n}},Kw=function(n){return function(e,t){return bw(e).filter(function(e){return Rr(Ne.fromDom(e))}).isSome()===n}},Xw=function(n,r){return function(e,t){return bw(e).fold(x(""),function(e){return e.nodeName.toUpperCase()})===n.toUpperCase()===r}},Yw=function(e){return Xw("pre",e)},Gw=function(n){return function(e,t){return e.getParam("br_in_pre",!0)===n}},Jw=function(e,t){return Vw(n=e,n.getParam("br_newline_selector",".mce-toc h2,figcaption,caption"));var n},Qw=function(e,t){return t},Zw=function(e){var t=Hs(e),n=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o}(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")},ex=function(e,t){return function(n,r){return W(e,function(e,t){return e&&t(n,r)},!0)?R.some(t):R.none()}},tx=function(e,t){return Ny([ex([$w],qw.none()),ex([Xw("summary",!0)],qw.br()),ex([Yw(!0),Gw(!1),Qw],qw.br()),ex([Yw(!0),Gw(!1)],qw.block()),ex([Yw(!0),Gw(!0),Qw],qw.block()),ex([Yw(!0),Gw(!0)],qw.br()),ex([Kw(!0),Qw],qw.br()),ex([Kw(!0)],qw.block()),ex([Ww(!0),Qw,Zw],qw.block()),ex([Ww(!0)],qw.br()),ex([Jw],qw.br()),ex([Ww(!1),Qw],qw.br()),ex([Zw],qw.block())],[e,!(!t||!t.shiftKey)]).getOr(qw.none())},nx=function(e,t){tx(e,t).fold(function(){Hw(e,t)},function(){Ow(e,t)},f)},rx=function(o){o.on("keydown",function(e){var t,n,r;e.keyCode===Zh.ENTER&&(t=o,(n=e).isDefaultPrevented()||(n.preventDefault(),(r=t.undoManager).typing&&(r.typing=!1,r.add()),t.undoManager.transact(function(){!1===t.selection.isCollapsed()&&t.execCommand("Delete"),nx(t,n)})))})},ox=function(n,r){var e=r.container(),t=r.offset();return Zt(e)?(e.insertData(t,n),R.some(ls(e,t+n.length))):Rc(r).map(function(e){var t=Ne.fromText(n);return(r.isAtEnd()?wt:Ct)(e,t),ls(t.dom(),n.length)})},ix=N(ox,oo),ax=N(ox," "),ux=function(e){return ls.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd()},sx=function(e,t){var n=H(nd(Ne.fromDom(t.container()),e),Sr);return Z(n).getOr(e)},cx=function(e,t){return ux(t)?Pf(t):Pf(t)||Qc(sx(e,t).dom(),t).exists(Pf)},lx=function(e,t){return ux(t)?Bf(t):Bf(t)||Jc(sx(e,t).dom(),t).exists(Bf)},fx=function(e){return Rc(e).bind(function(e){return Va(e,Dt)}).exists(function(e){return t=mn(e,"white-space"),M(["pre","pre-wrap"],t);var t})},dx=function(e,t){return r=t,Qc(e.dom(),r).isNone()||(n=t,Jc(e.dom(),n).isNone())||dw(e,t)||mw(e,t)||OC(e,t)||DC(e,t);var n,r},mx=function(e,t){var n,r,o,i=(r=(n=t).container(),o=n.offset(),Zt(r)&&o<r.data.length?ls(r,o+1):n);return!fx(i)&&(mw(e,i)||gw(e,i)||DC(e,i)||lx(e,i))},px=function(e,t){return n=e,!fx(r=t)&&(dw(n,r)||pw(n,r)||OC(n,r)||cx(n,r))||mx(e,t);var n,r},gx=function(e,t){return fl(e.charAt(t))},hx=function(e){var t=e.container();return Zt(t)&&He(t.data,oo)},vx=function(e){var n,t=e.data,r=(n=t.split(""),U(n,function(e,t){return fl(e)&&0<t&&t<n.length-1&&ml(n[t-1])&&ml(n[t+1])?" ":e}).join(""));return r!==t&&(e.data=r,!0)},yx=function(l,e){return R.some(e).filter(hx).bind(function(e){var t,n,r,o,i,a,u,s,c=e.container();return(i=l,u=(a=c).data,s=ls(a,0),!(!gx(u,0)||px(i,s)||(a.data=" "+u.slice(1),0))||vx(c)||(t=l,r=(n=c).data,o=ls(n,r.length-1),!(!gx(r,r.length-1)||px(t,o)||(n.data=r.slice(0,-1)+" ",0))))?R.some(e):R.none()})},bx=function(t){var e=Ne.fromDom(t.getBody());t.selection.isCollapsed()&&yx(e,ls.fromRangeStart(t.selection.getRng())).each(function(e){t.selection.setRng(e.toRange())})},Cx=function(r,o){return function(e){return t=r,(!fx(n=e)&&(dx(t,n)||cx(t,n)||lx(t,n))?ix:ax)(o);var t,n}},wx=function(e){var t,n,r=ms.fromRangeStart(e.selection.getRng()),o=Ne.fromDom(e.getBody());if(e.selection.isCollapsed()){var i=N(yy,e),a=ms.fromRangeStart(e.selection.getRng());return Py(i,e.getBody(),a).bind((n=o,function(e){return e.fold(function(e){return Qc(n.dom(),ms.before(e))},function(e){return Zc(e)},function(e){return el(e)},function(e){return Jc(n.dom(),ms.after(e))})})).bind(Cx(o,r)).exists((t=e,function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}))}return!1},xx=function(r){r.on("keydown",function(e){var t,n;!1===e.isDefaultPrevented()&&(t=r,n=e,cC([{keyCode:Zh.SPACEBAR,action:sC(wx,t)}],n).each(function(e){n.preventDefault()}))})},Sx=function(e,t){var n;t.hasAttribute("data-mce-caret")&&(xu(t),(n=e).selection.setRng(n.selection.getRng()),e.selection.scrollIntoView(t))},Nx=function(e,t){var n,r=(n=e,$a(Ne.fromDom(n.getBody()),"*[data-mce-caret]").fold(x(null),function(e){return e.dom()}));if(r)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void Sx(e,r)):void(hu(r)&&(Sx(e,r),e.undoManager.add()))},Ex=nt().browser,kx=function(t){var e,n;e=t,n=Ta(function(){e.composing||bx(e)},0),Ex.isIE()&&(e.on("keypress",function(e){n.throttle()}),e.on("remove",function(e){n.cancel()})),t.on("input",function(e){!1===e.isComposing&&bx(t)})},_x=function(r){r.on("keydown",function(e){var t,n;!1===e.isDefaultPrevented()&&(t=r,n=e,cC([{keyCode:Zh.END,action:Mb(t,!0)},{keyCode:Zh.HOME,action:Mb(t,!1)}],n).each(function(e){n.preventDefault()}))})},Rx=function(e){var t,n=Gy(e);(t=e).on("keyup compositionstart",N(Nx,t)),lC(e,n),vw(e,n),rx(e),xx(e),kx(e),_x(e)},Tx=(Ax.prototype.nodeChanged=function(e){var t,n,r,o=this.editor.selection;this.editor.initialized&&o&&!this.editor.settings.disable_nodechange&&!this.editor.mode.isReadOnly()&&(r=this.editor.getBody(),(t=o.getStart(!0)||r).ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(t,r)||(t=r),n=[],this.editor.dom.getParent(t,function(e){if(e===r)return!0;n.push(e)}),(e=e||{}).element=t,e.parents=n,this.editor.fire("NodeChange",e))},Ax.prototype.isSameElementPath=function(e){var t,n;if((n=this.editor.$(e).parentsUntil(this.editor.getBody()).add(e)).length===this.lastPath.length){for(t=n.length;0<=t&&n[t]===this.lastPath[t];t--);if(-1===t)return this.lastPath=n,!0}return this.lastPath=n,!1},Ax);function Ax(r){var o;this.lastPath=[],this.editor=r;var t=this;"onselectionchange"in r.getDoc()||r.on("NodeChange click mouseup keyup focus",function(e){var t,n;n={startContainer:(t=r.selection.getRng()).startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset},"nodechange"!==e.type&&Uh(n,o)||r.fire("SelectionChange"),o=n}),r.on("contextmenu",function(){r.fire("SelectionChange")}),r.on("SelectionChange",function(){var e=r.selection.getStart(!0);!e||!rr.range&&r.selection.isCollapsed()||Gl(r)&&!t.isSameElementPath(e)&&r.dom.isChildOf(e,r.getBody())&&r.nodeChanged({selectionChange:!0})}),r.on("mouseup",function(e){!e.isDefaultPrevented()&&Gl(r)&&("IMG"===r.selection.getNode().nodeName?Xn.setEditorTimeout(r,function(){r.nodeChanged()}):r.nodeChanged())})}var Dx=function(e){var t,n;(t=e).on("click",function(e){t.dom.getParent(e.target,"details")&&e.preventDefault()}),(n=e).parser.addNodeFilter("details",function(e){z(e,function(e){e.attr("data-mce-open",e.attr("open")),e.attr("open","open")})}),n.serializer.addNodeFilter("details",function(e){z(e,function(e){var t=e.attr("data-mce-open");e.attr("open",q(t)?t:null),e.attr("data-mce-open",null)})})},Ox=function(e){return $t(e)&&kr(Ne.fromDom(e))},Bx=function(t){t.on("click",function(e){3<=e.detail&&function(e){var t=e.selection.getRng(),n=ls.fromRangeStart(t),r=ls.fromRangeEnd(t);if(ls.isElementPosition(n)){var o=n.container();Ox(o)&&Zc(o).each(function(e){return t.setStart(e.container(),e.offset())})}if(ls.isElementPosition(r)){o=n.container();Ox(o)&&el(o).each(function(e){return t.setEnd(e.container(),e.offset())})}e.selection.setRng($d(t))}(t)})},Px=function(e){var t,n,r,o;return o=e.getBoundingClientRect(),n=(t=e.ownerDocument).documentElement,r=t.defaultView,{top:o.top+r.pageYOffset-n.clientTop,left:o.left+r.pageXOffset-n.clientLeft}},Lx=function(e,t){return n=(u=e).inline?Px(u.getBody()):{left:0,top:0},a=(i=e).getBody(),r=i.inline?{left:a.scrollLeft,top:a.scrollTop}:{left:0,top:0},{pageX:(o=function(e,t){if(t.target.ownerDocument===e.getDoc())return{left:t.pageX,top:t.pageY};var n,r,o,i,a,u=Px(e.getContentAreaContainer()),s=(r=(n=e).getBody(),o=n.getDoc().documentElement,i={left:r.scrollLeft,top:r.scrollTop},a={left:r.scrollLeft||o.scrollLeft,top:r.scrollTop||o.scrollTop},n.inline?i:a);return{left:t.pageX-u.left+s.left,top:t.pageY-u.top+s.top}}(e,t)).left-n.left+r.left,pageY:o.top-n.top+r.top};var n,r,o,i,a,u},Ix=an,Mx=on,Fx=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},Ux=function(u,s){return function(e){if(0===e.button){var t=K(s.dom.getParents(e.target),function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return function(e){for(var t=0;t<n.length;t++)if(n[t](e))return!0;return!1}}(Ix,Mx)).getOr(null);if(i=s.getBody(),Ix(a=t)&&a!==i){var n=s.dom.getPos(t),r=s.getBody(),o=s.getDoc().documentElement;u.element=t,u.screenX=e.screenX,u.screenY=e.screenY,u.maxX=(s.inline?r.scrollWidth:o.offsetWidth)-2,u.maxY=(s.inline?r.scrollHeight:o.offsetHeight)-2,u.relX=e.pageX-n.x,u.relY=e.pageY-n.y,u.width=t.offsetWidth,u.height=t.offsetHeight,u.ghost=function(e,t,n,r){var o=t.cloneNode(!0);e.dom.setStyles(o,{width:n,height:r}),e.dom.setAttrib(o,"data-mce-selected",null);var i=e.dom.create("div",{"class":"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(i,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),e.dom.setStyles(o,{margin:0,boxSizing:"border-box"}),i.appendChild(o),i}(s,t,u.width,u.height)}}var i,a}},zx=function(g,h){var v=Xn.throttle(function(e,t){h._selectionOverrides.hideFakeCaret(),h.selection.placeCaretAt(e,t)},0);return function(e){var t,n,r,o,i,a,u,s,c,l,f,d,m=Math.max(Math.abs(e.screenX-g.screenX),Math.abs(e.screenY-g.screenY));if(g.element&&!g.dragging&&10<m){if(h.fire("dragstart",{target:g.element}).isDefaultPrevented())return;g.dragging=!0,h.focus()}if(g.dragging){var p=(f=g,{pageX:(d=Lx(h,e)).pageX-f.relX,pageY:d.pageY+5});c=g.ghost,l=h.getBody(),c.parentNode!==l&&l.appendChild(c),t=g.ghost,n=p,r=g.width,o=g.height,i=g.maxX,a=g.maxY,s=u=0,t.style.left=n.pageX+"px",t.style.top=n.pageY+"px",n.pageX+r>i&&(u=n.pageX+r-i),n.pageY+o>a&&(s=n.pageY+o-a),t.style.width=r-u+"px",t.style.height=o-s+"px",v(e.clientX,e.clientY)}}},jx=function(l,f){return function(e){if(l.dragging&&(s=(i=f).selection,c=s.getSel().getRangeAt(0).startContainer,a=3===c.nodeType?c.parentNode:c,u=l.element,a!==u&&!i.dom.isChildOf(a,u)&&!Ix(a))){var t=(r=l.element,(o=r.cloneNode(!0)).removeAttribute("data-mce-selected"),o),n=f.fire("drop",{targetClone:t,clientX:e.clientX,clientY:e.clientY});n.isDefaultPrevented()||(t=n.targetClone,f.undoManager.transact(function(){Fx(l.element),f.insertContent(f.dom.getOuterHTML(t)),f._selectionOverrides.hideFakeCaret()}))}var r,o,i,a,u,s,c;Hx(l)}},Hx=function(e){e.dragging=!1,e.element=null,Fx(e.ghost)},Vx=function(e){var t,n,r,o,i,a,u,s,c={};t=ga.DOM,a=V.document,n=Ux(c,e),r=zx(c,e),o=jx(c,e),u=c,i=function(){u.dragging&&s.fire("dragend"),Hx(u)},(s=e).on("mousedown",n),e.on("mousemove",r),e.on("mouseup",o),t.bind(a,"mousemove",r),t.bind(a,"mouseup",i),e.on("remove",function(){t.unbind(a,"mousemove",r),t.unbind(a,"mouseup",i)})},qx=function(e){var n;Vx(e),(n=e).on("drop",function(e){var t="undefined"!=typeof e.clientX?n.getDoc().elementFromPoint(e.clientX,e.clientY):null;(Ix(t)||Ix(n.dom.getContentEditableParent(t)))&&e.preventDefault()})},$x=on,Wx=an,Kx=function(e,t){for(var n=e.getBody();t&&t!==n;){if($x(t)||Wx(t))return t;t=t.parentNode}return null},Xx=function(g){var h,v=g.getBody(),o=uc(g,v,function(e){return g.dom.isBlock(e)},function(){return Pm(g)}),y="sel-"+g.dom.uniqueId(),a=function(e){e&&g.selection.setRng(e)},r=function(){return g.selection.getRng()},b=function(e,t,n,r){return void 0===r&&(r=!0),g.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(r&&g.selection.scrollIntoView(t,-1===e),o.show(n,t))},t=function(e){return gu(e)||Cu(e)||wu(e)},C=function(e){return t(e.startContainer)||t(e.endContainer)},u=function(e){var t=g.schema.getShortEndedElements(),n=g.dom.createRng(),r=e.startContainer,o=e.startOffset,i=e.endContainer,a=e.endOffset;return me(t,r.nodeName.toLowerCase())?0===o?n.setStartBefore(r):n.setStartAfter(r):n.setStart(r,o),me(t,i.nodeName.toLowerCase())?0===a?n.setEndBefore(i):n.setEndAfter(i):n.setEnd(i,a),n},s=function(e,t){var n,r,o,i,a,u,s,c,l,f,d=g.$,m=g.dom;if(!e)return null;if(e.collapsed){if(!C(e))if(!1===t){if(c=_c(-1,v,e),cc(c.getNode(!0)))return b(-1,c.getNode(!0),!1,!1);if(cc(c.getNode()))return b(-1,c.getNode(),!c.isAtEnd(),!1)}else{if(c=_c(1,v,e),cc(c.getNode()))return b(1,c.getNode(),!c.isAtEnd(),!1);if(cc(c.getNode(!0)))return b(1,c.getNode(!0),!1,!1)}return null}if(i=e.startContainer,a=e.startOffset,u=e.endOffset,3===i.nodeType&&0===a&&Wx(i.parentNode)&&(i=i.parentNode,a=m.nodeIndex(i),i=i.parentNode),1!==i.nodeType)return null;if(u===a+1&&i===e.endContainer&&(n=i.childNodes[a]),!Wx(n))return null;if(l=f=n.cloneNode(!0),(s=g.fire("ObjectSelected",{target:n,targetClone:l})).isDefaultPrevented())return null;r=$a(Ne.fromDom(g.getBody()),"#"+y).fold(function(){return d([])},function(e){return d([e.dom()])}),l=s.targetClone,0===r.length&&(r=d('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",y)).appendTo(g.getBody()),e=g.dom.createRng(),l===f&&rr.ie?(r.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xa0</p>').append(l),e.setStartAfter(r[0].firstChild.firstChild),e.setEndAfter(l)):(r.empty().append(oo).append(l).append(oo),e.setStart(r[0].firstChild,1),e.setEnd(r[0].lastChild,0)),r.css({top:m.getPos(n,g.getBody()).y}),r[0].focus(),(o=g.selection.getSel()).removeAllRanges(),o.addRange(e);var p=Ne.fromDom(n);return z(Ua(Ne.fromDom(g.getBody()),"*[data-mce-selected]"),function(e){at(p,e)||dn(e,"data-mce-selected")}),g.dom.getAttrib(n,"data-mce-selected")||n.setAttribute("data-mce-selected","1"),h=n,w(),e},c=function(){h&&(h.removeAttribute("data-mce-selected"),$a(Ne.fromDom(g.getBody()),"#"+y).each(kt),h=null),$a(Ne.fromDom(g.getBody()),"#"+y).each(kt),h=null},w=function(){o.hide()};return rr.ceFalse&&function(){g.on("mouseup",function(e){var t=r();t.collapsed&&Qg(g,e.clientX,e.clientY)&&a(bb(g,t,!1))}),g.on("click",function(e){var t;(t=Kx(g,e.target))&&(Wx(t)&&(e.preventDefault(),g.focus()),$x(t)&&g.dom.isChildOf(t,g.selection.getNode())&&c())}),g.on("blur NewBlock",function(){c()}),g.on("ResizeWindow FullscreenStateChanged",function(){return o.reposition()});var n,i=function(e,t){var n,r,o=g.dom.getParent(e,g.dom.isBlock),i=g.dom.getParent(t,g.dom.isBlock);return!(!o||!g.dom.isChildOf(o,i)||!1!==Wx(Kx(g,o)))||o&&(n=o,r=i,!(g.dom.getParent(n,g.dom.isBlock)===g.dom.getParent(r,g.dom.isBlock)))&&function(e){var t=Hc(e);if(!e.firstChild)return!1;var n=ms.before(e.firstChild),r=t.next(n);return r&&!Vf(r)&&!qf(r)}(o)};(n=g).on("tap",function(e){var t=Kx(n,e.target);Wx(t)&&(e.preventDefault(),s(yb(n,t)))},!0),g.on("mousedown",function(e){var t,n=e.target;if((n===v||"HTML"===n.nodeName||g.dom.isChildOf(n,v))&&!1!==Qg(g,e.clientX,e.clientY))if(t=Kx(g,n))Wx(t)?(e.preventDefault(),s(yb(g,t))):(c(),$x(t)&&e.shiftKey||Qh(e.clientX,e.clientY,g.selection.getRng())||(w(),g.selection.placeCaretAt(e.clientX,e.clientY)));else if(!1===cc(n)){c(),w();var r=pb(v,e.clientX,e.clientY);if(r&&!i(e.target,r.node)){e.preventDefault();var o=b(1,r.node,r.before,!1);g.getBody().focus(),a(o)}}}),g.on("keypress",function(e){Zh.modifierPressed(e)||(e.keyCode,Wx(g.selection.getNode())&&e.preventDefault())}),g.on("GetSelectionRange",function(e){var t=e.range;if(h){if(!h.parentNode)return void(h=null);(t=t.cloneRange()).selectNode(h),e.range=t}}),g.on("SetSelectionRange",function(e){e.range=u(e.range);var t=s(e.range,e.forward);t&&(e.range=t)});var t,e;g.on("AfterSetSelectionRange",function(e){var t,n=e.range;C(n)||"mcepastebin"===n.startContainer.parentNode.id||w(),t=n.startContainer.parentNode,g.dom.hasClass(t,"mce-offscreen-selection")||c()}),g.on("copy",function(e){var t,n=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!rr.ie){var r=(t=g.dom.get(y))?t.getElementsByTagName("*")[0]:t;r&&(e.preventDefault(),n.clearData(),n.setData("text/html",r.outerHTML),n.setData("text/plain",r.outerText))}}),qx(g),e=Ta(function(){if(!t.removed&&t.getBody().contains(V.document.activeElement)&&t.selection.getRng().collapsed){var e=Cb(t,t.selection.getRng(),!1);t.selection.setRng(e)}},0),(t=g).on("focus",function(){e.throttle()}),t.on("blur",function(){e.cancel()})}(),{showCaret:b,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(xu(e),a(r()),g.selection.scrollIntoView(e))},hideFakeCaret:w,destroy:function(){o.destroy(),h=null}}},Yx=function(u){var s,n,r,o=hr.each,c=Zh.BACKSPACE,l=Zh.DELETE,f=u.dom,d=u.selection,e=u.settings,t=u.parser,i=rr.gecko,a=rr.ie,m=rr.webkit,p="data:text/mce-internal,",g=a?"Text":"URL",h=function(e,t){try{u.getDoc().execCommand(e,!1,t)}catch(n){}},v=function(e){return e.isDefaultPrevented()},y=function(){u.shortcuts.add("meta+a",null,"SelectAll")},b=function(){u.on("keydown",function(e){if(!v(e)&&e.keyCode===c&&d.isCollapsed()&&0===d.getRng().startOffset){var t=d.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})},C=function(){u.inline||(u.contentStyles.push("body {min-height: 150px}"),u.on("click",function(e){var t;if("HTML"===e.target.nodeName){if(11<rr.ie)return void u.getBody().focus();t=u.selection.getRng(),u.getBody().focus(),u.selection.setRng(t),u.selection.normalize(),u.nodeChanged()}}))};return u.on("keydown",function(e){var t,n,r,o,i;if(!v(e)&&e.keyCode===Zh.BACKSPACE&&(n=(t=d.getRng()).startContainer,r=t.startOffset,o=f.getRoot(),i=n,t.collapsed&&0===r)){for(;i&&i.parentNode&&i.parentNode.firstChild===i&&i.parentNode!==o;)i=i.parentNode;"BLOCKQUOTE"===i.tagName&&(u.formatter.toggle("blockquote",null,i),(t=f.createRng()).setStart(n,0),t.setEnd(n,0),d.setRng(t))}}),s=function(e){var t=f.create("body"),n=e.cloneContents();return t.appendChild(n),d.serializer.serialize(t,{format:"html"})},u.on("keydown",function(e){var t,n,r,o,i,a=e.keyCode;if(!v(e)&&(a===l||a===c)){if(t=u.selection.isCollapsed(),n=u.getBody(),t&&!f.isEmpty(n))return;if(!t&&(r=u.selection.getRng(),o=s(r),(i=f.createRng()).selectNode(u.getBody()),o!==s(i)))return;e.preventDefault(),u.setContent(""),n.firstChild&&f.isBlock(n.firstChild)?u.selection.setCursorLocation(n.firstChild,0):u.selection.setCursorLocation(n,0),u.nodeChanged()}}),rr.windowsPhone||u.on("keyup focusin mouseup",function(e){Zh.modifierPressed(e)||d.normalize()},!0),m&&(u.inline||f.bind(u.getDoc(),"mousedown mouseup",function(e){var t;if(e.target===u.getDoc().documentElement)if(t=d.getRng(),u.getBody().focus(),"mousedown"===e.type){if(gu(t.startContainer))return;d.placeCaretAt(e.clientX,e.clientY)}else d.setRng(t)}),u.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==f.getContentEditableParent(t)&&(e.preventDefault(),u.selection.select(t),u.nodeChanged()),"A"===t.nodeName&&f.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),d.select(t))}),e.forced_root_block&&u.on("init",function(){h("DefaultParagraphSeparator",Hs(u))}),u.on("init",function(){u.dom.bind(u.getBody(),"submit",function(e){e.preventDefault()})}),b(),t.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()}),rr.iOS?(u.inline||u.on("keydown",function(){V.document.activeElement===V.document.body&&u.getWin().focus()}),C(),u.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),u.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):y()),11<=rr.ie&&(C(),b()),rr.ie&&(y(),h("AutoUrlDetect",!1),u.on("dragstart",function(e){var t,n,r;(t=e).dataTransfer&&(u.selection.isCollapsed()&&"IMG"===t.target.tagName&&d.select(t.target),0<(n=u.selection.getContent()).length&&(r=p+escape(u.id)+","+escape(n),t.dataTransfer.setData(g,r)))}),u.on("drop",function(e){if(!v(e)){var t=(i=e).dataTransfer&&(a=i.dataTransfer.getData(g))&&0<=a.indexOf(p)?(a=a.substr(p.length).split(","),{id:unescape(a[0]),html:unescape(a[1])}):null;if(t&&t.id!==u.id){e.preventDefault();var n=Bh(e.x,e.y,u.getDoc());d.setRng(n),r=t.html,o=!0,u.queryCommandSupported("mceInsertClipboardContent")?u.execCommand("mceInsertClipboardContent",!1,{content:r,internal:o}):u.execCommand("mceInsertContent",!1,r)}}var r,o,i,a})),i&&(u.on("keydown",function(e){if(!v(e)&&e.keyCode===c){if(!u.getBody().getElementsByTagName("hr").length)return;if(d.isCollapsed()&&0===d.getRng().startOffset){var t=d.getNode(),n=t.previousSibling;if("HR"===t.nodeName)return f.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(f.remove(n),e.preventDefault())}}}),V.Range.prototype.getClientRects||u.on("mousedown",function(e){if(!v(e)&&"HTML"===e.target.nodeName){var t=u.getBody();t.blur(),Xn.setEditorTimeout(u,function(){t.focus()})}}),n=function(){var e=f.getAttribs(d.getStart().cloneNode(!1));return function(){var t=d.getStart();t!==u.getBody()&&(f.setAttrib(t,"style",null),o(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}},r=function(){return!d.isCollapsed()&&f.getParent(d.getStart(),f.isBlock)!==f.getParent(d.getEnd(),f.isBlock)},u.on("keypress",function(e){var t;if(!v(e)&&(8===e.keyCode||46===e.keyCode)&&r())return t=n(),u.getDoc().execCommand("delete",!1,null),t(),e.preventDefault(),!1}),f.bind(u.getDoc(),"cut",function(e){var t;!v(e)&&r()&&(t=n(),Xn.setEditorTimeout(u,function(){t()}))}),e.readonly||u.on("BeforeExecCommand mousedown",function(){h("StyleWithCSS",!1),h("enableInlineTableEditing",!1),e.object_resizing||h("enableObjectResizing",!1)}),u.on("SetContent ExecCommand",function(e){"setcontent"!==e.type&&"mceInsertLink"!==e.command||o(f.select("a"),function(e){var t=e.parentNode,n=f.getRoot();if(t.lastChild===e){for(;t&&!f.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}f.add(t,"br",{"data-mce-bogus":1})}})}),u.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),rr.mac&&u.on("keydown",function(e){!Zh.metaKeyPressed(e)||e.shiftKey||37!==e.keyCode&&39!==e.keyCode||(e.preventDefault(),u.selection.getSel().modify("move",37===e.keyCode?"backward":"forward","lineboundary"))}),b()),{refreshContentEditable:function(){},isHidden:function(){var e;return!(!i||u.removed)&&(!(e=u.selection.getSel())||!e.rangeCount||0===e.rangeCount)}}},Gx=ga.DOM,Jx=function(e){return le(e,function(e){return!1===A(e)})},Qx=function(e){var t,n=e.settings,r=e.editorUpload.blobCache;return Jx({allow_conditional_comments:n.allow_conditional_comments,allow_html_in_named_anchor:n.allow_html_in_named_anchor,allow_script_urls:n.allow_script_urls,allow_unsafe_link_target:n.allow_unsafe_link_target,convert_fonts_to_spans:n.convert_fonts_to_spans,fix_list_elements:n.fix_list_elements,font_size_legacy_values:n.font_size_legacy_values,forced_root_block:n.forced_root_block,forced_root_block_attrs:n.forced_root_block_attrs,padd_empty_with_br:n.padd_empty_with_br,preserve_cdata:n.preserve_cdata,remove_trailing_brs:n.remove_trailing_brs,inline_styles:n.inline_styles,root_name:(t=e).inline?t.getElement().nodeName.toLowerCase():undefined,validate:!0,blob_cache:r,images_dataimg_filter:n.images_dataimg_filter})},Zx=function(u){var e=u.dom.getRoot();u.inline||Gl(u)&&u.selection.getStart(!0)!==e||Zc(e).each(function(e){var t,n,r,o,i=e.getNode(),a=Gt(i)?Zc(i).getOr(e):e;rr.browser.isIE()?(t=u,n=a.toRange(),r=Ne.fromDom(t.getBody()),o=(hm(t)?R.from(n):R.none()).map(vm).filter(gm(r)),t.bookmark=o.isSome()?o:t.bookmark):u.selection.setRng(a.toRange())})},eS=function(e){var t;e.bindPendingEventDelegates(),e.initialized=!0,e.fire("Init"),e.focus(!0),Zx(e),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),(t=e).settings.auto_focus&&Xn.setEditorTimeout(t,function(){var e;(e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus)).destroyed||e.focus()},100)},tS=function(t,e){var n=t.settings,r=t.getDoc(),o=t.getBody();n.browser_spellcheck||n.gecko_spellcheck||(r.body.spellcheck=!1,Gx.setAttrib(o,"spellcheck","false")),t.quirks=Yx(t),t.fire("PostRender");var i,a,u,s,c,l=t.getParam("directionality",ka.isRtl()?"rtl":undefined);if(l!==undefined&&(o.dir=l),n.protect&&t.on("BeforeSetContent",function(t){hr.each(n.protect,function(e){t.content=t.content.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),t.on("SetContent",function(){t.addVisual(t.getBody())}),!1===e&&t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"}),t.on("compositionstart compositionend",function(e){t.composing="compositionstart"===e.type}),0<t.contentStyles.length){var f="";hr.each(t.contentStyles,function(e){f+=e+"\r\n"}),t.dom.addStyle(f)}((i=t).inline?Gx.styleSheetLoader:i.dom.styleSheetLoader).loadAll(t.contentCSS,function(e){eS(t)},function(e){eS(t)}),n.content_style&&(a=t,u=n.content_style,s=Ne.fromDom(a.getDoc().head),c=Ne.fromTag("style"),cn(c,"type","text/css"),St(c,Ne.fromText(u)),St(s,c))},nS=function(t,e){var n,u,r,o,i,a,s,c=t.settings,l=t.getElement(),f=t.getDoc();c.inline||(t.getElement().style.visibility=t.orgVisibility),e||t.inline||(f.open(),f.write(t.iframeHTML),f.close()),t.inline&&(t.on("remove",function(){var e=this.getBody();Gx.removeClass(e,"mce-content-body"),Gx.removeClass(e,"mce-edit-focus"),Gx.setAttrib(e,"contentEditable",null)}),Gx.addClass(l,"mce-content-body"),t.contentDocument=f=V.document,t.contentWindow=V.window,t.bodyElement=l,t.contentAreaContainer=l),(n=t.getBody()).disabled=!0,t.readonly=!!c.readonly,t.readonly||(t.inline&&"static"===Gx.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable=t.getParam("content_editable_state",!0)),n.disabled=!1,t.editorUpload=Pv(t),t.schema=no(c),t.dom=ga(f,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:c.force_hex_style_colors,update_styles:!0,root_element:t.inline?t.getBody():null,collect:function(){return t.inline},schema:t.schema,contentCssCors:t.getParam("content_css_cors",!1,"boolean"),referrerPolicy:t.getParam("referrer_policy","","string"),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=((r=Ev(Qx(u=t),u.schema)).addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,r,o=e.length,i=u.dom,a="data-mce-"+t;o--;)if((r=(n=e[o]).attr(t))&&!n.attr(a)){if(0===r.indexOf("data:")||0===r.indexOf("blob:"))continue;"style"===t?((r=i.serializeStyle(i.parseStyle(r),n.name)).length||(r=null),n.attr(a,r),n.attr(t,r)):"tabindex"===t?(n.attr(a,r),n.attr(t,null)):n.attr(a,u.convertURL(r,t,n.name))}}),r.addNodeFilter("script",function(e){for(var t,n,r=e.length;r--;)0!==(n=(t=e[r]).attr("type")||"no/type").indexOf("mce-")&&t.attr("type","mce-"+n)}),u.settings.preserve_cdata&&r.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+u.dom.encode(t.value)+"]]"}),r.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t,n=e.length,r=u.schema.getNonEmptyElements();n--;)(t=e[n]).isEmpty(r)&&0===t.getAll("br").length&&(t.append(new df("br",1)).shortEnded=!0)}),r),t.serializer=Av((i=(o=t).settings,pe(pe({},Qx(o)),Jx({url_converter:i.url_converter,url_converter_scope:i.url_converter_scope,element_format:i.element_format,entities:i.entities,entity_encoding:i.entity_encoding,indent:i.indent,indent_after:i.indent_after,indent_before:i.indent_before,block_elements:i.block_elements,boolean_attributes:i.boolean_attributes,custom_elements:i.custom_elements,extended_valid_elements:i.extended_valid_elements,invalid_elements:i.invalid_elements,invalid_styles:i.invalid_styles,move_caret_before_on_enter_elements:i.move_caret_before_on_enter_elements,non_empty_elements:i.non_empty_elements,schema:i.schema,self_closing_elements:i.self_closing_elements,short_ended_elements:i.short_ended_elements,special:i.special,text_block_elements:i.text_block_elements,text_inline_elements:i.text_inline_elements,valid_children:i.valid_children,valid_classes:i.valid_classes,valid_elements:i.valid_elements,valid_styles:i.valid_styles,verify_html:i.verify_html,whitespace_elements:i.whitespace_elements}))),t),t.selection=av(t.dom,t.getWin(),t.serializer,t),t.annotator=af(t),t.formatter=Wv(t),t.undoManager=Xv(t),t._nodeChangeDispatcher=new Tx(t),t._selectionOverrides=Xx(t),ty(t),Dx(t),yg(t)||Bx(t),yg(a=t)||Rx(a),Hs(s=t)&&s.on("NodeChange",N(oy,s)),Zv(t),t.fire("PreInit"),bg(t).fold(function(){tS(t,!1)},function(e){t.setProgressState(!0),e.then(function(e){t.setProgressState(!1),tS(t,e)})})},rS=ga.DOM,oS=function(e){var t,n,r;return r=e.getParam("doctype","<!DOCTYPE html>")+"<html><head>",e.getParam("document_base_url","")!==e.documentBaseUrl&&(r+='<base href="'+e.documentBaseURI.getURI()+'" />'),r+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',t=zs(e,"body_id","tinymce"),n=zs(e,"body_class",""),js(e)&&(r+='<meta http-equiv="Content-Security-Policy" content="'+js(e)+'" />'),r+='</head><body id="'+t+'" class="mce-content-body '+n+'" data-id="'+e.id+'"><br></body></html>'},iS=function(e,t){var n,r,o,i,a=e.editorManager.translate("Rich Text Area. Press ALT-0 for help."),u=(n=e.id,r=a,t.height,o=e.getParam("iframe_attrs",{}),i=Ne.fromTag("iframe"),ln(i,o),ln(i,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),La(i,"tox-edit-area__iframe"),i.dom());u.onload=function(){u.onload=null,e.fire("load")};var s=function(e,t){if(V.document.domain!==V.window.location.hostname&&rr.browser.isIE()){var n=Bv("mce");e[n]=function(){nS(e)};var r='javascript:(function(){document.open();document.domain="'+V.document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return rS.setAttrib(t,"src",r),!0}return!1}(e,u);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=u,e.iframeHTML=oS(e),rS.add(t.iframeContainer,u),s},aS=ga.DOM,uS=function(t,n,e){var r=th.get(e),o=th.urls[e]||t.documentBaseUrl.replace(/\/$/,"");if(e=hr.trim(e),r&&-1===hr.inArray(n,e)){if(hr.each(th.dependencies(e),function(e){uS(t,n,e)}),t.plugins[e])return;try{var i=new r(t,o,t.$);(t.plugins[e]=i).init&&(i.init(t,o),n.push(e))}catch(pE){!function(e,t,n){var r=ka.translate(["Failed to initialize plugin: {0}",t]);ch(r,n),ih(e,r)}(t,e,pE)}}},sS=function(e){return e.replace(/^\-/,"")},cS=function(e){return{editorContainer:e,iframeContainer:e}},lS=function(e){var t,n,r=e.getElement();return e.inline?cS(null):(t=r,n=aS.create("div"),aS.insertAfter(n,t),cS(n))},fS=function(e){var n,t,r,o,i,a;e.fire("ScriptsLoaded"),n=e,t=hr.trim($s(n)),r=n.ui.registry.getAll().icons,o=pe(pe({},$g.get("default").icons),$g.get(t).icons),oe(o,function(e,t){me(r,t)||n.ui.registry.addIcon(t,e)}),function(e){var t=e.settings.theme;if(q(t)){e.settings.theme=sS(t);var n=nh.get(t);e.theme=new n(e,nh.urls[t]),e.theme.init&&e.theme.init(e,nh.urls[t]||e.documentBaseUrl.replace(/\/$/,""),e.$)}else e.theme={}}(e),i=e,a=[],hr.each(i.settings.plugins.split(/[ ,]/),function(e){uS(i,a,sS(e))});var u,s,c,l,f,d,m,p,g,h=(f=(u=e).getElement(),u.orgDisplay=f.style.display,q(u.settings.theme)?u.theme.renderUI():D(u.settings.theme)?(c=(s=u).getElement(),(l=(0,s.settings.theme)(s,c)).editorContainer.nodeType&&(l.editorContainer.id=l.editorContainer.id||s.id+"_parent"),l.iframeContainer&&l.iframeContainer.nodeType&&(l.iframeContainer.id=l.iframeContainer.id||s.id+"_iframecontainer"),l.height=l.iframeHeight?l.iframeHeight:c.offsetHeight,l):lS(u));return e.editorContainer=h.editorContainer?h.editorContainer:null,(d=e).contentCSS=d.contentCSS.concat(lh(d)),e.inline?nS(e):(g=iS(m=e,p=h),p.editorContainer&&(rS.get(p.editorContainer).style.display=m.orgDisplay,m.hidden=rS.isHidden(p.editorContainer)),m.getElement().style.display="none",rS.setAttrib(m.id,"aria-hidden","true"),void(g||nS(m)))},dS=ga.DOM,mS=function(e){return"-"===e.charAt(0)},pS=function(e,t){var n=Ws(t),r=t.getParam("language_url","","string");if(!1===ka.hasCode(n)&&"en"!==n){var o=""!==r?r:t.editorManager.baseURL+"/langs/"+n+".js";e.add(o,f,undefined,function(){ah(t,"LanguageLoadError",uh("language",o,n))})}},gS=function(t,e,n){return R.from(e).filter(function(e){return 0<e.length&&!$g.has(e)}).map(function(e){return{url:t.editorManager.baseURL+"/icons/"+e+"/icons"+n+".js",name:R.some(e)}})},hS=function(e,o,t){var n,r=gS(o,"default",t),i=(n=o,R.from(n.getParam("icons_url","","string")).filter(function(e){return 0<e.length}).map(function(e){return{url:e,name:R.none()}}).orThunk(function(){return gS(o,$s(o),"")}));z(function(e){for(var t=[],n=function(e){t.push(e)},r=0;r<e.length;r++)e[r].each(n);return t}([r,i]),function(r){e.add(r.url,f,undefined,function(){var e,t,n;e=o,t=r.url,n=r.name.getOrUndefined(),ah(e,"IconsLoadError",uh("icons",t,n))})})},vS=function(e,t){var i=ba.ScriptLoader;!function(e,t,n,r){var o=t.settings,i=o.theme;if(q(i)){if(!mS(i)&&!nh.urls.hasOwnProperty(i)){var a=o.theme_url;a?nh.load(i,t.documentBaseURI.toAbsolute(a)):nh.load(i,"themes/"+i+"/theme"+n+".js")}e.loadQueue(function(){nh.waitFor(i,r)})}else r()}(i,e,t,function(){var r,n,o;pS(i,e),hS(i,e,t),n=(r=e).settings,o=t,k(n.plugins)&&(n.plugins=n.plugins.join(" ")),hr.each(n.external_plugins,function(e,t){th.load(t,e,f,undefined,function(){sh(r,e,t)}),n.plugins+=" "+t}),hr.each(n.plugins.split(/[ ,]/),function(e){if((e=hr.trim(e))&&!th.urls[e])if(mS(e)){e=e.substr(1,e.length);var t=th.dependencies(e);hr.each(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"},n=th.createUrl(t,e);th.load(n.resource,n,f,undefined,function(){sh(r,n.prefix+n.resource+n.suffix,n.resource)})})}else{var n={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};th.load(e,n,f,undefined,function(){sh(r,n.prefix+n.resource+n.suffix,e)})}}),i.loadQueue(function(){e.removed||fS(e)},e,function(){e.removed||fS(e)})})},yS=function(e,t){var n,r,o,i,a="string"!=typeof(n=t)?(r=hr.extend({paste:n.paste,data:{paste:n.paste}},n),{content:n.content,details:r}):{content:n,details:{}};o=a.content,i=a.details,Cg(e).editor.insertContent(o,i)},bS=function(e,t){e.getDoc().execCommand(t,!1,null)},CS=function(e){return D(e)?e:x(!1)},wS=function(e,t,n){var r=t(e),o=CS(n);return r.orThunk(function(){return o(e)?R.none():function(e,t,n){for(var r=e.dom(),o=CS(n);r.parentNode;){r=r.parentNode;var i=Ne.fromDom(r),a=t(i);if(a.isSome())return a;if(o(i))break}return R.none()}(e,t,o)})},xS={"font-size":"size","font-family":"face"},SS=function(e,t,n){var r=function(r){return gn(r,e).orThunk(function(){return"font"===Rt(r)?de(xS,e).bind(function(e){return t=r,n=e,R.from(fn(t,n));var t,n}):R.none()})};return wS(Ne.fromDom(n),function(e){return r(e)},function(e){return at(Ne.fromDom(t),e)})},NS=function(o){return function(r,e){return R.from(e).map(Ne.fromDom).filter(Dt).bind(function(e){return SS(o,r,e.dom()).or((t=o,n=e.dom(),R.from(ga.DOM.getStyle(n,t,!0))));var t,n}).getOr("")}},ES=NS("font-size"),kS=a(function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},NS("font-family")),_S=function(e){return Zc(e.getBody()).map(function(e){var t=e.container();return Zt(t)?t.parentNode:t})},RS=function(o){return R.from(o.selection.getRng()).bind(function(e){var t,n,r=o.getBody();return n=r,(t=e).startContainer===n&&0===t.startOffset?R.none():R.from(o.selection.getStart(!0))})},TS=function(e,t){if(/^[0-9\.]+$/.test(t)){var n=parseInt(t,10);if(1<=n&&n<=7){var r=(a=e,hr.explode(a.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))),o=(i=e,hr.explode(i.getParam("font_size_classes","")));return o?o[n-1]||t:r[n-1]||t}return t}return t;var i,a},AS=function(e,t){var n,r=TS(e,t);e.formatter.toggle("fontname",{value:(n=r.split(/\s*,\s*/),U(n,function(e){return-1===e.indexOf(" ")||Ve(e,'"')||Ve(e,"'")?e:"'"+e+"'"}).join(","))}),e.nodeChanged()},DS=hr.each,OS=hr.map,BS=hr.inArray,PS=(LS.prototype.execCommand=function(t,n,r,e){var o,i,a=!1,u=this;if(!u.editor.removed){var s;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||e&&e.skip_focus?(s=u.editor,wm(s).each(function(e){s.selection.setRng(e)})):u.editor.focus(),(e=u.editor.fire("BeforeExecCommand",{command:t,ui:n,value:r})).isDefaultPrevented())return!1;if(i=t.toLowerCase(),o=u.commands.exec[i])return o(i,n,r),u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0;if(DS(this.editor.plugins,function(e){if(e.execCommand&&e.execCommand(t,n,r))return u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!(a=!0)}),a)return a;if(u.editor.theme&&u.editor.theme.execCommand&&u.editor.theme.execCommand(t,n,r))return u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0;try{a=u.editor.getDoc().execCommand(t,n,r)}catch(c){}return!!a&&(u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0)}},LS.prototype.queryCommandState=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.state[e])return t(e);try{return this.editor.getDoc().queryCommandState(e)}catch(n){}return!1}},LS.prototype.queryCommandValue=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.value[e])return t(e);try{return this.editor.getDoc().queryCommandValue(e)}catch(n){}}},LS.prototype.addCommands=function(e,n){var r=this;n=n||"exec",DS(e,function(t,e){DS(e.toLowerCase().split(","),function(e){r.commands[n][e]=t})})},LS.prototype.addCommand=function(e,o,i){var a=this;e=e.toLowerCase(),this.commands.exec[e]=function(e,t,n,r){return o.call(i||a.editor,t,n,r)}},LS.prototype.queryCommandSupported=function(e){if(e=e.toLowerCase(),this.commands.exec[e])return!0;try{return this.editor.getDoc().queryCommandSupported(e)}catch(t){}return!1},LS.prototype.addQueryStateHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.state[e]=function(){return t.call(n||r.editor)}},LS.prototype.addQueryValueHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.value[e]=function(){return t.call(n||r.editor)}},LS.prototype.hasCustomCommand=function(e){return e=e.toLowerCase(),!!this.commands.exec[e]},LS.prototype.execNativeCommand=function(e,t,n){return t===undefined&&(t=!1),n===undefined&&(n=null),this.editor.getDoc().execCommand(e,t,n)},LS.prototype.isFormatMatch=function(e){return this.editor.formatter.match(e)},LS.prototype.toggleFormat=function(e,t){this.editor.formatter.toggle(e,t?{value:t}:undefined),this.editor.nodeChanged()},LS.prototype.storeSelection=function(e){this.selectionBookmark=this.editor.selection.getBookmark(e)},LS.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},LS.prototype.setupCommands=function(i){var a=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){i.undoManager.add()},"Cut,Copy,Paste":function(e){var t,n=i.getDoc();try{a.execNativeCommand(e)}catch(o){t=!0}if("paste"!==e||n.queryCommandEnabled(e)||(t=!0),t||!n.queryCommandSupported(e)){var r=i.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");rr.mac&&(r=r.replace(/Ctrl\+/g,"\u2318+")),i.notificationManager.open({text:r,type:"error"})}},unlink:function(){if(i.selection.isCollapsed()){var e=i.dom.getParent(i.selection.getStart(),"a");e&&i.dom.remove(e,!0)}else i.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"===t&&(t="justify"),DS("left,center,right,justify".split(","),function(e){t!==e&&i.formatter.remove("align"+e)}),"none"!==t&&a.toggleFormat("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;a.execNativeCommand(e),(t=i.dom.getParent(i.selection.getNode(),"ol,ul"))&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(a.storeSelection(),i.dom.split(n,t),a.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){a.toggleFormat(e)},"ForeColor,HiliteColor":function(e,t,n){a.toggleFormat(e,n)},FontName:function(e,t,n){AS(i,n)},FontSize:function(e,t,n){var r,o;o=n,(r=i).formatter.toggle("fontsize",{value:TS(r,o)}),r.nodeChanged()},RemoveFormat:function(e){i.formatter.remove(e)},mceBlockQuote:function(){a.toggleFormat("blockquote")},FormatBlock:function(e,t,n){return a.toggleFormat(n||"p")},mceCleanup:function(){var e=i.selection.getBookmark();i.setContent(i.getContent()),i.selection.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var r=n||i.selection.getNode();r!==i.getBody()&&(a.storeSelection(),i.dom.remove(r,!0),a.restoreSelection())},mceSelectNodeDepth:function(e,t,n){var r=0;i.dom.getParent(i.selection.getNode(),function(e){if(1===e.nodeType&&r++===n)return i.selection.select(e),!1},i.getBody())},mceSelectNode:function(e,t,n){i.selection.select(n)},mceInsertContent:function(e,t,n){yS(i,n)},mceInsertRawHTML:function(e,t,n){i.selection.setContent("tiny_mce_marker");var r=i.getContent();i.setContent(r.replace(/tiny_mce_marker/g,function(){return n}))},mceInsertNewLine:function(e,t,n){nx(i,n)},mceToggleFormat:function(e,t,n){a.toggleFormat(n)},mceSetContent:function(e,t,n){i.setContent(n)},"Indent,Outdent":function(e){uw(i,e)},mceRepaint:function(){},InsertHorizontalRule:function(){i.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){i.hasVisual=!i.hasVisual,i.addVisual()},mceReplaceContent:function(e,t,n){i.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,i.selection.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=i.dom.getParent(i.selection.getNode(),"a"),n.href=n.href.replace(/ /g,"%20"),r&&n.href||i.formatter.remove("link"),n.href&&i.formatter.apply("link",n,r)},selectAll:function(){var e=i.dom.getParent(i.selection.getStart(),on);if(e){var t=i.dom.createRng();t.selectNodeContents(e),i.selection.setRng(t)}},"delete":function(){var e;hw(e=i)||qC(e,!1)||WC(e,!1)||GC(e,!1)||NC(e,!1)||Vd(e)||RC(e)||ew(e,!1)||(bS(e,"Delete"),dC(e))},forwardDelete:function(){var e;qC(e=i,!0)||WC(e,!0)||GC(e,!0)||NC(e,!0)||Vd(e)||RC(e)||ew(e,!0)||bS(e,"ForwardDelete")},mceNewDocument:function(){i.setContent("")},InsertLineBreak:function(e,t,n){return Hw(i,n),!0}});var e=function(n){return function(){var e=i.selection.isCollapsed()?[i.dom.getParent(i.selection.getNode(),i.dom.isBlock)]:i.selection.getSelectedBlocks(),t=OS(e,function(e){return!!i.formatter.matchNode(e,n)});return-1!==BS(t,!0)}};a.addCommands({JustifyLeft:e("alignleft"),JustifyCenter:e("aligncenter"),JustifyRight:e("alignright"),JustifyFull:e("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return a.isFormatMatch(e)},mceBlockQuote:function(){return a.isFormatMatch("blockquote")},Outdent:function(){return ow(i)},"InsertUnorderedList,InsertOrderedList":function(e){var t=i.dom.getParent(i.selection.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),a.addCommands({Undo:function(){i.undoManager.undo()},Redo:function(){i.undoManager.redo()}}),a.addQueryValueHandler("FontName",function(){return RS(t=i).fold(function(){return _S(t).map(function(e){return kS(t.getBody(),e)}).getOr("")},function(e){return kS(t.getBody(),e)});var t},this),a.addQueryValueHandler("FontSize",function(){return RS(t=i).fold(function(){return _S(t).map(function(e){return ES(t.getBody(),e)}).getOr("")},function(e){return ES(t.getBody(),e)});var t},this)},LS);function LS(e){this.commands={state:{},exec:{},value:{}},this.editor=e,this.setupCommands(e)}var IS=hr.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),MS=(FS.isNative=function(e){return!!IS[e.toLowerCase()]},FS.prototype.fire=function(e,t){var n,r,o,i;if(e=e.toLowerCase(),(t=t||{}).type=e,t.target||(t.target=this.scope),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=h},t.stopPropagation=function(){t.isPropagationStopped=h},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=h},t.isDefaultPrevented=g,t.isPropagationStopped=g,t.isImmediatePropagationStopped=g),this.settings.beforeFire&&this.settings.beforeFire(t),n=this.bindings[e])for(r=0,o=n.length;r<o;r++){if((i=n[r]).once&&this.off(e,i.func),t.isImmediatePropagationStopped())return t.stopPropagation(),t;if(!1===i.func.call(this.scope,t))return t.preventDefault(),t}return t},FS.prototype.on=function(e,t,n,r){var o,i,a;if(!1===t&&(t=g),t){var u={func:t};for(r&&hr.extend(u,r),a=(i=e.toLowerCase().split(" ")).length;a--;)e=i[a],(o=this.bindings[e])||(o=this.bindings[e]=[],this.toggleEvent(e,!0)),n?o.unshift(u):o.push(u)}return this},FS.prototype.off=function(e,t){var n,r,o,i,a=this;if(e)for(n=(o=e.toLowerCase().split(" ")).length;n--;){if(e=o[n],r=this.bindings[e],!e)return oe(this.bindings,function(e,t){a.toggleEvent(t,!1),delete a.bindings[t]}),this;if(r){if(t)for(i=r.length;i--;)r[i].func===t&&(r=r.slice(0,i).concat(r.slice(i+1)),this.bindings[e]=r);else r.length=0;r.length||(this.toggleEvent(e,!1),delete this.bindings[e])}}else oe(this.bindings,function(e,t){a.toggleEvent(t,!1)}),this.bindings={};return this},FS.prototype.once=function(e,t,n){return this.on(e,t,n,{once:!0})},FS.prototype.has=function(e){return e=e.toLowerCase(),!(!this.bindings[e]||0===this.bindings[e].length)},FS);function FS(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||g}var US,zS=function(n){return n._eventDispatcher||(n._eventDispatcher=new MS({scope:n,toggleEvent:function(e,t){MS.isNative(e)&&n.toggleNativeEvent&&n.toggleNativeEvent(e,t)}})),n._eventDispatcher},jS={fire:function(e,t,n){if(this.removed&&"remove"!==e&&"detach"!==e)return t;var r=zS(this).fire(e,t);if(!1!==n&&this.parent)for(var o=this.parent();o&&!r.isPropagationStopped();)o.fire(e,r,!1),o=o.parent();return r},on:function(e,t,n){return zS(this).on(e,t,n)},off:function(e,t){return zS(this).off(e,t)},once:function(e,t){return zS(this).once(e,t)},hasEventListeners:function(e){return zS(this).has(e)}},HS="data-mce-contenteditable",VS=function(e,t,n){Ma(e,t)&&!1===n?function(e,t){Oa(e)?e.dom().classList.remove(t):Pa(e,t);Ia(e)}(e,t):n&&La(e,t)},qS=function(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}},$S=function(e,t){e.dom().contentEditable=t?"true":"false"},WS=function(e,t){var n,r,o,i=Ne.fromDom(e.getBody());VS(i,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),o=e,R.from(o.selection.getNode()).each(function(e){e.removeAttribute("data-mce-selected")}),e.readonly=!0,$S(i,!1),z(Ua(i,'*[contenteditable="true"]'),function(e){cn(e,HS,"true"),$S(e,!1)})):(e.readonly=!1,$S(i,!0),z(Ua(i,"*["+HS+'="true"]'),function(e){dn(e,HS),$S(e,!0)}),qS(e,"StyleWithCSS",!1),qS(e,"enableInlineTableEditing",!1),qS(e,"enableObjectResizing",!1),(Pm(r=e)||Bm(r))&&e.focus(),(n=e).selection.setRng(n.selection.getRng()),e.nodeChanged())},KS=function(e){return e.readonly},XS=function(t){t.parser.addAttributeFilter("contenteditable",function(e){KS(t)&&z(e,function(e){e.attr(HS,e.attr("contenteditable")),e.attr("contenteditable","false")})}),t.serializer.addAttributeFilter(HS,function(e){KS(t)&&z(e,function(e){e.attr("contenteditable",e.attr(HS))})}),t.serializer.addTempAttr(HS)},YS=ga.DOM,GS=function(e,t){return"selectionchange"===t?e.getDoc():!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=YS.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()},JS=function(e,t,n){var r,o,i,a,u;(u=e).hidden||KS(u)?KS(e)&&(r=e,a=(o=n).target,"click"!==o.type||Zh.metaKeyPressed(o)||(i=a,null===r.dom.getParent(i,"a"))||o.preventDefault()):e.fire(t,n)},QS=function(i,a){var e,t;if(i.delegates||(i.delegates={}),!i.delegates[a]&&!i.removed)if(e=GS(i,a),i.settings.event_root){if(US||(US={},i.editorManager.on("removeEditor",function(){i.editorManager.activeEditor||US&&(oe(US,function(e,t){i.dom.unbind(GS(i,t))}),US=null)})),US[a])return;t=function(e){for(var t=e.target,n=i.editorManager.get(),r=n.length;r--;){var o=n[r].getBody();o!==t&&!YS.isChildOf(t,o)||JS(n[r],a,e)}},US[a]=t,YS.bind(e,a,t)}else t=function(e){JS(i,a,e)},YS.bind(e,a,t),i.delegates[a]=t},ZS=pe(pe({},jS),{bindPendingEventDelegates:function(){var t=this;hr.each(t._pendingNativeEvents,function(e){QS(t,e)})},toggleNativeEvent:function(e,t){var n=this;"focus"!==e&&"blur"!==e&&(t?n.initialized?QS(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(GS(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var n=this,e=n.getBody(),t=n.dom;n.delegates&&(oe(n.delegates,function(e,t){n.dom.unbind(GS(n,t),t,e)}),delete n.delegates),!n.inline&&e&&t&&(e.onload=null,t.unbind(n.getWin()),t.unbind(n.getDoc())),t&&(t.unbind(e),t.unbind(n.getContainer()))}}),eN=["design","readonly"],tN=function(e,t,n,r){var o,i=n[t.get()],a=n[r];try{a.activate()}catch(pE){return void V.console.error("problem while activating editor mode "+r+":",pE)}i.deactivate(),i.editorReadOnly!==a.editorReadOnly&&WS(e,a.editorReadOnly),t.set(r),o=r,e.fire("SwitchMode",{mode:o})},nN=function(t){var e,n,r=xa("design"),o=xa({design:{activate:f,deactivate:f,editorReadOnly:!1},readonly:{activate:f,deactivate:f,editorReadOnly:!0}});return(e=t).serializer?XS(e):e.on("PreInit",function(){XS(e)}),(n=t).on("ShowCaret",function(e){KS(n)&&e.preventDefault()}),n.on("ObjectSelected",function(e){KS(n)&&e.preventDefault()}),{isReadOnly:function(){return KS(t)},set:function(e){return function(e,t,n,r){if(r!==n.get()){if(!me(t,r))throw new Error("Editor mode '"+r+"' is invalid");e.initialized?tN(e,n,t,r):e.on("init",function(){return tN(e,n,t,r)})}}(t,o.get(),r,e)},get:function(){return r.get()},register:function(e,t){o.set(function(e,t,n){var r;if(M(eN,t))throw new Error("Cannot override default mode "+t);return pe(pe({},e),((r={})[t]=pe(pe({},n),{deactivate:function(){try{n.deactivate()}catch(pE){V.console.error("problem while deactivating editor mode "+t+":",pE)}}}),r))}(o.get(),e,t))}}},rN=hr.each,oN=hr.explode,iN={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},aN=hr.makeMap("alt,ctrl,shift,meta,access"),uN=(sN.prototype.add=function(e,n,r,o){var t,i=this;return"string"==typeof(t=r)?r=function(){i.editor.execCommand(t,!1,null)}:hr.isArray(t)&&(r=function(){i.editor.execCommand(t[0],t[1],t[2])}),rN(oN(hr.trim(e)),function(e){var t=i.createShortcut(e,n,r,o);i.shortcuts[t.id]=t}),!0},sN.prototype.remove=function(e){var t=this.createShortcut(e);return!!this.shortcuts[t.id]&&(delete this.shortcuts[t.id],!0)},sN.prototype.parseShortcut=function(e){var t,n,r={};for(n in rN(oN(e.toLowerCase(),"+"),function(e){e in aN?r[e]=!0:/^[0-9]{2,}$/.test(e)?r.keyCode=parseInt(e,10):(r.charCode=e.charCodeAt(0),r.keyCode=iN[e]||e.toUpperCase().charCodeAt(0))}),t=[r.keyCode],aN)r[n]?t.push(n):r[n]=!1;return r.id=t.join(","),r.access&&(r.alt=!0,rr.mac?r.ctrl=!0:r.shift=!0),r.meta&&(rr.mac?r.meta=!0:(r.ctrl=!0,r.meta=!1)),r},sN.prototype.createShortcut=function(e,t,n,r){var o;return(o=hr.map(oN(e,">"),this.parseShortcut))[o.length-1]=hr.extend(o[o.length-1],{func:n,scope:r||this.editor}),hr.extend(o[0],{desc:this.editor.translate(t),subpatterns:o.slice(1)})},sN.prototype.hasModifier=function(e){return e.altKey||e.ctrlKey||e.metaKey},sN.prototype.isFunctionKey=function(e){return"keydown"===e.type&&112<=e.keyCode&&e.keyCode<=123},sN.prototype.matchShortcut=function(e,t){return!!t&&t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&t.alt===e.altKey&&t.shift===e.shiftKey&&!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0)},sN.prototype.executeShortcutAction=function(e){return e.func?e.func.call(e.scope):null},sN);function sN(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;var n=this;e.on("keyup keypress keydown",function(t){!n.hasModifier(t)&&!n.isFunctionKey(t)||t.isDefaultPrevented()||(rN(n.shortcuts,function(e){if(n.matchShortcut(t,e))return n.pendingPatterns=e.subpatterns.slice(0),"keydown"===t.type&&n.executeShortcutAction(e),!0}),n.matchShortcut(t,n.pendingPatterns[0])&&(1===n.pendingPatterns.length&&"keydown"===t.type&&n.executeShortcutAction(n.pendingPatterns[0]),n.pendingPatterns.shift()))})}var cN=function(){var e,t,n,r,o,i,a,u,s=(t={},n={},r={},o={},i={},a={},{addButton:(u=function(n,r){return function(e,t){return n[e.toLowerCase()]=pe(pe({},t),{type:r})}})(e={},"button"),addGroupToolbarButton:u(e,"grouptoolbarbutton"),addToggleButton:u(e,"togglebutton"),addMenuButton:u(e,"menubutton"),addSplitButton:u(e,"splitbutton"),addMenuItem:u(t,"menuitem"),addNestedMenuItem:u(t,"nestedmenuitem"),addToggleMenuItem:u(t,"togglemenuitem"),addAutocompleter:u(n,"autocompleter"),addContextMenu:u(o,"contextmenu"),addContextToolbar:u(i,"contexttoolbar"),addContextForm:u(i,"contextform"),addSidebar:u(a,"sidebar"),addIcon:function(e,t){return r[e.toLowerCase()]=t},getAll:function(){return{buttons:e,menuItems:t,icons:r,popups:n,contextMenus:o,contextToolbars:i,sidebars:a}}});return{addAutocompleter:s.addAutocompleter,addButton:s.addButton,addContextForm:s.addContextForm,addContextMenu:s.addContextMenu,addContextToolbar:s.addContextToolbar,addIcon:s.addIcon,addMenuButton:s.addMenuButton,addMenuItem:s.addMenuItem,addNestedMenuItem:s.addNestedMenuItem,addSidebar:s.addSidebar,addSplitButton:s.addSplitButton,addToggleButton:s.addToggleButton,addGroupToolbarButton:s.addGroupToolbarButton,addToggleMenuItem:s.addToggleMenuItem,getAll:s.getAll}},lN=hr.each,fN=hr.trim,dN="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),mN={ftp:21,http:80,https:443,mailto:25},pN=(gN.parseDataUri=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(t=r[1]),{type:t,data:n[1]}},gN.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},gN.prototype.setPath=function(e){var t=/^(.*?)\/?(\w+)?$/.exec(e);this.path=t[0],this.directory=t[1],this.file=t[2],this.source="",this.getURI()},gN.prototype.toRelative=function(e){var t;if("./"===e)return e;var n=new gN(e,{base_uri:this});if("mce_host"!==n.host&&this.host!==n.host&&n.host||this.port!==n.port||this.protocol!==n.protocol&&""!==n.protocol)return n.getURI();var r=this.getURI(),o=n.getURI();return r===o||"/"===r.charAt(r.length-1)&&r.substr(0,r.length-1)===o?r:(t=this.toRelPath(this.path,n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),t)},gN.prototype.toAbsolute=function(e,t){var n=new gN(e,{base_uri:this});return n.getURI(t&&this.isSameOrigin(n))},gN.prototype.isSameOrigin=function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=mN[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},gN.prototype.toRelPath=function(e,t){var n,r,o,i=0,a="",u=e.substring(0,e.lastIndexOf("/")).split("/");if(n=t.split("/"),u.length>=n.length)for(r=0,o=u.length;r<o;r++)if(r>=n.length||u[r]!==n[r]){i=r+1;break}if(u.length<n.length)for(r=0,o=n.length;r<o;r++)if(r>=u.length||u[r]!==n[r]){i=r+1;break}if(1===i)return t;for(r=0,o=u.length-(i-1);r<o;r++)a+="../";for(r=i-1,o=n.length;r<o;r++)a+=r!==i-1?"/"+n[r]:n[r];return a},gN.prototype.toAbsPath=function(e,t){var n,r,o,i=0,a=[];r=/\/$/.test(t)?"/":"";var u=e.split("/"),s=t.split("/");for(lN(u,function(e){e&&a.push(e)}),u=a,n=s.length-1,a=[];0<=n;n--)0!==s[n].length&&"."!==s[n]&&(".."!==s[n]?0<i?i--:a.push(s[n]):i++);return 0!==(o=(n=u.length-i)<=0?J(a).join("/"):u.slice(0,n).join("/")+"/"+J(a).join("/")).indexOf("/")&&(o="/"+o),r&&o.lastIndexOf("/")!==o.length-1&&(o+=r),o},gN.prototype.getURI=function(e){var t;return void 0===e&&(e=!1),this.source&&!e||(t="",e||(this.protocol?t+=this.protocol+"://":t+="//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source},gN);function gN(e,t){e=fN(e),this.settings=t||{};var n=this.settings.base_uri,r=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))r.source=e;else{var o=0===e.indexOf("//");if(0!==e.indexOf("/")||o||(e=(n&&n.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){var i=this.settings.base_uri?this.settings.base_uri.path:new gN(V.document.location.href).directory;if(this.settings.base_uri&&""==this.settings.base_uri.protocol)e="//mce_host"+r.toAbsPath(i,e);else{var a=/([^#?]*)([#?]?.*)/.exec(e);e=(n&&n.protocol||"http")+"://mce_host"+r.toAbsPath(i,a[1])+a[2]}}e=e.replace(/@@/g,"(mce_at)");var u=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);lN(dN,function(e,t){var n=u[t];n=n&&n.replace(/\(mce_at\)/g,"@@"),r[e]=n}),n&&(r.protocol||(r.protocol=n.protocol),r.userInfo||(r.userInfo=n.userInfo),r.port||"mce_host"!==r.host||(r.port=n.port),r.host&&"mce_host"!==r.host||(r.host=n.host),r.source=""),o&&(r.protocol="")}}var hN=ga.DOM,vN=hr.extend,yN=hr.each,bN=hr.resolve,CN=rr.ie,wN=(xN.prototype.render=function(){!function(t){var e=t.settings,n=t.id;ka.setCode(Ws(t));var r=function(){dS.unbind(V.window,"ready",r),t.render()};if(ho.Event.domLoaded){if(t.getElement()&&rr.contentEditable){e.inline?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var o=t.getElement().form||dS.getParent(n,"form");o&&(t.formElement=o,e.hidden_input&&!Qt(t.getElement())&&(dS.insertAfter(dS.create("input",{type:"hidden",name:n}),n),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},dS.bind(o,"submit reset",t.formEventDelegate),t.on("reset",function(){t.resetContent()}),!e.submit_patch||o.submit.nodeType||o.submit.length||o._mceOldSubmit||(o._mceOldSubmit=o.submit,o.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),o._mceOldSubmit(o)})),t.windowManager=rh(t),t.notificationManager=eh(t),"xml"===e.encoding&&t.on("GetContent",function(e){e.save&&(e.content=dS.encode(e.content))}),e.add_form_submit_trigger&&t.on("submit",function(){t.initialized&&t.save()}),e.add_unload_trigger&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),vS(t,t.suffix)}}else dS.bind(V.window,"ready",r)}(this)},xN.prototype.focus=function(e){var t,n;n=e,(t=this).removed||(n?Im:Lm)(t)},xN.prototype.hasFocus=function(){return Pm(this)},xN.prototype.execCallback=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=this.settings[e];if(o)return this.callbackLookup&&(r=this.callbackLookup[e])&&(o=r.func,r=r.scope),"string"==typeof o&&(r=(r=o.replace(/\.\w+$/,""))?bN(r):0,o=bN(o),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:o,scope:r}),o.apply(r||this,t)},xN.prototype.translate=function(e){return ka.translate(e)},xN.prototype.getParam=function(e,t,n){return qg(this,e,t,n)},xN.prototype.nodeChanged=function(e){this._nodeChangeDispatcher.nodeChanged(e)},xN.prototype.addCommand=function(e,t,n){this.editorCommands.addCommand(e,t,n)},xN.prototype.addQueryStateHandler=function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},xN.prototype.addQueryValueHandler=function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},xN.prototype.addShortcut=function(e,t,n,r){this.shortcuts.add(e,t,n,r)},xN.prototype.execCommand=function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},xN.prototype.queryCommandState=function(e){return this.editorCommands.queryCommandState(e)},xN.prototype.queryCommandValue=function(e){return this.editorCommands.queryCommandValue(e)},xN.prototype.queryCommandSupported=function(e){return this.editorCommands.queryCommandSupported(e)},xN.prototype.show=function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable="true":(hN.show(this.getContainer()),hN.hide(this.id)),this.load(),this.fire("show"))},xN.prototype.hide=function(){var e=this,t=e.getDoc();e.hidden||(CN&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(hN.hide(e.getContainer()),hN.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},xN.prototype.isHidden=function(){return!!this.hidden},xN.prototype.setProgressState=function(e,t){this.fire("ProgressState",{state:e,time:t})},xN.prototype.load=function(e){var t,n=this.getElement();if(this.removed)return"";if(n){(e=e||{}).load=!0;var r=Qt(n)?n.value:n.innerHTML;return t=this.setContent(r,e),e.element=n,e.no_events||this.fire("LoadContent",e),e.element=n=null,t}},xN.prototype.save=function(e){var t,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(e=e||{}).save=!0,e.element=o,e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"===e.format&&r.fire("RawSaveContent",e),t=e.content,Qt(o)?o.value=t:(!e.is_removing&&r.inline||(o.innerHTML=t),(n=hN.getParent(r.id,"form"))&&yN(n.elements,function(e){if(e.name===r.id)return e.value=t,!1})),e.element=o=null,!1!==e.set_dirty&&r.setDirty(!1),t},xN.prototype.setContent=function(e,t){return Sg(this,e,t)},xN.prototype.getContent=function(e){return xg(this,e)},xN.prototype.insertContent=function(e,t){t&&(e=vN({content:e},t)),this.execCommand("mceInsertContent",!1,e)},xN.prototype.resetContent=function(e){e===undefined?Sg(this,this.startContent,{format:"raw"}):Sg(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},xN.prototype.isDirty=function(){return!this.isNotDirty},xN.prototype.setDirty=function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},xN.prototype.getContainer=function(){return this.container||(this.container=hN.get(this.editorContainer||this.id+"_parent")),this.container},xN.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},xN.prototype.getElement=function(){return this.targetElm||(this.targetElm=hN.get(this.id)),this.targetElm},xN.prototype.getWin=function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},xN.prototype.getDoc=function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},xN.prototype.getBody=function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},xN.prototype.convertURL=function(e,t,n){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?this.documentBaseURI.toRelative(e):e=this.documentBaseURI.toAbsolute(e,r.remove_script_host)},xN.prototype.addVisual=function(e){var n,r=this,o=r.settings,i=r.dom;e=e||r.getBody(),r.hasVisual===undefined&&(r.hasVisual=o.visual),yN(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return n=o.visual_table_class||"mce-item-table",void((t=i.getAttrib(e,"border"))&&"0"!==t||!r.hasVisual?i.removeClass(e,n):i.addClass(e,n));case"A":return void(i.getAttrib(e,"href")||(t=i.getAttrib(e,"name")||e.id,n=o.visual_anchor_class||"mce-item-anchor",t&&r.hasVisual?i.addClass(e,n):i.removeClass(e,n)))}}),r.fire("VisualAid",{element:e,hasVisual:r.hasVisual})},xN.prototype.remove=function(){kg(this)},xN.prototype.destroy=function(e){_g(this,e)},xN.prototype.uploadImages=function(e){return this.editorUpload.uploadImages(e)},xN.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},xN.prototype.addButton=function(){throw new Error("editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead")},xN.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},xN.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},xN.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},xN);function xN(e,t,n){var r=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,vN(this,ZS),this.settings=Hg(this,e,this.documentBaseUrl,n.defaultSettings,t),this.settings.suffix&&(n.suffix=this.settings.suffix),this.suffix=n.suffix,this.settings.base_url&&n._setBaseUrl(this.settings.base_url),this.baseUri=n.baseURI,this.settings.referrer_policy&&(ba.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),ga.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),Ra.languageLoad=this.settings.language_load,Ra.baseURL=n.baseURL,this.id=e,this.setDirty(!1),this.documentBaseURI=new pN(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new uN(this),this.editorCommands=new PS(this),this.settings.cache_suffix&&(rr.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:cN()};var o=nN(this);this.mode=o,this.setMode=o.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=na.overrideDefaults(function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}})}var SN,NN,EN=ga.DOM,kN=hr.explode,_N=hr.each,RN=hr.extend,TN=0,AN=!1,DN=[],ON=[],BN=function(t){var n=t.type;_N(MN.get(),function(e){switch(n){case"scroll":e.fire("ScrollWindow",t);break;case"resize":e.fire("ResizeWindow",t)}})},PN=function(e){e!==AN&&(e?na(window).on("resize scroll",BN):na(window).off("resize scroll",BN),AN=e)},LN=function(t){var e=ON;delete DN[t.id];for(var n=0;n<DN.length;n++)if(DN[n]===t){DN.splice(n,1);break}return ON=H(ON,function(e){return t!==e}),MN.activeEditor===t&&(MN.activeEditor=0<ON.length?ON[0]:null),MN.focusedEditor===t&&(MN.focusedEditor=null),e.length!==ON.length},IN="CSS1Compat"!==V.document.compatMode,MN=pe(pe({},jS),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:na,majorVersion:"5",minorVersion:"3.2",releaseDate:"2020-06-10",editors:DN,i18n:ka,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var e,t,n="";t=pN.getDocumentBaseUrl(V.document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/"));var r,o=window.tinymce||window.tinyMCEPreInit;if(o)e=o.base||o.baseURL,n=o.suffix;else{for(var i=V.document.getElementsByTagName("script"),a=0;a<i.length;a++){var u;if(""!==(u=i[a].src||"")){var s=u.substring(u.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(u)){-1!==s.indexOf(".min")&&(n=".min"),e=u.substring(0,u.lastIndexOf("/"));break}}}if(!e&&V.document.currentScript)-1!==(u=V.document.currentScript.src).indexOf(".min")&&(n=".min"),e=u.substring(0,u.lastIndexOf("/"))}this.baseURL=new pN(t).toAbsolute(e),this.documentBaseURL=t,this.baseURI=new pN(this.baseURL),this.suffix=n,(r=this).on("AddEditor",N(_m,r)),r.on("RemoveEditor",N(Rm,r))},overrideDefaults:function(e){var t,n;(t=e.base_url)&&this._setBaseUrl(t),n=e.suffix,e.suffix&&(this.suffix=n);var r=(this.defaultSettings=e).plugin_base_urls;r!==undefined&&oe(r,function(e,t){Ra.PluginManager.urls[t]=e})},init:function(r){var n,u,s=this;u=hr.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," ");var c=function(e){var t=e.id;return t||(t=(t=e.name)&&!EN.get(t)?e.name:EN.uniqueId(),e.setAttribute("id",t)),t},l=function(e,t){return t.constructor===RegExp?t.test(e.className):EN.hasClass(e,t)},f=function(e){n=e},e=function(){var o,i=0,a=[],n=function(e,t,n){var r=new wN(e,t,s);a.push(r),r.on("init",function(){++i===o.length&&f(a)}),r.targetElm=r.targetElm||n,r.render()};EN.unbind(window,"ready",e),function(e){var t=r[e];if(t)t.apply(s,Array.prototype.slice.call(arguments,2))}("onpageload"),o=na.unique(function(t){var e,n=[];if(rr.browser.isIE()&&rr.browser.version.major<11)return ch("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(IN)return ch("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(t.types)return _N(t.types,function(e){n=n.concat(EN.select(e.selector))}),n;if(t.selector)return EN.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":0<(e=t.elements||"").length&&_N(kN(e),function(t){var e;(e=EN.get(t))?n.push(e):_N(V.document.forms,function(e){_N(e.elements,function(e){e.name===t&&(t="mce_editor_"+TN++,EN.setAttrib(e,"id",t),n.push(e))})})});break;case"textareas":case"specific_textareas":_N(EN.select("textarea"),function(e){t.editor_deselector&&l(e,t.editor_deselector)||t.editor_selector&&!l(e,t.editor_selector)||n.push(e)})}return n}(r)),r.types?_N(r.types,function(t){hr.each(o,function(e){return!EN.is(e,t.selector)||(n(c(e),RN({},r,t),e),!1)})}):(hr.each(o,function(e){var t;(t=s.get(e.id))&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(LN(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0,t=null)}),0===(o=hr.grep(o,function(e){return!s.get(e.id)})).length?f([]):_N(o,function(e){var t;t=e,r.inline&&t.tagName.toLowerCase()in u?ch("Could not initialize inline editor on invalid inline target element",e):n(c(e),r,e)}))};return s.settings=r,EN.bind(window,"ready",e),new Mn(function(t){n?t(n):f=function(e){t(e)}})},get:function(t){return 0===arguments.length?ON.slice(0):q(t)?K(ON,function(e){return e.id===t}).getOr(null):O(t)&&ON[t]?ON[t]:null},add:function(e){var n=this;return DN[e.id]===e||(null===n.get(e.id)&&("length"!==e.id&&(DN[e.id]=e),DN.push(e),ON.push(e)),PN(!0),n.activeEditor=e,n.fire("AddEditor",{editor:e}),SN||(SN=function(e){var t=n.fire("BeforeUnload");if(t.returnValue)return e.preventDefault(),e.returnValue=t.returnValue,t.returnValue},window.addEventListener("beforeunload",SN))),e},createEditor:function(e,t){return this.add(new wN(e,t,this))},remove:function(e){var t,n,r=this;if(e){if(!q(e))return n=e,_(r.get(n.id))?null:(LN(n)&&r.fire("RemoveEditor",{editor:n}),0===ON.length&&window.removeEventListener("beforeunload",SN),n.remove(),PN(0<ON.length),n);_N(EN.select(e),function(e){(n=r.get(e.id))&&r.remove(n)})}else for(t=ON.length-1;0<=t;t--)r.remove(ON[t])},execCommand:function(e,t,n){var r=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new wN(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?(r.isHidden()?r.show():r.hide(),!0):(this.execCommand("mceAddEditor",0,n),!0)}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){_N(ON,function(e){e.save()})},addI18n:function(e,t){ka.add(e,t)},translate:function(e){return ka.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!==e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e},_setBaseUrl:function(e){this.baseURL=new pN(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new pN(this.baseURL)}});function FN(n){return{walk:function(e,t){return jl(n,e,t)},split:Vm,normalize:function(t){return Wh(n,t).fold(x(!1),function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0})}}}MN.setup(),(NN=FN=FN||{}).compareRanges=Uh,NN.getCaretRangeFromPoint=Bh,NN.getSelectedNode=ju,NN.getNode=Hu;var UN,zN,jN,HN,VN=FN,qN=(UN={},zN={},{load:function(r,o){var i='Script at URL "'+o+'" failed to load',a='Script at URL "'+o+"\" did not call `tinymce.Resource.add('"+r+"', data)` within 1 second";if(UN[r]!==undefined)return UN[r];var e=new Mn(function(e,t){var n=function(e,t,n){void 0===n&&(n=1e3);var r=!1,o=null,i=function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r||(r=!0,null!==o&&(V.clearTimeout(o),o=null),n.apply(null,e))}},a=i(e),u=i(t);return{start:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r||null!==o||(o=V.setTimeout(function(){return u.apply(null,e)},n))},resolve:a,reject:u}}(e,t);zN[r]=n.resolve,ba.ScriptLoader.loadScript(o,function(){return n.start(a)},function(){return n.reject(i)})});return UN[r]=e},add:function(e,t){zN[e]!==undefined&&(zN[e](t),delete zN[e]),UN[e]=Mn.resolve(t)}}),$N=Math.min,WN=Math.max,KN=Math.round,XN=function(e,t,n){var r,o,i,a,u,s;return r=t.x,o=t.y,i=e.w,a=e.h,u=t.w,s=t.h,"b"===(n=(n||"").split(""))[0]&&(o+=s),"r"===n[1]&&(r+=u),"c"===n[0]&&(o+=KN(s/2)),"c"===n[1]&&(r+=KN(u/2)),"b"===n[3]&&(o-=a),"r"===n[4]&&(r-=i),"c"===n[3]&&(o-=KN(a/2)),"c"===n[4]&&(r-=KN(i/2)),YN(r,o,i,a)},YN=function(e,t,n,r){return{x:e,y:t,w:n,h:r}},GN={inflate:function(e,t,n){return YN(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:XN,findBestRelativePosition:function(e,t,n,r){var o,i;for(i=0;i<r.length;i++)if((o=XN(e,t,r[i])).x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=WN(e.x,t.x),r=WN(e.y,t.y),o=$N(e.x+e.w,t.x+t.w),i=$N(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:YN(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,u,s,c,l,f,d;return u=e.x,s=e.y,c=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=WN(0,t.x-u),o=WN(0,t.y-s),i=WN(0,c-f),a=WN(0,l-d),u+=r,s+=o,n&&(c+=r,l+=o,u-=i,s-=a),YN(u,s,(c-=i)-u,(l-=a)-s)},create:YN,fromClientRect:function(e){return YN(e.left,e.top,e.width,e.height)}},JN=hr.each,QN=hr.extend,ZN=function(){};ZN.extend=jN=function(n){var o,i=this.prototype,r=function(){var e,t,n;if(!HN&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)},t=function(){return this};return HN=!0,o=new this,HN=!1,n.Mixins&&(JN(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),i.Mixins&&(n.Mixins=i.Mixins.concat(n.Mixins))),n.Methods&&JN(n.Methods.split(","),function(e){n[e]=t}),n.Properties&&JN(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return e!==undefined?(this[t]=e,this):this[t]}}),n.Statics&&JN(n.Statics,function(e,t){r[t]=e}),n.Defaults&&i.Defaults&&(n.Defaults=QN({},i.Defaults,n.Defaults)),oe(n,function(e,t){var n,r;"function"==typeof e&&i[t]?o[t]=(n=t,r=e,function(){var e,t=this._super;return this._super=i[n],e=r.apply(this,arguments),this._super=t,e}):o[t]=e}),r.prototype=o,(r.constructor=r).extend=jN,r};var eE=Math.min,tE=Math.max,nE=Math.round,rE={serialize:function(e){var t=JSON.stringify(e);return q(t)?t.replace(/[\u0080-\uFFFF]/g,function(e){var t=e.charCodeAt(0).toString(16);return"\\u"+"0000".substring(t.length)+t}):t},parse:function(e){try{return JSON.parse(e)}catch(t){}}},oE={callbacks:{},count:0,send:function(t){var n=this,r=ga.DOM,o=t.count!==undefined?t.count:n.count,i="tinymce_jsonp_"+o;n.callbacks[o]=function(e){r.remove(i),delete n.callbacks[o],t.callback(e)},r.add(r.doc.body,"script",{id:i,src:t.url,type:"text/javascript"}),n.count++}},iE=pe(pe({},jS),{send:function(e){var t,n=0,r=function(){!e.async||4===t.readyState||1e4<n++?(e.success&&n<1e4&&200===t.status?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,1e4<n?"TIMED_OUT":"GENERAL",t,e),t=null):Xn.setTimeout(r,10)};if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",iE.fire("beforeInitialize",{settings:e}),t=new V.XMLHttpRequest){if(t.overrideMimeType&&t.overrideMimeType(e.content_type),t.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(t.withCredentials=!0),e.content_type&&t.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&hr.each(e.requestheaders,function(e){t.setRequestHeader(e.key,e.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=iE.fire("beforeSend",{xhr:t,settings:e}).xhr).send(e.data),!e.async)return r();Xn.setTimeout(r,10)}}}),aE=hr.extend,uE=(sE.sendRPC=function(e){return(new sE).send(e)},sE.prototype.send=function(e){var n=e.error,r=e.success,o=aE(this.settings,e);o.success=function(e,t){void 0===(e=rE.parse(e))&&(e={error:"JSON Parse error."}),e.error?n.call(o.error_scope||o.scope,e.error,t):r.call(o.success_scope||o.scope,e.result)},o.error=function(e,t){n&&n.call(o.error_scope||o.scope,e,t)},o.data=rE.serialize({id:e.id||"c"+this.count++,method:e.method,params:e.params}),o.content_type="application/json",iE.send(o)},sE);function sE(e){this.settings=aE({},e),this.count=0}var cE;try{var lE="__storage_test__";(cE=V.window.localStorage).setItem(lE,lE),cE.removeItem(lE)}catch(pE){cE=function(){return n={},r=[],e={getItem:function(e){var t=n[e];return t||null},setItem:function(e,t){r.push(e),n[e]=String(t)},key:function(e){return r[e]},removeItem:function(t){r=r.filter(function(e){return e===t}),delete n[t]},clear:function(){r=[],n={}},length:0},Object.defineProperty(e,"length",{get:function(){return r.length},configurable:!1,enumerable:!1}),e;var n,r,e}()}var fE,dE={geom:{Rect:GN},util:{Promise:Mn,Delay:Xn,Tools:hr,VK:Zh,URI:pN,Class:ZN,EventDispatcher:MS,Observable:jS,I18n:ka,XHR:iE,JSON:rE,JSONRequest:uE,JSONP:oE,LocalStorage:cE,Color:function(e){var n={},u=0,s=0,c=0,t=function(e){var t;return"object"==typeof e?"r"in e?(u=e.r,s=e.g,c=e.b):"v"in e&&function(e,t,n){var r,o,i,a;if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,n=parseInt(n,10)/100,t=tE(0,eE(t,1)),n=tE(0,eE(n,1)),0!==t){switch(r=e/60,i=(o=n*t)*(1-Math.abs(r%2-1)),a=n-o,Math.floor(r)){case 0:u=o,s=i,c=0;break;case 1:u=i,s=o,c=0;break;case 2:u=0,s=o,c=i;break;case 3:u=0,s=i,c=o;break;case 4:u=i,s=0,c=o;break;case 5:u=o,s=0,c=i;break;default:u=s=c=0}u=nE(255*(u+a)),s=nE(255*(s+a)),c=nE(255*(c+a))}else u=s=c=nE(255*n)}(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(u=parseInt(t[1],10),s=parseInt(t[2],10),c=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(u=parseInt(t[1],16),s=parseInt(t[2],16),c=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(u=parseInt(t[1]+t[1],16),s=parseInt(t[2]+t[2],16),c=parseInt(t[3]+t[3],16)),u=u<0?0:255<u?255:u,s=s<0?0:255<s?255:s,c=c<0?0:255<c?255:c,n};return e&&t(e),n.toRgb=function(){return{r:u,g:s,b:c}},n.toHsv=function(){return e=u,t=s,n=c,o=0,(i=eE(e/=255,eE(t/=255,n/=255)))===(a=tE(e,tE(t,n)))?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,{h:nE(60*((e===i?3:n===i?1:5)-(e===i?t-n:n===i?e-t:n-e)/((o=a)-i))),s:nE(100*r),v:nE(100*o)});var e,t,n,r,o,i,a},n.toHex=function(){var e=function(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e};return"#"+e(u)+e(s)+e(c)},n.parse=t,n}},dom:{EventUtils:ho,Sizzle:hi,DomQuery:na,TreeWalker:ra,TextSeeker:uu,DOMUtils:ga,ScriptLoader:ba,RangeUtils:VN,Serializer:Av,ControlSelection:nv,BookmarkManager:Jh,Selection:av,Event:ho.Event},html:{Styles:ao,Entities:$r,Node:df,Schema:no,SaxParser:kf,DomParser:Ev,Writer:gf,Serializer:hf},Env:rr,AddOnManager:Ra,Annotator:af,Formatter:Wv,UndoManager:Xv,EditorCommands:PS,WindowManager:rh,NotificationManager:eh,EditorObservable:ZS,Shortcuts:uN,Editor:wN,FocusManager:xm,EditorManager:MN,DOM:ga.DOM,ScriptLoader:ba.ScriptLoader,PluginManager:Ra.PluginManager,ThemeManager:Ra.ThemeManager,IconManager:$g,Resource:qN,trim:hr.trim,isArray:hr.isArray,is:hr.is,toArray:hr.toArray,makeMap:hr.makeMap,each:hr.each,map:hr.map,grep:hr.grep,inArray:hr.inArray,extend:hr.extend,create:hr.create,walk:hr.walk,createNS:hr.createNS,resolve:hr.resolve,explode:hr.explode,_addCacheSuffix:hr._addCacheSuffix,isOpera:rr.opera,isWebKit:rr.webkit,isIE:rr.ie,isGecko:rr.gecko,isMac:rr.mac},mE=hr.extend(MN,dE);fE=mE,window.tinymce=fE,window.tinyMCE=fE,function(e){if("object"==typeof module)try{module.exports=e}catch(t){}}(mE)}(window);

--- a/tinymce/6/init.php
+++ b/tinymce/6/init.php
@@ -28,20 +28,17 @@
 		language: '$tinylanguage',
   		theme: 'silver',
 		invalid_styles: 'color,font-size,margin,line-height,font-family,margin-top,margin-bottom',
-		plugins: 'wordcount emoticons fullscreen anchor code hr image link paste ',
+		plugins: 'wordcount emoticons fullscreen anchor code image link',
 		skin: 'tinymce-5',
 		min_height: 300,
 		min_width: 200,
 		width: 580,
 		toolbar_location: 'top',
 	    browser_spellcheck: true,
-		relative_urls: false,
+		relative_urls: true,
 		remove_script_host: false,
     	convert_urls: true,
-		paste_word_valid_elements: 'b,strong,i,em,h1,h2,u,p,ol,ul,li,a[href],span,color,font-size,font-color,font-family,mark,table,tr,td',
 		toolbar1: 'bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist | undo redo | fullscreen code | link unlink | emoticons image anchor hr ',	image_advtab: true,
-     	paste_word_valid_elements: 'b,strong,i,em,p,span,u,strike,br',
-    	paste_retain_style_properties: 'text-decoration,text-align',
 	    menu: {
 			file: { title: 'File', items: 'newdocument' },
 			edit: { title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall' },
@@ -55,7 +52,7 @@
 		echo "
 		theme_silver_resizing: true,".($current == "adminarea" ? "\n\t\tentity_encoding: 'raw'" : "\n\t\tinvalid_elements: 'script,object,applet,iframe'")."
    });
-	
+
 ";
 	}
 	echo "
@@ -64,7 +61,7 @@
 		var elm = document.getElementById(id);
 
 		if (tinyMCE.get(id) == null)
-		tinymce.EditorManager.execCommand('mceToggleEditor',true, id);
+		tinymce.EditorManager.execCommand('mceToggleEditor', true, id);
 		else
 		tinymce.EditorManager.execCommand('mceToggleEditor', false, id);
 	}